/* =========================================================================
   Kinogeil – Stylesheet (modern, schlicht, mobilfreundlich)
   ========================================================================= */

:root {
  --bg: #f4f5f8;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --text: #1c2230;
  --muted: #6b7280;
  --border: #e7e9f0;
  --sidebar: #15161c;
  --sidebar-2: #20222d;
  --sidebar-text: #c4c8d4;
  --accent: #5b6cff;
  --accent-600: #4a59ef;
  --ok: #22c55e;
  --maybe: #f59e0b;
  --no: #ef4444;
  --pending: #cbd5e1;
  --sun: #ffb703;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
  --shadow-lg: 0 16px 48px rgba(16, 24, 40, .18);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 { margin: 0; line-height: 1.25; }
a { color: inherit; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: .9em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 600; font-size: .94rem;
  padding: 10px 16px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, transform .05s, box-shadow .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-600); }
.btn-soft { background: #eef0ff; color: var(--accent-600); }
.btn-soft:hover { background: #e3e6ff; }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: #fff; color: var(--no); border-color: #f3c9c9; }
.btn-danger:hover { background: #fdecec; }
.btn-block { width: 100%; }
.btn.is-loading { opacity: .7; pointer-events: none; }

.link { color: var(--accent-600); text-decoration: none; font-weight: 600; font-size: .9rem; }
.link:hover { text-decoration: underline; }

/* ---------- Forms ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
input[type=text], input[type=password], input[type=time], input[type=date], select, textarea {
  width: 100%; font: inherit; color: var(--text);
  padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91, 108, 255, .15);
}
.hint { font-size: .82rem; color: var(--muted); margin: 4px 0 0; }

.alert { background: #fdecec; color: #b42318; border: 1px solid #f7d0d0; padding: 11px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; font-size: .92rem; }
.alert-ok { background: #e8f8ef; color: #15803d; border-color: #bdeccc; }
.alert-info { background: #eef2ff; color: #3a45b8; border-color: #d4dbff; }
.alert-info a { color: inherit; font-weight: 600; }

/* =========================================================================
   Login
   ========================================================================= */
.login-page {
  display: flex; align-items: center; justify-content: center; min-height: 100%;
  padding: 24px;
  background: radial-gradient(1200px 600px at 50% -10%, #2a2d3a 0%, #15161c 60%);
}
.login-wrap { width: 100%; max-width: 380px; text-align: center; }
.login-card {
  background: var(--surface); border-radius: 22px; padding: 34px 28px 30px;
  box-shadow: var(--shadow-lg); text-align: left;
}
.login-logo { font-size: 44px; text-align: center; line-height: 1; }
.login-card h1 { text-align: center; font-size: 1.7rem; margin: 8px 0 2px; letter-spacing: -.02em; }
.login-sub { text-align: center; color: var(--muted); margin: 0 0 22px; font-size: .95rem; }
.login-card .btn { margin-top: 6px; }
.login-foot { color: #8b8f9c; font-size: .82rem; margin-top: 18px; }

/* =========================================================================
   App-Layout
   ========================================================================= */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: 56px; z-index: 50;
  display: flex; align-items: center; gap: 12px; padding: 0 14px;
  background: var(--sidebar); color: #fff;
}
.topbar-title { font-weight: 700; letter-spacing: -.01em; }
.hamburger {
  width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 9px;
}
.hamburger span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: .2s; }
body.nav-open .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .hamburger span:nth-child(2) { opacity: 0; }
body.nav-open .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.layout { display: flex; min-height: 100vh; }
body:not(.login-page) { padding-top: 56px; }

.sidebar {
  position: fixed; top: 0; bottom: 0; left: 0; width: 264px; z-index: 60;
  background: var(--sidebar); color: var(--sidebar-text);
  display: flex; flex-direction: column; padding: 18px 14px;
  transform: translateX(-100%); transition: transform .25s ease;
}
body.nav-open .sidebar { transform: translateX(0); }
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; font-weight: 800; color: #fff; padding: 6px 8px 18px; letter-spacing: -.02em; }
.brand-icon { font-size: 1.3rem; }

.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px;
  border-radius: 11px; color: var(--sidebar-text); text-decoration: none;
  font-weight: 600; font-size: .95rem; transition: background .15s, color .15s;
}
.nav-link svg { width: 20px; height: 20px; flex-shrink: 0; opacity: .9; }
.nav-link:hover { background: var(--sidebar-2); color: #fff; }
.nav-link.is-active { background: var(--accent); color: #fff; }
.nav-link.is-active svg { opacity: 1; }

.sidebar-foot { border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.nav-link.profile { align-items: center; }
.profile-meta { display: flex; flex-direction: column; line-height: 1.2; }
.profile-meta strong { color: #fff; font-size: .92rem; }
.profile-meta small { color: #8b8f9c; font-size: .76rem; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--accent);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0;
}
.avatar-lg { width: 60px; height: 60px; font-size: 1.5rem; }
.nav-link.logout svg { width: 18px; height: 18px; }

.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 55; }

.main { flex: 1; min-width: 0; }
.main-inner { max-width: 1180px; margin: 0 auto; padding: 22px 16px 60px; }

/* ---------- Page chrome ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.6rem; letter-spacing: -.02em; }
.page-sub { color: var(--muted); margin: 4px 0 0; font-size: .95rem; }
.muted-line { color: var(--muted); font-size: .85rem; margin: 0 0 14px; min-height: 1em; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-head h2 { font-size: 1.1rem; }
.empty { color: var(--muted); font-size: .95rem; margin: 8px 0; }

/* ---------- Dashboard ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: transform .12s, box-shadow .15s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(16, 24, 40, .1); }
.stat-num { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; }
.stat-label { font-weight: 600; margin-top: 2px; }
.stat-hint { color: var(--muted); font-size: .82rem; margin-top: 4px; }
.stat-attention { border-color: #ffd9a8; background: linear-gradient(180deg, #fffaf2, #fff); }
.stat-attention .stat-num { color: #c2740a; }

.match-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.match-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--surface-2); border-radius: var(--radius-sm); }
.match-poster { width: 40px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 7px; flex: 0 0 auto; background: var(--surface); box-shadow: 0 2px 6px rgba(16, 24, 40, .14); }
.match-sun { font-size: 1.3rem; animation: kg-spin 9s linear infinite; flex: 0 0 auto; }
.match-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.match-main small { color: var(--muted); }
.match-sun-end { font-size: 1.15rem; }

.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 18px; }
.quick-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: transform .12s; }
.quick-card:hover { transform: translateY(-2px); }
.quick-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.quick-card p { color: var(--muted); font-size: .9rem; margin: 0; }

.profile-head { display: flex; align-items: center; gap: 18px; }

.form-narrow { max-width: 380px; }

/* =========================================================================
   Kalender
   ========================================================================= */
.cal-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.year-tabs { display: flex; gap: 6px; overflow-x: auto; flex: 1; padding: 2px; scrollbar-width: thin; }
.year-tab { font: inherit; font-weight: 700; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 7px 16px; cursor: pointer; transition: .15s; }
.year-tab:hover { border-color: var(--accent); color: var(--accent-600); }
.year-tab.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.year-nav { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--muted); flex-shrink: 0; }
.year-nav:hover { border-color: var(--accent); color: var(--accent-600); }

.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 16px; font-size: .82rem; color: var(--muted); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend .dot { width: 13px; height: 13px; border-radius: 50%; display: inline-block; }
.legend .status-confirmed { background: var(--ok); }
.legend .status-tentative { background: var(--maybe); }
.legend .status-declined { background: var(--no); }
.legend .status-pending { background: var(--pending); }
.legend .dot-attention { background: var(--accent); box-shadow: 0 0 0 3px rgba(91, 108, 255, .25); }
.sun-mini { font-size: 1rem; }

.year-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.month { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.month-head { font-weight: 700; letter-spacing: -.01em; margin-bottom: 10px; }
.weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; margin-bottom: 4px; }
.weekdays span { text-align: center; font-size: .72rem; font-weight: 700; color: var(--muted); padding: 2px 0; }
.weekdays span.we { color: var(--accent); }

.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.day { position: relative; min-width: 0; overflow: hidden; height: 58px; border: 1px solid transparent; background: var(--surface-2); border-radius: 9px; padding: 4px 4px 3px; cursor: pointer; text-align: left; font: inherit; display: flex; flex-direction: column; gap: 1px; transition: background .12s, border-color .12s; }
.day:hover { border-color: var(--accent); background: #fff; }
.day.empty { background: transparent; border: 0; cursor: default; pointer-events: none; min-height: 0; }
.day.is-weekend { background: #eef1f8; }
.day.is-today { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(91, 108, 255, .18); }
.day-num { font-size: .76rem; font-weight: 600; color: var(--muted); flex-shrink: 0; }
.day.is-today .day-num { color: var(--accent-600); font-weight: 800; }
.day.is-past { opacity: .42; }
.day.is-past:hover { opacity: .8; }

.day-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.day-status { display: flex; align-items: center; gap: 3px; min-width: 0; overflow: hidden; }
.cal-dot-btn { border: 0; background: transparent; padding: 0; margin: 0; cursor: pointer; line-height: 0; flex-shrink: 0; display: inline-flex; }
.day-titles { display: flex; flex-direction: column; gap: 1px; margin-top: 1px; min-width: 0; }
.day-title { display: block; width: 100%; border: 0; background: transparent; padding: 0; margin: 0; cursor: pointer; text-align: left; font: inherit; font-size: .63rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.day-title:hover { color: var(--accent-600); text-decoration: underline; }

/* Kalendertag mit Cover-Bild: Poster als Hintergrund, Schrift passt sich an */
.day.has-cover { background-size: cover; background-position: center; background-repeat: no-repeat; }
/* Standard auf Cover (bis Helligkeit gemessen ist): helle Schrift + Schatten */
.day.has-cover .day-num,
.day.has-cover .day-title { color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .9); }
.day.has-cover .day-title:hover { color: #fff; }
/* Dunkles Cover -> weiße Schrift */
.day.has-cover.cover-on-dark .day-num,
.day.has-cover.cover-on-dark .day-title { color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .9); }
/* Helles Cover -> schwarze Schrift */
.day.has-cover.cover-on-light .day-num,
.day.has-cover.cover-on-light .day-title { color: #111; text-shadow: 0 1px 2px rgba(255, 255, 255, .9); }
.day.has-cover.cover-on-light .day-title:hover { color: #000; }

/* Beide bestätigt: die ganze Kachel strahlt (Sonnenstrahlen + goldenes Leuchten).
   Verändert NICHT die Zellgröße (nur box-shadow/Pseudo-Elemente). */
.day.is-match { border-color: rgba(245, 158, 11, .6); box-shadow: 0 0 0 1px rgba(245, 158, 11, .5), 0 0 16px rgba(245, 158, 11, .55); }
/* Rotierende Sonnenstrahlen über die ganze Kachel, weich ausgeblendet */
.day.is-match::after {
    content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background: repeating-conic-gradient(from 0deg at 50% 45%, rgba(255, 193, 7, .34) 0 6deg, transparent 6deg 20deg);
    -webkit-mask: radial-gradient(circle at 50% 45%, #000 0, transparent 72%);
            mask: radial-gradient(circle at 50% 45%, #000 0, transparent 72%);
    animation: kg-spin 16s linear infinite;
}
/* Inhalte über den Strahlen halten */
.day.is-match .day-top, .day.is-match .day-titles { position: relative; z-index: 1; }
/* Datum als goldene Plakette umrandet – über jedem Cover sichtbar/lesbar */
.day.is-match .day-num,
.day.is-match.has-cover .day-num,
.day.is-match.cover-on-dark .day-num,
.day.is-match.cover-on-light .day-num {
    position: relative; z-index: 1; color: #7c4a02; font-weight: 800;
    background: rgba(255, 237, 186, .95); padding: 0 5px; border-radius: 999px;
    box-shadow: 0 0 0 1px rgba(245, 158, 11, .8), 0 0 8px rgba(245, 158, 11, .6);
    text-shadow: none;
}

.cal-extra { margin: -4px 0 14px; }

.cal-dot { position: relative; width: 12px; height: 12px; border-radius: 50%; border: 0; padding: 0; display: inline-block; flex: 0 0 auto; background: var(--pending); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.cal-dot.is-attention { animation: kg-pulse 1.7s infinite; }
.cal-dot.is-match { background: transparent !important; box-shadow: none; overflow: visible; }
.cal-core { position: absolute; inset: 3px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #ffe39a, var(--sun)); z-index: 1; box-shadow: inset 0 0 0 1px rgba(180, 120, 0, .35); }
.cal-sun { position: absolute; inset: -3px; border-radius: 50%; z-index: 0; background: repeating-conic-gradient(rgba(255, 183, 3, .65) 0 7deg, transparent 7deg 22deg); animation: kg-spin 8s linear infinite; }

@keyframes kg-spin { to { transform: rotate(360deg); } }
@keyframes kg-pulse {
  0% { box-shadow: 0 0 0 0 rgba(91, 108, 255, .5); }
  70% { box-shadow: 0 0 0 7px rgba(91, 108, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(91, 108, 255, 0); }
}

/* =========================================================================
   Modal (Termin)
   ========================================================================= */
.modal-overlay { position: fixed; inset: 0; z-index: 80; background: rgba(16, 18, 27, .55); display: flex; align-items: flex-end; justify-content: center; padding: 0; }
.modal-overlay[hidden] { display: none; }
.modal { background: var(--surface); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 22px 22px 0 0; box-shadow: var(--shadow-lg); animation: kg-slide-up .22s ease; }
.modal-head { position: sticky; top: 0; background: var(--surface); display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 12px; border-bottom: 1px solid var(--border); z-index: 2; }
.modal-head h2 { font-size: 1.2rem; }
.modal-close { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-2); font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--muted); }
.modal-close:hover { background: #ececf3; }
.modal-body { padding: 18px 20px 24px; }
.modal-sub { font-size: .95rem; color: var(--text); margin: 18px 0 10px; }
@keyframes kg-slide-up { from { transform: translateY(30px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }

.date-list { display: flex; flex-direction: column; gap: 10px; }
.date-row { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 11px 12px; }
.date-row.is-weekend { background: #eef1f8; }
.date-row.is-focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(91, 108, 255, .18); }
.date-row.is-pending { border-style: dashed; }
.date-row-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.date-label { font-weight: 700; font-size: .95rem; }
.date-remove { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: .9rem; width: 26px; height: 26px; border-radius: 7px; }
.date-remove:hover { background: #fdecec; color: var(--no); }

.resp-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 9px 0; }
.resp-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 4px; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.rb-ini { width: 18px; height: 18px; border-radius: 50%; background: rgba(0, 0, 0, .12); display: inline-flex; align-items: center; justify-content: center; font-size: .68rem; }
.st-confirmed { background: #e8f8ef; color: #15803d; }
.st-tentative { background: #fef5e7; color: #b45309; }
.st-declined { background: #fdecec; color: #b91c1c; }
.st-pending { background: #eef0f4; color: #6b7280; }

.resp-mine { display: flex; align-items: center; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.resp-mine-label { font-size: .82rem; font-weight: 700; color: var(--muted); }
.resp-controls { display: flex; gap: 6px; flex-wrap: wrap; }
.resp-btn { font: inherit; font-size: .82rem; font-weight: 600; padding: 6px 11px; border-radius: 8px; border: 1px solid var(--border); background: #fff; color: var(--muted); cursor: pointer; transition: .12s; }
.resp-btn:hover { border-color: currentColor; }
.resp-btn.st-confirmed.is-active { background: var(--ok); color: #fff; border-color: var(--ok); }
.resp-btn.st-tentative.is-active { background: var(--maybe); color: #fff; border-color: var(--maybe); }
.resp-btn.st-declined.is-active { background: var(--no); color: #fff; border-color: var(--no); }

.date-add { display: flex; gap: 8px; margin-top: 12px; }
.date-add input { flex: 1; }
.modal-foot { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.modal-foot .btn-ghost { margin-left: auto; }

/* =========================================================================
   TMDb – Filmraster
   ========================================================================= */
.movie-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.movie-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.movie-poster { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; background: var(--surface-2); display: block; }
.movie-poster-empty { display: flex; align-items: center; justify-content: center; font-size: 2.4rem; color: #c2c6d2; }
.movie-meta { padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.movie-title { font-size: .98rem; line-height: 1.25; }
.movie-sub { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .8rem; }
.movie-date { color: var(--muted); font-weight: 600; }
.movie-rating { background: #fff7e6; color: #b45309; padding: 1px 8px; border-radius: 999px; font-weight: 700; }
.movie-overview { font-size: .82rem; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Zeitfenster-Steuerung (Vergangenheit/Zukunft) über „Liste aktualisieren" */
.tmdb-range { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 4px 0 16px; }
.range-field { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; color: var(--muted); font-weight: 600; }
.range-field select { font: inherit; padding: 8px 11px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }

/* Toolbar über dem Filmraster: Status links, Sortierung rechts */
.tmdb-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.tmdb-toolbar .muted-line { margin: 0; }
.tmdb-search { flex: 1 1 220px; min-width: 0; }
.tmdb-search input { width: 100%; font: inherit; padding: 9px 13px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.tmdb-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91, 108, 255, .15); }
.sort-field { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); }
.sort-field select { font: inherit; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }

/* Klickbare Filmkarte (öffnet Termin-Planer) */
.movie-card.is-clickable { cursor: pointer; text-align: left; transition: transform .12s, box-shadow .12s, border-color .12s; }
.movie-card.is-clickable:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--accent, #6366f1); }
.movie-card.is-clickable:focus-visible { outline: 2px solid var(--accent, #6366f1); outline-offset: 2px; }
/* Vorgemerkte Filme (Dashboard) */
.pin-card { position: relative; }
.pin-remove { position: absolute; top: 6px; right: 6px; z-index: 2; width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(17, 17, 17, .62); color: #fff; font-size: .9rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .12s; }
.pin-remove:hover { background: var(--danger, #ef4444); }

/* =========================================================================
   Empfehlungen
   ========================================================================= */
.rec-form { display: flex; flex-wrap: wrap; gap: 10px; }
.rec-form #recTitle { flex: 2 1 200px; }
.rec-form #recKind { flex: 0 0 110px; }
.rec-form #recPlatform { flex: 1 1 150px; }
.rec-form #recNote { flex: 2 1 200px; }

.rec-list { display: flex; flex-direction: column; gap: 10px; }
.rec-divider { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 14px 0 2px; }
.rec-item { display: flex; align-items: flex-start; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); transition: opacity .2s; }
.rec-item.is-done { opacity: .58; }
.rec-check { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--border); background: #fff; color: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 5px; transition: .15s; }
.rec-check svg { width: 100%; height: 100%; }
.rec-check:hover { border-color: var(--ok); }
.rec-check.is-on { background: var(--ok); border-color: var(--ok); color: #fff; }
.rec-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rec-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rec-title { font-weight: 700; }
.is-done .rec-title { text-decoration: line-through; }
.rec-kind { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #eef0ff; color: var(--accent-600); }
.rec-kind.kind-serie { background: #fdeafe; color: #a21caf; }
.rec-sub { font-size: .84rem; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.rec-platform { font-weight: 600; color: var(--text); }
.rec-note { font-size: .86rem; color: var(--muted); margin: 2px 0 0; }
.rec-buddy { font-size: .78rem; color: var(--muted); margin-top: 3px; }
.rec-buddy.is-on { color: #15803d; font-weight: 600; }
.rec-actions { display: flex; gap: 2px; flex-shrink: 0; }
.rec-edit { border: 0; background: transparent; color: #c2c6d2; cursor: pointer; font-size: 1rem; width: 30px; height: 30px; border-radius: 8px; }
.rec-edit:hover { background: #eef0ff; color: var(--accent-600); }
.rec-del { flex-shrink: 0; border: 0; background: transparent; color: #c2c6d2; cursor: pointer; font-size: 1rem; width: 30px; height: 30px; border-radius: 8px; }
.rec-del:hover { background: #fdecec; color: var(--no); }

.rec-item.is-editing { display: block; }
.rec-edit-form { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.rec-edit-fields { display: flex; flex-wrap: wrap; gap: 8px; }
.rec-edit-fields input { flex: 1 1 160px; }
.rec-edit-fields select { flex: 0 0 120px; }
.rec-edit-actions { display: flex; gap: 8px; }

/* =========================================================================
   Toasts
   ========================================================================= */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #1c2230; color: #fff; padding: 11px 18px; border-radius: 999px; font-size: .9rem; font-weight: 600; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(10px); transition: .25s; max-width: 90vw; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast-err { background: #b42318; }
.toast-ok { background: #15803d; }

/* =========================================================================
   Desktop
   ========================================================================= */
@media (min-width: 900px) {
  body:not(.login-page) { padding-top: 0; }
  .topbar { display: none; }
  .scrim { display: none !important; }
  .sidebar { position: sticky; top: 0; height: 100vh; transform: none; transition: none; }
  .main-inner { padding: 30px 32px 70px; }
  .page-head h1 { font-size: 1.85rem; }
  .modal-overlay { align-items: center; padding: 24px; }
  .modal { border-radius: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .cal-sun, .match-sun { animation: none; }
  .day.is-match::after { animation: none; }
  .cal-dot.is-attention { animation: none; box-shadow: 0 0 0 3px rgba(91, 108, 255, .35); }
  * { scroll-behavior: auto; }
}
