/* ========================================================
   NetWorth Design System
   base.css – tokens, reset, typography, utilities
   ======================================================== */

/* -----------------------------
   Design tokens
   ----------------------------- */

:root {
    /* Colors */
    --color-bg-page: #f5f5f7;
    --color-surface: #ffffff;
    --color-surface-soft: #faf2ff;

    --color-border-subtle: #e5e7eb;
    --color-border-strong: #cbd5e1;

    --color-text-main: #111827;
    --color-text-muted: #6b7280;
    --color-text-soft: #9ca3af;

    --color-primary: #16a34a;
    --color-primary-soft: #dcfce7;
    --color-primary-strong: #15803d;

    /* Common status tokens (aligned with label colors) */
    --color-success: #2fb344;
    /* Finnhub teal-ish */
    --color-warning: #ffc107;
    /* Basis amber */
    --color-danger: #dc3545;
    /* Failed red */
    --color-info: #0d6efd;
    /* Alpha Vantage blue */
    --color-muted-strong: #6c757d;

    /* Provider / extra tones */
    --color-provider-yahoo: #6f42c1;
    --color-provider-av: #0d6efd;
    --color-provider-finnhub: #20c997;
    --color-provider-cache: #6c757d;
    --color-provider-basis: #ffc107;
    --color-provider-failed: #dc3545;
    --color-provider-info: #0074d9;
    --color-provider-unknown: #9ca3af;

    --color-link: #2563eb;
    --color-link-hover: #1d4ed8;

    /* Typography */
  		--font-primary: 'Comfortaa', system-ui, -apple-system, BlinkMacSystemFont,
                  'Segoe UI', Roboto, sans-serif;
                  
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        "Helvetica Neue", Arial, sans-serif;

    --font-size-xs: 11px;
    --font-size-sm: 13px;
    --font-size-md: 14px;
    --font-size-lg: 16px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;

    --line-height-tight: 1.2;
    --line-height-normal: 1.5;

    /* Spacing (8px base) */
    --space-0: 0;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 32px;
    --space-8: 40px;

    /* Radius */
    --radius-none: 0;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-subtle: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-card: 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-soft: 0 18px 45px rgba(148, 163, 184, 0.35);

    /* Breakpoints */
    --bp-md: 768px;
    --bp-lg: 1024px;

        /* Table / actions tokens (from old table.css) */
            --border-subtle: #e5e7eb;
            --border-strong: #d1d5db;
            --text-soft: #9ca3af;
            --accent: #2563eb;
            --accent-soft: #eff6ff;
            --danger: #dc2626;
            --success: #16a34a;
            --tag-transfer: #0ea5e9;
            --tag-transfer-bg: #e0f2fe;
            --tag-warning: #d97706;
            --tag-warning-bg: #fef3c7;
}

@font-face {
  font-family: 'Comfortaa';
  src: url('/assets/font/Comfortaa.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* -----------------------------
   Reset / base
   ----------------------------- */

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

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    font-size: var(--font-size-md);
    line-height: var(--line-height-normal);
    color: var(--color-text-main);
    background: var(--color-bg-page);
    -webkit-font-smoothing: antialiased;
}

img,
svg {
    max-width: 100%;
    height: auto;
}

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
}

/* -----------------------------
   Typography
   ----------------------------- */

.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.2;
    color: inherit;
}

h1 {
    font-size: var(--font-size-2xl);
}

h2 {
    font-size: var(--font-size-xl);
}

h3 {
    font-size: var(--font-size-lg);
}

h4 {
    font-size: var(--font-size-md);
}

h5 {
    font-size: var(--font-size-sm);
}

h6 {
    font-size: var(--font-size-xs);
}

p {
    margin: 0 0 var(--space-3);
}

small {
    font-size: var(--font-size-xs);
}

a {
    color: var(--color-link);
    text-decoration: none;
}

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

/* -----------------------------
   Simple utilities
   ----------------------------- */

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

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

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

.text-center {
    text-align: center;
}

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

.text-xs {
    font-size: var(--font-size-xs);
}

.mt-sm {
    margin-top: var(--space-2);
}

.mt-md {
    margin-top: var(--space-3);
}

.mt-lg {
    margin-top: var(--space-4);
}

.stack-v-sm {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.stack-v {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.stack-h-sm {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.stack-h {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
}

.flex {
    display: flex;
}

.flex-1 {
    flex: 1;
}

.hidden {
    display: none !important;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* -----------------------------
   Surfaces
   ----------------------------- */

.surface {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-subtle);
    box-shadow: var(--shadow-subtle);
}

.surface-card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-subtle);
    box-shadow: var(--shadow-card);
    padding: var(--space-4);
}

/* ---------------------------------
   Text Color Utilities (Tabler-style)
   ----------------------------------*/

.text-primary {
    color: var(--color-info);
    /* blue */
}

.text-secondary {
    color: var(--color-muted-strong);
    /* gray */
}

.text-body {
    color: var(--color-text-main);
}

.text-success {
    color: var(--color-success);
    /* green */
}

.text-info {
    color: var(--color-info);
    /* blue */
}

.text-warning {
    color: var(--color-warning);
    /* amber/orange */
}

.text-danger {
    color: var(--color-danger);
    /* red */
}

.text-pink {
    color: #d63384;
    /* Custom pink, matches screenshot */
}

