:root {
  --bg: #eff8fb;
  --surface: #ffffff;
  --surface-2: #f1f6fb;
  --ink: #243033;
  --muted: #6c7a7d;
  --line: #dce7f1;
  --teal: #1b8a7a;
  --teal-2: #dff4ef;
  --blue: #0f7dd8;
  --blue-2: #dff0ff;
  --aqua: #4cc9c0;
  --mint: #9be7cf;
  --blush: #f3a7bc;
  --lavender: #9b8cff;
  --navy: #03045c;
  --amber: #b7791f;
  --rose: #c24164;
  --violet: #6554c0;
  --shadow: 0 16px 34px rgba(23, 43, 77, 0.08);
  --soft-shadow: 0 12px 28px rgba(15, 55, 77, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f4fbfc;
  color: var(--ink);
  font-family: "Segoe UI", "Noto Sans KR", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.app-frame {
  min-height: 100vh;
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #f2fbff 0%, #eef9f3 44%, #f8f6ff 100%);
}

.app-frame::before {
  content: "";
  position: fixed;
  inset: 76px 0 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.65;
  background-image:
    linear-gradient(rgba(25, 94, 110, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 94, 110, 0.05) 1px, transparent 1px),
    linear-gradient(120deg, rgba(243, 167, 188, 0.12), transparent 34%),
    linear-gradient(315deg, rgba(76, 201, 192, 0.16), transparent 38%);
  background-size: 34px 34px, 34px 34px, 100% 100%, 100% 100%;
}

.app-frame::after {
  content: "";
  position: fixed;
  top: 105px;
  right: 32px;
  width: 310px;
  height: 190px;
  z-index: -1;
  pointer-events: none;
  opacity: 0.2;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.34)) 20px 62px / 46px 98px no-repeat,
    linear-gradient(180deg, rgba(76, 201, 192, 0.9), rgba(15, 125, 216, 0.75)) 29px 34px / 28px 35px no-repeat,
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.38)) 90px 40px / 54px 120px no-repeat,
    linear-gradient(180deg, rgba(243, 167, 188, 0.9), rgba(155, 140, 255, 0.72)) 100px 18px / 34px 30px no-repeat,
    linear-gradient(180deg, rgba(255, 255, 255, 0.93), rgba(255, 255, 255, 0.4)) 172px 76px / 76px 84px no-repeat,
    linear-gradient(90deg, rgba(15, 125, 216, 0.85), rgba(155, 231, 207, 0.85)) 154px 60px / 112px 24px no-repeat;
  filter: saturate(1.1);
}

.app-nav {
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(360px, 1.1fr) minmax(220px, 0.8fr);
  align-items: center;
  gap: 18px;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid #dfe8f3;
  box-shadow: 0 1px 0 rgba(23, 43, 77, 0.04);
  position: relative;
  z-index: 2;
}

.app-brand {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.app-brand h1 {
  font-size: 18px;
}

.primary-nav {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 16px;
  min-height: 76px;
}

.nav-tab {
  position: relative;
  min-width: 82px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-bottom: 3px solid transparent;
  color: #46555a;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.nav-icon {
  width: 25px;
  height: 23px;
  display: grid;
  place-items: center;
  color: #26343a;
  font-size: 19px;
  line-height: 1;
}

.nav-icon.text-icon {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.nav-tab:hover {
  color: var(--teal);
}

.nav-tab.active {
  color: #111f24;
  border-bottom-color: #8178ff;
}

.nav-tab.active .nav-icon {
  color: var(--blue);
}

.nav-badge {
  position: absolute;
  top: 10px;
  right: 16px;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  border-radius: 999px;
  background: #e34d6a;
  color: white;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(227, 77, 106, 0.28);
}

.nav-badge[hidden] {
  display: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  cursor: pointer;
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(15, 55, 77, 0.06);
}

.dashboard-page {
  padding: 18px 24px 26px;
  position: relative;
  z-index: 1;
}

.dashboard-toolbar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar-group.align-end {
  justify-content: flex-end;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: 0 10px 24px rgba(15, 55, 77, 0.06);
}

.toolbar-select {
  display: inline-grid;
  grid-template-columns: auto minmax(120px, 160px);
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid rgba(15, 125, 216, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  padding: 0 10px 0 16px;
  color: var(--ink);
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(15, 55, 77, 0.06);
}

.toolbar-select span {
  color: var(--muted);
  font-size: 12px;
}

.toolbar-select .select {
  min-height: 32px;
  border: 0;
  padding: 0 6px;
}

.dashboard-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 16px;
}

.dashboard-heading h2 {
  font-size: 24px;
}

.clarity-metrics {
  margin-bottom: 22px;
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.ops-panel {
  overflow: hidden;
}

.ops-panel .panel-header {
  align-items: center;
}

.insight-total {
  min-width: 74px;
  min-height: 36px;
  border: 1px solid rgba(194, 65, 100, 0.18);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(243, 167, 188, 0.25), rgba(255, 255, 255, 0.9));
  color: var(--rose);
  cursor: pointer;
  font-weight: 900;
}

.insight-total.stock {
  border-color: rgba(183, 121, 31, 0.2);
  background: linear-gradient(135deg, rgba(253, 230, 138, 0.45), rgba(255, 255, 255, 0.9));
  color: #8a5a12;
}

.insight-total:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(23, 43, 77, 0.1);
}

.insight-list {
  display: grid;
  gap: 8px;
  padding: 0 16px 16px;
}

.insight-row {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(220, 231, 241, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  cursor: pointer;
  padding: 9px 11px;
  text-align: left;
}

.insight-row:hover {
  background: #f5fbfb;
  border-color: rgba(76, 201, 192, 0.36);
  transform: translateY(-1px);
}

.insight-row.up {
  border-left: 4px solid var(--blue);
}

.insight-row.risk {
  border-left: 4px solid var(--amber);
}

.insight-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.insight-main strong,
.insight-main small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.insight-main strong {
  color: var(--ink);
  font-size: 13px;
}

.insight-main small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.insight-count {
  color: var(--navy);
  font-size: 15px;
  font-weight: 900;
}

.insight-empty {
  min-height: 78px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(108, 122, 125, 0.25);
  border-radius: 8px;
}

.clarity-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.clarity-grid .panel {
  grid-column: span 2;
}

.clarity-grid .wide {
  grid-column: span 6;
}

.records-section {
  margin-top: 16px;
}

.ai-toolbar {
  align-items: flex-start;
}

.sidebar {
  background: #fcfdfd;
  border-right: 1px solid var(--line);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand-block {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  width: 42px;
  height: 42px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0)),
    linear-gradient(145deg, #118674 0%, #0f7dd8 58%, #9b8cff 100%);
  color: white;
  box-shadow: 0 12px 24px rgba(15, 125, 216, 0.22);
  font-weight: 800;
  border-radius: 13px;
}

.brand-mark::before {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 10px;
  height: 15px;
  border-radius: 10px 10px 10px 2px;
  background: rgba(255, 255, 255, 0.78);
  transform: rotate(38deg);
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 8px;
  bottom: 7px;
  width: 22px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.brand-mark span {
  position: relative;
  z-index: 1;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-mark.large {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  font-size: 24px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 18px;
  line-height: 1.25;
}

h2 {
  font-size: 16px;
  line-height: 1.3;
}

#sourceLine,
.muted {
  color: var(--muted);
  font-size: 12px;
}

.field-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.select,
.login-card input,
.ask-form input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  padding: 0 12px;
  outline: none;
}

.select:focus,
.login-card input:focus,
.ask-form input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-2);
}

.side-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.engine-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  padding: 10px 12px;
}

.engine-details summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  list-style-position: outside;
}

.engine-details .field-label {
  margin-top: 10px;
  margin-bottom: 6px;
}

.button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.button.primary {
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: white;
  box-shadow: 0 12px 24px rgba(15, 125, 216, 0.18);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(15, 125, 216, 0.16);
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(15, 55, 77, 0.06);
}

.button:hover,
.icon-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(15, 55, 77, 0.1);
}

.round-action {
  min-height: 46px;
  padding: 0 18px 0 10px;
  font-size: 13px;
  font-weight: 800;
}

.action-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: white;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
}

.ai-action .action-icon {
  background: linear-gradient(135deg, var(--lavender), var(--blue));
}

.xlsx-action .action-icon {
  background: linear-gradient(135deg, var(--teal), var(--mint));
  color: #073b35;
}

.csv-action .action-icon {
  background: linear-gradient(135deg, var(--blush), var(--rose));
}

.button.full {
  width: 100%;
}

.button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.workspace {
  min-width: 0;
  padding: 22px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.eyebrow {
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

#scopeTitle {
  font-size: 28px;
}

.health-pill {
  min-width: 92px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(15, 55, 77, 0.06);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.metric {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  min-height: 102px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow);
}

.metric .label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric .value {
  color: var(--navy);
  font-size: 28px;
  font-weight: 800;
}

.metric:nth-child(2) {
  border-top: 3px solid var(--teal);
}

.metric:nth-child(3) {
  border-top: 3px solid var(--amber);
}

.metric:nth-child(4) {
  border-top: 3px solid var(--rose);
}

.metric:nth-child(5) {
  border-top: 3px solid var(--violet);
}

.content-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.9fr);
  gap: 12px;
}

.detail-grid {
  margin-bottom: 12px;
}

.panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.panel.compact {
  padding: 14px;
}

.panel-header {
  min-height: 48px;
  padding: 14px 16px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(220, 231, 241, 0.6);
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px 16px;
}

.compact .rank-list {
  padding: 12px 0 0;
}

.rank-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.rank-item.interactive {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 6px;
  margin: -6px;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
}

.rank-item.interactive:hover {
  background: #f2faf8;
}

.rank-label {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-count {
  color: var(--muted);
  font-weight: 800;
}

.bar-track {
  grid-column: 1 / -1;
  height: 6px;
  background: #edf1f1;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: var(--w, 0%);
  background: linear-gradient(90deg, var(--teal), var(--aqua));
}

.month-chart {
  height: 230px;
  padding: 8px 14px 18px;
  display: grid;
  grid-template-columns: repeat(12, minmax(18px, 1fr));
  align-items: end;
  gap: 8px;
}

.month-bar {
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: end;
  align-items: center;
  gap: 6px;
}

.month-bar.clickable-bar {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: inherit;
}

.month-bar.clickable-bar:hover .bar {
  filter: brightness(1.02) saturate(1.08);
  transform: translateY(-3px);
}

.month-bar.clickable-bar:focus-visible {
  outline: 2px solid rgba(15, 125, 216, 0.4);
  outline-offset: 4px;
  border-radius: 8px;
}

.month-bar .bar {
  width: 100%;
  min-height: 3px;
  height: var(--h);
  background: linear-gradient(180deg, var(--bar-color, var(--blue)), var(--bar-color-2, var(--aqua)));
  border-radius: 4px 4px 0 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 8px 18px rgba(15, 55, 77, 0.08);
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.month-bar .count {
  color: var(--muted);
  font-size: 11px;
  min-height: 14px;
}

.month-bar .month {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.month-tooltip {
  position: fixed;
  z-index: 100;
  width: min(280px, calc(100vw - 24px));
  display: none;
  padding: 13px 14px 12px;
  border: 1px solid rgba(203, 221, 231, 0.9);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 38px rgba(23, 43, 77, 0.16);
  backdrop-filter: blur(14px);
  pointer-events: none;
}

.month-tooltip.visible {
  display: block;
}

.month-tooltip::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(76, 201, 192, 0.1), rgba(155, 140, 255, 0.08));
  pointer-events: none;
}

.tooltip-kicker,
.tooltip-total,
.tooltip-section,
.tooltip-foot {
  position: relative;
  z-index: 1;
}

.tooltip-kicker {
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.tooltip-total {
  margin-top: 2px;
  color: var(--navy);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.1;
}

.tooltip-section {
  margin-top: 10px;
}

.tooltip-section.compact {
  margin-top: 8px;
}

.tooltip-title {
  margin-bottom: 5px;
  color: #425257;
  font-size: 12px;
  font-weight: 900;
}

.month-tooltip ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.month-tooltip li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  color: var(--ink);
  font-size: 12px;
}

.month-tooltip li span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.month-tooltip li strong {
  color: var(--navy);
  font-size: 12px;
}

.tooltip-foot {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(220, 231, 241, 0.85);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.table-wrap {
  overflow: auto;
  max-height: 430px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
  color: var(--muted);
  font-size: 12px;
}

td {
  max-width: 310px;
}

.status-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  background: var(--teal-2);
  color: #126354;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-badge.pending {
  background: #fff1d8;
  color: #8a5a12;
}

.detail-panel {
  overflow: hidden;
}

.detail-header {
  align-items: flex-start;
}

.detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  padding: 0 16px 14px;
}

.summary-pill {
  border: 1px solid var(--line);
  background: #fbfcfc;
  border-radius: 6px;
  padding: 10px 12px;
  min-height: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.summary-pill span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.summary-pill strong {
  font-size: 18px;
}

.detail-body {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.4fr);
  gap: 16px;
  padding: 0 16px 16px;
}

.detail-body h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.detail-month-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-month-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.detail-month-row strong {
  text-align: right;
}

.detail-breakdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.detail-breakdown section {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  min-width: 0;
}

.detail-breakdown h4 {
  margin: 0 0 8px;
  font-size: 13px;
}

.detail-breakdown ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-breakdown li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  font-size: 12px;
}

.detail-breakdown li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-table-wrap {
  max-height: 360px;
  border-top: 1px solid var(--line);
}

.chat-panel {
  display: flex;
  flex-direction: column;
  min-height: 500px;
}

.ai-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(340px, 0.8fr);
  gap: 12px;
}

.ai-chat-panel {
  display: flex;
  flex-direction: column;
  min-height: min(680px, calc(100vh - 178px));
}

.ai-chat-log {
  min-height: 360px;
}

.context-box {
  padding: 16px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  white-space: pre-wrap;
  line-height: 1.55;
  font-size: 13px;
  max-height: calc(100vh - 140px);
  overflow: auto;
}

.side-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  padding-top: 10px;
}

.prompt-row {
  display: flex;
  gap: 8px;
  padding: 0 16px 10px;
  overflow-x: auto;
}

.chip {
  flex: 0 0 auto;
  min-height: 32px;
  border: 1px solid rgba(15, 125, 216, 0.14);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  border-radius: 999px;
  padding: 0 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(15, 55, 77, 0.05);
}

.chat-log {
  flex: 1;
  overflow: auto;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(246, 252, 252, 0.88)),
    linear-gradient(90deg, rgba(76, 201, 192, 0.06), rgba(243, 167, 188, 0.05));
}

