/* ============================================================================
 * MoniWerk ERP — Notion Design System (`design.md` — Notion Analysis)
 *
 * Aesthetic Direction:
 * - Warm paper-soft off-white canvas (`#f6f5f4` / `{colors.canvas-soft}`) paired
 *   with crisp pure white card & nav surfaces (`#ffffff` / `{colors.surface}`).
 * - Near-black `NotionInter` (`Inter`) typography (`#000000` ink, `#31302e`
 *   warm charcoal, `#615d59` stone, `#a39e98` ash) with heavy 700 headlines
 *   and tight negative tracking (`-2.125px` down to `-0.125px`).
 * - Single structural accent: Notion Blue (`#0075de`, active/pressed `#005bab`)
 *   reserved exclusively for primary CTAs, links, active nav rows, and focus.
 * - Playful multi-color decorative sticker palette (`#62aef0` sky, `#d6b6f6`
 *   purple, `#ff64c8` pink, `#dd5b00` orange, `#2a9d99` teal, `#1aae39` green)
 *   used strictly for category dots, app-icon stickers, and status indicators.
 * - Single Deep Indigo "night" hero band (`#213183` / `{colors.secondary}`).
 * - Distinct geometry contrast:
 *   - Pill-shaped primary/secondary CTAs (`9999px` / `{rounded.full}`)
 *   - Tighter 8px utility buttons (`8px` / `{rounded.md}`)
 *   - Tight 4px form inputs (`4px` / `{rounded.xs}`)
 *   - 5px sidebar nav rows (`5px` / `{rounded.sm}`)
 *   - 12px feature cards (`12px` / `{rounded.lg}`) & 16px modals (`{rounded.xl}`)
 * ============================================================================ */

:root {
    /* Surface Palette — Light Mode (Warm Paper Default per design.md) */
    --bg-canvas: #f6f5f4;               /* {colors.canvas-soft}: Warm Paper page floor */
    --bg-canvas-subtle: #f6f5f4;        /* {colors.canvas-soft}: Table headers, featured plan */
    --bg-canvas-card: #f0efed;          /* Subtle hover/pressed paper tint */
    --bg-surface: #ffffff;              /* {colors.surface} / {colors.canvas}: Pure white cards & nav */
    --bg-surface-elevated: #ffffff;     /* Elevated cards & modals */
    --bg-surface-hover: #f9f8f7;        /* Gentle paper row hover */
    --bg-glass: rgba(255, 255, 255, 0.92);

    /* Deep Indigo "Night" Hero Band (`{colors.secondary}`) */
    --bg-night-band: #213183;
    --ink-on-night: #ffffff;
    --ink-on-night-soft: rgba(255, 255, 255, 0.78);

    /* Text Hierarchy (Notion Warm Ink Scale) */
    --ink-primary: #000000;             /* {colors.ink}: Near-black headings & primary copy */
    --ink-body-strong: #191918;
    --ink-secondary: #31302e;           /* {colors.ink-secondary}: Warm Charcoal */
    --ink-mute: #615d59;                /* {colors.ink-muted}: Stone */
    --ink-faint: #a39e98;               /* {colors.ink-faint}: Ash captions & placeholders */

    /* Structural Accent — Single Confident Notion Blue */
    --accent-primary: #0075de;          /* {colors.primary}: Notion Blue */
    --accent-primary-hover: #005bab;    /* {colors.primary-active}: Pressed Blue */
    --accent-secondary: #213183;        /* {colors.secondary}: Deep Indigo */
    --accent-disabled: #e6e6e6;

    /* Decorative Sticker Palette (Never used for CTAs, only badges/dots/stickers) */
    --sticker-sky: #62aef0;             /* {colors.accent-sky} */
    --sticker-purple: #d6b6f6;          /* {colors.accent-purple} */
    --sticker-purple-deep: #391c57;     /* {colors.accent-purple-deep} */
    --sticker-pink: #ff64c8;            /* {colors.accent-pink} */
    --sticker-orange: #dd5b00;          /* {colors.accent-orange} */
    --sticker-orange-deep: #793400;     /* {colors.accent-orange-deep} */
    --sticker-teal: #2a9d99;            /* {colors.accent-teal} */
    --sticker-green: #1aae39;           /* {colors.accent-green} */
    --sticker-brown: #523410;           /* {colors.accent-brown} */

    /* Borders & Hairlines */
    --border-hairline: #e6e6e6;         /* {colors.hairline}: 1px card border & divider */
    --border-hairline-soft: #efefef;
    --border-input: #dddddd;            /* text-input 1px rgb(221,221,221) border */

    /* Elevation Shadows (Notion Barely-There Multi-Layer Stack) */
    --shadow-level-1:
        rgba(0, 0, 0, 0.01) 0px 0.175px 1.041px,
        rgba(0, 0, 0, 0.02) 0px 0.8px 2.925px,
        rgba(0, 0, 0, 0.027) 0px 2.025px 7.847px,
        rgba(0, 0, 0, 0.04) 0px 4px 18px;
    --shadow-level-2:
        rgba(0, 0, 0, 0.015) 0px 0.8px 2.9px,
        rgba(0, 0, 0, 0.025) 0px 2.5px 8.5px,
        rgba(0, 0, 0, 0.035) 0px 7px 22px,
        rgba(0, 0, 0, 0.05) 0px 23px 52px;

    /* Scrollbar */
    --scrollbar-thumb: #d8d6d2;
    --scrollbar-thumb-hover: #a39e98;
}

