/* ============================================================
   CRM Beratung Hagl — Styles
   Corporate Identity: Schwarz #000000, Grün #517F34, Weiß #FFFFFF, Inter
   ============================================================ */

:root {
  --schwarz: #000000;
  --gruen: #517F34;
  --gruen-dunkel: #3f6427;
  --gruen-hell: #eaf1e4;
  --weiss: #ffffff;

  --bg: #f4f5f3;
  --panel: #ffffff;
  --border: #e3e5e0;
  --border-stark: #cfd2ca;
  --text: #16180f;
  --muted: #6b7169;
  --muted-2: #9aa093;

  --rot: #b3261e;
  --rot-hell: #fbeceb;
  --gelb: #b7791f;
  --gelb-hell: #fbf3e2;

  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.18);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
a { color: var(--gruen-dunkel); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }

/* ---------- App-Layout ---------- */
.app { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
  width: 236px;
  flex-shrink: 0;
  background: var(--schwarz);
  color: #d8dad3;
  display: flex;
  flex-direction: column;
  padding: 18px 12px;
  gap: 4px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px 18px;
}
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--gruen); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
}
.brand-text { font-weight: 700; color: #fff; font-size: 15px; line-height: 1.1; }
.brand-text small { display: block; color: #8f948a; font-weight: 500; font-size: 11px; }
.brand-logo { height: 30px; width: auto; display: block; flex-shrink: 0; }
.welcome-card .brand-logo { height: 54px; margin-bottom: 20px; }

.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: var(--radius-sm);
  color: #c4c8bf; cursor: pointer; font-weight: 500;
  text-decoration: none; user-select: none;
}
.nav-item:hover { background: #1c1e17; color: #fff; text-decoration: none; }
.nav-item.active { background: var(--gruen); color: #fff; }
.nav-item .ico { width: 18px; display: inline-flex; align-items: center; justify-content: center; opacity: 0.95; }
.nav-item .badge {
  margin-left: auto; background: #2a2d24; color: #cfd3c8;
  border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 600;
}
.nav-item.active .badge { background: rgba(255,255,255,0.22); color: #fff; }
.nav-spacer { flex: 1; }
.sidebar-foot { padding: 8px 10px; font-size: 11px; color: #7d8278; }

.main-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }

/* ---------- Topbar ---------- */
.topbar {
  height: 58px; flex-shrink: 0;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
  padding: 0 22px;
}
.search-wrap { position: relative; flex: 1; max-width: 460px; }
.search-wrap .search-ico {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted-2); font-size: 14px;
}
.search-input {
  width: 100%; height: 38px; padding: 0 12px 0 34px;
  border: 1px solid var(--border-stark); border-radius: 999px;
  background: #fafbf9; font-size: 13.5px; outline: none;
}
.search-input:focus { border-color: var(--gruen); background: #fff; box-shadow: 0 0 0 3px var(--gruen-hell); }

.save-pill {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--muted); padding: 5px 11px;
  border-radius: 999px; background: #f4f5f3; border: 1px solid var(--border);
}
.save-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); }
.save-pill.dirty .save-dot { background: var(--gelb); }
.save-pill.saving .save-dot { background: var(--gruen); animation: pulse 1s infinite; }
.save-pill.saved .save-dot { background: var(--gruen); }
.save-pill.error { color: var(--rot); border-color: var(--rot); }
.save-pill.error .save-dot { background: var(--rot); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.topbar-spacer { flex: 1; }

/* ---------- Content ---------- */
.content { flex: 1; overflow-y: auto; padding: 26px 30px 60px; }
.page-head {
  display: flex; align-items: center; gap: 14px; margin-bottom: 22px; flex-wrap: wrap;
}
.page-head h1 { font-size: 22px; }
.page-head .page-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.page-sub { color: var(--muted); margin: -14px 0 22px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  height: 36px; padding: 0 15px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-stark); background: #fff; color: var(--text);
  font-weight: 550; font-size: 13.5px; cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s;
}
.btn:hover { background: #f3f4f1; }
.btn:active { transform: translateY(0.5px); }
.btn-primary { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.btn-primary:hover { background: var(--gruen-dunkel); }
.btn-danger { background: #fff; border-color: var(--rot); color: var(--rot); }
.btn-danger:hover { background: var(--rot-hell); }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: #f0f1ee; }
.btn .ico { font-size: 15px; }
.icon-btn {
  width: 32px; height: 32px; border: none; background: transparent; cursor: pointer;
  border-radius: 7px; color: var(--muted); font-size: 15px; display: grid; place-items: center;
}
.icon-btn:hover { background: #f0f1ee; color: var(--text); }

/* ---------- SVG-Icons ---------- */
.svg-ico { flex-shrink: 0; vertical-align: -0.14em; }
.btn .svg-ico, .chip .svg-ico { vertical-align: 0; }
.empty .empty-ico .svg-ico { vertical-align: 0; }

/* ---------- Cards / Panels ---------- */
.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-pad { padding: 18px 20px; }
.card + .card { margin-top: 16px; }
.card-title { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 14px; font-weight: 650; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-kpi { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.kpi { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.kpi .kpi-label { color: var(--muted); font-size: 12.5px; font-weight: 550; }
.kpi .kpi-value { font-size: 26px; font-weight: 700; margin-top: 4px; letter-spacing: -0.02em; }
.kpi .kpi-sub { color: var(--muted-2); font-size: 12px; margin-top: 2px; }
.kpi.accent { border-left: 3px solid var(--gruen); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; }
table.data th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--muted); font-weight: 650; padding: 10px 12px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--panel);
}
table.data td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tbody tr { cursor: pointer; }
table.data tbody tr:hover { background: #f7f8f5; }
table.data tbody tr:last-child td { border-bottom: none; }
.cell-strong { font-weight: 600; }

/* ---------- Chips / Badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 550;
  background: #eef0eb; color: #4a5142; border: 1px solid #e0e3db;
  white-space: nowrap;
}
.chip.green { background: var(--gruen-hell); color: var(--gruen-dunkel); border-color: #d3e2c6; }
.chip.dark { background: #22251c; color: #e7eadf; border-color: #22251c; }
.chip.red { background: var(--rot-hell); color: var(--rot); border-color: #f0cfcc; }
.chip.yellow { background: var(--gelb-hell); color: var(--gelb); border-color: #eadcc0; }
.chip.blue { background: #e8eef7; color: #2b5288; border-color: #d3ddf0; }
.chip-toggle { cursor: pointer; user-select: none; }
.chip-toggle:not(.on) { opacity: 0.55; background: #f1f2ef; }
.chip-toggle.on { background: var(--gruen-hell); color: var(--gruen-dunkel); border-color: #c4d8b3; opacity: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.pill-type { font-weight: 600; }

.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: var(--gruen-hell); color: var(--gruen-dunkel);
  display: grid; place-items: center; font-weight: 650; font-size: 12.5px;
}
.avatar.sq { border-radius: 8px; }
.row-flex { display: flex; align-items: center; gap: 11px; }
.stack { display: flex; flex-direction: column; }
.stack .sub { color: var(--muted); font-size: 12.5px; }

/* ---------- Detail layout ---------- */
.detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
@media (max-width: 1040px) { .detail-grid { grid-template-columns: 1fr; } }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 550; cursor: pointer; margin-bottom: 12px; }
.back-link:hover { color: var(--text); text-decoration: none; }
.def-list { display: grid; grid-template-columns: 128px 1fr; gap: 9px 14px; }
.def-list dt { color: var(--muted); font-size: 12.5px; }
.def-list dd { margin: 0; }

/* ---------- Timeline ---------- */
.timeline { display: flex; flex-direction: column; gap: 2px; }
.tl-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.tl-item:last-child { border-bottom: none; }
.tl-ico { width: 30px; height: 30px; border-radius: 8px; background: var(--gruen-hell); color: var(--gruen-dunkel); display: grid; place-items: center; flex-shrink: 0; font-size: 14px; }
.tl-body { flex: 1; min-width: 0; }
.tl-head { display: flex; gap: 8px; align-items: baseline; }
.tl-head .tl-title { font-weight: 600; }
.tl-head .tl-date { color: var(--muted-2); font-size: 12px; margin-left: auto; white-space: nowrap; }
.tl-text { color: var(--muted); white-space: pre-wrap; margin-top: 2px; }

/* ---------- Tasks ---------- */
.task-row { display: flex; align-items: flex-start; gap: 11px; padding: 12px 4px; border-bottom: 1px solid var(--border); }
.task-row:last-child { border-bottom: none; }
.task-check { width: 19px; height: 19px; margin-top: 1px; accent-color: var(--gruen); cursor: pointer; flex-shrink: 0; }
.task-main { flex: 1; min-width: 0; }
.task-title { font-weight: 550; }
.task-row.done .task-title { text-decoration: line-through; color: var(--muted-2); }
.task-meta { color: var(--muted); font-size: 12.5px; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; align-items: center; }
.due { font-weight: 600; }
.due.overdue { color: var(--rot); }
.due.today { color: var(--gelb); }

/* ---------- Kanban ---------- */
.kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.kan-col { width: 270px; flex-shrink: 0; background: #eef0ec; border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 200px); }
.kan-col-head { padding: 12px 14px 10px; display: flex; align-items: center; gap: 8px; position: sticky; top: 0; }
.kan-col-head .kh-name { font-weight: 650; }
.kan-col-head .kh-count { color: var(--muted); font-size: 12px; }
.kan-col-head .kh-sum { margin-left: auto; font-size: 12px; font-weight: 650; color: var(--gruen-dunkel); }
.kan-col.won .kan-col-head { color: var(--gruen-dunkel); }
.kan-col.lost .kan-col-head { color: var(--rot); }
.kan-list { padding: 4px 10px 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; min-height: 40px; flex: 1; }
.kan-list.drag-over { background: #e2e8dc; border-radius: 8px; outline: 2px dashed var(--gruen); outline-offset: -4px; }
.deal-card { background: #fff; border: 1px solid var(--border); border-radius: 9px; padding: 11px 12px; box-shadow: var(--shadow); cursor: grab; }
.deal-card:active { cursor: grabbing; }
.deal-card.dragging { opacity: 0.45; }
.deal-card .dc-title { font-weight: 600; margin-bottom: 3px; }
.deal-card .dc-company { color: var(--muted); font-size: 12.5px; }
.deal-card .dc-foot { display: flex; align-items: center; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.deal-card .dc-value { font-weight: 700; color: var(--text); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field-label { font-weight: 550; font-size: 12.5px; color: #3a3f33; }
.field-hint { color: var(--muted-2); font-size: 11.5px; }
.input {
  width: 100%; height: 38px; padding: 0 11px; border: 1px solid var(--border-stark);
  border-radius: var(--radius-sm); background: #fff; font-size: 13.5px; font-family: inherit; color: var(--text); outline: none;
}
textarea.input { height: auto; padding: 9px 11px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--gruen); box-shadow: 0 0 0 3px var(--gruen-hell); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 16px; }
@media (max-width: 620px) { .form-row, .form-row-3 { grid-template-columns: 1fr; } }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15, 17, 12, 0.42);
  display: grid; place-items: start center; padding: 48px 16px; z-index: 100;
  overflow-y: auto; backdrop-filter: blur(1.5px);
}
.modal {
  width: 100%; background: var(--panel); border-radius: 14px; box-shadow: var(--shadow-lg);
  overflow: hidden; animation: modal-in .14s ease-out;
}
@keyframes modal-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h2 { font-size: 16.5px; }
.modal-head .icon-btn { margin-left: auto; }
.modal-body { padding: 20px; max-height: 66vh; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 20px; border-top: 1px solid var(--border); background: #fafbf9; }
.modal-foot-spacer { flex: 1; }
.btn-ghost-danger { background: transparent; border-color: transparent; color: var(--rot); }
.btn-ghost-danger:hover { background: var(--rot-hell); border-color: var(--rot); }
.check-inline { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); min-height: 38px; cursor: pointer; }
.check-box { width: 16px; height: 16px; accent-color: var(--gruen); }
.recur-interval { display: flex; align-items: center; gap: 8px; }
.recur-unit { color: var(--muted); font-size: 13px; white-space: nowrap; }
.doc-list { display: flex; flex-direction: column; }
.doc-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--border); }
.doc-row:last-child { border-bottom: none; }
.doc-ico { color: var(--muted); display: inline-flex; flex: none; }
.doc-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.doc-name { font-weight: 550; color: var(--gruen-dunkel); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-name:hover { text-decoration: underline; }
.doc-meta { font-size: 12px; }
.doc-kat { max-width: 128px; padding: 5px 8px; font-size: 12.5px; flex: none; }

/* ---------- Empty states ---------- */
.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty .empty-ico { font-size: 34px; margin-bottom: 10px; opacity: 0.5; }
.empty h3 { color: var(--text); margin-bottom: 6px; }

/* ---------- Connect / Welcome screen ---------- */
.welcome { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.welcome-card { max-width: 540px; width: 100%; background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 40px 38px; }
.welcome-card .brand-mark { width: 44px; height: 44px; font-size: 20px; border-radius: 12px; margin-bottom: 18px; }
.welcome-card h1 { font-size: 24px; margin-bottom: 8px; }
.welcome-card p { color: var(--muted); margin: 0 0 14px; }
.welcome-steps { margin: 18px 0 24px; padding-left: 18px; color: var(--muted); }
.welcome-steps li { margin-bottom: 7px; }
.banner { background: var(--gelb-hell); border: 1px solid #eadcc0; color: #7a5713; border-radius: var(--radius-sm); padding: 11px 14px; font-size: 13px; margin-bottom: 16px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 20px);
  background: var(--schwarz); color: #fff; padding: 11px 18px; border-radius: 999px;
  font-size: 13.5px; box-shadow: var(--shadow-lg); opacity: 0; transition: all .25s; z-index: 200;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-success { background: var(--gruen-dunkel); }
.toast-error { background: var(--rot); }

/* ---------- Search results overlay ---------- */
.search-panel {
  position: absolute; top: 46px; left: 0; right: 0; background: #fff;
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg);
  max-height: 60vh; overflow-y: auto; z-index: 60; padding: 6px;
}
.search-group-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted-2); padding: 8px 10px 4px; font-weight: 650; }
.search-res { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.search-res:hover, .search-res.active { background: var(--gruen-hell); }
.search-empty { padding: 18px; text-align: center; color: var(--muted); }

hr.sep { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.inline-actions { display: flex; gap: 6px; }
.link-btn { background: none; border: none; color: var(--gruen-dunkel); cursor: pointer; padding: 0; font: inherit; font-weight: 550; }
.link-btn:hover { text-decoration: underline; }

/* ---------- Kalender ---------- */
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-nav h1 { font-size: 20px; min-width: 190px; text-align: center; }
.cal-arrow { font-size: 17px; line-height: 1; padding: 0 10px; }
.cal-seg { display: inline-flex; gap: 4px; }
.btn.seg-on { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.btn.seg-on:hover { background: var(--gruen-dunkel); }

.cal-grid {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px;
  background: var(--border); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.cal-weekday { background: var(--panel); padding: 8px 6px; text-align: center; font-size: 11.5px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.cal-cell { background: var(--panel); min-height: 106px; padding: 5px 6px 8px; display: flex; flex-direction: column; gap: 3px; }
.cal-cell.other { background: #fafbf9; }
.cal-cell.other .cal-daynum { color: var(--muted-2); }
.cal-cell.today { background: #f2f7ee; }
.cal-cell-head { display: flex; align-items: center; justify-content: space-between; min-height: 22px; }
.cal-daynum { font-size: 12px; font-weight: 600; min-width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; }
.cal-cell.today .cal-daynum { background: var(--gruen); color: #fff; border-radius: 50%; }
.cal-add { opacity: 0; border: none; background: transparent; cursor: pointer; color: var(--muted); font-size: 16px; line-height: 1; width: 20px; height: 20px; border-radius: 5px; }
.cal-cell:hover .cal-add { opacity: 1; }
.cal-add:hover { background: var(--gruen-hell); color: var(--gruen-dunkel); }
.cal-events { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.cal-ev { display: flex; align-items: center; gap: 4px; font-size: 11px; padding: 1px 5px; border-radius: 5px; cursor: pointer; min-width: 0; }
.cal-ev-time { font-weight: 700; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.cal-ev-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); flex-shrink: 0; }
.cal-ev.meeting { background: var(--gruen-hell); color: var(--gruen-dunkel); }
.cal-ev.task { background: #eef0eb; color: #4a5142; }
.cal-ev.task.overdue { background: var(--rot-hell); color: var(--rot); }
.cal-ev.task.overdue .cal-ev-dot { background: var(--rot); }
.cal-ev.task.today { background: var(--gelb-hell); color: var(--gelb); }
.cal-ev.task.today .cal-ev-dot { background: var(--gelb); }
.cal-ev.task.done { opacity: 0.55; text-decoration: line-through; }
.cal-ev.act { background: #f1f2ef; color: var(--muted); }
.cal-more { font-size: 10.5px; color: var(--muted); cursor: pointer; padding: 1px 5px; font-weight: 600; }
.cal-more:hover { color: var(--gruen-dunkel); text-decoration: underline; }

.cal-legend { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-top: 12px; font-size: 12px; color: var(--muted); }
.cal-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.cal-dot.meeting { background: var(--gruen); }
.cal-dot.task { background: var(--muted-2); }
.cal-dot.overdue { background: var(--rot); }
.cal-dot.today { background: var(--gelb); }

/* Agenda */
.cal-agenda-day { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.cal-agenda-day:last-child { border-bottom: none; }
.cal-agenda-date { font-weight: 650; margin-bottom: 6px; font-size: 13px; }
.cal-agenda-date.is-today { color: var(--gruen-dunkel); }
.cal-agenda-date.overdue { color: var(--rot); }
.cal-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 7px; cursor: pointer; }
.cal-row:hover { background: #f7f8f5; }
.cal-row-badge { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.03em; flex-shrink: 0; }
.cal-row-badge.meeting { background: var(--gruen-hell); color: var(--gruen-dunkel); }
.cal-row-badge.task { background: #eef0eb; color: #4a5142; }
.cal-row-badge.task.overdue { background: var(--rot-hell); color: var(--rot); }
.cal-row-badge.task.today { background: var(--gelb-hell); color: var(--gelb); }
.cal-row-badge.act { background: #f1f2ef; color: var(--muted); }
.cal-row-time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12px; width: 40px; flex-shrink: 0; }
.cal-row-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-row-txt.done { text-decoration: line-through; color: var(--muted-2); }
.cal-row-link { color: var(--muted); font-size: 12px; flex-shrink: 0; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cal-chooser { display: flex; gap: 12px; }
.cal-chooser .btn { flex: 1; height: 72px; flex-direction: column; gap: 6px; }
@media (max-width: 720px) { .cal-cell { min-height: 78px; } }

/* Dezenter Hinweis auf externe Änderungen (Kalender-Auto-Sync), wenn nicht still nachgeladen werden kann */
.reload-hint {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  z-index: 1200; display: flex; align-items: center; gap: 12px;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--border); border-left: 4px solid var(--gruen);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 11px 14px; font-size: 14px; font-family: var(--font); max-width: 92vw;
  animation: reload-hint-in 0.2s ease-out;
}
.reload-hint-x {
  background: none; border: 0; cursor: pointer; color: var(--muted);
  font-size: 15px; line-height: 1; padding: 2px 4px;
}
.reload-hint-x:hover { color: var(--text); }
@keyframes reload-hint-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
