/* Kalender nach Entwurf "Kalender.dc.html": Werte aus den Inline-Styles des Entwurfs. */
.kl { display: flex; flex-direction: column; gap: 24px; }
.kl > .msg:empty { display: none; }
.kl-ph { margin-bottom: 0; }
.kl-ph .acts { gap: 8px; }
.kl-ph .acts .select { min-width: 170px; }
.kl-ph .acts .select select { height: 42px; border-radius: 12px; background: var(--surface); font-size: 14px; }
.kl-ph .btn.primary { border-radius: 12px; padding: 0 16px; }
.kl-nav { display: flex; align-items: center; gap: 4px; height: 42px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.kl-nav .btn.icon { width: 34px; height: 34px; border-radius: 9px; }
.kl-nav .t { height: 34px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; font: 600 14px/1 var(--sans); color: var(--ink); cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .kl-nav .t:hover { background: var(--surface-2); } }

/* Typfarben: [Chip-Hintergrund, Chip-Text, Punkt] wie im Entwurf; Urlaub ergaenzt in Matcha */
.kl { --c-term-bg: #FDE8D7; --c-term-fg: #8A5A2B; --c-term-dot: #FBC49D;
      --c-shift-bg: #E6ECEF; --c-shift-fg: #3F5560; --c-shift-dot: #C5D0D6;
      --c-hol-bg: #F8E9E4; --c-hol-fg: #A8432F; --c-hol-dot: #E08A74;
      --c-lv-bg: #E4EBDA; --c-lv-fg: #4A6630; --c-lv-dot: #7E9A5F; }

.kl-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
@media (min-width: 1180px) { .kl-grid { grid-template-columns: minmax(0, 1fr) 340px; } }
@media (min-width: 1700px) { .kl-grid { grid-template-columns: minmax(0, 1fr) 400px; } }

/* Monatsraster */
.kl-month { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.kl-wd { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--surface-2); }
.kl-wd div { padding: 10px 0; text-align: center; font: 700 12px/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.kl-wd .s { display: none; }
.kl-cells { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.kl-cell { display: flex; flex-direction: column; align-items: stretch; gap: 4px; min-height: 96px; padding: 8px; border: 0; border-top: 1px solid #EAE3D6; border-left: 1px solid #EAE3D6; background: var(--surface); text-align: left; cursor: pointer; min-width: 0; font: inherit; color: inherit; }
.kl-cell.c1 { border-left: 0; }
.kl-cell.we { background: #F7F3EC; }
.kl-cell.out { background: #F2EDE4; }
@media (hover: hover) and (pointer: fine) { .kl-cell:hover { background: #FFFDF9; } }
.kl-cell.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.kl-cell .nr { display: flex; align-items: center; justify-content: flex-start; }
.kl-cell .nr span { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.kl-cell.out .nr span { color: var(--text-3); }
.kl-cell.today .nr span { background: var(--accent-deep); color: var(--surface); font-weight: 700; }
.kl-cell .chips { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kl-cell .ch { display: block; padding: 3px 7px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kl-cell .ch.term { background: var(--c-term-bg); color: var(--c-term-fg); }
.kl-cell .ch.shift { background: var(--c-shift-bg); color: var(--c-shift-fg); }
.kl-cell .ch.shift.draft { background: transparent; box-shadow: inset 0 0 0 1px var(--c-shift-dot); }
.kl-cell .ch.hol { background: var(--c-hol-bg); color: var(--c-hol-fg); }
.kl-cell .ch.lv { background: var(--c-lv-bg); color: var(--c-lv-fg); }
.kl-cell .more { font-size: 11px; color: var(--text-3); padding-left: 2px; }
.kl-cell .dots { display: none; justify-content: center; gap: 3px; }
.kl-cell .dots i { width: 6px; height: 6px; border-radius: 50%; }
.kl-cell .dots i.term { background: var(--c-term-dot); }
.kl-cell .dots i.shift, .kl-cell .dots i.shift.draft { background: var(--c-shift-dot); }
.kl-cell .dots i.hol { background: var(--c-hol-dot); }
.kl-cell .dots i.lv { background: var(--c-lv-dot); }
.kl-cell .dots:empty { display: none !important; }
@media (min-width: 1180px) { .kl-cell { min-height: 118px; } }
@media (max-width: 767px) {
  .kl-wd .l { display: none; }
  .kl-wd .s { display: inline; }
  .kl-cell { min-height: 54px; padding: 8px 2px; }
  .kl-cell .nr { justify-content: center; }
  .kl-cell .chips { display: none; }
  .kl-cell .dots { display: flex; }
}

/* Tageskarte rechts (warm) */
.kl-aside { background: #FDF1E7; color: var(--ink); border: 1px solid #F3D5BB; border-radius: 22px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 1180px) { .kl-aside { position: sticky; top: 24px; } }
.kl-k { font: 600 12px/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-deep); }
.kl-date { font: 400 44px/1 var(--serif); margin-top: 6px; }
.kl-item { display: flex; gap: 12px; width: 100%; padding: 14px; border: 0; border-radius: 14px; background: rgba(46, 44, 41, .06); text-align: left; font: inherit; color: inherit; cursor: pointer; }
.kl-item.static, .kl-item:disabled { cursor: default; opacity: 1; }
@media (hover: hover) and (pointer: fine) { .kl-item:not(:disabled):hover { background: rgba(46, 44, 41, .09); } }
.kl-item .bar { width: 4px; border-radius: 2px; flex: none; align-self: stretch; }
.kl-item .bar.term { background: var(--c-term-dot); }
.kl-item .bar.shift { background: var(--c-shift-dot); }
.kl-item .bar.hol { background: var(--c-hol-dot); }
.kl-item .bar.lv { background: var(--c-lv-dot); }
.kl-item .tx { flex: 1; min-width: 0; }
.kl-item .t { display: block; font-weight: 600; }
.kl-item .m { display: block; font-size: 14px; color: var(--text-2); }
.kl-empty { color: var(--text-2); font-size: 15px; }
.kl-add { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; border: 1px dashed var(--line-2); border-radius: 12px; background: transparent; color: var(--ink); font: 600 14px/1 var(--sans); cursor: pointer; }
.kl-add .ic { font-size: 16px; }
@media (hover: hover) and (pointer: fine) { .kl-add:hover { background: rgba(46, 44, 41, .04); } }
.kl-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); border-top: 1px solid rgba(46, 44, 41, .06); padding-top: 14px; }
.kl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.kl-legend i { width: 8px; height: 8px; border-radius: 50%; }
.kl-legend i.term { background: var(--c-term-dot); }
.kl-legend i.shift { background: var(--c-shift-dot); }
.kl-legend i.lv { background: var(--c-lv-dot); }
.kl-legend i.hol { background: var(--c-hol-dot); }

/* Listenansicht im gleichen Kartenstil */
.kl-listcard { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px 24px; display: flex; flex-direction: column; gap: 22px; }
.kl-lday { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 16px; align-items: start; }
.kl-lh { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; }
.kl-lh .dt { font: 400 26px/1.05 var(--serif); }
.kl-lday.today .dt { color: var(--accent-deep); }
.kl-litems { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 8px; }
@media (max-width: 767px) { .kl-lday { grid-template-columns: minmax(0, 1fr); gap: 8px; } .kl-listcard { padding: 18px 16px; } }

/* Dialog */
.kl-form { display: flex; flex-direction: column; gap: 16px; }
.kl-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 420px) { .kl-three { grid-template-columns: 1fr 1fr; } .kl-three > :first-child { grid-column: 1 / -1; } }
.kl-sub { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: -6px; font-size: 13px; color: var(--text-3); }
.kl-sub .tgl { min-height: 34px; height: 34px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.kl-note { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); }
.kl-form .opt { font-weight: 400; color: var(--text-3); font-size: 13px; }
.kl-det { display: flex; flex-direction: column; }
.kl-det .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid #EAE3D6; }
.kl-det .row:last-child { border-bottom: 0; }
.kl-desc { margin: 12px 0 0; white-space: pre-wrap; }

/* Monat/Liste: am Handy nur Symbole, damit Navigation und "Termin" in eine Zeile passen */
.kl-ph .acts .btn.primary { flex: 0 0 auto; }
.kl-view .ic { display: none; }
@media (max-width: 767px) {
  .kl-view .ic { display: inline-block; font-size: 17px; }
  .kl-view button span { display: none; }
  .kl-view button { padding: 0 11px; }
}
