/*!*******************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[3]!./src/styles/tokens.css ***!
  \*******************************************************************************************************************************************************************************************************************************************************************/
/* ============================================================
   SAFETYSAAS Agent — Design tokens & base styles
   ============================================================ */
:root {
  --accent-h: 255;
  --accent: oklch(0.55 0.15 var(--accent-h));
  --accent-strong: oklch(0.48 0.16 var(--accent-h));
  --accent-soft: oklch(0.95 0.035 var(--accent-h));
  --accent-ring: oklch(0.55 0.15 var(--accent-h) / 0.32);

  --bg: oklch(0.985 0.003 255);
  --surface: oklch(1 0 0);
  --surface-2: oklch(0.975 0.004 255);
  --sidebar: oklch(0.965 0.005 255);
  --sidebar-hover: oklch(0.93 0.008 255);
  --sidebar-active: oklch(0.9 0.02 var(--accent-h));
  --text: oklch(0.26 0.012 260);
  --text-muted: oklch(0.52 0.012 260);
  --text-faint: oklch(0.66 0.01 260);
  --border: oklch(0.91 0.005 260);
  --border-strong: oklch(0.85 0.006 260);
  --code-bg: oklch(0.97 0.004 260);
  --code-head: oklch(0.945 0.005 260);
  --success: oklch(0.62 0.13 155);
  --warn: oklch(0.7 0.13 70);
  --user-bubble: oklch(0.955 0.006 260);
  --shadow-sm: 0 1px 2px oklch(0.2 0.02 260 / 0.06), 0 1px 3px oklch(0.2 0.02 260 / 0.05);
  --shadow-md: 0 4px 16px oklch(0.2 0.02 260 / 0.08), 0 2px 6px oklch(0.2 0.02 260 / 0.06);
  --shadow-lg: 0 18px 50px oklch(0.2 0.02 260 / 0.16);
  --hljs-keyword: oklch(0.52 0.18 295);
  --hljs-string: oklch(0.5 0.13 150);
  --hljs-number: oklch(0.55 0.14 40);
  --hljs-comment: oklch(0.66 0.01 260);
  --hljs-title: oklch(0.5 0.16 255);
  --hljs-attr: oklch(0.5 0.14 230);
}

[data-theme="dark"] {
  --accent: oklch(0.7 0.13 var(--accent-h));
  --accent-strong: oklch(0.76 0.13 var(--accent-h));
  --accent-soft: oklch(0.32 0.06 var(--accent-h));
  --accent-ring: oklch(0.7 0.13 var(--accent-h) / 0.35);

  --bg: oklch(0.205 0.008 260);
  --surface: oklch(0.235 0.009 260);
  --surface-2: oklch(0.265 0.01 260);
  --sidebar: oklch(0.185 0.008 260);
  --sidebar-hover: oklch(0.27 0.012 260);
  --sidebar-active: oklch(0.32 0.04 var(--accent-h));
  --text: oklch(0.93 0.006 260);
  --text-muted: oklch(0.7 0.012 260);
  --text-faint: oklch(0.56 0.01 260);
  --border: oklch(0.32 0.012 260);
  --border-strong: oklch(0.4 0.014 260);
  --code-bg: oklch(0.18 0.008 260);
  --code-head: oklch(0.255 0.01 260);
  --success: oklch(0.72 0.13 155);
  --warn: oklch(0.78 0.12 70);
  --user-bubble: oklch(0.29 0.012 260);
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 4px 18px oklch(0 0 0 / 0.36);
  --shadow-lg: 0 20px 56px oklch(0 0 0 / 0.5);
  --hljs-keyword: oklch(0.78 0.13 300);
  --hljs-string: oklch(0.78 0.13 150);
  --hljs-number: oklch(0.8 0.12 50);
  --hljs-comment: oklch(0.58 0.01 260);
  --hljs-title: oklch(0.78 0.12 250);
  --hljs-attr: oklch(0.78 0.11 225);
}

/*!*****************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[3]!./src/styles/a2ui.css ***!
  \*****************************************************************************************************************************************************************************************************************************************************************/
/* ============================================================
   SAFETYSAAS Agent — A2UI surface styling
   Maps the A2UI Basic Catalog onto the app's design tokens.
   ============================================================ */
.a2ui-surface {
  --a2ui-primary: var(--accent);
  max-width: 100%;
  margin: 12px 0 4px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* attribution bar (theme.agentDisplayName / iconUrl) */
.a2ui-attrib {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.a2ui-attrib-ico { width: 18px; height: 18px; border-radius: 5px; object-fit: cover; }
.a2ui-attrib-dot { background: linear-gradient(145deg, var(--a2ui-primary), var(--accent-strong)); }
.a2ui-badge {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--a2ui-primary);
  background: color-mix(in oklch, var(--a2ui-primary) 14%, transparent);
  padding: 3px 8px;
  border-radius: 999px;
}

/* inner padding wrapper */
.a2ui-surface > .a2ui-col,
.a2ui-surface > .a2ui-row,
.a2ui-surface > .a2ui-card,
.a2ui-surface > .a2ui-list { padding: 16px; }
.a2ui-surface > .a2ui-text { padding: 16px; }

/* layout */
.a2ui-row { display: flex; flex-direction: row; gap: 12px; }
.a2ui-col { display: flex; flex-direction: column; gap: 12px; }
.a2ui-list { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; }
.a2ui-slot { display: flex; flex-direction: column; min-width: 0; }
.a2ui-row > .a2ui-slot { display: block; }

.a2ui-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 14px;
}
.a2ui-card .a2ui-card { background: var(--surface-2); }

.a2ui-divider.horiz { height: 1px; background: var(--border); margin: 2px 0; }
.a2ui-divider.vert { width: 1px; align-self: stretch; background: var(--border); }

/* text + variants */
.a2ui-text { color: var(--text); font-size: 14.5px; line-height: 1.55; overflow-wrap: anywhere; }
.a2ui-text :first-child { margin-top: 0; }
.a2ui-text :last-child { margin-bottom: 0; }
.a2ui-text p { margin: 0.3em 0; }
.a2ui-text strong { font-weight: 700; }
.a2ui-text code { font-family: "JetBrains Mono", monospace; font-size: 0.88em; background: var(--code-bg); padding: 1px 5px; border-radius: 5px; }
.a2ui-text-h1 { font-size: 21px; font-weight: 750; letter-spacing: -0.01em; }
.a2ui-text-h2 { font-size: 17.5px; font-weight: 700; letter-spacing: -0.01em; }
.a2ui-text-h3 { font-size: 15.5px; font-weight: 650; }
.a2ui-text-title { font-size: 16px; font-weight: 700; }
.a2ui-text-caption { font-size: 12px; font-weight: 600; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.05em; }
.a2ui-text-h1 p, .a2ui-text-h2 p, .a2ui-text-h3 p, .a2ui-text-title p, .a2ui-text-caption p { margin: 0; font: inherit; letter-spacing: inherit; }

.a2ui-image { max-width: 100%; border-radius: 10px; display: block; }
.a2ui-media { width: 100%; border-radius: 10px; }
.a2ui-icon { display: inline-grid; place-items: center; color: var(--a2ui-primary); }

/* fields */
.a2ui-field { display: flex; flex-direction: column; gap: 5px; }
.a2ui-label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.a2ui-input {
  width: 100%;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 9px 11px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.a2ui-input::placeholder { color: var(--text-faint); }
.a2ui-input:focus { outline: none; border-color: var(--a2ui-primary); box-shadow: 0 0 0 3px var(--accent-ring); }
.a2ui-input.err { border-color: oklch(0.6 0.18 25); }
.a2ui-textarea { resize: vertical; min-height: 64px; line-height: 1.5; }
.a2ui-err { font-size: 11.5px; color: oklch(0.6 0.18 25); font-weight: 500; }

/* checkbox */
.a2ui-check {
  display: flex; align-items: center; gap: 9px;
  background: none; border: none; padding: 4px 0; text-align: left;
  font-size: 14px; color: var(--text); cursor: pointer;
}
.a2ui-check-box {
  width: 19px; height: 19px; flex: 0 0 19px;
  border: 1.5px solid var(--border-strong); border-radius: 6px;
  display: grid; place-items: center; color: #fff;
  transition: background 0.15s, border-color 0.15s;
}
.a2ui-check.on .a2ui-check-box { background: var(--a2ui-primary); border-color: var(--a2ui-primary); }

/* choice picker (segmented) */
.a2ui-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.a2ui-choice {
  font: inherit; font-size: 13.5px; font-weight: 500;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 9px; padding: 8px 14px;
  transition: all 0.14s; cursor: pointer;
}
.a2ui-choice:hover { border-color: var(--a2ui-primary); color: var(--text); }
.a2ui-choice.on {
  color: var(--a2ui-primary); font-weight: 600;
  border-color: var(--a2ui-primary);
  background: color-mix(in oklch, var(--a2ui-primary) 12%, transparent);
}

/* slider */
.a2ui-slider { display: flex; flex-direction: column; gap: 6px; }
.a2ui-slider-row { display: flex; align-items: center; gap: 12px; }
.a2ui-slider input[type=range] {
  flex: 1 1; -webkit-appearance: none; -moz-appearance: none; appearance: none; height: 6px; border-radius: 999px;
  background: linear-gradient(to right, var(--a2ui-primary) var(--a2ui-fill, 0%), var(--border-strong) var(--a2ui-fill, 0%));
}
.a2ui-slider input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
          appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--a2ui-primary);
  box-shadow: var(--shadow-sm); cursor: pointer;
}
.a2ui-slider-val {
  font-family: "JetBrains Mono", monospace; font-size: 13px; font-weight: 600;
  color: var(--text); min-width: 34px; text-align: right;
}

