:root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --primary: 222.2 47.4% 11.2%;
    --primary-foreground: 210 40% 98%;
    --secondary: 210 40% 96.1%;
    --secondary-foreground: 222.2 47.4% 11.2%;
    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 210 40% 96.1%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 222.2 84% 4.9%;
    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;
    --radius: 0.5rem;
    --chart-1: 12 76% 61%;
    --chart-2: 173 58% 39%;
    --chart-3: 197 37% 24%;
    --chart-4: 43 74% 66%;
    --chart-5: 27 87% 67%;
    --brand-blue: #243fb0;
    --dark-text: #212121;
    --light-border: #d8e0f0;
    --gray-text: #898989;
    --border-gray: #b3bac7;
    --sidebar-width: 280px;
}

.dark {
    --background: 222.2 84% 4.9%;
    --foreground: 210 40% 98%;
    --primary: 210 40% 98%;
    --primary-foreground: 222.2 47.4% 11.2%;
    --secondary: 217.2 32.6% 17.5%;
    --muted: 217.2 32.6% 17.5%;
    --muted-foreground: 215 20.2% 65.1%;
    --destructive: 0 62.8% 30.6%;
    --border: 217.2 32.6% 17.5%;
    --input: 217.2 32.6% 17.5%;
    --card: 222.2 84% 4.9%;
    --card-foreground: 210 40% 98%;
    --accent: 217.2 32.6% 17.5%;
    --popover: 222.2 84% 4.9%;
    --popover-foreground: 210 40% 98%;
}

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

html { font-size: 14px; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

/* Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.main-content {
    flex: 1;
    padding: 24px;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: hsl(var(--card));
    border-right: 1px solid hsl(var(--border));
    display: flex;
    flex-direction: column;
    z-index: 50;
    transition: transform 0.3s ease, width 0.3s ease;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid hsl(var(--border));
    height: 64px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    color: hsl(var(--foreground));
}

.sidebar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: hsl(var(--muted-foreground));
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sidebar-toggle:hover { background: hsl(var(--accent)); }
.sidebar-closed-icon { display: none; }
.sidebar.collapsed .sidebar-open-icon { display: none; }
.sidebar.collapsed .sidebar-closed-icon { display: block; }

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 400;
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    height: 36px;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.nav-item:hover {
    background: hsl(var(--accent));
    color: hsl(var(--foreground));
}
.nav-item.active {
    background: hsl(var(--accent));
    color: hsl(var(--foreground));
    font-weight: 500;
}
.nav-item i, .nav-item svg { width: 20px; height: 20px; flex-shrink: 0; }

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

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    margin-bottom: 4px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: hsl(var(--muted));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.user-avatar i { width: 18px; height: 18px; color: hsl(var(--muted-foreground)); }

.user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.user-name {
    font-size: 13px;
    font-weight: 500;
    color: hsl(var(--foreground));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-email {
    font-size: 12px;
    color: hsl(var(--muted-foreground));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-btn {
    color: hsl(var(--destructive)) !important;
}
.logout-btn:hover {
    background: hsl(var(--destructive) / 0.1) !important;
}

/* Header */
.header {
    height: 64px;
    background: hsl(var(--card));
    border-bottom: 1px solid hsl(var(--border));
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 40;
}
.header-left { display: flex; align-items: center; gap: 16px; }
.header-right { display: flex; align-items: center; gap: 8px; }
.page-title { font-size: 20px; font-weight: 700; }
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: hsl(var(--foreground));
    padding: 8px;
    border-radius: 6px;
}
.mobile-menu-btn:hover { background: hsl(var(--accent)); }

/* Theme Toggle */
.theme-toggle { position: relative; }
.dark .theme-light-icon { display: none; }
.theme-dark-icon { display: none; }
.dark .theme-dark-icon { display: block; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
    white-space: nowrap;
    text-decoration: none;
}
.btn:disabled, .btn.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn i, .btn svg { width: 16px; height: 16px; }

.btn-primary {
    background: #212121;
    color: white;
}
.dark .btn-primary {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}
.btn-primary:hover { opacity: 0.9; }

.btn-secondary {
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
}
.btn-secondary:hover { opacity: 0.8; }

.btn-outline {
    background: white;
    color: #212121;
    border: 1px solid var(--border-gray);
}
.dark .btn-outline {
    background: transparent;
    color: hsl(var(--foreground));
    border-color: hsl(var(--border));
}
.btn-outline:hover { background: hsl(var(--accent)); }

.btn-destructive {
    background: hsl(var(--destructive));
    color: white;
}
.btn-destructive:hover { opacity: 0.9; }

.btn-ghost {
    background: transparent;
    color: hsl(var(--foreground));
    border: none;
}
.btn-ghost:hover { background: hsl(var(--accent)); }