.message {
  max-width: 88%;
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 8px;
  white-space: pre-wrap;
  line-height: 1.45;
  font-size: 13px;
}

.message.user::before,
.message.assistant:not(.download-message):not(.report-job-message)::before {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.message.user::before {
  content: "요청";
  color: rgba(255, 255, 255, 0.78);
}

.message.assistant:not(.download-message):not(.report-job-message)::before {
  content: "결과";
  color: var(--teal);
}

.message.user {
  margin-left: auto;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  color: white;
}

.message.assistant {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
}

.ai-shell .brand-mark {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0)),
    linear-gradient(145deg, #118674 0%, #0f7dd8 58%, #9b8cff 100%);
}

.ai-shell .panel-header h2 {
  font-size: 15px;
}

.download-message {
  padding: 0;
  overflow: hidden;
}

.download-link {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  background: var(--teal-2);
  color: #126354;
  font-weight: 800;
  text-decoration: none;
}

.download-link:hover {
  background: #d2eee8;
}

.report-job-message {
  width: min(88%, 680px);
  padding: 12px;
  white-space: normal;
}

.report-job-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.report-job-header strong {
  font-size: 13px;
  color: var(--ink);
}

.report-job-header span {
  color: var(--muted);
  font-size: 12px;
}

.report-job-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.report-job-step {
  min-height: 54px;
  padding: 8px 10px 8px 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  position: relative;
}

.report-job-step::before {
  content: "";
  position: absolute;
  top: 13px;
  left: 10px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #b6c5c2;
}

.report-job-step.done::before {
  background: var(--teal);
}

.report-job-step.pending::before {
  background: #d7a900;
}

.report-job-step-label {
  display: block;
  color: var(--ink);
  font-weight: 800;
  font-size: 12px;
}

.report-job-step small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.report-job-checks {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.report-job-check {
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  position: relative;
}

.report-job-check::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 2px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #b6c5c2;
}

.report-job-check.passed::before {
  background: var(--teal);
}

.report-job-check.failed::before {
  background: #c45a4a;
}

.ask-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px;
  gap: 8px;
  padding: 12px 16px 16px;
}

.login-screen {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(245, 247, 248, 0.92);
  z-index: 50;
  padding: 20px;
}

.login-screen.visible {
  display: grid;
}

.login-card {
  width: min(360px, 100%);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.login-card h2 {
  text-align: center;
  margin-bottom: 18px;
}

.login-card .field-label {
  margin-bottom: 8px;
}

.login-card input {
  margin-bottom: 12px;
}

.login-error {
  min-height: 18px;
  margin-top: 10px;
  color: var(--rose);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 1180px) {
  .app-nav {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
  }

  .primary-nav {
    justify-content: flex-start;
    min-height: auto;
    overflow-x: auto;
  }

  .nav-actions {
    justify-content: flex-start;
  }

  .dashboard-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar-group.align-end {
    justify-content: flex-start;
  }

  .clarity-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .ops-grid {
    grid-template-columns: 1fr;
  }

  .clarity-grid .wide {
    grid-column: span 6;
  }

  .clarity-grid .panel {
    grid-column: span 2;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metrics-grid {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

  .content-grid,
  .lower-grid,
  .detail-body,
  .ai-grid {
    grid-template-columns: 1fr;
  }

  .detail-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-breakdown {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .app-nav {
    padding: 12px;
  }

  .app-brand {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .dashboard-page {
    padding: 14px 12px 18px;
  }

  .toolbar-group,
  .toolbar-group.align-end {
    width: 100%;
  }

  .toolbar-select,
  .toolbar-group .button {
    flex: 1;
  }

  .clarity-grid {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .clarity-grid .wide,
  .clarity-grid .panel {
    grid-column: auto;
  }

  .workspace,
  .sidebar {
    padding: 14px;
  }

  #scopeTitle {
    font-size: 22px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .month-chart {
    grid-template-columns: repeat(6, minmax(18px, 1fr));
    height: 260px;
  }

  .ask-form {
    grid-template-columns: 1fr;
  }

  .detail-summary {
    grid-template-columns: 1fr;
  }

  .detail-header {
    flex-direction: column;
  }

  .detail-actions {
    width: 100%;
  }

  .detail-actions .button {
    flex: 1;
  }

  .message {
    max-width: 100%;
  }

  .report-job-message {
    width: 100%;
  }

  .report-job-steps {
    grid-template-columns: 1fr;
  }
}

.priority-heading {
  align-items: flex-end;
}

.priority-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.priority-metric {
  min-height: 92px;
  display: grid;
  gap: 6px;
  align-content: center;
  border: 1px solid rgba(220, 231, 241, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  padding: 14px;
  box-shadow: var(--shadow);
}

.priority-metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.priority-metric strong {
  color: var(--navy);
  font-size: 26px;
  font-weight: 900;
}

.priority-metric small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.priority-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.priority-panel-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.priority-textarea {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 12px;
  outline: none;
  font: inherit;
  line-height: 1.55;
}

.priority-textarea:focus,
.inline-form input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-2);
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.inline-form input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  outline: none;
}

.priority-result {
  min-height: 140px;
  display: grid;
  gap: 12px;
  border: 1px solid rgba(220, 231, 241, 0.95);
  border-radius: 8px;
  background: rgba(250, 253, 253, 0.9);
  padding: 14px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
}

.priority-result h3 {
  margin: 4px 0 -4px;
  color: var(--ink);
  font-size: 14px;
}

.result-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.result-summary div {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(15, 125, 216, 0.12);
  border-radius: 8px;
  background: white;
  padding: 10px;
}

.result-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.result-summary strong {
  overflow: hidden;
  color: var(--navy);
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-alert {
  border: 1px solid rgba(183, 121, 31, 0.28);
  border-radius: 8px;
  background: rgba(253, 230, 138, 0.24);
  color: #79500f;
  padding: 10px 12px;
  font-weight: 800;
}

.result-download {
  display: flex;
  align-items: center;
  min-height: 38px;
}

.download-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  color: white;
  padding: 0 14px;
  font-weight: 900;
  text-decoration: none;
}

.draft-box {
  max-height: 260px;
  overflow: auto;
  border: 1px solid rgba(220, 231, 241, 0.95);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 12px;
  white-space: pre-wrap;
  font-family: "Segoe UI", "Noto Sans KR", Arial, sans-serif;
}

.mini-table {
  max-height: 260px;
  overflow: auto;
  border: 1px solid rgba(220, 231, 241, 0.8);
  border-radius: 8px;
  background: white;
}

.mini-table table {
  min-width: 560px;
}

.document-panel {
  margin-bottom: 16px;
}

.document-panel .table-wrap {
  max-height: 420px;
  overflow: auto;
}

.mail-page {
  display: grid;
  gap: 18px;
}

.mail-page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.mail-page-heading h2 {
  margin: 4px 0 6px;
  color: var(--ink);
  font-size: 30px;
  font-weight: 900;
}

.mail-heading-actions,
.mail-list-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mail-status-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.mail-status-card {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid rgba(220, 231, 241, 0.96);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  padding: 16px 18px;
  box-shadow: var(--soft-shadow);
}

.mail-status-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.mail-status-card strong {
  color: var(--navy);
  font-size: 21px;
  font-weight: 900;
}

.mail-status-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.mail-desk {
  display: grid;
  grid-template-columns: minmax(620px, 1.25fr) minmax(380px, 0.75fr);
  gap: 16px;
  align-items: start;
}

.mail-list-panel,
.mail-detail-panel {
  min-height: 620px;
  overflow: hidden;
}

.mail-list-toolbar {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
}

.mail-search {
  min-width: 320px;
  flex: 1;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 0 12px;
}

.mail-search span {
  color: var(--muted);
  font-size: 18px;
  font-weight: 900;
}

.mail-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
}

.mail-table-wrap {
  max-height: 560px;
  overflow: auto;
  background: white;
}

.mail-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.mail-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 46px;
  border-bottom: 1px solid var(--line);
  background: #f8fbfd;
  color: #5b6a71;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
}

.mail-table th,
.mail-table td {
  padding: 11px 14px;
  vertical-align: middle;
}

.mail-table th:first-child,
.mail-table td:first-child {
  width: 92px;
}

.mail-table th:nth-child(3),
.mail-table td:nth-child(3) {
  width: 190px;
}

.mail-table th:nth-child(4),
.mail-table td:nth-child(4) {
  width: 126px;
}

.mail-row {
  cursor: pointer;
  border-bottom: 1px solid rgba(220, 231, 241, 0.75);
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.mail-row:hover,
.mail-row.selected {
  background: #eef7ff;
}

.mail-row.sent {
  background: rgba(223, 244, 239, 0.64);
}

.mail-title-button {
  width: 100%;
  display: block;
  border: 0;
  background: transparent;
  color: #154aa4;
  padding: 0;
  text-align: left;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.mail-table small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border: 1px solid rgba(27, 138, 122, 0.22);
  border-radius: 999px;
  background: var(--teal-2);
  color: var(--teal);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.mail-empty-state,
.mail-detail-empty {
  display: grid;
  min-height: 160px;
  place-items: center;
  gap: 6px;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.mail-empty-state small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.mail-detail-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
}

.mail-detail-card {
  display: grid;
  gap: 14px;
}

.mail-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mail-detail-head h3 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.35;
}

.mail-detail-meta {
  display: grid;
  gap: 8px;
  margin: 0;
}

.mail-detail-meta div {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(220, 231, 241, 0.9);
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px 12px;
}

.mail-detail-meta dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.mail-detail-meta dd {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.mail-body-box {
  max-height: 430px;
  overflow: auto;
  border: 1px solid rgba(220, 231, 241, 0.96);
  border-radius: 8px;
  background: white;
  padding: 12px;
}

.mail-body-box pre {
  margin: 0;
  color: var(--ink);
  font-family: "Segoe UI", "Noto Sans KR", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.mail-conversation-view {
  display: grid;
  gap: 14px;
}

.mail-thread-latest,
.mail-thread-history {
  display: grid;
  gap: 8px;
}

.mail-thread-label {
  width: fit-content;
  border-radius: 999px;
  background: #edf7ff;
  color: #006eb8;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 900;
}

.mail-thread-bubble {
  border: 1px solid #dce9f5;
  border-radius: 8px;
  padding: 13px 14px;
}

.mail-thread-bubble.incoming {
  margin-left: auto;
  width: min(92%, 720px);
  border-color: #c7e8dd;
  background: linear-gradient(135deg, #effcf8, #eef7ff);
}

.mail-thread-bubble.old {
  margin-top: 8px;
  background: #fbfdff;
}

.mail-thread-bubble pre,
.mail-thread-raw pre {
  margin: 0;
  color: var(--ink);
  font-family: "Segoe UI", "Noto Sans KR", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.62;
  white-space: pre-wrap;
}

.mail-thread-quote,
.mail-thread-raw {
  border: 1px solid #e1ebf5;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.mail-thread-quote summary,
.mail-thread-raw summary {
  cursor: pointer;
  display: grid;
  gap: 4px;
  padding: 11px 13px;
  color: #233848;
  font-size: 13px;
  font-weight: 900;
}

.mail-thread-quote summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-thread-raw {
  background: #f8fbfd;
}

.mail-thread-raw pre {
  border-top: 1px solid #e1ebf5;
  padding: 12px 13px;
  color: #5a6b75;
}

.mail-thread-empty {
  border: 1px dashed #d5e3ef;
  border-radius: 8px;
  background: #fbfdff;
  color: var(--muted);
  padding: 12px 13px;
  font-size: 13px;
  font-weight: 750;
}

.mail-loading {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.loading-card {
  padding: 14px 16px;
  color: var(--muted);
  font-weight: 900;
}

.attachment-preview-button {
  min-height: 28px;
  border: 1px solid rgba(15, 125, 216, 0.24);
  border-radius: 999px;
  background: var(--blue-2);
  color: var(--blue);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.dev-tools-panel {
  padding: 0;
}

.dev-tools-panel summary {
  cursor: pointer;
  padding: 14px 16px;
  color: var(--muted);
  font-weight: 900;
}

.dev-tools-grid {
  padding: 0 16px;
}

.worklog-entry-section {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.worklog-list-page,
.worklog-form-page {
  display: grid;
  gap: 16px;
}

.worklog-list-page[hidden],
.worklog-form-page[hidden] {
  display: none;
}

.worklog-command-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 14px;
}

.worklog-search-panel,
.worklog-template-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.worklog-search-panel h3,
.worklog-template-panel h3 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.worklog-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.worklog-search-row input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
  outline: none;
}

.worklog-search-row input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(15, 125, 216, 0.12);
}

.worklog-entry-heading {
  align-items: center;
  border-bottom: 1px solid rgba(220, 231, 241, 0.9);
  padding-bottom: 14px;
}

.worklog-fast-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 16px;
  align-items: start;
}

.worklog-entry-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.75fr) minmax(0, 1.25fr);
  gap: 16px;
  align-items: start;
}

.worklog-ai-card,
.worklog-form,
.worklog-fast-card,
.worklog-db-card,
.worklog-entry-list {
  border: 1px solid rgba(220, 231, 241, 0.95);
  border-radius: 8px;
  background: #fbfdff;
  padding: 15px;
}

.worklog-ai-card {
  display: grid;
  gap: 10px;
}

.worklog-ai-card h3,
.worklog-entry-list h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}

.worklog-form {
  display: grid;
  gap: 12px;
}

.worklog-fast-form {
  min-width: 0;
}

.worklog-fast-card,
.worklog-db-card {
  display: grid;
  gap: 14px;
  background: #ffffff;
}

.worklog-form-top,
.worklog-db-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.worklog-form-top h3,
.worklog-db-head h3 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 950;
}

.worklog-primary-grid {
  display: grid;
  grid-template-columns: minmax(150px, 0.45fr) minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 12px;
}

.worklog-primary-grid .wide {
  grid-column: 1 / -1;
}

.worklog-pill-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.worklog-more-fields {
  border: 1px solid rgba(220, 231, 241, 0.95);
  border-radius: 8px;
  background: #f8fbfe;
}

.worklog-more-fields summary {
  cursor: pointer;
  padding: 12px 13px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.worklog-more-fields .form-grid {
  padding: 0 13px 13px;
}

.worklog-save-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 2px;
}

.form-grid {
  display: grid;
  gap: 10px;
}

.form-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.field-label input,
.field-label select {
  width: 100%;
  min-height: 38px;
  margin-top: 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 10px;
  font: inherit;
  outline: none;
}

.field-label textarea {
  margin-top: 5px;
}

.field-label input:focus,
.field-label select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(15, 125, 216, 0.12);
}

.field-label input[readonly] {
  background: #f3f7fa;
  color: #526672;
}

.suggest-field {
  position: relative;
  z-index: 5;
}

.suggest-field > span {
  display: block;
}

.field-suggestion-list {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 260px;
  overflow: auto;
  border: 1px solid rgba(15, 125, 216, 0.22);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(23, 43, 77, 0.16);
  padding: 6px;
}

.field-suggestion-list[hidden] {
  display: none;
}

.field-suggestion-list button {
  width: 100%;
  min-height: 46px;
  display: grid;
  gap: 3px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 8px 9px;
  text-align: left;
  cursor: pointer;
}

.field-suggestion-list button:hover {
  background: #eef7ff;
}

.field-suggestion-list span,
.field-suggestion-list small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-suggestion-list span {
  font-size: 13px;
  font-weight: 900;
}

.field-suggestion-list small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.compact-result {
  min-height: auto;
  padding: 11px 12px;
}

.compact-result strong,
.compact-result small {
  display: block;
}

.compact-result small {
  margin-top: 4px;
  color: var(--muted);
}

.worklog-template-results {
  display: grid;
  gap: 9px;
  border: 1px solid rgba(15, 125, 216, 0.2);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.worklog-template-results[hidden] {
  display: none;
}

.worklog-template-results > strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.worklog-template-list {
  display: grid;
  gap: 7px;
}

.worklog-template-list button {
  width: 100%;
  border: 1px solid rgba(220, 231, 241, 0.95);
  border-radius: 8px;
  background: #f7fbfd;
  color: var(--ink);
  padding: 10px 11px;
  text-align: left;
  cursor: pointer;
}

.worklog-template-list button:hover {
  border-color: rgba(15, 125, 216, 0.32);
  background: var(--blue-2);
}

.worklog-template-list span,
.worklog-template-list small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worklog-template-list span {
  font-size: 13px;
  font-weight: 900;
}

.worklog-template-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.worklog-ai-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(13, 31, 42, 0.42);
  padding: 24px;
}

.worklog-ai-modal[hidden] {
  display: none;
}

.worklog-ai-dialog {
  width: min(620px, 100%);
  display: grid;
  gap: 12px;
  border: 1px solid rgba(220, 231, 241, 0.95);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(11, 31, 48, 0.28);
  padding: 18px;
}

.worklog-ai-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.worklog-ai-dialog-head h3 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 950;
}

.button.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.worklog-entry-list {
  padding: 0;
  overflow: hidden;
}

.worklog-entry-list .panel-header.slim {
  min-height: 44px;
}

.worklog-entry-list .table-wrap {
  max-height: 300px;
  overflow: auto;
}

@media (max-width: 1180px) {
  .worklog-command-grid,
  .worklog-fast-layout,
  .worklog-entry-grid,
  .form-grid.compact,
  .worklog-primary-grid,
  .worklog-pill-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .worklog-command-grid,
  .worklog-fast-layout,
  .worklog-entry-grid,
  .form-grid.compact,
  .worklog-primary-grid,
  .worklog-pill-grid {
    grid-template-columns: 1fr;
  }

  .worklog-search-row {
    grid-template-columns: 1fr;
  }

  .worklog-form-top,
  .worklog-db-head,
  .worklog-save-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .worklog-save-bar .button {
    width: 100%;
  }
}

.document-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(13, 31, 42, 0.42);
  padding: 28px;
}