/* buttons */
.a2ui-btn {
  font: inherit; font-size: 14px; font-weight: 600;
  border-radius: 10px; padding: 10px 18px;
  border: 1px solid transparent; transition: all 0.14s;
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  cursor: pointer;
}
.a2ui-btn-primary { background: var(--a2ui-primary); color: #fff; }
.a2ui-btn-primary:hover:not(:disabled) { filter: brightness(1.1); }
.a2ui-btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.a2ui-btn-secondary:hover:not(:disabled) { border-color: var(--a2ui-primary); color: var(--a2ui-primary); }
.a2ui-btn-borderless { background: none; color: var(--text-muted); }
.a2ui-btn-borderless:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.a2ui-btn:disabled { opacity: 0.45; cursor: not-allowed; }
[data-theme="dark"] .a2ui-btn-primary { color: oklch(0.18 0.01 260); }

/* tabs */
.a2ui-tabs { display: flex; flex-direction: column; gap: 12px; }
.a2ui-tabbar { display: flex; gap: 4px; border-bottom: 1px solid var(--border); }
.a2ui-tab {
  font: inherit; font-size: 13.5px; font-weight: 500; color: var(--text-muted);
  background: none; border: none; padding: 8px 12px; border-bottom: 2px solid transparent;
  margin-bottom: -1px; cursor: pointer;
}
.a2ui-tab.on { color: var(--a2ui-primary); font-weight: 600; border-bottom-color: var(--a2ui-primary); }

/* modal */
.a2ui-modal-scrim {
  position: fixed; inset: 0; z-index: 90; background: oklch(0.2 0.02 260 / 0.5);
  display: grid; place-items: center; padding: 20px;
}
.a2ui-modal {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 22px; max-width: 460px; width: 100%;
  box-shadow: var(--shadow-lg); max-height: 80vh; overflow-y: auto;
}
.a2ui-modal-close {
  position: absolute; top: 12px; right: 12px; background: none; border: none;
  color: var(--text-muted); display: grid; place-items: center; padding: 4px; border-radius: 7px;
  cursor: pointer;
}
.a2ui-modal-close:hover { background: var(--surface-2); color: var(--text); }

/* skeleton / unknown / streaming */
.a2ui-skeleton { display: flex; flex-direction: column; gap: 10px; padding: 18px; }
.a2ui-skeleton span {
  height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-2), var(--border), var(--surface-2));
  background-size: 200% 100%; animation: a2uiShimmer 1.5s linear infinite;
}
.a2ui-skeleton span:nth-child(1) { width: 60%; }
.a2ui-skeleton span:nth-child(2) { width: 90%; }
.a2ui-skeleton span:nth-child(3) { width: 75%; }
@keyframes a2uiShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.a2ui-unknown {
  font-size: 12px; color: var(--warn); background: var(--surface-2);
  border: 1px dashed var(--border-strong); border-radius: 8px; padding: 8px 10px;
}

@media (prefers-reduced-motion: no-preference) {
  .a2ui-surface { animation: a2uiFadeIn 0.3s ease; }
}
@keyframes a2uiFadeIn { from { transform: translateY(6px); } to { transform: none; } }

@media (max-width: 640px) {
  .a2ui-row { flex-wrap: wrap; }
  .a2ui-row > .a2ui-slot {
    flex: 1 1 min(240px, 100%);
  }
}

/* ============================================================
   Extended catalog: Switch · Select · TagInput · DataTable
   ============================================================ */

.a2ui-card-highlight {
  background: var(--accent-soft);
  border-color: color-mix(in oklch, var(--a2ui-primary) 40%, var(--border));
  flex-direction: row; align-items: center; gap: 12px;
}
.a2ui-card-bare { border: none; background: none; padding: 0; gap: 14px; }

/* Switch */
.a2ui-switch-row { display: flex; align-items: center; gap: 11px; }
.a2ui-switch {
  width: 42px; height: 24px; border-radius: 999px; flex: none;
  background: var(--border-strong); border: none; padding: 0; position: relative;
  transition: background 0.18s; cursor: pointer;
}
.a2ui-switch.on { background: var(--a2ui-primary); }
.a2ui-switch-knob {
  position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow-sm); transition: transform 0.18s;
}
.a2ui-switch.on .a2ui-switch-knob { transform: translateX(18px); }
.a2ui-switch-label { font-size: 13.5px; font-weight: 600; color: var(--text); }

/* Select */
.a2ui-select-wrap { position: relative; display: flex; }
.a2ui-select { -moz-appearance: none; appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer; width: 100%; }
.a2ui-select-chev {
  position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
  pointer-events: none; color: var(--text-faint); display: grid; place-items: center;
  rotate: 90deg;
}

/* TagInput */
.a2ui-taginput { display: flex; align-items: flex-start; gap: 8px; }
.a2ui-tagrow {
  flex: 1 1; min-height: 42px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 9px;
  padding: 6px 8px; transition: border-color 0.15s, box-shadow 0.15s;
}
.a2ui-tagrow:focus-within { border-color: var(--a2ui-primary); box-shadow: 0 0 0 3px var(--accent-ring); }
.a2ui-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12.5px; font-weight: 600; color: var(--a2ui-primary);
  background: color-mix(in oklch, var(--a2ui-primary) 13%, transparent);
  border-radius: 7px; padding: 4px 4px 4px 9px;
}
.a2ui-tag-x { border: none; background: none; color: inherit; opacity: 0.65; display: grid; place-items: center; padding: 1px; border-radius: 4px; cursor: pointer; }
.a2ui-tag-x:hover { opacity: 1; background: color-mix(in oklch, var(--a2ui-primary) 22%, transparent); }
.a2ui-tag-field {
  flex: 1 1; min-width: 90px; border: none; outline: none; background: none;
  font: inherit; font-size: 14px; color: var(--text); padding: 4px 2px;
}
.a2ui-tag-field::placeholder { color: var(--text-faint); }
.a2ui-tag-add {
  flex: none; align-self: stretch; padding: 0 16px; border-radius: 9px;
  border: 1px solid var(--border-strong); background: var(--surface-2);
  color: var(--text); font-size: 13.5px; font-weight: 600; transition: all 0.14s; cursor: pointer;
}
.a2ui-tag-add:hover { border-color: var(--a2ui-primary); color: var(--a2ui-primary); }
.a2ui-tag-sugg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.a2ui-tag-chip {
  font-size: 12px; font-weight: 500; color: var(--text-muted);
  background: var(--surface-2); border: 1px dashed var(--border-strong);
  border-radius: 7px; padding: 4px 9px; transition: all 0.14s; cursor: pointer;
}
.a2ui-tag-chip:hover { border-style: solid; border-color: var(--a2ui-primary); color: var(--a2ui-primary); }

/* FileUpload */
.a2ui-file-meta {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}
.a2ui-file-meta strong {
  color: var(--text);
}
.a2ui-file-meta span {
  color: var(--text-faint);
  margin: 0 6px;
}
.a2ui-file-drop {
  position: relative;
  display: grid;
  place-items: center;
  grid-gap: 8px;
  gap: 8px;
  min-height: 124px;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}
.a2ui-file-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.a2ui-file-ico {
  display: grid;
  place-items: center;
  color: var(--a2ui-primary);
}
.a2ui-file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.a2ui-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 7px 5px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}
.a2ui-file-chip button {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-faint);
}
.a2ui-file-chip button:hover {
  background: var(--surface-2);
  color: var(--text);
}

