/* ───── kattenbelletje · soft pink dashboard ───── */
:root {
  --bg: #fdf5f7;
  --bg-2: #fbe9ef;
  --bg-3: #ffffff;
  --card: #ffffff;
  --card-tint: #fefafb;
  --ink: #4a2f3a;
  --ink-2: #7a5a66;
  --ink-3: #a48a93;
  --line: #f1dde4;
  --line-2: #f7e6ec;
  --rose: #d98ba5;
  --rose-deep: #c2718e;
  --rose-soft: #f5d7e1;
  --rose-faint: #fceef3;
  --online: #b3c9a8;
  --offline: #d9c5ca;
  --shadow-sm: 0 1px 2px rgba(217, 139, 165, 0.06);
  --shadow-md: 0 6px 18px -8px rgba(194, 113, 142, 0.18), 0 2px 4px rgba(217, 139, 165, 0.05);
  --shadow-lg: 0 24px 48px -20px rgba(194, 113, 142, 0.28), 0 4px 12px rgba(217, 139, 165, 0.08);
  --radius: 14px;
  --radius-lg: 22px;
  --script: 'Parisienne', 'Pinyon Script', cursive;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1100px 700px at 88% -10%, #ffe4ee 0%, transparent 60%),
    radial-gradient(900px 600px at -10% 110%, #fbe1ea 0%, transparent 55%),
    linear-gradient(180deg, #fdf5f7 0%, #fbf0f4 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.005em;
}
button { font-family: inherit; cursor: pointer; }

/* ───── layout ───── */
.app {
  display: grid;
  grid-template-columns: 264px 1fr;
  min-height: 100vh;
}

/* ───── sidebar ───── */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 26px 18px 22px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.7) 0%, rgba(253, 245, 247, 0.4) 100%);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 6px;
}
.brand-bell {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  color: var(--rose);
  background: var(--rose-faint);
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--rose-soft);
}
.brand-bell svg { width: 16px; height: 16px; }
.brand-name {
  font-family: var(--script);
  font-size: 30px;
  line-height: 1;
  color: var(--rose-deep);
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.nav-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  padding: 0 10px;
  margin: 2px 0 -4px;
}
.nav {
  display: flex; flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  padding-right: 4px;
}
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: var(--rose-soft); border-radius: 3px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--ink-2);
  background: transparent;
  border: 0;
  width: 100%;
  text-align: left;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.nav-item:hover { background: var(--rose-faint); color: var(--ink); }
.nav-item.active {
  background: linear-gradient(90deg, #fce4ec 0%, #fdeaf0 100%);
  color: var(--rose-deep);
  box-shadow: inset 0 0 0 1px var(--rose-soft);
}
.nav-item .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--online);
  margin-left: auto;
  box-shadow: 0 0 0 2px rgba(179, 201, 168, 0.18);
}
.nav-item.offline .dot { background: var(--offline); box-shadow: 0 0 0 2px rgba(217, 197, 202, 0.25); }
.nav-icon { width: 18px; height: 18px; flex: none; opacity: 0.85; }

.sidebar-footer {
  margin-top: auto;
  padding: 10px 12px;
  display: flex; align-items: center; gap: 10px;
  color: var(--ink-3);
  font-size: 12px;
  border-top: 1px dashed var(--line);
}
.avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f5cad8 0%, #e7a8bc 100%);
  display: grid; place-items: center;
  color: #fff;
  font-family: var(--script);
  font-size: 16px;
  box-shadow: var(--shadow-sm);
}

/* ───── main ───── */
.main {
  padding: 38px 44px 60px;
  max-width: 1320px;
  width: 100%;
}
.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}
.greeting {
  font-family: var(--script);
  font-size: 54px;
  line-height: 1;
  color: var(--rose-deep);
  margin: 0 0 8px;
  letter-spacing: 0.5px;
}
.subgreeting {
  color: var(--ink-2);
  font-size: 14px;
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
}
.subgreeting .chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line-2);
  font-size: 12.5px;
  color: var(--ink-2);
}
.subgreeting .chip .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--online);
}