.document-preview-modal[hidden] {
  display: none;
}

.document-preview-card {
  width: min(920px, 92vw);
  height: min(760px, 86vh);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(220, 231, 241, 0.95);
  border-radius: 8px;
  background: white;
  box-shadow: 0 28px 70px rgba(8, 32, 48, 0.24);
}

.document-preview-card iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #f5f7fb;
}

.main-linked-section {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 4px;
}

.section-heading h2 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
}

.section-tabs {
  display: inline-flex;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f6fa;
  padding: 4px;
}

.section-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.section-tabs button.active {
  background: #243033;
  color: white;
}

.main-lab-root {
  display: grid;
  gap: 14px;
}

.main-lab-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.main-lab-grid {
  grid-template-columns: 0.9fr 1.05fr 1.05fr;
}

.main-portfolio {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.main-report-grid {
  grid-template-columns: 1fr 1fr;
}

.lab-bar-list.compact .lab-bar-row {
  grid-template-columns: minmax(120px, 0.6fr) minmax(120px, 1fr) 56px;
}

.link-month-bars.compact {
  height: 80px;
}

.link-month-bars.compact div {
  height: 66px;
}

.lab-donut-wrap.compact {
  grid-template-columns: 110px minmax(0, 1fr);
}

.lab-donut-wrap.compact .lab-donut {
  width: 110px;
  height: 110px;
}

.lab-donut-wrap.compact .lab-donut::after {
  inset: 33px;
}

.report-shortcuts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.mail-toast {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 90;
  width: min(360px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: start;
  border: 1px solid rgba(15, 125, 216, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  padding: 15px 16px;
  box-shadow: 0 22px 50px rgba(15, 55, 77, 0.2);
  cursor: pointer;
}

.mail-toast[hidden] {
  display: none;
}

.mail-toast strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.mail-toast span {
  grid-column: 1;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.mail-toast button {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: #eef4f8;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.lab-shell .dashboard-page {
  max-width: 1540px;
  margin: 0 auto;
}

.lab-page {
  display: grid;
  gap: 18px;
}

.lab-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(220, 231, 241, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  padding: 18px 20px;
  box-shadow: var(--soft-shadow);
}

.lab-hero h2 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 28px;
  font-weight: 900;
}

.lab-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  padding: 4px;
  gap: 4px;
}

.lab-switch button {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 0 14px;
  font-weight: 900;
  cursor: pointer;
}

.lab-switch button.active {
  background: linear-gradient(135deg, var(--teal), var(--blue));
  color: white;
}

.lab-root {
  display: grid;
  gap: 16px;
}

.lab-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.lab-metric {
  min-height: 106px;
  display: grid;
  align-content: center;
  gap: 5px;
  border: 1px solid rgba(220, 231, 241, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  padding: 16px;
  box-shadow: var(--soft-shadow);
}

.lab-metric span,
.lab-metric small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.lab-metric strong {
  color: var(--navy);
  font-size: 28px;
  font-weight: 900;
}

.lab-two-col,
.lab-three-col {
  display: grid;
  gap: 16px;
}

.lab-two-col {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.lab-three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lab-product-grid,
.link-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.link-portfolio-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lab-panel,
.lab-product-card,
.link-product-tile {
  padding: 16px;
}

.lab-panel .panel-header {
  padding: 0 0 12px;
}

.lab-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.lab-card-top h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.lab-card-top strong {
  color: var(--blue);
  font-size: 24px;
  font-weight: 900;
}

.lab-card-meta,
.link-kpi-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.lab-card-meta span,
.link-kpi-row span {
  border: 1px solid rgba(220, 231, 241, 0.9);
  border-radius: 999px;
  background: #f7fbfd;
  color: var(--muted);
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 850;
}

.link-kpi-row b {
  margin-right: 4px;
  color: var(--navy);
}

.lab-bar-list {
  display: grid;
  gap: 10px;
}

.lab-bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.55fr) minmax(140px, 1fr) 64px;
  align-items: center;
  gap: 12px;
}

.lab-bar-row strong,
.lab-bar-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lab-bar-row strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.lab-bar-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.lab-bar-row b {
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
  text-align: right;
}

.lab-bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef4f8;
}

.lab-bar-track span {
  width: var(--w);
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--blue));
}

.lab-month-strip,
.link-month-bars {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: end;
  gap: 8px;
  height: 92px;
  margin-top: 16px;
  padding: 8px 4px 0;
  border-bottom: 1px solid var(--line);
}

.lab-month-strip span,
.link-month-bars div {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 2px;
  height: 80px;
}

.lab-month-strip i,
.lab-month-strip b,
.link-month-bars span,
.link-month-bars b {
  width: 7px;
  height: var(--h);
  display: block;
  border-radius: 999px 999px 0 0;
}

.lab-month-strip i,
.link-month-bars span {
  background: #8fd3ff;
}

.lab-month-strip b,
.link-month-bars b {
  background: var(--teal);
}

.link-month-bars div {
  position: relative;
}

.link-month-bars small {
  position: absolute;
  bottom: -18px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.lab-insight-stack {
  display: grid;
  gap: 10px;
}

.lab-insight-stack.compact {
  gap: 8px;
}

.lab-insight-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(220, 231, 241, 0.92);
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
}

.lab-insight-card span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--teal-2);
  color: var(--teal);
  font-size: 13px;
  font-weight: 900;
}

.lab-insight-card strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.lab-question-row,
.lab-filter-stack,
.lab-export-list {
  display: grid;
  gap: 10px;
}

.lab-question-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.lab-question-row button,
.lab-filter-stack button {
  min-height: 42px;
  border: 1px solid rgba(220, 231, 241, 0.95);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 850;
  text-align: left;
}

.lab-search-large {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(15, 125, 216, 0.18);
  border-radius: 8px;
  background: white;
  padding: 12px;
}

.lab-search-large span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--blue-2);
  color: var(--blue);
  font-weight: 900;
}

.lab-search-large input {
  min-height: 42px;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-weight: 850;
}

.lab-search-large button {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: var(--teal);
  color: white;
  padding: 0 16px;
  font-weight: 900;
}

.lab-canvas {
  display: grid;
  gap: 16px;
}

.lab-canvas-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 16px;
}

.lab-steps,
.lab-outline {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.lab-steps li,
.lab-outline li {
  border: 1px solid rgba(220, 231, 241, 0.95);
  border-radius: 8px;
  background: #fbfdff;
  padding: 11px 12px;
}

.lab-steps strong,
.lab-steps span {
  display: block;
}

.lab-steps strong {
  color: var(--navy);
  font-size: 13px;
}

.lab-steps span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.lab-outline li {
  color: var(--muted);
  font-weight: 900;
}

.lab-outline li.active {
  border-color: rgba(15, 125, 216, 0.25);
  background: var(--blue-2);
  color: var(--blue);
}

.lab-outline li.done {
  color: var(--teal);
}

.lab-export-list div {
  border: 1px solid rgba(220, 231, 241, 0.95);
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
}

.lab-export-list strong,
.lab-export-list span {
  display: block;
}

.lab-export-list strong {
  color: var(--navy);
}

.lab-export-list span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.lab-report-preview,
.lab-report-brief {
  border: 1px solid rgba(220, 231, 241, 0.95);
  border-radius: 8px;
  background: #fbfdff;
  padding: 16px;
  line-height: 1.65;
}

.lab-report-preview h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 20px;
}

.lab-report-preview p,
.lab-report-brief p {
  margin: 0 0 12px;
  color: var(--ink);
  font-weight: 750;
}

