/* Global Styles */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.footer {
    margin-top: auto;
}

/* Dashboard Styles */
.dashboard-card {
    transition: transform 0.3s ease;
    height: 100%;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.dashboard-icon {
    font-size: 2.5rem;
    color: #0d6efd;
}

/* Table Styles */
.table-actions {
    white-space: nowrap;
}

/* Form Styles */
.required label:after {
    content: ' *';
    color: red;
}

/* Map Container */
.map-container {
    width: 100%;
    height: 400px;
    margin-bottom: 20px;
}

/* Custom Card Styles */
.card-header-tabs .nav-link.active {
    background-color: white;
    border-bottom-color: white;
}

/* Custom Pagination */
.pagination-info {
    padding-top: 0.5rem;
}

/* Data Table Styles */
.dataTables_wrapper .dataTables_filter {
    float: right;
    text-align: right;
    margin-bottom: 10px;
}

.dataTables_wrapper .dataTables_length {
    float: left;
    margin-bottom: 10px;
}

/* Status Indicators */
.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.status-online {
    background-color: #28a745;
}

.status-offline {
    background-color: #dc3545;
}

.status-warning {
    background-color: #ffc107;
}

/* Login Page */
.login-logo {
    max-width: 200px;
    margin: 0 auto 20px;
}

/* Login Page Styles */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 0;
    margin: 0;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-header {
    background: #ffffff !important;
    border-bottom: none !important;
    padding: 2rem 1rem !important;
    border-radius: 15px 15px 0 0 !important;
}

.login-brand-logo {
    width: 120px;
    height: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.1));
}

.login-title {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.login-form {
    padding: 2rem;
}

.login-input {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.login-input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.login-btn {
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 1rem;
}

.login-footer {
    background: transparent !important;
    border-top: none !important;
    padding: 1.5rem !important;
}

.login-footer a {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: #0b5ed7;
    text-decoration: underline;
}

/* Brand Logo Styles */
.navbar-brand img {
    height: 30px;
    width: auto;
    object-fit: contain;
    max-width: 150px;
}

.login-brand-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    max-width: 200px;
    margin-right: 10px;
    vertical-align: middle;
}

/* Nested Dropdown Styles */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
}

.dropdown-submenu:hover>.dropdown-menu {
    display: block;
}

.dropdown-submenu>.dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .dashboard-card {
        margin-bottom: 15px;
    }
}

/* Dark Mode Styles */
[data-theme="dark"] {
    color-scheme: dark;
}

[data-theme="dark"] body {
    background-color: #1a1a1a;
    color: #f0f0f0;
}

[data-theme="dark"] .card {
    background-color: #2d2d2d;
    border-color: #404040;
}

[data-theme="dark"] .card-header {
    background-color: #333333;
    border-bottom-color: #404040;
}

[data-theme="dark"] .table {
    color: #f0f0f0;
}

[data-theme="dark"] .table thead th {
    background-color: #333333;
    color: #f0f0f0;
    border-bottom-color: #404040;
}

[data-theme="dark"] .table td {
    border-color: #404040;
}

[data-theme="dark"] .modal-content {
    background-color: #2d2d2d;
}

[data-theme="dark"] .modal-header {
    border-bottom-color: #404040;
}

[data-theme="dark"] .modal-footer {
    border-top-color: #404040;
}

[data-theme="dark"] .form-control {
    background-color: #333333;
    border-color: #404040;
    color: #f0f0f0;
}

[data-theme="dark"] .form-control:focus {
    background-color: #404040;
    color: #f0f0f0;
}

[data-theme="dark"] .nav-link {
    color: #f0f0f0;
}

[data-theme="dark"] .dropdown-menu {
    background-color: #2d2d2d;
    border-color: #404040;
}

[data-theme="dark"] .dropdown-item {
    color: #f0f0f0;
}

[data-theme="dark"] .dropdown-item:hover {
    background-color: #404040;
    color: #ffffff;
}

[data-theme="dark"] .footer {
    background-color: #2d2d2d !important;
}

[data-theme="dark"] .alert {
    border-color: #404040;
}

[data-theme="dark"] .text-muted {
    color: #a0a0a0 !important;
}

/* Dark mode toggle switch */
.theme-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #0d6efd;
}

input:checked+.slider:before {
    transform: translateX(26px);
}