/* WeeklyScheduleCard */
.a2ui-week-card {
  width: min(770px, 100%);
  padding: 19px 17px 17px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
}
.a2ui-week-title {
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: 0;
}
.a2ui-week-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 20px;
  padding-left: 24px;
}
.a2ui-week-month {
  color: oklch(0.2 0.025 260);
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.a2ui-week-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  width: 171px;
  height: 42px;
  padding: 4px;
  border: 1px solid oklch(0.83 0.006 260);
  border-radius: 9px;
  background: #fff;
}
.a2ui-week-tabs button {
  min-width: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: oklch(0.18 0.018 260);
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
}
.a2ui-week-tabs button.on {
  background: #000;
  color: #fff;
}
.a2ui-week-body {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  grid-gap: 6px;
  gap: 6px;
  margin-top: 10px;
}
.a2ui-week-nav {
  display: grid;
  place-items: center;
  width: 18px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1f4b6c;
  transform: rotate(180deg);
}
.a2ui-week-nav svg {
  width: 16px;
  height: 16px;
}
.a2ui-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-width: 0;
  overflow: hidden;
  border: 1px solid oklch(0.89 0.008 250);
  border-radius: 4px;
  background: #fff;
}
.a2ui-week-day {
  min-width: 0;
  height: 196px;
  border-right: 1px solid oklch(0.89 0.008 250);
  background: #fff;
}
.a2ui-week-day:last-child {
  border-right: 0;
}
.a2ui-week-day-num {
  display: flex;
  justify-content: center;
  height: 34px;
  padding-top: 7px;
  color: oklch(0.18 0.018 260);
  font-size: 15px;
  font-weight: 850;
  line-height: 1;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.a2ui-week-day.sat .a2ui-week-day-num {
  color: #009dff;
}
.a2ui-week-day.sun .a2ui-week-day-num {
  color: #ff3b3b;
}
.a2ui-week-day.today .a2ui-week-day-num span {
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 24px;
  padding: 0 5px;
  border-radius: 999px;
  background: oklch(0.22 0.02 230);
  color: #fff;
}
.a2ui-week-items {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.a2ui-week-event {
  --a2ui-week-event-bg: #ffe5bf;
  min-width: 0;
  height: 24px;
  padding: 5px 7px 0;
  overflow: hidden;
  background: var(--a2ui-week-event-bg);
  color: #111;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
[data-theme="dark"] .a2ui-week-month,
[data-theme="dark"] .a2ui-week-day-num {
  color: var(--text);
}
[data-theme="dark"] .a2ui-week-tabs,
[data-theme="dark"] .a2ui-week-grid,
[data-theme="dark"] .a2ui-week-day {
  background: var(--surface);
  border-color: var(--border);
}

@media (max-width: 760px) {
  .a2ui-week-card {
    padding: 17px 12px 14px;
  }
  .a2ui-week-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding-left: 0;
  }
  .a2ui-week-body {
    grid-template-columns: 1fr;
  }
  .a2ui-week-nav {
    display: none;
  }
  .a2ui-week-grid {
    overflow-x: auto;
    grid-template-columns: repeat(7, minmax(86px, 1fr));
  }
}

/* BarChart */
.a2ui-bar-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 14px;
}
.a2ui-bar-row {
  display: grid;
  grid-template-columns: minmax(96px, 160px) minmax(120px, 1fr) minmax(68px, auto);
  align-items: center;
  grid-gap: 12px;
  gap: 12px;
  min-height: 32px;
}
.a2ui-bar-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 650;
}
.a2ui-bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.a2ui-bar-fill {
  height: 100%;
  min-width: 3px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--a2ui-primary), var(--accent-strong));
}
.a2ui-bar-value {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 6px;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 700;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.a2ui-bar-value strong {
  color: var(--text);
  font-size: 13px;
}
.a2ui-bar-value span {
  color: var(--a2ui-primary);
}

/* ActvScoreSummaryCard */
.a2ui-actv-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(240px, 1fr);
  grid-gap: 24px;
  gap: 24px;
  width: min(948px, 100%);
  padding: 32px 28px;
  border-radius: 12px;
  background: oklch(0.955 0 0);
  color: oklch(0.25 0.015 260);
}
.a2ui-actv-score,
.a2ui-actv-counts {
  min-width: 0;
}
.a2ui-actv-title {
  color: oklch(0.31 0.012 260);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
}
.a2ui-actv-main {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 11px;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.a2ui-actv-main strong {
  color: #d30707;
  font-size: 60px;
  font-weight: 850;
  line-height: 0.92;
}
.a2ui-actv-main span {
  color: oklch(0.42 0.014 260);
  font-size: 21px;
  font-weight: 700;
  white-space: nowrap;
}
.a2ui-actv-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 28px;
  padding: 0 9px;
  border-radius: 4px;
  color: #fff;
  font-size: 13px;
  font-style: normal;
  font-weight: 850;
  line-height: 1;
}
.a2ui-actv-badge.bad,
.a2ui-actv-count-label.bad {
  background: #d30707;
}
.a2ui-actv-badge.caution,
.a2ui-actv-count-label.caution {
  background: #f5ad00;
}
.a2ui-actv-badge.good,
.a2ui-actv-count-label.good {
  background: #3fc56a;
}
.a2ui-actv-badge.etc,
.a2ui-actv-count-label.etc {
  background: #677286;
}
.a2ui-actv-prev {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 24px;
  color: oklch(0.37 0.025 260);
  font-size: 13px;
  font-weight: 750;
}
.a2ui-actv-prev span {
  color: oklch(0.42 0.04 255);
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
}
.a2ui-actv-prev b {
  font-weight: 850;
}
.a2ui-actv-average {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 19px;
  color: oklch(0.28 0.014 260);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}
.a2ui-actv-people {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 18px;
  color: oklch(0.43 0.015 260);
}
.a2ui-actv-people svg {
  width: 18px;
  height: 18px;
}
.a2ui-actv-average strong {
  font-weight: 850;
  white-space: nowrap;
}
.a2ui-actv-average b {
  font-weight: 900;
  white-space: nowrap;
}
.a2ui-actv-average b.bad {
  color: #d30707;
}
.a2ui-actv-average b.good {
  color: #18864a;
}
.a2ui-actv-count-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 8px;
  gap: 8px;
  margin-top: 12px;
}
.a2ui-actv-count-box {
  min-width: 0;
  height: 86px;
  padding: 8px;
  border: 1px solid oklch(0.87 0.004 260);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 1px 1px oklch(0.2 0.01 260 / 0.03);
}
.a2ui-actv-count-label {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  min-width: 0;
  border-radius: 4px;
  color: #fff;
  font-size: 12.5px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}
.a2ui-actv-count-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 1px;
  margin-top: 11px;
  color: oklch(0.2 0.014 260);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.a2ui-actv-count-value strong {
  font-size: 21px;
  font-weight: 900;
  line-height: 1;
}
.a2ui-actv-count-value span {
  font-size: 18px;
  font-weight: 850;
}

[data-theme="dark"] .a2ui-actv-card {
  background: oklch(0.27 0.01 260);
  color: var(--text);
}
[data-theme="dark"] .a2ui-actv-title,
[data-theme="dark"] .a2ui-actv-main span,
[data-theme="dark"] .a2ui-actv-prev,
[data-theme="dark"] .a2ui-actv-average {
  color: var(--text);
}
[data-theme="dark"] .a2ui-actv-count-box {
  background: var(--surface);
  border-color: var(--border-strong);
}

@media (max-width: 760px) {
  .a2ui-actv-card {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 24px 20px;
  }
  .a2ui-actv-main {
    flex-wrap: wrap;
  }
  .a2ui-actv-main strong {
    font-size: 52px;
  }
  .a2ui-actv-average {
    flex-wrap: wrap;
  }
  .a2ui-actv-count-grid {
    grid-template-columns: repeat(2, minmax(96px, 1fr));
  }
}

/* PendingApprovalListCard */
.a2ui-approval-card {
  width: min(584px, 100%);
  background: var(--surface);
}
.a2ui-approval-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 54px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
}
.a2ui-approval-title {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 4px;
  color: var(--text);
  font-size: 16px;
  font-weight: 850;
  letter-spacing: 0;
}
.a2ui-approval-title span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.a2ui-approval-title strong {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  background: #139df2;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.a2ui-approval-updated {
  flex: 0 0 auto;
  color: var(--text-faint);
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
}
.a2ui-approval-body {
  padding: 11px 18px 16px;
}
.a2ui-approval-desc {
  color: var(--text-faint);
  font-size: 12.5px;
  font-weight: 750;
  line-height: 1.35;
  margin-bottom: 12px;
}
.a2ui-approval-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 221px;
  overflow-y: auto;
  padding-right: 7px;
  scrollbar-color: oklch(0.78 0 0) transparent;
  scrollbar-width: thin;
}
.a2ui-approval-list::-webkit-scrollbar {
  width: 6px;
}
.a2ui-approval-list::-webkit-scrollbar-track {
  background: transparent;
}
.a2ui-approval-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: oklch(0.78 0 0);
}
.a2ui-approval-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  grid-gap: 14px;
  gap: 14px;
  min-height: 65px;
  padding: 10px 12px 10px 9px;
  border: 1.5px solid #ffb51d;
  border-radius: 8px;
  background: #fffdf4;
}
.a2ui-approval-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.a2ui-approval-main strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.a2ui-approval-main span {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.a2ui-approval-main b {
  color: #f28c00;
  font-weight: 850;
}
.a2ui-approval-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 65px;
  height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}
.a2ui-approval-pill i {
  position: relative;
  width: 13px;
  height: 13px;
  border: 1.7px solid currentColor;
  border-radius: 999px;
}
.a2ui-approval-pill i::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 2px;
  width: 5px;
  height: 3px;
  border-left: 1.7px solid currentColor;
  border-bottom: 1.7px solid currentColor;
  transform: rotate(-45deg);
}
.a2ui-approval-pill.approval {
  color: #1f6dff;
  background: #dbeafe;
}
.a2ui-approval-pill.confirm {
  color: #10b981;
  background: #dcfce7;
}
.a2ui-approval-empty {
  display: grid;
  place-items: center;
  min-height: 92px;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  color: var(--text-faint);
  font-size: 13px;
  font-weight: 750;
}