.lab-donut-wrap {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.lab-donut {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  background: conic-gradient(var(--segments));
  position: relative;
}

.lab-donut::after {
  content: "";
  position: absolute;
  inset: 44px;
  border-radius: 50%;
  background: white;
  box-shadow: inset 0 0 0 1px var(--line);
}

.lab-legend {
  display: grid;
  gap: 8px;
}

.lab-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.lab-legend i {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
}

.lab-legend b {
  margin-left: auto;
  color: var(--navy);
}

.lab-table {
  max-height: 360px;
  overflow: auto;
}

.lab-mini-section {
  margin-top: 14px;
}

@media (max-width: 1180px) {
  .lab-metrics,
  .lab-product-grid,
  .lab-question-row,
  .main-lab-metrics,
  .main-portfolio {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lab-two-col,
  .lab-three-col,
  .link-portfolio-grid,
  .lab-canvas-grid,
  .main-lab-grid,
  .main-report-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .lab-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .lab-switch {
    overflow-x: auto;
  }

  .lab-metrics,
  .lab-product-grid,
  .lab-question-row,
  .main-lab-metrics,
  .main-portfolio {
    grid-template-columns: 1fr;
  }

  .lab-donut-wrap {
    grid-template-columns: 1fr;
  }

  .lab-bar-row {
    grid-template-columns: 1fr;
  }
}

.lab-shell .app-frame,
.lab-shell {
  background: #f6f8fb;
}

.lab-shell .dashboard-page {
  padding-top: 18px;
}

.lab-hero {
  align-items: center;
  border-color: #e4eaf1;
  background: #ffffff;
  box-shadow: none;
}

.lab-hero h2 {
  font-size: 22px;
  line-height: 1.35;
}

.lab-switch {
  border-radius: 8px;
  background: #f3f6fa;
}

.lab-switch button {
  border-radius: 6px;
  color: #52616a;
  font-size: 13px;
}

.lab-switch button.active {
  background: #243033;
  color: #ffffff;
}

.lab-metric,
.lab-panel,
.lab-product-card,
.link-product-tile {
  border-color: #e4eaf1;
  background: #ffffff;
  box-shadow: none;
}

.lab-metric {
  min-height: 92px;
  padding: 14px;
}

.lab-metric strong {
  color: #1f2d34;
  font-size: 24px;
}

.lab-card-top strong {
  color: #1f6fb2;
  font-size: 21px;
}

.lab-bar-track span {
  background: #2a7ab8;
}

.lab-month-strip i,
.link-month-bars span {
  background: #a9c7dd;
}

.lab-month-strip b,
.link-month-bars b {
  background: #2d8a7d;
}

.lab-insight-card {
  background: #ffffff;
}

.lab-insight-card span {
  background: #edf3f6;
  color: #52616a;
}

.lab-question-row button,
.lab-filter-stack button {
  background: #ffffff;
}

.lab-search-large {
  border-color: #dce7f1;
  background: #ffffff;
}

.lab-search-large span {
  background: #edf3f6;
  color: #52616a;
}

.lab-search-large button {
  background: #243033;
}

.lab-donut {
  box-shadow: none;
}

.lab-report-preview,
.lab-report-brief,
.lab-steps li,
.lab-outline li,
.lab-export-list div {
  background: #ffffff;
}

.gmail-panel {
  margin-bottom: 16px;
}

.gmail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.gmail-message-list {
  display: grid;
  gap: 10px;
}

.gmail-message-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(220, 231, 241, 0.95);
  border-radius: 8px;
  background: white;
  padding: 12px;
}

.gmail-message-item strong,
.gmail-message-item small,
.gmail-message-item p {
  display: block;
}

.gmail-message-item strong {
  color: var(--ink);
  font-size: 14px;
}

.gmail-message-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.gmail-message-item p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.gmail-reply-preview {
  display: block;
}

.reply-preview-card {
  overflow: hidden;
  border: 1px solid rgba(15, 125, 216, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 30px rgba(15, 55, 77, 0.1);
}

.reply-body {
  min-height: 190px;
}

.reply-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 1100px) {
  .priority-metrics,
  .priority-grid,
  .mail-desk,
  .mail-status-strip {
    grid-template-columns: 1fr;
  }

  .result-summary {
    grid-template-columns: 1fr;
  }

  .gmail-message-item,
  .inline-form {
    grid-template-columns: 1fr;
  }

  .mail-list-panel,
  .mail-detail-panel {
    min-height: auto;
  }
}

/* Main dashboard visual polish */
.dashboard-shell {
  --dashboard-bg: #edf7ff;
  --dashboard-line: #dbe8f5;
  --dashboard-line-strong: #bfd6ec;
  --dashboard-text: #202124;
  --dashboard-muted: #5f6b75;
  --dashboard-blue: #0078d4;
  --dashboard-teal: #119c8d;
  --dashboard-accent: #837cff;
  --dashboard-navy: #070057;
  overflow-x: hidden;
  background: var(--dashboard-bg);
}

.dashboard-shell::before {
  inset: 76px 0 auto;
  height: 250px;
  opacity: 1;
  background:
    linear-gradient(180deg, #eaf5ff 0%, rgba(237, 247, 255, 0.75) 68%, rgba(237, 247, 255, 0) 100%),
    linear-gradient(90deg, rgba(0, 120, 212, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(0, 120, 212, 0.04) 1px, transparent 1px);
  background-size: auto, 36px 36px, 36px 36px;
}

.dashboard-shell::after {
  display: none;
}

.dashboard-shell .app-nav {
  min-height: 82px;
  grid-template-columns: minmax(260px, 360px) minmax(420px, 1fr) auto;
  gap: 18px;
  background: #ffffff;
  border-bottom: 1px solid #e7eef6;
  box-shadow: none;
  backdrop-filter: none;
}

.dashboard-shell .app-brand h1 {
  color: var(--dashboard-text);
  font-size: 18px;
  font-weight: 900;
}

.dashboard-shell .app-brand p,
.dashboard-shell #sourceLine {
  color: var(--dashboard-muted);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-shell .brand-mark {
  border: 0;
  border-radius: 7px;
  background: linear-gradient(145deg, #00a88f, #0078d4 62%, #837cff);
  box-shadow: none;
}

.dashboard-shell .brand-mark::before,
.dashboard-shell .brand-mark::after {
  display: none;
}

.dashboard-shell .primary-nav {
  min-height: 82px;
  gap: 12px;
}

.dashboard-shell .nav-tab {
  min-width: 74px;
  gap: 5px;
  border-bottom-width: 3px;
  color: #30343b;
  font-size: 13px;
  font-weight: 760;
}

.dashboard-shell .nav-icon {
  color: #1f2328;
  font-size: 20px;
}

.dashboard-shell .nav-tab:hover {
  color: #111827;
}

.dashboard-shell .nav-tab.active {
  color: var(--dashboard-text);
  border-bottom-color: var(--dashboard-accent);
}

.dashboard-shell .nav-tab.active .nav-icon {
  color: var(--dashboard-blue);
}

.dashboard-shell .nav-badge {
  top: 9px;
  right: 13px;
  border-color: #ffffff;
  background: #d14b62;
  box-shadow: none;
}

.dashboard-shell .icon-button,
.dashboard-shell .health-pill {
  border-radius: 7px;
  border-color: transparent;
  background: #ffffff;
  box-shadow: none;
}

.dashboard-shell .dashboard-page {
  max-width: 1580px;
  margin: 0 auto;
  padding: 20px 28px 38px;
}

.dashboard-shell .dashboard-toolbar {
  min-height: 48px;
  margin-bottom: 22px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.dashboard-shell .toolbar-group.align-end {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.dashboard-shell .toolbar-select {
  min-height: 44px;
  grid-template-columns: auto minmax(122px, 160px);
  border-color: #77b7e8;
  border-radius: 5px;
  background: #ffffff;
  padding: 0 10px 0 14px;
  box-shadow: none;
}

.dashboard-shell .toolbar-select span {
  color: var(--dashboard-muted);
  font-size: 12px;
  font-weight: 850;
}

.dashboard-shell .toolbar-select .select {
  min-height: 30px;
}

.dashboard-shell .button {
  min-height: 44px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 800;
  box-shadow: none;
}

.dashboard-shell .button.primary {
  border-color: #0078d4;
  background: #0078d4;
  color: #ffffff;
  box-shadow: none;
}

.dashboard-shell .button.secondary {
  border-color: #c8dff2;
  background: #ffffff;
  color: var(--dashboard-text);
  box-shadow: none;
}

.dashboard-shell .button:hover,
.dashboard-shell .icon-button:hover {
  border-color: var(--dashboard-line-strong);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(31, 45, 52, 0.08);
}

.dashboard-shell .round-action {
  min-height: 44px;
  padding: 0 14px 0 9px;
}

.dashboard-shell .action-icon {
  width: 27px;
  height: 27px;
  border-radius: 999px;
  background: #eaf5ff;
  color: #0078d4;
}

.dashboard-shell .ai-action .action-icon,
.dashboard-shell .xlsx-action .action-icon,
.dashboard-shell .csv-action .action-icon {
  background: #eaf5ff;
  color: #0078d4;
}

.dashboard-shell .dashboard-heading {
  align-items: center;
  margin-bottom: 18px;
  padding: 18px 22px;
  border: 1px solid #e1ebf5;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(36, 64, 96, 0.05);
}

.dashboard-shell .eyebrow {
  color: #005ea8;
  font-size: 11px;
  font-weight: 900;
}

.dashboard-shell #scopeTitle,
.dashboard-shell .dashboard-heading h2 {
  color: var(--dashboard-text);
  font-size: 27px;
  font-weight: 900;
}

.dashboard-shell .metrics-grid {
  gap: 12px;
}

.dashboard-shell .metric,
.dashboard-shell .panel,
.dashboard-shell .main-linked-section,
.dashboard-shell .lab-metric,
.dashboard-shell .lab-panel,
.dashboard-shell .lab-product-card,
.dashboard-shell .link-product-tile {
  border: 1px solid #e1ebf5;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(36, 64, 96, 0.06);
  backdrop-filter: none;
}

.dashboard-shell .metric {
  min-height: 96px;
  padding: 14px 15px;
}

.dashboard-shell .metric .label {
  color: var(--dashboard-muted);
  font-weight: 850;
}

.dashboard-shell .metric .value {
  color: var(--dashboard-navy);
  font-size: 30px;
  font-weight: 900;
}

.dashboard-shell .metric:nth-child(n) {
  border-top: 1px solid var(--dashboard-line);
}

.dashboard-shell .metric:nth-child(1) {
  border-left: 0;
  border-top: 3px solid #0078d4;
}

.dashboard-shell .metric:nth-child(2) {
  border-left: 0;
  border-top: 3px solid #00a88f;
}

.dashboard-shell .metric:nth-child(3) {
  border-left: 0;
  border-top: 3px solid #837cff;
}

.dashboard-shell .metric:nth-child(4) {
  border-left: 0;
  border-top: 3px solid #e85487;
}

.dashboard-shell .metric:nth-child(5) {
  border-left: 0;
  border-top: 3px solid #6264a7;
}

.dashboard-shell .metric:nth-child(6) {
  border-left: 0;
  border-top: 3px solid #5a6f82;
}

.dashboard-shell .ops-grid,
.dashboard-shell .clarity-grid {
  gap: 14px;
}

.dashboard-shell .panel-header {
  min-height: 50px;
  padding: 14px 17px 11px;
  border-bottom: 1px solid #edf3fa;
}

.dashboard-shell .panel-header h2 {
  color: var(--dashboard-text);
  font-size: 15px;
  font-weight: 900;
}

.dashboard-shell .muted {
  color: var(--dashboard-muted);
}

.dashboard-shell .insight-total {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 32px;
  border-color: #ead3df;
  border-radius: 5px;
  background: #fff6fa;
  color: #ad3f63;
  box-shadow: none;
}

.dashboard-shell .insight-total.stock {
  border-color: #eadfca;
  background: #fff9ec;
  color: #936615;
}

.dashboard-shell .insight-total.trend-total {
  border-color: #dcdfff;
  background: #f7f7ff;
  color: #514bd0;
}

.dashboard-shell .insight-row {
  min-height: 50px;
  border-color: var(--dashboard-line);
  border-radius: 6px;
  background: #ffffff;
  text-decoration: none;
}

.dashboard-shell .insight-row:hover,
.dashboard-shell .rank-item.interactive:hover {
  border-color: #b9ccd9;
  background: #f7fafc;
  transform: none;
}

.dashboard-shell .main-linked-section {
  padding: 16px;
  margin-bottom: 18px;
}

.dashboard-shell .section-heading {
  padding: 0 0 12px;
  border-bottom: 1px solid var(--dashboard-line);
}

.dashboard-shell .section-heading h2 {
  color: var(--dashboard-text);
  font-size: 20px;
  font-weight: 900;
}

.dashboard-shell .section-tabs {
  border-color: #d9e7f5;
  border-radius: 5px;
  background: #f4f9ff;
  padding: 3px;
}

.dashboard-shell .section-tabs button {
  min-height: 32px;
  border-radius: 4px;
  color: #596a74;
  font-size: 12px;
}

.dashboard-shell .section-tabs button.active {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(36, 64, 96, 0.12);
  color: #005ea8;
}

.dashboard-shell .main-lab-root {
  margin-top: 0;
}

.dashboard-shell .bar-track {
  height: 7px;
  background: #edf2f6;
}

.dashboard-shell .bar-fill {
  background: #0078d4;
}

.dashboard-shell .month-chart {
  height: 232px;
  padding: 12px 16px 18px;
  gap: 9px;
}

.dashboard-shell .month-bar .bar {
  background: var(--bar-color, #0078d4);
  border-radius: 4px 4px 0 0;
  box-shadow: none;
}

.dashboard-shell .month-bar.clickable-bar:hover .bar {
  filter: brightness(0.98);
  transform: translateY(-2px);
}

.dashboard-shell .month-bar .count,
.dashboard-shell .month-bar .month {
  color: var(--dashboard-muted);
}

.dashboard-shell .rank-list {
  gap: 7px;
  padding: 12px 16px 16px;
}

.dashboard-shell .rank-item {
  border-bottom: 1px solid #edf2f6;
  padding: 7px 0;
}

.dashboard-shell .rank-item:last-child {
  border-bottom: 0;
}

.dashboard-shell .rank-label {
  color: var(--dashboard-text);
  font-weight: 750;
}

.dashboard-shell .rank-count {
  color: var(--dashboard-muted);
}

.dashboard-shell .detail-header {
  align-items: center;
}

.dashboard-shell .detail-body {
  border-bottom-color: var(--dashboard-line);
}

.dashboard-shell .table-wrap table {
  border-collapse: collapse;
}

.dashboard-shell .table-wrap th {
  background: #f3f6fa;
  color: #44545e;
  font-size: 12px;
  font-weight: 900;
}

.dashboard-shell .table-wrap td {
  border-top: 1px solid #edf2f6;
}

.dashboard-shell .table-wrap tbody tr:hover {
  background: #f8fbfd;
}

.dashboard-shell .lab-card-top strong,
.dashboard-shell .lab-metric strong {
  color: #233848;
}

.dashboard-shell .lab-bar-track span {
  background: #0078d4;
}

.dashboard-shell .link-month-bars span {
  background: #b7d9f2;
}

.dashboard-shell .link-month-bars b {
  background: #00a88f;
}

.dashboard-shell .lab-insight-card {
  border-color: var(--dashboard-line);
  background: #ffffff;
}

.dashboard-shell .ai-toolbar,
.dashboard-shell .mail-page-heading,
.dashboard-shell .lab-hero {
  align-items: center;
  padding: 18px 22px;
  border: 1px solid #e1ebf5;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(36, 64, 96, 0.05);
}

.dashboard-shell .ai-toolbar h2,
.dashboard-shell .mail-page-heading h2,
.dashboard-shell .lab-hero h2 {
  color: var(--dashboard-text);
  font-size: 25px;
  font-weight: 900;
  line-height: 1.3;
}

.dashboard-shell .engine-details {
  border-color: #d9e7f5;
  border-radius: 8px;
  background: #f8fbff;
}

.dashboard-shell .chip {
  border-color: #c8dff2;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: none;
}

.dashboard-shell .chip:hover {
  border-color: #77b7e8;
  background: #f4f9ff;
}

.dashboard-shell .chat-log {
  background: #f8fbff;
}

.dashboard-shell .message.user {
  background: #0078d4;
}

.dashboard-shell .message.assistant {
  border-color: #e1ebf5;
  background: #ffffff;
}

.dashboard-shell .message.assistant:not(.download-message):not(.report-job-message)::before,
.dashboard-shell .tooltip-kicker {
  color: #005ea8;
}

.dashboard-shell .ask-form {
  background: #ffffff;
}

.dashboard-shell .ask-form input,
.dashboard-shell .select,
.dashboard-shell .login-card input,
.dashboard-shell .inline-form input,
.dashboard-shell .priority-textarea {
  border-color: #d9e7f5;
  border-radius: 6px;
}

.dashboard-shell .ask-form input:focus,
.dashboard-shell .select:focus,
.dashboard-shell .inline-form input:focus,
.dashboard-shell .priority-textarea:focus {
  border-color: #77b7e8;
  box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.12);
}

.dashboard-shell .context-box,
.dashboard-shell .priority-result,
.dashboard-shell .draft-box,
.dashboard-shell .mail-body-box,
.dashboard-shell .mail-detail-meta div {
  border-color: #e1ebf5;
  border-radius: 8px;
  background: #ffffff;
}

.dashboard-shell .mail-status-card,
.dashboard-shell .priority-metric {
  border-color: #e1ebf5;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(36, 64, 96, 0.06);
}

.dashboard-shell .mail-status-card strong,
.dashboard-shell .priority-metric strong,
.dashboard-shell .result-summary strong {
  color: var(--dashboard-navy);
}

.dashboard-shell .mail-list-toolbar {
  border-bottom-color: #e1ebf5;
  background: #ffffff;
}

.dashboard-shell .mail-search {
  border-color: #d9e7f5;
  border-radius: 6px;
  background: #ffffff;
}

.dashboard-shell .mail-table th {
  border-bottom-color: #d9e7f5;
  background: #f4f9ff;
  color: #52616d;
}

.dashboard-shell .mail-row {
  border-bottom-color: #edf3fa;
}

.dashboard-shell .mail-row:hover,
.dashboard-shell .mail-row.selected {
  background: #f0f8ff;
}

.dashboard-shell .mail-title-button {
  color: #005ea8;
}

.dashboard-shell .mail-status-pill,
.dashboard-shell .attachment-preview-button {
  border-color: #c8dff2;
  background: #eaf5ff;
  color: #005ea8;
}

.dashboard-shell .lab-switch {
  border-color: #d9e7f5;
  border-radius: 6px;
  background: #f4f9ff;
}

.dashboard-shell .lab-switch button {
  border-radius: 4px;
  color: #596a74;
}

.dashboard-shell .lab-switch button.active {
  background: #ffffff;
  color: #005ea8;
  box-shadow: 0 1px 3px rgba(36, 64, 96, 0.12);
}

.dashboard-shell .lab-search-large,
.dashboard-shell .lab-report-preview,
.dashboard-shell .lab-report-brief,
.dashboard-shell .lab-steps li,
.dashboard-shell .lab-outline li,
.dashboard-shell .lab-export-list div,
.dashboard-shell .lab-question-row button,
.dashboard-shell .lab-filter-stack button {
  border-color: #e1ebf5;
  background: #ffffff;
}

.dashboard-shell .lab-search-large span,
.dashboard-shell .lab-insight-card span {
  background: #eaf5ff;
  color: #005ea8;
}

.dashboard-shell .lab-search-large button {
  background: #0078d4;
}

.dashboard-shell .home-hero-copy {
  max-width: 780px;
  margin-top: 8px;
  color: var(--dashboard-muted);
  font-size: 13px;
  font-weight: 720;
  line-height: 1.5;
}

.dashboard-shell .home-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-shell .home-action-card {
  min-height: 150px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 18px;
  color: var(--dashboard-text);
  text-decoration: none;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.dashboard-shell .home-action-card:hover {
  border-color: #b7d9f2;
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(36, 64, 96, 0.1);
}

.dashboard-shell .home-action-card span {
  width: fit-content;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #c8dff2;
  border-radius: 999px;
  background: #eaf5ff;
  color: #005ea8;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.dashboard-shell .home-action-card strong {
  color: var(--dashboard-text);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.4;
}

.dashboard-shell .home-action-card small {
  color: var(--dashboard-muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
}

.dashboard-shell .home-action-card.primary-card {
  border-color: rgba(0, 120, 212, 0.28);
  background:
    linear-gradient(180deg, rgba(234, 245, 255, 0.88), rgba(255, 255, 255, 0.96)),
    #ffffff;
}

.dashboard-shell .monday-workspace {
  display: grid;
  gap: 14px;
  margin: 16px 0;
}

.dashboard-shell .monday-workspace-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 0 2px;
}

.dashboard-shell .monday-workspace-top h2 {
  margin: 3px 0 0;
  color: var(--dashboard-text);
  font-size: 23px;
  font-weight: 900;
}

.dashboard-shell .monday-actions,
.dashboard-shell .monday-board-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-shell .monday-view-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid #d9e7f5;
}

.dashboard-shell .monday-view-tabs button {
  min-height: 38px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #596a74;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.dashboard-shell .monday-view-tabs button.active {
  color: var(--dashboard-text);
  border-bottom-color: #00c875;
}

.dashboard-shell .monday-widget-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.05fr) minmax(260px, 1fr) minmax(220px, 0.8fr) minmax(260px, 1fr);
  gap: 14px;
}

.dashboard-shell .monday-widget,
.dashboard-shell .monday-board {
  min-height: 220px;
  padding: 15px;
}

.dashboard-shell .monday-widget .panel-header.slim,
.dashboard-shell .monday-board .panel-header.slim {
  min-height: auto;
  padding: 0 0 12px;
}

.dashboard-shell .monday-widget h3,
.dashboard-shell .monday-board h3 {
  margin: 0;
  color: var(--dashboard-text);
  font-size: 15px;
  font-weight: 900;
}

.dashboard-shell .monday-overview-list {
  display: grid;
  gap: 10px;
}

.dashboard-shell .monday-overview-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(90px, 0.75fr) minmax(48px, auto) minmax(58px, auto);
  align-items: center;
  gap: 10px;
}

.dashboard-shell .monday-overview-row span,
.dashboard-shell .monday-overview-row small,
.dashboard-shell .monday-overview-row b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-shell .monday-overview-row span {
  color: var(--dashboard-text);
  font-size: 13px;
  font-weight: 900;
}

.dashboard-shell .monday-overview-row small {
  color: var(--dashboard-muted);
  font-size: 11px;
  font-weight: 750;
}

.dashboard-shell .monday-overview-row b {
  color: #323338;
  font-size: 12px;
  text-align: right;
}

.dashboard-shell .monday-progress,
.dashboard-shell .monday-table-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf3;
}

.dashboard-shell .monday-progress i,
.dashboard-shell .monday-table-progress i {
  width: var(--w);
  height: 100%;
  display: block;
  border-radius: inherit;
  background: #0073ea;
}

.dashboard-shell .monday-battery {
  height: 44px;
  display: flex;
  overflow: hidden;
  border-radius: 4px;
  background: #d8dbe1;
  box-shadow: inset 0 0 0 1px rgba(50, 51, 56, 0.08);
}

.dashboard-shell .monday-battery span {
  width: var(--w);
  min-width: 8px;
}

.dashboard-shell .monday-legend {
  display: flex;
  gap: 10px 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.dashboard-shell .monday-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--dashboard-muted);
  font-size: 11px;
  font-weight: 850;
}

.dashboard-shell .monday-legend i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.dashboard-shell .monday-legend b {
  color: var(--dashboard-text);
}

.dashboard-shell .monday-battery .done,
.dashboard-shell .monday-legend .done,
.dashboard-shell .monday-status.done,
.dashboard-shell .monday-group-dot.done {
  background: #00c875;
}

.dashboard-shell .monday-battery .working,
.dashboard-shell .monday-legend .working,
.dashboard-shell .monday-status.working,
.dashboard-shell .monday-group-dot.working {
  background: #fdab3d;
}

.dashboard-shell .monday-battery .stuck,
.dashboard-shell .monday-legend .stuck,
.dashboard-shell .monday-status.stuck,
.dashboard-shell .monday-group-dot.stuck {
  background: #e2445c;
}

.dashboard-shell .monday-battery .review,
.dashboard-shell .monday-legend .review,
.dashboard-shell .monday-status.review,
.dashboard-shell .monday-group-dot.review {
  background: #579bfc;
}

.dashboard-shell .monday-chart {
  height: 150px;
  display: grid;
  grid-template-columns: repeat(5, minmax(34px, 1fr));
  align-items: end;
  gap: 10px;
}

.dashboard-shell .monday-chart-row {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 6px;
}

.dashboard-shell .monday-chart-row span {
  width: 100%;
  min-height: 28px;
  overflow: hidden;
  color: var(--dashboard-muted);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
}

.dashboard-shell .monday-chart-row i {
  width: 34px;
  height: var(--h);
  min-height: 8px;
  border-radius: 4px 4px 0 0;
  background: #0073ea;
}

.dashboard-shell .monday-chart-row .tone-2 {
  background: #00c875;
}

.dashboard-shell .monday-chart-row .tone-3 {
  background: #fdab3d;
}

.dashboard-shell .monday-chart-row .tone-4 {
  background: #a25ddc;
}

.dashboard-shell .monday-chart-row .tone-5 {
  background: #e2445c;
}

.dashboard-shell .monday-chart-row b {
  color: var(--dashboard-text);
  font-size: 12px;
  font-weight: 900;
}

.dashboard-shell .monday-timeline {
  display: grid;
  gap: 11px;
}

.dashboard-shell .monday-timeline-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 10px;
}

