/* ==========================================================================
   CostAnalyser — Vivid Design System (OKLCh high-chroma + gradients)
   ========================================================================== */

/* ---------- 1. CSS Variables ---------- */
:root {
    --background: oklch(0.98 0.005 250);
    --foreground: oklch(0.18 0 0);
    --card: oklch(1 0 0);
    --card-foreground: oklch(0.18 0 0);
    --popover: oklch(1 0 0);
    --popover-foreground: oklch(0.18 0 0);
    --primary: oklch(0.45 0.22 255);
    --primary-foreground: oklch(0.98 0.005 255);
    --secondary: oklch(0.95 0.015 250);
    --secondary-foreground: oklch(0.25 0.04 250);
    --muted: oklch(0.95 0.01 250);
    --muted-foreground: oklch(0.50 0.02 250);
    --accent: oklch(0.50 0.20 255);
    --accent-foreground: oklch(0.98 0.005 250);
    --destructive: oklch(0.577 0.245 27.325);
    --destructive-foreground: oklch(0.577 0.245 27.325);
    --border: oklch(0.90 0.01 250);
    --input: oklch(0.90 0.01 250);
    --ring: oklch(0.50 0.20 255);
    --success: oklch(0.55 0.20 145);
    --warning: oklch(0.7 0.18 85);

    /* Dark sidebar palette */
    --sidebar-bg-from: oklch(0.22 0.06 260);
    --sidebar-bg-to: oklch(0.16 0.07 275);
    --sidebar-foreground: oklch(0.78 0.03 260);
    --sidebar-primary: oklch(0.70 0.22 250);
    --sidebar-primary-foreground: oklch(0.985 0 0);
    --sidebar-accent: oklch(0.26 0.06 265);
    --sidebar-accent-foreground: oklch(0.92 0.02 260);
    --sidebar-border: oklch(0.28 0.05 265);
    --sidebar-muted: oklch(0.55 0.03 260);

    --radius: 0.5rem;
    --radius-sm: calc(var(--radius) - 4px);
    --radius-md: calc(var(--radius) - 2px);
    --radius-lg: var(--radius);
    --radius-xl: calc(var(--radius) + 4px);

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-glow-blue: 0 4px 20px -4px oklch(0.55 0.22 250 / 0.35);
    --shadow-glow-green: 0 4px 20px -4px oklch(0.55 0.22 145 / 0.35);
    --shadow-glow-violet: 0 4px 20px -4px oklch(0.55 0.22 300 / 0.35);

    /* Semantic badge colors — vivid */
    --color-green: oklch(0.55 0.22 145);
    --color-green-bg: oklch(0.94 0.06 145);
    --color-blue: oklch(0.52 0.20 250);
    --color-blue-bg: oklch(0.94 0.05 250);
    --color-red: oklch(0.55 0.25 27);
    --color-red-bg: oklch(0.94 0.06 27);
    --color-yellow: oklch(0.72 0.18 85);
    --color-yellow-bg: oklch(0.94 0.06 85);

    /* Tinted card backgrounds — vivid */
    --card-tint-blue:   oklch(0.95 0.035 250);
    --card-tint-green:  oklch(0.95 0.04 145);
    --card-tint-violet: oklch(0.95 0.035 300);
    --card-tint-amber:  oklch(0.95 0.035 85);

    /* Chart colors — vivid saturated */
    --chart-blue:        oklch(0.55 0.24 250);
    --chart-green:       oklch(0.60 0.22 145);
    --chart-violet:      oklch(0.55 0.24 300);
    --chart-amber:       oklch(0.70 0.20 85);
    --chart-rose:        oklch(0.60 0.24 15);

    /* Gradient shortcuts */
    --gradient-primary: linear-gradient(135deg, oklch(0.48 0.24 250), oklch(0.42 0.22 280));
    --gradient-sidebar: linear-gradient(180deg, var(--sidebar-bg-from), var(--sidebar-bg-to));
    --gradient-header: linear-gradient(90deg, var(--card) 0%, oklch(0.97 0.015 255) 100%);
}

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

