/* ==========================================================================
   SpendArk — Light Design System
   Linear / Vercel / Raycast inspired — light variant
   ========================================================================== */

/* ---------- 1. CSS Variables ---------- */
:root {
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --bg-elevated: #f1f5f9;
    --bg-hover: #e2e8f0;
    --bg-active: #dbeafe;

    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-faint: #94a3b8;

    --border: #e2e8f0;
    --border-subtle: #f1f5f9;
    --border-hover: #cbd5e1;
    --ring: #6366f1;

    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-muted: rgba(99, 102, 241, 0.1);

    --green: #10b981;
    --green-muted: rgba(16, 185, 129, 0.1);
    --red: #ef4444;
    --red-muted: rgba(239, 68, 68, 0.1);
    --yellow: #f59e0b;
    --yellow-muted: rgba(245, 158, 11, 0.1);
    --blue: #3b82f6;
    --blue-muted: rgba(59, 130, 246, 0.1);
    --violet: #8b5cf6;
    --violet-muted: rgba(139, 92, 246, 0.1);

    --radius: 8px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 12px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
    --shadow-glow-accent: 0 0 20px rgba(99, 102, 241, 0.15);
    --shadow-glow-green: 0 0 20px rgba(16, 185, 129, 0.15);
    --shadow-glow-violet: 0 0 20px rgba(139, 92, 246, 0.15);

    --sidebar-bg: #ffffff;
    --sidebar-border: #e2e8f0;
    --sidebar-text: #64748b;
    --sidebar-text-active: #0f172a;
    --sidebar-hover: rgba(0, 0, 0, 0.04);
    --sidebar-active: rgba(99, 102, 241, 0.08);

    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- 2. Base / Reset ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    height: 100%;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 14px;
    line-height: 1.5;
}

/* ---------- 3. Layout ---------- */
.page-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* --- Sidebar --- */
.sidebar {
    width: 15rem;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    height: 100%;
    flex-shrink: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    height: 3.5rem;
    border-bottom: 1px solid var(--sidebar-border);
    padding: 0 1.25rem;
}

.sidebar-logo {
    width: 1.375rem;
    height: 1.375rem;
    opacity: 0.9;
}

.sidebar-brand {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0.75rem 0.625rem;
    overflow-y: auto;
}

.nav-spacer {
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.4375rem 0.75rem;
    margin-bottom: 1px;
    border-radius: var(--radius);
    font-size: 0.8125rem;
    font-weight: 450;
    text-decoration: none;
    color: var(--sidebar-text);
    transition: all var(--transition-fast);
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: var(--text);
}

.nav-item.active {
    background: var(--sidebar-active);
    color: var(--accent);
    font-weight: 500;
}

.nav-icon {
    width: 1.125rem;
    height: 1.125rem;
    opacity: 0.7;
}

.nav-item.active .nav-icon {
    opacity: 1;
}

.sidebar-footer {
    border-top: 1px solid var(--sidebar-border);
    padding: 0.75rem 0.625rem;
}

.logout-button {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.4375rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.8125rem;
    background: none;
    border: none;
    color: var(--sidebar-text);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.logout-button:hover {
    background: var(--sidebar-hover);
    color: var(--text);
}

.content {
    padding: 1.5rem 2rem;
}

/* Page Title */
.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
    letter-spacing: -0.025em;
}