.dashboard-shell .monday-timeline-row span,
.dashboard-shell .monday-timeline-row b {
  color: var(--dashboard-muted);
  font-size: 11px;
  font-weight: 850;
}

.dashboard-shell .monday-timeline-row div {
  height: 20px;
  border-radius: 4px;
  background: #eef3f8;
}

.dashboard-shell .monday-timeline-row i {
  width: var(--w);
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #00c875, #0073ea);
}

.dashboard-shell .monday-board-tools button {
  min-height: 30px;
  border: 1px solid #d9e7f5;
  border-radius: 4px;
  background: #ffffff;
  color: #52616d;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 850;
}

.dashboard-shell .monday-table-wrap {
  max-height: 420px;
  overflow: auto;
}

.dashboard-shell .monday-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f6f8fb;
}

.dashboard-shell .monday-table td:first-child {
  font-weight: 900;
  color: var(--dashboard-text);
}

.dashboard-shell .monday-table td strong,
.dashboard-shell .monday-table td small {
  display: block;
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-shell .monday-table td strong {
  color: var(--dashboard-text);
  font-size: 13px;
}

.dashboard-shell .monday-table td small {
  margin-top: 2px;
  color: var(--dashboard-muted);
  font-size: 11px;
}

.dashboard-shell .monday-status {
  min-width: 96px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: #ffffff;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 900;
}

.dashboard-shell .monday-group-dot {
  width: 9px;
  height: 9px;
  display: inline-block;
  border-radius: 999px;
  margin-right: 8px;
}

@media (max-width: 1180px) {
  .dashboard-shell .app-nav {
    grid-template-columns: 1fr;
    padding: 12px 18px;
  }

  .dashboard-shell .primary-nav {
    justify-content: flex-start;
    min-height: auto;
    overflow-x: auto;
  }

  .dashboard-shell .nav-actions {
    justify-content: flex-start;
  }

  .dashboard-shell .home-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-shell .monday-widget-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-shell .monday-workspace-top {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .dashboard-shell .dashboard-page {
    padding: 18px 14px 28px;
  }

  .dashboard-shell .dashboard-toolbar,
  .dashboard-shell .dashboard-heading,
  .dashboard-shell .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-shell .toolbar-group,
  .dashboard-shell .toolbar-group.align-end {
    justify-content: stretch;
  }

  .dashboard-shell .toolbar-select,
  .dashboard-shell .toolbar-group .button {
    width: 100%;
  }

  .dashboard-shell .section-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .dashboard-shell .home-action-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-shell .monday-widget-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-shell .monday-overview-row,
  .dashboard-shell .monday-timeline-row {
    grid-template-columns: 1fr;
  }

  .dashboard-shell .monday-chart {
    overflow-x: auto;
  }
}

/* Analysis page readability pass */
.analysis-shell .dashboard-page {
  max-width: 1380px;
  gap: 18px;
}

.analysis-shell .dashboard-toolbar,
.analysis-shell .dashboard-heading,
.analysis-shell .clarity-metrics,
.analysis-shell .clarity-grid,
.analysis-shell .detail-grid,
.analysis-shell .records-section,
.analysis-shell .main-linked-section {
  margin-bottom: 0;
}

.analysis-shell .dashboard-heading {
  padding: 20px 24px;
}

.analysis-shell .dashboard-heading h2 {
  font-size: 25px;
}

.analysis-shell .home-hero-copy {
  max-width: 760px;
}

.analysis-shell .clarity-metrics {
  grid-template-columns: repeat(6, minmax(130px, 1fr));
}

.analysis-shell .metric {
  min-height: 88px;
}

.analysis-shell .metric .value {
  font-size: 27px;
}

.analysis-shell .clarity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto auto auto;
  gap: 14px;
  align-items: stretch;
  margin-top: 2px;
}

.analysis-shell .clarity-grid::before,
.analysis-shell .detail-grid::before,
.analysis-shell .records-section::before,
.analysis-shell .main-linked-section::before {
  display: flex;
  align-items: center;
  min-height: 34px;
  color: #233848;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0;
}

.analysis-shell .clarity-grid::before {
  content: "분석 요약";
  grid-column: 1 / -1;
}

.analysis-shell .clarity-grid .wide {
  grid-column: 1 / -1;
  grid-row: auto;
  align-self: stretch;
}

.analysis-shell .clarity-grid .panel:not(.wide) {
  grid-column: auto;
  height: auto;
  min-height: 280px;
}

.analysis-shell .clarity-grid .panel {
  overflow: hidden;
}

.analysis-shell .month-chart {
  min-height: 0;
  height: 320px;
}

.analysis-shell .rank-list {
  max-height: 232px;
  overflow: auto;
}

.analysis-shell .rank-item {
  min-height: 38px;
}

.analysis-shell .detail-grid {
  display: grid;
  gap: 10px;
  margin-top: 2px;
}

.analysis-shell .detail-grid::before {
  content: "선택 상세";
}

.analysis-shell .detail-panel {
  overflow: hidden;
}

.analysis-shell .detail-header {
  align-items: flex-start;
  padding: 16px 18px 12px;
}

.analysis-shell .detail-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.analysis-shell .detail-summary {
  padding: 14px 18px;
  background: #fbfdff;
  border-bottom: 1px solid #edf2f6;
}

.analysis-shell .detail-body {
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1fr);
  gap: 18px;
  padding: 16px 18px;
}

.analysis-shell .detail-body h3 {
  margin-bottom: 10px;
  color: #233848;
  font-size: 14px;
}

.analysis-shell .detail-table-wrap {
  max-height: 370px;
  overflow: auto;
}

.analysis-shell .table-wrap table {
  min-width: 860px;
}

.analysis-shell .table-wrap th,
.analysis-shell .table-wrap td {
  padding: 10px 12px;
  vertical-align: middle;
}

.analysis-shell .table-wrap tbody tr:nth-child(even) {
  background: #fbfdff;
}

.analysis-shell .records-section {
  display: grid;
  gap: 10px;
  margin-top: 2px;
}

.analysis-shell .records-section::before {
  content: "최근 원본 내역";
}

.analysis-shell .records-section .table-wrap {
  max-height: 300px;
  overflow: auto;
}

.analysis-shell .main-linked-section {
  gap: 12px;
  margin-top: 2px;
  padding: 16px 18px 18px;
}

.analysis-shell .main-linked-section::before {
  content: "업무일지 연계 분석";
}

.analysis-shell .main-linked-section .section-heading {
  padding-top: 0;
}

.analysis-shell .main-linked-section .section-heading h2 {
  font-size: 18px;
}

.analysis-shell .main-lab-root {
  max-height: 620px;
  overflow: auto;
  padding-right: 4px;
}

