/* ============================================
   WiFi Provider Admin - Modern Dashboard CSS
   ============================================ */

/* CSS Variables - Color System */
:root {
    /* Primary palette - Deep indigo to violet */
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-lighter: #e0e7ff;
    --primary-dark: #4f46e5;
    --primary-darker: #3730a3;

    /* Secondary - Teal accent */
    --secondary: #14b8a6;
    --secondary-light: #5eead4;
    --secondary-lighter: #ccfbf1;
    --secondary-dark: #0d9488;

    /* Success / Warning / Danger / Info */
    --success: #22c55e;
    --success-light: #dcfce7;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;

    /* Base */
    --white: #ffffff;
    --body-bg: #f8fafc;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --header-bg: rgba(255, 255, 255, 0.8);
    --input-bg: #ffffff;
    --input-border: #e2e8f0;
    --table-stripe: #f8fafc;
    --table-hover: #f1f5f9;
    --dropdown-bg: #ffffff;
    --dropdown-border: #e2e8f0;

    /* Neutral palette */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --header-height: 64px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Dark Mode
   ============================================ */
[data-theme="dark"] {
    --white: #1e293b;
    --body-bg: #0f172a;
    --card-bg: #1e293b;
    --card-border: #334155;
    --header-bg: rgba(30, 41, 59, 0.85);
    --input-bg: #0f172a;
    --input-border: #334155;
    --table-stripe: #162032;
    --table-hover: #1e293b;
    --dropdown-bg: #1e293b;
    --dropdown-border: #334155;

    --primary-lighter: rgba(99, 102, 241, 0.15);
    --secondary-lighter: rgba(20, 184, 166, 0.15);
    --success-light: rgba(34, 197, 94, 0.12);
    --warning-light: rgba(245, 158, 11, 0.12);
    --danger-light: rgba(239, 68, 68, 0.12);
    --info-light: rgba(59, 130, 246, 0.12);

    --gray-50: #162032;
    --gray-100: #1e293b;
    --gray-200: #334155;
    --gray-300: #475569;
    --gray-400: #64748b;
    --gray-500: #94a3b8;
    --gray-600: #cbd5e1;
    --gray-700: #e2e8f0;
    --gray-800: #f1f5f9;
    --gray-900: #f8fafc;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.2);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.3), 0 1px 2px -1px rgb(0 0 0 / 0.2);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.2);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.2);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.2);
}

[data-theme="dark"] body {
    background-color: var(--body-bg);
    color: var(--gray-700);
}

[data-theme="dark"] .sidebar {
    background: linear-gradient(180deg, #0c1222 0%, #111827 100%);
    border-right: 1px solid rgba(255,255,255,0.05);
}

[data-theme="dark"] .admin-header {
    background: var(--header-bg);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom-color: var(--card-border);
}

[data-theme="dark"] .card {
    background: var(--card-bg);
    border-color: var(--card-border);
}

[data-theme="dark"] .card-header {
    border-bottom-color: var(--card-border);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: var(--input-bg);
    border-color: var(--input-border);
    color: var(--gray-700);
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background-color: var(--input-bg);
    border-color: var(--primary);
    color: var(--gray-800);
}

[data-theme="dark"] .form-control::placeholder {
    color: var(--gray-400);
}

[data-theme="dark"] .input-group-text {
    background-color: var(--card-bg);
    border-color: var(--input-border);
    color: var(--gray-500);
}

[data-theme="dark"] .form-label {
    color: var(--gray-600);
}

[data-theme="dark"] .dropdown-menu {
    background: var(--dropdown-bg);
    border-color: var(--dropdown-border);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

[data-theme="dark"] .dropdown-menu-profile .dropdown-item:hover {
    background: rgba(255,255,255,0.05);
}

[data-theme="dark"] .dropdown-divider {
    background: var(--card-border);
}

[data-theme="dark"] .page-content-wrapper {
    background-color: var(--body-bg);
}

[data-theme="dark"] .admin-footer {
    border-top-color: var(--card-border);
    color: var(--gray-500);
}

[data-theme="dark"] .admin-footer a {
    color: var(--primary-light);
}

[data-theme="dark"] .data-table th {
    background: var(--card-bg) !important;
    color: var(--gray-600) !important;
    border-color: var(--card-border) !important;
}

[data-theme="dark"] .data-table td {
    border-color: var(--card-border) !important;
    color: var(--gray-600);
}

[data-theme="dark"] .data-table tbody tr:hover td {
    background: var(--table-hover) !important;
}

[data-theme="dark"] .data-table tbody tr td {
    background: var(--card-bg);
}

[data-theme="dark"] .data-table tbody tr:nth-child(even) td {
    background: var(--table-stripe);
}

[data-theme="dark"] .dataTables_info,
[data-theme="dark"] .dataTables_paginate {
    color: var(--gray-500) !important;
}

[data-theme="dark"] .dataTables_paginate .paginate_button {
    color: var(--gray-500) !important;
    border-color: var(--card-border) !important;
    background: var(--card-bg) !important;
}

[data-theme="dark"] .dataTables_paginate .paginate_button:hover {
    background: var(--gray-100) !important;
    color: var(--gray-700) !important;
}

[data-theme="dark"] .dataTables_paginate .paginate_button.current {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
}

[data-theme="dark"] .badge {
    opacity: 0.95;
}

[data-theme="dark"] .btn-outline-secondary {
    border-color: var(--card-border);
    color: var(--gray-600);
}

[data-theme="dark"] .btn-outline-secondary:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
}

[data-theme="dark"] .modal-overlay .modal-content {
    background: var(--card-bg);
    border-color: var(--card-border);
}

[data-theme="dark"] .header-profile:hover {
    background: rgba(255,255,255,0.06);
}

[data-theme="dark"] .header-profile-name {
    color: var(--gray-700);
}

[data-theme="dark"] .sidebar-user {
    border-color: rgba(255,255,255,0.05);
}

[data-theme="dark"] .form-check-input {
    background-color: var(--input-bg);
    border-color: var(--input-border);
}

[data-theme="dark"] .alert {
    border-color: var(--card-border);
}

[data-theme="dark"] .alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

[data-theme="dark"] ::selection {
    background: var(--primary);
    color: #fff;
}

[data-theme="dark"] .page-title-header {
    color: var(--gray-800);
}

[data-theme="dark"] .dropdown-profile-header {
    border-color: var(--card-border);
}

[data-theme="dark"] .stat-card {
    background: var(--card-bg);
    border-color: var(--card-border);
}

[data-theme="dark"] .profile-hero {
    background: linear-gradient(135deg, #4338ca 0%, #312e81 100%);
}

[data-theme="dark"] .filter-chip {
    background: var(--card-bg);
    border-color: var(--card-border);
    color: var(--gray-600);
}

[data-theme="dark"] .filter-chip:hover {
    border-color: var(--gray-300);
}

[data-theme="dark"] .filter-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

[data-theme="dark"] .quick-link-card {
    background: var(--card-bg);
    border-color: var(--card-border);
}

[data-theme="dark"] .quick-link-card:hover {
    border-color: var(--primary);
}

[data-theme="dark"] .admin-footer {
    background: var(--body-bg);
}

[data-theme="dark"] table.dataTable {
    border-color: var(--card-border) !important;
}

[data-theme="dark"] .dataTables_wrapper .dataTables_length select,
[data-theme="dark"] .dataTables_wrapper .dataTables_filter input {
    background-color: var(--input-bg);
    border-color: var(--input-border);
    color: var(--gray-700);
}

[data-theme="dark"] .dataTables_wrapper .dataTables_length label,
[data-theme="dark"] .dataTables_wrapper .dataTables_filter label {
    color: var(--gray-500);
}

[data-theme="dark"] .btn-primary {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

[data-theme="dark"] .text-muted {
    color: var(--gray-500) !important;
}

[data-theme="dark"] hr {
    border-color: var(--card-border);
}

[data-theme="dark"] .border-bottom {
    border-color: var(--card-border) !important;
}

[data-theme="dark"] .table {
    color: var(--gray-600);
}

[data-theme="dark"] .table td,
[data-theme="dark"] .table th {
    border-color: var(--card-border);
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--gray-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Layout Structure
   ============================================ */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
    overflow: hidden;
    width: 100%;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--gray-900) 0%, var(--gray-800) 100%);
    z-index: 1000;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--header-height);
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.sidebar-brand img {
    height: 32px;
    transition: var(--transition);
}

.sidebar-brand .brand-text {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-left: 10px;
    white-space: nowrap;
    letter-spacing: -0.5px;
}

.sidebar-brand .brand-text span {
    color: var(--primary-light);
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.sidebar-menu::-webkit-scrollbar {
    width: 4px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.menu-label {
    display: block;
    padding: 12px 24px 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-500);
    white-space: nowrap;
}

.menu-item {
    position: relative;
    margin: 2px 12px;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: var(--gray-400);
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
    gap: 12px;
    font-size: 13.5px;
    font-weight: 400;
    white-space: nowrap;
}

.menu-link i {
    font-size: 18px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.menu-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.menu-link.active {
    color: #fff;
    background: var(--primary);
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.menu-link.active i {
    color: #fff;
}

.menu-link .badge {
    margin-left: auto;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
}

.sidebar-user:hover {
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.sidebar-user-info {
    overflow: hidden;
    white-space: nowrap;
}

.sidebar-user-name {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    text-overflow: ellipsis;
    overflow: hidden;
}

.sidebar-user-role {
    color: var(--gray-500);
    font-size: 11px;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-width: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow-x: hidden;
}

/* Header / Navbar */
.admin-header {
    position: sticky;
    top: 0;
    height: var(--header-height);
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 900;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.page-title-header {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-toggle {
    display: none;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--border-radius-sm);
    color: var(--gray-600);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    font-size: 18px;
}

.sidebar-toggle:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.header-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: var(--border-radius-sm);
    color: var(--gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    font-size: 20px;
}

.header-btn:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.header-btn .notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid #fff;
}

/* Header Action Buttons (Theme & Language) */
.header-action-btn {
    position: relative;
    width: 38px;
    height: 38px;
    border: 1px solid var(--gray-200);
    background: var(--card-bg);
    border-radius: 10px;
    color: var(--gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    font-size: 16px;
}

.header-action-btn:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
    color: var(--gray-700);
}

.header-action-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Theme Toggle */
.theme-toggle .fa-sun {
    display: none;
}

.theme-toggle .fa-moon {
    display: inline;
}

[data-theme="dark"] .theme-toggle .fa-sun {
    display: inline;
}

[data-theme="dark"] .theme-toggle .fa-moon {
    display: none;
}

[data-theme="dark"] .header-action-btn {
    border-color: var(--card-border);
    background: var(--card-bg);
}

[data-theme="dark"] .header-action-btn:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
    color: var(--gray-800);
}

/* Language Dropdown */
.lang-dropdown .dropdown-menu {
    min-width: 180px;
    padding: 6px;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 6px;
    border: 1px solid var(--gray-200);
    background: var(--card-bg);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition-fast);
    height: 38px;
}

.lang-btn:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
}

[data-theme="dark"] .lang-btn {
    border-color: var(--card-border);
    background: var(--card-bg);
}

[data-theme="dark"] .lang-btn:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
}

.lang-flag {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--gray-200);
}

.lang-code {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lang-chevron {
    font-size: 10px;
    color: var(--gray-400);
    margin-left: 2px;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    color: var(--gray-600);
    font-size: 13px;
}

.lang-option:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.lang-option.active {
    background: var(--primary-lighter);
    color: var(--primary);
    font-weight: 500;
}

.lang-option .lang-flag {
    width: 24px;
    height: 24px;
}

.lang-option .lang-name {
    flex: 1;
}

.lang-option .lang-check {
    font-size: 12px;
    color: var(--primary);
    opacity: 0;
}

.lang-option.active .lang-check {
    opacity: 1;
}

.header-separator {
    width: 1px;
    height: 24px;
    background: var(--gray-200);
    margin: 0 4px;
}

[data-theme="dark"] .header-separator {
    background: var(--card-border);
}

.header-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 12px 4px 4px;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-fast);
    margin-left: 8px;
    position: relative;
}

