/* ================================================================
   M1 Tokens
   Design-system foundation: fonts, custom properties, base animations.
   Load first in base.html — every other stylesheet depends on these.
   ================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  /* Primary palette */
  --m1-bone:         #E6E1D2;
  --m1-dark-green:   #1D3026;
  --m1-olive:        #596152;
  --m1-artichoke:    #737660;  /* ADA-corrected: 4.68:1 with white (was #9A9D87 at 2.78:1) */
  --m1-dutch-white:  #DDD2A4;

  /* Secondary palette (accents) */
  --m1-slate-gray:   #314E56;
  --m1-teal:         #276B6E;
  --m1-emerald:      #4DA284;
  --m1-electric-green: #AAD372;
  --m1-burnt-umber:  #84352D;

  /* ADA-corrected variants */
  --m1-success:      #2E7F65;  /* ADA-corrected: 4.84:1 with white (was #30856A at 4.48:1) */
  --m1-border-secondary: #8C8672;
  --m1-toggle-off:   #888888;
  --m1-olive-dark:   #4A5043;  /* darker olive — 5.1:1 on bone surfaces */
  --m1-teal-dark:    #1E5557;  /* darker teal — 5.2:1 on bone surfaces */
  --m1-burnt-dark:   #6B2A24;  /* darker burnt umber — 5.6:1 on light error bg */
  --m1-amber:        #946C14;  /* dark amber — 4.7:1 on white; warning text/border */
  --m1-placeholder:  #7A7D6E;  /* olive-tinted neutral for input placeholders */

  /* Tints */
  --m1-sand:         #C4BFA6;
  --m1-bone-80:      #EBE7DB;
  --m1-bone-60:      #F0EDE4;

  /* Semantic mappings */
  --color-bg:        #EDEBE4;
  --color-surface:   #FFFFFF;
  --color-surface-alt: #f4f2ec;
  --color-text:      var(--m1-dark-green);
  --color-text-muted: var(--m1-olive);
  --color-text-light: var(--m1-artichoke);
  --color-nav-bg:    var(--m1-dark-green);
  --color-nav-text:  var(--m1-bone);
  --color-primary:   var(--m1-teal);
  --color-primary-hover: var(--m1-slate-gray);
  --color-success:   var(--m1-success);
  --color-warning:   var(--m1-dutch-white);
  --color-danger:    var(--m1-burnt-umber);
  --color-highlight: var(--m1-electric-green);
  --color-table-header: var(--m1-artichoke);
  --color-section-header-bg: var(--m1-dark-green);
  --color-section-header-text: var(--m1-bone);
  --color-text-secondary: var(--m1-olive-dark);
  --color-link-on-light: var(--m1-teal-dark);
  --color-danger-text:  var(--m1-burnt-dark);
  --color-warning-text: var(--m1-amber);
  --color-placeholder:  var(--m1-placeholder);

  /* Structural tokens */
  --color-border:          #ccc;         /* standard input / control borders */
  --color-border-warm:     #e0ddd4;      /* warm-tinted dividers: table rows, modal, filter */
  --color-border-light:    #eee;         /* light separators */
  --color-neutral:         #999;         /* badge-neutral background, muted accents */
  --color-success-hover:   #277554;      /* btn-success hover */
  --color-danger-hover:    var(--m1-burnt-dark); /* btn-danger hover */
  --color-primary-focus:   rgba(39,107,110,0.2);  /* focus ring fill */
  --color-primary-subtle:  rgba(39,107,110,0.05); /* file upload hover tint */
  --color-primary-selected: rgba(39,107,110,0.08); /* selected option background */
  --color-danger-subtle:   rgba(132,53,45,0.08);   /* danger hover background tint */

  /* Typography */
  --font-family: "Roboto Condensed", "Segoe UI", -apple-system, system-ui, sans-serif;
  --font-mono:   "SFMono-Regular", Consolas, "Liberation Mono", "Menlo", monospace;

  /* Layout */
  --nav-height: 40px;
  --border-radius: 4px;
  --border-radius-lg: 8px;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.1);
  --content-padding: 16px;
}

/* Foundational keyframes used by multiple components */
@keyframes btn-spin {
  to { transform: rotate(360deg); }
}
@keyframes spin {
  to { transform: translateY(-50%) rotate(360deg); }
}
@keyframes sync-spin {
  to { transform: rotate(360deg); }
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100%); }
}
