/* ASIARIGHT AIMS — Material 3 theme
   Seed from ASIARIGHT System Brief.pdf:
   navy #001f5f · wordmark #1f497d · electric #0e70a7 · ice #f7f8fb · gold line #c9a84c */

@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;1,400&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0");

:root {
  --ar-navy: #001f5f;
  --ar-navy-ink: #010822;
  --ar-navy-deep: #071232;
  --ar-blue: #1f497d;
  --ar-blue-bright: #0e70a7;
  --ar-electric: #2e8bff;
  --ar-ice: #9ec8ff;
  --ar-gold: #c9a84c;
  --ar-gold-soft: #e8d39a;

  --md-sys-color-primary: #1f497d;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: #d6e4f4;
  --md-sys-color-on-primary-container: #001433;
  --md-sys-color-secondary: #3d5573;
  --md-sys-color-on-secondary: #ffffff;
  --md-sys-color-secondary-container: #d5e3f2;
  --md-sys-color-on-secondary-container: #0a1c30;
  --md-sys-color-tertiary: #8a6d1d;
  --md-sys-color-on-tertiary: #ffffff;
  --md-sys-color-tertiary-container: #f3e6c2;
  --md-sys-color-on-tertiary-container: #271900;
  --md-sys-color-error: #ba1a1a;
  --md-sys-color-on-error: #ffffff;
  --md-sys-color-error-container: #ffdad6;
  --md-sys-color-on-error-container: #410002;
  --md-sys-color-surface: #f6f8fb;
  --md-sys-color-on-surface: #121826;
  --md-sys-color-on-surface-variant: #3e4a5c;
  --md-sys-color-surface-dim: #d5dae3;
  --md-sys-color-surface-bright: #f6f8fb;
  --md-sys-color-surface-container-lowest: #ffffff;
  --md-sys-color-surface-container-low: #eef2f7;
  --md-sys-color-surface-container: #e8edf4;
  --md-sys-color-surface-container-high: #e2e8f0;
  --md-sys-color-surface-container-highest: #dce3ec;
  --md-sys-color-outline: #6d7788;
  --md-sys-color-outline-variant: #bec6d2;
  --md-sys-color-inverse-surface: #1a2436;
  --md-sys-color-inverse-on-surface: #e8eef5;
  --md-sys-color-inverse-primary: #8eb8e8;
  --md-sys-color-scrim: #000000;
  --md-sys-elev-1: 0 1px 2px rgba(18, 24, 38, 0.08), 0 1px 3px 1px rgba(18, 24, 38, 0.06);
  --md-sys-elev-2: 0 1px 2px rgba(18, 24, 38, 0.1), 0 2px 6px 2px rgba(18, 24, 38, 0.08);
  --md-sys-elev-3: 0 4px 8px 3px rgba(18, 24, 38, 0.08), 0 1px 3px rgba(18, 24, 38, 0.12);
  --md-sys-shape-xs: 4px;
  --md-sys-shape-sm: 8px;
  --md-sys-shape-md: 12px;
  --md-sys-shape-lg: 16px;
  --md-sys-shape-xl: 28px;
  --md-sys-shape-full: 999px;
  --kit-devbar: #001f5f;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body.hifi {
  font-family: "Roboto", system-ui, sans-serif;
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.25px;
}

.ms {
  font-family: "Material Symbols Outlined";
  font-weight: 400;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  vertical-align: middle;
}
.ms.fill { font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24; }

/* ===== Dev chrome (thin) ===== */
.hifi-devbar {
  height: 40px;
  background: var(--kit-devbar);
  color: #e8eef5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  gap: 10px;
  font-size: 12px;
}
.hifi-devbar strong { letter-spacing: 0.4px; }
.hifi-devbar .tag {
  font-size: 10px;
  letter-spacing: 0.08em;
  border: 1px solid #c9a84c;
  color: #e8d39a;
  padding: 2px 6px;
  border-radius: 4px;
}
.hifi-dev-actions { display: flex; gap: 6px; align-items: center; }
.hifi-dev-actions select,
.hifi-dev-actions button {
  background: #0a2a6e;
  color: #fff;
  border: 1px solid #2a4d8a;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
}
.hifi-stage { height: calc(100vh - 40px); position: relative; overflow: hidden; }