.btn-sm { height: 36px; padding: 6px 12px; font-size: 13px; }
.btn-lg { height: 44px; padding: 10px 20px; }
.btn-icon { width: 40px; padding: 0; }
.btn-icon.btn-sm { width: 36px; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: hsl(var(--foreground));
}
.form-input, .form-select, .form-textarea {
    width: 100%;
    height: 40px;
    padding: 8px 12px;
    border: 1px solid hsl(var(--input));
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: hsl(var(--card));
    color: hsl(var(--foreground));
    box-shadow: 0px 1px 2px 0px rgba(184,200,224,0.22);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}
.form-input:disabled, .form-select:disabled { opacity: 0.5; }
.form-textarea { height: auto; min-height: 80px; resize: vertical; }
.form-select { cursor: pointer; }
.form-error { color: hsl(var(--destructive)); font-size: 12px; margin-top: 4px; }
.form-hint { color: hsl(var(--muted-foreground)); font-size: 12px; margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 12px; margin-top: 24px; }

.form-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    gap: 8px;
}
.form-toggle input { display: none; }
.form-toggle .toggle-track {
    width: 44px;
    height: 24px;
    background: hsl(var(--muted));
    border-radius: 12px;
    transition: background 0.2s ease;
    position: relative;
}
.form-toggle .toggle-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.form-toggle input:checked + .toggle-track { background: var(--brand-blue); }
.form-toggle input:checked + .toggle-track::after { transform: translateX(20px); }

/* Cards */
.card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1);
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.card-title { font-size: 16px; font-weight: 600; }
.card-description { font-size: 13px; color: hsl(var(--muted-foreground)); margin-top: 4px; }

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1);
}
.stat-label {
    font-size: 12px;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: hsl(var(--foreground));
    margin-top: 4px;
}
.stat-trend {
    font-size: 12px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.stat-trend.up { color: #16a34a; }
.stat-trend.down { color: hsl(var(--destructive)); }

/* Tables */
.table-container {
    overflow-x: auto;
    border: 1px solid hsl(var(--border));
    border-radius: 8px;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table thead {
    background: hsl(var(--muted));
}
.data-table th {
    padding: 8px 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: hsl(var(--muted-foreground));
    white-space: nowrap;
    border-bottom: 1px solid hsl(var(--border));
}
.data-table th a {
    color: inherit;
    display: flex;
    align-items: center;
    gap: 4px;
}
.data-table td {
    padding: 8px 12px;
    font-size: 14px;
    border-bottom: 1px solid hsl(var(--border));
    color: hsl(var(--foreground));
}
.data-table tbody tr:hover { background: hsl(var(--muted) / 0.5); }
.data-table tbody tr:last-child td { border-bottom: none; }

.table-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}
.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-error { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-neutral { background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); }
.badge-purple { background: #f3e8ff; color: #6b21a8; }

.dark .badge-success { background: #052e16; color: #4ade80; }
.dark .badge-warning { background: #451a03; color: #fbbf24; }
.dark .badge-error { background: #450a0a; color: #f87171; }
.dark .badge-info { background: #172554; color: #60a5fa; }
.dark .badge-purple { background: #3b0764; color: #c084fc; }

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    flex-wrap: wrap;
    gap: 12px;
}
.pagination-info {
    font-size: 13px;
    color: hsl(var(--muted-foreground));
}
.pagination-controls {
    display: flex;
    gap: 4px;
    align-items: center;
}

/* Alerts */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}
.alert i, .alert svg { width: 20px; height: 20px; flex-shrink: 0; }
.alert-success {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}
.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}
.dark .alert-success { background: #052e16; color: #4ade80; border-color: #166534; }
.dark .alert-error { background: #450a0a; color: #f87171; border-color: #7f1d1d; }
.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}
.alert-close:hover { opacity: 1; }

/* Modals */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}
.modal-content {
    position: relative;
    background: hsl(var(--card));
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
}
.modal-header h3 { font-size: 18px; font-weight: 600; }
.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: hsl(var(--muted-foreground));
    line-height: 1;
}
.modal-body { padding: 16px 24px; }
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 24px 20px;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid hsl(var(--border));
    margin-bottom: 24px;
    gap: 0;
    overflow-x: auto;
}
.tab {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    font-family: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.tab:hover { color: hsl(var(--foreground)); }
.tab.active {
    color: hsl(var(--foreground));
    border-bottom-color: var(--brand-blue);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.page-header-left { display: flex; flex-direction: column; gap: 4px; }
.page-header-title { font-size: 24px; font-weight: 700; }
.page-header-subtitle { font-size: 14px; color: hsl(var(--muted-foreground)); }
.page-header-actions { display: flex; gap: 8px; align-items: center; }

/* Search & Filters */
.filters-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}
.search-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 240px;
    max-width: 400px;
}
.search-input-wrapper i, .search-input-wrapper svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: hsl(var(--muted-foreground));
}
.search-input-wrapper input {
    padding-left: 36px;
}

/* Login Page */
.login-body {
    background: hsl(var(--background));
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}
.login-card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 14px;
    padding: 40px;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1);
}
.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 32px;
}
.login-title {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}
.login-subtitle {
    font-size: 14px;
    color: hsl(var(--muted-foreground));
    text-align: center;
    margin-bottom: 32px;
}
.login-input {
    height: 50px;
    border-radius: 10px;
    font-size: 15px;
}
.login-btn {
    width: 100%;
    height: 50px;
    border-radius: 10px;
    font-size: 15px;
    margin-top: 8px;
}
.login-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
}