[data-theme="dark"] .a2ui-approval-item {
  background: oklch(0.26 0.03 78);
  border-color: oklch(0.76 0.15 76);
}
[data-theme="dark"] .a2ui-approval-pill.approval {
  color: oklch(0.72 0.17 260);
  background: oklch(0.32 0.08 260);
}
[data-theme="dark"] .a2ui-approval-pill.confirm {
  color: oklch(0.72 0.17 155);
  background: oklch(0.31 0.08 155);
}

/* AccidentListCard */
.a2ui-accident-card {
  width: min(676px, 100%);
  padding: 16px 17px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.a2ui-accident-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 0 16px;
  background: transparent;
}
.a2ui-accident-head strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.2;
}
.a2ui-accident-head span {
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 800;
}
.a2ui-accident-table-wrap {
  overflow: auto;
  max-height: 354px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  scrollbar-color: oklch(0.78 0 0) transparent;
  scrollbar-width: thin;
}
.a2ui-accident-table-wrap::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.a2ui-accident-table-wrap::-webkit-scrollbar-track {
  background: transparent;
}
.a2ui-accident-table-wrap::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: oklch(0.78 0 0);
}
.a2ui-accident-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}
.a2ui-accident-table th {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1;
  min-width: 148px;
  padding: 13px 14px;
  background: #0064b7;
  border-right: 1px solid color-mix(in oklch, #fff 18%, transparent);
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  text-align: left;
  white-space: nowrap;
}
.a2ui-accident-table th:nth-child(2) {
  min-width: 100px;
}
.a2ui-accident-table th:nth-child(3) {
  min-width: 160px;
}
.a2ui-accident-table th:nth-child(4) {
  min-width: 230px;
}
.a2ui-accident-table td {
  max-width: 260px;
  overflow: hidden;
  padding: 18px 14px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.a2ui-accident-table tbody tr:nth-child(even) td {
  background: var(--surface-2);
}
.a2ui-accident-empty {
  height: 96px;
  text-align: center;
  color: var(--text-faint);
}
[data-theme="dark"] .a2ui-accident-table th {
  background: oklch(0.46 0.14 250);
}

/* CompletionGaugeCard */
.a2ui-completion-card {
  width: min(262px, 100%);
  background: var(--surface);
  overflow: hidden;
}
.a2ui-completion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 55px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}
.a2ui-completion-title {
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
}
.a2ui-completion-chev {
  display: inline-grid;
  place-items: center;
  color: var(--text-faint);
}
.a2ui-completion-body {
  padding: 22px 20px 25px;
}
.a2ui-completion-gauge {
  --a2ui-tip-x: 50%;
  --a2ui-tip-y: 0px;
  position: relative;
  width: 198px;
  height: 104px;
  margin: 0 auto 12px;
  overflow: hidden;
  outline: none;
}
.a2ui-completion-svg {
  position: absolute;
  inset: 0;
  width: 198px;
  height: 104px;
}
.a2ui-completion-track,
.a2ui-completion-arc,
.a2ui-completion-hit {
  fill: none;
  stroke-linecap: butt;
}
.a2ui-completion-track {
  stroke: oklch(0.93 0 0);
  stroke-width: 32;
}
.a2ui-completion-arc.done {
  stroke: var(--a2ui-primary);
  stroke-width: 32;
}
.a2ui-completion-hit {
  stroke: transparent;
  stroke-width: 38;
  cursor: default;
  outline: none;
  pointer-events: stroke;
}
.a2ui-completion-hit:focus-visible {
  stroke: color-mix(in oklch, var(--a2ui-primary) 12%, transparent);
}
.a2ui-completion-value {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  color: var(--text);
  font-weight: 800;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.a2ui-completion-value strong {
  color: var(--a2ui-primary);
  font-size: 34px;
  line-height: 1;
}
.a2ui-completion-value span {
  font-size: 16px;
}
.a2ui-completion-tooltip {
  position: absolute;
  left: var(--a2ui-tip-x);
  top: var(--a2ui-tip-y);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 82px;
  padding: 6px 9px 7px;
  border-radius: 4px;
  background: oklch(0.22 0.03 225);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  box-shadow: 0 7px 18px oklch(0.18 0.02 240 / 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}
.a2ui-completion-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 10px;
  height: 10px;
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
}
.a2ui-completion-tooltip span:first-child {
  color: oklch(0.91 0.02 220);
}
.a2ui-completion-tooltip span:last-child {
  color: #fff;
}
.a2ui-completion-tooltip.on {
  opacity: 1;
  transform: translate(-50%, 0);
}
.a2ui-completion-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.a2ui-completion-stat {
  display: grid;
  grid-template-columns: 8px 1fr auto auto;
  align-items: center;
  grid-column-gap: 8px;
  column-gap: 8px;
  color: var(--text);
  font-size: 13px;
  line-height: 1;
}
.a2ui-completion-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--text);
}
.a2ui-completion-dot.primary {
  background: var(--a2ui-primary);
}
.a2ui-completion-dot.muted {
  background: oklch(0.78 0 0);
}
.a2ui-completion-label {
  min-width: 0;
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}
.a2ui-completion-stat strong {
  color: var(--a2ui-primary);
  font-size: 15px;
  font-weight: 800;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.a2ui-completion-stat strong.muted {
  color: oklch(0.66 0 0);
}
.a2ui-completion-stat.total strong {
  color: var(--text);
}
.a2ui-completion-unit {
  color: var(--text-faint);
  font-size: 13px;
  font-weight: 600;
}
.a2ui-completion-rule {
  height: 1px;
  background: var(--border);
}

[data-theme="dark"] .a2ui-completion-gauge::before {
  content: none;
}
[data-theme="dark"] .a2ui-completion-track {
  stroke: oklch(0.32 0.01 260);
}

/* OpertPlanStatusCard */
.a2ui-opert-card {
  width: min(540px, 100%);
  overflow: visible;
  background: var(--surface);
}
.a2ui-opert-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
}
.a2ui-opert-title {
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
}
.a2ui-opert-chev {
  display: inline-grid;
  place-items: center;
  color: var(--text-faint);
}
.a2ui-opert-body {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(210px, 1fr);
  grid-gap: 56px;
  gap: 56px;
  padding: 19px 18px 16px;
}
.a2ui-opert-left,
.a2ui-opert-right {
  min-width: 0;
}
.a2ui-opert-section-title {
  color: var(--text);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 25px;
}
.a2ui-opert-wait {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: baseline;
  grid-column-gap: 2px;
  column-gap: 2px;
  min-height: 35px;
  color: var(--text);
  outline: none;
}
.a2ui-opert-wait span {
  font-size: 14px;
  font-weight: 700;
}
.a2ui-opert-wait strong {
  color: oklch(0.73 0 0);
  font-size: 32px;
  font-weight: 850;
  line-height: 1;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.a2ui-opert-wait em,
.a2ui-opert-status em {
  color: var(--text-faint);
  font-style: normal;
  font-size: 13px;
  font-weight: 650;
}
.a2ui-opert-divider {
  height: 1px;
  background: var(--border);
  margin: 15px 0 14px;
}
.a2ui-opert-status-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.a2ui-opert-status {
  position: relative;
  display: grid;
  grid-template-columns: 8px 1fr auto auto;
  align-items: center;
  grid-column-gap: 10px;
  column-gap: 10px;
  line-height: 1;
  outline: none;
}
.a2ui-opert-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}
.a2ui-opert-label {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.a2ui-opert-status strong {
  font-size: 14px;
  font-weight: 850;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.a2ui-opert-right {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.a2ui-opert-right .a2ui-opert-section-title {
  align-self: stretch;
}
.a2ui-opert-donut {
  --a2ui-opert-donut: oklch(0.93 0 0);
  --a2ui-opert-empty: oklch(0.93 0 0);
  position: relative;
  width: 150px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--a2ui-opert-donut);
  display: grid;
  place-items: center;
  outline: none;
}
.a2ui-opert-donut::before {
  content: "";
  position: absolute;
  inset: 27px;
  border-radius: 50%;
  background: var(--surface);
}
.a2ui-opert-donut-hole {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  color: var(--text);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.a2ui-opert-donut-hole strong {
  font-size: 32px;
  font-weight: 850;
  line-height: 1;
}
.a2ui-opert-donut-hole span {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}
.a2ui-opert-format-list {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 12px;
}
.a2ui-opert-format {
  position: relative;
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  grid-column-gap: 8px;
  column-gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
  outline: none;
}
.a2ui-opert-format strong {
  color: var(--text);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.a2ui-opert-note {
  align-self: flex-end;
  color: var(--text-faint);
  font-size: 11.5px;
  font-weight: 700;
  margin-top: 20px;
}
.a2ui-opert-tip-host {
  cursor: default;
}
.a2ui-opert-tip-host:focus-visible,
.a2ui-opert-donut:focus-visible {
  box-shadow: 0 0 0 2px color-mix(in oklch, var(--a2ui-primary) 45%, transparent);
  border-radius: 4px;
}
.a2ui-opert-tooltip {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 86px;
  padding: 6px 9px 7px;
  border-radius: 4px;
  background: oklch(0.22 0.03 225);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 7px 18px oklch(0.18 0.02 240 / 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}
.a2ui-opert-tooltip::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: -5px;
  width: 10px;
  height: 10px;
  background: inherit;
  transform: rotate(45deg);
}
.a2ui-opert-tooltip span:first-child {
  color: oklch(0.91 0.02 220);
}
.a2ui-opert-tip-host:hover .a2ui-opert-tooltip,
.a2ui-opert-tip-host:focus-visible .a2ui-opert-tooltip,
.a2ui-opert-donut:hover .a2ui-opert-tooltip,
.a2ui-opert-donut:focus-visible .a2ui-opert-tooltip {
  opacity: 1;
  transform: translateY(0);
}
.a2ui-opert-donut-tooltip {
  left: 50%;
  right: auto;
  bottom: calc(100% + 10px);
  transform: translate(-50%, -4px);
}
.a2ui-opert-donut-tooltip::after {
  right: auto;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
}
.a2ui-opert-donut:hover .a2ui-opert-donut-tooltip,
.a2ui-opert-donut:focus-visible .a2ui-opert-donut-tooltip {
  transform: translate(-50%, 0);
}

[data-theme="dark"] .a2ui-opert-donut,
[data-theme="dark"] .a2ui-opert-donut[style] {
  --a2ui-opert-empty: oklch(0.32 0.01 260);
}

/* OpertStopStatusCard */
.a2ui-stop-card {
  width: min(262px, 100%);
  overflow: hidden;
  background: var(--surface);
}
.a2ui-stop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 55px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}
.a2ui-stop-title {
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
}
.a2ui-stop-chev {
  display: inline-grid;
  place-items: center;
  color: var(--text-faint);
}
.a2ui-stop-body {
  padding: 27px 16px 25px;
}
.a2ui-stop-section-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 25px;
}
.a2ui-stop-wait {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
}
.a2ui-stop-siren {
  position: relative;
  width: 28px;
  height: 28px;
  color: var(--a2ui-primary);
}
.a2ui-stop-siren::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 2px;
  width: 14px;
  height: 18px;
  border: 2.5px solid currentColor;
  border-bottom: none;
  border-radius: 12px 12px 3px 3px;
}
.a2ui-stop-siren::after {
  content: "";
  position: absolute;
  left: 2px;
  bottom: 2px;
  width: 24px;
  height: 7px;
  border: 2.5px solid currentColor;
  border-radius: 4px 4px 2px 2px;
}
.a2ui-stop-siren {
  background:
    linear-gradient(currentColor, currentColor) 13px 7px / 2px 8px no-repeat,
    linear-gradient(currentColor, currentColor) 6px 0 / 2px 6px no-repeat;
}
.a2ui-stop-count {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.a2ui-stop-count strong {
  color: var(--a2ui-primary);
  font-size: 32px;
  font-weight: 850;
  line-height: 1;
}
.a2ui-stop-count span {
  color: var(--text-faint);
  font-size: 13px;
  font-weight: 700;
}
.a2ui-stop-divider {
  height: 1px;
  background: var(--border);
  margin: 18px 0 10px;
}
.a2ui-stop-total-label {
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}
.a2ui-stop-stack-wrap {
  --a2ui-stop-tip-x: 50%;
  position: relative;
  padding-top: 36px;
  margin-top: -26px;
}
.a2ui-stop-stack {
  display: flex;
  width: 100%;
  height: 16px;
  overflow: hidden;
  border-radius: 5px;
  background: oklch(0.68 0 0);
}
.a2ui-stop-stack span {
  display: block;
  min-width: 0;
  height: 100%;
  outline: none;
}
.a2ui-stop-stack .waiting {
  background: var(--a2ui-primary);
}
.a2ui-stop-stack .approval {
  background: oklch(0.29 0.03 220);
}
.a2ui-stop-stack .reserved {
  background: oklch(0.68 0 0);
}
.a2ui-stop-stack span:focus-visible {
  box-shadow: inset 0 0 0 2px color-mix(in oklch, #fff 70%, transparent);
}
.a2ui-stop-tooltip {
  position: absolute;
  left: var(--a2ui-stop-tip-x);
  top: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 78px;
  padding: 6px 9px 7px;
  border-radius: 4px;
  background: oklch(0.22 0.03 225);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  box-shadow: 0 7px 18px oklch(0.18 0.02 240 / 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}
.a2ui-stop-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 10px;
  height: 10px;
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
}
.a2ui-stop-tooltip span:first-child {
  color: oklch(0.91 0.02 220);
}
.a2ui-stop-tooltip.on {
  opacity: 1;
  transform: translate(-50%, 0);
}
.a2ui-stop-legend {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 18px;
}
.a2ui-stop-legend-row {
  display: grid;
  grid-template-columns: 8px 1fr auto auto;
  align-items: center;
  grid-column-gap: 8px;
  column-gap: 8px;
  color: var(--text);
  font-size: 13px;
  line-height: 1;
}
.a2ui-stop-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}
.a2ui-stop-dot.approval {
  background: #000;
}
.a2ui-stop-dot.reserved {
  background: oklch(0.7 0 0);
}
.a2ui-stop-legend-row span:nth-child(2) {
  font-weight: 700;
}
.a2ui-stop-legend-row strong {
  font-size: 15px;
  font-weight: 850;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.a2ui-stop-legend-row em {
  color: var(--text-faint);
  font-style: normal;
  font-size: 13px;
  font-weight: 650;
}
.a2ui-stop-legend-row.muted,
.a2ui-stop-legend-row.muted strong {
  color: oklch(0.66 0 0);
}

[data-theme="dark"] .a2ui-stop-stack .approval {
  background: oklch(0.78 0.02 220);
}
[data-theme="dark"] .a2ui-stop-dot.approval {
  background: oklch(0.95 0 0);
}

/* DataTable */
.a2ui-table-wrap {
  overflow-x: auto; overflow-y: auto; max-height: 540px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface);
}
.a2ui-table { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: 12.5px; }
.a2ui-table thead th {
  position: -webkit-sticky;
  position: sticky; top: 0; z-index: 3;
  background: var(--accent-strong); color: #fff;
  font-size: 11.5px; font-weight: 700; text-align: left;
  padding: 11px 12px; white-space: nowrap;
  border-right: 1px solid color-mix(in oklch, #fff 16%, transparent);
}
[data-theme="dark"] .a2ui-table thead th { color: oklch(0.96 0.01 260); }
.a2ui-table thead th.col-risk, .a2ui-table thead th.col-arrowrisk,
.a2ui-table thead th.col-index, .a2ui-table thead th.col-status { text-align: center; }
.a2ui-table tbody td {
  padding: 11px 12px; vertical-align: top; line-height: 1.5;
  border-bottom: 1px solid var(--border); border-right: 1px solid var(--border);
  color: var(--text);
}
.a2ui-table tbody tr:nth-child(even) td { background: var(--surface-2); }
.a2ui-table tbody tr:hover td { background: var(--accent-soft); }
.a2ui-table tbody tr.row-excluded td { opacity: 0.4; text-decoration: line-through; -webkit-text-decoration-color: var(--text-faint); text-decoration-color: var(--text-faint); }
.a2ui-table tbody tr.row-excluded .risk-badge,
.a2ui-table tbody tr.row-excluded .ppe-tag,
.a2ui-table tbody tr.row-excluded .status-pill { text-decoration: none; }

.cell-index { text-align: center; color: var(--text-faint); font-weight: 700; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.cell-text { font-weight: 500; }
.cell-para { color: var(--text-muted); font-size: 12px; }
.cell-risk { text-align: center; }
.cell-risk.arrowcol { background: color-mix(in oklch, var(--success) 7%, transparent) !important; }
.risk-badge {
  display: inline-grid; place-items: center; min-width: 28px; height: 24px; padding: 0 7px;
  border-radius: 7px; font-weight: 800; font-size: 12px;
}
.risk-badge.hi { background: oklch(0.62 0.2 25 / 0.16); color: oklch(0.55 0.2 25); }
.risk-badge.mid { background: oklch(0.74 0.15 70 / 0.2); color: oklch(0.56 0.14 60); }
.risk-badge.lo { background: oklch(0.62 0.14 155 / 0.16); color: oklch(0.48 0.13 155); }
[data-theme="dark"] .risk-badge.hi { color: oklch(0.78 0.16 25); }
[data-theme="dark"] .risk-badge.mid { color: oklch(0.83 0.13 75); }
[data-theme="dark"] .risk-badge.lo { color: oklch(0.78 0.14 155); }

.status-pill {
  font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 3px 11px;
  border: 1px solid transparent; white-space: nowrap; cursor: pointer;
}
.status-pill.st-draft { background: var(--surface); border-color: var(--border-strong); color: var(--text-muted); }
.status-pill.st-rev { background: oklch(0.74 0.15 70 / 0.16); color: oklch(0.54 0.14 60); }
.status-pill.st-ok { background: oklch(0.62 0.14 155 / 0.16); color: oklch(0.46 0.13 155); }

.ppe-wrap { display: flex; flex-wrap: wrap; gap: 4px; }
.ppe-tag {
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 6px; padding: 2px 7px; white-space: nowrap;
}
.a2ui-select-wrap.mini { display: inline-flex; }
.mini-select {
  -moz-appearance: none;
       appearance: none; -webkit-appearance: none; font: inherit; font-size: 12px;
  color: var(--text); background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 7px; padding: 5px 26px 5px 9px; cursor: pointer; width: 100%;
}
.a2ui-select-wrap.mini .a2ui-select-chev { right: 8px; }
.cell-actions { white-space: nowrap; }
.cell-actions button {
  width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-muted); display: inline-grid; place-items: center;
  margin-right: 4px; transition: all 0.13s; cursor: pointer;
}
.cell-actions button:hover { border-color: var(--a2ui-primary); color: var(--a2ui-primary); }
.cell-actions button.on { border-color: var(--warn); color: var(--warn); background: oklch(0.74 0.13 70 / 0.12); }
.cell-actions button.del:hover { border-color: oklch(0.6 0.2 25); color: oklch(0.58 0.2 25); background: oklch(0.6 0.2 25 / 0.1); }

@media (max-width: 520px) {
  .a2ui-surface {
    border-radius: 12px;
  }
  .a2ui-surface > .a2ui-col,
  .a2ui-surface > .a2ui-row,
  .a2ui-surface > .a2ui-card,
  .a2ui-surface > .a2ui-list,
  .a2ui-surface > .a2ui-text {
    padding: 12px;
  }
  .a2ui-taginput {
    flex-direction: column;
  }
  .a2ui-tag-add {
    align-self: flex-start;
    min-height: 38px;
  }
  .a2ui-week-tabs {
    width: 100%;
  }
  .a2ui-week-day {
    height: 168px;
  }
  .a2ui-actv-card {
    padding: 20px 14px;
  }
  .a2ui-actv-main strong {
    font-size: 46px;
  }
  .a2ui-actv-count-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .a2ui-actv-count-label {
    font-size: 11.5px;
  }
  .a2ui-approval-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    height: auto;
    padding: 12px 14px;
  }
  .a2ui-approval-updated {
    white-space: normal;
  }
  .a2ui-approval-body {
    padding: 10px 14px 14px;
  }
  .a2ui-approval-item {
    grid-template-columns: 1fr;
    align-items: flex-start;
    gap: 9px;
  }
  .a2ui-approval-pill {
    justify-self: start;
  }
  .a2ui-accident-head {
    padding-bottom: 10px;
  }
  .a2ui-accident-card {
    padding: 12px;
  }
  .a2ui-accident-table th,
  .a2ui-accident-table td {
    padding-left: 10px;
    padding-right: 10px;
  }
  .a2ui-accident-table th {
    min-width: 92px;
  }
  .a2ui-accident-table th:nth-child(3) {
    min-width: 138px;
  }
  .a2ui-accident-table th:nth-child(4) {
    min-width: 210px;
  }
  .a2ui-completion-body,
  .a2ui-stop-body {
    padding-left: 14px;
    padding-right: 14px;
  }
  .a2ui-completion-label,
  .a2ui-opert-label {
    white-space: normal;
  }
  .a2ui-opert-head,
  .a2ui-stop-head,
  .a2ui-completion-head {
    height: auto;
    min-height: 50px;
    padding: 12px 14px;
  }
  .a2ui-opert-title,
  .a2ui-stop-title,
  .a2ui-completion-title {
    font-size: 15px;
    line-height: 1.3;
  }
  .a2ui-opert-body {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 16px 14px;
  }
  .a2ui-opert-right {
    align-items: stretch;
  }
  .a2ui-opert-donut {
    margin: 0 auto;
  }
  .a2ui-bar-row {
    grid-template-columns: 1fr auto;
    gap: 6px 10px;
  }
  .a2ui-bar-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/*!*****************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[3]!./src/app/globals.css ***!
  \*****************************************************************************************************************************************************************************************************************************************************************/
* { box-sizing: border-box; }
html, body, #__next { height: 100%; margin: 0; }
html { overflow-x: hidden; }
body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
button { font-family: inherit; cursor: pointer; }
a { text-decoration: none; }
::selection { background: var(--accent-ring); }

*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb {
  background: oklch(0.6 0.01 260 / 0.32);
  border-radius: 8px;
  border: 3px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: oklch(0.5 0.01 260 / 0.45); background-clip: padding-box; }
*::-webkit-scrollbar-track { background: transparent; }

/* App shell */
.app {
  display: grid;
  grid-template-columns: var(--sb-w, 280px) 1fr;
  width: 100%;
  max-width: 100vw;
  height: 100vh;
  overflow: hidden;
}
.app.sb-collapsed { --sb-w: 0px; }
.sidebar { transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s; }
.app.sb-collapsed .sidebar { width: 0; opacity: 0; }

/* Sidebar */
.sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
.sb-inner { width: 280px; display: flex; flex-direction: column; height: 100%; }
.sb-top { padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 14px; }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 6px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  position: relative; box-shadow: var(--shadow-sm);
}
.brand-mark::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 11px; height: 11px; border-radius: 3px; transform: rotate(45deg);
  background: oklch(1 0 0 / 0.92);
}
.brand-name { font-weight: 750; font-size: 15.5px; letter-spacing: -0.02em; }
.brand-name b { color: var(--accent); font-weight: 800; }
.brand-sub { font-size: 11px; color: var(--text-faint); letter-spacing: 0.02em; margin-top: 1px; }

.new-chat {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 14px; border-radius: 11px;
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); font-weight: 600; font-size: 14px;
  box-shadow: var(--shadow-sm); transition: all 0.15s;
}
.new-chat:hover { border-color: var(--accent); color: var(--accent); }
.new-chat svg { flex: none; }

