/* Planer – Theme-Overrides über der kopierten Basis (style.css) */
.sidebar { background: #0F172A; }
.sidebar-logo-text { color: #A78BFA; }
.sidebar-logo-sub { color: #94A3B8; font-size: .75rem; }
.nav-item.active { background: rgba(124,58,237,.35); }
.btn-primary { background: #7C3AED; }
.btn-primary:hover { background: #6D28D9; }

.grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 20px; }
.grid > * { min-width: 0; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); gap: 14px; }
.tile { display:block; padding:18px; border:1.5px solid var(--gray-200,#E2E8F0); border-radius:12px; text-decoration:none; color:inherit; transition:border-color .15s, transform .1s; }
.tile:hover { border-color:#7C3AED; transform: translateY(-2px); }
.tile-title { font-weight:700; margin-bottom:4px; }
.tile-desc { font-size:.85rem; color:var(--gray-500,#64748B); }

.saved-row { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid var(--gray-100,#F1F5F9); }
.saved-row:last-child { border-bottom:none; }
.badge { padding:1px 8px; border-radius:999px; font-size:.7rem; }
.badge-draft { background:#FEF3C7; color:#92400E; }
.badge-cat { background:#EDE9FE; color:#5B21B6; }
.badge-high { background:#FEE2E2; color:#991B1B; }
.badge-medium { background:#FEF3C7; color:#92400E; }
.badge-low { background:#E0E7FF; color:#3730A3; }

/* Kalender */
.cal-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:14px; flex-wrap:wrap; }
.cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:1px; background:var(--gray-200,#E2E8F0); border:1px solid var(--gray-200,#E2E8F0); border-radius:10px; overflow:hidden; }
.cal-grid.month { grid-template-columns:38px repeat(7,1fr); }

/* Ansichts-Umschalter */
.cal-viewswitch { display:inline-flex; border:1px solid var(--gray-200,#E2E8F0); border-radius:8px; overflow:hidden; margin-left:4px; }
.cal-viewswitch button { border:0; background:#fff; padding:5px 12px; font-size:.82rem; cursor:pointer; color:var(--gray-600,#475569); }
.cal-viewswitch button + button { border-left:1px solid var(--gray-200,#E2E8F0); }
.cal-viewswitch button.active { background:#7C3AED; color:#fff; }

/* KW-Spalte (Monatsansicht) */
.cal-kw-head, .cal-kw { background:var(--gray-50,#F8FAFC); display:flex; align-items:center; justify-content:center; font-size:.72rem; font-weight:700; color:var(--gray-400,#94A3B8); }

/* Feiertage */
.cal-cell.holiday { background:#FFF7ED; }
.cal-cell.holiday.other { background:#FFFBF5; }
.cal-holiday { font-size:.68rem; font-weight:600; color:#B45309; background:#FEF3C7; border-radius:4px; padding:0 5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cal-dow { background:var(--gray-50,#F8FAFC); padding:6px 8px; font-size:.72rem; font-weight:700; text-transform:uppercase; color:var(--gray-500,#64748B); text-align:center; }
.cal-cell { background:#fff; min-height:96px; padding:5px 6px; cursor:pointer; display:flex; flex-direction:column; gap:3px; }
.cal-cell.other { background:var(--gray-50,#F8FAFC); color:var(--gray-400,#94A3B8); }
.cal-cell:hover { background:#F5F3FF; }
.cal-daynum { font-size:.78rem; font-weight:600; }
.cal-cell.today .cal-daynum { background:#7C3AED; color:#fff; border-radius:999px; width:22px; height:22px; display:inline-flex; align-items:center; justify-content:center; }
.cal-ev { background:#EDE9FE; color:#334155; font-size:.72rem; padding:1px 6px; border-radius:5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; cursor:pointer; }
.cal-ev[draggable="true"] { cursor:grab; }
.cal-ev.cal-task.done { text-decoration:line-through; opacity:.6; }

/* Kalender-Filterleiste */
.cal-filters { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; padding:8px 2px 12px; }
.cal-filter-group { display:flex; flex-wrap:wrap; gap:6px; }
.cal-filter-sep { width:1px; align-self:stretch; background:var(--gray-200,#E2E8F0); margin:2px 4px; }
.cal-filter { display:inline-flex; align-items:center; gap:5px; font-size:.78rem; padding:3px 9px; border:1px solid var(--gray-200,#E2E8F0); border-radius:999px; cursor:pointer; user-select:none; }
.cal-filter input { margin:0; cursor:pointer; }
.cal-filter.off { opacity:.45; }

/* Wiederholungs-Widget */
.rec-box .rec-preset { width:100%; }

/* Zeitraster (Wochen-/Tagesansicht) */
.tg { border:1px solid var(--gray-200,#E2E8F0); border-radius:10px; overflow:hidden; }
.tg-head { display:grid; grid-template-columns:var(--tg-cols); background:var(--gray-50,#F8FAFC); border-bottom:1px solid var(--gray-200,#E2E8F0); }
.tg-corner { border-right:1px solid var(--gray-200,#E2E8F0); }
.tg-dayhead { padding:6px 8px; text-align:center; font-size:.8rem; border-left:1px solid var(--gray-200,#E2E8F0); cursor:pointer; }
.tg-dayhead:hover { background:#F5F3FF; }
.tg-dayhead .tg-dow { color:var(--gray-500,#64748B); font-weight:700; text-transform:uppercase; font-size:.7rem; }
.tg-dayhead.today { background:#EDE9FE; }
.tg-dayhead.today .tg-daynum { color:#6D28D9; font-weight:700; }
.tg-allday { display:grid; grid-template-columns:var(--tg-cols); border-bottom:1px solid var(--gray-200,#E2E8F0); min-height:26px; }
.tg-allday-label { font-size:.66rem; color:var(--gray-400,#94A3B8); padding:4px 6px; border-right:1px solid var(--gray-200,#E2E8F0); display:flex; align-items:center; }
.tg-allday-col { border-left:1px solid var(--gray-200,#E2E8F0); padding:3px; display:flex; flex-direction:column; gap:2px; cursor:pointer; min-height:20px; }
.tg-chip { font-size:.7rem; padding:1px 6px; border-radius:5px; background:#EDE9FE; color:#334155; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; cursor:pointer; }
.tg-chip.tg-holiday { background:#FEF3C7; color:#B45309; font-weight:600; border-left:3px solid #F59E0B; }
.tg-chip.cal-task.done { text-decoration:line-through; opacity:.6; }
.tg-scroll { max-height:560px; overflow-y:auto; }
.tg-grid { display:grid; grid-template-columns:var(--tg-cols); }
.tg-hours { border-right:1px solid var(--gray-200,#E2E8F0); }
.tg-hour { position:relative; box-sizing:border-box; }
.tg-hour span { position:absolute; top:-7px; right:6px; font-size:.66rem; color:var(--gray-400,#94A3B8); background:#fff; padding:0 2px; }
.tg-daycol { position:relative; border-left:1px solid var(--gray-100,#F1F5F9); background-image:linear-gradient(to bottom, var(--gray-100,#F1F5F9) 1px, transparent 1px); background-repeat:repeat-y; cursor:pointer; }
.tg-block { position:absolute; box-sizing:border-box; font-size:.7rem; line-height:1.15; padding:1px 5px; border-radius:5px; overflow:hidden; cursor:pointer; color:#1E293B; }
.tg-block.cal-task.done { text-decoration:line-through; opacity:.65; }

/* Kategorie-Farbpunkt */
.cat-dot { display:inline-block; width:9px; height:9px; border-radius:50%; margin-right:6px; vertical-align:middle; flex:0 0 auto; }

/* Aufgaben */
.task-item { display:flex; align-items:flex-start; gap:10px; padding:10px 0; border-bottom:1px solid var(--gray-100,#F1F5F9); }
.task-item:last-child { border-bottom:none; }
.task-item.done .task-title { text-decoration:line-through; color:var(--gray-400,#94A3B8); }
.task-check { margin-top:3px; width:18px; height:18px; accent-color:#7C3AED; cursor:pointer; }
.task-title { font-weight:600; }
.task-meta { font-size:.78rem; color:var(--gray-500,#64748B); }
.group-title { font-size:.8rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--gray-500,#64748B); margin:18px 0 4px; }
.group-title.overdue { color:#DC2626; }

.modal-backdrop { display:none; position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:900; align-items:center; justify-content:center; padding:16px; }
.modal-box { background:#fff; border-radius:12px; max-width:520px; width:100%; max-height:88vh; overflow-y:auto; padding:20px; }