.header-profile:hover {
    background: var(--gray-100);
}

.header-profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.header-profile-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    background: var(--dropdown-bg);
    border: 1px solid var(--dropdown-border);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: var(--transition-fast);
    z-index: 1050;
    margin-top: 8px;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu-profile {
    min-width: 280px;
    padding: 0;
}

.dropdown-profile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.dropdown-profile-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}

.dropdown-profile-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    line-height: 1.3;
}

.dropdown-profile-email {
    font-size: 12px;
    color: var(--gray-500);
}

.dropdown-menu-profile .dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--gray-700);
    border-radius: 0;
    font-size: 13px;
    transition: var(--transition-fast);
    text-decoration: none;
}

.dropdown-menu-profile .dropdown-item:hover {
    background: var(--gray-50);
}

.dropdown-item-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.dropdown-item-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-800);
    line-height: 1.3;
}

.dropdown-item-desc {
    font-size: 11px;
    color: var(--gray-500);
}

.dropdown-item-logout:hover {
    background: rgba(239, 68, 68, 0.04) !important;
}

.dropdown-menu-profile .dropdown-divider {
    margin: 0;
}

/* Legacy dropdown items (non-profile) */
.dropdown-menu:not(.dropdown-menu-profile) .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: var(--gray-600);
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    transition: var(--transition-fast);
}

