/* public/page_private_planner/index_page_private_planner.css
   BV-Private-Planner – Web-Ansicht. Professionelles, dunkles Glas-Design,
   Indigo-Akzent (eigene Identität ggü. Smart-Planner-Gold). */

:root {
  --bg-0: #0b1220;
  --bg-1: #0f172a;
  --bg-2: #020617;
  --card: rgba(17, 24, 39, 0.86);
  --card-2: rgba(30, 41, 59, 0.82);
  --line: rgba(129, 140, 248, 0.20);
  --text: #e8ecf5;
  --text-soft: #c7d0e0;
  --muted: #93a0b8;
  --accent: #818cf8;
  --accent-2: #6366f1;
  --accent-strong: #a5b4fc;
  --danger: #f87171;
  --shadow: 0 22px 55px rgba(2, 6, 23, 0.45);
  --radius: 20px;
  --radius-sm: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(99, 102, 241, 0.20), transparent 40%),
    radial-gradient(circle at 88% 0%, rgba(129, 140, 248, 0.12), transparent 44%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 55%, var(--bg-2) 100%);
}

body { padding: max(16px, env(safe-area-inset-top)) 14px max(24px, env(safe-area-inset-bottom)); }
button, input, select { font: inherit; }
button { cursor: pointer; }

.shell { width: min(760px, 100%); margin: 0 auto; }