html.dark {
    /* Surface Palette — Dark Mode (Notion Warm Dark Workspace) */
    --bg-canvas: #191919;
    --bg-canvas-subtle: #202020;
    --bg-canvas-card: #262626;
    --bg-surface: #202020;
    --bg-surface-elevated: #252525;
    --bg-surface-hover: #2a2a2a;
    --bg-glass: rgba(32, 32, 32, 0.92);

    /* Deep Indigo Night Hero Band */
    --bg-night-band: #1b286b;
    --ink-on-night: #ffffff;
    --ink-on-night-soft: rgba(255, 255, 255, 0.78);

    /* Text Hierarchy — Dark Mode */
    --ink-primary: #f5f5f4;
    --ink-body-strong: #e6e5e3;
    --ink-secondary: #c7c5c1;
    --ink-mute: #9b9a97;
    --ink-faint: #6e6d6a;

    /* Structural Accent — Notion Blue */
    --accent-primary: #0075de;
    --accent-primary-hover: #2383e2;
    --accent-secondary: #213183;
    --accent-disabled: #333333;

    /* Borders & Hairlines */
    --border-hairline: #2f2f2f;
    --border-hairline-soft: #262626;
    --border-input: #3a3a3a;

    /* Elevation Shadows */
    --shadow-level-1: 0 4px 18px rgba(0, 0, 0, 0.35);
    --shadow-level-2: 0 20px 48px rgba(0, 0, 0, 0.55);

    /* Scrollbar */
    --scrollbar-thumb: #3a3a3a;
    --scrollbar-thumb-hover: #525252;
}

