:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-bg: #0f172a;
    --dark-bg-light: #1e293b;
    --dark-bg-lighter: #334155;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: var(--text-dark);
    line-height: 1.5;
    overflow-x: hidden;
    font-size: 14px;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--dark-bg-light) 100%);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--dark-bg-lighter) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--dark-bg-lighter);
    border-radius: 2px;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--dark-bg-lighter);
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.sidebar.collapsed .logo-icon {
    opacity: 0;
    transform: translateX(-20px);
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: white;
    transition: all 0.3s ease;
    opacity: 1;
}

.sidebar.collapsed .logo-text {
    opacity: 0;
    transform: translateX(-20px);
}

.sidebar-toggle {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 25px;
    height: 25px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1001;
    font-size: 20px;
}

.sidebar-toggle:hover {
    background: transparent;
    transform: translateY(-50%) scale(1.1);
}

.sidebar-toggle i {
    transition: transform 0.3s ease;
}

.sidebar.collapsed .sidebar-toggle i {
    transform: rotate(90deg);
}

.nav-menu {
    list-style: none;
    padding: 16px 0;
}

.nav-item {
    margin: 5px 25px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    font-size: 13px;
    font-weight: 500;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(96, 165, 250, 0.1) 100%);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.nav-link:hover::before,
.nav-link.active::before {
    transform: translateX(0);
}

.nav-link:hover,
.nav-link.active {
    color: white;
    background: rgba(59, 130, 246, 0.2);
    transform: translateX(6px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.nav-link i {
    font-size: 16px;
    width: 18px;
    text-align: center;
    transition: all 0.3s ease;
}

.nav-link-text {
    font-weight: 500;
    transition: all 0.3s ease;
    opacity: 1;
}

.sidebar.collapsed .nav-link-text {
    opacity: 0;
    transform: translateX(-20px);
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 12px;
}

/* Header */
.top-header {
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow);
}

.sidebar.collapsed ~ .top-header {
    left: var(--sidebar-collapsed-width);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.search-container {
    position: relative;
    max-width: 400px;
    width: 100%;
    left: 30px;
}

.search-container i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.header-search {
    width: 90%;
    padding: 15px 26px 5px 54px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--light-bg);
    font-size: 13px;
    font-weight: 400;
    transition: all 0.3s ease;
    color: var(--text-dark);
}

.header-search:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.header-search::placeholder {
    color: var(--text-muted);
    font-weight: 30;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 40px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: var(--light-bg);
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 16px;
    position: relative;
}

.header-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-section:hover {
    background: var(--light-bg);
}

.profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.profile-info {
    display: flex;
    flex-direction: column;
}

.profile-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.2;
}

.profile-role {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.2;
}

.profile-dropdown {
    color: var(--text-muted);
    font-size: 12px;
    transition: all 0.3s ease;
}

.profile-section:hover .profile-dropdown {
    color: var(--primary-color);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* Hide active tab indicators when sidebar is collapsed */
.sidebar.collapsed .nav-link.active::before {
    display: none;
}

.sidebar.collapsed .nav-link.active {
    background: transparent !important;
    color: var(--text-muted) !important;
    transform: translateX(0) !important;
    box-shadow: none !important;
}

.sidebar.collapsed .nav-link:hover {
    background: rgba(59, 130, 246, 0.1) !important;
    transform: translateX(0) !important;
}

.content-wrapper {
    padding: 24px;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    background: linear-gradient(135deg, var(--text-dark) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-actions-content {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--text-light);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow);
}

.btn-secondary:hover {
    background: var(--light-bg);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #34d399 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #fbbf24 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #f87171 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 11px;
}

/* Dashboard Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInScale 0.6s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
}

.card-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 6px;
    background: linear-gradient(135deg, var(--text-dark) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-subtitle {
    font-size: 12px;
    color: var(--text-light);
}

/* Progress Circle */
.progress-circle {
    width: 100px;
    height: 100px;
    margin: 16px auto;
    position: relative;
}

.progress-circle svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-circle-bg {
    fill: none;
    stroke: #f1f5f9;
    stroke-width: 6;
}

.progress-circle-fill {
    fill: none;
    stroke: url(#gradient);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 1s ease;
    animation: progressAnimation 2s ease-in-out;
}

@keyframes progressAnimation {
    from {
        stroke-dashoffset: 283;
    }
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
}

/* Tables */
.table-container {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    animation: slideInUp 0.6s ease-out;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.table-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--light-bg) 0%, white 100%);
}