.sb-scroll { flex: 1 1; overflow-y: auto; padding: 6px 8px 8px; }
.sb-group-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  color: var(--text-faint); text-transform: uppercase;
  padding: 12px 10px 6px;
}
.hist-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border-radius: 9px; width: 100%;
  border: none; background: transparent; color: var(--text);
  text-align: left; font-size: 13.5px; transition: background 0.12s;
  position: relative; cursor: pointer;
}
.hist-item:hover { background: var(--sidebar-hover); }
.hist-item.active { background: var(--sidebar-active); color: var(--accent); font-weight: 600; }
.hist-item .hi-title { flex: 1 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-item .hi-del {
  opacity: 0; flex: none; border: none; background: transparent;
  color: var(--text-faint); display: grid; place-items: center;
  width: 24px; height: 24px; border-radius: 6px; cursor: pointer;
}
.hist-item:hover .hi-del { opacity: 1; }
.hist-item .hi-del:hover { background: oklch(0.6 0.18 25 / 0.14); color: oklch(0.55 0.2 25); }

.sb-foot { border-top: 1px solid var(--border); padding: 10px 12px; }
.user-row { display: flex; align-items: center; gap: 10px; padding: 6px 6px; border-radius: 10px; cursor: default; }
.user-row:hover { background: var(--sidebar-hover); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: linear-gradient(145deg, oklch(0.7 0.1 200), oklch(0.6 0.12 280));
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px;
}
.user-meta { flex: 1 1; min-width: 0; }
.user-meta .un { font-size: 13px; font-weight: 600; }
.user-meta .ue { font-size: 11px; color: var(--text-faint); }

/* Main column */
.main { display: flex; flex-direction: column; min-width: 0; height: 100%; overflow: hidden; position: relative; background: var(--bg); }
.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-bottom: 1px solid transparent;
  flex: none; z-index: 6;
  min-width: 0;
}
.topbar.scrolled {
  border-bottom-color: var(--border);
  background: color-mix(in oklch, var(--bg) 85%, transparent);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
}
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: none;
  background: transparent; color: var(--text-muted);
  display: grid; place-items: center; transition: all 0.14s; flex: none;
}
.icon-btn:hover { background: var(--sidebar-hover); color: var(--text); }
.model-chip {
  display: flex; align-items: center; gap: 8px; padding: 7px 13px 7px 11px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  font-size: 13.5px; font-weight: 600; color: var(--text); box-shadow: var(--shadow-sm);
  min-width: 0;
}
.model-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px color-mix(in oklch, var(--success) 18%, transparent); flex: none; }
.model-chip .mc-sub { color: var(--text-faint); font-weight: 500; font-size: 12px; }
.topbar .spacer { flex: 1 1; }

