/* ================================================
   Expert Checkout - Admin Theme
   Redesign Premium — Identidade Própria
   ================================================ */

/* ================================================
   Reset & Base
   ================================================ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ================================================
   DARK MODE (default)
   ================================================ */
:root, [data-theme="dark"] {
    --bg-primary: #0c0e1a;
    --bg-secondary: #111328;
    --bg-card: #161833;
    --bg-card-hover: #1c1e40;
    --bg-input: #13152b;
    --bg-sidebar: #0a0c18;
    --border-color: #232548;
    --border-light: #2e305a;
    --text-primary: #ecedf5;
    --text-secondary: #9b9dc0;
    --text-muted: #5c5e80;
    --accent-green: #6366f1;
    --accent-green-dark: #4f46e5;
    --accent-green-bg: rgba(99, 102, 241, 0.12);
    --accent-blue: #38bdf8;
    --accent-blue-bg: rgba(56, 189, 248, 0.12);
    --accent-red: #f87171;
    --accent-red-bg: rgba(248, 113, 113, 0.1);
    --accent-orange: #fb923c;
    --accent-orange-bg: rgba(251, 146, 60, 0.1);
    --accent-purple: #a78bfa;
    --accent-purple-bg: rgba(167, 139, 250, 0.1);
    --accent-yellow: #facc15;
    --gradient-green: linear-gradient(135deg, #6366f1, #818cf8);
    --gradient-blue: linear-gradient(135deg, #38bdf8, #7dd3fc);
    --gradient-red: linear-gradient(135deg, #f87171, #fca5a5);
    --gradient-orange: linear-gradient(135deg, #fb923c, #fdba74);
    --gradient-purple: linear-gradient(135deg, #a78bfa, #c4b5fd);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.35);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.5);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --header-height: 0px;
    --transition: all 0.2s cubic-bezier(.4,0,.2,1);
}

/* ================================================
   LIGHT MODE
   ================================================ */
[data-theme="light"] {
    --bg-primary: #f4f5f9;
    --bg-secondary: #ecedf5;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f8fc;
    --bg-input: #f4f5f9;
    --bg-sidebar: #ffffff;
    --border-color: #e2e4ef;
    --border-light: #d0d2e2;
    --text-primary: #1a1c3a;
    --text-secondary: #5c5e80;
    --text-muted: #9b9dc0;
    --accent-green: #6366f1;
    --accent-green-dark: #4f46e5;
    --accent-green-bg: rgba(99, 102, 241, 0.08);
    --accent-blue: #0ea5e9;
    --accent-blue-bg: rgba(14, 165, 233, 0.08);
    --accent-red: #ef4444;
    --accent-red-bg: rgba(239, 68, 68, 0.08);
    --accent-orange: #f97316;
    --accent-orange-bg: rgba(249, 115, 22, 0.08);
    --accent-purple: #8b5cf6;
    --accent-purple-bg: rgba(139, 92, 246, 0.08);
    --accent-yellow: #eab308;
    --gradient-green: linear-gradient(135deg, #6366f1, #818cf8);
    --gradient-blue: linear-gradient(135deg, #0ea5e9, #38bdf8);
    --gradient-red: linear-gradient(135deg, #ef4444, #f87171);
    --gradient-orange: linear-gradient(135deg, #f97316, #fb923c);
    --gradient-purple: linear-gradient(135deg, #8b5cf6, #a78bfa);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.1);
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--accent-green);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-green-dark);
}

/* ================================================
   Sidebar
   ================================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-logo {
    padding: 22px 20px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo .logo-icon {
    width: 38px;
    height: 38px;
    background: var(--gradient-green);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.sidebar-logo .logo-text {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.sidebar-logo .logo-text span {
    color: var(--accent-green);
}

.sidebar-section {
    padding: 18px 12px 8px;
}

.sidebar-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: var(--text-muted);
    padding: 0 10px;
    margin-bottom: 8px;
}

.sidebar-menu {
    list-style: none;
    padding: 0 10px;
}

.sidebar-menu li {
    margin-bottom: 3px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
}

.sidebar-menu a:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.sidebar-menu a.active {
    background: var(--accent-green-bg);
    color: var(--accent-green);
    font-weight: 600;
}

.sidebar-menu a .icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.sidebar-menu .submenu {
    list-style: none;
    padding-left: 44px;
}

.sidebar-menu .submenu a {
    padding: 6px 12px;
    font-size: 13px;
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.sidebar-footer .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius-sm);
}

.sidebar-footer .user-avatar {
    width: 36px;
    height: 36px;
    background: var(--gradient-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-footer .user-details {
    overflow: hidden;
}

.sidebar-footer .user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-footer .user-email {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ================================================
   Main Content
   ================================================ */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 28px 32px;
    min-height: 100vh;
    transition: var(--transition);
}

/* ================================================
   Page Header
   ================================================ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
}

.page-header p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.page-header .actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ================================================
   Buttons
   ================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-green);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-green-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

.btn-danger {
    background: var(--accent-red);
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-icon {
    padding: 8px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ================================================
   Cards
   ================================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 22px;
    transition: var(--transition);
}

.card:hover {
    border-color: var(--border-light);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-header .card-icon {
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
}

/* ================================================
   Stat Cards (Dashboard)
   ================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    border-radius: var(--radius-md);
    padding: 22px 24px;
    position: relative;
    overflow: hidden;
    color: #fff;
}

.stat-card.green { background: var(--gradient-green); }
.stat-card.blue { background: var(--gradient-blue); }
.stat-card.orange { background: var(--gradient-orange); }
.stat-card.red { background: var(--gradient-red); }
.stat-card.purple { background: var(--gradient-purple); }

.stat-card .stat-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 24px;
    opacity: 0.5;
}

.stat-card .stat-label {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 4px;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card .stat-change {
    font-size: 12px;
    margin-top: 8px;
    opacity: 0.8;
}

/* ================================================
   Tabs
   ================================================ */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0;
}

.tab {
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: inherit;
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    color: var(--accent-green);
    border-bottom-color: var(--accent-green);
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-bar .search-input {
    flex: 1;
    min-width: 200px;
}

/* ================================================
   Forms & Inputs
   ================================================ */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group label .required {
    color: var(--accent-red);
}

.form-control {
    width: 100%;
    padding: 11px 15px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px var(--accent-green-bg);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235c5e80' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Toggle Switch */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    width: 44px;
    height: 24px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    position: relative;
    transition: var(--transition);
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--text-muted);
    top: 2px;
    left: 2px;
    transition: var(--transition);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--accent-green);
    border-color: var(--accent-green);
}

.toggle-switch input:checked + .toggle-slider::after {
    transform: translateX(20px);
    background: #fff;
}

.toggle-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ================================================
   Table
   ================================================ */
.table-container {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    white-space: nowrap;
}

tbody td {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
    background: var(--bg-card);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* ================================================
   Status Badges
   ================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-green, .badge-aprovado {
    background: var(--accent-green-bg);
    color: var(--accent-green);
}

.badge-blue, .badge-pendente {
    background: var(--accent-blue-bg);
    color: var(--accent-blue);
}

.badge-red, .badge-falhou, .badge-expirado {
    background: var(--accent-red-bg);
    color: var(--accent-red);
}

.badge-orange, .badge-reembolsado {
    background: var(--accent-orange-bg);
    color: var(--accent-orange);
}

.badge-purple {
    background: var(--accent-purple-bg);
    color: var(--accent-purple);
}

.badge-ativo {
    background: var(--accent-green-bg);
    color: var(--accent-green);
}

.badge-inativo {
    background: var(--accent-red-bg);
    color: var(--accent-red);
}

.badge-publicado {
    background: var(--accent-green-bg);
    color: var(--accent-green);
}

.badge-rascunho {
    background: var(--accent-orange-bg);
    color: var(--accent-orange);
}

/* ================================================
   Product Cards Grid
   ================================================ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.product-card .card-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: var(--bg-secondary);
}

.product-card .card-image-placeholder {
    width: 100%;
    height: 160px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 40px;
}

.product-card .card-body {
    padding: 14px 16px;
}

.product-card .card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card .card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.product-card .card-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-green);
}

.product-card .card-status {
    position: absolute;
    top: 10px;
    left: 10px;
}

.product-card .card-actions {
    position: absolute;
    top: 10px;
    right: 10px;
}

.product-card .card-actions .btn-icon {
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    color: #fff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 14px;
}

/* ================================================
   Dropdown Menu
   ================================================ */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    display: none;
    overflow: hidden;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu a,
.dropdown-menu button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    font-size: 13px;
    color: var(--text-secondary);
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.dropdown-menu a:hover,
.dropdown-menu button:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.dropdown-menu .divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

/* ================================================
   Modal / Drawer
   ================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(6px);
    z-index: 2000;
    display: none;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

/* Drawer */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: none;
}

.drawer-overlay.show {
    display: block;
}

.drawer {
    position: fixed;
    top: 0;
    right: -500px;
    width: 480px;
    max-width: 90vw;
    height: 100vh;
    background: var(--bg-card);
    border-left: 1px solid var(--border-color);
    z-index: 2001;
    overflow-y: auto;
    transition: right 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.drawer.show {
    right: 0;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 1;
}

.drawer-body {
    padding: 24px;
}

/* ================================================
   Pagination
   ================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 24px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.pagination a:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.pagination .active {
    background: var(--accent-green);
    color: #fff;
}

/* ================================================
   Alert / Flash Messages
   ================================================ */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 20px;
    animation: slideDown 0.3s ease;
}

.alert-success {
    background: var(--accent-green-bg);
    color: var(--accent-green);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.alert-error {
    background: var(--accent-red-bg);
    color: var(--accent-red);
    border: 1px solid rgba(248, 113, 113, 0.2);
}

.alert-warning {
    background: var(--accent-orange-bg);
    color: var(--accent-orange);
    border: 1px solid rgba(251, 146, 60, 0.2);
}

.alert-info {
    background: var(--accent-blue-bg);
    color: var(--accent-blue);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

/* ================================================
   Empty State
   ================================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    max-width: 400px;
    margin: 0 auto 20px;
}

/* ================================================
   Charts Container
   ================================================ */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.chart-container {
    height: 250px;
    position: relative;
}

/* ================================================
   Config Sections
   ================================================ */
.config-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    overflow: hidden;
}

.config-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.config-section-header .section-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.config-section-header .section-icon.green { background: var(--accent-green-bg); color: var(--accent-green); }
.config-section-header .section-icon.blue { background: var(--accent-blue-bg); color: var(--accent-blue); }
.config-section-header .section-icon.purple { background: var(--accent-purple-bg); color: var(--accent-purple); }
.config-section-header .section-icon.orange { background: var(--accent-orange-bg); color: var(--accent-orange); }

.config-section-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.config-section-header p {
    font-size: 13px;
    color: var(--text-muted);
}

.config-section-body {
    padding: 20px;
}

/* ================================================
   Theme Toggle Button
   ================================================ */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    background: none;
    border: none;
    font-family: inherit;
    width: 100%;
}

.theme-toggle:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.theme-toggle i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* ================================================
   Animations
   ================================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* ================================================
   Responsive
   ================================================ */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 20px 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .mobile-menu-btn {
        display: block !important;
    }
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
}

/* ================================================
   Login Page
   ================================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    box-shadow: var(--shadow-lg);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo .logo-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-green);
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}

.login-logo h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.login-logo h1 span {
    color: var(--accent-green);
}

.login-logo p {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

.login-form .btn-primary {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    justify-content: center;
}

.login-links {
    text-align: center;
    margin-top: 20px;
}

.login-links a {
    font-size: 13px;
    color: var(--text-muted);
}

.login-links a:hover {
    color: var(--accent-green);
}

/* ================================================
   Scrollbar
   ================================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}
