.layout { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.topbar { display: none; }
.side {
  background: var(--surface); border-right: 1px solid var(--border); padding: 20px 14px;
  display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side .company { margin: 2px 0 16px 40px; font-size: .85rem; color: var(--muted); font-weight: 600; }
.side .links { display: flex; flex-direction: column; gap: 2px; }
.side .group { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin: 14px 10px 4px; }
.side .links a {
  color: var(--text); text-decoration: none; padding: 9px 10px; border-radius: 9px; display: flex; align-items: center; gap: 10px; font-weight: 500;
}
.side .links svg { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.side .links a:hover { background: var(--surface-2); }
.side .links a.active { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.side .links a.active svg { color: var(--accent); }
.side .me { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; font-size: .9rem; }
.badge:empty { display: none; }
.badge { margin-left: auto; background: var(--danger); color: #fff; border-radius: 999px; font-size: .72rem; padding: 1px 7px; font-weight: 700; }
.badge.soft { background: var(--surface-2); color: var(--muted); }
main#view { padding: 30px 34px 70px; max-width: 1200px; width: 100%; outline: none; }

.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.page-head h1 { margin: 0; font-size: 1.7rem; letter-spacing: -.01em; }
.page-sub { color: var(--muted); margin: 0 0 22px; max-width: 760px; }
.grid { display: grid; gap: 16px; }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat { padding: 16px 18px; text-decoration: none; color: var(--text); display: block; }
a.stat:hover { border-color: var(--accent); }
.stat b { display: block; font-size: 2rem; line-height: 1.1; margin-bottom: 2px; }
.stat .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--muted); }
.stat.ok .dot { background: var(--ok); } .stat.warn .dot { background: var(--warn); } .stat.bad .dot { background: var(--danger); } .stat.info .dot { background: var(--info); }
b.ok { color: var(--ok); } b.warn { color: var(--warn); } b.bad { color: var(--danger); } b.info { color: var(--info); }
.section { margin-top: 26px; }
.section > h2 { margin-bottom: 10px; }
.person { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 700; font-size: .8rem; flex: none;
}
.list > .item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.list > .item:last-child { border-bottom: 0; }
.list > .item:first-child { padding-top: 0; }

/* Home */
.hello { font-size: 1.7rem; margin: 0; letter-spacing: -.01em; }
.todo { display: flex; align-items: center; gap: 14px; padding: 14px 18px; text-decoration: none; color: var(--text); }
.todo:hover { border-color: var(--accent); }
.todo .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 1.2rem; flex: none; background: var(--accent-soft); }
.todo.warn .ic { background: color-mix(in srgb, var(--warn) 15%, transparent); }
.todo.bad .ic { background: color-mix(in srgb, var(--danger) 13%, transparent); }
.todo .go { margin-left: auto; color: var(--accent); font-weight: 600; white-space: nowrap; }
.todos { display: flex; flex-direction: column; gap: 10px; }
.allclear { display: flex; align-items: center; gap: 14px; }
.allclear .ic { font-size: 1.6rem; }
.quick { display: flex; gap: 10px; flex-wrap: wrap; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); padding: 2px 8px; border-radius: 6px; font-weight: 700; }
.empty { text-align: center; padding: 30px 16px; color: var(--muted); }
.empty .ic { font-size: 2rem; display: block; margin-bottom: 6px; }
.search { max-width: 320px; }

/* Sign-in */
.signin { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 1fr) minmax(380px, 1.1fr); }
.signin-art {
  background: linear-gradient(155deg, #1d6ff2, #0f3f99); color: #fff; padding: 40px 48px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.signin-art h2 { font-size: 2.2rem; line-height: 1.15; margin-bottom: 18px; max-width: 420px; letter-spacing: -.02em; }
.signin-art ul { padding-left: 20px; margin: 0; color: #dbe7ff; font-size: 1.05rem; }
.signin-art li { margin: 8px 0; }
.signin-art p { color: #b9cdf5; margin: 0; }
.brand.light { color: #fff; }
.signin-main { display: grid; place-items: center; padding: 32px 20px; }
.signin-main form { width: 100%; max-width: 400px; }
.signin-main h1 { font-size: 1.75rem; letter-spacing: -.01em; }
.pw { position: relative; }
.pw input { padding-right: 64px; }
.pw button { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }
.btn.big { width: 100%; padding: 12px 16px; font-size: 1rem; }
.center { text-align: center; }
.only-mobile { display: none; }
.loading { position: fixed; inset: 0; display: grid; place-items: center; color: var(--muted); }

/* Schedule */
.sched { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 860px; }
.sched th, .sched td { border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); padding: 6px; }
.sched th:first-child, .sched td:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 160px; }
.sched td.cell { cursor: pointer; vertical-align: top; min-width: 110px; height: 58px; position: relative; }
.sched td.cell:hover { background: var(--surface-2); }
.sched td.cell:hover::after { content: "+"; position: absolute; right: 8px; bottom: 4px; color: var(--accent); font-weight: 700; }
.sched th.today { color: var(--accent); background: var(--accent-soft); }
.chip {
  display: block; font-size: .78rem; border-radius: 6px; padding: 3px 6px; margin-bottom: 4px;
  background: var(--accent-soft); border-left: 3px solid var(--accent); color: var(--text); cursor: pointer; text-align: left; width: 100%;
  font-family: inherit; border-top: 0; border-right: 0; border-bottom: 0;
}
.chip.draft { opacity: .65; border-left-style: dashed; }
.chip.off { background: color-mix(in srgb, var(--warn) 14%, transparent); border-left-color: var(--warn); cursor: default; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.legend .chip { display: inline-block; width: auto; margin: 0 6px 0 0; cursor: default; }

dialog { border: 1px solid var(--border); border-radius: 16px; padding: 24px; width: min(520px, calc(100vw - 32px)); background: var(--surface); color: var(--text); }
dialog::backdrop { background: rgba(0, 0, 0, .35); }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--bg);
  padding: 10px 16px; border-radius: 10px; max-width: calc(100vw - 32px); z-index: 10; box-shadow: var(--shadow);
}

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; padding: 10px 16px;
    background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5;
  }
  .side { display: none; position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 8px 12px 14px; }
  .side.open { display: flex; }
  .side .brand.desk, .side .company { display: none; }
  main#view { padding: 20px 16px 60px; }
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  .signin { grid-template-columns: 1fr; }
  .signin-art { display: none; }
  .only-mobile { display: flex; }
  .todo .go { display: none; }
}
