/* ==========================================================================
   OMNI ADMIN PANEL - CORE STYLESHEET
   Features: Glassmorphism, CSS Variables, Premium Color Palette, Responsiveness
   ========================================================================== */

:root {
    /* Color Palette */
    --bg-primary: #f3f4f6; /* Light gray background */
    --bg-secondary: #ffffff; /* White background */
    --bg-surface: #f8fafc; /* Card surface off-white */
    --bg-surface-hover: #f1f5f9;
    
    --accent-primary: #f58220; /* Brand Orange */
    --accent-primary-hover: #e06e0d;
    --accent-success: #006738; /* Brand Green */
    --accent-success-hover: #00522c;
    --accent-danger: #ef4444; /* Rose Red */
    --accent-danger-hover: #dc2626;
    --accent-warning: #f59e0b; /* Amber Gold */
    
    --text-primary: #1f2937; /* Dark text for contrast */
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    
    --border-color: #e5e7eb; /* Light border color */
    --border-glow: rgba(245, 130, 32, 0.08);
    
    /* Layout Sizes */
    --sidebar-width: 260px;
    --topbar-height: 70px;
    
    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow-glow: 0 0 15px rgba(245, 130, 32, 0.15);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.06);
    --glass-blur: blur(12px);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Global Styles ───────────────────────────────────────────────────────── */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
}

/* Scrollbar Style */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Helper Utilities */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-success { color: var(--accent-success); }
.text-danger { color: var(--accent-danger); }
.text-warning { color: var(--accent-warning); }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* ── Layout - Auth ────────────────────────────────────────────────────────── */
.auth-layout {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 24px;
    background: radial-gradient(circle at 10% 20%, rgba(245, 130, 32, 0.06) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(0, 103, 56, 0.04) 0%, transparent 45%),
                var(--bg-primary);
}

.auth-card-wrapper {
    width: 100%;
    max-width: 440px;
    perspective: 1000px;
}

.auth-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    box-shadow: var(--shadow-lg);
    animation: slideInUp var(--transition-normal);
}

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

.auth-logo {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-success));
    color: #fff;
    border-radius: 50%;
    font-size: 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-glow);
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
    background: linear-gradient(to right, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-link {
    color: var(--accent-primary);
    font-weight: 600;
    transition: var(--transition-fast);
}
.auth-link:hover {
    color: var(--accent-primary-hover);
    text-decoration: underline;
}

/* ── Layout - Dashboard (Main) ────────────────────────────────────────────── */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    transition: var(--transition-normal);
}

.sidebar-header {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-icon {
    font-size: 20px;
    color: var(--accent-primary);
    -webkit-text-fill-color: var(--accent-primary);
}

.sidebar-close-btn {
    display: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
}

.sidebar-nav {
    flex: 1;
    padding: 24px 16px;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 6px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition-fast);
}

.nav-link i {
    font-size: 18px;
    width: 20px;
    text-align: center;
    transition: var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
    background-color: var(--bg-surface);
    color: var(--text-primary);
}

.nav-link.active {
    border-left: 3px solid var(--accent-primary);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    background: linear-gradient(to right, rgba(245, 130, 32, 0.08), transparent);
}

.nav-link.active i {
    color: var(--accent-primary);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    background-color: rgba(239, 68, 68, 0.08);
    color: var(--accent-danger);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

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

/* Main Content Wrapper */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevent flex children stretching */
    min-height: 100vh;
}

/* Topbar */
.topbar {
    height: var(--topbar-height);
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 40;
}

.sidebar-toggle-btn {
    display: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    margin-right: 16px;
}

.page-title {
    font-size: 20px;
    font-weight: 700;
}

.topbar-left {
    display: flex;
    align-items: center;
}

.admin-profile-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    border-radius: 30px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
}

.avatar-fallback {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-primary-hover));
    color: #fff;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.admin-info {
    display: flex;
    flex-direction: column;
}

.admin-name {
    font-size: 13px;
    font-weight: 600;
}

.admin-role {
    font-size: 10px;
    color: var(--text-secondary);
}

/* Content Container */
.content-view {
    flex: 1;
    padding: 32px;
    background-color: var(--bg-primary);
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
}