.dropdown-menu:not(.dropdown-menu-profile) .dropdown-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.dropdown-menu:not(.dropdown-menu-profile) .dropdown-item:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.dropdown-menu:not(.dropdown-menu-profile) .dropdown-item.text-danger {
    color: var(--danger);
}

.dropdown-menu:not(.dropdown-menu-profile) .dropdown-item.text-danger:hover {
    background: var(--danger-light);
}

.dropdown-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 4px 0;
}

/* Page Content */
.page-content-wrapper {
    flex: 1;
    padding: 24px;
    min-width: 0;
    overflow-x: hidden;
}

/* Footer */
.admin-footer {
    padding: 16px 24px;
    text-align: center;
    color: var(--gray-400);
    font-size: 12.5px;
    border-top: 1px solid var(--gray-200);
    background: var(--card-bg);
}

.admin-footer a {
    color: var(--primary);
    font-weight: 500;
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
}

/* Stat Cards */
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.stat-card.stat-primary::before { background: var(--primary); }
.stat-card.stat-success::before { background: var(--success); }
.stat-card.stat-warning::before { background: var(--warning); }
.stat-card.stat-info::before { background: var(--info); }

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}

.stat-primary .stat-card-icon {
    background: var(--primary-lighter);
    color: var(--primary);
}