/* ===== Product shell MD3 ===== */
.wf-app {
  display: flex;
  height: 100%;
  background: var(--md-sys-color-surface);
}
.wf-sidebar {
  width: 280px;
  flex-shrink: 0;
  background: var(--md-sys-color-surface-container-low);
  overflow-y: auto;
  padding: 12px 12px 24px;
  max-height: none;
  height: 100%;
  border-right: 0;
}
.wf-side-brand {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0;
  padding: 16px 12px 20px;
  border: 0;
  margin: 0;
  color: var(--md-sys-color-on-surface);
}
.wf-side-brand::before {
  content: "event";
  font-family: "Material Symbols Outlined";
  margin-right: 8px;
  color: var(--md-sys-color-primary);
  vertical-align: -4px;
}
.wf-side-item {
  border: 0;
  border-left: 0;
  border-radius: var(--md-sys-shape-xl);
  padding: 12px 16px 12px 16px;
  margin: 2px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface-variant);
  cursor: pointer;
}
.wf-side-item.sub { padding-left: 20px; font-weight: 400; }
.wf-side-item:hover { background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent); }
.wf-side-item.active {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  font-weight: 500;
  border-left: 0;
}
.wf-side-group {
  border: 0;
  margin: 4px 0;
}
.wf-side-group > summary {
  padding: 10px 16px;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--md-sys-color-primary);
  background: transparent;
  border-radius: var(--md-sys-shape-sm);
  font-weight: 700;
}
.wf-side-group[open] > summary { background: transparent; }

.wf-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--md-sys-color-surface); }
.wf-topbar {
  height: 64px;
  border: 0;
  background: var(--md-sys-color-surface);
  padding: 0 20px 0 8px;
  box-shadow: none;
}
.search-box {
  height: 48px;
  width: min(480px, 50%);
  border: 0;
  border-radius: var(--md-sys-shape-xl);
  background: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-on-surface-variant);
  padding: 0 16px 0 44px;
  position: relative;
  font-size: 14px;
}
.search-box::before {
  content: "search";
  font-family: "Material Symbols Outlined";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--md-sys-color-on-surface-variant);
}
.wf-user { gap: 12px; }
.wf-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  display: flex;
  align-items: center;
  justify-content: center;
}
.wf-content { padding: 8px 28px 40px; flex: 1; overflow: auto; }

.wf-page-header { margin: 8px 0 20px; align-items: center; }
.wf-page-header h2 {
  font-size: 28px;
  line-height: 36px;
  font-weight: 400;
  letter-spacing: 0;
  margin: 0;
}
.wf-crumbs {
  font-size: 12px;
  letter-spacing: 0.4px;
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: 4px;
}
.wf-actions { gap: 8px; }

/* Buttons MD3 */
.wf-btn {
  border: 0;
  border-radius: var(--md-sys-shape-xl);
  background: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-primary);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.1px;
  padding: 10px 20px;
  min-height: 40px;
  box-shadow: none;
  cursor: default;
}
.wf-btn.primary {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  border: 0;
}
.wf-btn.ghost {
  background: transparent;
  color: var(--md-sys-color-primary);
  outline: 1px solid var(--md-sys-color-outline);
}
.wf-btn.danger {
  background: var(--md-sys-color-error-container);
  color: var(--md-sys-color-on-error-container);
  border: 0;
}
.wf-btn.sm { min-height: 32px; padding: 6px 16px; font-size: 13px; }

/* Cards & metrics */
.wf-card-box,
.wf-table-wrap,
.wf-col,
.wf-card-mini,
.wf-ai-box {
  border: 0;
  border-radius: var(--md-sys-shape-md);
  background: var(--md-sys-color-surface-container-lowest);
  box-shadow: var(--md-sys-elev-1);
}
.wf-card-box { padding: 16px; }
.wf-card-box .label {
  font-size: 12px;
  letter-spacing: 0.4px;
  text-transform: none;
  color: var(--md-sys-color-on-surface-variant);
  font-weight: 500;
}
.wf-card-box .value {
  font-size: 24px;
  line-height: 32px;
  font-weight: 400;
  font-family: "Roboto", sans-serif;
  letter-spacing: 0;
  color: var(--md-sys-color-on-surface);
  margin-top: 6px;
}
.wf-card-box .hint { color: var(--md-sys-color-on-surface-variant); font-size: 12px; }

/* Material 3 card — elevated / filled / outlined
   https://m3.material.io/components/cards */
