/* GENERATED from the app's Theme.swift and AppRail.swift — do not hand-edit.
 *
 * Regenerate with `scripts/sync-theme.py` after any change to Theme.swift or AppRail.swift.
 *
 * The DEFAULT skin only — the flat "paper" look the CRM ships with. The app's tropical and VIP
 * skins are not offered on the web.
 *
 * Three things in here are the whole flat redesign, and they are easy to undo by accident:
 *   • radius-card is 10 and radius-row is 8. Not 8/6, not 12.
 *   • a hairline is 1px of --c-card-border, and it is what separates things. Not a box, not a gap.
 *   • there are NO shadows. Theme.Palette.shadow resolves to fully transparent black in this skin,
 *     so Elevation.card et al paint nothing. --shadow-* below say `none` for that reason; a page
 *     that grows a box-shadow has left the design system.
 */

:root {
  /* brand */
  --c-brand-primary: #316B47;
  --c-brand-pressed: #255437;
  --c-brand-tint: #E5F0E9;
  --c-on-brand: #FFFFFF;

  /* surfaces */
  --c-background: #FFFFFF;
  --c-background-secondary: #F7F9F8;
  --c-surface: #FFFFFF;
  --c-card-background: #FFFFFF;
  --c-card-background-solid: #FFFFFF;
  --c-control-fill: #F1F4F2;
  --c-input-fill: #FFFFFF;
  --c-field-fill: #F1F4F2;

  /* hairlines — the flat surface separates by rule, never by shadow */
  --c-card-border: #E5EAE7;
  --c-separator: #ECF0EE;
  --c-border: #D7D5D0;
  --c-border-strong: #BCBAB4;
  --c-input-border: #7B897F;

  /* text */
  --c-text-primary: #17211B;
  --c-text-secondary: #5A6961;
  --c-text-tertiary: #5E6C64;

  /* state */
  --c-accent-primary: #12915A;
  --c-accent-tint: #E7F3EC;
  --c-success: #316B47;
  --c-success-tint: #E5F0E9;
  --c-warning: #895600;
  --c-warning-tint: #FCEFD6;
  --c-danger: #B42E21;
  --c-danger-tint: #FCE9E5;
  --c-info: #245F98;
  --c-info-tint: #E4EEF8;

  /* categorical — muted on purpose; the vivid system colors pop too hard on paper */
  --c-accent-red: #C0503A;
  --c-accent-orange: #C5842E;
  --c-accent-yellow: #C29B2E;
  --c-accent-green: #3D8A59;
  --c-accent-mint: #4E9B84;
  --c-accent-teal: #3A8A86;
  --c-accent-cyan: #3E8FAE;
  --c-accent-blue: #3E6FA0;
  --c-accent-indigo: #545FB0;
  --c-accent-purple: #7C6A94;
  --c-accent-pink: #B0648E;
  --c-accent-brown: #8B5E3C;
  --c-accent-gray: #8A9488;

  /* identity monograms — indexed by a byte-sum of the name; ORDER IS THE CONTRACT */
  --c-identity-0: #316B47;
  --c-identity-1: #4B6D91;
  --c-identity-2: #806D96;
  --c-identity-3: #93604A;
  --c-identity-4: #647084;
  --c-identity-5: #36756A;
  --c-identity-count: 6;

  /* document types — one deliberate hue each */
  --c-doc-proposal: #7C6A94;
  --c-doc-invoice: #316B47;
  --c-doc-change-order: #A9755C;
  --c-doc-certificate: #5C7C9E;
  --c-doc-payment: #3D8A59;

  /* money surface — Theme.Palette.Money */
  --c-money-ink: #EBF5ED;
  --c-money-dim: #A3C4B0;
  --c-money-deep: #14261C;
  --c-money-mint: #8FE3AD;
  --c-money-gradient: linear-gradient(215deg, #21452E, #14261C, #0F1C14);
  --c-money-meter-track: rgba(255,255,255,.14);
  --c-money-hairline: rgba(255,255,255,.10);
  --c-money-ghost: rgba(255,255,255,.10);

  /* drawing surface — Theme.Palette.Drawing */
  --c-drawing-ink: #EDF7F2;
  --c-drawing-dim: #A8C9B8;
  --c-drawing-mint: #91E6B0;
  --c-drawing-gradient: linear-gradient(135deg, #1F4530, #12291F, #0D1C17);
  --c-drawing-hairline: rgba(255,255,255,.11);
  --c-drawing-soft-fill: rgba(255,255,255,.08);

  /* contract impact — Theme.Palette.COImpact */
  --c-co-ink: #E8E6F5;
  --c-co-dim: #B8ADDE;
  --c-co-add: #8FE3AD;
  --c-co-credit: #FACC8C;
  --c-co-gradient: linear-gradient(215deg, #241A4C, #2A1F57, #191238);
  --c-co-hairline: rgba(255,255,255,.11);
  --c-co-ghost: rgba(255,255,255,.09);

  /* overlays — Theme.Palette.subtleOverlay / scrim / mediaScrim / documentStage / badge */
  --c-subtle-overlay: rgba(0, 0, 0, 0.05);
  --c-scrim: rgba(27, 28, 31, 0.32);
  --c-media-scrim: rgba(0, 0, 0, 0.5);
  --c-on-media: #FFFFFF;
  --c-document-stage: #53585B;
  --c-badge: #FF3B30;
  --c-on-badge: #FFFFFF;
  --c-focus-ring: var(--c-brand-primary);
  --c-selection: var(--c-brand-primary);

  /* lead temperature — red · orange · blue (Theme.Palette.lead*) */
  --c-lead-hot: #B42E21;
  --c-lead-hot-tint: #FCE7E4;
  --c-lead-warm: #A2500C;
  --c-lead-warm-tint: #FCEBDD;
  --c-lead-cold: #245F98;
  --c-lead-cold-tint: #E4EEF8;

  /* spacing */
  --space-none: 0px;
  --space-xxs: 2px;
  --space-xs: 4px;
  --space-xs-sm: 6px;
  --space-sm: 8px;
  --space-sm-md: 10px;
  --space-md: 12px;
  --space-md-lg: 14px;
  --space-lg: 16px;
  --space-lg-xl: 18px;
  --space-xl: 20px;
  --space-xxl: 24px;
  --space-xxxl: 32px;
  --space-huge: 48px;
  --space-rail-row-y: 7px; /* AppRail.rowVerticalPadding */
  --space-rail-row-gap: 1px; /* AppRailScroll row spacing */

  /* radius */
  --radius-xs-sm: 6px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-base: 10px;
  --radius-control: 10px;
  --radius-lg: 12px;
  --radius-row: 8px;
  --radius-card: 10px;
  --radius-xl: 16px;
  --radius-xxl: 20px;
  --radius-xxxl: 24px;
  --radius-sheet: 30px;
  --radius-pill: 999px;

  /* borders */
  --border-fine: 0.5px;
  --border-hairline: 1px;
  --border-card: 1px;
  --border-focus: 2px;

  /* metrics */
  --size-page-margin: 24px;
  --size-destination-margin-compact: 16px;
  --size-destination-margin-narrow: 12px;
  --size-control-small: 36px;
  --size-control-medium: 44px;
  --size-control-large: 52px;
  --size-touch-min: 44px;
  --size-icon-sm: 16px;
  --size-icon-md: 20px;
  --size-icon-lg: 24px;
  --size-icon-box-sm: 28px;
  --size-icon-box: 32px;
  --size-icon-box-lg: 36px;
  --size-avatar: 28px;
  --size-list-icon: 30px;
  --size-list-accent-strip: 3px;
  --size-sheet-content-max-width: 520px;
  --size-focused-form-max-width: 700px;
  --size-form-workspace-max-width: 1080px;
  --size-catalog-content-max-width: 760px;
  --size-sheet-rail-width: 300px;
  --size-credential-rail-width: 340px;
  --size-rail: 13.25rem;             /* AppRail.width at 16px root */
  --size-rail-icon: 18px;        /* AppRail.iconColumn */
  --size-rail-mark: 26px;        /* AppRailMark size */
  --size-rail-folded: 4rem;        /* AppRail.collapsedWidth */
  --size-form-column: 660px;       /* the form measure */

  /* dialog — Theme.Dialog (MTThemedDialog) */
  --dialog-card-max-width: 380px;
  --dialog-card-padding: 28px;
  --dialog-icon-container: 72px;
  --dialog-icon-symbol: 30px;
  --dialog-horizontal-margin: 40px;
  --dialog-flow-max-width: 600px;

  /* columnar list slots — every list lines its columns up on these */
  --col-name-min: 140px;
  --col-period: 300px;
  --col-wide: 120px;
  --col-text: 100px;
  --col-amount: 90px;
  --col-badge: 80px;
  --col-blocker: 132px;
  --col-meta: 70px;
  --col-count: 60px;
  --col-mini: 50px;

  /* type — SF Pro ramp. 13px is the FLOOR for body copy; below it lives only chrome. */
  --font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  --text-caption2: 11px;
  --text-caption: 12px;
  --text-footnote: 13px;   /* the floor */
  --text-subhead: 15px;
  --text-callout: 16px;
  --text-body: 17px;
  --text-headline: 17px;
  --text-title3: 20px;
  --text-title2: 22px;
  --text-title1: 28px;
  --text-stat: 24px;
  --text-total: 26px;
  --text-display: 34px;

  /* motion */
  --motion-fast: 150ms ease-out;
  --motion-hover: 150ms ease-in-out;
  --motion-base: 200ms ease-in-out;
  --motion-slow: 250ms ease-in-out;
  --motion-gentle: 300ms ease-in-out;

  /* elevation — deliberately nothing. See the header. */
  --shadow-card: none;
  --shadow-raised: none;
  --shadow-overlay: none;
  --shadow-rail-peek: 6px 0 18px rgba(0,0,0,.14); /* native railPeekOverlay only */


  /* fixed point sizes — Theme.Fonts.ptN */
  --text-pt7: 7px;
  --text-pt8: 8px;
  --text-pt9: 9px;
  --text-pt10: 10px;
  --text-pt11: 11px;
  --text-pt12: 12px;
  --text-pt13: 13px;
  --text-pt14: 14px;
  --text-pt15: 15px;
  --text-pt16: 16px;
  --text-pt17: 17px;
  --text-pt18: 18px;
  --text-pt20: 20px;
  --text-pt22: 22px;
  --text-pt24: 24px;
  --text-pt26: 26px;
  --text-pt28: 28px;
  --text-pt32: 32px;
  --text-pt34: 34px;
  --text-pt36: 36px;
  --text-pt40: 40px;
  --text-pt44: 44px;
  --text-pt48: 48px;
  --text-pt56: 56px;

  /* opacity — Theme.Opacity */
  --opacity-disabled: 0.4;
  --opacity-pressed: 0.8;
  --opacity-watermark: 0.1;
  --opacity-tint-faint: 0.08;
  --opacity-tint: 0.12;
  --opacity-tint-strong: 0.15;
  --opacity-tint-border: 0.24;
}
