:root {
  color-scheme: light; --navy: #142238; --navy-deep: #0e192b; --ink: #17283d;
  --muted: #536378; --teal: #176c62; --teal-dark: #12584f; --teal-light: #dff2ed;
  --paper: #f4f6f8; --line: #dce3e9; --white: #fff; --warning: #8b4d13; --danger: #9c2a39;
  font: 15px/1.55 "Segoe UI", system-ui, -apple-system, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
a { color: var(--teal-dark); }
button, .button {
  border: 1px solid var(--teal); border-radius: 8px; background: var(--teal); color: var(--white);
  padding: 9px 15px; font-weight: 650; cursor: pointer; text-decoration: none; white-space: nowrap;
}
button:hover, .button:hover { background: var(--teal-dark); }
button.secondary, .button.secondary { color: var(--ink); background: var(--white); border-color: #ccd7e0; }
button.secondary:hover, .button.secondary:hover { background: #eef4f7; }
button.danger { background: var(--white); color: var(--danger); border-color: #e7cdd2; }
button.danger:hover { background: #fceef1; }
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 3px solid #4f9ed8; outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.95rem, 4vw, 2.65rem); letter-spacing: -.045em; line-height: 1.12; }
h2 { font-size: 1.25rem; line-height: 1.25; letter-spacing: -.02em; }
h3 { font-size: 1.05rem; line-height: 1.25; }
small, .muted { color: var(--muted); }
label { display: grid; gap: 5px; font-weight: 650; }
input, select, textarea {
  width: 100%; min-width: 0; padding: 9px 11px; border: 1px solid #c8d3dd;
  border-radius: 7px; background: var(--white); color: var(--ink);
}
textarea { min-height: 88px; resize: vertical; }
input[type=checkbox] { width: auto; accent-color: var(--teal); }
.check { display: flex; align-items: center; gap: 8px; }
.entry { min-height: 100vh; display: grid; grid-template-columns: minmax(310px, 41%) 1fr; }
.entry-brand {
  position: relative; isolation: isolate; overflow: hidden; background: var(--navy-deep);
  color: var(--white); padding: clamp(26px, 6vw, 86px);
  display: flex; flex-direction: column; justify-content: center;
}
.entry-brand .brand { font-size: clamp(2rem, 4vw, 4rem); letter-spacing: -.065em; }
.brand-decoration {
  position: absolute; z-index: -1; width: 65%; aspect-ratio: 1; bottom: -16%; right: -22%;
  border: 1px solid #3a5c72; border-radius: 36%; transform: rotate(-30deg);
  box-shadow: 0 0 0 50px #1b344650, 0 0 0 100px #2c53622c, 0 0 0 150px #33576821;
}
.entry-panel { display: grid; place-items: center; padding: 32px; background: var(--white); }
.entry-content { max-width: 440px; width: 100%; }
.entry-content h1 { margin-bottom: 10px; }
.entry-content form { margin-top: 25px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 760; font-size: 1.46rem; letter-spacing: -.045em; }
.mark { display: flex; align-items: flex-end; gap: .14em; background: #9fe5cd; border-radius: .33em; padding: .23em; height: 1.1em; width: 1.1em; }
.mark i { display: block; width: .14em; height: 54%; background: var(--navy); border-radius: .1em; }
.mark i:nth-child(2) { height: 85%; }
.mark i:nth-child(3) { height: 66%; }
.workspace { display: grid; grid-template-columns: 246px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow: auto; background: var(--navy);
  color: var(--white); display: flex; flex-direction: column; gap: 24px; padding: 27px 17px 17px;
}
.sidebar .brand { padding-left: 8px; }
.org-picker { font-size: .78rem; color: #a9bcd3; padding: 0 5px; }
.org-picker select { background: #20344e; color: var(--white); border-color: #405673; }
nav { display: grid; gap: 4px; }
nav button {
  width: 100%; text-align: left; border: 0; border-radius: 7px; display: flex; align-items: center;
  gap: 10px; padding: 10px 11px; color: #cad7e8; background: transparent; font-weight: 600;
}
nav button:hover { background: #253b56; }
nav button[aria-current=page] { background: #294760; color: var(--white); }
.nav-icon { color: #9fe5cd; width: 1.1rem; text-align: center; }
.account {
  margin-top: auto; border-top: 1px solid #3b4b63; padding: 14px 5px 0; display: flex; align-items: flex-start;
  gap: 8px; overflow-wrap: anywhere; font-size: .86rem;
}
.account-dot { flex: 0 0 8px; margin-top: 6px; height: 8px; background: #9fe5cd; border-radius: 50%; }
.link-button { display: block; padding: 2px 0; background: transparent; border: 0; color: #a9c5e2; font-weight: 500; }
.link-button:hover { background: transparent; color: #fff; text-decoration: underline; }
.main { width: 100%; max-width: 1640px; padding: 33px clamp(17px, 4vw, 54px) 48px; }
.top { display: flex; justify-content: space-between; align-items: end; gap: 15px; margin-bottom: 24px; }
.context { color: var(--muted); font-weight: 650; font-size: .89rem; margin-bottom: 5px; }
.actions, .toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 9px; }
.toolbar { margin-bottom: 17px; }
.toolbar label { font-size: .88rem; min-width: 132px; }
.panel, .metric {
  background: var(--white); border: 1px solid var(--line); border-radius: 12px; min-width: 0;
  box-shadow: 0 2px 3px #14223808;
}
.panel { margin: 0 0 15px; padding: 18px; }
.panel > h2 { margin-bottom: 10px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 11px; }
.metric-grid, .columns, .tickets { display: grid; gap: 14px; margin-bottom: 16px; }
.metric-grid { grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); }
.columns { grid-template-columns: repeat(auto-fit, minmax(min(100%, 305px), 1fr)); }
.metrics-wide { margin-top: 12px; }
.metric { padding: 17px; }
.metric span { color: var(--muted); font-weight: 650; font-size: .87rem; }
.metric strong { display: block; font-size: clamp(1.5rem, 2.8vw, 2.05rem); font-weight: 730; letter-spacing: -.04em; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 10px 10px; border-bottom: 1px solid #e8edf1; vertical-align: middle; }
th { background: #f3f6f8; color: #40546d; text-align: left; font-size: .83rem; }
td { font-size: .91rem; }
tr:last-child td { border-bottom: 0; }
td:last-child:has(button) { text-align: right; }
.number { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.badge { display: inline-block; border-radius: 20px; padding: 2px 9px; background: #e9eef4; color: #394d66; font-size: .79rem; font-weight: 650; white-space: nowrap; }
.badge.good { background: var(--teal-light); color: #185c51; }
.badge.warn { background: #fbeddc; color: var(--warning); }
.badge.bad { background: #fbe9eb; color: var(--danger); }
.empty { padding: 13px 0; color: var(--muted); }
.notice { padding: 10px 13px; border-radius: 7px; margin-bottom: 14px; background: var(--teal-light); }
.notice.error, .form-error { color: var(--danger); }
.notice.error { background: #fcecef; }
.form-error:empty, .form-status:empty { display: none; }
.form-grid { display: grid; gap: 13px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; }
dialog { border: 1px solid var(--line); border-radius: 14px; padding: 0; width: min(690px, calc(100vw - 22px)); max-height: 88vh; color: var(--ink); }
dialog::backdrop { background: #0b182aa0; }
.dialog-body { padding: 23px; position: relative; }
.dialog-body h2 { margin-bottom: 16px; padding-right: 32px; }
.icon-button { position: absolute; right: 15px; top: 12px; background: transparent; color: var(--ink); border-color: transparent; padding: 1px 9px; font-size: 1.3rem; }
.icon-button:hover { color: var(--white); }
.secret { display: grid; gap: 11px; }
.secret input { font-family: ui-monospace, monospace; }
.tickets { grid-template-columns: repeat(auto-fit, minmax(min(100%, 255px), 1fr)); }
.ticket { border-top: 4px solid #8ebeb6; }
.ticket p { margin: 6px 0; }
.ticket ul, .detail-list { margin: 8px 0 14px; padding-left: 19px; }
.ticket li, .detail-list li { margin-bottom: 5px; }
.ticket-ready { border-top-color: #25816d; }
.ticket-number { font-weight: 760; font-size: 1.75rem; letter-spacing: -.04em; }
.chart table { table-layout: fixed; }
.chart progress { width: 100%; height: 11px; accent-color: var(--teal); }
.note { border-left: 3px solid #93c4ba; padding: 5px 9px; background: #f1f7f5; overflow-wrap: anywhere; }
.modifier-group { border: 1px solid var(--line); display: grid; gap: 9px; border-radius: 8px; margin: 5px 0; padding: 11px; }
.modifier-option { display: grid; grid-template-columns: minmax(0,1fr) minmax(60px, .43fr) auto auto; align-items: end; gap: 7px; }
.modifier-option button { padding-inline: 8px; }
.modifier-option .check { padding-bottom: 8px; }
.kv { display: grid; gap: 4px; grid-template-columns: auto 1fr; margin: 0 0 13px; overflow-wrap: anywhere; }
.kv dt { font-weight: 650; }
.kv dd { margin: 0 0 0 9px; }
@media (max-width: 900px) {
  .workspace { grid-template-columns: 195px minmax(0, 1fr); }
  .sidebar { padding-inline: 10px; }
  .main { padding-inline: 17px; }
}
@media (max-width: 680px) {
  .entry { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .entry-brand { padding: 23px; }
  .entry-panel { place-items: start center; padding: 30px 18px; }
  .workspace { display: block; }
  .sidebar { position: static; height: auto; padding: 13px; gap: 12px; }
  .sidebar .brand { padding: 0; }
  .org-picker { padding: 0; }
  nav { display: flex; gap: 3px; overflow-x: auto; }
  nav button { width: auto; padding: 8px; }
  .nav-icon { display: none; }
  .account { padding-top: 7px; }
  .account div { display: flex; align-items: center; gap: 11px; }
  .main { padding-top: 19px; }
  .top { align-items: start; flex-direction: column; }
  .panel { padding: 12px; }
  th, td { padding: 7px; }
  .modifier-option { grid-template-columns: minmax(0, 1fr) 70px; }
}
