/* Modern Teal Admin Dashboard - Full Implementation */
:root {
    /* Teal Color Palette */
    --teal-50: #f0fdfa;
    --teal-100: #ccfbf1;
    --teal-200: #99f6e4;
    --teal-300: #5eead4;
    --teal-400: #2dd4bf;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --teal-700: #0f766e;
    --teal-800: #115e59;
    --teal-900: #134e4a;
    
    /* Semantic Colors */
    --primary: var(--teal-600);
    --primary-dark: var(--teal-700);
    --primary-light: var(--teal-500);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    
    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Background */
    --bg-main: var(--teal-50);
    --bg-card: #ffffff;
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-muted: var(--gray-400);
    --border: var(--teal-100);
    --border-light: var(--teal-50);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(13, 148, 136, 0.05);
    --shadow: 0 1px 3px 0 rgba(13, 148, 136, 0.1), 0 1px 2px -1px rgba(13, 148, 136, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(13, 148, 136, 0.1), 0 2px 4px -2px rgba(13, 148, 136, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(13, 148, 136, 0.1), 0 4px 6px -4px rgba(13, 148, 136, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(13, 148, 136, 0.1), 0 8px 10px -6px rgba(13, 148, 136, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.admin-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Sidebar - Teal Theme */
.admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    background: linear-gradient(180deg, var(--teal-800) 0%, var(--teal-900) 100%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-xl);
}

.sidebar-brand {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.sidebar-brand-mark {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.sidebar-brand-copy strong {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.02em;
}

.sidebar-brand-copy small {
    display: block;
    font-size: 0.75rem;
    color: var(--teal-200);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.125rem;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0.75rem;
}

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

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

.menu-section {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--teal-300);
    padding: 1rem 0.75rem 0.5rem;
    margin-top: 0.5rem;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.25rem;
    border-radius: 10px;
    text-decoration: none;
    color: var(--teal-100);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    position: relative;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.menu-item.active {
    background: var(--teal-600);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

.menu-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.menu-label {
    flex: 1;
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-status {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text small {
    display: block;
    font-size: 0.6875rem;
    color: var(--teal-300);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-text strong {
    display: block;
    font-size: 0.8125rem;
    color: white;
    font-weight: 600;
    margin-top: 0.125rem;
}

/* Sidebar Overlay */
.admin-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.admin-sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* Main Wrapper */
.admin-wrapper {
    margin-left: 280px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* Topbar - Teal Accent */
.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 900;
    background: white;
    border-bottom: 2px solid var(--teal-100);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

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

.topbar-icon-btn {
    width: 42px;
    height: 42px;
    border: 2px solid var(--teal-100);
    background: white;
    color: var(--teal-700);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.topbar-icon-btn:hover {
    background: var(--teal-600);
    border-color: var(--teal-600);
    color: white;
}

.topbar-title-wrap small {
    display: block;
    font-size: 0.6875rem;
    color: var(--teal-600);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.topbar-title-wrap h5 {
    margin: 0.25rem 0 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--teal-900);
    letter-spacing: -0.02em;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topbar-link-btn {
    padding: 0.625rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border: 2px solid var(--teal-100);
    color: var(--teal-700);
}

.topbar-link-btn:hover {
    background: var(--teal-50);
    border-color: var(--teal-200);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.375rem 0.875rem 0.375rem 0.375rem;
    background: var(--teal-50);
    border-radius: 999px;
    border: 2px solid var(--teal-100);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--teal-600), var(--teal-500));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

/* Main Content */
.admin-content {
    padding: 2rem 1.5rem;
}

/* Cards - Teal Accent */
.card {
    background: white;
    border: 2px solid var(--teal-100);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--teal-200);
}

.card-header {
    background: linear-gradient(135deg, var(--teal-50), white);
    border-bottom: 2px solid var(--teal-100);
    padding: 1.25rem 1.5rem;
    font-weight: 700;
    font-size: 1rem;
    color: var(--teal-900);
}

.card-body {
    padding: 1.5rem;
}

/* Stat Cards - Teal Theme */
.stat-card {
    background: white;
    border: 2px solid var(--teal-100);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--teal-600), var(--teal-400));
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--teal-200);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
}

.stat-icon.primary {
    background: linear-gradient(135deg, var(--teal-600), var(--teal-500));
}

.stat-icon.secondary {
    background: linear-gradient(135deg, var(--teal-700), var(--teal-600));
}

.stat-icon.warning {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.stat-icon.success {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--teal-900);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Buttons - Teal Theme */
.btn {
    padding: 0.625rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--teal-600), var(--teal-500));
    color: white;
    border-color: var(--teal-600);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--teal-700), var(--teal-600));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #f87171);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: white;
}

.btn-outline-primary {
    border-color: var(--teal-600);
    color: var(--teal-700);
    background: white;
}

.btn-outline-primary:hover {
    background: var(--teal-600);
    color: white;
}

.btn-outline-secondary {
    border-color: var(--teal-200);
    color: var(--teal-700);
    background: white;
}

.btn-outline-secondary:hover {
    background: var(--teal-50);
    border-color: var(--teal-300);
}

.btn-outline-danger {
    border-color: #ef4444;
    color: #ef4444;
    background: white;
}

.btn-outline-danger:hover {
    background: #ef4444;
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

/* Forms - Teal Accent */
.form-control, .form-select {
    border: 2px solid var(--teal-100);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    background: white;
}

.form-control:focus, .form-select:focus {
    border-color: var(--teal-500);
    box-shadow: 0 0 0 4px var(--teal-50);
    outline: none;
}

.form-label {
    font-weight: 700;
    color: var(--teal-900);
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.input-group-text {
    border: 2px solid var(--teal-100);
    background: var(--teal-50);
    color: var(--teal-700);
    font-weight: 600;
}

/* Tables - Teal Theme */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background: linear-gradient(135deg, var(--teal-50), white);
    color: var(--teal-900);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    padding: 1rem;
    border: none;
    border-bottom: 2px solid var(--teal-100);
}

.table tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--teal-50);
    vertical-align: middle;
    font-size: 0.9375rem;
}

.table tbody tr {
    transition: background 0.2s ease;
}

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

/* Badges - Teal Theme */
.badge {
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8125rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.bg-primary, .badge-primary {
    background: linear-gradient(135deg, var(--teal-600), var(--teal-500));
    color: white;
}

.bg-success, .badge-success {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
}

.bg-warning, .badge-warning {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: white;
}

.bg-danger, .badge-danger {
    background: linear-gradient(135deg, #ef4444, #f87171);
    color: white;
}

.bg-info, .badge-info {
    background: linear-gradient(135deg, #06b6d4, #22d3ee);
    color: white;
}

/* Alerts - Teal Theme */
.alert {
    border: 2px solid;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
}

.alert-info {
    background: var(--teal-50);
    border-color: var(--teal-200);
    color: var(--teal-900);
}

.alert-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.alert-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.alert-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* Breadcrumb - Teal */
.breadcrumb {
    background: white;
    border: 2px solid var(--teal-100);
    border-radius: 10px;
    padding: 0.75rem 1rem;
}

.breadcrumb-item a {
    color: var(--teal-600);
    font-weight: 600;
}

.breadcrumb-item.active {
    color: var(--teal-900);
    font-weight: 700;
}

/* Collapsed Sidebar */
body.admin-collapsed .admin-sidebar {
    width: 70px;
}

body.admin-collapsed .admin-wrapper {
    margin-left: 70px;
}

body.admin-collapsed .sidebar-brand-copy,
body.admin-collapsed .menu-label,
body.admin-collapsed .menu-section,
body.admin-collapsed .status-text {
    display: none;
}

body.admin-collapsed .menu-item {
    justify-content: center;
    padding: 0.75rem;
}

body.admin-collapsed .sidebar-status {
    justify-content: center;
}

/* Responsive */
@media (max-width: 991.98px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    
    .admin-sidebar.show {
        transform: translateX(0);
    }
    
    .admin-wrapper {
        margin-left: 0;
    }
    
    body.admin-collapsed .admin-wrapper {
        margin-left: 0;
    }
}

@media (max-width: 767.98px) {
    .admin-topbar {
        padding: 0.75rem 1rem;
    }
    
    .topbar-title-wrap h5 {
        font-size: 1.25rem;
    }
    
    .admin-content {
        padding: 1.5rem 1rem;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .topbar-user > div:not(.user-avatar) {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .topbar-link-btn {
        display: none !important;
    }
}

/* Dropdown Menu */
.dropdown-menu {
    border: 2px solid var(--teal-100);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    background: white;
}

.dropdown-item {
    border-radius: 8px;
    padding: 0.625rem 1rem;
    transition: background 0.2s ease;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--teal-900);
}

.dropdown-item:hover {
    background: var(--teal-50);
    color: var(--teal-900);
}

/* DataTables */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border: 2px solid var(--teal-100);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 8px !important;
    margin: 0 2px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, var(--teal-600), var(--teal-500)) !important;
    color: white !important;
    border: none !important;
}

/* Utility Classes */
.text-primary { color: var(--teal-700) !important; }
.text-success { color: #10b981 !important; }
.text-warning { color: #f59e0b !important; }
.text-danger { color: #ef4444 !important; }
.text-muted { color: var(--text-muted) !important; }

.bg-teal-50 { background: var(--teal-50) !important; }
.bg-teal-100 { background: var(--teal-100) !important; }

.border-teal { border-color: var(--teal-200) !important; }

.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }

/* Animations */
.fade-in {
    animation: fadeIn 0.3s ease;
}

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

/* Page Shell */
.page-shell {
    max-width: 1400px;
    margin: 0 auto;
}
