:root {
  --bg: #f4f2ee;
  --panel: #ffffff;
  --panel-soft: #f7faf8;
  --text: #2f3a32;
  --muted: #728078;
  --line: #dde5df;
  --brand: #0f9156;
  --brand-soft: #e7f6ee;
  --warn: #d39a14;
  --warn-soft: #fff5da;
  --danger: #c45555;
  --danger-soft: #ffe9e9;
  --shadow: 0 14px 38px rgba(31, 56, 41, 0.08);
  --radius: 24px;
  --radius-sm: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

.cab-shell {
  min-height: 100vh;
  padding: 28px;
}

.cab-topbar,
.cab-mainnav,
.cab-subnav,
.cab-main {
  max-width: 1380px;
  margin: 0 auto;
}

.cab-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 24px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(221,229,223,.85);
  border-radius: 28px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.cab-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.cab-brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--brand-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.cab-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.cab-brand-copy strong {
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}

.cab-brand-copy span {
  color: var(--muted);
  font-size: .94rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cab-topbar-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cab-search {
  flex: 1 1 380px;
  max-width: 560px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cab-search input {
  flex: 1 1 auto;
}

.cab-userbox {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  border-radius: 16px;
  background: #f8faf9;
  border: 1px solid var(--line);
  min-width: 180px;
}

.cab-userbox strong {
  font-size: .96rem;
}

.cab-userbox span {
  color: var(--muted);
  font-size: .85rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 9px 12px;
  font-size: .86rem;
  line-height: 1;
  border: 1px solid transparent;
  white-space: nowrap;
}

.chip.soft,
.badge.soft { background: #eff4f1; color: #46534b; }
.chip.success,
.badge.success { background: var(--brand-soft); color: var(--brand); }
.chip.warn,
.badge.warn { background: var(--warn-soft); color: #996e00; }
.chip.danger,
.badge.danger { background: var(--danger-soft); color: var(--danger); }

.cab-mainnav,
.cab-subnav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 10px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(221,229,223,.85);
  border-radius: 22px;
  box-shadow: 0 10px 28px rgba(31,56,41,.05);
  overflow-x: auto;
}

.cab-mainnav a,
.cab-subnav a {
  padding: 12px 16px;
  border-radius: 16px;
  color: #526157;
  font-weight: 600;
  white-space: nowrap;
}

.cab-mainnav a.active,
.cab-subnav a.active {
  background: var(--brand);
  color: #fff;
}

.cab-main {
  padding: 22px 0 40px;
}

.cab-hero {
  display: grid;
  grid-template-columns: 1.6fr .9fr;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.cab-hero > div,
.metric-card,
.panel,
.notice,
.form-grid,
.table-card,
.login-card {
  background: var(--panel);
  border: 1px solid rgba(221,229,223,.9);
  box-shadow: var(--shadow);
}

.cab-hero > div {
  border-radius: 28px;
  padding: 28px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 999px;
  font-size: .84rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.cab-hero h1,
.page-title {
  margin: 16px 0 12px;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.05;
}

.cab-hero p,
.page-subtitle,
.muted {
  color: var(--muted);
}

.cab-hero-meta {
  display: grid;
  gap: 14px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.metric-card {
  border-radius: 24px;
  padding: 20px;
}

.metric-card.compact {
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: .92rem;
  margin-bottom: 8px;
}

.metric-card strong {
  display: block;
  font-size: 1.85rem;
  line-height: 1.1;
}

.metric-card small,
.tiny {
  display: block;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.5;
}

.notice {
  border-radius: 20px;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.notice.success { background: var(--brand-soft); color: var(--brand); }
.notice.error { background: var(--danger-soft); color: var(--danger); }

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 16px;
}
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.panel,
.table-card,
.login-card {
  border-radius: 28px;
  padding: 24px;
  margin-bottom: 18px;
}

.panel-head,
.table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.panel-head h2,
.panel-head h3,
.table-head h2,
.table-head h3 {
  margin: 0;
  font-size: 1.35rem;
}

.panel-head p,
.table-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 15px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.btn.ghost {
  background: transparent;
  color: var(--brand);
}

.btn.warn {
  background: #9f7a13;
  border-color: #9f7a13;
}

.btn.small {
  padding: 9px 12px;
  font-size: .88rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}


.inline-search {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.inline-search input {
  flex: 1 1 280px;
}

.filter-grid {
  gap: 16px;
}

.check-field {
  justify-content: flex-end;
}

.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 2px;
  color: #506056;
  font-weight: 600;
}

.check-inline input {
  width: auto;
  margin: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  border-radius: 22px;
  padding: 18px;
  background: var(--panel-soft);
}

.form-grid .full { grid-column: 1 / -1; }

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #506056;
  font-size: .92rem;
  font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="file"],
input[type="search"],
textarea,
select {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 14px 16px;
  color: var(--text);
  outline: none;
}

textarea { min-height: 120px; resize: vertical; }

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: left;
  padding: 14px 12px;
  border-top: 1px solid #eef2ef;
  vertical-align: top;
}

.table th {
  color: #5d6b62;
  font-size: .9rem;
  font-weight: 700;
  border-top: none;
}

.table td strong { display: block; margin-bottom: 4px; }

.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.list-card {
  border-radius: 22px;
  border: 1px solid #edf2ee;
  background: #fbfcfb;
  padding: 18px;
}

.list-card h3,
.list-card h4 {
  margin: 0 0 8px;
}

.list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 14px;
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

.data-grid .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px dashed #e8efe9;
}

.data-grid .row:first-child { border-top: none; }
.data-grid .row span { color: var(--muted); }
.data-grid .row strong { text-align: right; }

.bar-list {
  display: grid;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 3fr auto;
  gap: 14px;
  align-items: center;
}

.bar-row strong { font-size: .96rem; }
.bar {
  height: 12px;
  border-radius: 999px;
  background: #edf3ee;
  overflow: hidden;
}
.bar > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #0f9156, #68c79a);
  border-radius: 999px;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.score {
  border-radius: 20px;
  background: var(--panel-soft);
  border: 1px solid #e7efe8;
  padding: 18px;
}

.score span { display: block; color: var(--muted); margin-bottom: 8px; }
.score strong { font-size: 1.9rem; }

.details {
  border: 1px solid #e6eee7;
  border-radius: 18px;
  background: #fcfdfc;
  overflow: hidden;
}

.details summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 700;
}

.details summary::-webkit-details-marker { display: none; }
.details .details-body { padding: 0 18px 18px; color: #45524a; }

.transcript,
.protocol-text {
  padding: 16px;
  border-radius: 18px;
  background: #f7faf8;
  border: 1px solid #e7eee8;
  white-space: pre-wrap;
  line-height: 1.65;
  color: #3d4a41;
}

.inline-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.empty {
  padding: 22px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed #d8e3da;
  border-radius: 22px;
  background: #fbfcfb;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px;
}

.login-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 20px;
  width: min(1100px, 100%);
}

.login-card {
  border-radius: 30px;
}

.login-card h1 {
  margin: 16px 0 12px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
}

.hero-points {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.hero-point {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border-radius: 20px;
  background: #f7faf8;
  border: 1px solid #ebf1ec;
}

.hero-point strong {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.note {
  color: var(--muted);
  line-height: 1.65;
}

pre.mono,
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}


.panel-soft {
  padding: 18px;
  background: var(--panel-soft);
  border-radius: 22px;
  border: 1px solid #e7efe8;
  box-shadow: none;
}

.score-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.task-score-grid {
  margin-top: 0;
}

.task-card {
  border-radius: 24px;
  border: 1px solid #e7efe8;
  background: #fbfcfb;
  padding: 20px;
}


.kanban-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.kanban-col {
  background: var(--panel);
  border: 1px solid rgba(221,229,223,.9);
  box-shadow: var(--shadow);
  border-radius: 26px;
  padding: 20px;
}

.mini-task {
  border-radius: 18px;
  border: 1px solid #e7efe8;
  background: #fbfcfb;
  padding: 14px;
}

.mini-task strong {
  display: block;
  margin-bottom: 8px;
}

.list-card.slim,
.task-card .list-card.slim {
  padding: 14px 16px;
}

.bullet-block {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed #e2ece4;
}

.bullet-block h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.clean-list {
  margin: 0;
  padding-left: 20px;
  color: #45524a;
  line-height: 1.7;
}

.clean-list li + li {
  margin-top: 8px;
}

.note-box {
  border-radius: 18px;
  padding: 14px 16px;
  background: #f7faf8;
  border: 1px solid #e7efe8;
  color: #45524a;
}

.note-box strong {
  display: block;
  margin-bottom: 8px;
}

.compact-grid {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.compact-grid textarea {
  min-height: 100px;
}

@media (max-width: 1100px) {
  .cab-hero,
  .grid-4,
  .metric-grid,
  .score-grid,
  .login-grid,
  .kanban-grid {
    grid-template-columns: 1fr 1fr;
  }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .cab-shell { padding: 16px; }
  .cab-topbar { flex-direction: column; align-items: stretch; }
  .cab-search { max-width: none; width: 100%; }
  .cab-topbar-meta { justify-content: flex-start; }
  .cab-hero,
  .grid-2,
  .grid-3,
  .grid-4,
  .metric-grid,
  .score-grid,
  .login-grid,
  .form-grid,
  .data-grid,
  .kanban-grid {
    grid-template-columns: 1fr;
  }
  .bar-row { grid-template-columns: 1fr; }
  .table { display: block; overflow-x: auto; }
  .inline-search,
  .cab-search { flex-direction: column; align-items: stretch; }
}

/* v11 compact minimal refresh */
html, body {
  font-size: 14px;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before,
body::after {
  display: none !important;
}

.cab-shell {
  padding: 16px;
}

.cab-topbar,
.cab-mainnav,
.cab-subnav,
.cab-main {
  max-width: 1240px;
}

.cab-topbar {
  gap: 14px;
  padding: 12px 16px;
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(31, 56, 41, 0.06);
  backdrop-filter: none;
}

.cab-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  padding: 8px;
}

.cab-brand-copy strong {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .01em;
}

.cab-brand-copy span {
  font-size: .8rem;
}

.cab-search {
  gap: 8px;
  flex: 1 1 320px;
  max-width: 520px;
}

.cab-search input {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 13px;
}

.cab-userbox {
  min-width: 160px;
  padding: 8px 10px;
  border-radius: 12px;
}

.cab-userbox strong,
strong {
  font-weight: 600;
}

.cab-userbox strong {
  font-size: 13px;
}

.cab-userbox span {
  font-size: 11px;
}

.chip,
.badge {
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
}

.cab-mainnav,
.cab-subnav {
  gap: 6px;
  margin-top: 12px;
  padding: 6px;
  border-radius: 16px;
  box-shadow: 0 8px 18px rgba(31, 56, 41, 0.04);
}

.cab-mainnav a,
.cab-subnav a {
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
}

.cab-main {
  padding: 12px 0 28px;
}

.cab-hero {
  gap: 12px;
  margin-bottom: 12px;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, .85fr);
}

.cab-hero > div {
  padding: 16px 18px;
  border-radius: 18px;
}

.kicker {
  padding: 5px 9px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .02em;
}

.cab-hero h1,
.page-title,
h1 {
  margin: 10px 0 6px;
  font-size: clamp(1.45rem, 2vw, 1.9rem);
  line-height: 1.15;
  font-weight: 600 !important;
  letter-spacing: -.01em;
}

h2 {
  font-size: 1.02rem;
  line-height: 1.25;
  font-weight: 600 !important;
}

h3 {
  font-size: .95rem;
  line-height: 1.3;
  font-weight: 600 !important;
}

h4,
h5,
h6 {
  font-weight: 600 !important;
}

.cab-hero p,
.page-subtitle,
.muted,
p,
.note,
.tiny,
small {
  font-size: 13px;
  line-height: 1.45;
}

.metric-grid,
.grid-2,
.grid-3,
.score-grid,
.table-grid {
  gap: 12px;
}

.metric-card,
.panel,
.notice,
.form-grid,
.table-card,
.login-card,
.list-card,
.panel-soft,
.score,
.empty {
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(31, 56, 41, 0.05);
}

.metric-card,
.panel,
.notice,
.form-grid,
.table-card,
.login-card {
  padding: 14px 16px;
}

.metric-card strong {
  font-size: 1.28rem;
  font-weight: 600;
}

.panel-head {
  gap: 10px;
  margin-bottom: 12px;
}

.list-card {
  padding: 12px 14px;
}

.data-grid .row,
.clean-list li,
.table-card table td,
.table-card table th {
  font-size: 13px;
}

.btn,
button,
input,
select,
textarea {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.btn {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500 !important;
  box-shadow: none;
}

.btn.small,
.btn-compact {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}

.field input,
.field select,
.field textarea,
.inline-search input,
.inline-search select {
  min-height: 38px;
  padding: 9px 11px;
  border-radius: 12px;
  font-size: 13px;
}

.inline-pills,
.actions,
.list-meta {
  gap: 8px;
}

@media (max-width: 980px) {
  .cab-shell {
    padding: 12px;
  }

  .cab-topbar {
    padding: 12px;
  }

  .cab-hero {
    grid-template-columns: 1fr;
  }
}
