:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #182c40;
  background: #f3f6fa;
  font-synthesis: none;
  --nav: #142439;
  --nav-light: #243850;
  --ink: #192e45;
  --muted: #53677e;
  --line: #dbe3ed;
  --paper: #fff;
  --blue: #224fa4;
  --blue-soft: #eaf1ff;
  --green: #146047;
  --green-soft: #e7f7ee;
  --red: #972b3e;
  --shadow: 0 3px 15px #22375009;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-width: 300px; margin: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .48; cursor: default; }
:focus-visible { outline: 3px solid #5684df; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { min-height: 42px; border-radius: 8px; }
input, select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid #b8c6d6; background: white; color: var(--ink);
}
input[type=checkbox] { width: 19px; height: 19px; min-height: 0; accent-color: var(--blue); margin: 0; }
select { padding-right: 28px; }
textarea { resize: vertical; }
small, .muted { color: var(--muted); }
.loading { text-align: center; margin: 16vh 16px 0; }
.layout { min-height: 100vh; display: grid; grid-template-columns: 238px minmax(0, 1fr); }
.sidebar {
  color: #eef4ff; background: var(--nav); height: 100vh; position: sticky; top: 0;
  display: flex; flex-direction: column; padding: 28px 17px 20px; overflow: auto;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px 24px; font-weight: 700; }
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px;
  border: 1px solid #7d9cc1; border-radius: 9px; color: #e2ebf7; font-size: .78rem; letter-spacing: .05em;
}
.brand-name { line-height: 1.18; }
.brand-name small { display: block; color: #b5c7df; font-size: .78rem; font-weight: 500; margin-top: 3px; }
.nav-label { color: #b5c7df; padding: 20px 9px 8px; font-size: .8rem; font-weight: 650; }
.nav-btn {
  width: 100%; background: transparent; border: 1px solid transparent; color: #dbe8f9;
  text-align: left; padding: 9px 10px; font-size: .92rem; font-weight: 550;
}
.nav-btn:hover, .nav-btn.selected { background: var(--nav-light); }
.nav-btn.selected { color: #fff; border-color: #577294; }
.nav-sub { margin-top: 3px; }
.sidebar-bottom { margin-top: auto; border-top: 1px solid #3c516c; padding: 16px 7px 0; }
.sidebar-bottom strong { display: block; font-size: .94rem; padding-bottom: 6px; overflow-wrap: anywhere; }
.sidebar-bottom button { background: none; border: 0; padding: 0 2px; color: #d8e6f8; text-decoration: underline; }
.content { padding: 30px clamp(18px, 3vw, 46px) 45px; max-width: 1510px; width: 100%; margin-inline: auto; }
.masthead { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding-bottom: 20px; }
.masthead h1 { font-size: clamp(1.75rem, 3vw, 2.55rem); letter-spacing: -.04em; line-height: 1.1; }
.masthead p { color: var(--muted); margin-top: 8px; font-size: .93rem; }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px;
  border: 1px solid #b9c7d8; background: white; color: var(--ink); padding: 8px 13px;
  font-size: .92rem; font-weight: 650; text-align: center;
}
.button:hover:not(:disabled) { border-color: #6a87ae; background: #f1f5fb; }
.button.primary { background: var(--blue); color: white; border-color: var(--blue); }
.button.primary:hover:not(:disabled) { background: #184087; }
.button.subtle { background: #f1f5fb; }
.count {
  min-width: 22px; min-height: 21px; display: inline-grid; place-items: center;
  background: var(--blue-soft); color: var(--blue); border-radius: 6px; font-size: .78rem;
}
.overview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.metric { padding: 15px 14px 13px; background: white; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.metric strong { display: block; font-size: 1.45rem; line-height: 1.15; letter-spacing: -.02em; margin-bottom: 5px; }
.metric span { display: block; color: var(--muted); font-size: .84rem; }
.toolbar {
  display: flex; align-items: end; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 14px;
}
.segmented { display: flex; gap: 4px; max-width: 100%; flex-wrap: wrap; }
.segment { font-weight: 650; border: 1px solid transparent; padding: 8px 12px; background: transparent; color: var(--muted); }
.segment:hover, .segment.selected { background: var(--blue-soft); color: var(--blue); }
.segment.selected { border-color: #c2d4f9; }
.search-bar { display: flex; gap: 8px; flex: 1 1 280px; justify-content: end; }
.search-bar input { max-width: 320px; flex: 1 1 130px; min-width: 125px; }
.search-bar select { width: auto; max-width: 145px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 325px), 1fr)); align-items: start; }
.card, .empty, .table-card, .agenda { border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: var(--shadow); }
.card .open-task { width: 100%; display: block; border: 0; text-align: left; background: transparent; padding: 15px; color: inherit; }
.card .open-task:hover { background: #f8faff; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.scope { font-size: .81rem; color: #3d5978; font-weight: 650; }
.status {
  display: inline-flex; align-items: center; gap: 6px; background: #eef2f6; color: #475d75;
  padding: 4px 7px; border-radius: 6px; font-size: .77rem; font-weight: 700;
}
.status.in-progress { background: #e8efff; color: #244e9a; }
.status.completed, .status.arrived { background: var(--green-soft); color: var(--green); }
.status.completed::before, .status.arrived::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: #16a169;
  box-shadow: 0 0 7px 2px #16a16962;
}
.task-title { display: block; font-size: 1rem; font-weight: 700; margin: 10px 0 8px; line-height: 1.35; }
.card-meta { display: flex; gap: 6px 13px; flex-wrap: wrap; color: var(--muted); font-size: .84rem; }
.overdue { color: var(--red); font-weight: 650; }
.progress { display: flex; align-items: center; gap: 9px; margin-top: 13px; }
progress { width: 100%; height: 7px; border: none; border-radius: 10px; accent-color: var(--blue); background: #e5edf6; }
progress::-webkit-progress-bar { background: #e5edf6; border-radius: 10px; }
progress::-webkit-progress-value { background: #4174ce; border-radius: 10px; }
progress::-moz-progress-bar { background: #4174ce; border-radius: 10px; }
.progress small { white-space: nowrap; }
.empty { padding: 24px; color: var(--muted); }
.section-title { line-height: 1.2; font-size: 1.25rem; }
.guest-note { margin: 0 0 14px; color: var(--muted); font-size: .91rem; }
.guest-list { display: grid; gap: 9px; }
.guest-row { display: grid; grid-template-columns: 1.1fr 1fr 1fr auto; align-items: center; gap: 12px; padding: 13px 14px; }
.guest-row strong { display: block; margin-bottom: 3px; }
.guest-row p { font-size: .88rem; color: var(--muted); }
.guest-row .actions { justify-content: end; }
.agenda { padding: 18px; margin-bottom: 14px; }
.agenda h2 { margin-bottom: 9px; font-size: 1.12rem; }
.agenda-row { display: grid; grid-template-columns: 80px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.agenda-row:last-child { border: 0; }
.agenda-row time { font-weight: 650; color: var(--blue); font-variant-numeric: tabular-nums; }
dialog {
  color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 14px;
  padding: 0; width: min(680px, calc(100vw - 26px)); max-height: 88vh; box-shadow: 0 25px 80px #1322374a; overflow: auto;
}
dialog::backdrop { background: #0d1b2c90; }
.dialog-content { padding: clamp(14px, 3vw, 25px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 15px; }
.dialog-heading h2 { font-size: 1.3rem; line-height: 1.25; }
.dialog-heading .scope { display: block; margin-bottom: 5px; }
.dialog-footer { margin-top: 18px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.field { display: grid; gap: 5px; font-size: .9rem; font-weight: 650; min-width: 0; }
.field input, .field select, .field textarea { font-size: 1rem; font-weight: 400; }
.form { display: grid; gap: 13px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-error { border-radius: 8px; color: var(--red); background: #fceef1; padding: 10px 12px; }
.picker { display: grid; gap: 5px; }
.picker input { background: #f8faff; }
.item-editor, .check-line, .notice-row { border-top: 1px solid var(--line); padding: 10px 0; }
.item-editor { display: grid; gap: 9px; }
.item-title { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px; }
.hint { margin: 2px 0; font-size: .86rem; color: var(--muted); }
.check-line { display: flex; gap: 11px; align-items: start; cursor: pointer; }
.check-line input { flex: 0 0 19px; margin-top: 2px; }
.check-line .hint { display: block; }
.notice-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.notice-row strong { line-height: 1.3; }
.notice-row small { display: block; margin-top: 3px; }
.notice-row.unread { border-left: 3px solid var(--blue); padding-left: 8px; }
.toast {
  position: fixed; z-index: 10; right: 16px; bottom: 16px; max-width: calc(100vw - 32px);
  padding: 13px 16px; background: var(--nav); color: white; border-radius: 9px; box-shadow: 0 5px 30px #13223750;
}
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px 13px; background: var(--nav); }
.login-panel { width: min(100%, 425px); padding: clamp(20px, 5vw, 32px); border-radius: 15px; background: white; box-shadow: 0 20px 75px #020b18a0; }
.login-panel .brand { color: var(--ink); padding: 0 0 22px; }
.login-panel .brand-mark { background: var(--nav); }
.login-panel .brand-name small { color: var(--muted); }
.login-panel h1 { font-size: 1.65rem; margin-bottom: 8px; letter-spacing: -.025em; }
.login-panel .muted { margin-bottom: 15px; }
.login-panel details { border-top: 1px solid var(--line); padding-top: 10px; }
.login-panel summary { color: var(--blue); cursor: pointer; font-weight: 650; }
.login-panel details > div { margin-top: 10px; }
.mobile-only { display: none; }
@media (max-width: 800px) {
  .layout { display: block; }
  .sidebar { display: none; }
  .content { padding-top: 20px; }
  .mobile-only { display: flex; }
  .mobile-header { align-items: center; justify-content: space-between; background: var(--nav); color: white; padding: 7px 14px; gap: 8px; }
  .mobile-header .brand { padding: 0; font-size: .91rem; }
  .mobile-header .brand-mark { width: 34px; flex-basis: 34px; height: 34px; }
  .mobile-navigation { align-items: end; gap: 10px; padding: 10px 14px; background: white; border-bottom: 1px solid var(--line); }
  .mobile-navigation .field { flex: 1 1 min(44%, 200px); }
}
@media (max-width: 520px) {
  .masthead { align-items: start; flex-direction: column; }
  .content { padding-inline: 12px; }
  .toolbar .search-bar { justify-content: start; }
  .search-bar input { max-width: none; }
  .guest-row { grid-template-columns: 1fr 1fr; }
  .guest-row .actions { justify-content: start; }
  .form-row { grid-template-columns: 1fr; }
  .metric { padding: 12px 9px; }
  .metric span { font-size: .76rem; }
}
