
:root {
  color-scheme: light;
  --bg: #eef5fb;
  --bg-soft: #f8fbfd;
  --panel: rgba(255, 255, 255, .9);
  --panel-strong: #ffffff;
  --ink: #162233;
  --muted: #617086;
  --line: #cddded;
  --primary: #5f91d9;
  --primary-ink: #ffffff;
  --primary-deep: #315a93;
  --accent: #f0b84d;
  --accent-soft: #fff5dc;
  --urgent: #b42318;
  --high: #9a5a00;
  --medium: #5f91d9;
  --low: #526276;
  --shadow: 0 8px 22px rgba(30, 74, 142, .08);
}
* { box-sizing: border-box; }
html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
button, input, textarea, select { font: inherit; }
button {
  border: 0;
  border-radius: 7px;
  padding: 11px 14px;
  background: var(--primary);
  color: var(--primary-ink);
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(47, 102, 208, .16);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  max-width: 100%;
  white-space: normal;
}
button:hover { transform: translateY(-1px); background: var(--primary-deep); }
button.secondary {
  background: #e7eef8;
  color: var(--primary-deep);
  box-shadow: none;
}
button.danger { background: #b42318; }
button:disabled { opacity: .55; cursor: wait; }
input, textarea, select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
}
input:focus, textarea:focus, select:focus {
  outline: 3px solid rgba(47, 102, 208, .18);
  border-color: var(--primary);
}
textarea { min-height: 122px; resize: vertical; }
textarea {
  overflow: auto;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  max-height: 360px;
}
label { display: grid; gap: 5px; color: var(--muted); font-size: 13px; min-width: 0; }
.shell { width: 100%; max-width: 920px; min-width: 0; margin: 0 auto; padding: 18px; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 26px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--panel-strong) url("/brand/knoopi-icon.png") center / 40px 40px no-repeat;
  border: 1px solid rgba(95, 145, 217, .26);
  box-shadow: 0 4px 12px rgba(30, 74, 142, .08);
  position: relative;
  flex: 0 0 auto;
}
.brand-mark::before {
  content: none;
}
.brand-mark::after {
  content: none;
}
.brand h1 { margin: 0; font-size: clamp(28px, 5vw, 42px); letter-spacing: 0; color: var(--primary-deep); overflow-wrap: anywhere; }
.brand p { margin: 2px 0 0; color: var(--muted); overflow-wrap: anywhere; }
.app-shell { display: grid; gap: 14px; min-width: 0; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; min-width: 0; }
.panel, .item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 0;
  max-width: 100%;
}
.panel { padding: 16px; }
.stack { display: grid; gap: 12px; min-width: 0; }
.screen { display: grid; gap: 12px; min-width: 0; }
.today-card { background: #eaf2ff; border-color: #c6dcfa; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat { background: rgba(255,255,255,.72); border-radius: 8px; padding: 10px; }
.stat strong { display: block; color: var(--primary-deep); font-size: 22px; }
.quick-actions { display: grid; gap: 10px; }
.quick-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.nav { display: flex; flex-wrap: wrap; gap: 8px; }
.nav button { box-shadow: none; padding: 9px 11px; }
.download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 7px;
  padding: 11px 14px;
  background: #315a93;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(49, 90, 147, .16);
}
.notice { color: var(--muted); font-size: 14px; line-height: 1.45; }
.account-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.65);
}
.row { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.row > * { flex: 1; }
.row > button, .row > .fit { flex: 0 0 auto; }
.hidden { display: none !important; }
.status {
  min-height: 20px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 10px;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.status.error { color: var(--urgent); }
.summary {
  padding: 17px;
  border-radius: 8px;
  background: #f6fafe;
  border: 1px solid #bed5f4;
  font-size: 18px;
  line-height: 1.45;
  color: #19376d;
}
.section-title {
  margin: 0 0 10px;
  font-size: 18px;
  color: var(--primary-deep);
}
.item {
  padding: 14px;
  display: grid;
  gap: 10px;
  box-shadow: var(--shadow);
}
.item h3 { margin: 0; font-size: 17px; overflow-wrap: anywhere; }
.meta { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--bg-soft);
  font-weight: 650;
}
.urgent { color: var(--urgent); }
.high { color: var(--high); }
.medium { color: var(--medium); }
.low { color: var(--low); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar button { padding: 8px 10px; }
.screen-action { width: 100%; min-height: 50px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; min-width: 0; }
.empty { color: var(--muted); padding: 14px; border: 1px dashed var(--line); border-radius: 8px; background: rgba(255,255,255,.72); }
.fund { color: var(--muted); line-height: 1.5; }
.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(22, 34, 51, .38);
}
.tour-card {
  width: min(560px, 100%);
  max-height: min(720px, calc(100vh - 36px));
  overflow: auto;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(22, 34, 51, .22);
  padding: 18px;
  display: grid;
  gap: 14px;
}
.tour-kicker { color: var(--primary-deep); font-weight: 800; margin: 0; }
.tour-card h2 { margin: 0; color: var(--primary-deep); }
.tour-card p { margin: 0; line-height: 1.5; color: var(--muted); }
.tour-progress { color: var(--muted); font-size: 13px; font-weight: 700; }
.tour-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 860px) {
  .shell { padding: 14px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .brand { align-items: flex-start; }
  .grid, .split, .quick-row { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .row { display: grid; }
  .row > button, .row > .fit { width: 100%; }
  .download { width: 100%; }
  .tour-actions { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
  .shell { padding: 12px; }
  .panel, .item { padding: 12px; }
  .brand-mark { width: 44px; height: 44px; background-size: 36px 36px; }
  .brand h1 { font-size: 34px; line-height: 1.05; }
  .brand p { font-size: 15px; }
  .stats { grid-template-columns: 1fr; }
  .toolbar { display: grid; grid-template-columns: 1fr; }
  .nav { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .nav button { width: 100%; }
  textarea { max-height: 280px; }
}