@media (max-width: 1180px) {
  .analysis-shell .clarity-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .analysis-shell .clarity-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .analysis-shell .clarity-grid .wide,
  .analysis-shell .clarity-grid .panel:not(.wide) {
    grid-column: 1;
    grid-row: auto;
    height: auto;
    min-height: 0;
  }

  .analysis-shell .month-chart {
    min-height: 260px;
  }

  .analysis-shell .detail-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .analysis-shell .dashboard-page {
    gap: 14px;
    padding: 16px 12px 28px;
  }

  .analysis-shell .clarity-metrics {
    grid-template-columns: 1fr;
  }

  .analysis-shell .toolbar-group.align-end {
    justify-content: stretch;
  }

  .analysis-shell .detail-header {
    align-items: stretch;
  }
}

.monday-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  background: #f5f6fa;
  color: #323338;
  font-family: "Segoe UI", "Noto Sans KR", Arial, sans-serif;
  letter-spacing: 0;
}

.monday-sidebar {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 18px;
  border-right: 1px solid #dfe3eb;
  background: #ffffff;
  padding: 16px 12px;
}

.monday-logo-row {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #323338;
  font-weight: 900;
}

.monday-logo-dot {
  width: 13px;
  height: 13px;
  display: inline-block;
  border-radius: 999px;
}

.monday-logo-dot.red {
  background: #ff3d57;
}

.monday-logo-dot.yellow {
  background: #ffcb00;
}

.monday-logo-dot.green {
  background: #00ca72;
}

.monday-side-nav {
  display: grid;
  align-content: start;
  gap: 6px;
}

.monday-side-nav a {
  min-height: 40px;
  display: flex;
  align-items: center;
  border-radius: 6px;
  color: #4b4e5a;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.monday-side-nav a.active,
.monday-side-nav a:hover {
  background: #eaf3ff;
  color: #0073ea;
}

.monday-side-box {
  display: grid;
  gap: 8px;
  border: 1px solid #dfe3eb;
  border-radius: 8px;
  background: #f7f8fb;
  padding: 13px;
}

.monday-side-box span,
.monday-side-box strong {
  display: block;
}

.monday-side-box span {
  color: #676879;
  font-size: 12px;
  font-weight: 800;
}

.monday-side-box strong {
  color: #323338;
  font-size: 15px;
  font-weight: 900;
}

.monday-side-box button,
.monday-top-actions button,
.monday-toolbar button,
.monday-head-actions a {
  min-height: 36px;
  border: 1px solid #c5c7d0;
  border-radius: 4px;
  background: #ffffff;
  color: #323338;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.monday-main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
}

.monday-topbar {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #dfe3eb;
  background: #ffffff;
  padding: 0 22px;
}

.monday-breadcrumb {
  color: #676879;
  font-size: 13px;
  font-weight: 800;
}

.monday-top-actions,
.monday-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.monday-top-actions button:hover,
.monday-toolbar button:hover,
.monday-head-actions a:hover {
  background: #f0f3ff;
  border-color: #0073ea;
}

.monday-board-head {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: #ffffff;
  padding: 18px 22px 12px;
}

.monday-board-head h1 {
  margin: 0;
  color: #323338;
  font-size: 31px;
  font-weight: 900;
}

.monday-board-head p {
  margin: 4px 0 0;
  color: #676879;
  font-size: 14px;
  font-weight: 760;
}

.monday-head-actions a:first-child {
  border-color: #0073ea;
  background: #0073ea;
  color: #ffffff;
}

.monday-board-tabs {
  display: flex;
  gap: 3px;
  overflow-x: auto;
  border-bottom: 1px solid #dfe3eb;
  background: #ffffff;
  padding: 0 22px;
}

.monday-board-tabs button {
  min-height: 46px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #676879;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.monday-board-tabs button.active {
  color: #323338;
  border-bottom-color: #0073ea;
}

.monday-toolbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #e6e9ef;
  background: #ffffff;
  padding: 0 22px;
}

.monday-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #676879;
  font-size: 12px;
  font-weight: 850;
}

.monday-toolbar select {
  min-height: 32px;
  border: 1px solid #c5c7d0;
  border-radius: 4px;
  background: #ffffff;
  color: #323338;
  padding: 0 9px;
}

.monday-content-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(760px, 1fr) 320px;
  gap: 16px;
  padding: 18px 22px 24px;
}

.monday-board-sheet {
  min-width: 0;
  overflow: auto;
  border: 1px solid #dfe3eb;
  border-radius: 8px;
  background: #ffffff;
}

.monday-dashboard-panel {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 14px;
}

.monday-group-title {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-top: 1px solid #e6e9ef;
  color: #323338;
  padding: 0 14px;
  font-size: 18px;
  font-weight: 900;
}

.monday-group-title:first-child {
  border-top: 0;
}

.monday-group-title span {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.monday-group-title.waiting span {
  background: #fdab3d;
}

.monday-group-title.growth span {
  background: #579bfc;
}

.monday-group-title.recent span {
  background: #00c875;
}

.monday-sheet-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
  table-layout: fixed;
}

.monday-sheet-table col:nth-child(1) {
  width: 34%;
}

.monday-sheet-table col:nth-child(2) {
  width: 12%;
}

.monday-sheet-table col:nth-child(3) {
  width: 14%;
}

.monday-sheet-table col:nth-child(4) {
  width: 20%;
}

.monday-sheet-table col:nth-child(5) {
  width: 12%;
}

.monday-sheet-table col:nth-child(6) {
  width: 8%;
}

.monday-sheet-table th,
.monday-sheet-table td {
  height: 58px;
  border-top: 1px solid #e6e9ef;
  border-right: 1px solid #e6e9ef;
  padding: 8px 12px;
  overflow: hidden;
  color: #323338;
  font-size: 14px;
  line-height: 1.35;
  white-space: normal;
  word-break: keep-all;
}

.monday-sheet-table th {
  height: 42px;
  background: #f7f8fb;
  color: #676879;
  font-size: 13px;
  font-weight: 850;
  text-align: left;
}

.monday-sheet-table th:first-child,
.monday-sheet-table td:first-child {
  border-left: 5px solid #fdab3d;
}

.monday-sheet-table td strong {
  display: -webkit-box;
  overflow: hidden;
  color: #202124;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.monday-cell-text {
  display: -webkit-box;
  overflow: hidden;
  color: #323338;
  line-height: 1.35;
  word-break: keep-all;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.monday-group-title.growth + .monday-sheet-table td:first-child,
.monday-group-title.growth + .monday-sheet-table th:first-child {
  border-left-color: #579bfc;
}

.monday-group-title.recent + .monday-sheet-table td:first-child,
.monday-group-title.recent + .monday-sheet-table th:first-child {
  border-left-color: #00c875;
}

.monday-native-status {
  min-width: 94px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  color: #ffffff;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 900;
}

.monday-native-status.done,
.monday-native-battery .done,
.monday-native-legend .done {
  background: #00c875;
}

.monday-native-status.working,
.monday-native-battery .working,
.monday-native-legend .working {
  background: #fdab3d;
}

.monday-native-status.stuck,
.monday-native-battery .stuck,
.monday-native-legend .stuck {
  background: #e2445c;
}

.monday-native-status.review,
.monday-native-battery .review,
.monday-native-legend .review {
  background: #579bfc;
}

.monday-native-progress {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6e9ef;
}

.monday-native-progress i {
  width: var(--w);
  height: 100%;
  display: block;
  border-radius: inherit;
  background: #0073ea;
}

.monday-number-widget,
.monday-widget-card {
  border: 1px solid #dfe3eb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(50, 51, 56, 0.05);
}

.monday-number-widget {
  display: grid;
  gap: 5px;
  padding: 16px;
}

.monday-number-widget span,
.monday-number-widget small {
  color: #676879;
  font-size: 12px;
  font-weight: 850;
}

.monday-number-widget strong {
  color: #323338;
  font-size: 32px;
  font-weight: 900;
}

.monday-widget-card {
  padding: 14px;
}

.monday-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.monday-widget-head h2 {
  margin: 0;
  color: #323338;
  font-size: 16px;
  font-weight: 900;
}

.monday-widget-head span {
  color: #676879;
  font-size: 12px;
  font-weight: 850;
}

.monday-native-battery {
  height: 42px;
  display: flex;
  overflow: hidden;
  border-radius: 4px;
  background: #dfe3eb;
}

.monday-native-battery span {
  width: var(--w);
  min-width: 8px;
}

.monday-native-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 12px;
}

.monday-native-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #676879;
  font-size: 11px;
  font-weight: 850;
}

.monday-native-legend i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.monday-native-chart {
  height: 174px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  gap: 9px;
}

.monday-native-chart div {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 6px;
}

.monday-native-chart i {
  width: 34px;
  height: var(--h);
  min-height: 12px;
  border-radius: 4px 4px 0 0;
  background: #0073ea;
}

.monday-native-chart .tone-2 {
  background: #00c875;
}

.monday-native-chart .tone-3 {
  background: #fdab3d;
}

.monday-native-chart .tone-4 {
  background: #a25ddc;
}

.monday-native-chart .tone-5 {
  background: #e2445c;
}

.monday-native-chart span {
  width: 100%;
  min-height: 28px;
  overflow: hidden;
  color: #676879;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
}

.monday-native-chart b {
  color: #323338;
  font-size: 12px;
}

.monday-native-timeline {
  display: grid;
  gap: 10px;
}

.monday-native-timeline div {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 9px;
}

.monday-native-timeline span,
.monday-native-timeline b {
  color: #676879;
  font-size: 12px;
  font-weight: 850;
}

.monday-native-timeline i {
  width: var(--w);
  height: 18px;
  display: block;
  border-radius: 4px;
  background: linear-gradient(90deg, #00c875, #0073ea);
}

@media (max-width: 1180px) {
  .monday-app {
    grid-template-columns: 1fr;
  }

  .monday-sidebar {
    min-height: auto;
    grid-template-rows: auto auto auto;
  }

  .monday-content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .monday-topbar,
  .monday-board-head,
  .monday-toolbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
  }

  .monday-content-grid {
    padding: 14px;
  }

  .monday-sheet-table {
    min-width: 840px;
  }

  .monday-native-timeline div {
    grid-template-columns: 1fr;
  }
}

.manus-app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  background: #111318;
  color: #f4f5f7;
  font-family: "Segoe UI", "Noto Sans KR", Arial, sans-serif;
  letter-spacing: 0;
}

.manus-side {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 18px;
  border-right: 1px solid #2b2f3a;
  background: #171a21;
  padding: 20px;
}

.manus-side-top h1,
.manus-main h2,
.manus-report-page h1,
.manus-report-page h2 {
  margin: 0;
  letter-spacing: 0;
}

.manus-side-top h1 {
  margin-top: 14px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

.manus-side-top p,
.manus-message p,
.manus-prompt-box label,
.manus-report-page p,
.manus-report-page li,
.manus-report-page span {
  color: #aeb6c5;
  line-height: 1.55;
}

.manus-back-link {
  color: #cdd5e5;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.manus-thread {
  display: grid;
  align-content: start;
  gap: 12px;
  overflow: auto;
}

.manus-message {
  border: 1px solid #2b2f3a;
  border-radius: 8px;
  background: #1d212b;
  padding: 13px;
}

.manus-message.user {
  background: #242936;
}

.manus-message span {
  display: block;
  margin-bottom: 6px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.manus-message p {
  margin: 0;
  font-size: 13px;
}

.manus-prompt-box {
  display: grid;
  gap: 10px;
}

.manus-prompt-box textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid #343a48;
  border-radius: 8px;
  background: #101319;
  color: #ffffff;
  padding: 12px;
  font: inherit;
  outline: none;
}

.manus-prompt-box textarea:focus {
  border-color: #6ad7a8;
  box-shadow: 0 0 0 3px rgba(106, 215, 168, 0.14);
}

.manus-prompt-box button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: #f2f4f7;
  color: #111318;
  font-weight: 900;
  cursor: pointer;
}

.manus-main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  padding: 20px;
}

.manus-topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.manus-topbar h2 {
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

.manus-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.manus-top-actions a,
.manus-top-actions span,
.manus-report-toolbar button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #343a48;
  border-radius: 7px;
  background: #1d212b;
  color: #d9deea;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.manus-top-actions span {
  border-color: rgba(106, 215, 168, 0.34);
  color: #6ad7a8;
}

.manus-tabs {
  display: flex;
  gap: 8px;
}

.manus-tabs button {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #aeb6c5;
  padding: 0 12px;
  font-weight: 900;
}

.manus-tabs button.active {
  border-color: #343a48;
  background: #1d212b;
  color: #ffffff;
}

.manus-workspace-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 1fr);
  gap: 14px;
}

.manus-status-card,
.manus-report-card {
  min-height: 0;
  border: 1px solid #2b2f3a;
  border-radius: 8px;
  background: #f8f9fb;
  color: #1f2430;
  overflow: hidden;
}

.manus-status-card {
  padding: 16px;
}

.manus-status-card h3,
.manus-report-toolbar h3 {
  margin: 0;
  color: #1f2430;
  font-size: 15px;
  font-weight: 900;
}

.manus-step-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.manus-step-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
}

.manus-step-list li > span {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 2px solid #c8d0dc;
  border-radius: 999px;
}

.manus-step-list li.done > span {
  border-color: #15a66a;
  background: #15a66a;
}

.manus-step-list li.active > span {
  border-color: #2979ff;
  box-shadow: 0 0 0 4px rgba(41, 121, 255, 0.12);
}

.manus-step-list strong,
.manus-step-list small {
  display: block;
}

.manus-step-list strong {
  color: #1f2430;
  font-size: 13px;
  font-weight: 900;
}

.manus-step-list small {
  margin-top: 2px;
  color: #697386;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
}

.manus-report-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.manus-report-toolbar {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e2e7ef;
  background: #ffffff;
  padding: 0 16px;
}

.manus-report-toolbar div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.manus-report-toolbar button {
  border-color: #dde4ef;
  background: #f8fafc;
  color: #566176;
}

.manus-report-preview {
  overflow: auto;
  padding: 26px;
}

.manus-report-page {
  max-width: 920px;
  min-height: 980px;
  margin: 0 auto;
  border: 1px solid #e2e7ef;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2430;
  padding: 34px;
  box-shadow: 0 22px 48px rgba(14, 18, 28, 0.12);
}

.manus-report-page header {
  border-bottom: 1px solid #e2e7ef;
  padding-bottom: 22px;
}

.manus-report-page header p {
  margin: 0 0 8px;
  color: #15a66a;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.manus-report-page h1 {
  color: #1f2430;
  font-size: 32px;
  line-height: 1.22;
}