/* Base Body & Typography Settings */
body {
    background-color: var(--bg-canvas);
    color: var(--ink-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-feature-settings: "lnum" 1, "locl" 1, "cv02" 1, "cv03" 1, "cv04" 1, "cv11" 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: 0;
    line-height: 1.5;
}

/* Tabular Numerals for Prices, Stock, Barcodes & KPI Counters */
.tnum,
.font-mono,
table td,
table th {
    font-variant-numeric: tabular-nums lining-nums;
}

/* ============================================================================
 * Notion Typography Scale (`design.md` Hierarchy)
 * Tight, heavy (700) headlines with explicit negative tracking; calm 400 body
 * ============================================================================ */

.notion-display-1,
.claude-display-xl {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    font-size: clamp(2.1rem, 3.6vw, 3.25rem);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -1.875px;
    color: var(--ink-primary);
}

.notion-heading-1,
.claude-display-lg {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    font-size: clamp(1.65rem, 2.4vw, 2.25rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -1px;
    color: var(--ink-primary);
}

.notion-heading-2,
.claude-display-sm,
.stripi-display-metric {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    font-size: clamp(1.45rem, 2vw, 1.625rem); /* 26px */
    font-weight: 700;
    line-height: 1.23;
    letter-spacing: -0.625px;
    color: var(--ink-primary);
}

.notion-heading-3,
.claude-title-lg,
.stripi-heading-lg {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    font-size: 1.125rem; /* 18px-22px card title */
    font-weight: 700;
    line-height: 1.27;
    letter-spacing: -0.25px;
    color: var(--ink-primary);
}

.notion-title,
.claude-title-md,
.stripi-heading-md {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    font-size: 1rem; /* 16px-20px feature title / callout */
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.125px;
    color: var(--ink-primary);
}

.notion-eyebrow,
.claude-caption-upper,
.stripi-micro-cap {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.33;
    letter-spacing: 0.125px;
    text-transform: uppercase;
}

/* Override legacy font-serif-display to use NotionInter weight 700 tight tracking */
.font-serif-display {
    font-family: 'Inter', -apple-system, system-ui, sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: -0.625px !important;
}

/* ============================================================================
 * Cards & Surface Containers (`feature-card`, `pricing-plan-card`, `hero-band`)
 * ============================================================================ */

/* Level 0 — Flat feature-card: White surface `#ffffff`, 1px `#e6e6e6` hairline, 12px radius */
.notion-card,
.notion-panel,
.claude-card,
.claude-panel,
.stripi-card,
.stripi-panel,
.linear-card,
.linear-panel {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    border-radius: 12px; /* {rounded.lg} */
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Level 1 — Soft elevated feature-card (`feature-card-elevated`) */
.notion-card-elevated {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-hairline);
    border-radius: 12px; /* {rounded.lg} */
    box-shadow: var(--shadow-level-1);
}

/* Warm Paper Featured Card (`pricing-plan-card-featured` / `ex-pricing-tier`) */
.notion-card-soft,
.claude-card-cream {
    background-color: var(--bg-canvas-subtle);
    border: 1px solid var(--border-hairline);
    border-radius: 12px; /* {rounded.lg} */
}

/* Deep Indigo "Night" Hero Band (`hero-band` — `{colors.secondary}` #213183) */
.notion-night-band {
    background-color: var(--bg-night-band);
    color: var(--ink-on-night);
    border-radius: 16px; /* {rounded.xl} */
    position: relative;
    overflow: hidden;
}

/* Dark / Polarity-Flipped Surface (`ex-pricing-tier-featured` / code preview) */
.notion-card-dark,
.claude-card-dark {
    background-color: #191918;
    color: #ffffff;
    border: 1px solid #2f2f2f;
    border-radius: 12px;
}

/* Level 2 — Elevated Modal / Dialog / Toast Surface (`ex-modal-card` 16px radius) */
.notion-modal,
.claude-panel-float,
.stripi-panel-float {
    background-color: var(--bg-surface-elevated);
    border: 1px solid var(--border-hairline);
    border-radius: 16px; /* {rounded.xl} */
    box-shadow: var(--shadow-level-2);
}

/* ============================================================================
 * Buttons (`button-primary`, `button-secondary`, `button-utility`)
 * - Pill-shaped marketing CTAs (`9999px` / `{rounded.full}`)
 * - Tighter 8px utility buttons (`8px` / `{rounded.md}`)
 * ============================================================================ */

/* Primary CTA (`button-primary`): Notion Blue #0075de, pill 9999px */
.btn-notion-primary,
.btn-claude-primary,
.btn-stripi-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    background-color: var(--accent-primary);
    color: #ffffff;
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.4;
    padding: 7px 16px;
    border-radius: 9999px; /* {rounded.full} */
    border: 1px solid transparent;
    transition: background-color 0.15s ease, transform 0.1s ease;
    cursor: pointer;
}

.btn-notion-primary:hover,
.btn-claude-primary:hover,
.btn-stripi-primary:hover {
    background-color: var(--accent-primary-hover);
}

.btn-notion-primary:active,
.btn-claude-primary:active,
.btn-stripi-primary:active {
    background-color: var(--accent-primary-hover);
    transform: scale(0.98);
}

.btn-notion-primary:disabled,
.btn-claude-primary:disabled,
.btn-stripi-primary:disabled {
    background-color: var(--accent-disabled);
    color: var(--ink-mute);
    cursor: not-allowed;
    transform: none;
}

/* Secondary Pill CTA (`button-secondary`): White surface, Level-1 soft shadow, pill 9999px */
.btn-notion-secondary-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    background-color: var(--bg-surface);
    color: var(--ink-primary);
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.4;
    padding: 7px 16px;
    border-radius: 9999px; /* {rounded.full} */
    border: 1px solid var(--border-hairline);
    box-shadow: var(--shadow-level-1);
    transition: background-color 0.15s ease, transform 0.1s ease;
    cursor: pointer;
}