.stat-success .stat-card-icon {
    background: var(--success-light);
    color: var(--success);
}

.stat-warning .stat-card-icon {
    background: var(--warning-light);
    color: var(--warning);
}

.stat-info .stat-card-icon {
    background: var(--info-light);
    color: var(--info);
}

.stat-card-label {
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-card-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1.2;
}

.stat-card-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
    padding: 2px 8px;
    border-radius: 20px;
}

.stat-card-change.positive {
    background: var(--success-light);
    color: var(--success);
}

.stat-card-change.negative {
    background: var(--danger-light);
    color: var(--danger);
}

.stat-card-change i {
    font-size: 14px;
}

.stat-card-period {
    font-size: 11.5px;
    color: var(--gray-400);
    margin-top: 4px;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
    line-height: 1.5;
}

.btn:active {
    transform: scale(0.97);
}

.btn i {
    font-size: 16px;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.btn-secondary {
    background: var(--secondary);
    color: #fff;
    border-color: var(--secondary);
}

.btn-secondary:hover {
    background: var(--secondary-dark);
    border-color: var(--secondary-dark);
    color: #fff;
}

.btn-success {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}

.btn-success:hover {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

.btn-warning {
    background: var(--warning);
    color: #fff;
    border-color: var(--warning);
}

.btn-info {
    background: var(--info);
    color: #fff;
    border-color: var(--info);
}

.btn-info:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: #fff;
}

.btn-outline-secondary {
    background: transparent;
    color: var(--gray-600);
    border-color: var(--gray-300);
}

.btn-outline-secondary:hover {
    background: var(--gray-100);
    color: var(--gray-800);
    border-color: var(--gray-400);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
    border-color: transparent;
}

.btn-ghost:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

.btn-sm i {
    font-size: 14px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 15px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--border-radius-sm);
}