.md-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--md-sys-color-surface-container-lowest);
  color: var(--md-sys-color-on-surface);
}
.md-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--md-sys-color-on-surface);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.md-card:hover::after { opacity: 0.06; }
.md-card-elevated {
  background: var(--md-sys-color-surface-container-lowest);
  box-shadow: var(--md-sys-elev-1);
}
.md-card-elevated:hover { box-shadow: var(--md-sys-elev-2); }
.md-card-filled {
  background: var(--md-sys-color-surface-container-highest);
  box-shadow: none;
}
.md-card-outlined {
  background: var(--md-sys-color-surface);
  box-shadow: none;
  outline: 1px solid var(--md-sys-color-outline-variant);
  outline-offset: -1px;
}
.md-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.md-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}
.md-card-icon .ms { font-size: 22px; color: inherit; font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24; }
.md-card-icon.sm { width: 32px; height: 32px; border-radius: 8px; flex-basis: 32px; }
.md-card-icon.sm .ms { font-size: 18px; }
.md-card-kicker {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.4px;
  color: var(--md-sys-color-on-surface-variant);
  min-width: 0;
}
.md-card-title {
  font-size: 24px;
  line-height: 32px;
  font-weight: 400;
  letter-spacing: 0;
}
.md-card-support {
  font-size: 12px;
  line-height: 16px;
  color: var(--md-sys-color-on-surface-variant);
}

.wf-grid { gap: 12px; }

/* Inputs */
.wf-input, .wf-select, .wf-textarea {
  border: 1px solid var(--md-sys-color-outline);
  border-radius: 4px;
  background: var(--md-sys-color-surface-container-lowest);
  min-height: 48px;
  padding: 12px 16px;
  font-size: 16px;
  font-family: "Roboto", sans-serif;
}
.wf-field label {
  font-size: 12px;
  color: var(--md-sys-color-on-surface-variant);
  font-weight: 500;
}

/* Chips */
.wf-chip {
  border: 1px solid var(--md-sys-color-outline-variant);
  border-radius: var(--md-sys-shape-sm);
  background: var(--md-sys-color-surface-container-low);
  color: var(--md-sys-color-on-surface-variant);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
}
.wf-chip.ok {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  border-color: transparent;
}
.wf-chip.warn {
  background: var(--md-sys-color-tertiary-container);
  color: var(--md-sys-color-on-tertiary-container);
  border-color: transparent;
  border-style: solid;
}
.wf-chip.danger {
  background: var(--md-sys-color-error-container);
  color: var(--md-sys-color-on-error-container);
  border-color: transparent;
}
.wf-chip.neutral {
  background: var(--md-sys-color-surface-container-highest);
  border-color: transparent;
}

/* Tables */
.wf-table-wrap { overflow: hidden; }
.wf-table { font-size: 14px; }
.wf-table th {
  background: var(--md-sys-color-surface-container);
  border: 0;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  color: var(--md-sys-color-on-surface-variant);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.4px;
  padding: 14px 16px;
}
.wf-table td {
  border: 0;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
  padding: 14px 16px;
}
.wf-table tr.highlight td {
  background: var(--md-sys-color-secondary-container);
  font-weight: 500;
}
.wf-table .mono { font-family: "Roboto", sans-serif; font-variant-numeric: tabular-nums; }

/* Tabs = secondary tabs MD3 */
.wf-tabs {
  border: 0;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--md-sys-color-outline-variant);
}
.wf-tab {
  border: 0;
  padding: 14px 16px;
  color: var(--md-sys-color-on-surface-variant);
  font-weight: 500;
  position: relative;
}
.wf-tab.active {
  background: transparent;
  color: var(--md-sys-color-primary);
  border: 0;
  margin: 0;
}
.wf-tab.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--md-sys-color-primary);
}

/* Banners = MD3 banners */
.wf-banner {
  border: 0;
  border-radius: 0;
  background: var(--md-sys-color-tertiary-container);
  color: var(--md-sys-color-on-tertiary-container);
  padding: 12px 16px;
  font-weight: 500;
}
.wf-banner.ok {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  border: 0;
}

.wf-placeholder {
  border: 1px dashed var(--md-sys-color-outline-variant);
  background: var(--md-sys-color-surface-container);
  border-radius: var(--md-sys-shape-md);
  color: var(--md-sys-color-on-surface-variant);
}

.wf-kanban { gap: 12px; }
.wf-col {
  background: var(--md-sys-color-surface-container);
  box-shadow: none;
  min-height: 280px;
  border-radius: var(--md-sys-shape-lg);
}
.wf-col-h {
  background: transparent;
  border: 0;
  padding: 14px 16px 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface-variant);
}
.wf-card-mini {
  margin: 8px;
  border-radius: var(--md-sys-shape-md);
  padding: 12px;
  box-shadow: var(--md-sys-elev-1);
}
.wf-card-mini .amt { font-family: "Roboto", sans-serif; color: var(--md-sys-color-primary); }