/* Hero */
.hero { padding: 6px 2px 12px; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero h1 { margin: 2px 0 0; font-size: clamp(1.05rem, 2vw, 1.35rem); line-height: 1.1; font-weight: 700; }
.hero-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.eyebrow {
  margin: 0 0 2px; color: var(--accent); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
}

.page, .view { display: grid; gap: 12px; }
.hidden { display: none !important; }

/* Cards */
.card {
  background: linear-gradient(180deg, var(--card) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  backdrop-filter: blur(12px);
}
.card-compact { padding: 13px 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.compact-head { margin-bottom: 8px; }
h2 { margin: 0; font-size: 0.98rem; font-weight: 700; }

.user-line { margin: -2px 2px 2px; color: var(--muted); font-size: 0.82rem; }

/* Form */
.form { display: grid; gap: 14px; margin-top: 12px; }
.field { display: grid; gap: 7px; }
.field span { color: var(--text-soft); font-size: 0.88rem; }
.field input {
  width: 100%; border: 1px solid rgba(148, 163, 184, 0.26); border-radius: var(--radius-sm);
  padding: 13px 14px; background: rgba(15, 23, 42, 0.92); color: var(--text); outline: none;
}
.field input:focus { border-color: rgba(129, 140, 248, 0.75); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.20); }

/* Buttons */
.btn { border: 0; border-radius: var(--radius-sm); padding: 13px 16px; font-weight: 700; }
.btn-primary { background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 78%); color: #0b1220; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-secondary { background: rgba(129, 140, 248, 0.10); color: var(--text); border: 1px solid rgba(129, 140, 248, 0.22); }
.btn-secondary:hover { background: rgba(129, 140, 248, 0.18); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-small { padding: 9px 14px; font-size: 0.86rem; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 13px; border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.78); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { border-color: rgba(129, 140, 248, 0.45); }
.icon-btn svg { width: 18px; height: 18px; }

/* Day tabs */
.day-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 2px 0; }
.day-tab {
  border: 1px solid rgba(148, 163, 184, 0.20); background: rgba(15, 23, 42, 0.9); color: var(--text);
  border-radius: var(--radius-sm); padding: 10px 6px; min-height: 58px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.day-tab:hover { border-color: rgba(129, 140, 248, 0.4); }
.day-tab .d-rel { font-size: 0.86rem; font-weight: 700; line-height: 1.1; }
.day-tab .d-date { font-size: 0.7rem; color: var(--muted); }
.day-tab .d-badge {
  margin-top: 2px; font-size: 0.62rem; font-weight: 700; color: var(--accent-strong);
  background: rgba(99, 102, 241, 0.16); border-radius: 999px; padding: 1px 7px;
}
.day-tab.active {
  border-color: rgba(129, 140, 248, 0.7);
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.20) 0%, rgba(15, 23, 42, 0.92) 100%);
  box-shadow: inset 0 0 0 1px rgba(129, 140, 248, 0.35);
}
.day-tab.active .d-rel { color: #eef0ff; }

/* Lists */
.list-wrap { display: grid; gap: 8px; }
.list-empty {
  border: 1px dashed rgba(148, 163, 184, 0.26); border-radius: var(--radius-sm);
  padding: 13px; color: var(--muted); text-align: center; font-size: 0.82rem;
}

/* Task / appointment items */
.task-item, .appointment-item {
  background: linear-gradient(180deg, var(--card-2) 0%, rgba(15, 23, 42, 0.92) 100%);
  border: 1px solid rgba(148, 163, 184, 0.16); border-radius: 16px; padding: 11px 12px;
}
.task-item { display: flex; gap: 11px; align-items: flex-start; cursor: pointer; transition: border-color 0.15s ease; }
.task-item:hover { border-color: rgba(129, 140, 248, 0.4); }
.task-item.done { opacity: 0.7; }
.task-item.done .task-title { text-decoration: line-through; text-decoration-color: rgba(148,163,184,0.7); color: var(--muted); }
.task-check { width: 21px; height: 21px; margin-top: 1px; flex: 0 0 auto; accent-color: var(--accent-2); cursor: pointer; }
.task-body { min-width: 0; flex: 1; display: grid; gap: 4px; }
.task-body .meta-list, .task-body .comment { margin-top: 0; }
.task-title { font-size: 0.9rem; font-weight: 600; line-height: 1.3; display: flex; align-items: center; gap: 7px; }

.prio-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.prio-high { background: #f97316; }
.prio-medium { background: #f59e0b; }
.prio-low { background: #94a3b8; }
.prio-critical { background: #ef4444; }

.appointment-title { font-size: 0.9rem; font-weight: 700; line-height: 1.3; }
.appointment-item.past { opacity: 0.55; }
.appointment-item.past .appointment-title { text-decoration: line-through; color: var(--muted); }

.meta-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.meta-chip {
  border-radius: 999px; padding: 3px 9px; font-size: 0.68rem; color: var(--text-soft);
  background: rgba(148, 163, 184, 0.10); border: 1px solid rgba(148, 163, 184, 0.14);
}
.comment { margin-top: 8px; color: var(--text-soft); line-height: 1.45; font-size: 0.78rem; }

/* Termin-Beschreibung (lange Teams-Texte): scrollbar & kompakt */
.appt-desc {
  max-height: 132px; overflow-y: auto; white-space: pre-wrap; word-break: break-word;
  padding: 9px 11px; background: rgba(2, 6, 23, 0.55); border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px; -webkit-overflow-scrolling: touch;
}
.appt-desc::-webkit-scrollbar { width: 8px; }
.appt-desc::-webkit-scrollbar-thumb { background: rgba(129, 140, 248, 0.35); border-radius: 8px; }

/* Household lists */
.hlist-card { background: linear-gradient(180deg, var(--card-2) 0%, rgba(15,23,42,0.92) 100%); border: 1px solid rgba(148,163,184,0.16); border-radius: 16px; padding: 12px 13px; }
.hlist-title { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-weight: 700; font-size: 0.9rem; margin-bottom: 9px; }
.hlist-count { font-size: 0.7rem; color: var(--muted); font-weight: 600; }
.hlist-items { display: grid; gap: 4px; }
.hlist-item { display: flex; gap: 10px; align-items: center; padding: 5px 2px; cursor: pointer; }
.hlist-item input { width: 19px; height: 19px; flex: 0 0 auto; accent-color: var(--accent-2); cursor: pointer; }
.hlist-item-text { font-size: 0.86rem; color: var(--text-soft); }
.hlist-item.checked .hlist-item-text { text-decoration: line-through; color: var(--muted); }

/* Feedback */
.feedback { margin: 0; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid transparent; font-size: 0.85rem; }
.feedback.error { color: #fecaca; background: rgba(127, 29, 29, 0.22); border-color: rgba(248, 113, 113, 0.25); }

@media (max-width: 560px) {
  .shell { width: 100%; }
  .day-tab { min-height: 54px; }
}