.btn-icon.btn-sm {
    width: 30px;
    height: 30px;
}

/* ============================================
   Forms
   ============================================ */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-control {
    display: block;
    width: 100%;
    padding: 9px 14px;
    font-family: 'Poppins', sans-serif;
    font-size: 13.5px;
    font-weight: 400;
    color: var(--gray-700);
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
    line-height: 1.5;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-control::placeholder {
    color: var(--gray-400);
}

.form-control:disabled,
.form-control[readonly] {
    background: var(--gray-100);
    color: var(--gray-500);
    cursor: not-allowed;
}

.form-control-sm {
    padding: 6px 10px;
    font-size: 12.5px;
}

.form-select {
    display: block;
    width: 100%;
    padding: 9px 36px 9px 14px;
    font-family: 'Poppins', sans-serif;
    font-size: 13.5px;
    font-weight: 400;
    color: var(--gray-700);
    background: var(--input-bg) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") no-repeat right 12px center/12px;
    border: 1px solid var(--input-border);
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
    appearance: none;
    outline: none;
}

.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check-input {
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-300);
    border-radius: 4px;
    appearance: none;
    cursor: pointer;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.form-check-input:checked {
    background: var(--primary);
    border-color: var(--primary);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
    background-size: 12px;
    background-position: center;
    background-repeat: no-repeat;
}

.form-check-label {
    font-size: 13px;
    color: var(--gray-600);
    cursor: pointer;
}

.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .form-control {
    border-radius: 0;
}

.input-group .form-control:first-child {
    border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
}

.input-group .form-control:last-child {
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 9px 14px;
    font-size: 13px;
    color: var(--gray-500);
    background: var(--gray-50);
    border: 1px solid var(--input-border);
    white-space: nowrap;
}

.input-group-text:first-child {
    border-right: 0;
    border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
}

.input-group-text:last-child {
    border-left: 0;
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

.form-text {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 4px;
}

.is-invalid {
    border-color: var(--danger) !important;
}

.invalid-feedback {
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
}

/* ============================================
   Tables
   ============================================ */
.table-container {
    overflow-x: auto;
    border-radius: var(--border-radius);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.data-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    background: var(--gray-50);
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}

.data-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-600);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Table action buttons */
.table-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.table-action-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 6px;
    color: var(--gray-500);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 16px;
}

.table-action-btn:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.table-action-btn.edit:hover {
    background: var(--info-light);
    color: var(--info);
}

.table-action-btn.delete:hover {
    background: var(--danger-light);
    color: var(--danger);
}