.search {
  display: flex; align-items: center; gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  width: 280px;
  box-shadow: var(--shadow-sm);
  color: var(--ink-3);
  font-size: 13px;
}
.search input {
  border: 0; outline: 0;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  flex: 1;
  min-width: 0;
}
.search kbd {
  font-family: inherit;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--rose-faint);
  color: var(--rose-deep);
  border: 1px solid var(--rose-soft);
}

/* ───── stat strip ───── */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.stat .label { font-size: 11.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.1em; }
.stat .value { font-size: 22px; color: var(--ink); margin-top: 6px; font-weight: 500; }
.stat .value .unit { font-size: 12px; color: var(--ink-3); margin-left: 4px; font-weight: 400; }
.stat .bar { margin-top: 10px; height: 4px; border-radius: 999px; background: var(--rose-faint); overflow: hidden; }
.stat .bar > div { height: 100%; background: linear-gradient(90deg, #ecb4c6, var(--rose)); border-radius: 999px; }

/* ───── grid ───── */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 14px;
}
.section-title { font-size: 15px; color: var(--ink); font-weight: 600; letter-spacing: 0.01em; }
.section-sub { font-size: 12.5px; color: var(--ink-3); }

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

.card {
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s ease, border-color .2s ease;
  cursor: pointer;
  text-align: left;
  display: flex; flex-direction: column;
  gap: 14px;
  min-height: 152px;
  position: relative;
  overflow: hidden;
}
.card::before {
  /* delicate inner highlight */
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.6), rgba(252, 238, 243, 0.0) 40%);
  pointer-events: none;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--rose-soft);
}
.card.offline { opacity: 0.86; }
.card.offline:hover { opacity: 1; }

.card-head {
  display: flex; align-items: center; justify-content: space-between;
}
.card-icon {
  width: 38px; height: 38px;
  border-radius: 12px;
  display: grid; place-items: center;
  color: var(--rose-deep);
  background: var(--rose-faint);
  box-shadow: inset 0 0 0 1px var(--rose-soft);
}
.card-icon svg { width: 18px; height: 18px; }
.card.offline .card-icon {
  background: #f4ecee;
  color: var(--ink-3);
  box-shadow: inset 0 0 0 1px #ecd9df;
}

.status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px;
  color: var(--ink-3);
  background: rgba(255,255,255,0.6);
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
}
.status .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--online);
  box-shadow: 0 0 0 3px rgba(179, 201, 168, 0.18);
}
.status.offline .dot { background: var(--offline); box-shadow: 0 0 0 3px rgba(217, 197, 202, 0.22); }
.status.warn .dot { background: #e0bba2; box-shadow: 0 0 0 3px rgba(224, 187, 162, 0.2); }

.card-name {
  font-size: 15px;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0;
}
.card-desc {
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.55;
  margin: -6px 0 0;
}

.card-meta {
  margin-top: auto;
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px;
  border-top: 1px dashed var(--line-2);
  font-size: 11.5px;
  color: var(--ink-3);
}
.card-meta .open {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--rose-deep);
  font-weight: 500;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .2s ease, transform .2s ease;
}
.card:hover .card-meta .open { opacity: 1; transform: translateX(0); }
.card-meta .open svg { width: 12px; height: 12px; }

/* ───── detail view ───── */
.detail {
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: 24px;
  padding: 28px 30px 32px;
  box-shadow: var(--shadow-md);
  min-height: 540px;
  animation: pop .28s cubic-bezier(.2,.7,.2,1);
}
@keyframes pop {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.detail-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 22px;
}
.back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 12.5px;
  transition: background .15s ease, color .15s ease;
}
.back-btn:hover { background: var(--rose-faint); color: var(--rose-deep); border-color: var(--rose-soft); }
.back-btn svg { width: 13px; height: 13px; }