.btn-notion-secondary-pill:hover {
    background-color: var(--bg-surface-hover);
}

/* Utility Button (`button-utility`): White surface, 8px `{rounded.md}`, 1px hairline border */
.btn-notion-utility,
.btn-claude-secondary,
.btn-stripi-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background-color: var(--bg-surface);
    color: var(--ink-primary);
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    padding: 5px 14px;
    border-radius: 8px; /* {rounded.md} per button-utility spec */
    border: 1px solid var(--border-hairline);
    transition: background-color 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
}

.btn-notion-utility:hover,
.btn-claude-secondary:hover,
.btn-stripi-secondary:hover {
    background-color: var(--bg-canvas-subtle);
    border-color: var(--border-input);
}

/* ============================================================================
 * Inputs & Forms (`text-input` — 4px `{rounded.xs}` radius, 1px #dddddd border)
 * ============================================================================ */

.input-notion,
.input-claude,
.input-stripi {
    background-color: var(--bg-surface);
    color: var(--ink-primary);
    border: 1px solid var(--border-input);
    border-radius: 4px; /* {rounded.xs} — deliberately tighter than pill CTAs */
    padding: 6px 10px;
    font-size: 13.5px;
    line-height: 1.33;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-notion::placeholder,
.input-claude::placeholder,
.input-stripi::placeholder {
    color: var(--ink-faint);
}

.input-notion:focus,
.input-claude:focus,
.input-stripi:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-level-1), 0 0 0 2px rgba(0, 117, 222, 0.14);
}

/* ============================================================================
 * Badges & Eyebrow Pills (`badge-pill` & Decorative Sticker Tags)
 * ============================================================================ */

/* `badge-pill`: White surface, Notion Blue #0075de text, 12px/600 eyebrow, 9999px pill */
.badge-notion,
.badge-pill,
.badge-coral,
.pill-tag-soft {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background-color: var(--bg-surface);
    color: var(--accent-primary);
    border: 1px solid var(--border-hairline);
    border-radius: 9999px; /* {rounded.full} */
    padding: 2px 8px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.33;
    letter-spacing: 0.125px;
}

/* Decorative Sticker Badges (For status/categories only, never CTAs) */
.sticker-tag-green {
    background-color: rgba(26, 174, 57, 0.1);
    color: #1aae39;
    border: 1px solid rgba(26, 174, 57, 0.24);
}
.sticker-tag-teal {
    background-color: rgba(42, 157, 153, 0.1);
    color: #2a9d99;
    border: 1px solid rgba(42, 157, 153, 0.24);
}
.sticker-tag-orange {
    background-color: rgba(221, 91, 0, 0.1);
    color: #dd5b00;
    border: 1px solid rgba(221, 91, 0, 0.24);
}
.sticker-tag-pink {
    background-color: rgba(255, 100, 200, 0.12);
    color: #d938a2;
    border: 1px solid rgba(255, 100, 200, 0.28);
}
.sticker-tag-purple {
    background-color: rgba(214, 182, 246, 0.22);
    color: #391c57;
    border: 1px solid rgba(214, 182, 246, 0.5);
}
html.dark .sticker-tag-purple {
    color: #d6b6f6;
}
.sticker-tag-sky {
    background-color: rgba(98, 174, 240, 0.14);
    color: #0075de;
    border: 1px solid rgba(98, 174, 240, 0.3);
}

/* ============================================================================
 * App Shell Navigation Row (`ex-app-shell-row` — 5px `{rounded.sm}`)
 * ============================================================================ */

.notion-nav-row,
.category-tab {
    display: flex;
    align-items: center;
    border-radius: 5px; /* {rounded.sm} */
    color: var(--ink-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.notion-nav-row:hover,
.category-tab:hover {
    background-color: var(--bg-canvas-subtle);
    color: var(--ink-primary);
}

.notion-nav-row.active,
.category-tab.active {
    background-color: var(--bg-canvas-subtle);
    color: var(--ink-primary);
    font-weight: 600;
}

/* Custom Minimal Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

/* Alpine.js x-cloak */
[x-cloak] {
    display: none !important;
}