.table-action-btn.view:hover {
    background: var(--primary-lighter);
    color: var(--primary);
}

/* ============================================
   Badges
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    font-size: 11.5px;
    font-weight: 600;
    border-radius: 20px;
    line-height: 1.5;
}

.badge-primary {
    background: var(--primary-lighter);
    color: var(--primary-dark);
}

.badge-success {
    background: var(--success-light);
    color: #16a34a;
}

.badge-danger {
    background: var(--danger-light);
    color: #dc2626;
}

.badge-warning {
    background: var(--warning-light);
    color: #d97706;
}

.badge-info {
    background: var(--info-light);
    color: #2563eb;
}

.badge-secondary {
    background: var(--gray-200);
    color: var(--gray-600);
}

.badge-outline {
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-600);
}

/* ============================================
   Modal
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
    padding: 16px;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-dialog {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    pointer-events: auto;
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95) translateY(10px);
    transition: var(--transition);
}

.modal-overlay.show .modal-dialog {
    transform: scale(1) translateY(0);
}

.modal-dialog.modal-lg {
    max-width: 720px;
}

.modal-dialog.modal-xl {
    max-width: 960px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--gray-100);
    border-radius: 50%;
    color: var(--gray-500);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 18px;
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

/* ============================================
   Tabs
   ============================================ */
.nav-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--gray-200);
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-tabs::-webkit-scrollbar {
    display: none;
}

.nav-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-500);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition-fast);
    white-space: nowrap;
    cursor: pointer;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: 'Poppins', sans-serif;
}

.nav-tab:hover {
    color: var(--gray-700);
}

.nav-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    padding-top: 16px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* ============================================
   Alerts / Toast
   ============================================ */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    margin-bottom: 16px;
    border: 1px solid transparent;
}

.alert i:first-child {
    font-size: 18px;
    flex-shrink: 0;
}

.alert span {
    flex: 1;
}

.alert-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.6;
    color: inherit;
    padding: 0;
    line-height: 1;
}

.alert-close:hover {
    opacity: 1;
}

.alert-success {
    background: var(--success-light);
    color: #166534;
    border-color: #bbf7d0;
}

.alert-danger {
    background: var(--danger-light);
    color: #991b1b;
    border-color: #fecaca;
}

.alert-warning {
    background: var(--warning-light);
    color: #92400e;
    border-color: #fde68a;
}

.alert-info {
    background: var(--info-light);
    color: #1e40af;
    border-color: #bfdbfe;
}

/* Grid: Using Bootstrap grid. Custom spacing only. */
.row > [class*="col-"] {
    margin-bottom: 24px;
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.page-item .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    background: var(--card-bg);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
}