html, body {
    font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    height: 100%;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* --- Dark gradient sidebar --- */
.sidebar {
    width: 16rem;
    background: var(--gradient-sidebar);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.sidebar-logo {
    width: 1.5rem;
    height: 1.5rem;
    filter: brightness(0) invert(1);
}

.sidebar-brand {
    font-size: 1.125rem;
    font-weight: 600;
    color: oklch(0.95 0 0);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.25rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    text-decoration: none;
    color: var(--sidebar-foreground);
    transition: all 0.2s;
}

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

.nav-item.active {
    background: oklch(0.30 0.08 255 / 0.7);
    color: oklch(0.95 0 0);
    font-weight: 500;
    border-left: 3px solid var(--sidebar-primary);
    padding-left: calc(0.75rem - 3px);
    box-shadow: 0 0 16px oklch(0.55 0.24 250 / 0.25);
}

.nav-icon {
    width: 1.25rem;
    height: 1.25rem;
}

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

.logout-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    background: none;
    border: none;
    color: var(--sidebar-foreground);
    cursor: pointer;
    transition: all 0.2s;
}

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

.content {
    padding: 2rem;
}

/* Gradient text page title */
.page-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, oklch(0.30 0.18 255), oklch(0.40 0.22 290));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-description {
    color: var(--muted-foreground);
}

/* ---------- 4. Card ---------- */
.card {
    background: var(--card);
    color: var(--card-foreground);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, oklch(0.55 0.24 250), oklch(0.55 0.22 300));
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

/* ---------- 5. Stat Card (KPI) ---------- */
.stat-card {
    background: var(--card);
    color: var(--card-foreground);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.stat-card-label {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.stat-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0.25rem;
}

/* ---------- 6. Badges — vivid with subtle gradient shine ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    line-height: 1.5;
}

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

.badge-success {
    background: linear-gradient(135deg, var(--color-green-bg), oklch(0.96 0.04 155));
    color: var(--color-green);
}

.badge-info {
    background: linear-gradient(135deg, var(--color-blue-bg), oklch(0.96 0.03 265));
    color: var(--color-blue);
}

.badge-warning {
    background: linear-gradient(135deg, var(--color-yellow-bg), oklch(0.96 0.04 95));
    color: var(--color-yellow);
}

.badge-error {
    background: linear-gradient(135deg, var(--color-red-bg), oklch(0.96 0.04 35));
    color: var(--color-red);
}

.badge-neutral {
    background: var(--secondary);
    color: var(--muted-foreground);
}

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

.skeleton-line {
    height: 1rem;
    border-radius: var(--radius-sm);
    background: var(--muted);
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

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

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

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

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state-message {
    color: var(--muted-foreground);
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
}

/* ---------- 9. Progress — animated gradient ---------- */
.progress-track {
    background: var(--border);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s;
    background: linear-gradient(90deg, oklch(0.55 0.24 250), oklch(0.50 0.22 280), oklch(0.55 0.24 250));
    background-size: 200% 100%;
    animation: progressShimmer 2.5s ease infinite;
}

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

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

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

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

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

/* ---------- 12. Buttons — gradient primary ---------- */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: var(--primary-foreground);
    border: none;
    border-radius: var(--radius-md);
    padding: 0 0.75rem;
    height: 2.25rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
}

.button:hover {
    box-shadow: var(--shadow-glow-blue);
    transform: translateY(-1px);
}

.button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: var(--shadow-sm);
}

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

.button.button-secondary:hover {
    background: var(--muted);
    box-shadow: var(--shadow-md);
}

.button-destructive {
    background: linear-gradient(135deg, oklch(0.55 0.25 27), oklch(0.48 0.22 15));
    color: var(--card);
    border: none;
}

.button-destructive:hover {
    box-shadow: 0 4px 20px -4px oklch(0.55 0.25 27 / 0.4);
    transform: translateY(-1px);
}

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

.button-ghost:hover {
    background: var(--muted);
}

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

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

/* ---------- 13. Inputs ---------- */
.input {
    border: 1px solid var(--input);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    background: var(--card);
    color: var(--foreground);
    font-size: 0.875rem;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    outline: none;
}

.input:focus {
    border-color: var(--ring);
    box-shadow: 0 0 0 3px oklch(0.50 0.20 250 / 0.2);
}

.textarea {
    min-height: 7rem;
    resize: vertical;
}

/* Form aliases for TeamManagement / Budgets */
.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.form-input {
    width: 100%;
    border: 1px solid var(--input);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    background: var(--card);
    color: var(--foreground);
    font-size: 0.875rem;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    outline: none;
}

.form-input:focus {
    border-color: var(--ring);
    box-shadow: 0 0 0 3px oklch(0.50 0.20 250 / 0.2);
}

/* ---------- 14. Tables — zebra striping + gradient header ---------- */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.75rem;
}

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