/* Thread */
.thread { flex: 1 1; min-width: 0; overflow-x: hidden; overflow-y: auto; scroll-behavior: smooth; }
.thread-inner { width: min(100%, 768px); margin: 0 auto; padding: 18px 24px 160px; }

/* Empty state */
.empty { width: min(100%, 768px); margin: 0 auto; padding: 7vh 24px 160px; }
.empty-hi { font-size: 34px; font-weight: 750; letter-spacing: -0.025em; line-height: 1.2; }
.empty-hi .grad {
  background: linear-gradient(100deg, var(--accent), oklch(0.62 0.16 320), var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.empty-sub { font-size: 16px; color: var(--text-muted); margin-top: 8px; }
.suggest-grid { display: grid; grid-template-columns: 1fr 1fr; grid-gap: 12px; gap: 12px; margin-top: 34px; }
.suggest-card {
  text-align: left; border: 1px solid var(--border); background: var(--surface);
  border-radius: 14px; padding: 16px 16px 14px; transition: all 0.16s;
  display: flex; flex-direction: column; gap: 14px; min-height: 116px;
  box-shadow: var(--shadow-sm);
}
.suggest-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.suggest-card .sc-text { font-size: 14px; line-height: 1.45; color: var(--text); font-weight: 500; }
.suggest-card .sc-ico {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-top: auto;
}
.empty-caps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.cap-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px;
  border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border);
  font-size: 12px; color: var(--text-muted); font-weight: 500;
}

