/* =============================================================================
   BlueMoney Design System — colors & type
   ============================================================================= */

/* ---- Type stack (system fallback, with Inter as our chosen substitution) ---- */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap");

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

    --background: oklch(0.97 0 0);
    --foreground: oklch(0.145 0 0);
    --card: oklch(1 0 0);
    --card-foreground: oklch(0.145 0 0);
    --popover: oklch(1 0 0);
    --popover-foreground: oklch(0.145 0 0);
    --primary: oklch(0.205 0 0);
    --primary-foreground: oklch(0.985 0 0);
    --secondary: oklch(0.97 0 0);
    --secondary-foreground: oklch(0.205 0 0);
    --muted: oklch(0.97 0 0);
    --muted-foreground: oklch(0.556 0 0);
    --accent: oklch(0.97 0 0);
    --accent-foreground: oklch(0.205 0 0);
    --destructive: oklch(0.577 0.245 27.325);
    --border: oklch(0.922 0 0);
    --input: oklch(0.922 0 0);
    --ring: oklch(0.708 0 0);

    --chart-1: oklch(0.646 0.222 41.116);
    --chart-2: oklch(0.6 0.118 184.704);
    --chart-3: oklch(0.398 0.07 227.392);
    --chart-4: oklch(0.828 0.189 84.429);
    --chart-5: oklch(0.769 0.188 70.08);

    --sidebar: oklch(0.985 0 0);
    --sidebar-foreground: oklch(0.145 0 0);
    --sidebar-primary: oklch(0.205 0 0);
    --sidebar-primary-foreground: oklch(0.985 0 0);
    --sidebar-accent: oklch(0.97 0 0);
    --sidebar-accent-foreground: oklch(0.205 0 0);
    --sidebar-border: oklch(0.922 0 0);
    --sidebar-ring: oklch(0.708 0 0);

    /* Business / semantic finance tokens — the actual "color" of BlueMoney */
    --color-receita: oklch(0.527 0.154 150.069);        /* income — green */
    --color-despesa: oklch(0.577 0.245 27.325);         /* expense — red */
    --color-transferencia: oklch(0.546 0.2 262.881);    /* transfer — blue */
    --color-pendente: oklch(0.769 0.188 70.08);         /* pending — amber */

    /* Type families */
    --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

    /* Type scale (Tailwind defaults, surfaced as vars) */
    --text-xs: 0.75rem;        /* 12 — meta, hints */
    --text-sm: 0.875rem;       /* 14 — body, list rows */
    --text-base: 1rem;         /* 16 */
    --text-lg: 1.125rem;       /* 18 — card titles */
    --text-xl: 1.25rem;        /* 20 */
    --text-2xl: 1.5rem;        /* 24 — page titles, big money */
    --text-3xl: 1.875rem;      /* 30 */

    /* Shadow ladder */
    --shadow-xs: 0 1px 2px 0 oklch(0 0 0 / 0.05);
    --shadow-sm: 0 1px 3px 0 oklch(0 0 0 / 0.1), 0 1px 2px -1px oklch(0 0 0 / 0.1);
    --shadow:    0 4px 6px -1px oklch(0 0 0 / 0.1), 0 2px 4px -2px oklch(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px oklch(0 0 0 / 0.1), 0 4px 6px -4px oklch(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px oklch(0 0 0 / 0.1), 0 8px 10px -6px oklch(0 0 0 / 0.1);
}

.dark {
    --background: oklch(0.165 0 0);
    --foreground: oklch(0.985 0 0);
    --card: oklch(0.205 0 0);
    --card-foreground: oklch(0.985 0 0);
    --popover: oklch(0.205 0 0);
    --popover-foreground: oklch(0.985 0 0);
    --primary: oklch(0.922 0 0);
    --primary-foreground: oklch(0.205 0 0);
    --secondary: oklch(0.269 0 0);
    --secondary-foreground: oklch(0.985 0 0);
    --muted: oklch(0.269 0 0);
    --muted-foreground: oklch(0.708 0 0);
    --accent: oklch(0.269 0 0);
    --accent-foreground: oklch(0.985 0 0);
    --destructive: oklch(0.704 0.191 22.216);
    --border: oklch(1 0 0 / 10%);
    --input: oklch(1 0 0 / 15%);
    --ring: oklch(0.556 0 0);

    --chart-1: oklch(0.488 0.243 264.376);
    --chart-2: oklch(0.696 0.17 162.48);
    --chart-3: oklch(0.769 0.188 70.08);
    --chart-4: oklch(0.627 0.265 303.9);
    --chart-5: oklch(0.645 0.246 16.439);

    --sidebar: oklch(0.205 0 0);
    --sidebar-foreground: oklch(0.985 0 0);
    --sidebar-primary: oklch(0.488 0.243 264.376);
    --sidebar-primary-foreground: oklch(0.985 0 0);
    --sidebar-accent: oklch(0.269 0 0);
    --sidebar-accent-foreground: oklch(0.985 0 0);
    --sidebar-border: oklch(1 0 0 / 10%);
    --sidebar-ring: oklch(0.556 0 0);

    --color-receita: oklch(0.627 0.154 150.069);
    --color-despesa: oklch(0.704 0.191 22.216);
    --color-transferencia: oklch(0.627 0.2 262.881);
    --color-pendente: oklch(0.828 0.189 84.429);
}

/* =============================================================================
   Semantic typography classes — base styles you can apply directly.
   ============================================================================= */

html, body {
    font-family: var(--font-sans);
    color: var(--foreground);
    background: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.bm-h1 {
    font-size: var(--text-2xl);
    font-weight: 700;
    line-height: 1.15;
    color: var(--foreground);
    letter-spacing: -0.01em;
}

.bm-h2 {
    font-size: var(--text-lg);
    font-weight: 600;
    line-height: 1.3;
    color: var(--foreground);
}

.bm-h3 {
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1.4;
    color: var(--foreground);
    text-transform: none;
    letter-spacing: 0;
}

.bm-body {
    font-size: var(--text-sm);
    line-height: 1.5;
    color: var(--foreground);
}

.bm-meta {
    font-size: var(--text-xs);
    line-height: 1.4;
    color: var(--muted-foreground);
}

.bm-money {
    font-size: var(--text-2xl);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.bm-money-sm {
    font-size: var(--text-sm);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.bm-mono {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
}

.bm-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}
.bm-link:hover {
    text-decoration: underline;
}

.bm-text-receita        { color: var(--color-receita); }
.bm-text-despesa        { color: var(--color-despesa); }
.bm-text-transferencia  { color: var(--color-transferencia); }
.bm-text-pendente       { color: var(--color-pendente); }

.bm-card {
    background: var(--card);
    color: var(--card-foreground);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
}

.bm-card-warning {
    background: color-mix(in oklab, var(--destructive) 5%, var(--card));
    border-color: color-mix(in oklab, var(--destructive) 60%, var(--border));
}

.bm-row-pendente {
    background: color-mix(in oklab, var(--color-pendente) 16%, transparent);
    border-left: 4px solid var(--color-pendente);
}