.page-description {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ---------- 4. Card ---------- */
.card {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

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

/* ---------- 5. Stat Card (KPI) ---------- */
.stat-card {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

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

.stat-card-label {
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 450;
}

.stat-card-value {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 0.375rem;
    letter-spacing: -0.025em;
}

/* ---------- 6. Badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    line-height: 1.5;
}

.badge-pill {
    border-radius: 9999px;
}

.badge-success {
    background: var(--green-muted);
    color: var(--green);
}

.badge-info {
    background: var(--blue-muted);
    color: var(--blue);
}

.badge-warning {
    background: var(--yellow-muted);
    color: var(--yellow);
}

.badge-error {
    background: var(--red-muted);
    color: var(--red);
}

.badge-neutral {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-muted);
}

/* ---------- 7. Skeleton / Loading ---------- */
.skeleton-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--bg-card);
    min-height: 5rem;
    padding: 1.5rem;
    animation: skeleton-pulse 2s ease-in-out infinite;
}

.skeleton-line {
    height: 0.875rem;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    animation: skeleton-pulse 2s ease-in-out infinite;
}

@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

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

/* ---------- 8. Empty State ---------- */
.empty-state {
    padding: 3rem;
    border: 1px dashed var(--border);
    border-radius: var(--radius-xl);
    text-align: center;
    margin-top: 1rem;
    background: var(--bg-card);
}

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.empty-state-message {
    color: var(--text-muted);
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.875rem;
}

/* ---------- 9. Progress ---------- */
.progress-track {
    background: var(--bg-elevated);
    border-radius: 4px;
    height: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
    background: var(--accent);
}

/* ---------- 10. Status Dot ---------- */
.status-dot {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
}

.status-dot-green  { background: var(--green); }
.status-dot-blue   { background: var(--blue); }
.status-dot-yellow { background: var(--yellow); }
.status-dot-red    { background: var(--red); }

/* ---------- 11. Cloud Logos ---------- */
.cloud-logo {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
    margin-bottom: 0.5rem;
}

.cloud-logo-sm {
    width: 1.25rem;
    height: 1.25rem;
    object-fit: contain;
}

/* ---------- 12. Buttons ---------- */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 0 0.875rem;
    height: 2.125rem;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.button:hover {
    background: var(--accent-hover);
    box-shadow: var(--shadow-glow-accent);
}

.button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

.button.button-secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.button.button-secondary:hover {
    background: var(--bg-elevated);
    border-color: var(--border-hover);
    color: var(--text);
}

.button-destructive {
    background: var(--red);
    color: #fff;
    border: none;
}

.button-destructive:hover {
    background: #dc2626;
}

.button-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    box-shadow: none;
}

.button-ghost:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.button-link {
    background: transparent;
    color: var(--accent);
    border: none;
    box-shadow: none;
    text-decoration: none;
    padding: 0;
    height: auto;
}

.button-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.button-sm {
    height: 1.625rem;
    padding: 0 0.5rem;
    font-size: 0.75rem;
}

/* ---------- 13. Inputs ---------- */
.input, .form-input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.4375rem 0.75rem;
    background: var(--bg-card);
    color: var(--text);
    font-size: 0.8125rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
}

.input:focus, .form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-muted);
}

.textarea, .feedback-textarea {
    width: 100%;
    min-height: 5rem;
    resize: vertical;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem;
    background: var(--bg-card);
    color: var(--text);
    font-size: 0.8125rem;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.textarea:focus, .feedback-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-muted);
}

.form-label {
    font-size: 0.8125rem;
    font-weight: 500;
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-secondary);
}

/* ---------- 14. Tables ---------- */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.table th,
.table td {
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.5rem 0.625rem;
    text-align: left;
    font-size: 0.8125rem;
}

.table th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-bottom: 0.625rem;
    background: transparent;
}

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

.table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

.cell-right {
    text-align: right;
}

/* ---------- 15. Alerts ---------- */
.alert {
    margin-top: 0.75rem;
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

.alert-success {
    background: var(--green-muted);
    color: var(--green);
    border-color: rgba(16, 185, 129, 0.2);
}

.alert-error {
    background: var(--red-muted);
    color: var(--red);
    border-color: rgba(239, 68, 68, 0.2);
}

/* ---------- 16. Provider Cards ---------- */
.provider-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.provider-card {
    text-align: left;
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 1rem;
    cursor: pointer;
    transition: all var(--transition-base);
}

.provider-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-elevated);
}

.provider-card-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.provider-title {
    font-weight: 500;
    font-size: 0.875rem;
}