.manus-report-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.manus-report-metrics div,
.manus-action-grid div {
  border: 1px solid #e2e7ef;
  border-radius: 8px;
  background: #f8fafc;
  padding: 14px;
}

.manus-report-metrics span,
.manus-action-grid span {
  display: block;
  color: #697386;
  font-size: 12px;
  font-weight: 800;
}

.manus-report-metrics strong {
  display: block;
  margin-top: 5px;
  color: #1f2430;
  font-size: 26px;
  font-weight: 900;
}

.manus-report-section {
  margin-top: 24px;
}

.manus-report-section.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.manus-report-section h2 {
  color: #1f2430;
  font-size: 18px;
  font-weight: 900;
}

.manus-report-section p,
.manus-report-section li {
  color: #3f4858;
  font-size: 14px;
}

.manus-mini-bars {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.manus-mini-bars div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
  gap: 6px 10px;
}

.manus-mini-bars span {
  grid-column: 1 / -1;
  overflow: hidden;
  color: #3f4858;
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manus-mini-bars i {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #15a66a, #2979ff);
}

.manus-mini-bars i {
  width: var(--w);
}

.manus-mini-bars b {
  color: #1f2430;
  font-size: 12px;
  text-align: right;
}

.manus-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.manus-action-grid strong {
  display: block;
  margin-bottom: 5px;
  color: #1f2430;
  font-weight: 900;
}

@media (max-width: 1080px) {
  .manus-app-shell,
  .manus-workspace-grid {
    grid-template-columns: 1fr;
  }

  .manus-side {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .manus-main,
  .manus-side {
    padding: 14px;
  }

  .manus-topbar,
  .manus-report-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .manus-report-preview {
    padding: 12px;
  }

  .manus-report-page {
    min-height: auto;
    padding: 20px;
  }

  .manus-report-metrics,
  .manus-report-section.two,
  .manus-action-grid {
    grid-template-columns: 1fr;
  }
}

/* Formal product theme and revised work surfaces */
:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --ink: #1f2933;
  --muted: #667085;
  --line: #dde5ee;
  --blue: #1b64da;
  --blue-2: #eef4ff;
  --teal: #16836f;
  --teal-2: #e8f6f2;
  --navy: #162033;
  --shadow: 0 12px 28px rgba(31, 41, 55, 0.08);
  --soft-shadow: 0 8px 22px rgba(31, 41, 55, 0.06);
}

body {
  background: #f5f7fa;
  color: var(--ink);
  font-family: "Inter", "Pretendard", "Segoe UI", "Noto Sans KR", Arial, sans-serif;
}

.app-frame,
.dashboard-shell.app-frame {
  background: #f5f7fa;
}

.app-frame::before,
.app-frame::after {
  display: none;
}

.app-nav {
  background: #ffffff;
  border-bottom-color: #e3e9f1;
  box-shadow: 0 1px 2px rgba(31, 41, 55, 0.04);
}

.brand-mark {
  background: #1b64da;
}

.nav-tab.active {
  border-bottom-color: #1b64da;
}

.button.primary {
  background: #1b64da;
  color: #ffffff;
}

.button.secondary {
  border-color: #d8e2ee;
  background: #ffffff;
  color: #344054;
}

.button.secondary:hover,
.button.ghost:hover {
  background: #f1f5f9;
}

.health-pill {
  border-color: #d8e2ee;
  background: #f8fafc;
  color: #344054;
}

.dashboard-shell .panel,
.dashboard-shell .metric,
.dashboard-shell .mail-page-heading,
.dashboard-shell .lab-hero,
.worklog-fast-card,
.worklog-db-card,
.worklog-entry-list {
  border-color: #dfe7f0;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(31, 41, 55, 0.05);
}

.worklog-entry-list .table-wrap {
  max-height: none;
}

.worklog-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  border-top: 1px solid #e8eef5;
  padding: 12px 14px;
  background: #ffffff;
}

.worklog-pagination button,
.worklog-pagination span {
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #d8e2ee;
  border-radius: 6px;
  background: #ffffff;
  color: #344054;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 850;
}

.worklog-pagination button {
  cursor: pointer;
}

.worklog-pagination button.active {
  border-color: #1b64da;
  background: #eef4ff;
  color: #1b64da;
}

.worklog-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.worklog-pagination span {
  border-color: transparent;
  background: transparent;
  color: #8a96a8;
}

.ai-page {
  max-width: 1680px;
  margin: 0 auto;
}

.liner-workspace {
  min-height: calc(100vh - 108px);
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 360px;
  gap: 16px;
}

.liner-rail,
.liner-main,
.liner-context-panel {
  min-width: 0;
  border: 1px solid #dfe7f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(31, 41, 55, 0.05);
}

.liner-rail {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
}

.liner-profile {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.liner-profile strong,
.liner-profile span,
.liner-rail-section span {
  display: block;
}

.liner-profile strong {
  color: #162033;
  font-size: 14px;
  font-weight: 900;
}

.liner-profile span,
.liner-rail-section span {
  color: #667085;
  font-size: 12px;
  font-weight: 760;
}

.liner-new-draft {
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  background: #1b64da;
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
}

.liner-rail-section {
  display: grid;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid #e8eef5;
}

.liner-rail-section button {
  min-height: 40px;
  border: 1px solid #dfe7f0;
  border-radius: 7px;
  background: #f8fafc;
  color: #273449;
  padding: 0 10px;
  text-align: left;
  font-size: 13px;
  font-weight: 830;
  cursor: pointer;
}

.liner-rail-section button:hover {
  border-color: #b9c9df;
  background: #ffffff;
}

.liner-engine {
  border: 1px solid #dfe7f0;
  border-radius: 7px;
  background: #ffffff;
  padding: 10px;
}

.liner-engine summary {
  cursor: pointer;
  color: #344054;
  font-size: 13px;
  font-weight: 900;
}

.liner-engine .select {
  width: 100%;
  margin-top: 10px;
}

.liner-main {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}

.liner-titlebar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e8eef5;
  padding: 16px 18px;
}

.liner-titlebar h2 {
  margin: 3px 0 0;
  color: #162033;
  font-size: 22px;
  font-weight: 950;
}

.liner-composer {
  display: grid;
  gap: 14px;
  border-bottom: 1px solid #e8eef5;
  background: #fbfcfe;
  padding: 22px;
}

.liner-composer-copy span {
  color: #1b64da;
  font-size: 12px;
  font-weight: 900;
}

.liner-composer-copy h3 {
  margin: 6px 0 5px;
  color: #162033;
  font-size: 25px;
  font-weight: 950;
}

.liner-composer-copy p {
  max-width: 760px;
  margin: 0;
  color: #667085;
  line-height: 1.55;
  font-size: 14px;
  font-weight: 720;
}

.liner-ask-form {
  grid-template-columns: minmax(0, 1fr) 86px;
  padding: 0;
}

.liner-ask-form input {
  min-height: 52px;
  border: 1px solid #cfd9e6;
  border-radius: 8px;
  background: #ffffff;
  padding: 0 15px;
  color: #162033;
}

.liner-ask-form button {
  min-height: 52px;
  border-radius: 8px;
}

.liner-chat-log {
  min-height: 420px;
  padding: 18px 22px;
  border: 0;
  background: #ffffff;
}

.liner-chat-log .message {
  max-width: min(760px, 92%);
  border-radius: 8px;
  box-shadow: none;
}

.liner-chat-log .message.user {
  background: #1b64da;
}

.liner-chat-log .message.assistant {
  border-color: #dfe7f0;
  background: #fbfcfe;
}

.liner-context-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.liner-context-head {
  border-bottom: 1px solid #e8eef5;
  padding: 16px;
}

.liner-context-head h3 {
  margin: 3px 0 0;
  color: #162033;
  font-size: 18px;
  font-weight: 950;
}

.liner-context-panel .context-box {
  max-height: none;
  border: 0;
  background: #ffffff;
  color: #344054;
}

.link-summary-board {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
}

.link-summary-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.link-summary-panel h3 {
  margin: 0;
  color: #162033;
  font-size: 17px;
  font-weight: 950;
}

.link-summary-list {
  display: grid;
  gap: 8px;
}

.link-summary-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  border: 1px solid #e3eaf2;
  border-radius: 7px;
  background: #fbfcfe;
  padding: 11px 12px;
}

.link-summary-item strong,
.link-summary-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-summary-item strong {
  color: #273449;
  font-size: 13px;
  font-weight: 900;
}

.link-summary-item small {
  color: #667085;
  font-size: 12px;
  font-weight: 720;
}

.link-summary-item span {
  color: #1b64da;
  font-size: 13px;
  font-weight: 950;
}

.report-workspace-clean {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 14px;
}

.report-brief-card {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.report-brief-card h3 {
  margin: 0;
  color: #162033;
  font-size: 19px;
  font-weight: 950;
}

.report-brief-card p {
  margin: 0;
  color: #52606d;
  line-height: 1.6;
  font-size: 13px;
  font-weight: 720;
}

.report-outline-clean {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.report-outline-clean li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid #e3eaf2;
  border-radius: 7px;
  background: #ffffff;
  padding: 10px 12px;
  color: #273449;
  font-size: 13px;
  font-weight: 850;
}

.report-outline-clean span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eef4ff;
  color: #1b64da;
  font-weight: 950;
}

@media (max-width: 1180px) {
  .liner-workspace,
  .link-summary-board,
  .report-workspace-clean {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .liner-workspace {
    min-height: auto;
  }

  .liner-composer {
    padding: 16px;
  }

  .liner-ask-form {
    grid-template-columns: 1fr;
  }

  .worklog-pagination {
    justify-content: flex-start;
    overflow-x: auto;
  }
}

.worklog-table-actions,
.worklog-bottom-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.worklog-table-actions .muted {
  margin-right: 4px;
}

.worklog-bottom-actions {
  border-top: 1px solid #e8eef5;
  padding: 12px 14px 0;
  background: #ffffff;
}

.button.danger {
  border-color: #ffd0d0;
  color: #b42318;
}

.button.danger:hover {
  background: #fff5f5;
}

.button.active,
.worklog-table-actions .button.active,
.worklog-bottom-actions .button.active {
  border-color: #1b64da;
  background: #eef4ff;
  color: #1b64da;
}

#worklogEntryRows tr[data-worklog-row] {
  cursor: pointer;
}

#worklogEntryRows tr.selected {
  background: #eef4ff;
  box-shadow: inset 3px 0 0 #1b64da;
}

#worklogEntryRows.edit-mode td[data-field] {
  cursor: cell;
}

#worklogEntryRows.edit-mode td[data-field]:hover {
  background: #f8fbff;
}

#worklogEntryRows td.editing {
  padding: 4px;
  background: #ffffff;
}

#worklogEntryRows td.editing input,
#worklogEntryRows td.editing select {
  width: 100%;
  min-height: 34px;
  border: 1px solid #1b64da;
  border-radius: 6px;
  background: #ffffff;
  color: #162033;
  padding: 0 8px;
  font: inherit;
  outline: none;
}

.worklog-detail-row td {
  border-top: 0;
  background: #f8fbff;
  padding: 0 14px 14px;
}

.worklog-row-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 14px;
  overflow: hidden;
  border: 1px solid #dce7f5;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
  animation: worklog-detail-slide 180ms ease-out;
}

.worklog-detail-progress,
.worklog-detail-grid {
  min-width: 0;
}

.worklog-detail-progress span,
.worklog-detail-item span {
  display: block;
  color: #667085;
  font-size: 11px;
  font-weight: 900;
}

.worklog-detail-progress p {
  margin: 6px 0 0;
  color: #1f2933;
  font-size: 13px;
  font-weight: 720;
  line-height: 1.65;
  white-space: pre-wrap;
}

.worklog-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.worklog-detail-item {
  border: 1px solid #e5edf5;
  border-radius: 7px;
  background: #fbfcfe;
  padding: 9px 10px;
}

.worklog-detail-item strong {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: #273449;
  font-size: 13px;
  font-weight: 880;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes worklog-detail-slide {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  .worklog-table-actions,
  .worklog-bottom-actions {
    justify-content: flex-start;
  }

  .worklog-row-detail,
  .worklog-detail-grid {
    grid-template-columns: 1fr;
  }
}

.worklog-focus-page .mail-page-heading {
  margin-bottom: 0;
}

.worklog-db-shell {
  display: grid;
  gap: 12px;
  border: 1px solid #dfe7f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(31, 41, 55, 0.05);
  padding: 14px;
}

.worklog-db-controlbar {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 0.7fr);
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid #e8eef5;
  padding: 2px 2px 14px;
}

.worklog-db-controlbar h3 {
  margin: 3px 0 3px;
  color: #162033;
  font-size: 18px;
  font-weight: 950;
}

.worklog-db-controlbar .muted {
  margin: 0;
}

.worklog-db-controlbar .worklog-search-row {
  justify-self: end;
  width: min(560px, 100%);
}

.worklog-entry-list.panel {
  border: 0;
  box-shadow: none;
  padding: 0;
}

.worklog-entry-list .panel-header.slim {
  min-height: 54px;
  border-bottom: 1px solid #e8eef5;
  padding: 4px 2px 12px;
}

.worklog-entry-list .panel-header.slim h3 {
  color: #162033;
  font-size: 17px;
  font-weight: 950;
}

.worklog-entry-list .panel-header.slim .muted {
  display: block;
  margin-top: 3px;
}

.worklog-entry-list .mini-table {
  border: 1px solid #e3eaf2;
  border-radius: 8px;
  overflow: auto;
}

.worklog-entry-list table {
  width: 100%;
  border-collapse: collapse;
}

.worklog-entry-list th {
  height: 42px;
  border-bottom: 1px solid #e3eaf2;
  background: #f8fafc;
  color: #52606d;
  font-size: 12px;
  font-weight: 950;
}

.worklog-entry-list td {
  height: 44px;
  border-top: 1px solid #eef3f8;
  color: #273449;
  font-size: 13px;
}

.worklog-entry-list tbody tr[data-worklog-row]:hover {
  background: #f8fbff;
}

#worklogEntryRows tr.selected {
  background: #f4f7fb;
  box-shadow: inset 3px 0 0 #285ea8;
}

.worklog-detail-row td {
  border-top: 0;
  height: auto;
  background: #f4f7fb;
  padding: 0 10px 10px;
}

.worklog-inline-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.9fr);
  gap: 14px;
  overflow: hidden;
  border: 1px solid #dbe5ef;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: #ffffff;
  padding: 12px 14px;
  animation: worklog-detail-slide 180ms ease-out;
}