.table tbody tr:nth-child(even) {
    background: oklch(0.98 0.005 250);
}

.table tbody tr:hover {
    background: oklch(0.96 0.015 250);
}

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

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

.alert-success {
    background: var(--color-green-bg);
    color: var(--color-green);
    border-color: var(--color-green-bg);
}

.alert-error {
    background: var(--color-red-bg);
    color: var(--color-red);
    border-color: var(--color-red-bg);
}

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

.provider-card {
    text-align: left;
    background: var(--card);
    color: var(--card-foreground);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 1rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}

.provider-card:hover {
    border-color: var(--ring);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

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

.provider-title {
    font-weight: 600;
}

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

/* ---------- 17. Code Blocks ---------- */
.code-block {
    font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.75rem;
    margin: 0.5rem 0;
    overflow-x: auto;
    font-size: 0.875rem;
}

.code-block pre {
    margin: 0;
}

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

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

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

.label {
    font-size: 0.875rem;
    font-weight: 600;
}

/* ---------- 19. Existing utility classes ---------- */
.section {
    margin-top: 1.5rem;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.subsection-title {
    margin-top: 1rem;
    font-size: 1rem;
    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(--muted-foreground);
}

.small {
    font-size: 0.875rem;
}

.mono {
    font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

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

.step-body {
    margin-top: 0.5rem;
}

.bullets {
    margin: 0.5rem 0 0 1.25rem;
}

/* ---------- 20. Blazor error boundary ---------- */
.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.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.875rem; }
.text-base     { font-size: 1rem; }
.text-lg       { font-size: 1.125rem; }
.text-xl       { font-size: 1.25rem; }
.text-2xl      { font-size: 1.5rem; }
.text-3xl      { font-size: 1.875rem; }

/* ---------- 22. Color Utilities ---------- */
.text-success    { color: var(--color-green); }
.text-error      { color: var(--color-red); }
.text-info       { color: var(--color-blue); }
.text-warning    { color: var(--color-yellow); }
.text-muted      { color: var(--muted-foreground); }
.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; }
.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: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }

/* ---------- 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 — vivid ---------- */
.stat-card-blue   { background: var(--card-tint-blue);   border-color: oklch(0.82 0.05 250); }
.stat-card-blue::before   { background: linear-gradient(90deg, oklch(0.50 0.24 240), oklch(0.55 0.22 265)); }
.stat-card-green  { background: var(--card-tint-green);  border-color: oklch(0.82 0.06 145); }
.stat-card-green::before  { background: linear-gradient(90deg, oklch(0.50 0.22 135), oklch(0.58 0.22 155)); }
.stat-card-violet { background: var(--card-tint-violet); border-color: oklch(0.82 0.05 300); }
.stat-card-violet::before { background: linear-gradient(90deg, oklch(0.50 0.24 290), oklch(0.55 0.22 310)); }
.stat-card-amber  { background: var(--card-tint-amber);  border-color: oklch(0.82 0.05 85);  }
.stat-card-amber::before  { background: linear-gradient(90deg, oklch(0.65 0.20 75), oklch(0.72 0.18 95)); }

/* ---------- 28. Custom Select/Dropdown ---------- */
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='%236b7280' 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: oklch(0.70 0.06 250);
}

/* ---------- 29. Table Header Styling — gradient ---------- */
.table th {
    background: linear-gradient(180deg, oklch(0.96 0.015 250), oklch(0.94 0.02 255));
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* ---------- 30. Card/Stat-Card Hover Lift with glow ---------- */
.card, .stat-card { transition: box-shadow 0.2s ease, transform 0.2s ease; }
.card:hover, .stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card-blue:hover   { box-shadow: var(--shadow-glow-blue); }
.stat-card-green:hover  { box-shadow: var(--shadow-glow-green); }
.stat-card-violet:hover { box-shadow: var(--shadow-glow-violet); }

/* ---------- 31. Provider Card Brand Accents ---------- */
.provider-card-azure { border-top: 3px solid oklch(0.55 0.20 220); }
.provider-card-aws   { border-top: 3px solid oklch(0.65 0.20 55);  }
.provider-card-gcp   { border-top: 3px solid oklch(0.55 0.20 25);  }

/* ---------- 32. Progress Fill Default Gradient (overridden by animated above) ---------- */

/* ---------- 33. Auth Pages ---------- */
.auth-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, oklch(0.97 0.01 255), oklch(0.95 0.02 280));
    padding: 2rem 1rem;
}

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

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

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

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

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 0.25rem;
}

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