.table-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

th, td {
    padding: 16px 24px;
    text-align: left;
    border-bottom: 1px solid #f8fafc;
    font-size: 13px;
}

th {
    background: var(--light-bg);
    font-weight: 700;
    color: var(--text-dark);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

tbody tr {
    transition: all 0.3s ease;
}

tbody tr:hover {
    background: linear-gradient(135deg, var(--light-bg) 0%, rgba(59, 130, 246, 0.05) 100%);
    transform: scale(1.005);
}

/* Status badges */
.status {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.status-paid {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
}

.status-unpaid {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    color: #dc2626;
}

.status-vacant {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
}

.status-occupied {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 6px;
    align-items: center;
}

.btn-action {
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.btn-view {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: white;
}

.btn-edit {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    color: white;
}

.btn-delete {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    color: white;
}

.btn-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* Forms */
.form-container {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    max-width: 600px;
    animation: fadeInScale 0.6s ease-out;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 13px;
}

.form-input, .form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 13px;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

/* Search and filters */
.search-filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 14px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.search-input {
    padding: 10px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    width: 280px;
    transition: all 0.3s ease;
    font-size: 13px;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-select {
    padding: 10px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: white;
    transition: all 0.3s ease;
    font-size: 13px;
}

/* Messages */
.messages {
    margin-bottom: 20px;
}

.alert {
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInDown 0.5s ease-out;
    font-size: 13px;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
    border: 2px solid #bbf7d0;
}

.alert-error {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    color: #dc2626;
    border: 2px solid #fecaca;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .top-header {
        left: 0;
    }
    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    .mobile-overlay.active {
        display: block;
    }
    .mobile-menu-btn {
        display: block;
        position: fixed;
        top: 10px;
        left: 7px;
        z-index: 1002;
        background: white;
        color: var(--text-dark);
        border: none;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        box-shadow: var(--shadow-lg);
        cursor: pointer;
        transition: all 0.3s ease;
        font-size: 20px;
        opacity: 1;
        visibility: visible;
    }

    .mobile-menu-btn:hover {
        transform: scale(1.1);
    }

    /* Hide mobile menu button when sidebar is active */
    .sidebar-active .mobile-menu-btn {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
    .header-left {
        gap: 12px;
    }
    .search-container {
        max-width: 200px;
    }
    .profile-info {
        display: none;
    }
}

@media (min-width: 1025px) {
    .mobile-menu-btn {
        display: none;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 16px;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .search-filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .search-input {
        width: 100%;
    }
    .header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    .header-actions-content {
        justify-content: center;
    }
    th, td {
        padding: 10px 12px;
        font-size: 12px;
    }
    .form-container {
        padding: 20px;
    }
    .action-buttons {
        flex-direction: column;
        gap: 3px;
    }
    .btn-action {
        width: 100%;
        justify-content: center;
    }
    .top-header {
        padding: 0 16px;
        height: 60px;
    }
    .main-content {
        margin-top: 60px;
    }
    .search-container {
        max-width: 150px;
    }
    .header-search {
        font-size: 12px;
        padding: 8px 12px 8px 36px;
    }
    .header-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    .profile-avatar {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-bg);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
}

/* Animation for alert removal */
@keyframes slideOutUp {
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Sidebar toggle (desktop only) */
@media (max-width: 1024px) {
    .sidebar-toggle {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        width: var(--sidebar-width);
    }
    .sidebar.collapsed {
        width: var(--sidebar-width);
    }
}

/* Dropdown styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    z-index: 1001;
    padding: 8px 0;
    margin-top: 8px;
    animation: fadeInScale 0.2s ease-out;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.dropdown-item i {
    width: 16px;
    font-size: 14px;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

/* Quick actions */
.quick-action {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.quick-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

/* Ripple animation */
@keyframes ripple {
    to {
        transform: scale(2);
        opacity: 0;
    }
}


/* Profile dropdown styles */
.profile-section {
    position: relative;
    cursor: pointer;
}

.profile-info {
    text-align: right;
}

.profile-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
}

.profile-role {
    font-size: 12px;
    color: var(--text-light);
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 1000;
    margin-top: 8px;
    border: 1px solid var(--border-color);
}

.dropdown.active .dropdown-content {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 14px;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.dropdown-item:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

/* Logout form specific styles */
.logout-form {
    margin: 0;
}

.logout-btn {
    color: #ef4444 !important;
}

.logout-btn:hover {
    background: #fef2f2 !important;
    color: #dc2626 !important;
}





    .login-container {
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
        padding: 20px;
    }

    .login-card {
        background: white;
        border-radius: 16px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
        padding: 40px;
        width: 100%;
        max-width: 400px;
        border: 1px solid #e2e8f0;
    }

    .login-logo {
        text-align: center;
        margin-bottom: 32px;
    }

    .login-logo-icon {
        width: 64px;
        height: 64px;
        background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
        border-radius: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 16px;
        color: white;
        font-size: 28px;
    }

    .login-title {
        text-align: center;
        margin-bottom: 8px;
        color: #1f2937;
        font-weight: 700;
        font-size: 24px;
    }

    .login-subtitle {
        text-align: center;
        color: #6b7280;
        margin-bottom: 32px;
        font-size: 14px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-label {
        display: block;
        margin-bottom: 8px;
        font-weight: 600;
        color: #374151;
        font-size: 14px;
    }

    .form-control {
        width: 100%;
        padding: 12px 16px;
        border: 2px solid #e5e7eb;
        border-radius: 8px;
        font-size: 14px;
        transition: all 0.2s ease;
        background: #fafafa;
    }

    .form-control:focus {
        outline: none;
        border-color: var(--primary-color);
        background: white;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

    .form-control.error {
        border-color: #ef4444;
    }

    .error-message {
        color: #ef4444;
        font-size: 12px;
        margin-top: 4px;
        display: none;
    }

    .btn-login {
        width: 100%;
        padding: 12px;
        background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
        color: white;
        border: none;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s ease;
        margin-top: 8px;
    }

    .btn-login:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    }

    .btn-login:active {
        transform: translateY(0);
    }

    .login-footer {
        text-align: center;
        margin-top: 32px;
        padding-top: 24px;
        border-top: 1px solid #e5e7eb;
    }

    .login-footer-text {
        color: #6b7280;
        font-size: 12px;
    }

    .alert {
        padding: 12px 16px;
        border-radius: 8px;
        margin-bottom: 20px;
        font-size: 14px;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .alert-error {
        background: #fef2f2;
        color: #991b1b;
        border: 1px solid #fecaca;
    }

    .alert-success {
        background: #f0fdf4;
        color: #166534;
        border: 1px solid #bbf7d0;
    }

    .password-toggle {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        color: #6b7280;
        cursor: pointer;
        padding: 4px;
    }

    .password-container {
        position: relative;
    }

    @media (max-width: 480px) {
        .login-card {
            padding: 24px;
            margin: 20px;
        }
        
        .login-title {
            font-size: 20px;
        }
    }

    /* Submenu Styles - Add these to your existing styles.css file */

/* Has Submenu Items */
.nav-item.has-submenu .submenu-toggle {
    position: relative;
}

.nav-item.has-submenu .submenu-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    transition: all 0.3s ease;
    color: var(--text-muted);
}

.nav-item.has-submenu.open .submenu-arrow {
    transform: translateY(-50%) rotate(180deg);
    color: white;
}

/* Submenu Container */
.submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 0 8px 8px;
}

.nav-item.has-submenu.open .submenu {
    max-height: 300px;
    padding: 8px 0;
}

/* Submenu Items */
.submenu-item {
    margin: 2px 12px;
}

.submenu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 500;
    position: relative;
}

.submenu-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: transparent;
    border-radius: 0 3px 3px 0;
    transition: all 0.3s ease;
}

.submenu-link:hover::before,
.submenu-link.active::before {
    background: var(--primary-color);
}

.submenu-link:hover,
.submenu-link.active {
    background: rgba(59, 130, 246, 0.15);
    color: white;
    transform: translateX(4px);
}

.submenu-link i {
    font-size: 14px;
    width: 16px;
    text-align: center;
    opacity: 0.8;
}

.submenu-link span {
    font-weight: 500;
}

/* Collapsed Sidebar Submenu Handling */
.sidebar.collapsed .nav-item.has-submenu .submenu-arrow {
    display: none;
}

.sidebar.collapsed .submenu {
    display: none;
}

.sidebar.collapsed .nav-item.has-submenu:hover .submenu {
    display: block;
    position: absolute;
    left: 70px;
    top: 0;
    min-width: 200px;
    background: var(--dark-bg-light);
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
    z-index: 1001;
    max-height: none;
    padding: 8px 0;
}

.sidebar.collapsed .nav-item.has-submenu:hover .submenu-item {
    margin: 2px 8px;
}

.sidebar.collapsed .nav-item.has-submenu .nav-link {
    position: relative;
}

/* Main nav link hover effects for submenu items */
.nav-item.has-submenu .nav-link.submenu-toggle:hover,
.nav-item.has-submenu .nav-link.submenu-toggle.active {
    background: rgba(59, 130, 246, 0.2);
    color: white;
}

/* Ensure proper spacing for submenu arrows */
.nav-item.has-submenu .nav-link-text {
    padding-right: 24px;
}

/* Mobile Responsive Submenu */
@media (max-width: 1024px) {
    .sidebar.collapsed .nav-item.has-submenu:hover .submenu {
        position: relative;
        left: 0;
        min-width: auto;
        box-shadow: none;
        background: rgba(0, 0, 0, 0.1);
    }
    
    .sidebar.collapsed .nav-item.has-submenu .submenu-arrow {
        display: block;
    }
}

/* Animation for submenu expansion */
@keyframes submenuExpand {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 300px;
        opacity: 1;
    }
}

.nav-item.has-submenu.open .submenu {
    animation: submenuExpand 0.3s ease-out;
}

/* Enhanced visual feedback */
.nav-item.has-submenu.open .nav-link {
    background: rgba(59, 130, 246, 0.2);
    color: white;
}

.nav-item.has-submenu.open .nav-link i {
    color: var(--primary-light);
}

/* Submenu divider (optional) */
.submenu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 16px;
}

/* Badge support for submenu items */
.submenu-link .badge {
    margin-left: auto;
    font-size: 10px;
    padding: 2px 6px;
    background: var(--primary-color);
    color: white;
    border-radius: 10px;
}


/* Navigation Section Headers */
.nav-section-header {
    padding: 20px 16px 8px 16px;
    margin-top: 8px;
    list-style: none;
}

.nav-section-header:first-child {
    margin-top: 0;
    padding-top: 16px;
}

.nav-section-text {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #64748b;
    opacity: 0.7;
}

/* Submenu Styles */
.nav-item.has-submenu .submenu-arrow {
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.nav-item.has-submenu.open .submenu-arrow {
    transform: rotate(180deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 0 0 8px 8px;
}

.nav-item.has-submenu.open .submenu {
    max-height: 500px;
    padding: 8px 0;
}

.submenu-item {
    list-style: none;
    margin: 2px 12px;
}

.submenu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 500;
    position: relative;
}

.submenu-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: transparent;
    border-radius: 0 3px 3px 0;
    transition: all 0.3s ease;
}

.submenu-link:hover::before,
.submenu-link.active::before {
    background: var(--primary-color);
}

.submenu-link:hover,
.submenu-link.active {
    background: rgba(59, 130, 246, 0.15);
    color: white;
    transform: translateX(4px);
}

.submenu-link i {
    font-size: 14px;
    width: 16px;
    text-align: center;
    opacity: 0.8;
}

/* Main nav link for items with submenus */
.nav-item.has-submenu .nav-link-text {
    padding-right: 24px;
}

.nav-item.has-submenu.open .nav-link {
    background: rgba(59, 130, 246, 0.2);
    color: white;
}

.nav-item.has-submenu.open .nav-link i {
    color: var(--primary-light);
}

/* Collapsed Sidebar - Hide section headers and submenus */
.sidebar.collapsed .nav-section-header {
    display: none;
}

.sidebar.collapsed .submenu {
    display: none;
}

.sidebar.collapsed .nav-item.has-submenu .submenu-arrow {
    display: none;
}