/* Messages */
.msg { margin: 26px 0; }
.msg-user { display: flex; justify-content: flex-end; }
.msg-user .bubble {
  background: var(--user-bubble); border: 1px solid var(--border);
  padding: 12px 16px; border-radius: 16px 16px 4px 16px; max-width: 86%;
  font-size: 15px; white-space: pre-wrap; word-break: break-word;
}
.msg-user .bubble .files { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }

.msg-bot { display: flex; gap: 14px; }
.bot-ava {
  width: 30px; height: 30px; border-radius: 8px; flex: none; margin-top: 2px;
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  position: relative;
}
.bot-ava::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 9px; height: 9px; border-radius: 2.5px; transform: rotate(45deg); background: oklch(1 0 0 / 0.92);
}
.bot-ava.thinking { animation: pulseAva 1.4s ease-in-out infinite; }
@keyframes pulseAva { 0%,100% { box-shadow: 0 0 0 0 var(--accent-ring); } 50% { box-shadow: 0 0 0 6px transparent; } }
.bot-body { flex: 1 1; min-width: 0; }
.bot-name { font-weight: 700; font-size: 13px; margin-bottom: 4px; color: var(--text); }

/* Status line */
.status-line { display: flex; align-items: center; gap: 9px; color: var(--accent); font-weight: 600; font-size: 14px; padding: 4px 0; }
.status-line .shimmer {
  background: linear-gradient(90deg, var(--text-muted) 30%, var(--accent) 50%, var(--text-muted) 70%);
  background-size: 200% 100%; -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.spinner {
  width: 15px; height: 15px; border-radius: 50%; flex: none;
  border: 2px solid var(--accent-ring); border-top-color: var(--accent);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* CoT */
.cot {
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2);
  margin: 6px 0 14px; overflow: hidden;
}
.cot-head {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 11px 14px; border: none; background: transparent; color: var(--text);
  font-size: 13.5px; font-weight: 600; text-align: left; cursor: pointer;
}
.cot-head:hover { background: var(--sidebar-hover); }
.cot-head .chev { margin-left: auto; transition: transform 0.2s; color: var(--text-faint); display: grid; }
.cot.open .cot-head .chev { transform: rotate(90deg); }
.cot-head .ct-ico { color: var(--accent); display: grid; }
.cot-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.28s ease; }
.cot.open .cot-body { grid-template-rows: 1fr; }
.cot-body > div { overflow: hidden; }
.cot-steps { padding: 4px 16px 14px 18px; }
.cot-step { position: relative; padding: 8px 0 8px 24px; }
.cot-step::before {
  content: ""; position: absolute; left: 4px; top: 13px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.cot-step::after {
  content: ""; position: absolute; left: 8px; top: 22px; bottom: -8px; width: 1.5px; background: var(--border-strong);
}
.cot-step:last-child::after { display: none; }
.cot-step .cs-title { font-size: 13px; font-weight: 650; }
.cot-step .cs-detail { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; line-height: 1.5; }
.cot-step.pending .cs-title { color: var(--text-faint); }
.cot-step.pending::before { background: var(--border-strong); box-shadow: none; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.35; } }

/* Prose / markdown */
.prose { font-size: 15px; line-height: 1.72; color: var(--text); word-break: break-word; }
.prose > *:first-child { margin-top: 0; }
.prose > *:last-child { margin-bottom: 0; }
.prose p { margin: 0 0 14px; }
.prose h1, .prose h2, .prose h3 { line-height: 1.3; font-weight: 750; letter-spacing: -0.01em; margin: 24px 0 12px; }
.prose h1 { font-size: 22px; } .prose h2 { font-size: 19px; } .prose h3 { font-size: 16.5px; }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 24px; }
.prose li { margin: 5px 0; }
.prose li::marker { color: var(--text-faint); }
.prose strong { font-weight: 700; color: var(--text); }
.prose a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-ring); }
.prose a:hover { border-bottom-color: var(--accent); }
.prose blockquote {
  border-left: 3px solid var(--accent); margin: 0 0 14px; padding: 2px 0 2px 16px;
  color: var(--text-muted);
}
.prose code:not(.hljs) {
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.86em;
  background: var(--code-bg); border: 1px solid var(--border); padding: 1.5px 6px;
  border-radius: 6px; color: oklch(0.5 0.13 320);
}
[data-theme="dark"] .prose code:not(.hljs) { color: oklch(0.82 0.1 320); }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* Tables */
.prose table { border-collapse: collapse; width: 100%; margin: 0 0 16px; font-size: 13.5px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.prose thead th { background: var(--surface-2); font-weight: 700; }
.prose tbody tr:nth-child(even) { background: color-mix(in oklch, var(--surface-2) 50%, transparent); }

/* Code blocks */
.codeblock { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin: 0 0 16px; background: var(--code-bg); box-shadow: var(--shadow-sm); }
.cb-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 14px; background: var(--code-head); border-bottom: 1px solid var(--border); }
.cb-lang { font-family: "JetBrains Mono", monospace; font-size: 11.5px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.04em; }
.cb-copy { margin-left: auto; display: flex; align-items: center; gap: 5px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); border-radius: 7px; padding: 4px 9px; font-size: 12px; font-weight: 600; transition: all 0.14s; cursor: pointer; }
.cb-copy:hover { color: var(--accent); border-color: var(--accent); }
.cb-copy.copied { color: var(--success); border-color: var(--success); }
.codeblock pre { margin: 0; padding: 14px 16px; overflow-x: auto; }
.codeblock code, .codeblock pre { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; line-height: 1.6; }
.hljs-keyword, .hljs-built_in, .hljs-literal { color: var(--hljs-keyword); }
.hljs-string, .hljs-meta-string { color: var(--hljs-string); }
.hljs-number { color: var(--hljs-number); }
.hljs-comment, .hljs-quote { color: var(--hljs-comment); font-style: italic; }
.hljs-title, .hljs-title\.function_, .hljs-section { color: var(--hljs-title); }
.hljs-attr, .hljs-attribute, .hljs-name { color: var(--hljs-attr); }
.hljs-type, .hljs-class .hljs-title { color: var(--hljs-keyword); }
.hljs-meta { color: var(--text-faint); }