/* ── Typography & Forms ─────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition-fast);
}

.form-control:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 1px var(--accent-primary);
    background-color: var(--bg-primary);
}

.form-error {
    font-size: 12px;
    color: var(--accent-danger);
    margin-top: 6px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: #fff;
}
.btn-primary:hover {
    background-color: var(--accent-primary-hover);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}
.btn-secondary:hover {
    background-color: var(--bg-surface-hover);
}

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

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

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

/* ── Dashboard Content ───────────────────────────────────────────────────── */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background-color: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-card:nth-child(1) .stat-icon { color: var(--accent-primary); background-color: rgba(245, 130, 32, 0.08); }
.stat-card:nth-child(2) .stat-icon { color: var(--accent-success); background-color: rgba(0, 103, 56, 0.08); }
.stat-card:nth-child(3) .stat-icon { color: var(--accent-warning); background-color: rgba(245, 158, 11, 0.08); }
.stat-card:nth-child(4) .stat-icon { color: #8b5cf6; background-color: rgba(139, 92, 246, 0.08); }
.stat-card:nth-child(5) .stat-icon { color: #ec4899; background-color: rgba(236, 72, 153, 0.08); }

/* Quick Action / Welcome section */
.dashboard-banner {
    background: linear-gradient(135deg, rgba(245, 130, 32, 0.12), rgba(0, 103, 56, 0.06));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.banner-title {
    font-size: 22px;
    font-weight: 800;
}

.banner-desc {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 600px;
}

/* ── Content View Headers & Controls ────────────────────────────────────── */
.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.view-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Search and Filters Bar */
.filter-bar {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    max-width: 400px;
    min-width: 250px;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.search-input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.search-input:focus {
    border-color: var(--accent-primary);
}

.filters-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-select {
    padding: 10px 16px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    min-width: 140px;
}

.filter-select:focus {
    border-color: var(--accent-primary);
}

/* ── Table Components ────────────────────────────────────────────────────── */
.table-responsive {
    overflow-x: auto;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}

.table th, .table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background-color: rgba(243, 244, 246, 0.8);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.table tbody tr:hover {
    background-color: rgba(243, 244, 246, 0.5);
}

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

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 30px;
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--accent-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--accent-danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Table row actions */
.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Pagination ──────────────────────────────────────────────────────────── */
.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 8px 4px;
}

.pagination-info {
    font-size: 13px;
    color: var(--text-secondary);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition-fast);
}

.page-btn:hover:not(:disabled) {
    background-color: var(--bg-surface);
    border-color: var(--accent-primary);
}

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

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Detail Cards / Profiles ─────────────────────────────────────────────── */
.profile-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: var(--shadow-md);
}

.profile-avatar-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 24px;
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-success));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
    box-shadow: var(--shadow-glow);
}

.profile-name {
    font-size: 20px;
    font-weight: 700;
}

.profile-email {
    font-size: 14px;
    color: var(--text-secondary);
}

.profile-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 24px;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

.detail-item-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.detail-item-value {
    font-size: 14px;
    font-weight: 500;
    margin-top: 4px;
}

/* ── Modals ──────────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: 24px;
}

.modal-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    animation: zoomIn var(--transition-fast) cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.modal-confirm {
    max-width: 400px;
}

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close-btn {
    font-size: 18px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Detail view specific rows in modal */
.modal-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}
.modal-detail-row:last-child {
    border-bottom: none;
}

/* ── Toast Alerts ────────────────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 110;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 360px;
    width: 100%;
}

.toast {
    background: var(--bg-secondary);
    border-left: 4px solid var(--accent-primary);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    animation: slideInLeft var(--transition-normal);
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.toast.success { border-left-color: var(--accent-success); }
.toast.error { border-left-color: var(--accent-danger); }
.toast.warning { border-left-color: var(--accent-warning); }

.toast-icon {
    font-size: 18px;
}
.toast.success .toast-icon { color: var(--accent-success); }
.toast.error .toast-icon { color: var(--accent-danger); }
.toast.warning .toast-icon { color: var(--accent-warning); }

.toast-close {
    margin-left: auto;
    cursor: pointer;
    color: var(--text-muted);
}
.toast-close:hover {
    color: var(--text-primary);
}

/* ── Loading Overlay & Skeletons ────────────────────────────────────────── */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(11, 15, 25, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(59, 130, 246, 0.1);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Skeleton Loading styles */
.skeleton {
    background: linear-gradient(90deg, var(--bg-surface) 25%, #374151 50%, var(--bg-surface) 75%);
    background-size: 200% 100%;
    animation: loading-skeleton 1.5s infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 16px;
    width: 100%;
    margin-bottom: 10px;
}

.skeleton-row {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

/* ── Animations ──────────────────────────────────────────────────────────── */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes loading-skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

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

@keyframes zoomIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ── Responsive Queries ───────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    /* Collapse sidebar on tablets/mobiles */
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.5);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-toggle-btn {
        display: inline-block;
    }
    
    .sidebar-close-btn {
        display: inline-block;
    }
}

@media (max-width: 768px) {
    .content-view {
        padding: 20px;
    }
    
    .topbar {
        padding: 0 20px;
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input-wrapper {
        max-width: 100%;
    }
    
    .filters-wrapper {
        justify-content: flex-end;
    }
    
    .view-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        width: 100%;
    }
    
    .view-actions {
        flex-direction: column;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-card {
        max-height: 90vh;
    }
    
    .profile-details-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   LOCATION & PLAN MANAGEMENT STYLES
   ========================================================================== */

/* Tabs Navigation Styling */
.tabs-navigation {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    background-color: var(--bg-secondary);
    padding: 6px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.tabs-navigation .btn {
    border: none;
    outline: none;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition-fast);
    width: auto; /* Ensure button width is content-based, not 100% */
}

.tabs-navigation .btn-secondary {
    background-color: transparent;
    color: var(--text-secondary);
}

.tabs-navigation .btn-secondary:hover {
    color: var(--text-primary);
    background-color: var(--bg-surface);
}

.tabs-navigation .btn-primary {
    background-color: var(--accent-primary);
    color: white;
}

/* Modals Body Styling */
#location-modal-body .form-group {
    margin-bottom: 16px;
}

#location-modal-body .form-group:last-child {
    margin-bottom: 0;
}

#location-modal-body .form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

#location-modal-body .form-control {
    width: 100%;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-size: 14px;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

#location-modal-body .form-control:focus {
    border-color: var(--accent-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(245, 130, 32, 0.2);
}

#location-modal-body textarea.form-control {
    resize: vertical;
}

/* Table layout adjustments */
.table th, .table td {
    padding: 14px 16px;
}