.provider-subtitle {
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* ---------- 17. Code Blocks ---------- */
.code-block {
    font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem;
    margin: 0.5rem 0;
    overflow-x: auto;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.code-block pre {
    margin: 0;
}

/* ---------- 18. Form Layout ---------- */
.form-grid {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-field.span-2 {
    grid-column: span 2;
}

.label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* ---------- 19. Section Utilities ---------- */
.section {
    margin-top: 1.5rem;
}

.section-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}

.subsection-title {
    margin-top: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.row {
    display: flex;
    align-items: center;
}

.row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.gap {
    gap: 0.75rem;
}

.muted {
    color: var(--text-muted);
}

.small {
    font-size: 0.8125rem;
}

.mono {
    font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
}

.steps {
    margin: 1rem 0 0 1rem;
}

.step-title {
    font-weight: 500;
    margin-top: 0.75rem;
}

.step-body {
    margin-top: 0.5rem;
    color: var(--text-secondary);
}

.bullets {
    margin: 0.5rem 0 0 1.25rem;
    color: var(--text-secondary);
}

/* ---------- 20. Blazor error boundary ---------- */
.blazor-error-boundary {
    background: var(--red-muted);
    padding: 1rem;
    color: var(--red);
    border-radius: var(--radius);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

/* ---------- 21. Typography Utilities ---------- */
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }
.text-sm       { font-size: 0.8125rem; }
.text-base     { font-size: 0.875rem; }
.text-lg       { font-size: 1rem; }
.text-xl       { font-size: 1.125rem; }
.text-2xl      { font-size: 1.375rem; }
.text-3xl      { font-size: 1.75rem; }

/* ---------- 22. Color Utilities ---------- */
.text-success    { color: var(--green); }
.text-error      { color: var(--red); }
.text-info       { color: var(--blue); }
.text-warning    { color: var(--yellow); }
.text-muted      { color: var(--text-muted); }
.text-capitalize { text-transform: capitalize; }
.text-center     { text-align: center; }

/* ---------- 23. Spacing Utilities ---------- */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }

/* ---------- 24. Flex Utilities ---------- */
.flex            { display: flex; }
.flex-col        { flex-direction: column; }
.flex-wrap       { flex-wrap: wrap; }
.items-center    { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }
.gap-1           { gap: 0.25rem; }
.gap-2           { gap: 0.5rem; }
.gap-3           { gap: 0.75rem; }
.gap-4           { gap: 1rem; }

/* ---------- 25. Grid Utilities ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }

/* ---------- 26. Width Utilities ---------- */
.w-full    { width: 100%; }
.max-w-md  { max-width: 28rem; }
.max-w-lg  { max-width: 32rem; }
.max-w-xl  { max-width: 40rem; }

/* ---------- 27. Tinted Stat Card Modifiers ---------- */
.stat-card-blue {
    border-color: rgba(59, 130, 246, 0.2);
    background: linear-gradient(135deg, var(--bg-card), rgba(59, 130, 246, 0.06));
}

.stat-card-green {
    border-color: rgba(16, 185, 129, 0.2);
    background: linear-gradient(135deg, var(--bg-card), rgba(16, 185, 129, 0.06));
}

.stat-card-violet {
    border-color: rgba(139, 92, 246, 0.2);
    background: linear-gradient(135deg, var(--bg-card), rgba(139, 92, 246, 0.06));
}

.stat-card-amber {
    border-color: rgba(245, 158, 11, 0.2);
    background: linear-gradient(135deg, var(--bg-card), rgba(245, 158, 11, 0.06));
}

/* ---------- 28. Custom Select ---------- */
select.input, select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
    cursor: pointer;
}

select.input:hover, select.form-input:hover {
    border-color: var(--border-hover);
}

/* ---------- 29. Provider Card Brand Accents ---------- */
.provider-card-azure { border-left: 2px solid #0078d4; }
.provider-card-aws   { border-left: 2px solid #ff9900; }
.provider-card-gcp   { border-left: 2px solid #4285f4; }

/* ---------- 30. Auth Pages ---------- */
.auth-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg);
    padding: 2rem 1rem;
}

.auth-container {
    width: 100%;
    max-width: 22rem;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.auth-brand img {
    width: 1.75rem;
    height: 1.75rem;
}

.auth-brand span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.auth-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.auth-card {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.auth-card .form-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.875rem;
}

.auth-card .label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.auth-card .input {
    height: 2.25rem;
}

.auth-card .button {
    width: 100%;
    height: 2.25rem;
    margin-top: 0.25rem;
}

.auth-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    margin-top: 1rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    color: var(--accent-hover);
}

/* ---------- 31. Top Header Bar ---------- */
.top-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 3rem;
    border-bottom: 1px solid var(--border);
    padding: 0 1.5rem;
    background: var(--bg-card);
    flex-shrink: 0;
}

.profile-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.profile-button:hover {
    border-color: var(--border-hover);
    color: var(--text);
}

/* ---------- 32. Profile Slideout ---------- */
.profile-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
}