/* Citation chip */
.cite {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 4px; margin: 0 1px;
  font-size: 11px; font-weight: 700; line-height: 1; vertical-align: text-top;
  border-radius: 5px; background: var(--accent-soft); color: var(--accent);
  cursor: pointer; transition: all 0.13s; border: 1px solid transparent;
  font-family: "JetBrains Mono", monospace;
}
.cite:hover { background: var(--accent); color: #fff; transform: translateY(-1px); }
.cite.active { background: var(--accent); color: #fff; }

/* Message actions */
.msg-actions { display: flex; gap: 4px; margin-top: 12px; flex-wrap: wrap; }
.act-btn { display: flex; align-items: center; gap: 5px; border: none; background: transparent; color: var(--text-faint); border-radius: 8px; padding: 6px 9px; font-size: 12.5px; font-weight: 500; transition: all 0.13s; cursor: pointer; }
.act-btn:hover { background: var(--sidebar-hover); color: var(--text); }
.act-btn.on { color: var(--accent); }

/* Streaming caret */
.caret { display: inline-block; width: 8px; height: 1.05em; vertical-align: text-bottom; background: var(--accent); margin-left: 2px; border-radius: 1px; animation: caret 1s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* Sources inline summary */
.src-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
.src-summary .ss-label { width: 100%; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; color: var(--text-faint); text-transform: uppercase; margin-bottom: 2px; }
.src-pill { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 7px 11px; max-width: 280px; transition: all 0.15s; box-shadow: var(--shadow-sm); cursor: pointer; }
.src-pill:hover { border-color: var(--accent); transform: translateY(-1px); }
.src-pill .sp-num { width: 18px; height: 18px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; font-family: "JetBrains Mono", monospace; }
.src-pill .sp-ico { color: var(--text-muted); flex: none; display: grid; }
.src-pill .sp-title { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Composer */
.composer-wrap { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 24px 22px; background: linear-gradient(to top, var(--bg) 62%, transparent); pointer-events: none; }
.composer { width: min(100%, 768px); margin: 0 auto; pointer-events: auto; }
.attach-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 9px; }
.attach-chip { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 7px 9px 7px 11px; box-shadow: var(--shadow-sm); }
.attach-chip .ac-ico { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.attach-chip .ac-name { font-size: 12.5px; font-weight: 600; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.attach-chip .ac-meta { font-size: 11px; color: var(--text-faint); }
.attach-chip .ac-x { border: none; background: transparent; color: var(--text-faint); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; cursor: pointer; }
.attach-chip .ac-x:hover { background: var(--sidebar-hover); color: var(--text); }

.input-box {
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 26px;
  box-shadow: var(--shadow-md); padding: 8px; transition: border-color 0.16s, box-shadow 0.16s;
  display: flex; flex-direction: column; gap: 4px;
}
.input-box.focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring), var(--shadow-md); }
.input-box.dragover { border-color: var(--accent); border-style: dashed; background: var(--accent-soft); }
.input-box textarea {
  width: 100%; border: none; background: transparent; resize: none; outline: none;
  font-family: inherit; font-size: 15.5px; line-height: 1.5; color: var(--text);
  padding: 8px 10px 2px; max-height: 220px; overflow-y: auto;
}
.input-box textarea::placeholder { color: var(--text-faint); }
.input-row { display: flex; align-items: center; gap: 4px; padding: 0 4px; }
.in-btn { width: 38px; height: 38px; border-radius: 50%; border: none; background: transparent; color: var(--text-muted); display: grid; place-items: center; transition: all 0.14s; flex: none; cursor: pointer; }
.in-btn:hover { background: var(--sidebar-hover); color: var(--text); }
.in-btn:disabled { color: var(--text-faint); cursor: not-allowed; opacity: 0.55; }
.in-btn:disabled:hover { background: transparent; color: var(--text-faint); }
.in-btn.recording { background: oklch(0.6 0.2 25 / 0.14); color: oklch(0.55 0.22 25); animation: recPulse 1.3s ease-in-out infinite; }
@keyframes recPulse { 50% { box-shadow: 0 0 0 6px oklch(0.6 0.2 25 / 0.1); } }
.in-spacer { flex: 1 1; }
.send-btn { width: 40px; height: 40px; border-radius: 50%; border: none; display: grid; place-items: center; flex: none; transition: all 0.16s; cursor: pointer; }
.send-btn.send { background: var(--accent); color: #fff; }
.send-btn.send:hover { background: var(--accent-strong); transform: scale(1.05); }
.send-btn.send:disabled { background: var(--border-strong); color: var(--text-faint); cursor: not-allowed; transform: none; }
.send-btn.stop { background: var(--text); color: var(--bg); }
.send-btn.stop:hover { transform: scale(1.05); }
.composer-foot { text-align: center; font-size: 11.5px; color: var(--text-faint); margin-top: 10px; }
.rec-hint { text-align: center; font-size: 12.5px; color: oklch(0.55 0.22 25); font-weight: 600; margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 7px; }
.rec-hint.error { color: oklch(0.55 0.2 25); }

/* Source panel */
.src-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 90vw);
  background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg); z-index: 40; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}
.src-panel.open { transform: translateX(0); }
.sp-header { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--border); flex: none; }
.sp-header .sph-title { font-weight: 700; font-size: 15px; }
.sp-header .sph-sub { font-size: 12px; color: var(--text-faint); }
.sp-scroll { flex: 1 1; overflow-y: auto; padding: 16px 18px 24px; }
.src-detail { margin-bottom: 22px; scroll-margin-top: 12px; border-radius: 12px; padding: 4px; }
.src-detail .sd-top { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 12px; }
.src-detail .sd-num { width: 22px; height: 22px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; font-family: "JetBrains Mono", monospace; margin-top: 1px; }
.src-detail .sd-head { flex: 1 1; min-width: 0; }
.src-detail .sd-type { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 3px; }
.src-detail .sd-title { font-size: 14.5px; font-weight: 700; line-height: 1.4; }
.src-detail .sd-path { font-family: "JetBrains Mono", monospace; font-size: 11.5px; color: var(--text-muted); margin-top: 3px; word-break: break-all; }
.src-detail.flash { animation: flashSrc 1.2s ease; }
@keyframes flashSrc { 0%,18% { background: var(--accent-soft); } 100% { background: transparent; } }
.sd-snippet { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--code-bg); margin: 4px 0 12px; }
.sd-snippet pre { margin: 0; padding: 13px 14px; overflow-x: auto; font-family: "JetBrains Mono", monospace; font-size: 12.5px; line-height: 1.6; }
.sd-snippet.doc { padding: 13px 15px; font-size: 13.5px; line-height: 1.65; color: var(--text); background: var(--surface-2); }
.sd-link { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: 13px; font-weight: 600; transition: all 0.15s; }
.sd-link:hover { border-color: var(--accent); color: var(--accent); }
.scrim { position: fixed; inset: 0; background: oklch(0.2 0.02 260 / 0.32); z-index: 39; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.scrim.show { opacity: 1; pointer-events: auto; }

.sb-scrim { display: none; }

/* Responsive */
@media (max-width: 860px) and (min-width: 721px) {
  .app {
    --sb-w: 252px;
  }
  .sb-inner {
    width: 252px;
  }
  .topbar {
    padding-left: 14px;
    padding-right: 14px;
  }
  .thread-inner, .empty {
    padding-left: 22px;
    padding-right: 22px;
  }
  .suggest-card {
    min-height: 104px;
  }
}
@media (max-width: 720px) {
  .app {
    display: block;
    width: 100vw;
    height: 100svh;
  }
  .main {
    width: 100vw;
    height: 100%;
  }
  .sidebar,
  .app.sb-collapsed .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(280px, 86vw);
    opacity: 1;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  }
  .sb-inner {
    width: min(280px, 86vw);
  }
  .app.sb-open .sidebar { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .sb-scrim { display: block; position: fixed; inset: 0; background: oklch(0.2 0.02 260 / 0.4); z-index: 49; opacity: 0; pointer-events: none; transition: opacity 0.28s; }
  .app.sb-open .sb-scrim { opacity: 1; pointer-events: auto; }
  .only-desktop { display: none !important; }
  .topbar {
    padding-left: 12px;
    padding-right: 12px;
  }
  .model-chip {
    max-width: calc(100vw - 184px);
    overflow: hidden;
    white-space: nowrap;
  }
  .thread-inner, .empty { padding-left: 16px; padding-right: 16px; }
  .composer-wrap { padding: 0 14px 16px; }
  .suggest-grid { grid-template-columns: 1fr; }
  .empty-hi { font-size: 27px; }
  .src-panel { width: 100vw; }
}
@media (max-width: 520px) {
  body { font-size: 14px; }
  .topbar {
    gap: 6px;
    padding: 10px 12px;
  }
  .icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 9px;
  }
  .model-chip {
    flex: 1 1;
    padding: 7px 10px;
    gap: 6px;
    font-size: 12.5px;
    overflow: hidden;
    white-space: nowrap;
  }
  .model-chip .mc-sub { display: none; }
  .thread-inner, .empty {
    padding-left: 12px;
    padding-right: 12px;
    padding-bottom: 148px;
  }
  .empty {
    padding-top: 5vh;
  }
  .empty-hi {
    font-size: 24px;
  }
  .empty-sub {
    font-size: 14px;
    line-height: 1.5;
  }
  .suggest-grid {
    gap: 9px;
    margin-top: 24px;
  }
  .suggest-card {
    min-height: 96px;
    padding: 13px;
    border-radius: 10px;
  }
  .msg {
    margin: 20px 0;
  }
  .msg-bot {
    gap: 10px;
  }
  .bot-ava {
    width: 26px;
    height: 26px;
    border-radius: 7px;
  }
  .msg-user .bubble {
    max-width: 92%;
    padding: 10px 13px;
    font-size: 14px;
  }
  .prose {
    font-size: 14px;
    line-height: 1.68;
  }
  .prose h1 { font-size: 19px; }
  .prose h2 { font-size: 17px; }
  .prose h3 { font-size: 15px; }
  .src-pill {
    max-width: 100%;
  }
  .composer-wrap {
    padding: 0 10px 12px;
  }
  .input-box {
    border-radius: 20px;
    padding: 7px;
  }
  .input-box textarea {
    font-size: 14px;
    padding: 7px 8px 1px;
  }
  .composer-foot {
    display: none;
  }
  .attach-chip {
    max-width: 100%;
  }
  .attach-chip .ac-name {
    max-width: min(160px, 52vw);
  }
}
@media (min-width: 721px) { .only-mobile { display: none !important; } }