.page-item .page-link:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.page-item.active .page-link {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.page-item.disabled .page-link {
    color: var(--gray-300);
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================
   Search & Filters
   ============================================ */
.search-box {
    position: relative;
    max-width: 300px;
}

.search-box .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 16px;
}

.search-box .form-control {
    padding-left: 38px;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Date range filter */
.date-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-filter .form-control {
    width: 150px;
}

.filter-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 14px;
    font-size: 12.5px;
    font-weight: 500;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1px solid var(--gray-300);
    color: var(--gray-600);
    background: var(--card-bg);
    font-family: 'Poppins', sans-serif;
}

.filter-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-chip.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ============================================
   Chart Container
   ============================================ */
.chart-container {
    position: relative;
    width: 100%;
    min-height: 300px;
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.empty-state-icon {
    font-size: 48px;
    color: var(--gray-300);
    margin-bottom: 16px;
}

.empty-state-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.empty-state-text {
    font-size: 13px;
    color: var(--gray-400);
    max-width: 360px;
}

/* ============================================
   Loading / Spinner
   ============================================ */
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: inherit;
}

/* ============================================
   Auth Pages (Login)
   ============================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--primary-darker) 50%, var(--gray-800) 100%);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 50%;
    top: -150px;
    right: -150px;
    filter: blur(80px);
}

.auth-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(20, 184, 166, 0.1);
    border-radius: 50%;
    bottom: -100px;
    left: -100px;
    filter: blur(80px);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 40px 36px;
    position: relative;
    z-index: 1;
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo img {
    height: 40px;
}

.auth-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-800);
    text-align: center;
    margin-bottom: 6px;
}

.auth-subtitle {
    font-size: 13.5px;
    color: var(--gray-400);
    text-align: center;
    margin-bottom: 28px;
}

.auth-form .form-group {
    margin-bottom: 18px;
}

.auth-form .btn {
    width: 100%;
    padding: 11px;
    font-size: 14px;
    font-weight: 600;
}

/* ============================================
   Utility Classes
   ============================================ */
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info { color: var(--info) !important; }
.text-muted { color: var(--gray-400) !important; }
.text-dark { color: var(--gray-800) !important; }

.bg-primary { background-color: var(--primary) !important; }
.bg-success { background-color: var(--success) !important; }
.bg-danger { background-color: var(--danger) !important; }
.bg-warning { background-color: var(--warning) !important; }
.bg-info { background-color: var(--info) !important; }

.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

.fs-xs { font-size: 11px; }
.fs-sm { font-size: 12.5px; }
.fs-md { font-size: 14px; }
.fs-lg { font-size: 16px; }
.fs-xl { font-size: 20px; }
.fs-2xl { font-size: 24px; }

.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }
.d-none { display: none; }
.d-block { display: block; }

.flex-wrap { flex-wrap: wrap; }
.flex-column { flex-direction: column; }
.flex-grow-1 { flex-grow: 1; }
.flex-shrink-0 { flex-shrink: 0; }

.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.align-items-end { align-items: flex-end; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-end { justify-content: flex-end; }

.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 24px; }