.detail-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}
.detail-sub { color: var(--ink-3); font-size: 13px; }
.detail-icon {
  width: 44px; height: 44px; border-radius: 13px;
  background: var(--rose-faint);
  color: var(--rose-deep);
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1px var(--rose-soft);
}
.detail-icon svg { width: 20px; height: 20px; }

.detail-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
}
.panel {
  background: var(--card-tint);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  padding: 18px 18px 16px;
}
.panel h4 {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}
.row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line-2);
  font-size: 13.5px;
  color: var(--ink);
}
.row:last-child { border-bottom: 0; }
.row .muted { color: var(--ink-3); font-size: 12.5px; }
.row .pill {
  font-size: 11px; padding: 2px 8px;
  border-radius: 999px;
  background: var(--rose-faint);
  color: var(--rose-deep);
  border: 1px solid var(--rose-soft);
}

.list-empty {
  color: var(--ink-3);
  font-size: 13px;
  padding: 20px;
  text-align: center;
  background: var(--card-tint);
  border-radius: 14px;
  border: 1px dashed var(--line);
}

.quote {
  font-family: var(--script);
  color: var(--rose-deep);
  font-size: 26px;
  line-height: 1.3;
  margin: 0 0 6px;
}

.action {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--rose-soft);
  background: #fff;
  color: var(--rose-deep);
  font-size: 12.5px;
  transition: background .15s ease, transform .15s ease;
}
.action:hover { background: var(--rose-faint); transform: translateY(-1px); }
.action.primary { background: var(--rose); color: #fff; border-color: var(--rose); }
.action.primary:hover { background: var(--rose-deep); }
.action svg { width: 13px; height: 13px; }

.actions-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* mood specific */
.spark {
  display: flex; align-items: flex-end; gap: 4px; height: 56px; margin: 6px 0 14px;
}
.spark > div {
  flex: 1;
  background: linear-gradient(180deg, var(--rose-soft), var(--rose));
  border-radius: 4px 4px 2px 2px;
  opacity: 0.85;
}

.tag-row { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 11.5px;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 3px 9px;
}
.tag.rose { color: var(--rose-deep); background: var(--rose-faint); border-color: var(--rose-soft); }

.kb-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.kb-col { background: #fff; border: 1px solid var(--line-2); border-radius: 14px; padding: 12px; }
.kb-col h5 { margin: 0 0 10px; font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.1em; }
.kb-card {
  background: var(--card-tint);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 12.5px;
  color: var(--ink);
  margin-bottom: 8px;
}
.kb-card .meta { font-size: 11px; color: var(--ink-3); margin-top: 4px; }

.todo {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0;
  font-size: 13.5px;
  color: var(--ink);
  border-bottom: 1px dashed var(--line-2);
}
.todo:last-child { border-bottom: 0; }
.check {
  width: 17px; height: 17px;
  border-radius: 6px;
  border: 1.5px solid var(--rose-soft);
  background: #fff;
  flex: none;
  display: grid; place-items: center;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.check.on { background: var(--rose); border-color: var(--rose); }
.check.on svg { color: #fff; width: 11px; height: 11px; }
.todo.done .text { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--rose-soft); }
.todo .due { font-size: 11.5px; color: var(--ink-3); margin-left: auto; }

/* offline state */
.offline-box {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-3);
}
.offline-box .big {
  font-family: var(--script);
  font-size: 32px;
  color: var(--rose-deep);
  margin-bottom: 6px;
}

/* ───── responsive ───── */
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: relative;
    height: auto;
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 16px 14px;
  }
  .nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
  }
  .nav-label { display: none; }
  .nav-item { white-space: nowrap; padding: 7px 12px; }
  .nav-item .dot { display: none; }
  .sidebar-footer { display: none; }
  .main { padding: 22px 18px 60px; }
  .topbar { flex-direction: column; align-items: flex-start; gap: 16px; }
  .greeting { font-size: 40px; }
  .search { width: 100%; }
}
@media (max-width: 620px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .greeting { font-size: 34px; }
  .kb-board { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .grid { grid-template-columns: 1fr; }
}