.worklog-inline-progress {
  min-width: 0;
  border-left: 3px solid #285ea8;
  padding-left: 12px;
}

.worklog-inline-label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-bottom: 6px;
}

.worklog-inline-label span {
  color: #285ea8;
  font-size: 12px;
  font-weight: 950;
}

.worklog-inline-label small {
  overflow: hidden;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worklog-inline-progress p {
  margin: 0;
  color: #1f2933;
  font-size: 13px;
  font-weight: 680;
  line-height: 1.65;
  white-space: pre-wrap;
}

.worklog-inline-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 12px;
  min-width: 0;
  margin: 0;
}

.worklog-inline-meta-item {
  min-width: 0;
}

.worklog-inline-meta-item dt {
  margin: 0 0 3px;
  color: #7a8696;
  font-size: 11px;
  font-weight: 850;
}

.worklog-inline-meta-item dd {
  overflow: hidden;
  margin: 0;
  color: #273449;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .worklog-db-controlbar,
  .worklog-inline-detail {
    grid-template-columns: 1fr;
  }

  .worklog-db-controlbar .worklog-search-row {
    justify-self: stretch;
  }

  .worklog-inline-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .worklog-inline-label {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .worklog-inline-meta {
    grid-template-columns: 1fr;
  }
}

.table-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-height: 30px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 950;
  padding: 0;
  text-align: left;
}

.table-sort-button::after {
  color: #98a2b3;
  content: "↕";
  font-size: 10px;
  font-weight: 900;
}

.table-sort-button.active {
  color: #285ea8;
}

.table-sort-button.active[data-sort-direction="asc"]::after {
  content: "↑";
}

.table-sort-button.active[data-sort-direction="desc"]::after {
  content: "↓";
}

.worklog-person-filter {
  max-width: 100%;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #eef4ff;
  color: #285ea8;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  padding: 4px 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.worklog-person-filter:hover {
  background: #dfeaff;
}

.worklog-select-header,
.worklog-select-cell {
  width: 42px;
  min-width: 42px;
  text-align: center;
}

.worklog-select-cell {
  padding-left: 10px;
  padding-right: 6px;
}

.worklog-select-box {
  width: 16px;
  height: 16px;
  accent-color: #285ea8;
  cursor: pointer;
}

#worklogEntryRows.edit-mode td[data-field],
#worklogEntryRows.edit-mode td[data-field]:hover {
  cursor: default;
}

.worklog-inline-edit {
  display: grid;
  gap: 12px;
  overflow: hidden;
  border: 1px solid #dbe5ef;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: #ffffff;
  padding: 14px;
  animation: worklog-detail-slide 180ms ease-out;
}

.worklog-inline-edit-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  border-bottom: 1px solid #e8eef5;
  padding-bottom: 12px;
}

.worklog-inline-edit-head span,
.worklog-edit-field span {
  display: block;
  color: #667085;
  font-size: 11px;
  font-weight: 900;
}

.worklog-inline-edit-head strong {
  display: block;
  margin-top: 4px;
  color: #162033;
  font-size: 15px;
  font-weight: 950;
}

.worklog-inline-edit-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.worklog-edit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.worklog-edit-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.worklog-edit-field.wide {
  grid-column: 1 / -1;
}

.worklog-edit-field input,
.worklog-edit-field select,
.worklog-edit-field textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid #d6e0eb;
  border-radius: 7px;
  background: #ffffff;
  color: #162033;
  font: inherit;
  font-size: 13px;
  padding: 8px 10px;
  outline: none;
}

.worklog-edit-field textarea {
  min-height: 92px;
  resize: vertical;
}

.worklog-edit-field input:focus,
.worklog-edit-field select:focus,
.worklog-edit-field textarea:focus {
  border-color: #285ea8;
  box-shadow: 0 0 0 3px rgba(40, 94, 168, 0.12);
}

@media (max-width: 980px) {
  .worklog-edit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .worklog-inline-edit-head {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .worklog-edit-grid {
    grid-template-columns: 1fr;
  }
}

.worklog-people-page {
  display: grid;
  gap: 16px;
}

.people-metric-grid,
.people-mini-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.people-metric-card {
  min-width: 0;
  border: 1px solid #dfe7f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
  box-shadow: 0 8px 20px rgba(31, 41, 55, 0.04);
}

.people-metric-card span {
  display: block;
  color: #667085;
  font-size: 11px;
  font-weight: 900;
}

.people-metric-card strong {
  display: block;
  margin-top: 6px;
  color: #162033;
  font-size: 23px;
  font-weight: 950;
}

.people-metric-card small {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: #667085;
  font-size: 12px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.people-stats-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.people-list-panel {
  position: sticky;
  top: 14px;
}

.people-search {
  width: 100%;
  min-height: 40px;
  border: 1px solid #d6e0eb;
  border-radius: 7px;
  background: #ffffff;
  color: #162033;
  font: inherit;
  margin: 4px 0 12px;
  padding: 0 11px;
  outline: none;
}

.people-search:focus {
  border-color: #285ea8;
  box-shadow: 0 0 0 3px rgba(40, 94, 168, 0.12);
}

.people-list {
  display: grid;
  gap: 6px;
  max-height: calc(100vh - 260px);
  overflow: auto;
  padding-right: 2px;
}

.people-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 1px solid #e5edf5;
  border-radius: 8px;
  background: #ffffff;
  color: #273449;
  cursor: pointer;
  padding: 10px;
  text-align: left;
}

.people-row:hover,
.people-row.active {
  border-color: #b9cbe2;
  background: #f4f7fb;
}

.people-row.active {
  box-shadow: inset 3px 0 0 #285ea8;
}

.people-row strong,
.people-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.people-row strong {
  color: #162033;
  font-size: 14px;
  font-weight: 900;
}

.people-row small {
  margin-top: 3px;
  color: #667085;
  font-size: 12px;
  font-weight: 720;
}

.people-row b {
  color: #285ea8;
  font-size: 14px;
  font-weight: 950;
}

.people-detail-stack {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.people-profile-panel {
  display: grid;
  gap: 14px;
}

.people-profile-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  border-bottom: 1px solid #e8eef5;
  padding-bottom: 12px;
}

.people-profile-head h3 {
  margin: 3px 0;
  color: #162033;
  font-size: 24px;
  font-weight: 950;
}

.people-analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.people-analysis-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.people-bars {
  display: grid;
  gap: 10px;
}

.people-bar-row {
  display: grid;
  grid-template-columns: minmax(68px, 0.8fr) minmax(90px, 1.2fr) auto auto;
  gap: 8px;
  align-items: center;
  color: #273449;
  font-size: 12px;
  font-weight: 800;
}

.people-bar-row div {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.people-bar-row i,
.people-rank-track i {
  display: block;
  width: var(--w);
  height: 100%;
  border-radius: inherit;
  background: #285ea8;
}

.people-bar-row b {
  color: #162033;
  font-weight: 950;
}

.people-bar-row small {
  color: #667085;
  font-weight: 780;
}

.people-month-bars {
  display: grid;
  grid-template-columns: repeat(12, minmax(18px, 1fr));
  align-items: end;
  gap: 7px;
  min-height: 130px;
}

.people-month-bars div {
  display: grid;
  align-items: end;
  gap: 6px;
  min-width: 0;
}

.people-month-bars span {
  display: block;
  height: var(--h);
  min-height: 5px;
  border-radius: 5px 5px 0 0;
  background: #285ea8;
}

.people-month-bars small {
  overflow: hidden;
  color: #667085;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.people-rank-list {
  display: grid;
  gap: 10px;
}

.people-rank-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

.people-rank-row span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.people-rank-row strong {
  overflow: hidden;
  color: #162033;
  font-size: 13px;
  font-weight: 880;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.people-rank-row small {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.people-rank-track {
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.people-recent-panel .mini-table td {
  vertical-align: top;
}

.people-progress-text {
  display: -webkit-box;
  overflow: hidden;
  max-width: 520px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mail-oauth-setup {
  border: 1px solid #dfe7f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 0;
}

.mail-oauth-setup summary {
  cursor: pointer;
  color: #162033;
  font-size: 14px;
  font-weight: 950;
  padding: 14px 16px;
}

.mail-oauth-body {
  display: grid;
  gap: 12px;
  border-top: 1px solid #e8eef5;
  padding: 0 16px 16px;
}

.mail-oauth-body code {
  border: 1px solid #dfe7f0;
  border-radius: 5px;
  background: #f8fafc;
  color: #285ea8;
  padding: 2px 5px;
}

@media (max-width: 1120px) {
  .people-metric-grid,
  .people-mini-metrics,
  .people-analysis-grid,
  .people-analysis-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .people-stats-layout {
    grid-template-columns: 1fr;
  }

  .people-list-panel {
    position: static;
  }

  .people-list {
    max-height: 360px;
  }
}

@media (max-width: 680px) {
  .people-metric-grid,
  .people-mini-metrics,
  .people-analysis-grid,
  .people-analysis-grid.two {
    grid-template-columns: 1fr;
  }

  .people-profile-head {
    flex-direction: column;
  }

  .people-month-bars {
    grid-template-columns: repeat(6, minmax(18px, 1fr));
  }
}

.chat-workspace {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 12px;
  min-height: calc(100vh - 108px);
}

.chat-history-rail,
.chat-main {
  min-width: 0;
  border: 1px solid #dfe7f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(31, 41, 55, 0.04);
}

.chat-history-rail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
}

.chat-new-button {
  min-height: 40px;
  border: 1px solid #285ea8;
  border-radius: 7px;
  background: #285ea8;
  color: #ffffff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.chat-history-list {
  display: grid;
  align-content: start;
  gap: 6px;
  overflow: auto;
}

.chat-history-item {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 54px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #273449;
  cursor: pointer;
  padding: 9px 10px;
  text-align: left;
}

.chat-history-item:hover,
.chat-history-item.active {
  border-color: #d6e0eb;
  background: #f4f7fb;
}

.chat-history-item.active {
  box-shadow: inset 3px 0 0 #285ea8;
}

.chat-history-item strong,
.chat-history-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-history-item strong {
  color: #162033;
  font-size: 13px;
  font-weight: 850;
}

.chat-history-item span {
  color: #7a8696;
  font-size: 11px;
  font-weight: 700;
}

.chat-main {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.chat-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  border-bottom: 1px solid #e8eef5;
  padding: 12px 16px;
}

.chat-titlebar h2 {
  margin: 0;
  color: #162033;
  font-size: 20px;
  font-weight: 950;
}

.chat-titlebar span:not(.health-pill) {
  display: block;
  margin-top: 3px;
  color: #667085;
  font-size: 12px;
  font-weight: 720;
}

.chat-title-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-title-actions .select {
  min-height: 34px;
  min-width: 150px;
}

.chat-main-log {
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  padding: 18px max(18px, 8vw);
}

.chat-main-log .message {
  max-width: min(760px, 92%);
  border-radius: 9px;
  box-shadow: none;
}

.chat-main-log .message.user {
  margin-left: auto;
  background: #285ea8;
  color: #ffffff;
}

.chat-main-log .message.assistant {
  border-color: #dfe7f0;
  background: #f8fafc;
  color: #162033;
}

.chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px;
  gap: 8px;
  border-top: 1px solid #e8eef5;
  background: #ffffff;
  padding: 12px max(16px, 8vw);
}

.chat-composer input {
  min-height: 44px;
  border: 1px solid #d6e0eb;
  border-radius: 8px;
  background: #ffffff;
  color: #162033;
  font: inherit;
  padding: 0 13px;
  outline: none;
}

.chat-composer input:focus {
  border-color: #285ea8;
  box-shadow: 0 0 0 3px rgba(40, 94, 168, 0.12);
}

.chat-composer button {
  min-height: 44px;
  border-radius: 8px;
}

.mail-page {
  gap: 12px;
}

.mail-page-heading {
  align-items: center;
  border: 1px solid #dfe7f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px 14px;
}

.mail-page-heading h2 {
  margin: 2px 0 0;
  font-size: 22px;
  font-weight: 950;
}

.mail-status-strip {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.mail-status-card {
  min-height: 62px;
  border-radius: 8px;
  box-shadow: none;
  padding: 12px 14px;
}

.mail-status-card strong {
  font-size: 18px;
}

.mail-status-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-oauth-setup {
  box-shadow: none;
}

.mail-oauth-setup summary {
  padding: 11px 14px;
}

.mail-oauth-body {
  padding: 0 14px 14px;
}

.mail-desk {
  grid-template-columns: minmax(430px, 0.92fr) minmax(0, 1.08fr);
  gap: 12px;
  align-items: stretch;
}

.mail-list-panel,
.mail-detail-panel {
  min-height: calc(100vh - 320px);
  border-radius: 8px;
  box-shadow: none;
}

.mail-list-toolbar {
  gap: 8px;
  padding: 10px;
  background: #ffffff;
}

.mail-search {
  min-height: 38px;
  min-width: 260px;
  border-radius: 7px;
}

.mail-table-wrap {
  max-height: calc(100vh - 390px);
}

.mail-table th {
  height: 38px;
  background: #f8fafc;
  letter-spacing: 0;
}

.mail-table th,
.mail-table td {
  padding: 10px 12px;
}

.mail-title-button {
  color: #162033;
  font-size: 13px;
}

.mail-row:hover,
.mail-row.selected {
  background: #f4f7fb;
}

.mail-row.selected {
  box-shadow: inset 3px 0 0 #285ea8;
}

.mail-detail-panel {
  background: #ffffff;
  padding: 14px;
}

.mail-detail-empty,
.mail-empty-state {
  min-height: 220px;
}

.mail-detail-head h3 {
  margin-top: 8px;
  color: #162033;
  font-size: 18px;
  line-height: 1.35;
}

.mail-body-box {
  border-radius: 8px;
  background: #f8fafc;
}

.reply-preview-card {
  border-radius: 8px;
  box-shadow: none;
}

.mail-page .dev-tools-panel {
  display: none;
}

@media (max-width: 1080px) {
  .chat-workspace,
  .mail-desk,
  .mail-status-strip {
    grid-template-columns: 1fr;
  }

  .chat-history-rail {
    max-height: 260px;
  }
}

@media (max-width: 680px) {
  .chat-titlebar,
  .mail-page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .chat-title-actions,
  .mail-heading-actions,
  .mail-list-toolbar {
    width: 100%;
  }

  .chat-title-actions .select,
  .mail-search {
    min-width: 0;
    width: 100%;
  }

  .chat-main-log,
  .chat-composer {
    padding-left: 12px;
    padding-right: 12px;
  }
}