.m-0 { margin: 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.ms-auto { margin-left: auto; }
.me-auto { margin-right: auto; }

.p-0 { padding: 0; }
.p-2 { padding: 8px; }
.p-3 { padding: 16px; }
.p-4 { padding: 24px; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.text-center { text-align: center; }
.text-end { text-align: right; }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.rounded { border-radius: var(--border-radius); }
.rounded-sm { border-radius: var(--border-radius-sm); }
.rounded-lg { border-radius: var(--border-radius-lg); }
.rounded-circle { border-radius: 50%; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.position-relative { position: relative; }

.border { border: 1px solid var(--gray-200); }
.border-0 { border: none; }
.border-bottom { border-bottom: 1px solid var(--gray-200); }

.cursor-pointer { cursor: pointer; }

/* ============================================
   Responsive Design
   ============================================ */
/* Responsive grid handled by Bootstrap */

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition-fast);
    }

    .sidebar-backdrop.show {
        opacity: 1;
        visibility: visible;
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    .page-content-wrapper {
        padding: 16px;
    }

    .stat-card {
        padding: 18px;
    }

    .stat-card-value {
        font-size: 20px;
    }

    .card-body {
        padding: 16px;
    }

    .card-header {
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .admin-header {
        padding: 0 12px;
    }

    .d-md-none {
        display: none !important;
    }

    .header-profile-name {
        display: none;
    }

    .lang-code {
        display: none;
    }

    .lang-chevron {
        display: none;
    }

    .header-separator {
        display: none;
    }

    .page-title-header {
        font-size: 15px;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        max-width: 100%;
    }

    .date-filter {
        flex-direction: column;
    }

    .date-filter .form-control {
        width: 100%;
    }

    .dropdown-menu-profile {
        min-width: 240px;
        right: -40px;
    }

    .filter-chips {
        width: 100%;
    }

    .filter-chip {
        padding: 4px 10px;
        font-size: 11.5px;
    }

    .chart-container {
        min-height: 220px !important;
    }

    .data-table thead th,
    .data-table tbody td {
        padding: 10px 10px;
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .page-content-wrapper {
        padding: 12px;
    }

    .auth-card {
        padding: 28px 20px;
    }

    .modal-overlay {
        padding: 8px;
    }

    .modal-dialog {
        margin: 0;
        max-width: 100%;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 12px 14px;
    }

    .row > [class*="col-"] {
        margin-bottom: 12px;
    }

    .d-sm-none {
        display: none !important;
    }

    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 12px !important;
    }

    .um-stats {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .um-filter {
        padding: 12px !important;
    }

    .um-actions {
        gap: 2px;
    }

    .um-action-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .btn {
        padding: 8px 14px;
        font-size: 12.5px;
    }

    .admin-footer {
        font-size: 11px;
        padding: 12px;
    }

    .alert {
        font-size: 12px;
        padding: 10px 12px;
        gap: 8px;
    }
}

/* ============================================
   DataTables Override
   ============================================ */
.dataTables_wrapper {
    font-family: 'Poppins', sans-serif;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 16px;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    font-size: 13px;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    font-family: 'Poppins', sans-serif;
    padding: 6px 12px;
    font-size: 13px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    outline: none;
    transition: var(--transition-fast);
}

.dataTables_wrapper .dataTables_length select:focus,
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.dataTables_wrapper .dataTables_info {
    font-size: 12.5px;
    color: var(--gray-500);
    padding-top: 16px;
}

.dataTables_wrapper .dataTables_paginate {
    padding-top: 16px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    background: var(--card-bg);
    border: 1px solid var(--gray-200) !important;
    border-radius: var(--border-radius-sm);
    margin: 0 2px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--gray-100) !important;
    color: var(--gray-800) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    color: var(--gray-300) !important;
    cursor: not-allowed;
}

/* Client avatar in tables */
.client-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

/* Action buttons in tables */
.btn-action {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--gray-200);
    background: var(--card-bg);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 13px;
    text-decoration: none;
    color: var(--gray-500);
}

.btn-action:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-action-info {
    color: var(--info);
    border-color: rgba(59, 130, 246, 0.3);
}

.btn-action-info:hover {
    background: var(--info);
    color: #fff;
    border-color: var(--info);
}

.btn-action-danger {
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-action-danger:hover {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

.btn-action-success {
    color: var(--success);
    border-color: rgba(34, 197, 94, 0.3);
}

.btn-action-success:hover {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}

/* Quick stat indicator */
.quick-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-size: 13px;
}

table.dataTable {
    border-collapse: collapse !important;
}

table.dataTable thead th {
    border-bottom: 2px solid var(--gray-200) !important;
    padding: 12px 16px !important;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    background: var(--gray-50);
}

table.dataTable tbody td {
    padding: 12px 16px !important;
    border-bottom: 1px solid var(--gray-100) !important;
    font-size: 13.5px;
    color: var(--gray-600);
}

table.dataTable tbody tr:hover {
    background: var(--gray-50) !important;
}

table.dataTable.no-footer {
    border-bottom: none !important;
}

/* ============================================
   Scrollbar Custom
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.4s ease-out;
}

.animate-fadeInUp {
    animation: fadeInUp 0.4s ease-out;
}

/* Staggered animation for stat cards */
.stat-card:nth-child(1) { animation: fadeInUp 0.4s ease-out 0s both; }
.stat-card:nth-child(2) { animation: fadeInUp 0.4s ease-out 0.08s both; }
.stat-card:nth-child(3) { animation: fadeInUp 0.4s ease-out 0.16s both; }
.stat-card:nth-child(4) { animation: fadeInUp 0.4s ease-out 0.24s both; }

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .sidebar, .admin-header, .admin-footer, .sidebar-toggle, .no-print {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .card {
        border: 1px solid #ddd;
        box-shadow: none;
    }
}