.wf-timeline { border-left: 2px solid var(--md-sys-color-primary-container); }
.wf-tl-item::before {
  background: var(--md-sys-color-primary);
  border-color: var(--md-sys-color-primary-container);
}

.wf-check { border-bottom: 1px solid var(--md-sys-color-outline-variant); padding: 12px 4px; }
.wf-check .box {
  border-radius: 2px;
  border-color: var(--md-sys-color-on-surface-variant);
}
.wf-check .box.on {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  border-color: var(--md-sys-color-primary);
}

.wf-ai-box {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  box-shadow: none;
}
.wf-ai-box .ai-tag {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  border: 0;
  border-radius: var(--md-sys-shape-xs);
}

.wf-gantt-bar {
  background: var(--md-sys-color-primary);
  border: 0;
  border-radius: 4px;
}

.wf-modal-backdrop { background: color-mix(in srgb, var(--md-sys-color-scrim) 32%, transparent); }
.wf-modal {
  border: 0;
  border-radius: var(--md-sys-shape-xl);
  padding: 24px;
  box-shadow: var(--md-sys-elev-3);
  width: 440px;
}
.wf-modal h3 { font-size: 24px; font-weight: 400; }

/* Login MD3 */
.wf-login {
  min-height: 100%;
  height: 100%;
  background: linear-gradient(165deg, #010822 0%, #001f5f 48%, #0e70a7 100%);
}
.wf-card {
  width: 400px;
  border: 0;
  border-radius: var(--md-sys-shape-xl);
  padding: 32px 28px;
  box-shadow: var(--md-sys-elev-3);
  background: var(--md-sys-color-surface-container-lowest);
}
.wf-logo {
  height: 48px;
  border: 0;
  border-radius: var(--md-sys-shape-md);
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  font-size: 14px;
  letter-spacing: 0.5px;
}
.wf-title { font-size: 32px; font-weight: 400; letter-spacing: 0; }

.wf-kv .k { color: var(--md-sys-color-on-surface-variant); }
.muted { color: var(--md-sys-color-on-surface-variant); }

/* Catalog sheet */
.catalog-backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--md-sys-color-scrim) 32%, transparent);
  display: none;
  z-index: 20;
}
.catalog-backdrop.open { display: block; }
.catalog-sheet {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100%);
  background: var(--md-sys-color-surface-container-low);
  box-shadow: var(--md-sys-elev-3);
  display: flex;
  flex-direction: column;
  padding: 8px 0 16px;
}
.catalog-sheet h3 {
  margin: 12px 20px 4px;
  font-weight: 400;
  font-size: 22px;
}
.catalog-sheet .sub {
  margin: 0 20px 12px;
  color: var(--md-sys-color-on-surface-variant);
  font-size: 13px;
}
.catalog-tools { display: flex; gap: 8px; padding: 0 16px 8px; }
.catalog-tools input,
.catalog-tools select {
  flex: 1;
  height: 48px;
  border: 0;
  border-radius: 4px;
  background: var(--md-sys-color-surface-container-highest);
  padding: 0 12px;
  font: inherit;
}
.catalog-list { overflow: auto; padding: 0 8px 16px; }
.catalog-sec {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--md-sys-color-primary);
  padding: 12px 12px 4px;
}
.catalog-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: var(--md-sys-shape-xl);
  padding: 10px 16px;
  cursor: pointer;
  font: inherit;
  color: var(--md-sys-color-on-surface);
}
.catalog-item:hover { background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent); }
.catalog-item.active {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}
.catalog-count {
  padding: 4px 20px 8px;
  font-size: 12px;
  color: var(--md-sys-color-on-surface-variant);
}

.fab-library {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 15;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 16px;
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  box-shadow: var(--md-sys-elev-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab-library .ms { font-size: 24px; }

.meta-note {
  position: absolute;
  left: 300px;
  bottom: 16px;
  z-index: 10;
  font-size: 11px;
  color: var(--md-sys-color-on-surface-variant);
  background: var(--md-sys-color-surface-container);
  padding: 6px 10px;
  border-radius: 8px;
  max-width: 520px;
}

.product-root { min-height: 100%; height: 100%; background: transparent; }

/* Hide leftover low-fi kit if any */
.kit-header, .kit-nav { display: none !important; }