.auth-card {
    background: var(--card);
    color: var(--card-foreground);
    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.375rem;
    margin-bottom: 1rem;
}

.auth-card .label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
}

.auth-card .input {
    width: 100%;
    height: 2.5rem;
    border: 1px solid var(--input);
    border-radius: var(--radius-md);
    padding: 0 0.75rem;
    background: var(--card);
    color: var(--foreground);
    font-size: 0.875rem;
    box-shadow: var(--shadow-sm);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-card .input:focus {
    border-color: var(--ring);
    box-shadow: 0 0 0 3px oklch(0.50 0.20 250 / 0.15);
}

.auth-card .button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 2.5rem;
    background: var(--gradient-primary);
    color: var(--primary-foreground);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
    margin-top: 0.5rem;
}

.auth-card .button:hover {
    box-shadow: var(--shadow-glow-blue);
    transform: translateY(-1px);
}

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

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

.auth-footer a:hover {
    text-decoration: underline;
}

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

.profile-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--secondary);
    color: var(--foreground);
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.profile-button:hover {
    background: var(--muted);
    box-shadow: var(--shadow-sm);
}

/* ---------- 35. Profile Slideout ---------- */
.profile-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgb(0 0 0 / 0.3);
}

.profile-slideout {
    position: fixed;
    top: 0;
    right: 0;
    width: 22rem;
    height: 100vh;
    background: var(--card);
    border-left: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    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: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

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

.profile-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-md);
    border: none;
    background: none;
    color: var(--muted-foreground);
    cursor: pointer;
    transition: background 0.15s;
}

.profile-close:hover {
    background: var(--muted);
    color: var(--foreground);
}

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

.profile-org-name {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

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

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

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

/* ---------- 36. Feedback Form ---------- */
.feedback-textarea {
    width: 100%;
    min-height: 5rem;
    resize: vertical;
    border: 1px solid var(--input);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    background: var(--card);
    color: var(--foreground);
    font-size: 0.875rem;
    font-family: inherit;
    box-shadow: var(--shadow-sm);
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.feedback-textarea:focus {
    border-color: var(--ring);
    box-shadow: 0 0 0 3px oklch(0.50 0.20 250 / 0.2);
}

.feedback-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: var(--primary-foreground);
    border: none;
    border-radius: var(--radius-md);
    padding: 0 0.75rem;
    height: 2.25rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.15s ease;
    margin-top: 0.5rem;
}

.feedback-submit:hover {
    box-shadow: var(--shadow-glow-blue);
    transform: translateY(-1px);
}

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

/* ---------- 37. Administration Collapsible Group (dark sidebar) ---------- */
.admin-group {
    margin-top: 0.5rem;
    border-top: 1px solid var(--sidebar-border);
    padding-top: 0.5rem;
}

.admin-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
    background: none;
    border: none;
    color: var(--sidebar-muted);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.admin-toggle:hover {
    background: var(--sidebar-accent);
    color: var(--sidebar-accent-foreground);
}

.admin-toggle .chevron {
    width: 1rem;
    height: 1rem;
    transition: transform 0.2s;
}

.admin-toggle .chevron.expanded {
    transform: rotate(90deg);
}

.admin-children {
    overflow: hidden;
}

.admin-children .nav-item {
    padding-left: 1.75rem;
}

/* ---------- 38. Main Layout Flex Column ---------- */
main {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

main .content {
    flex: 1;
}

/* ---------- 39. Header Plan Badge ---------- */
.header-plan-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 9999px;
    background: linear-gradient(135deg, var(--color-blue-bg), oklch(0.96 0.04 265));
    color: var(--color-blue);
    text-transform: capitalize;
    margin-right: 0.5rem;
}

/* ---------- 40. Admin Section Label ---------- */
.admin-section-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--sidebar-muted);
    padding: 0.75rem 1.75rem 0.25rem;
}

/* ---------- 41. Profile Feedback Link ---------- */
.profile-feedback-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--secondary);
    color: var(--secondary-foreground);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
}

.profile-feedback-link:hover {
    background: var(--muted);
}

/* ---------- 42. ApexCharts overrides ---------- */
.apexcharts-tooltip {
    font-family: 'Geist', sans-serif !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-lg) !important;
}

.apexcharts-legend-text {
    font-family: 'Geist', sans-serif !important;
}