.profile-slideout {
    position: fixed;
    top: 0;
    right: 0;
    width: 20rem;
    height: 100vh;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    z-index: 51;
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.2s ease-out;
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}

.profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.profile-header h3 {
    font-size: 0.875rem;
    font-weight: 600;
}

.profile-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: var(--radius-sm);
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.profile-close:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.profile-section {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
}

.profile-org-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
}

.profile-tier-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 500;
    border-radius: 9999px;
    background: var(--accent-muted);
    color: var(--accent);
    text-transform: capitalize;
    margin-bottom: 0.375rem;
}

.profile-usage {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.profile-slideout-footer {
    padding: 0.875rem 1.25rem;
    margin-top: auto;
}

/* ---------- 33. Feedback ---------- */
.feedback-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 0 0.875rem;
    height: 2.125rem;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    margin-top: 0.5rem;
}

.feedback-submit:hover {
    background: var(--accent-hover);
}

.feedback-submit:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ---------- 34. Main Layout ---------- */
main {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

main .content {
    flex: 1;
}

/* ---------- 35. Header Plan Badge ---------- */
.header-plan-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    font-size: 0.625rem;
    font-weight: 500;
    border-radius: 9999px;
    background: var(--accent-muted);
    color: var(--accent);
    text-transform: capitalize;
    margin-right: 0.5rem;
}

/* ---------- 36. Nav Group (collapsible) ---------- */
.nav-group {
    margin-bottom: 1px;
}

.nav-group-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.4375rem 0.75rem;
    border: none;
    border-radius: var(--radius);
    background: none;
    font-size: 0.8125rem;
    font-weight: 450;
    color: var(--sidebar-text);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.nav-group-header:hover {
    background: var(--sidebar-hover);
    color: var(--text);
}

.nav-chevron {
    width: 0.875rem;
    height: 0.875rem;
    margin-left: auto;
    opacity: 0.5;
    transition: transform var(--transition-fast);
    transform: rotate(-90deg);
}

.nav-chevron-open {
    transform: rotate(0deg);
}

.nav-group-items {
    display: flex;
    flex-direction: column;
}

.nav-group-item {
    padding-left: 2.25rem !important;
}

/* ---------- 37. Admin Section Label ---------- */
.admin-section-label {
    font-size: 0.625rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-faint);
    padding: 0.75rem 0.75rem 0.25rem;
}

/* ---------- 37. Profile Links ---------- */
.profile-feedback-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.4375rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.8125rem;
    font-weight: 450;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.profile-feedback-link:hover {
    background: var(--bg-hover);
    color: var(--text);
}

/* ---------- 38. ApexCharts Overrides ---------- */
.apexcharts-tooltip {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow-lg) !important;
    color: var(--text) !important;
}

.apexcharts-tooltip-title {
    background: var(--bg-elevated) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    color: var(--text-secondary) !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    padding: 0.375rem 0.625rem !important;
}

.apexcharts-tooltip-series-group {
    padding: 0.25rem 0.625rem !important;
}

.apexcharts-tooltip-text-y-label {
    color: var(--text-muted) !important;
}

.apexcharts-tooltip-text-y-value {
    color: var(--text) !important;
    font-weight: 600 !important;
}

.apexcharts-legend-text {
    color: var(--text-muted) !important;
    font-size: 0.75rem !important;
}

.apexcharts-xaxis-label, .apexcharts-yaxis-label {
    fill: var(--text-faint) !important;
}

.apexcharts-gridline {
    stroke: var(--border-subtle) !important;
}

/* Donut chart */
.apexcharts-pie-label {
    fill: var(--text) !important;
}

.apexcharts-datalabel-label {
    fill: var(--text-muted) !important;
}

.apexcharts-datalabel-value {
    fill: var(--text) !important;
}

/* ---------- 39. Scrollbar ---------- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--text-faint);
}

/* ---------- 40. Selection ---------- */
::selection {
    background: var(--accent-muted);
    color: var(--text);
}

/* ---------- 41. Link styles ---------- */
a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-hover);
}