/* Charts */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}
.chart-card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 8px;
    padding: 20px;
}
.chart-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.chart-container { position: relative; height: 280px; }

/* Accordion */
.accordion { border: 1px solid hsl(var(--border)); border-radius: 8px; overflow: hidden; }
.accordion-item { border-bottom: 1px solid hsl(var(--border)); }
.accordion-item:last-child { border-bottom: none; }
.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 500;
    background: hsl(var(--card));
    transition: background 0.15s ease;
}
.accordion-header:hover { background: hsl(var(--muted)); }
.accordion-content {
    display: none;
    padding: 16px;
    background: hsl(var(--card));
}
.accordion-item.open .accordion-content { display: block; }
.accordion-chevron { transition: transform 0.2s ease; }
.accordion-item.open .accordion-chevron { transform: rotate(180deg); }

/* Tree View */
.tree-view { padding: 8px 0; }
.tree-node { padding-left: 16px; }
.tree-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}
.tree-label:hover { background: hsl(var(--accent)); }
.tree-label.active { background: hsl(var(--accent)); font-weight: 500; }
.tree-children { display: none; }
.tree-node.open > .tree-children { display: block; }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: hsl(var(--muted-foreground));
}
.empty-state i, .empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}
.empty-state h3 { font-size: 18px; font-weight: 600; color: hsl(var(--foreground)); margin-bottom: 8px; }
.empty-state p { font-size: 14px; max-width: 400px; margin: 0 auto; }

/* Permission Matrix */
.permission-matrix {
    overflow-x: auto;
}
.permission-matrix table {
    width: 100%;
    border-collapse: collapse;
}
.permission-matrix th, .permission-matrix td {
    padding: 8px 12px;
    text-align: center;
    border: 1px solid hsl(var(--border));
    font-size: 13px;
}
.permission-matrix th { background: hsl(var(--muted)); font-weight: 500; }
.permission-matrix td:first-child { text-align: left; font-weight: 500; }
.permission-check { color: #16a34a; font-weight: bold; }

/* Danger Zone */
.danger-zone {
    border: 2px solid hsl(var(--destructive));
    border-radius: 8px;
    padding: 24px;
    margin-top: 24px;
}
.danger-zone h3 {
    color: hsl(var(--destructive));
    margin-bottom: 8px;
}

/* Utility */
.text-muted { color: hsl(var(--muted-foreground)); }
.text-sm { font-size: 12px; }
.text-right { text-align: right; }
.font-mono { font-family: 'JetBrains Mono', 'Fira Code', monospace; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.copyable {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.copyable:hover { opacity: 0.7; }

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}
.info-item label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}
.info-item span, .info-item p {
    font-size: 14px;
    color: hsl(var(--foreground));
}

.detail-section {
    margin-bottom: 32px;
}
.detail-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid hsl(var(--border));
}

.plan-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.plan-card {
    border: 2px solid hsl(var(--border));
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    transition: border-color 0.2s ease;
}
.plan-card:hover { border-color: var(--brand-blue); }
.plan-card h3 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.plan-card .price { font-size: 36px; font-weight: 800; margin: 16px 0; }
.plan-card .price span { font-size: 14px; font-weight: 400; color: hsl(var(--muted-foreground)); }
.plan-card .plan-details { text-align: left; margin-top: 16px; }
.plan-card .plan-details p { font-size: 13px; padding: 4px 0; color: hsl(var(--muted-foreground)); }

/* Action Cards */
.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}
.action-card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 8px;
    padding: 24px;
}
.action-card h4 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.action-card p { font-size: 13px; color: hsl(var(--muted-foreground)); margin-bottom: 16px; }

/* Chips */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: hsl(var(--secondary));
    border-radius: 9999px;
    font-size: 13px;
    color: hsl(var(--secondary-foreground));
}
.chip-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: hsl(var(--muted-foreground));
    font-size: 16px;
    line-height: 1;
    padding: 0;
}
.chip-remove:hover { color: hsl(var(--destructive)); }

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-wrapper {
        margin-left: 0;
    }
    .mobile-menu-btn {
        display: flex;
    }
    .charts-grid {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .filters-bar {
        flex-direction: column;
    }
    .search-input-wrapper {
        max-width: 100%;
    }
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .main-content {
        padding: 16px;
    }
}
