/* NujoomBid surfaces, colors and reusable interface styles. */
:root, :root[data-theme="light"] {
  color-scheme: light;
  --font: "Segoe UI", Tahoma, Arial, sans-serif;
  --mono: Consolas, "Cascadia Mono", ui-monospace, monospace;
  --r: 18px;
  --bg: #f4f6fa;
  --fg: #16243a;
  --text: var(--fg);
  --muted: #526478;
  --surface: #fff;
  --surface-2: #f4f7fc;
  --card: var(--surface);
  --control-bg: var(--surface);
  --header-bg: #f2f6fc;
  --line: #e0e8f3;
  --sidebar-bg: #f8faff;
  --brand-fg: #203458;
  --accent: #315ac6;
  --accent-fg: #fff;
  --accent-soft: #edf3ff;
  --button-bg: #315ac6;
  --hover-bg: #f2f6fd;
  --glass: rgb(255 255 255 / 89%);
  --glass-bar: rgb(250 252 255 / 93%);
  --workspace-bg: radial-gradient(ellipse at 83% 0%, #e5edff 0%, transparent 38%),
    radial-gradient(ellipse at 13% 16%, #ecf7f4 0%, transparent 31%), var(--bg);
  --shadow: 0 7px 26px rgb(42 72 130 / 5%);
  --shadow-hover: 0 10px 25px rgb(42 72 130 / 12%);
  --shadow-dialog: 0 22px 70px rgb(29 47 76 / 20%);
  --scrim-bg: rgb(24 38 65 / 40%);
  --ok: #17674f;
  --warn: #855712;
  --bad: #aa3448;
  --purple: #6849a6;
  --ok-bg: #e8f5ee;
  --warn-bg: #fcf2dd;
  --bad-bg: #fbeef1;
  --purple-bg: #f1ecfa;
  --ok-rgb: 23 103 79;
  --warn-rgb: 133 87 18;
  --bad-rgb: 170 52 72;
  --acc-rgb: 49 90 198;
  --pu-rgb: 104 73 166;
  --mut-rgb: 82 100 120;
  --ok-fr: 79 154 130;
  --warn-fr: 180 133 50;
  --bad-fr: 190 92 108;
  --acc-fr: 87 126 219;
  --pu-fr: 153 123 202;
  --chart-copart: #3368db;
  --chart-iaai: #13877e;
  --chart-other: #805cc1;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101827;
  --fg: #edf3ff;
  --muted: #b2c0d5;
  --surface: #1a2639;
  --surface-2: #202f46;
  --header-bg: #202f46;
  --line: #3a4a65;
  --sidebar-bg: #141e30;
  --brand-fg: #e2ebfb;
  --accent: #a7c1ff;
  --accent-fg: #fff;
  --accent-soft: #233a61;
  --button-bg: #2859be;
  --hover-bg: #22324c;
  --glass: rgb(26 38 57 / 93%);
  --glass-bar: rgb(20 30 48 / 93%);
  --workspace-bg: radial-gradient(ellipse at 85% 0%, #192b50 0%, transparent 42%), var(--bg);
  --shadow: 0 7px 26px rgb(2 9 22 / 16%);
  --shadow-hover: 0 10px 25px rgb(2 9 22 / 38%);
  --shadow-dialog: 0 22px 70px rgb(2 9 22 / 48%);
  --scrim-bg: rgb(2 8 19 / 65%);
  --ok: #a0e7c9;
  --warn: #f8d48d;
  --bad: #ffacb9;
  --purple: #d6bfff;
  --ok-bg: #173e36;
  --warn-bg: #473522;
  --bad-bg: #492b3d;
  --purple-bg: #37294f;
  --ok-rgb: 160 231 201;
  --warn-rgb: 248 212 141;
  --bad-rgb: 255 172 185;
  --acc-rgb: 167 193 255;
  --pu-rgb: 214 191 255;
  --mut-rgb: 178 192 213;
  --ok-fr: 85 163 139;
  --warn-fr: 179 142 73;
  --bad-fr: 188 106 133;
  --acc-fr: 106 150 246;
  --pu-fr: 159 128 211;
  --chart-copart: #91b3ff;
  --chart-iaai: #60d8c4;
  --chart-other: #c4a2ff;
}

@media (prefers-reduced-transparency: reduce) {
  :root, :root[data-theme] { --glass: var(--surface); --glass-bar: var(--sidebar-bg); }
}

.ui-surface, .ui-glass {
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.ui-surface { background: var(--surface); }
.ui-glass { background: var(--glass); }
.ui-heading { margin: 0; color: var(--fg); font-size: clamp(25px, 3vw, 37px); font-weight: 750; line-height: 1.26; }
.ui-button, .ui-field {
  min-block-size: 41px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--control-bg);
  color: var(--fg);
  font: inherit;
}
.ui-button { cursor: pointer; font-weight: 650; }
.ui-button:hover:not(:disabled) { background: var(--hover-bg); }
.ui-button[aria-pressed="true"], .ui-button[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
}
.ui-button.ui-primary { background: var(--button-bg); border-color: var(--button-bg); color: var(--accent-fg); }
.ui-button.ui-primary:hover:not(:disabled) { background: color-mix(in srgb, var(--button-bg) 87%, black); }
.ui-field { min-inline-size: 0; }
.ui-field::placeholder { color: var(--muted); opacity: 1; }
:is(.ui-button, .ui-field, .ui-focus):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: no-preference) {
  .ui-button { transition: background-color .15s, border-color .15s, transform .15s; }
  .ui-button:active:not(:disabled) { transform: scale(.98); }
  .ui-enter { animation: ui-enter .17s ease-out both; }
  @keyframes ui-enter { from { opacity: 0; } to { opacity: 1; } }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .ui-lift { transition: transform .2s cubic-bezier(.2,.75,.25,1), box-shadow .2s; }
  .ui-lift:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
}
