:root {
  --pin-ring: #FFFFFF;
  --teal-50: #EAF4F5;
  --teal-100: #DCEFF1;
  --teal-300: #8FC4CE;
  --teal-500: #4A94A8;
  --teal-700: #225468;
  --teal-900: #0D2130;

  --coral-50: #FFF1EC;
  --coral-100: #FFE4DC;
  --coral-300: #FFAB94;
  --coral-500: #FF7A59;
  --coral-700: #E85A3B;
  --coral-contrast: #B03A1D;

  --ink: #12202A;
  --ink-muted: #6B7280;
  --surface: #FFFFFF;
  --surface-muted: #F0F4F6;
  --surface-border: #E3E8EB;

  --success: #2FBF71;
  --warning: #F5A623;
  --danger: #EF4A63;

  --on-coral: #12202A;
  --coral-ink: #B03A1D;
  --success-ink: #0F6E56;
  --warning-ink: #8F5D00;
  --danger-ink: #C93A50;

  --radius-button: 8px;
  --radius-card: 22px;
  --shadow-glass: 0 8px 24px rgba(13, 33, 48, 0.12);
  --gradient-brand: linear-gradient(135deg, #2F7D8F 0%, #225468 55%, #0D2130 100%);
}

@font-face {
  font-family: 'Inter';
  src: url('fonts/InterVariable.woff2?v=4.1') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--surface-muted);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3, p { margin: 0; }

.app-shell {
  min-height: 100vh;
  min-height: 100dvh;
}

.app-main {
  padding: 20px 20px 120px;
  padding-top: calc(20px + env(safe-area-inset-top));
  padding-bottom: calc(120px + env(safe-area-inset-bottom));
  max-width: 960px;
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .app-shell { display: flex; }
  .app-main {
    padding: 32px 40px; margin: 0; flex: 1; min-width: 0; max-width: none;
    padding-top: calc(32px + env(safe-area-inset-top));
    padding-bottom: calc(32px + env(safe-area-inset-bottom));
  }
}

.kd-aurora { position: absolute; pointer-events: none; will-change: transform; }
.kd-aurora-1 { animation: kdAurora1 34s ease-in-out infinite; }
.kd-aurora-2 { animation: kdAurora2 46s ease-in-out infinite; }
@keyframes kdAurora1 {
  0%, 100% { transform: translate3d(-8%, -6%, 0) scale(1); }
  50% { transform: translate3d(10%, 8%, 0) scale(1.18); }
}
@keyframes kdAurora2 {
  0%, 100% { transform: translate3d(12%, 14%, 0) scale(1.1); }
  50% { transform: translate3d(-6%, -8%, 0) scale(0.92); }
}
.kd-foil {
  position: absolute; inset: 0; pointer-events: none; will-change: transform, opacity;
  background: linear-gradient(100deg, transparent 22%, rgba(255, 255, 255, 0.07) 44%, rgba(255, 255, 255, 0.11) 50%, rgba(255, 255, 255, 0.07) 56%, transparent 78%);
  animation: kdFoil 68s cubic-bezier(0.33, 0, 0.2, 1) infinite;
}
@keyframes kdFoil {
  0% { transform: translate3d(-105%, 0, 0); opacity: 0; }
  4% { opacity: 0.7; }
  9% { opacity: 0.7; }
  13%, 100% { transform: translate3d(105%, 0, 0); opacity: 0; }
}
body.is-motion-paused .kd-aurora,
body.is-motion-paused .kd-foil { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .kd-aurora { animation: none; }
  .kd-foil { animation: none; opacity: 0; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .kd-aurora, .kd-foil, .kd-guilloche { display: none; }
}

.sidebar {
  display: none;
}

@media (min-width: 1024px) {
  .sidebar {
    display: flex;
    flex-direction: column;
    width: 256px;
    flex-shrink: 0;
    background: var(--gradient-brand);
    color: #fff;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .sidebar-logo { padding: 32px 24px 24px; position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .sidebar-logo-img { display: block; height: 22px; width: auto; }
  .sidebar-bg { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
  .sidebar-nav, .sidebar-footer { position: relative; z-index: 1; }
  .kd-aurora-sidebar-1 { inset: -30%; background: radial-gradient(closest-side, rgba(143, 212, 206, 0.28), transparent 72%); }
  .kd-aurora-sidebar-2 { inset: -30%; background: radial-gradient(closest-side, rgba(255, 122, 89, 0.24), transparent 70%); }
  .sidebar-nav { flex: 1; padding: 0 12px; display: flex; flex-direction: column; gap: 4px; }
  .sidebar-nav-group { display: flex; flex-direction: column; gap: 4px; }
  .sidebar-nav-group + .sidebar-nav-group { margin-top: 18px; }
  .sidebar-nav-group-title {
    padding: 0 16px 6px;
    font-size: 11px; font-weight: 800;
    letter-spacing: 0.09em; text-transform: uppercase;
    color: #fff;
  }
  .sidebar-link {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; border-radius: 12px;
    font-weight: 600; font-size: 14px;
    color: #fff;
    border: 1px solid transparent;
  }
  .sidebar-link:hover:not(.active) {
    background: rgba(255,255,255,0.08);
    color: #fff;
  }
  .sidebar-link.active {
    background: #fff;
    border-color: transparent;
    color: var(--teal-900);
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  }
  .sidebar-link.active svg { color: var(--coral-700); }
  .sidebar-footer {
    padding: 20px 16px; border-top: 1px solid rgba(255,255,255,0.1);
    display: flex; align-items: center; gap: 12px;
  }
  .sidebar-footer-text { min-width: 0; flex: 1 1 0%; overflow: hidden; }
  .sidebar-footer .name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sidebar-footer .sub { font-size: 12px; color: var(--teal-100); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sidebar-footer .footer-actions { margin-left: auto; flex-shrink: 0; display: flex; align-items: center; gap: 6px; }
  .sidebar-footer button, .sidebar-footer .footer-actions a {
    background: none; border: none; color: var(--teal-100); cursor: pointer; padding: 4px;
    display: inline-flex; text-decoration: none;
  }
  .sidebar-footer button:hover, .sidebar-footer .footer-actions a:hover { color: #fff; }
}

.bottom-nav {
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 40;
  max-width: 420px;
  margin: 0 auto;
  height: 68px;
  background: #fff;
  border: 1px solid #D2DEDD;
  border-radius: 26px;
  box-shadow:
    0 16px 34px rgba(12, 40, 49, 0.26),
    0 2px 6px rgba(12, 40, 49, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  padding: 0 8px;
}

@media (min-width: 1024px) {
  .bottom-nav { display: none; }
}

.bottom-nav a, .bottom-nav .more-btn {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 0; min-height: 48px; border-radius: 9999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.005em; color: #54707A;
  background: none; border: none; cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav .icon-wrap {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 28px; border-radius: 999px;
  background: transparent;
  transition: width 340ms cubic-bezier(.32, .72, 0, 1), background-color 200ms ease, box-shadow 240ms ease;
}
.bottom-nav .icon-wrap svg { stroke-width: 1.85; }

.bottom-nav a.active .icon-wrap, .bottom-nav .more-btn.active .icon-wrap {
  width: 46px;
  background: linear-gradient(180deg, #FF8F72, #F0602F);
  box-shadow: 0 4px 12px rgba(240, 96, 47, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.42);
}
.bottom-nav a.active .icon-wrap svg, .bottom-nav .more-btn.active .icon-wrap svg { stroke: #fff; stroke-width: 2; }
.bottom-nav a.active, .bottom-nav .more-btn.active { color: #C2452B; font-weight: 700; }

@media (prefers-contrast: more) {
  .bottom-nav { border-color: #17313A; }
}
@media (prefers-reduced-motion: reduce) {
  .bottom-nav .icon-wrap { transition-duration: 1ms; }
}

.more-sheet {
  position: fixed; inset: 0; z-index: 50;
  display: none;
  align-items: flex-end;
}
.more-sheet.open { display: flex; }
.more-sheet-backdrop { position: absolute; inset: 0; background: rgba(18,32,42,0.4); }
.more-sheet-panel {
  position: relative; width: 100%; background: #fff;
  border-radius: 24px 24px 0 0; padding: 20px 20px 32px;
  box-shadow: var(--shadow-glass);
}
.more-sheet-panel a, .more-sheet-panel button {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 14px 12px; border-radius: 12px; font-size: 14px; font-weight: 600;
  color: var(--ink); background: none; border: none; text-align: left; cursor: pointer;
  font-family: inherit;
}
.more-sheet-panel a:hover, .more-sheet-panel button:hover { background: var(--surface-muted); }
.more-sheet-panel .danger { color: var(--danger-ink); }
.more-sheet-lang-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 12px; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--ink);
}
.more-sheet-lang-label { display: flex; align-items: center; gap: 12px; }
.more-sheet-panel button.more-sheet-lang-flag {
  width: auto; padding: 0; border-radius: 9999px; flex-shrink: 0;
}
.more-sheet-panel button.more-sheet-lang-flag:hover { background: none; }

@media (min-width: 1024px) { .more-sheet, .fab { display: none !important; } }

.kundoo-modal-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(18,32,42,0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.kundoo-modal-overlay[hidden] { display: none; }
.kundoo-modal {
  background: #fff; border-radius: 20px; padding: 24px;
  max-width: 380px; width: 100%; box-shadow: var(--shadow-glass);
}
.kundoo-modal h3 { font-size: 16px; font-weight: 900; margin-bottom: 8px; }
.kundoo-modal p { font-size: 14px; color: var(--ink-muted); margin-bottom: 20px; }
.kundoo-modal .modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.kundoo-modal .modal-actions .btn { flex: 0 0 auto; }
@media (max-width: 480px) {
  .kundoo-modal .modal-actions { flex-direction: column-reverse; }
  .kundoo-modal .modal-actions .btn { width: 100%; }
}
.kundoo-crop { max-width: 420px; }
.kundoo-crop-stage {
  width: 100%; max-width: 320px; margin: 0 auto 14px;
  border-radius: 16px; overflow: hidden; background: var(--surface-muted);
}
.kundoo-crop-canvas {
  display: block; width: 100%; height: auto; aspect-ratio: 1 / 1;
  cursor: grab; touch-action: none;
}
.kundoo-crop-canvas:active { cursor: grabbing; }
.kundoo-crop-canvas:focus-visible { outline: 2px solid var(--teal-500); outline-offset: -2px; }
.kundoo-crop-zoom { display: flex; align-items: center; gap: 10px; max-width: 320px; margin: 0 auto 10px; }
.kundoo-crop-zoom button {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px;
  border: 1px solid var(--surface-border); background: var(--surface);
  color: var(--ink); font-size: 18px; font-weight: 800; line-height: 1; cursor: pointer;
}
.kundoo-crop-zoom button:hover { background: var(--surface-muted); }
.kundoo-crop-range { flex: 1; min-width: 0; }
.kundoo-crop-hint { font-size: 12px; color: var(--ink-muted); margin-bottom: 18px; text-align: center; }
html[data-theme="dark"] .kundoo-crop-stage { background: var(--surface-sunken); }
html[data-theme="dark"] .kundoo-crop-zoom button { background: var(--surface); border-color: var(--surface-border); }

.kundoo-modal-actions-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  margin-bottom: 4px;
}
.kundoo-modal-actions-grid a, .kundoo-modal-actions-grid button {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 3px; border-radius: 11px; background: var(--surface-muted);
  border: 1px solid var(--surface-border); font-size: 9.5px; font-weight: 600;
  color: var(--ink); text-align: center; cursor: pointer; font-family: inherit;
  line-height: 1.15;
}
.kundoo-modal-actions-grid svg { width: 15px; height: 15px; }
.kundoo-modal-actions-grid a:hover, .kundoo-modal-actions-grid button:hover { background: var(--teal-50); }

.termin-card { padding: 12px 14px; }
a.icon-btn.termin-icon-btn { width: 26px; height: 26px; flex-shrink: 0; }

.card {
  border-radius: var(--radius-card);
  background: #FAFAFA;
  box-shadow: var(--shadow-glass);
  border: 1px solid var(--surface-border);
}

.card-pad { padding: 20px; }

.kpi-tile { display: flex; flex-direction: column; gap: 10px; }
.kpi-tile-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.kpi-tile-icon {
  width: 24px; height: 24px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.kpi-tile-icon svg { width: 14px; height: 14px; }
.kpi-tile-icon-info { background: var(--teal-50); color: var(--teal-700); }
.kpi-tile-icon-success { background: rgba(47, 191, 113, 0.14); color: var(--success-ink); }
.kpi-tile-icon-attention { background: var(--coral-50); color: var(--coral-ink); }
.kpi-tile-label { font-size: 12px; color: var(--ink-muted); min-width: 0; }
.kpi-tile-body { min-width: 0; overflow-wrap: anywhere; }
.kpi-amt-22 { font-size: 22px; }
.kpi-amt-20 { font-size: 20px; }
.kpi-amt-18 { font-size: 18px; }
.kpi-amt-22.kpi-amt-compact { font-size: 17px; }
.kpi-amt-20.kpi-amt-compact { font-size: 16px; }
.kpi-amt-18.kpi-amt-compact { font-size: 15px; }
html[data-theme="dark"] .kpi-tile-icon-info { background: rgba(74, 148, 168, 0.18); color: var(--teal-300); }
html[data-theme="dark"] .kpi-tile-icon-success { background: rgba(47, 191, 113, 0.18); color: #4FD98B; }
html[data-theme="dark"] .kpi-tile-icon-attention { background: rgba(255, 122, 89, 0.18); color: var(--coral-300); }

.totp-reminder-banner {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}
.totp-reminder-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--coral-50); color: var(--coral-ink);
}
.totp-reminder-icon svg { width: 20px; height: 20px; }
html[data-theme="dark"] .totp-reminder-icon { background: rgba(255, 122, 89, 0.18); color: var(--coral-300); }
.totp-reminder-body { flex: 1; min-width: 0; padding-right: 24px; }
.totp-reminder-title { font-size: 15px; font-weight: 800; color: var(--ink); margin: 0 0 4px; }
.totp-reminder-text { font-size: 13px; color: var(--ink-muted); margin: 0 0 12px; line-height: 1.5; }
.totp-reminder-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.totp-reminder-actions form { display: inline-flex; }
.totp-reminder-snooze {
  background: none; border: none; color: var(--ink-muted); font-size: 13px;
  font-weight: 600; cursor: pointer; padding: 0; font-family: inherit;
}
.totp-reminder-snooze:hover { color: var(--ink); text-decoration: underline; }
.totp-reminder-close {
  position: absolute; top: 12px; right: 12px; background: none; border: none;
  cursor: pointer; color: var(--ink-muted); padding: 4px; border-radius: 9999px;
  display: flex;
}
.totp-reminder-close:hover { background: var(--surface-muted); color: var(--ink); }

.nav-alert-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--coral-500);
  flex-shrink: 0; margin-left: auto;
}

.compare-badge {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; font-size: 12px;
  font-weight: 800; max-width: 100%;
}
.compare-badge-value { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.compare-badge-label { font-weight: 500; }
.compare-badge-lg { gap: 4px; font-size: 13px; }
@media (max-width: 639px) {
  .compare-badge, .compare-badge-lg { font-size: 10.5px; gap: 2px; }
  .compare-badge svg, .compare-badge-lg svg { width: 10px; height: 10px; }
}

.card-list > * + * { border-top: 1px solid var(--surface-border); }
.card-list > a, .card-list > div.row { display: block; padding: 16px 20px; }
.card-list > a:hover { background: var(--surface-muted); }
.card-list > a:nth-child(even), .card-list > div.row:nth-child(even) { background: var(--teal-50); }
html[data-theme="dark"] .card-list > a:nth-child(even),
html[data-theme="dark"] .card-list > div.row:nth-child(even) { background: rgba(74, 148, 168, 0.18); }

.card-list-flat > a:nth-child(even), .card-list-flat > div.row:nth-child(even) { background: transparent; }

.page-title { font-size: 20px; font-weight: 900; margin-bottom: 16px; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-head[hidden] { display: none; }
.page-head .page-title { margin-bottom: 0; }
.kd-action-btn__t { display: inline; }
.kd-action-btn__t[hidden] { display: none; }

.page-action-desktop { display: none; }
@media (min-width: 1024px) {
  .page-action-desktop { display: flex; justify-content: flex-end; margin-bottom: 12px; }
  .page-action-desktop .btn { width: auto; }
}
.section-title { font-size: 16px; font-weight: 800; margin-bottom: 12px; }
.text-muted { color: var(--ink-muted); }
.text-sm { font-size: 13px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 12px; padding: 0 18px; height: 46px;
  font-weight: 800; font-size: 14px; border: none; cursor: pointer;
  font-family: inherit;
}
.btn-block { width: 100%; }
.kd-action-btn {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px;
  border: 0; border-radius: 12px;
  background: linear-gradient(180deg, #FF8F72, #F0602F);
  color: #fff;
  font: inherit; font-size: 14px; font-weight: 700; letter-spacing: -0.005em;
  box-shadow: 0 8px 20px rgba(240, 96, 47, 0.28);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 260ms cubic-bezier(.32, .72, 0, 1), background-color 170ms ease, box-shadow 170ms ease;
}
.kd-action-btn svg { stroke-width: 2.2; }
.kd-action-btn:hover { color: #fff; background: linear-gradient(180deg, #FF7A59, #DB5326); }
.kd-action-btn:active { transform: scale(0.965); transition-duration: 90ms; }
.kd-action-btn:focus-visible { outline: 2px solid #F0602F; outline-offset: 2px; }
@media (max-width: 760px) {
  .kd-action-btn { width: 100%; height: 48px; }
}

@media (max-width: 1023px) {
  .kd-action-btn.page-head-action {
    flex: none; width: 46px; min-width: 46px; height: 46px; padding: 0;
    border-radius: 50%; box-shadow: 0 6px 16px rgba(240, 96, 47, 0.30);
  }
  .kd-action-btn.page-head-action .kd-action-btn__t { display: none; }
  .kd-action-btn.page-head-action svg { width: 22px; height: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .kd-action-btn, .btn-primary { transition-duration: 1ms; }
  .kd-action-btn:active, .btn-primary:active { transform: none; }
}
@media (prefers-contrast: more) {
  .kd-action-btn { background: var(--coral-contrast); box-shadow: none; }
}
.btn-primary {
  background: linear-gradient(180deg, #FF8F72, #F0602F);
  color: #fff;
  letter-spacing: -0.005em;
  box-shadow: 0 8px 20px rgba(240, 96, 47, 0.28);
  transition: transform 260ms cubic-bezier(.32, .72, 0, 1), box-shadow 170ms ease;
}
.btn-primary:hover { background: linear-gradient(180deg, #FF7A59, #DB5326); }
.btn-primary:active { transform: scale(0.965); transition-duration: 90ms; }
.btn-primary:focus-visible { outline: 2px solid #F0602F; outline-offset: 2px; }
@media (prefers-contrast: more) {
  .btn-primary { background: var(--coral-contrast); box-shadow: none; }
}
.btn-secondary { background: var(--teal-50); color: var(--teal-700); }
.btn-secondary:hover { background: var(--teal-100); }
.btn-outline { background: #fff; color: var(--ink); border: 1px solid var(--surface-border); }
.btn-outline:hover { border-color: var(--teal-500); }
.btn-danger { background: #fff; color: var(--danger-ink); border: 1px solid var(--danger); }
.btn-danger:hover { background: var(--danger-ink); color: #fff; }
.btn-ghost { background: none; color: var(--ink-muted); height: auto; padding: 6px 10px; }
.btn-sm { height: 38px; font-size: 13px; padding: 0 14px; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

@media (prefers-contrast: more) {
  .fab { background: var(--coral-contrast); box-shadow: none; }
}

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input[type=text], .field input[type=email], .field input[type=password],
.field input[type=number], .field input[type=date], .field input[type=datetime-local],
.field input[type=tel], .field select, .field textarea {
  width: 100%; border: 1px solid var(--surface-border); border-radius: 10px;
  padding: 11px 14px; font-size: 14px; font-family: inherit; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--teal-500); outline-offset: -1px; border-color: transparent;
}
.field textarea { resize: vertical; min-height: 80px; }
.field .error { color: var(--danger-ink); font-size: 12px; margin-top: 4px; }
p.field.error {
  background: #FDEAEA; color: #BC3348; border-radius: var(--radius-card);
  padding: 12px 16px; font-size: 13px; font-weight: 600; margin-top: 0;
}
html[data-theme="dark"] p.field.error { background: rgba(239, 74, 99, 0.16); color: #FF8A9B; }
.field .hint { color: var(--ink-muted); font-size: 12px; margin-top: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.art-group { position: sticky; top: 0; z-index: 1; background: var(--surface); padding: 8px 14px 6px; border-bottom: 1px solid var(--surface-border); font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.article-suggestions button.art-opt { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; align-items: baseline; padding: 9px 14px; }
.art-opt-ind { padding-left: 26px !important; }
.art-nm { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.art-diff { font-weight: 800; }
.art-pr { font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.art-no { grid-column: 1; font-size: 10.5px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.article-suggestions button.art-all { display: block; padding-left: 26px; font-size: 12px; font-weight: 800; color: var(--teal-700); }

.cs-row { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; }
.cs-av { width: 34px; height: 34px; font-size: 12.5px; }
.cs-txt { min-width: 0; flex: 1; }
.cs-name { display: block; font-size: 13.5px; font-weight: 800; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-addr { display: block; margin-top: 1px; font-size: 11.5px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.customer-selected { border: 1px solid var(--surface-border); border-radius: 14px; background: var(--surface); }
.customer-selected[hidden] { display: none; }
.customer-autocomplete-wrap.has-selected > .customer-search-input,
.customer-autocomplete-wrap.has-selected > .customer-picker-toggle,
.customer-autocomplete-wrap.has-selected > .kf-linkrow,
.customer-autocomplete-wrap.has-selected > .tp-linkrow { display: none; }
.kw-head { display: flex; align-items: center; gap: 12px; padding: 13px 15px 11px; }
.kw-avatar { width: 42px; height: 42px; font-size: 15px; object-fit: cover; }
.kw-txt { min-width: 0; flex: 1; }
.kw-name { display: block; font-size: 14px; font-weight: 800; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.kw-sub { display: block; margin-top: 2px; font-size: 12px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kw-change { flex: none; border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 800; color: var(--teal-700); cursor: pointer; padding: 6px 2px; }
.kw-change:hover { color: var(--teal-500); }
.kw-change:focus-visible { outline: 2px solid var(--teal-500); outline-offset: 2px; border-radius: 6px; }
.kw-body { border-top: 1px solid var(--surface-border); padding: 11px 15px 13px; display: grid; gap: 7px; }
.kw-zeile { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 10px; align-items: start; }
.kw-lab { font-size: 11.5px; font-weight: 700; color: var(--ink-muted); padding-top: 1px; }
.kw-val { font-size: 13px; color: var(--ink); line-height: 1.45; }
@media (max-width: 520px) { .kw-zeile { grid-template-columns: 64px minmax(0, 1fr); } }
html[data-theme="dark"] .customer-selected { background: var(--surface); border-color: var(--surface-border); }

.kundoo-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.article-suggestions button:focus-visible, .customer-suggestions button:focus-visible { outline: 2px solid var(--teal-500); outline-offset: -2px; }
.article-suggestions button.is-active, .customer-suggestions button.is-active { background: var(--teal-50); }
html[data-theme="dark"] .article-suggestions button.is-active,
html[data-theme="dark"] .customer-suggestions button.is-active { background: rgba(74, 148, 168, 0.22); }

.variant-grid { margin-top: 8px; border: 1px solid var(--surface-border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.variant-grid[hidden] { display: none; }
.vg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--surface-border); background: var(--surface-muted); }
.vg-title { font-size: 12.5px; font-weight: 800; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vg-close { flex: none; border: 0; background: none; color: var(--ink-muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 4px; font-family: inherit; }
.vg-close:hover { color: var(--ink); }
.vg-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 96px; column-gap: 10px; align-items: center; padding: 8px 12px; }
.vg-row + .vg-row { border-top: 1px solid var(--surface-border); }
.vg-row.is-picked { background: var(--teal-50); }
html[data-theme="dark"] .vg-row.is-picked { background: rgba(74, 148, 168, 0.18); }
.vg-txt { min-width: 0; line-height: 1.35; }
.vg-diff { display: block; font-size: 12.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vg-sub { display: block; font-size: 10.5px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.vg-price { font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.variant-grid .qty-stepper { height: 32px; border-radius: 9px; grid-template-columns: 30px minmax(0, 1fr) 30px; }
.variant-grid .qty-stepper input[type=number] { font-size: 13px; padding: 0; }
.variant-grid .qty-btn { font-size: 16px; font-weight: 700; line-height: 1; }
.vg-foot { padding: 10px 12px; border-top: 1px solid var(--surface-border); background: var(--surface-muted); }
.vg-take { width: 100%; min-height: 42px; border: 0; border-radius: 10px; background: linear-gradient(180deg, #FF8F72, #F0602F); color: #fff; font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.vg-take:disabled { background: var(--surface-border); color: var(--ink-muted); cursor: not-allowed; }
@media (max-width: 639px) {
  .vg-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 8px; }
  .variant-grid .qty-stepper { grid-column: 1 / -1; justify-self: end; width: 118px; height: 36px; grid-template-columns: 36px minmax(0, 1fr) 36px; }
  .variant-grid .qty-stepper input[type=number] { font-size: 15px; padding: 0; }
}

.cart-disc { display: inline-flex; align-items: center; gap: 3px; flex-shrink: 0; border: 1px solid var(--surface-border); border-radius: 8px; padding: 0 8px 0 4px; height: 34px; background: var(--surface); }
.cart-disc:focus-within { border-color: var(--teal-500); }
.cart-disc input { width: 40px; border: 0; background: none; text-align: right; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); -moz-appearance: textfield; }
.cart-disc input:focus { outline: none; }
.cart-disc input::-webkit-outer-spin-button, .cart-disc input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cart-disc span { font-size: 12px; font-weight: 700; color: var(--ink-muted); }
.cart-totaldisc { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.cart-totaldisc label { font-size: 13px; font-weight: 600; color: var(--ink-muted); }
html[data-theme="dark"] .cart-disc { background: var(--surface-sunken); border-color: var(--surface-sunken-border); }

.qty-stepper {
  display: grid; grid-template-columns: 38px minmax(0, 1fr) 38px; align-items: stretch;
  border: 1px solid var(--surface-border); border-radius: 10px; background: #fff; overflow: hidden;
}
.qty-stepper:focus-within { outline: 2px solid var(--teal-500); outline-offset: -1px; border-color: transparent; }
.qty-stepper input[type=number] {
  width: 100%; min-width: 0; border: 0; border-radius: 0; background: none; color: var(--ink);
  font-family: inherit; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums;
  text-align: center; padding: 9px 2px; -moz-appearance: textfield;
}
.qty-stepper input[type=number]:focus { outline: none; }
.qty-stepper input[type=number]::-webkit-outer-spin-button,
.qty-stepper input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-btn {
  display: flex; align-items: center; justify-content: center;
  border: 0; background: var(--surface-muted); color: var(--teal-700);
  cursor: pointer; padding: 0; font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 150ms ease;
}
.qty-btn:hover { background: var(--teal-50); }
.qty-btn:active { background: var(--teal-100); }
.qty-btn:focus-visible { outline: 2px solid var(--teal-500); outline-offset: -2px; }
@media (max-width: 639px) {
  .qty-stepper { grid-template-columns: 44px minmax(0, 1fr) 44px; }
  .qty-stepper input[type=number] { font-size: 16px; padding: 12px 2px; }
}
html[data-theme="dark"] .qty-stepper { background: var(--surface-sunken); border-color: var(--surface-sunken-border); }
html[data-theme="dark"] .qty-btn { background: rgba(74, 148, 168, 0.18); color: var(--teal-300); }
html[data-theme="dark"] .qty-btn:hover { background: rgba(74, 148, 168, 0.30); }
@media (max-width: 639px) {
  .field input[type=text], .field input[type=email], .field input[type=password],
  .field input[type=number], .field input[type=date], .field input[type=datetime-local],
  .field input[type=tel], .field select, .field textarea {
    font-size: 16px;
  }
}

.field input[type=date] {
  min-width: 0;
  max-width: 100%;
  padding-left: 12px;
  padding-right: 8px;
}
.field-date { overflow: hidden; border-radius: 10px; }
.field-date:has(.premium-field) { overflow: visible; }
.field-row-3 { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; }

.premium-field { position: relative; }
.premium-field-native {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0;
  pointer-events: none; margin: 0; border: 0; padding: 0;
}
.premium-field-trigger {
  width: 100%; display: flex; align-items: center; gap: 8px; text-align: left;
  border: 1px solid var(--surface-border); border-radius: 10px; padding: 11px 14px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--ink); cursor: pointer;
}
.premium-field-trigger:focus-visible { outline: 2px solid var(--teal-500); outline-offset: -1px; border-color: transparent; }
.premium-field-trigger .icon-lead { color: var(--teal-700); flex-shrink: 0; display: flex; }
.premium-field-trigger .trigger-text { flex: 1; }
.premium-field-trigger .trigger-text.is-placeholder { color: var(--ink-muted); }
.premium-field-trigger .icon-chevron { color: var(--ink-muted); flex-shrink: 0; display: flex; transition: transform .15s ease; }
.premium-field.is-open .premium-field-trigger .icon-chevron { transform: rotate(180deg); }
.premium-field.is-open .premium-field-trigger { border-color: var(--teal-500); }

.premium-date-panel, .premium-time-panel {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30;
  background: #fff; border-radius: var(--radius-card); box-shadow: var(--shadow-glass);
  border: 1px solid var(--surface-border); overflow: hidden; width: 280px; max-width: calc(100vw - 32px);
}
.premium-date-panel[hidden], .premium-time-panel[hidden] { display: none; }

.premium-date-head {
  background: var(--gradient-brand); color: #fff; padding: 12px 14px;
  display: flex; align-items: center; justify-content: space-between;
}
.premium-date-head button {
  background: none; border: none; color: #fff; cursor: pointer; padding: 4px; display: flex;
}
.premium-date-head span { font-size: 13.5px; font-weight: 800; }
.premium-date-body { padding: 12px; }
.premium-date-weekdays, .premium-date-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.premium-date-weekdays span { font-size: 10.5px; color: var(--ink-muted); text-align: center; padding-bottom: 4px; font-weight: 800; }
.premium-date-grid button {
  aspect-ratio: 1; border: none; background: none; border-radius: 9999px; font-size: 12.5px;
  color: var(--ink); cursor: pointer; font-family: inherit;
}
.premium-date-grid button:hover:not(:disabled) { background: var(--teal-50); }
.premium-date-grid button.is-muted { color: var(--ink-muted); opacity: .55; }
.premium-date-grid button.is-today { border: 1.5px solid var(--teal-500); font-weight: 800; }
.premium-date-grid button.is-selected { background: var(--coral-500); color: var(--on-coral); font-weight: 800; }
.premium-date-grid button:disabled { opacity: .3; cursor: not-allowed; }

.premium-time-body { padding: 14px; }
.premium-time-columns { position: relative; background: var(--surface-muted); border-radius: 12px; padding: 6px 0; }
.premium-time-highlight {
  position: absolute; left: 6px; right: 6px; top: 50%; transform: translateY(-50%);
  height: 32px; background: var(--teal-50); border-radius: 8px; pointer-events: none;
}
.premium-time-cols-inner { display: grid; grid-template-columns: 1fr 1fr; }
.premium-time-col { max-height: 168px; overflow-y: auto; scroll-snap-type: y mandatory; position: relative; padding: 68px 0; }
.premium-time-col button {
  display: block; width: 100%; border: none; background: none; text-align: center; padding: 6px 0;
  font-size: 14px; color: var(--ink-muted); cursor: pointer; font-family: inherit; scroll-snap-align: center;
}
.premium-time-col button.is-selected { color: var(--teal-700); font-weight: 800; font-size: 15px; }
.premium-time-actions { display: flex; gap: 8px; margin-top: 14px; }
.premium-time-actions button {
  flex: 1; padding: 9px 0; border-radius: 8px; font-size: 13px; font-family: inherit; cursor: pointer;
}
.premium-time-actions .time-cancel { border: 1px solid var(--surface-border); background: #fff; color: var(--ink); }
.premium-time-actions .time-apply { border: none; background: var(--coral-500); color: var(--on-coral); font-weight: 800; }

.url-field { position: relative; }
.url-field input { padding-left: 40px !important; padding-right: 36px !important; }
.url-field-icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--teal-700); pointer-events: none; display: flex;
}
.url-field-clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: none; padding: 6px; cursor: pointer; color: var(--ink-muted);
  display: none; border-radius: 6px;
}
.url-field.has-value .url-field-clear { display: flex; }
.url-field-clear:hover { color: var(--danger-ink); }

.url-copy-btn.is-copied { color: var(--success-ink); }

.card:has(.customer-suggestions:not([hidden])),
.card:has(.customer-picker-list:not([hidden])),
.card:has(.article-suggestions:not([hidden])),
.card:has(.premium-field.is-open) { position: relative; z-index: 25; }

.article-autocomplete-wrap, .customer-autocomplete-wrap { position: relative; }
.article-suggestions, .customer-suggestions {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 30; margin-top: 4px;
  background: #fff; border: 1px solid var(--surface-border); border-radius: 12px;
  max-height: 240px; overflow-y: auto; box-shadow: var(--shadow-glass);
}
.article-suggestions[hidden], .customer-suggestions[hidden] { display: none; }
.article-suggestions button, .customer-suggestions button {
  display: block; width: 100%; text-align: left; padding: 10px 14px;
  font-size: 13px; border: none; background: none; cursor: pointer; color: var(--ink);
}
.article-suggestions button + button, .customer-suggestions button + button { border-top: 1px solid var(--surface-border); }
.article-suggestions button:hover, .customer-suggestions button:hover { background: var(--surface-muted); }

.article-picker-toggle {
  background: none; border: none; padding: 0; font-size: 12px; font-weight: 600;
  color: var(--teal-700); cursor: pointer; font-family: inherit; text-decoration: underline;
}
.article-price-list, .customer-picker-list {
  margin-top: 8px; max-height: 220px; overflow-y: auto;
  border: 1px solid var(--surface-border); border-radius: 12px;
}
.article-price-list[hidden], .customer-picker-list[hidden] { display: none; }
.article-price-list button, .customer-picker-list button {
  display: block; width: 100%; text-align: left; padding: 10px 14px;
  font-size: 13px; border: none; background: none; cursor: pointer; color: var(--ink);
}
.article-price-list button + button, .customer-picker-list button + button { border-top: 1px solid var(--surface-border); }
.article-price-list button:hover, .customer-picker-list button:hover { background: var(--surface-muted); }

.nb-root { container-type: inline-size; }
.nb-stack { display: grid; gap: 12px; }

.nb-teaser { display: flex; align-items: center; gap: 14px; width: 100%; text-decoration: none;
  padding: 16px 18px; margin-bottom: 20px; border-radius: var(--radius-card);
  border: 1px solid color-mix(in srgb, var(--success) 32%, var(--surface-border));
  background: linear-gradient(100deg,
    color-mix(in srgb, var(--success) 16%, var(--surface)),
    color-mix(in srgb, var(--success) 5%, var(--surface)) 72%);
  color: var(--ink); box-shadow: var(--shadow-glass);
  transition: transform .26s cubic-bezier(.32,.72,0,1), border-color .17s ease; }
.nb-teaser:hover { border-color: color-mix(in srgb, var(--success) 62%, var(--surface-border)); }
.nb-teaser:active { transform: scale(.99); transition-duration: 90ms; }
.nb-teaser:focus-visible { outline: 2px solid var(--coral-500); outline-offset: 2px; }
.nb-teaser__icon { flex: none; display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 14px; color: #fff;
  background: linear-gradient(160deg, var(--success), var(--success-ink)); }
.nb-teaser__body { flex: 1; min-width: 0; }
.nb-teaser__title { display: block; font-size: 15.5px; font-weight: 700; letter-spacing: -.015em; color: var(--success-ink); }
.nb-teaser__sub { display: block; margin-top: 2px; font-size: 13px; line-height: 1.45; color: var(--ink-muted); }
.nb-teaser__chev { flex: none; color: var(--ink-muted); display: flex; align-items: center; }
.nb-teaser--slim { padding: 12px 14px; border-radius: 14px; box-shadow: none; gap: 12px; margin-bottom: 0;
  background: color-mix(in srgb, var(--success) 9%, var(--surface-muted));
  border-color: color-mix(in srgb, var(--success) 22%, var(--surface-border)); }
.nb-teaser--slim .nb-teaser__icon { width: 34px; height: 34px; border-radius: 11px; }
.nb-teaser--slim .nb-teaser__title { font-size: 14px; }
.nb-teaser--slim .nb-teaser__sub { font-size: 12.5px; }
html[data-theme="dark"] .nb-teaser__title { color: #7FE0AC; }
html[data-theme="dark"] .nb-teaser__icon { background: linear-gradient(160deg, var(--success), #14795C); }

.nb-seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px;
  background: var(--surface-muted); border: 1px solid var(--surface-border); }
.nb-seg__item { flex: 1; min-height: 38px; padding: 0 8px; border: 0; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; color: var(--ink-muted); font-family: inherit; font-size: 13.5px;
  font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background-color .18s ease, color .18s ease; }
.nb-seg__item.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(13,33,48,.16); }
.nb-seg label { flex: 1; display: flex; position: relative; min-width: 0; }
.nb-seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.nb-seg input:focus-visible + .nb-seg__item { outline: 2px solid var(--coral-500); outline-offset: -2px; }
.nb-seg__item:focus-visible { outline: 2px solid var(--coral-500); outline-offset: -2px; }

.nb-search { display: grid; gap: 12px; }
.nb-search__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.nb-search__actions .btn { flex: 1 1 150px; width: auto; }
@container (min-width: 600px) {
  .nb-search__row { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; align-items: end; }
  .nb-search__actions .btn { flex: 0 0 auto; }
}
.nb-msg { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
  border-radius: 14px; font-size: 13px; line-height: 1.55; text-wrap: pretty; }
.nb-msg[hidden] { display: none; }
.nb-msg__icon { flex: none; margin-top: 1px; }
.nb-msg--hint { background: var(--surface-muted); border: 1px solid var(--surface-border); color: var(--ink-muted); }
.nb-msg--soft { background: color-mix(in srgb, var(--warning) 13%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--warning) 34%, var(--surface)); color: var(--warning-ink); }
html[data-theme="dark"] .nb-msg--soft { color: #F2C878; }
.nb-spin { display: block; width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--teal-700) 30%, transparent);
  border-top-color: var(--teal-700); animation: nb-spin .8s linear infinite; }
@keyframes nb-spin { to { transform: rotate(360deg); } }

.nb-map { height: 260px; border-radius: var(--radius-card); overflow: hidden;
  border: 1px solid var(--surface-border); background: var(--surface-muted); }
@container (min-width: 600px) { .nb-map { height: 340px; } }
html[data-theme="dark"] .nb-map .leaflet-tile-pane { filter: invert(.92) hue-rotate(185deg) saturate(.55) brightness(.97); }
.nb-map .leaflet-container { background: var(--surface-muted); font-family: inherit; }
.nb-map .leaflet-control-attribution { background: color-mix(in srgb, var(--surface) 86%, transparent);
  color: var(--ink-muted); font-size: 10px; }
.nb-map .leaflet-control-attribution a { color: var(--ink-muted); }
.nb-pinhit { background: none; border: 0; display: flex; align-items: center; justify-content: center; }
.nb-pin { display: block; width: 24px; height: 24px; border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg); background: var(--coral-500); border: 2px solid var(--pin-ring);
  box-shadow: 0 2px 6px rgba(13,33,48,.45); }
.nb-cluster { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border-radius: 50%; background: var(--coral-500); border: 2px solid var(--pin-ring);
  color: #fff; font-size: 12.5px; font-weight: 700; box-shadow: 0 2px 8px rgba(13,33,48,.45); }
.nb-origin { display: block; width: 14px; height: 14px; border-radius: 50%;
  background: var(--teal-900); border: 2px solid var(--pin-ring);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--teal-900) 18%, transparent); }
html[data-theme="dark"] .nb-origin { background: var(--teal-300); }
.nb-map .leaflet-popup-content-wrapper { border-radius: 16px; background: var(--surface); color: var(--ink);
  box-shadow: 0 12px 30px rgba(13,33,48,.24); }
.nb-map .leaflet-popup-tip { background: var(--surface); }
.nb-map .leaflet-popup-content { margin: 13px 15px; font-size: 13px; }
.nb-pop__name { font-size: 14px; font-weight: 700; letter-spacing: -.012em; }
.nb-pop__meta { margin-top: 3px; color: var(--ink-muted); font-size: 12.5px; line-height: 1.5; }
.nb-pop__link { display: inline-block; margin-top: 9px; font-size: 12.5px; font-weight: 700; color: var(--coral-contrast); }

.nb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.nb-item { padding: 16px 18px; border-radius: 18px; border: 1px solid var(--surface-border); background: var(--surface); }
.nb-item__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.nb-item__date { font-size: 13px; font-weight: 700; letter-spacing: .015em; color: var(--teal-700); }
.nb-item__dist { flex: none; font-size: 13px; font-weight: 600; color: var(--ink-muted); }
.nb-item__name { margin: 6px 0 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 16px; font-weight: 700; letter-spacing: -.018em; color: var(--ink); }
.nb-item__meta { margin: 4px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-muted); }
.nb-item__load { margin-top: 11px; display: flex; align-items: flex-start; gap: 9px;
  padding: 9px 12px; border-radius: 12px; background: var(--surface-muted);
  border: 1px solid var(--surface-border); font-size: 12.5px; line-height: 1.45; color: var(--ink); }
.nb-item__load b { font-weight: 600; color: var(--ink-muted); }
.nb-item__actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.nb-item__actions .btn { flex: 1 1 auto; width: auto; }
@container (min-width: 600px) { .nb-item__actions .btn { flex: 0 0 auto; } }

.kd-badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px;
  border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; vertical-align: middle; }
.kd-badge svg { flex: none; }
.kd-badge--kunde { background: var(--teal-100); color: var(--teal-700); border: 1px solid transparent; }
.kd-badge--neu { background: var(--coral-50); color: var(--coral-contrast); border: 1px solid var(--coral-100); }
.kd-badge--kontakt { background: transparent; color: var(--ink-muted); border: 1px dashed var(--surface-border); }

.nb-empty { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 28px 20px;
  border-radius: 18px; border: 1px dashed var(--surface-border); background: var(--surface-muted); }
.nb-empty__icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 15px; background: var(--teal-50); color: var(--teal-700); }
.nb-empty__text { max-width: 34ch; font-size: 13.5px; line-height: 1.55; color: var(--ink-muted); text-wrap: pretty; }
.nb-empty .btn { width: auto; }

.nb-note { display: flex; align-items: flex-start; gap: 9px; padding: 11px 2px 0;
  font-size: 12.5px; line-height: 1.5; color: var(--ink-muted); text-wrap: pretty; }

.nb-kind { display: grid; gap: 12px; }
.nb-kind__fields { display: grid; gap: 10px; }
@container (min-width: 600px) { .nb-kind__plz { display: grid; grid-template-columns: .5fr 1fr; gap: 10px; } }

html[data-theme="dark"] .kd-badge--kunde { background: #24404F; color: var(--teal-300); }
html[data-theme="dark"] .kd-badge--neu { background: #3E2A23; border-color: #4E362D; color: var(--coral-300); }
html[data-theme="dark"] .nb-empty__icon { background: #1B303C; color: var(--teal-300); }

@media (prefers-reduced-motion: reduce) {
  .nb-teaser, .nb-seg__item { transition-duration: 1ms !important; }
  .nb-spin { animation: none !important; }
}
@media (prefers-contrast: more) {
  .nb-item, .nb-teaser { border-color: var(--ink) !important; }
  .kd-badge--kontakt { border-style: solid !important; }
}

.password-field { position: relative; }
.password-field input { padding-right: 44px !important; }
.password-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  background: none; border: none; color: var(--ink-muted); cursor: pointer; padding: 0;
}
.password-toggle:hover { color: var(--teal-700); }
.password-toggle .icon-off { display: none; }
.password-toggle.showing .icon-on { display: none; }
.password-toggle.showing .icon-off { display: flex; }

.password-strength { margin-top: 10px; }
.password-strength-bar { display: flex; gap: 4px; height: 5px; }
.password-strength-bar span { flex: 1; border-radius: 3px; background: var(--surface-border); transition: background-color .15s ease; }
.password-strength-label { font-size: 11px; color: var(--ink-muted); margin-top: 6px; font-weight: 800; }
.password-strength[data-level="1"] .password-strength-bar span:nth-child(-n+1) { background: var(--danger); }
.password-strength[data-level="2"] .password-strength-bar span:nth-child(-n+2) { background: var(--warning); }
.password-strength[data-level="3"] .password-strength-bar span:nth-child(-n+3) { background: #F2C94C; }
.password-strength[data-level="4"] .password-strength-bar span:nth-child(-n+4) { background: var(--success); }
.password-strength[data-level="1"] .password-strength-label { color: var(--danger-ink); }
.password-strength[data-level="2"] .password-strength-label { color: var(--warning-ink); }
.password-strength[data-level="3"] .password-strength-label { color: #8A7300; }
.password-strength[data-level="4"] .password-strength-label { color: var(--success-ink); }

.password-checklist { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.password-checklist li {
  display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-muted);
  transition: color .15s ease;
}
.password-checklist li svg { flex-shrink: 0; color: var(--surface-border); transition: color .15s ease; }
.password-checklist li.is-met { color: var(--success-ink); }
.password-checklist li.is-met svg { color: var(--success-ink); }

.promo-block { display: flex; flex-direction: column; }
.promo-countdown {
  text-align: center; background: linear-gradient(160deg, var(--coral-100), rgba(232,90,59,0.08));
  border: 1px solid var(--coral-300); border-radius: 14px; padding: 12px 12px 14px; margin-bottom: 14px;
}
.promo-countdown-label {
  display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0 0 9px;
  color: var(--coral-ink); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
}
.promo-countdown-units { display: flex; justify-content: center; align-items: center; gap: 6px; }
.promo-cd-unit { background: var(--coral-500); border-radius: 8px; padding: 7px 4px; min-width: 44px; }
.promo-cd-unit span { display: block; color: var(--on-coral); font-size: 16px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1.1; }
.promo-cd-unit small { display: block; color: rgba(18,32,42,0.85); font-size: 8px; text-transform: uppercase; letter-spacing: 0.03em; margin-top: 2px; font-weight: 800; }
.promo-badge {
  display: inline-block; align-self: flex-start; background: var(--coral-500); color: var(--on-coral); font-size: 10px; font-weight: 900;
  letter-spacing: 0.03em; text-transform: uppercase; padding: 4px 10px; border-radius: 9999px; margin-bottom: 10px;
}
.promo-price-lock-note { font-size: 12.5px; color: var(--ink-muted); margin: 0 0 12px; line-height: 1.5; }
.promo-price { font-size: 30px; font-weight: 900; color: var(--ink); }
.promo-price-unit { font-size: 13px; font-weight: 600; color: var(--ink-muted); }
.promo-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.promo-chip { background: var(--surface-muted); color: var(--ink-muted); font-size: 11px; padding: 5px 9px; border-radius: 9999px; }
.promo-note { font-size: 11.5px; color: var(--ink-muted); margin: 6px 0 0; }
.promo-plan-card {
  display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--surface-border); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 10px;
}
.promo-plan-card.is-selected { border-color: var(--coral-500); }
.promo-plan-name { display: block; font-weight: 800; font-size: 14px; }
.promo-plan-price { display: block; font-size: 12.5px; color: var(--ink-muted); margin-top: 2px; }
.promo-plan-terms { display: block; font-size: 11px; color: var(--ink-muted); margin-top: 4px; }
.promo-plan-name .promo-badge { margin: 0 0 0 6px; padding: 2px 8px; font-size: 9px; vertical-align: 2px; }

.promo-block--dark .promo-countdown { background: linear-gradient(160deg, rgba(255,122,89,0.28), rgba(232,90,59,0.12)); border-color: rgba(255,171,148,0.5); }
.promo-block--dark .promo-countdown-label { color: #FFE4DC; }
.promo-block--dark .promo-price-lock-note { color: rgba(255,255,255,0.65); }
.promo-block--dark .promo-price { color: #fff; }
.promo-block--dark .promo-price-unit { color: rgba(255,255,255,0.7); }
.promo-block--dark .promo-chip { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.24); color: rgba(255,255,255,0.85); }
.promo-block--dark .promo-note { color: rgba(255,255,255,0.55); }

.promo-trigger-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.28); color: #fff;
  border-radius: 9999px; padding: 8px 16px; font-size: 12.5px; font-weight: 800; font-family: inherit;
  cursor: pointer; margin: 14px 0 0;
}
.promo-trigger-btn:hover { background: rgba(255,255,255,0.18); }

.search-box { position: relative; margin-bottom: 16px; }
.search-box input {
  width: 100%; border: 1px solid var(--surface-border); border-radius: 9999px;
  padding: 13px 16px 13px 42px; font-size: 14px; font-family: inherit;
}
.search-box .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-muted); }

.chip-row { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 2px; }
.chip {
  flex-shrink: 0; border-radius: 9999px; padding: 9px 16px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--surface-border); background: #fff; color: var(--ink-muted);
  cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip svg { flex-shrink: 0; opacity: .7; }
.chip.active { background: var(--coral-500); color: var(--on-coral); border-color: transparent; }
.chip.active svg { opacity: 1; }
.chip.active::after { content: "✓"; font-size: 11px; font-weight: 800; margin-left: 2px; }

.segmented {
  display: inline-flex; width: 100%; background: var(--surface-muted); border: 1px solid var(--surface-border);
  border-radius: 9999px; padding: 4px; margin-bottom: 20px;
}
.segmented a {
  flex: 1; text-align: center; padding: 9px 0; border-radius: 9999px; font-size: 13px; font-weight: 600;
  color: var(--ink-muted);
}
.segmented a.active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }

.badge {
  display: inline-flex; align-items: center; border-radius: 9999px; border: 2px solid; padding: 2px 10px;
  font-size: 11px; font-weight: 800;
}
.badge-teal { border-color: var(--teal-500); color: var(--teal-700); }
.badge-coral { border-color: var(--coral-500); color: var(--coral-ink); }
.badge-success { border-color: var(--success); color: var(--success-ink); }
.badge-warning { border-color: var(--warning); color: var(--warning-ink); }
.badge-danger { border-color: var(--danger); color: var(--danger-ink); }
.badge-neutral { border-color: var(--surface-border); color: var(--ink-muted); }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 9999px; flex-shrink: 0; }
.dot-teal { background: var(--teal-500); }
.dot-coral { background: var(--coral-500); }
.dot-success { background: var(--success); }
.dot-warning { background: var(--warning); }
.dot-danger { background: var(--danger); }
.dot-neutral { background: var(--ink-muted); }

.notify-badge-anchor { position: relative; }
.notify-badge {
  position: absolute; top: -6px; right: -6px; z-index: 2;
  width: 18px; height: 18px; border-radius: 9999px;
  background: var(--danger); color: var(--on-coral); font-size: 11px; font-weight: 900;
  display: flex; align-items: center; justify-content: center; line-height: 1;
  border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
html[data-theme="dark"] .notify-badge { border-color: var(--surface); }

.status-dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 9999px;
  background: var(--ink-muted); opacity: 0.4; flex-shrink: 0;
}
.status-dot-online { background: var(--success); animation: status-pulse 2.4s ease-in-out infinite; }
.status-dot-offline { background: var(--danger); animation: status-pulse 1.2s ease-in-out infinite; }
@keyframes status-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.activity-box summary {
  cursor: pointer; font-size: 14px; font-weight: 800; list-style: none;
  display: flex; align-items: center; justify-content: space-between;
}
.activity-box summary::-webkit-details-marker { display: none; }
.activity-box summary::marker { content: ''; }
.activity-box summary svg { transition: transform 0.15s ease; }
.activity-box[open] summary svg { transform: rotate(90deg); }

.avatar {
  display: inline-flex; align-items: center; justify-content: center; border-radius: 9999px;
  color: #fff; font-weight: 800; flex-shrink: 0;
}

.tabs { display: flex; border-bottom: 1px solid var(--surface-border); margin-bottom: 20px; }
.tabs a {
  flex: 1; text-align: center; padding-bottom: 12px; font-size: 14px; font-weight: 600;
  color: var(--ink-muted); border-bottom: 2px solid transparent; margin-bottom: -1px;
  position: relative;
}
.tabs a.active { color: var(--teal-700); border-color: var(--coral-500); }
.tabs a.active::after {
  content: ''; position: absolute; left: 8px; right: 8px; bottom: -2px; height: 2px;
  border-radius: 2px; box-shadow: 0 0 6px 1px rgba(255, 122, 89, 0.55); pointer-events: none;
}
@media (max-width: 639px) {
  .tabs { flex-wrap: wrap; row-gap: 8px; }
  .tabs a { flex: 0 1 auto; padding: 0 4px 10px; }
}

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.cal-grid-kw { grid-template-columns: 44px repeat(7, 1fr); }
.cal-weekday { font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; color: var(--ink-muted); padding: 4px 0 8px; }
.cal-weekday.weekend { color: var(--coral-500); }
.cal-day {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 56px; border-radius: 16px; color: var(--ink);
  transition: background-color 150ms ease, color 150ms ease;
}
.cal-day:hover { background: var(--surface-muted); }
.cal-day:active { transform: scale(0.9); transition: transform 90ms cubic-bezier(.32, .72, 0, 1); }
.cal-day-num {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 56px; border-radius: 16px;
  font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: inherit;
  font-variant-numeric: tabular-nums;
}
.cal-day-num.today { box-shadow: inset 0 0 0 2px var(--coral-500); font-weight: 800; }
.cal-day-num.selected { background: var(--coral-500); color: var(--on-coral); font-weight: 800; }
.cal-day-num.outside { color: rgba(107, 114, 128, 0.4); font-weight: 500; }
.cal-dots { position: absolute; bottom: 7px; left: 0; right: 0; display: flex; justify-content: center; gap: 3px; pointer-events: none; }
.cal-dots span { width: 4px; height: 4px; border-radius: 9999px; }
.cal-day-num.selected + .cal-dots span { background: rgba(255, 255, 255, 0.85) !important; }
.cal-kw-cell {
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--ink-muted); font-weight: 700;
}
.cal-kw-num { min-height: 56px; }
.cal-kw-badge {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 56px;
  border-radius: 16px;
  background: var(--teal-50); color: var(--teal-700);
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
}
html[data-theme="dark"] .cal-day:hover { background: var(--surface-sunken); }
html[data-theme="dark"] .cal-kw-badge { background: rgba(74, 148, 168, 0.18); color: var(--teal-300); }
.cal-routebtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.cal-routebtns .btn { width: 100%; min-height: 46px; }
.cal-appt-actions { display: flex; gap: 8px; flex-shrink: 0; }
.cal-appt-action { width: 38px; height: 38px; flex: none; }

@media (max-width: 760px) {
  .cal-grid-kw { grid-template-columns: 28px repeat(7, 1fr); gap: 4px; }
  .cal-day, .cal-day-num { min-height: 48px; }
  .cal-day-num { font-size: 15px; border-radius: 13px; }
  .cal-day { border-radius: 13px; }
  .cal-kw-num, .cal-kw-badge { min-height: 48px; }
  .cal-kw-badge { font-size: 11px; border-radius: 13px; }
  .cal-weekday { font-size: 11px; }
  .cal-routebtns { grid-template-columns: 1fr; }
  .cal-appt-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .cal-appt-action { width: 100%; height: 44px; border-radius: 12px; }
}

@media (max-width: 380px) {
  .cal-grid-kw { grid-template-columns: 24px repeat(7, 1fr); gap: 3px; }
  .cal-day, .cal-day-num { min-height: 44px; }
  .cal-day-num { font-size: 13.5px; }
  .cal-kw-num, .cal-kw-badge { min-height: 44px; }
  .cal-kw-badge { font-size: 10px; border-radius: 11px; }
  .cal-appt-actions { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 926px) and (max-height: 500px) {
  .cal-day, .cal-day-num, .cal-kw-num, .cal-kw-badge { min-height: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .cal-day, .cal-day-num { transition-duration: 1ms; }
  .cal-day:active { transform: none; }
}
.cal-month-select { background: #fff; color: var(--ink); }
html[data-theme="dark"] .cal-month-select { background: var(--surface); color: var(--ink); border-color: var(--surface-border); }

.empty-state { text-align: center; padding: 56px 20px; }
.empty-state .icon-circle {
  width: 56px; height: 56px; border-radius: 9999px; background: var(--coral-50);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
  color: var(--coral-ink); font-size: 22px;
}
.empty-state .title { font-size: 14px; font-weight: 800; }
.empty-state .desc { font-size: 13px; color: var(--ink-muted); margin-top: 4px; max-width: 280px; margin-left: auto; margin-right: auto; }

#kundoo-toast-stack {
  position: fixed; z-index: 55; display: flex; flex-direction: column; gap: 10px;
  pointer-events: none; width: calc(100% - 32px); max-width: 380px;
  top: calc(20px + env(safe-area-inset-top)); right: 16px; left: auto;
}
@media (max-width: 1023px) {
  #kundoo-toast-stack {
    top: auto; right: 16px; left: 16px; width: auto;
    bottom: calc(128px + env(safe-area-inset-bottom));
  }
}
.flash {
  border-radius: var(--radius-card); padding: 12px 16px; font-size: 13px; font-weight: 600;
  margin-bottom: 16px;
}
.flash-success { background: #E3F8ED; color: #1D8A52; }
.flash-error { background: #FDEAEA; color: #C93A50; }
#kundoo-toast-stack .flash {
  pointer-events: auto; margin-bottom: 0; display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; box-shadow: var(--shadow-glass); position: relative; overflow: hidden;
  color: #fff; animation: toast-in .25s cubic-bezier(.16,1,.3,1);
}
#kundoo-toast-stack .flash.toast-leaving { animation: toast-out .2s ease forwards; }
#kundoo-toast-stack .flash-success { background: linear-gradient(135deg, #2FBF71 0%, #1C7A4C 100%); }
#kundoo-toast-stack .flash-error { background: linear-gradient(135deg, #F0616F 0%, #B23148 100%); }
.toast-icon {
  width: 30px; height: 30px; border-radius: 9999px; background: rgba(255,255,255,0.22);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff;
}
.toast-body { flex: 1; font-size: 13.5px; font-weight: 500; line-height: 1.4; padding-top: 4px; }
.toast-close {
  background: none; border: none; padding: 4px; margin: -4px -4px -4px 0; cursor: pointer;
  color: rgba(255,255,255,0.85); flex-shrink: 0; display: flex;
}
.toast-close:hover { color: #fff; }
.toast-bar {
  position: absolute; left: 0; bottom: 0; height: 3px; background: rgba(255,255,255,0.55);
  animation: toast-countdown 3s linear forwards;
}
@keyframes toast-countdown { from { width: 100%; } to { width: 0%; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: scale(.96); } }
@media (prefers-reduced-motion: reduce) {
  #kundoo-toast-stack .flash, #kundoo-toast-stack .flash.toast-leaving { animation: none; }
  .toast-bar { animation-duration: 3s; }
}

.inactivity-banner {
  display: none; position: fixed; top: calc(32px + env(safe-area-inset-top)); right: 100px; z-index: 55;
  height: 44px; align-items: center; gap: 8px; padding: 0 14px 0 12px;
  border-radius: 9999px; background: linear-gradient(135deg, #F0997B 0%, #D85A30 55%, #993C1D 100%);
  color: #fff; box-shadow: var(--shadow-glass); white-space: nowrap;
}
@media (min-width: 1024px) {
  .inactivity-banner.is-visible { display: flex; }
}
.inactivity-banner-icon { display: flex; flex-shrink: 0; }
.inactivity-banner-text { font-size: 12.5px; font-weight: 800; }
.inactivity-banner-countdown { font-weight: 900; }
.inactivity-banner-stay {
  background: rgba(255,255,255,0.94); color: #993C1D; border: none; border-radius: 9999px;
  padding: 6px 12px; font-size: 12px; font-weight: 800; cursor: pointer; flex-shrink: 0;
}
.inactivity-banner-stay:hover { background: #fff; }

.milestone-overlay { z-index: 70; }
.milestone-confetti-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.milestone-confetti-piece {
  position: absolute; top: -20px;
  animation-name: confettiFall; animation-timing-function: linear; animation-fill-mode: forwards;
  will-change: transform, opacity;
}
@keyframes confettiFall {
  0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
  8% { opacity: 1; }
  100% { transform: translateY(100vh) translateX(var(--drift, 0px)) rotate(var(--spin, 360deg)); opacity: 0; }
}
.milestone-modal { position: relative; z-index: 1; text-align: center; }
.milestone-modal h3, .milestone-modal p { text-align: center; }
.milestone-modal-close {
  position: absolute; top: 10px; right: 10px; background: none; border: none; cursor: pointer;
  color: var(--ink-muted); padding: 6px; border-radius: 9999px; display: flex;
}
.milestone-modal-close:hover { background: var(--surface-muted); color: var(--ink); }
.milestone-modal-emoji { display: block; font-size: 40px; margin: 6px 0 14px; }
@media (prefers-reduced-motion: reduce) {
  .milestone-confetti-piece { display: none; }
}

@media (min-width: 1024px) and (max-height: 900px) {
  .sidebar-logo { padding: 18px 24px 12px; }
  .sidebar-nav { gap: 3px; }
  .sidebar-nav-group { gap: 3px; }
  .sidebar-nav-group + .sidebar-nav-group { margin-top: 10px; }
  .sidebar-nav-group-title { padding: 0 16px 3px; font-size: 10px; }
  .sidebar-link { padding: 9px 16px; font-size: 13.5px; }
  .sidebar-footer { padding: 12px 16px; }
}

.legal-page { max-width: 640px; }
@media (min-width: 1024px) { .legal-page { max-width: none; } }

.account-page { max-width: 480px; }
.account-panes { max-width: 720px; }
.account-pane { display: none; }
.account-pane.is-active { display: block; }

.account-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 20px; flex-wrap: wrap; }
.account-head-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.account-head-title { font-size: 20px; font-weight: 900; letter-spacing: -0.02em; margin: 0; }
.account-head-sub { margin: 3px 0 0; font-size: 13px; color: var(--ink-muted); }
.account-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.account-pill {
  display: inline-flex; align-items: center; height: 36px; padding: 0 15px;
  border-radius: 999px; border: 1px solid var(--surface-border); background: var(--surface);
  font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap;
}
.account-pill:hover { background: var(--surface-muted); }
.account-pill-primary { background: var(--coral-500); border-color: transparent; color: var(--on-coral); }
.account-pill-primary:hover { background: var(--coral-700); color: #fff; }

.account-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 26px; }
.account-card { padding: 20px; border-radius: var(--radius-card); background: var(--surface); border: 1px solid var(--surface-border); }
.account-card-sub { background: var(--gradient-brand); border-color: transparent; color: #fff; }
.account-card-head { display: flex; align-items: center; gap: 10px; }
.account-card-head-split { justify-content: space-between; }
.account-card-icon { width: 34px; height: 34px; border-radius: 11px; background: rgba(255, 255, 255, 0.16); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.account-card-label { font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.8); }
.account-card .account-card-label { color: var(--ink-muted); }
.account-card-sub .account-card-label { color: rgba(255, 255, 255, 0.8); }
.account-card-value { margin: 14px 0 0; font-size: 21px; font-weight: 900; letter-spacing: -0.02em; }
.account-card-value-dark { color: var(--ink); }
.account-card-note { margin: 4px 0 0; font-size: 13px; color: rgba(255, 255, 255, 0.78); }
.account-card-note-dark { color: var(--ink-muted); }
.account-card-percent { font-size: 13px; font-weight: 800; color: var(--coral-ink); }
.account-card-track { margin-top: 16px; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.22); overflow: hidden; }
.account-card-track-light { background: var(--surface-muted); }
.account-card-fill { height: 100%; border-radius: 99px; background: var(--coral-500); }
.account-card-fill-coral { background: var(--coral-500); }

.account-settings-heading { margin-top: 0; }
.account-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 20px; }
.account-tile {
  display: flex; flex-direction: column; gap: 9px;
  padding: 16px 18px; border-radius: var(--radius-card);
  background: var(--surface); border: 1px solid var(--surface-border); color: var(--ink);
}
.account-tile:hover { border-color: var(--teal-300); }
.account-tile-icon { width: 38px; height: 38px; border-radius: 12px; background: var(--teal-50); color: var(--teal-700); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.account-tile-title { font-size: 15px; font-weight: 700; }
.account-tile-desc { font-size: 13px; line-height: 1.45; color: var(--ink-muted); }
.account-tile-chevron { display: none; color: var(--ink-muted); }

.account-danger-band {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 20px; border-radius: var(--radius-card);
  border: 1px solid var(--danger); background: var(--coral-50); color: var(--danger-ink);
  font-size: 13px; line-height: 1.5;
}
.account-danger-button {
  flex: none; display: inline-flex; align-items: center; height: 38px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--danger); background: var(--surface);
  font-size: 13px; font-weight: 700; color: var(--danger-ink); white-space: nowrap;
}

@media (min-width: 1024px) {
  .account-page { max-width: 1180px; }
}
@media (max-width: 639px) {
  .account-head-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .account-pill { justify-content: center; height: 44px; }
  .account-tiles { grid-template-columns: 1fr; }
  .account-tile { flex-direction: row; align-items: center; gap: 14px; min-height: 64px; }
  .account-tile-title { flex: 1; }
  .account-tile-desc { display: none; }
  .account-tile-chevron { display: block; flex: none; }
  .account-danger-band { flex-direction: column; align-items: flex-start; gap: 12px; }
}
html[data-theme="dark"] .account-tile-icon { background: rgba(74, 148, 168, 0.18); color: var(--teal-300); }
html[data-theme="dark"] .account-card-fill, html[data-theme="dark"] .account-card-fill-coral { background: var(--coral-300); }
html[data-theme="dark"] .account-danger-band { background: rgba(255, 122, 89, 0.14); }

.dash-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: stretch; }
.dash-hero-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  padding: clamp(20px, 2.4vw, 28px); border-radius: var(--radius-card);
  background: linear-gradient(158deg, #2F7D8F, #225468 52%, #7A4F47); color: #fff;
  box-shadow: 0 18px 44px rgba(12, 40, 49, 0.28),
              inset 0 1px 0 rgba(255, 255, 255, 0.22),
              inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.kd-aurora-hero-1 { inset: -40%; background: radial-gradient(closest-side, rgba(143, 212, 206, 0.24), transparent 70%); }
.kd-aurora-hero-2 { inset: -40%; background: radial-gradient(closest-side, rgba(255, 122, 89, 0.30), transparent 70%); }
.kd-guilloche {
  position: absolute; right: -30%; top: -38%; width: 74%; aspect-ratio: 1; border-radius: 50%;
  border: 1px solid rgba(255, 168, 140, 0.16); pointer-events: none;
  box-shadow: 0 0 0 34px rgba(255, 150, 120, 0.055),
              0 0 0 70px rgba(255, 255, 255, 0.035),
              0 0 0 108px rgba(255, 150, 120, 0.028),
              0 0 0 148px rgba(255, 255, 255, 0.018);
}
.dash-hero-top { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: clamp(14px, 2.2vw, 22px); }
.dash-hero-ident { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.dash-hero-crest {
  position: relative; width: 36px; height: 36px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 13px; overflow: hidden;
  background: linear-gradient(155deg, #FFF3D2 0%, #F2CF80 26%, #C79A3C 58%, #F7E3AE 100%);
  box-shadow: 0 6px 16px rgba(160, 120, 40, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 -1px 0 rgba(110, 80, 20, 0.4);
}
.dash-hero-crest::before {
  content: ""; position: absolute; left: -10%; right: -10%; top: -46%; height: 78%; border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0)); pointer-events: none;
}
.dash-hero-crest svg { position: relative; filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.5)); }
.dash-hero-who { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.dash-hero-name { font-size: 14px; font-weight: 700; color: #fff; overflow-wrap: anywhere; }
.dash-hero-org { font-size: 11.5px; color: rgba(255, 255, 255, 0.72); overflow-wrap: anywhere; }
.dash-hero-chip {
  display: inline-flex; align-items: center; min-height: 24px; padding: 3px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
}
.dash-hero-compare { position: relative; margin-top: 6px; min-height: 18px; }
.dash-hero-compare .compare-badge { color: #FFC9BE !important; margin-top: 0 !important; }
.dash-hero-compare .compare-badge-label { color: rgba(255, 255, 255, 0.7) !important; }
.dash-hero-value { position: relative; margin: 0; font-size: clamp(32px, 4.4vw, 46px); font-weight: 900; letter-spacing: -0.04em; line-height: 1.05; overflow-wrap: anywhere; text-shadow: 0 2px 20px rgba(255, 176, 154, 0.32); }
.dash-hero-goal { position: relative; margin-top: clamp(16px, 2.2vw, 24px); }
.dash-hero-goal-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 13px; color: rgba(255, 255, 255, 0.8); }
.dash-hero-goal-pct { font-weight: 800; color: #fff; }
.dash-hero-track { margin-top: 8px; height: 9px; border-radius: 99px; background: rgba(255, 255, 255, 0.18); overflow: hidden; }
.dash-hero-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #FFB09A, #FF7A59); }
.dash-hero-period {
  position: relative; margin-top: auto; padding-top: 18px;
  display: flex; gap: 3px; max-width: 360px;
}
.dash-hero-period::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; max-width: 360px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.14); height: 44px;
}
.dash-hero-period button {
  position: relative; flex: 1; min-width: 0; border: 0; background: transparent; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.78);
  height: 38px; margin: 3px; border-radius: 999px; white-space: nowrap;
}
.dash-hero-period button.is-active { background: #fff; color: var(--ink); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18); }
.dash-hero-period button:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }

.dash-side { display: grid; gap: 14px; align-content: start; }
.dash-mini-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.dash-mini { display: flex; flex-direction: column; gap: 10px; color: var(--ink); }
.dash-mini-value { font-size: 26px; font-weight: 900; letter-spacing: -0.03em; margin: 0; }
.dash-mini-note { font-size: 12px; font-weight: 400; color: var(--ink-muted); }
.dash-mini-note::before { content: " · "; }
.dash-quick-title { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #8497A0; margin: 0; }
.dash-quick-grid { margin-top: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dash-quick-item {
  display: flex; align-items: center; gap: 11px; min-height: 56px; padding: 10px 12px;
  border-radius: 14px; background: var(--surface-muted); border: 1px solid var(--surface-border); color: var(--ink);
}
.dash-quick-item:hover { border-color: var(--teal-300); }
.dash-quick-icon { flex: none; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.dash-quick-label { font-size: 14px; font-weight: 600; line-height: 1.25; }

.dash-chart-section { margin-bottom: 16px; }
.dash-chart-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.dash-chart-title { margin: 0; font-size: 17px; font-weight: 900; letter-spacing: -0.02em; }
.dash-chart-sub { margin: 3px 0 0; font-size: 13px; color: var(--ink-muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dash-chart-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.dash-ranges { display: flex; padding: 3px; border-radius: 999px; background: var(--surface-muted); }
.dash-ranges a {
  display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--ink-muted); white-space: nowrap;
}
.dash-ranges a:hover { color: var(--ink); }
.dash-ranges a.is-active { background: var(--coral-500); color: var(--on-coral); box-shadow: 0 6px 14px rgba(255, 122, 89, 0.28); }
.dash-compare {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--surface-border); background: var(--surface); color: var(--ink-muted);
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.dash-compare.is-active { border-color: var(--coral-300); background: var(--coral-50); color: var(--coral-ink); }

.dash-plot { margin-top: 18px; display: flex; gap: 12px; }
.dash-scale {
  display: flex; flex-direction: column; justify-content: space-between; height: 240px;
  padding: 2px 0 24px; font-size: 11px; color: var(--ink-muted); text-align: right; flex: none;
}
.dash-bars {
  position: relative; flex: 1; min-width: 0; height: 240px;
  display: flex; align-items: flex-end; gap: clamp(3px, 1vw, 12px);
  padding-bottom: 24px; border-bottom: 1px solid var(--surface-border);
}
.dash-bars.is-dense { gap: 2px; }
.dash-bar-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.dash-bar-row { width: 100%; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.dash-bar {
  display: block; width: 68%; max-width: 34px; border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #FF8A6B, #E85A3B);
  transform-origin: bottom center; animation: dashBarGrow 620ms cubic-bezier(.32, .72, 0, 1) both;
}
.dash-bars.is-dense .dash-bar { width: 78%; }
.dash-bar-row .dash-bar-prev ~ .dash-bar, .dash-bar-row .dash-bar + .dash-bar-prev { width: 46%; }
.dash-bar-prev { background: var(--teal-300); }
.dash-bar-label { position: absolute; bottom: 4px; font-size: 11px; color: var(--ink-muted); }
@keyframes dashBarGrow { from { transform: scaleY(0); opacity: .4; } to { transform: scaleY(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dash-bar { animation: none; } }

@media (min-width: 1011px) {
  .dash-hero { grid-template-columns: 1.55fr 1fr; }
}
@media (max-width: 760px) {
  .dash-hero-chip { letter-spacing: 0.06em; font-size: 11px; }
  .dash-quick-item { flex-direction: column; align-items: stretch; gap: 8px; }
  .dash-quick-label { overflow-wrap: anywhere; -webkit-hyphens: auto; hyphens: auto; }
  .dash-mini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-chart-actions { width: 100%; flex-direction: column; align-items: stretch; }
  .dash-ranges { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border-radius: 16px; padding: 4px; }
  .dash-ranges a { justify-content: center; height: 40px; border-radius: 12px; padding: 0 8px; }
  .dash-compare { justify-content: center; height: 42px; }
  .dash-scale { display: none; }
  .dash-bars { height: 180px; }
  .dash-bar-label { font-size: 10px; }
  .dash-chart-card { padding: 16px 14px; }
}
html[data-theme="dark"] .dash-quick-item { background: var(--surface-sunken); border-color: var(--surface-border); }
html[data-theme="dark"] .dash-ranges { background: var(--surface-sunken); }
html[data-theme="dark"] .dash-compare.is-active { background: rgba(255, 122, 89, 0.16); }

.kpi-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 32px; }

.kpi-period { display: flex; background: var(--surface-muted); border-radius: 10px; padding: 4px; gap: 3px; margin-top: 4px; }
.kpi-period button {
  flex: 1; min-width: 0; border: 0; background: transparent; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 600; color: var(--ink-muted);
  border-radius: 7px; padding: 0; height: 40px; line-height: 40px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kpi-period button:hover { color: var(--ink); }
.kpi-period button.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06); }
.kpi-tile-revenue .kpi-period { margin-top: auto; }
.kpi-period button:focus-visible { outline: 2px solid var(--teal-500); outline-offset: 1px; }
html[data-theme="dark"] .kpi-period { background: var(--surface-sunken); }
html[data-theme="dark"] .kpi-period button.is-active { background: var(--surface); }

@media (max-width: 639px) {
  .kpi-grid .kpi-tile-revenue { grid-column: 1 / -1; }
  .kpi-tile-revenue .kpi-tile-body { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
  .kpi-tile-revenue .kpi-progress { flex-basis: 100%; margin-top: 0; }
}
.tile-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }

@media (min-width: 640px) {
  .kpi-grid.kpi-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kpi-grid.kpi-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.revenue-page { max-width: 520px; }
.revenue-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.revenue-col-left, .revenue-col-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
@media (min-width: 1024px) {
  .revenue-page { max-width: none; }
  .revenue-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
  }
  .revenue-col-left, .revenue-col-right {
    gap: 20px;
  }
  .revenue-col-left { flex: 1.4; }
  .revenue-col-right { flex: 1; }
}

.stat-bar-row { padding-top: 14px; }
.stat-bar-track { height: 6px; border-radius: 99px; background: #EDF1F2; overflow: hidden; margin-top: 7px; }
.stat-bar-fill { height: 100%; border-radius: 99px; background: #3B8B99; }
html[data-theme="dark"] .stat-bar-track { background: #2A404E; }
.stat-bar-fill.is-warn { background: var(--warning); }
.stat-bar-fill.is-full { background: var(--danger); }

.profile-actions { display: flex; justify-content: center; gap: 24px; margin-top: 20px; flex-wrap: wrap; }
.profile-action { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.profile-action .circle {
  width: 52px; height: 52px; border-radius: 9999px;
  background: linear-gradient(155deg, var(--teal-50), #fff);
  border: 1px solid var(--teal-100);
  display: flex; align-items: center; justify-content: center; color: var(--teal-700);
  box-shadow: 0 3px 10px rgba(34, 84, 104, 0.14);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.profile-action:hover .circle, .profile-action:focus-visible .circle {
  transform: translateY(-2px); box-shadow: 0 6px 16px rgba(34, 84, 104, 0.22);
}
.profile-action.disabled .circle {
  background: var(--surface-muted); border-color: var(--surface-border);
  color: rgba(107,114,128,0.35); box-shadow: none;
}
.profile-action span.label { font-size: 12px; font-weight: 600; color: var(--ink-muted); }
html[data-theme="dark"] .profile-action .circle { background: linear-gradient(155deg, rgba(74,148,168,0.22), var(--surface)); border-color: var(--surface-border); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 12px; margin-bottom: 16px; }
.timeline .dot { margin-top: 6px; }

.sticky-cta {
  position: fixed; left: auto; right: 16px;
  bottom: calc(128px + env(safe-area-inset-bottom)); z-index: 20;
  width: auto;
}
.sticky-cta .btn {
  width: auto; border-radius: 9999px; padding: 0 24px;
}
@media (min-width: 1024px) {
  .sticky-cta { right: 40px; bottom: 32px; }
}

.action-fab-menu {
  position: absolute; bottom: calc(100% + 12px); right: 0;
  display: flex; flex-direction: column; gap: 8px; min-width: 216px;
}
.action-fab-menu[hidden] { display: none; }
.action-fab-item {
  display: flex; align-items: center; gap: 10px; white-space: nowrap;
  background: #fff; border: 1px solid var(--surface-border); border-radius: 9999px;
  padding: 11px 18px; font-size: 14px; font-weight: 600; color: var(--ink);
  box-shadow: var(--shadow-glass);
}
.action-fab-item:hover { border-color: var(--teal-500); }
.action-fab-item .avatar { flex-shrink: 0; }
.action-fab-toggle svg { transition: transform 0.15s ease; }
.action-fab-toggle[aria-expanded="true"] svg { transform: rotate(45deg); }
html[data-theme="dark"] .action-fab-item { background: var(--surface); border-color: var(--surface-border); color: var(--ink); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 9999px; background: #fff;
  border: 1px solid var(--surface-border); color: var(--ink-muted); flex-shrink: 0;
  cursor: pointer; font-family: inherit; padding: 0;
}
.icon-btn:hover { border-color: var(--teal-500); }

html[data-theme="dark"] {
  --pin-ring: #0B141A;
  --coral-ink: #FFAB94;
  --success-ink: #4FD98B;
  --warning-ink: #F5C56B;
  --danger-ink: #FF8A9B;
  --ink: #E7EEF1;
  --ink-muted: #93A2AC;
  --surface: #1E313D;
  --surface-muted: #0B141A;
  --surface-border: #324B59;
  --surface-sunken: #0F1A21;
  --surface-sunken-border: #3D5A6B;
  --teal-700: var(--teal-300);
}
html[data-theme="dark"] .card { background: rgba(30, 49, 61, 0.92); }
html[data-theme="dark"] .bottom-nav {
  background: var(--surface);
  border-color: var(--surface-border);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.44),
    0 2px 6px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
html[data-theme="dark"] .bottom-nav a,
html[data-theme="dark"] .bottom-nav .more-btn { color: var(--ink-muted); }
html[data-theme="dark"] .bottom-nav a.active,
html[data-theme="dark"] .bottom-nav .more-btn.active { color: var(--coral-ink); }
html[data-theme="dark"] .more-sheet-panel { background: var(--surface); }
html[data-theme="dark"] .more-sheet-panel a:hover,
html[data-theme="dark"] .more-sheet-panel button:hover { background: var(--surface-muted); }
html[data-theme="dark"] .field input[type=text], html[data-theme="dark"] .field input[type=email],
html[data-theme="dark"] .field input[type=password], html[data-theme="dark"] .field input[type=number],
html[data-theme="dark"] .field input[type=date], html[data-theme="dark"] .field input[type=datetime-local],
html[data-theme="dark"] .field input[type=tel], html[data-theme="dark"] .field input[type=file],
html[data-theme="dark"] .field select, html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .search-box input {
  background: var(--surface-sunken); color: var(--ink); border-color: var(--surface-sunken-border);
}
html[data-theme="dark"] .btn-outline, html[data-theme="dark"] .icon-btn {
  background: var(--surface); color: var(--ink); border-color: var(--surface-border);
}
html[data-theme="dark"] .btn-secondary { background: rgba(74, 148, 168, 0.18); color: var(--teal-300); }
html[data-theme="dark"] .chip { background: var(--surface); border-color: var(--surface-border); color: var(--ink-muted); }
html[data-theme="dark"] .chip.active { background: var(--coral-500); color: var(--on-coral); border-color: transparent; }
html[data-theme="dark"] .segmented { background: var(--surface-muted); border-color: var(--surface-border); }
html[data-theme="dark"] .segmented a.active { background: var(--surface); color: var(--ink); }
html[data-theme="dark"] .flash-success { background: rgba(47, 191, 113, 0.16); color: #4FD98B; }
html[data-theme="dark"] .flash-error { background: rgba(239, 74, 99, 0.16); color: #FF8A9B; }
html[data-theme="dark"] .empty-state .icon-circle { background: rgba(255, 122, 89, 0.14); color: var(--coral-300); }
html[data-theme="dark"] .article-suggestions, html[data-theme="dark"] .article-price-list, html[data-theme="dark"] .customer-picker-list, html[data-theme="dark"] .customer-suggestions { background: var(--surface); border-color: var(--surface-border); }
html[data-theme="dark"] .premium-field-trigger { background: var(--surface-sunken); border-color: var(--surface-sunken-border); color: var(--ink); }
html[data-theme="dark"] .premium-date-panel, html[data-theme="dark"] .premium-time-panel { background: var(--surface); border-color: var(--surface-border); }
html[data-theme="dark"] .premium-date-grid button:hover:not(:disabled) { background: rgba(74, 148, 168, 0.18); }
html[data-theme="dark"] .premium-time-columns { background: var(--surface-sunken); }
html[data-theme="dark"] .premium-time-highlight { background: rgba(74, 148, 168, 0.22); }
html[data-theme="dark"] .premium-time-col button.is-selected { color: var(--teal-300); }
html[data-theme="dark"] .premium-time-actions .time-cancel { background: var(--surface-sunken); border-color: var(--surface-sunken-border); color: var(--ink); }
html[data-theme="dark"] .cal-day-num.outside { color: rgba(147, 162, 172, 0.4); }
html[data-theme="dark"] .kundoo-modal { background: var(--surface); }
html[data-theme="dark"] .kundoo-modal-actions-grid a, html[data-theme="dark"] .kundoo-modal-actions-grid button { background: var(--surface-muted); border-color: var(--surface-border); }
html[data-theme="dark"] .kundoo-modal-actions-grid a:hover, html[data-theme="dark"] .kundoo-modal-actions-grid button:hover { background: rgba(74,148,168,0.18); }

html[data-style="glass"] .card {
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-color: rgba(255,255,255,0.6);
  box-shadow: var(--shadow-glass), inset 0 1px 0 rgba(255,255,255,0.7);
}
html[data-theme="dark"][data-style="glass"] .card {
  background: rgba(30,49,61,0.55);
  border-color: rgba(255,255,255,0.09);
  box-shadow: var(--shadow-glass), inset 0 1px 0 rgba(255,255,255,0.06);
}
html[data-style="glass"] .field input[type=text], html[data-style="glass"] .field input[type=email],
html[data-style="glass"] .field input[type=password], html[data-style="glass"] .field input[type=number],
html[data-style="glass"] .field input[type=date], html[data-style="glass"] .field input[type=datetime-local],
html[data-style="glass"] .field input[type=tel], html[data-style="glass"] .field select,
html[data-style="glass"] .field textarea, html[data-style="glass"] .search-box input {
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
html[data-theme="dark"][data-style="glass"] .field input[type=text], html[data-theme="dark"][data-style="glass"] .field input[type=email],
html[data-theme="dark"][data-style="glass"] .field input[type=password], html[data-theme="dark"][data-style="glass"] .field input[type=number],
html[data-theme="dark"][data-style="glass"] .field input[type=date], html[data-theme="dark"][data-style="glass"] .field input[type=datetime-local],
html[data-theme="dark"][data-style="glass"] .field input[type=tel], html[data-theme="dark"][data-style="glass"] .field select,
html[data-theme="dark"][data-style="glass"] .field textarea, html[data-theme="dark"][data-style="glass"] .search-box input {
  background: rgba(11,20,26,0.65);
  border-color: rgba(255,255,255,0.07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.ui-style-option {
  display: flex; align-items: center; gap: 14px; cursor: pointer; text-align: left;
  padding: 12px; border-radius: 14px; border: 1px solid transparent;
}
.ui-style-option + .ui-style-option { margin-top: 12px; }
.ui-style-option input[type=radio] { position: absolute; opacity: 0; width: 0; height: 0; }
.ui-style-option-swatch {
  position: relative; flex: none; width: 64px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, var(--teal-500), var(--coral-500));
  overflow: hidden;
}
.ui-style-option-swatch::after {
  content: ''; position: absolute; inset: 10px 6px; border-radius: 8px;
  background: rgba(255,255,255,0.92); border: 1px solid rgba(255,255,255,0.9);
}
.ui-style-option-swatch-glass::after {
  background: rgba(255,255,255,0.35);
  backdrop-filter: blur(6px) saturate(160%);
  -webkit-backdrop-filter: blur(6px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}
.ui-style-option-title { font-size: 14px; font-weight: 600; }
.ui-style-option-desc { display: block; font-size: 12px; color: var(--ink-muted); margin-top: 2px; }
.ui-style-option-active { border-color: var(--coral-500); box-shadow: 0 0 0 1px var(--coral-500); }
.ui-style-option input:focus-visible ~ .ui-style-option-swatch { outline: 2px solid var(--coral-300); outline-offset: 2px; }
.lang-page-flag { display: flex; align-items: center; justify-content: center; flex: none; width: 48px; }
.ui-style-option input:focus-visible ~ .lang-page-flag { outline: 2px solid var(--coral-300); outline-offset: 2px; border-radius: 9999px; }

.card.card-tint { background: var(--teal-50); }
html[data-theme="dark"] .card.card-tint { background: rgba(74, 148, 168, 0.20); }

body { -webkit-tap-highlight-color: transparent; }
.btn, .chip, a.card, button.card, .icon-btn, .fab, .bottom-nav a, .bottom-nav .more-btn, .sidebar-link {
  transition: transform 100ms ease-out, opacity 100ms ease-out, background-color 150ms ease, border-color 150ms ease, color 150ms ease;
  touch-action: manipulation;
}
.btn:active, .chip:active, a.card:active, button.card:active, .icon-btn:active, .fab:active,
.bottom-nav a:active, .bottom-nav .more-btn:active {
  transform: scale(0.97);
  opacity: 0.92;
}

body, .card, .sidebar, .bottom-nav, .more-sheet-panel,
.field input, .field select, .field textarea {
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}

details.activity-box > summary > svg { transition: transform 200ms ease; }
details.activity-box[open] > summary > svg { transform: rotate(90deg); }
.acc-panel { overflow: hidden; transition: max-height 260ms cubic-bezier(0.22,1,0.36,1); }

.theme-icon-dark, .theme-label-to-light { display: none; }
html[data-theme="dark"] .theme-icon-light, html[data-theme="dark"] .theme-label-to-dark { display: none; }
html[data-theme="dark"] .theme-icon-dark, html[data-theme="dark"] .theme-label-to-light { display: inline-flex; }

.lang-flag-btn {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.25); padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.12); font-size: 15px; line-height: 1;
}
.lang-flag-btn:hover { background: rgba(255,255,255,0.22); }
.lang-flag-en { display: none; }
html[lang="en"] .lang-flag-de { display: none; }
html[lang="en"] .lang-flag-en { display: inline; }

.lang-toggle-mobile { position: fixed; top: calc(16px + env(safe-area-inset-top)); right: 16px; z-index: 50; }
.lang-toggle-mobile .lang-flag-btn { background: var(--surface); border-color: var(--surface-border); box-shadow: var(--shadow-glass); }
@media (min-width: 1024px) {
  .lang-toggle-mobile { display: none; }
}

.lang-toggle-auth { position: fixed; top: calc(16px + env(safe-area-inset-top)); right: 16px; z-index: 50; }
.lang-toggle-auth .lang-flag-btn { background: rgba(255,255,255,0.9); border-color: rgba(255,255,255,0.6); box-shadow: var(--shadow-glass); }

.lang-toggle-account .lang-flag-btn { background: var(--surface-muted); border-color: var(--surface-border); }

.lang-switcher { position: relative; }
.lang-switcher-trigger { cursor: pointer; list-style: none; }
.lang-switcher-trigger::-webkit-details-marker { display: none; }
.lang-switcher-trigger::marker { content: ''; }
.lang-switcher-panel {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  min-width: 128px; max-width: calc(100vw - 24px);
  background: var(--surface); border: 1px solid var(--surface-border);
  border-radius: 14px; box-shadow: var(--shadow-glass); padding: 6px;
}
.lang-switcher-option {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border-radius: 9px; border: 0; background: transparent;
  font-family: inherit; font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
  text-transform: uppercase; text-align: left; color: var(--ink); cursor: pointer;
}
.lang-switcher-option:hover { background: var(--surface-muted); }
.lang-switcher-option .lang-switcher-flag { display: inline-flex; flex-shrink: 0; }
.lang-switcher-option .lang-switcher-name { flex: 1; }
.sidebar-footer .lang-switcher-option,
.sidebar-footer .lang-switcher-option:hover { color: var(--ink); }
.sidebar-footer .lang-switcher-option.active,
.sidebar-footer .lang-switcher-option.active:hover { color: var(--teal-700); }
html[data-theme="dark"] .sidebar-footer .lang-switcher-option.active,
html[data-theme="dark"] .sidebar-footer .lang-switcher-option.active:hover { color: var(--teal-300); }
.lang-switcher-option .lang-switcher-check { display: none; color: var(--teal-500); flex-shrink: 0; }
.lang-switcher-option.active { background: var(--teal-50); color: var(--teal-700); }
.lang-switcher-option.active .lang-switcher-check { display: inline-flex; }
html[data-theme="dark"] .lang-switcher-option.active {
  background: rgba(74, 148, 168, 0.18); color: var(--teal-300);
}
.lang-toggle-auth .lang-switcher-trigger { background: none; border: none; box-shadow: none; }
.lang-toggle-mobile .lang-switcher-trigger { background: var(--surface); border-color: var(--surface-border); box-shadow: var(--shadow-glass); }
.footer-actions .lang-switcher-trigger {
  background: none; border: none; color: var(--teal-100); cursor: pointer;
  padding: 4px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; line-height: 1;
}
.footer-actions .lang-switcher-trigger:hover { color: #fff; }
.footer-actions .lang-switcher-panel { top: auto; bottom: calc(100% + 8px); right: 0; }
.footer-actions .lang-switcher-panel::after {
  content: ''; position: absolute; bottom: -5px; right: 10px;
  width: 10px; height: 10px; background: var(--surface);
  border-right: 1px solid var(--surface-border); border-bottom: 1px solid var(--surface-border);
  transform: rotate(45deg); border-radius: 0 0 3px 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

.coin-rain { position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden; }
.coin-rain-particle {
  position: absolute;
  animation-name: coinCannonArc; animation-fill-mode: forwards;
  will-change: transform, opacity;
}
.coin-rain-coin {
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff6d5 0%, #ffe07a 28%, #f6c331 55%, #d69a12 80%, #a97908 100%);
  box-shadow: inset 0 0 0 1px rgba(120, 84, 6, 0.55), inset 0 -2px 3px rgba(120, 84, 6, 0.3), 0 2px 4px rgba(0,0,0,0.22);
}
.coin-rain-coin::after {
  content: '€';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 55%; font-weight: 900; color: rgba(120, 84, 6, 0.55);
}
.coin-rain-bill {
  border-radius: 3px;
  background: linear-gradient(135deg, #eafff1 0%, #7ee39a 22%, #2fa85c 55%, #1c7b41 80%, #125c2f 100%);
  box-shadow: inset 0 0 0 1px rgba(15, 79, 36, 0.55), 0 2px 4px rgba(0,0,0,0.22);
}
.coin-rain-bill::after {
  content: '€';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 50%; font-weight: 900; color: rgba(255,255,255,0.75);
}
@keyframes coinCannonArc {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0; animation-timing-function: ease-out; }
  8% { opacity: 1; }
  38% {
    transform: translate(var(--dx1), var(--dy1)) rotate(var(--rot1));
    opacity: 1;
    animation-timing-function: ease-in;
  }
  100% {
    transform: translate(calc(var(--dx1) + var(--dx2)), calc(var(--dy1) + var(--dy2))) rotate(var(--rot2));
    opacity: 0;
  }
}

.kundoo-checkbox { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.kundoo-checkbox input { position: absolute; opacity: 0; width: 0; height: 0; }
.kundoo-checkbox-mark {
  position: relative; flex-shrink: 0; width: 21px; height: 21px;
  background: var(--surface); border: 2px solid var(--surface-border);
  border-radius: 6px; transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.kundoo-checkbox-mark::after {
  content: ''; position: absolute; display: none;
  left: 6px; top: 2px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.kundoo-checkbox:hover .kundoo-checkbox-mark { border-color: var(--coral-300); }
.kundoo-checkbox input:checked ~ .kundoo-checkbox-mark {
  background: var(--coral-500); border-color: var(--coral-500);
  box-shadow: 0 3px 7px rgba(255, 122, 89, 0.32);
}
.kundoo-checkbox input:checked ~ .kundoo-checkbox-mark::after { display: block; }
.kundoo-checkbox input:focus-visible ~ .kundoo-checkbox-mark { outline: 2px solid var(--coral-300); outline-offset: 2px; }
html[data-theme="dark"] .kundoo-checkbox-mark { background: var(--surface); border-color: var(--surface-border); }

.kundoo-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.kundoo-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.kundoo-switch-slider {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--surface-border); border-radius: 34px;
  transition: background 0.25s ease;
}
.kundoo-switch-slider::before {
  content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px;
  background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: transform 0.25s ease;
}
.kundoo-switch input:checked ~ .kundoo-switch-slider {
  background: linear-gradient(135deg, var(--coral-500), var(--coral-700));
}
.kundoo-switch input:checked ~ .kundoo-switch-slider::before { transform: translateX(20px); }
.kundoo-switch input:focus-visible ~ .kundoo-switch-slider { outline: 2px solid var(--coral-300); outline-offset: 2px; }

.help-item { transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.help-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  cursor: pointer; list-style: none; font-size: 14px; font-weight: 600;
  color: var(--ink); transition: color 0.2s ease;
}
.help-item summary::-webkit-details-marker { display: none; }
.help-item summary svg { color: var(--teal-500); transition: transform 0.25s ease, color 0.25s ease; flex-shrink: 0; }
.help-item:hover summary { color: var(--coral-ink); }
.help-item:hover summary svg { color: var(--coral-500); }
.help-item[open] { border-color: var(--coral-300); box-shadow: 0 4px 16px rgba(255, 122, 89, 0.1); }
.help-item[open] summary { color: var(--coral-ink); }
.help-item[open] summary svg { transform: rotate(90deg); color: var(--coral-500); }
html[data-theme="dark"] .help-item[open] { box-shadow: 0 4px 16px rgba(255, 122, 89, 0.18); }

.kpi-progress { margin-top: 14px; }
.kpi-progress-track {
  position: relative; height: 7px; border-radius: 99px;
  background: #EAEFF1; overflow: hidden;
}
html[data-theme="dark"] .kpi-progress-track { background: #2A404E; }
.kpi-progress-fill {
  position: absolute; inset: 0 auto 0 0; height: 100%; border-radius: 99px;
  width: var(--kpi-progress-target, 0%);
  background: linear-gradient(90deg, #FFB09A, #F0602F);
  animation: kpiProgressFill 1s cubic-bezier(0.4, 0, 0.2, 1) both;
}
.kpi-progress-label { margin-top: 8px; font-size: 13px; color: var(--ink-muted); }
@keyframes kpiProgressFill {
  from { width: 0%; }
  to { width: var(--kpi-progress-target, 0%); }
}
@media (prefers-reduced-motion: reduce) {
  .kpi-progress-fill { animation: none; width: var(--kpi-progress-target, 0%); }
}

.ov-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.ov-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.ov-tile {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--surface-muted, #F3F5F7); border-radius: var(--radius-card, 12px);
  text-decoration: none; color: inherit;
}
.ov-tile-num { display: block; font-size: 16px; font-weight: 900; line-height: 1.2; }
.ov-tile-label { font-size: 12px; color: var(--ink-muted); }
.ov-tile-danger { background: #FDEAEA; }
.ov-tile-danger .ov-tile-num, .ov-tile-danger .ov-tile-label { color: #C93A50; }
.ov-tile-warning { background: #FDF3E2; }
.ov-tile-warning .ov-tile-num, .ov-tile-warning .ov-tile-label { color: #96650B; }
.ov-row { display: flex; justify-content: space-between; padding: 5px 0; }
html[data-theme="dark"] .ov-tile { background: rgba(255,255,255,0.05); }
html[data-theme="dark"] .ov-tile-danger { background: rgba(239, 74, 99, 0.16); }
html[data-theme="dark"] .ov-tile-danger .ov-tile-num, html[data-theme="dark"] .ov-tile-danger .ov-tile-label { color: #FF8A9B; }
html[data-theme="dark"] .ov-tile-warning { background: rgba(234, 160, 39, 0.16); }
html[data-theme="dark"] .ov-tile-warning .ov-tile-num, html[data-theme="dark"] .ov-tile-warning .ov-tile-label { color: #F0B860; }

.pager {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin: 22px 0 4px; flex-wrap: wrap;
}
.pager-step {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border-radius: 12px; border: 1px solid var(--surface-border); background: var(--surface);
  font-size: 14px; font-weight: 800; color: var(--teal-700); text-decoration: none;
}
.pager-step:hover { background: var(--teal-50); }
.pager-step.is-off { color: var(--ink-muted); opacity: .5; }
.pager-info { font-size: 13px; color: var(--ink-muted); }

.map-filterbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 9px; margin-bottom: 12px; border-radius: 16px;
}
.map-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px;
  border-radius: 999px; border: 1px solid transparent; background: var(--surface-muted);
  color: var(--ink); font-family: inherit; font-size: 12.5px; font-weight: 600;
  white-space: nowrap; cursor: pointer;
}
.map-chip:hover { border-color: var(--teal-300); }
.map-chip.is-active { background: var(--teal-700); color: #fff; }
.map-chip-count { opacity: 0.65; font-weight: 500; }
.map-chip.is-active .map-chip-count { opacity: 0.8; }
.map-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.map-fsep { width: 1px; align-self: stretch; margin: 0 4px; background: var(--surface-border); }
.map-flab { font-size: 12.5px; color: var(--ink-muted); }
.map-flab-lead { font-weight: 700; color: var(--ink); margin-right: 2px; }
.map-panel-title { margin: 0 0 4px; padding: 0 4px; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }
.map-fnum, .map-fsel {
  min-height: 36px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--surface-border);
  background: var(--surface); color: var(--ink); font-family: inherit; font-size: 12.5px;
}
.map-fnum { width: 58px; text-align: center; }

.map-mobilebar { display: none; gap: 6px; margin-bottom: 10px; overflow-x: auto; scrollbar-width: none; }
.map-mobilebar::-webkit-scrollbar { display: none; }
.map-mobilebar .map-chip { flex: none; min-height: 38px; }
.map-filter-btn { background: var(--teal-700); color: #fff; }
.map-filter-btn[aria-expanded="true"] { background: var(--coral-ink); }
.map-filterpanel { display: none; flex-direction: column; gap: 6px; padding: 8px; margin-bottom: 10px; border-radius: 14px; }
.map-panelrow {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0 14px;
  border-radius: 999px; border: 1px solid transparent; background: var(--surface-muted);
  color: var(--ink); font-family: inherit; font-size: 13.5px; font-weight: 600;
  text-align: left; cursor: pointer;
}
.map-panelrow.is-active { background: var(--teal-700); color: #fff; }
.map-panelrow .map-chip-count { margin-left: auto; }
html[data-theme="dark"] .map-row-appt { color: var(--teal-300); }
html[data-theme="dark"] .map-pop-band { background: rgba(74, 148, 168, 0.18); color: var(--teal-300); }
.map-panelfree { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--surface-border); }
.map-panelfree .map-fsel { flex: 1; }
.map-panelfree .map-fnum, .map-panelfree .map-fsel { min-height: 44px; font-size: 14px; }
.map-apply-btn {
  flex: none; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px;
  background: linear-gradient(180deg, #FF8F72, #F0602F); color: #fff;
  font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}

.map-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.map-col { min-width: 0; }
.map-wrap { position: relative; min-width: 0; }
#map { height: 62svh; min-height: 380px; border-radius: 16px; overflow: hidden; border: 1px solid var(--surface-border); }
.map-locate {
  position: absolute; right: 12px; bottom: 12px; z-index: 400;
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--surface-border); background: var(--surface);
  color: var(--ink); font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  box-shadow: 0 6px 18px rgba(12, 40, 49, 0.2);
}
.map-me-hit { background: none; border: 0; }
.map-me {
  display: block; width: 16px; height: 16px; border-radius: 50%; background: #1B7FF0;
  border: 3px solid #fff; box-shadow: 0 2px 8px rgba(12, 40, 49, 0.4);
}
.map-pop-me { margin: 0; font-size: 12.5px; font-weight: 700; }
.map-counter {
  position: absolute; left: 12px; bottom: 12px; z-index: 400;
  max-width: calc(100% - 24px); padding: 8px 12px; border-radius: 12px;
  border: 1px solid var(--surface-border); background: var(--surface); color: var(--ink);
  box-shadow: 0 4px 14px rgba(12, 40, 49, 0.16); font-size: 12px; font-weight: 500;
}

.map-list { display: flex; flex-direction: column; min-width: 0; overflow: hidden; padding: 0; }
.map-list-head { padding: 12px 14px 10px; border-bottom: 1px solid var(--surface-border); }
.map-list-titlerow { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.map-list-title { font-size: 14.5px; font-weight: 800; }
.map-list-count { font-size: 12px; }
.map-sortrow { margin-top: 10px; display: flex; gap: 4px; padding: 3px; border-radius: 999px; background: var(--surface-muted); }
.map-sort {
  flex: 1; min-height: 32px; border: 0; border-radius: 999px; background: none;
  color: var(--ink-muted); font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
}
.map-sort.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 2px 6px rgba(12, 40, 49, 0.1); }
.map-list-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 6px; }
.map-row {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px;
  border: 0; border-radius: 12px; background: none; color: var(--ink);
  font-family: inherit; text-align: left; cursor: pointer;
}
.map-row:hover { background: var(--surface-muted); }
.map-row-text { flex: 1; min-width: 0; line-height: 1.3; }
.map-row-name { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-row-sub { display: block; font-size: 11.5px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-row-right { flex: none; text-align: right; line-height: 1.3; font-variant-numeric: tabular-nums; }
.map-row-eur { display: block; font-size: 12.5px; font-weight: 700; }
.map-row-km { display: block; font-size: 11px; color: var(--ink-muted); }

.map-legend { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 10px; font-size: 12px; }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }

.map-pin-hit { position: relative; background: none; border: 0; display: flex; align-items: center; justify-content: center; }
.map-appt {
  position: absolute; top: 3px; right: 7px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--teal-500); border: 2px solid #fff; box-shadow: 0 1px 3px rgba(12, 40, 49, 0.4);
}
.map-appt-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--teal-500); }
.map-pop-band {
  display: flex; align-items: center; gap: 7px; margin: 0 0 9px; padding: 7px 10px;
  border-radius: 10px; background: var(--teal-50);
  font-size: 11.5px; font-weight: 700; color: var(--teal-700);
}
.map-pop-band svg { flex: none; }
.map-pop-band-text { flex: 1; min-width: 0; }
.map-pop-band-rel { flex: none; font-weight: 600; opacity: 0.75; }
.map-row-appt { display: block; font-size: 11px; font-weight: 600; color: var(--teal-700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-pin {
  display: block; width: 22px; height: 22px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg);
  border: 2px solid rgba(255, 255, 255, 0.9); box-shadow: 0 2px 5px rgba(12, 40, 49, 0.4);
}
.map-pop-due { display: flex; align-items: center; gap: 6px; margin: 0 0 3px; font-size: 11.5px; font-weight: 700; }
.map-pop-rev { margin: 0 0 8px; font-size: 11.5px; color: var(--ink-muted); }

@media (min-width: 1181px) and (pointer: fine) and (hover: hover) {
  .map-split { grid-template-columns: minmax(0, 1fr) 356px; }
  .map-list { max-height: calc(62svh + 2px); }
}

@media (min-width: 1024px) and (pointer: coarse) {
  #map { height: 58svh; }
  .map-list { max-height: 46svh; }
}

@media (max-width: 760px) {
  .map-filterbar { display: none; }
  .map-mobilebar { display: flex; }
  .map-filterpanel:not([hidden]) { display: flex; }
  #map { height: calc(100svh - 330px); min-height: 300px; }
  .map-counter { left: 10px; right: 10px; max-width: none; font-size: 11.5px; }
  .map-locate { right: 10px; bottom: 58px; min-height: 44px; }
  .map-legend { gap: 7px 12px; font-size: 11.5px; }
  .map-legend > span { flex: 0 0 calc(50% - 6px); }
  .map-list { max-height: 60svh; }
}

html[data-theme="dark"] .map-counter, html[data-theme="dark"] .map-locate { background: var(--surface); border-color: var(--surface-border); }
html[data-theme="dark"] .map-row:hover { background: var(--surface-sunken); }

.kd-seg {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  height: 52px; padding: 5px; margin-bottom: 16px;
  border-radius: 16px; background: #EAEFF1; border: 1px solid var(--surface-border);
}
.kd-seg-thumb {
  position: absolute; top: 5px; left: 5px; z-index: 0;
  width: calc(50% - 5px); height: calc(100% - 10px);
  border-radius: 12px; background: #fff; box-shadow: 0 2px 8px rgba(12, 40, 49, 0.12);
}
.kd-seg[data-state="done"] .kd-seg-thumb { transform: translate3d(100%, 0, 0); }
.kd-seg a {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px; font-size: 14.5px; font-weight: 600;
  letter-spacing: -0.004em; color: #7B929C;
}
.kd-seg a.active { color: var(--ink); font-weight: 700; }
html[data-theme="dark"] .kd-seg { background: #16242D; }
html[data-theme="dark"] .kd-seg-thumb { background: #2A404E; }

.todo-newcard {
  position: relative; margin-bottom: 20px; padding: clamp(14px, 1.8vw, 20px);
  border-radius: 20px; background: #fff; border: 1px solid var(--surface-border);
}
html[data-theme="dark"] .todo-newcard { background: var(--surface); }
.todo-newcard:has(.customer-suggestions:not([hidden])) { z-index: 25; }
.todo-input {
  width: 100%; min-height: 46px; padding: 0 14px;
  border-radius: 12px; border: 1px solid var(--surface-border);
  background: #fff; color: var(--ink); font-family: inherit; font-size: 14.5px;
  transition: border-color 170ms ease, box-shadow 170ms ease;
}
.todo-input:focus { border-color: var(--teal-500); outline: none; box-shadow: 0 0 0 3px rgba(74, 148, 168, 0.16); }
html[data-theme="dark"] .todo-input { background: var(--surface-sunken); color: var(--ink); }
.todo-formrow { margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
.todo-cust { min-width: 0; }
.todo-iconfield { position: relative; }
.todo-iconfield > svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--ink-muted); pointer-events: none;
}
.todo-iconfield .todo-input { padding-left: 44px; }
.todo-iconfield-time { margin-top: 12px; max-width: 420px; }
.todo-listlink {
  display: inline-block; margin-top: 10px;
  font-size: 13.5px; font-weight: 700; letter-spacing: -0.004em;
  text-underline-offset: 3px;
}
.todo-addbtn {
  margin-top: 14px; width: 100%; min-height: 48px;
  border: 0; border-radius: 14px;
  background: linear-gradient(180deg, #FF8F72, #F0602F);
  color: #fff; font-family: inherit; font-size: 15px; font-weight: 700; letter-spacing: -0.004em;
  box-shadow: 0 8px 20px rgba(240, 96, 47, 0.26);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform 260ms cubic-bezier(.32, .72, 0, 1), background-color 170ms ease;
}
.todo-addbtn:hover { background: linear-gradient(180deg, #FF7A59, #DB5326); }
.todo-addbtn:active { transform: scale(0.965); transition-duration: 90ms; }
.todo-addbtn:focus-visible { outline: 2px solid #F0602F; outline-offset: 2px; }

.todo-listlabel { margin: 20px 0 10px; font-size: 13.5px; color: var(--ink-muted); }
.kd-rowlist { display: flex; flex-direction: column; gap: 10px; }
.kd-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 18px; border-radius: 18px;
  background: #fff; border: 1px solid var(--surface-border);
}
html[data-theme="dark"] .kd-row { background: var(--surface); }
.kd-row-done { opacity: 0.72; }
.kd-row-main { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.kd-check {
  flex: none; margin-top: 2px; width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 2px solid #CBD5D8; background: none;
  padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color 180ms ease, border-color 180ms ease, transform 260ms cubic-bezier(.32, .72, 0, 1);
}
.kd-check:active { transform: scale(0.88); transition-duration: 90ms; }
.kd-check-done { border-color: #1F9D63; background: #1F9D63; }
.todo-texts { min-width: 0; }
.todo-name { font-size: 16px; font-weight: 600; letter-spacing: -0.014em; }
.kd-row-done .todo-name { text-decoration: line-through; }
.todo-cust-name { margin-top: 2px; font-size: 13.5px; color: var(--ink-muted); }
.todo-due { margin-top: 1px; font-size: 13.5px; font-weight: 600; color: var(--coral-ink); }
.todo-due-overdue { color: var(--danger-ink); }
.kd-row-done .todo-due { font-weight: 400; color: var(--ink-muted); }
.kd-row-actions { flex: none; display: flex; gap: 10px; }
.kd-row-actions .icon-btn { width: 42px; height: 42px; color: var(--teal-700); }
.kd-row-actions .todo-del { color: #B3453B; }
html[data-theme="dark"] .kd-row-actions .todo-del { color: var(--danger-ink); }
.kd-empty {
  padding: 22px 18px; border-radius: 18px;
  background: #fff; border: 1px solid var(--surface-border);
  font-size: 13.5px; color: var(--ink-muted);
}
html[data-theme="dark"] .kd-empty { background: var(--surface); }

@media (max-width: 760px) {
  .kd-seg { height: 48px; }
  .todo-formrow { grid-template-columns: 1fr; }
  .todo-input { min-height: 48px; font-size: 16px; }
  .todo-addbtn { min-height: 50px; }
  .kd-row-stack { flex-direction: column; align-items: stretch; gap: 12px; }
  .kd-row-actions { justify-content: flex-end; }
  .kd-row-actions .icon-btn { width: 46px; height: 46px; }
  .kd-check { width: 30px; height: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .todo-addbtn, .kd-check, .todo-input { transition-duration: 1ms; }
  .todo-addbtn:active, .kd-check:active { transform: none; }
}
@media (prefers-contrast: more) {
  .todo-addbtn { background: var(--coral-contrast); box-shadow: none; }
  .kd-row, .todo-newcard, .kd-empty, .kd-seg { border-color: var(--ink); }
}

.rem-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.rem-head .page-title { margin-bottom: 0; }

.rem-group + .rem-group { margin-top: 22px; }
.rem-group-head { margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.rem-group-title { font-size: 13.5px; font-weight: 700; letter-spacing: -0.004em; }
.rem-group-today { color: #C2452B; }
.rem-group-week { color: var(--teal-700); }
.rem-group-later { color: var(--ink-muted); }
.rem-group-count { font-size: 13px; color: var(--ink-muted); }
html[data-theme="dark"] .rem-group-today { color: var(--coral-ink); }

.rem-link { display: block; min-width: 0; }
.rem-title { font-size: 16px; font-weight: 700; letter-spacing: -0.016em; color: var(--ink); }
.kd-row-done .rem-title { text-decoration: line-through; }
.rem-note { margin-top: 2px; font-size: 13.5px; color: var(--ink-muted); }
.rem-meta { flex: none; display: flex; align-items: center; gap: 12px; }
.rem-meta .icon-btn { width: 42px; height: 42px; color: var(--teal-700); }
.rem-pill {
  display: inline-flex; align-items: center; height: 30px; padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(240, 96, 47, 0.5); background: rgba(240, 96, 47, 0.08); color: #C2452B;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.004em; white-space: nowrap;
}
.rem-pill-overdue { border-color: rgba(201, 58, 80, 0.5); background: rgba(201, 58, 80, 0.09); color: var(--danger-ink); }
.rem-pill-muted { border-color: var(--surface-border); background: var(--surface-muted); color: var(--ink-muted); }
html[data-theme="dark"] .rem-pill { border-color: rgba(255, 171, 148, 0.45); background: rgba(240, 96, 47, 0.16); color: var(--coral-ink); }
html[data-theme="dark"] .rem-pill-overdue { border-color: rgba(255, 138, 155, 0.45); background: rgba(201, 58, 80, 0.2); color: var(--danger-ink); }
html[data-theme="dark"] .rem-pill-muted { border-color: var(--surface-border); background: var(--surface-sunken); color: var(--ink-muted); }
.rem-donemark {
  flex: none; margin-top: 1px; width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #1F9D63;
}
.rem-empty-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.rem-empty-desc { margin-top: 4px; }

@media (max-width: 760px) {
  .rem-head { flex-wrap: wrap; gap: 10px; }
  .rem-row { align-items: flex-start; gap: 12px; padding: 14px 16px; }
  .rem-title { font-size: 15.5px; }
  .rem-meta { flex-direction: column; align-items: flex-end; gap: 10px; }
  .rem-meta .icon-btn { width: 46px; height: 46px; }
}
@media (max-width: 400px) {
  .rem-meta { align-items: stretch; }
  .rem-pill { align-self: flex-end; }
}

.rev-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.rev-head .page-title { margin-bottom: 0; }
.rev-pdfbtn {
  flex: none; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 40px; padding: 0 17px;
  border-radius: 12px; border: 1px solid #D5DFE1; background: #fff; color: var(--ink);
  font-size: 14px; font-weight: 700; letter-spacing: -0.004em;
  box-shadow: 0 2px 6px rgba(12, 40, 49, 0.07);
}
.rev-pdfbtn:hover { background: #F6FAFA; border-color: #B9C9CC; color: var(--ink); }
.rev-pdfbtn svg { color: #C2452B; flex: none; }
html[data-theme="dark"] .rev-pdfbtn { background: var(--surface); border-color: var(--surface-border); }
html[data-theme="dark"] .rev-pdfbtn:hover { background: var(--surface-sunken); }

.rev-rangerow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.rev-seg {
  position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px;
  padding: 4px; border-radius: 999px; background: #EAEFF1; border: 1px solid var(--surface-border);
}
.rev-seg-thumb {
  position: absolute; top: 4px; left: 4px; z-index: 0;
  width: calc(33.3333% - 4px); height: calc(100% - 8px); border-radius: 999px;
  background: linear-gradient(180deg, #FF8F72, #F0602F);
  box-shadow: 0 4px 12px rgba(240, 96, 47, 0.3);
}
.rev-seg[data-pos="1"] .rev-seg-thumb { transform: translate3d(calc(100% + 2px), 0, 0); }
.rev-seg[data-pos="2"] .rev-seg-thumb { transform: translate3d(calc(200% + 4px), 0, 0); }
.rev-seg label {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 0 18px; border-radius: 999px;
  color: var(--ink-muted); font-size: 14px; font-weight: 600; letter-spacing: -0.004em;
  white-space: nowrap; cursor: pointer;
}
.rev-seg label.active { color: #fff; font-weight: 700; }
.rev-seg label.active::after { content: "✓"; font-size: 12px; font-weight: 800; }
.rev-seg input:focus-visible + span { outline: 2px solid #F0602F; outline-offset: 3px; border-radius: 4px; }
html[data-theme="dark"] .rev-seg { background: #16242D; }

.rev-select, .rev-rangefields input[type=date] {
  min-height: 40px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--surface-border); background: #fff; color: var(--ink);
  font-family: inherit; font-size: 14px;
}
.rev-select { flex: none; font-weight: 700; cursor: pointer; }
.rev-rangefields { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
html[data-theme="dark"] .rev-select,
html[data-theme="dark"] .rev-rangefields input[type=date] { background: var(--surface); }

.rev-kpigrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 26px; }
.rev-kpigrid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rev-tile {
  padding: 20px 22px; border-radius: 20px;
  background: #fff; border: 1px solid var(--surface-border);
}
html[data-theme="dark"] .rev-tile { background: var(--surface); }
.rev-tile-sm { padding: 17px 18px; border-radius: 18px; }
.rev-tile-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rev-tile-icon {
  flex: none; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; background: var(--teal-50); color: #3B7C8A;
}
.rev-tile-sm .rev-tile-icon { width: 28px; height: 28px; border-radius: 9px; gap: 9px; }
html[data-theme="dark"] .rev-tile-icon { background: rgba(74, 148, 168, 0.22); color: var(--teal-300); }
.rev-tile-label { font-size: 14px; color: var(--ink-muted); min-width: 0; }
.rev-tile-sm .rev-tile-label { font-size: 13px; line-height: 1.3; }
.rev-tile-value {
  margin-top: 12px; font-size: clamp(23px, 3vw, 27px); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.05; overflow-wrap: anywhere;
}
.rev-tile-value-md { margin-top: 11px; font-size: 22px; letter-spacing: -0.028em; line-height: 1.15; }
.rev-tile-sub { margin-top: 6px; font-size: 13.5px; color: var(--ink-muted); }

.rev-secthead { margin: 26px 0 12px; font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.rev-secthead-row { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin: 26px 0 10px; }
.rev-secthead-row .rev-secthead { margin: 0; }
.rev-comparebtn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 38px; margin-bottom: 12px; padding: 0 15px;
  border-radius: 999px; border: 1px solid var(--surface-border); background: #fff; color: var(--ink);
  font-size: 13.5px; font-weight: 700; letter-spacing: -0.004em;
}
.rev-comparebtn:hover { border-color: var(--teal-500); color: var(--ink); }
.rev-comparebtn.active { background: var(--teal-700); border-color: var(--teal-700); color: #fff; }
.rev-comparebtn.active:hover { color: #fff; }
html[data-theme="dark"] .rev-comparebtn { background: var(--surface); }
html[data-theme="dark"] .rev-comparebtn.active { background: var(--teal-500); border-color: var(--teal-500); color: #0D2130; }
.rev-chartcard {
  padding: 18px 20px 12px; border-radius: 20px;
  background: #fff; border: 1px solid var(--surface-border);
}
html[data-theme="dark"] .rev-chartcard { background: var(--surface); }

.rev-listcard {
  padding: 6px 20px 16px; border-radius: 20px;
  background: #fff; border: 1px solid var(--surface-border);
}
html[data-theme="dark"] .rev-listcard { background: var(--surface); }
.rev-listname { font-size: 14.5px; font-weight: 700; letter-spacing: -0.012em; min-width: 0; }
.rev-listmeta { flex: none; font-size: 13.5px; color: var(--ink-muted); white-space: nowrap; }
.rev-listtop { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }

.kd-pillrow { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.kd-choicepill {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--surface-border); background: #fff; color: var(--ink-muted);
  font-size: 13.5px; font-weight: 700; letter-spacing: -0.004em; white-space: nowrap;
}
.kd-choicepill:hover { border-color: var(--teal-500); color: var(--ink); }
.kd-choicepill.active {
  background: linear-gradient(180deg, #FF8F72, #F0602F);
  border-color: transparent; color: #fff;
}
.kd-choicepill.active:hover { color: #fff; }
.kd-choicepill.active::after { content: "✓"; font-size: 12px; font-weight: 800; }
html[data-theme="dark"] .kd-choicepill:not(.active) { background: var(--surface); }

.rev-custcard { border-radius: 20px; background: #fff; border: 1px solid var(--surface-border); overflow: hidden; }
html[data-theme="dark"] .rev-custcard { background: var(--surface); }
.rev-custrow {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px 18px; transition: background-color 170ms ease;
}
.rev-custrow:nth-child(even) { background: #F6FAFA; }
.rev-custrow + .rev-custrow { border-top: 1px solid #EDF1F2; }
.rev-custrow:hover { background: #EEF3F4; }
html[data-theme="dark"] .rev-custrow:nth-child(even) { background: rgba(74, 148, 168, 0.1); }
html[data-theme="dark"] .rev-custrow + .rev-custrow { border-top-color: var(--surface-border); }
html[data-theme="dark"] .rev-custrow:hover { background: #243946; }
.rev-custmain { display: flex; align-items: center; gap: 13px; min-width: 0; }
.rev-custavatar { width: 38px; height: 38px; font-size: 13px; flex: none; border-radius: 9999px; object-fit: cover; }
.rev-custname {
  font-size: 14.5px; font-weight: 700; letter-spacing: -0.014em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rev-custmeta { font-size: 13px; color: var(--ink-muted); }
.rev-custamount { flex: none; font-size: 14.5px; font-weight: 800; letter-spacing: -0.016em; white-space: nowrap; }
.rev-custrank { flex: none; width: 26px; font-size: 13px; color: var(--ink-muted); }
.rev-empty { padding: 20px 0; font-size: 13.5px; color: var(--ink-muted); }
.rev-custcard .rev-empty { padding: 20px 18px; }

@media (max-width: 1023px) {
  .rev-kpigrid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .rev-head { flex-wrap: wrap; gap: 10px; }
  .rev-head .page-title { width: 100%; }
  .rev-pdfbtn { width: 100%; min-height: 46px; justify-content: center; }
  .rev-rangerow { flex-wrap: wrap; }
  .rev-seg { flex: 1 1 100%; }
  .rev-seg label { padding: 0 10px; font-size: 13.5px; }
  .rev-select { flex: 1 1 100%; min-height: 44px; }
  .rev-kpigrid { grid-template-columns: 1fr; }
  .rev-kpigrid-4 { grid-template-columns: 1fr 1fr; }
  .rev-secthead { font-size: 15.5px; }
  .rev-listname { font-size: 13.5px; }
  .rev-listmeta { font-size: 12px; }
  .kd-pillrow { gap: 6px; }
  .kd-choicepill { min-height: 42px; padding: 0 13px; font-size: 12.5px; }
  .rev-custrow { padding: 12px 14px; }
  .rev-custavatar { width: 34px; height: 34px; }
}
@media (max-width: 420px) {
  .rev-kpigrid-4 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .rev-custrow { transition-duration: 1ms; }
}
@media (prefers-contrast: more) {
  .rev-tile, .rev-chartcard, .rev-listcard, .rev-custcard, .rev-seg, .kd-choicepill, .rev-pdfbtn { border-color: var(--ink); }
}

.kp-wrap { max-width: 960px; padding-bottom: 90px; }

.kp-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.kp-head h1 { flex: 1; min-width: 0; font-size: clamp(20px, 2.6vw, 24px); font-weight: 800; letter-spacing: -0.028em; }
.kp-headbtn {
  flex: none; width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid #E1E8EA; background: #fff; color: var(--ink);
  box-shadow: 0 2px 6px rgba(12, 40, 49, 0.06); cursor: pointer; padding: 0;
  transition: transform 260ms cubic-bezier(.32, .72, 0, 1), background-color 170ms ease, border-color 170ms ease;
}
.kp-headbtn:hover { background: #F6FAFA; border-color: #BBD0D3; color: var(--ink); }
.kp-headbtn:active { transform: scale(0.955); transition-duration: 90ms; }
.kp-headbtn-edit { color: #3F565E; }
.kp-headbtn-del { color: #B3453B; }
.kp-headbtn-del:hover { background: #FDF3F2; border-color: #EAC7C2; color: #B3453B; }
html[data-theme="dark"] .kp-headbtn { background: var(--surface); border-color: var(--surface-border); color: var(--ink); }
html[data-theme="dark"] .kp-headbtn:hover { background: var(--surface-sunken); }
html[data-theme="dark"] .kp-headbtn-del { color: var(--danger-ink); }

.kp-profilecard {
  padding: 28px 24px 22px; border-radius: 24px;
  background: #fff; border: 1px solid #E1E8EA;
  box-shadow: 0 4px 16px rgba(12, 40, 49, 0.05); text-align: center;
}
html[data-theme="dark"] .kp-profilecard { background: var(--surface); border-color: var(--surface-border); }
.kp-avatar { width: 92px; height: 92px; font-size: 30px; border-radius: 9999px; }
img.kp-avatar { display: block; object-fit: cover; }
.kp-avatarbtn {
  position: absolute; right: -2px; bottom: -2px;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 2px solid #fff; background: var(--teal-700); color: #fff;
}
html[data-theme="dark"] .kp-avatarbtn { border-color: var(--surface); }
.kp-profilename { margin-top: 14px; font-size: 21px; font-weight: 800; letter-spacing: -0.024em; line-height: 1.2; }
.kp-profilesub { margin-top: 4px; font-size: 15px; color: var(--ink-muted); }
.kp-profilecompany { margin-top: 4px; font-size: 15px; font-weight: 600; }
.kp-badges { margin-top: 10px; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }

.profile-actions { display: flex; align-items: flex-start; justify-content: center; gap: 6px; margin-top: 18px; }
.profile-action { min-width: 74px; padding: 4px 6px; }
.profile-action .circle {
  width: 52px; height: 52px; background: #EFF5F5; border: 1px solid #DCE8E8;
  color: var(--teal-700); box-shadow: none;
}
.profile-action:hover .circle, .profile-action:focus-visible .circle {
  transform: none; background: #E3EFEF; border-color: #C7DCDC; box-shadow: none;
}
.profile-action.disabled { opacity: 0.55; cursor: not-allowed; }
.profile-action.disabled .circle { background: #F4F7F7; border-color: #EAEFEF; color: #A9B7BB; }
.profile-action.disabled:hover .circle { background: #F4F7F7; border-color: #EAEFEF; }
.profile-action span.label { font-size: 12.5px; font-weight: 600; letter-spacing: -0.002em; color: var(--ink); }
.profile-action.disabled span.label { color: #9BAAAF; }
html[data-theme="dark"] .profile-action .circle { background: rgba(74, 148, 168, 0.18); border-color: var(--surface-border); color: var(--teal-300); }
html[data-theme="dark"] .profile-action.disabled .circle { background: var(--surface-sunken); border-color: var(--surface-border); }

.tabs {
  position: relative; display: flex; gap: 0; margin: 22px 0 18px;
  border-bottom: 1px solid #E1E8EA;
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: none; position: relative; text-align: center;
  padding: 12px 18px 14px; margin-bottom: -1px;
  font-size: 14.5px; font-weight: 600; letter-spacing: -0.008em;
  color: var(--ink-muted); white-space: nowrap; border-bottom: 0;
}
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--ink); font-weight: 700; }
.tabs a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  border-radius: 3px 3px 0 0; box-shadow: none;
  background: linear-gradient(90deg, #FF8F72, #F0602F);
}
html[data-theme="dark"] .tabs { border-bottom-color: var(--surface-border); }

.kp-cards { display: flex; flex-direction: column; gap: 14px; }
.kp-card {
  padding: 20px 22px; border-radius: 20px;
  background: #fff; border: 1px solid #E1E8EA;
}
html[data-theme="dark"] .kp-card { background: var(--surface); border-color: var(--surface-border); }
.kp-card-flush { padding: 0; overflow: hidden; }
.kp-cardtitle { margin-bottom: 12px; font-size: 16.5px; font-weight: 800; letter-spacing: -0.018em; }
.kp-cardhead { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.kp-cardhead .kp-cardtitle { margin-bottom: 0; }
.kp-cardnote { margin-top: 10px; font-size: 14.5px; color: var(--ink-muted); }
.kp-cardnote-top { margin: 0 0 12px; }

.kp-kv { display: flex; flex-direction: column; gap: 8px; }
.kp-kvrow { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.kp-kvkey { flex: none; font-size: 14.5px; color: var(--ink-muted); }
.kp-kvval { max-width: 62%; font-size: 14.5px; font-weight: 600; text-align: right; }
.kp-kvval-empty { font-weight: 400; color: #9BAAAF; }

.kp-pillbtn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 15px 0 12px;
  border: 1px solid #D5E1E3; border-radius: 999px;
  background: #F6FAFA; color: var(--teal-700);
  font-family: inherit; font-size: 14px; font-weight: 700; letter-spacing: -0.004em;
  cursor: pointer;
  transition: transform 260ms cubic-bezier(.32, .72, 0, 1), background-color 170ms ease, border-color 170ms ease;
}
.kp-pillbtn:hover { background: #EDF5F5; border-color: #BBD0D3; color: var(--teal-700); }
.kp-pillbtn:active { transform: scale(0.955); transition-duration: 90ms; }
.kp-pillbtn-sm { min-height: 36px; padding: 0 13px; font-size: 13.5px; gap: 6px; flex: none; }
summary.kp-pillbtn { list-style: none; }
summary.kp-pillbtn::-webkit-details-marker { display: none; }
summary.kp-pillbtn::marker { content: ''; }
.kp-pillbtn-ghost { border-color: transparent; background: none; padding: 0 12px; }
.kp-pillbtn-ghost:hover { background: #F6FAFA; border-color: transparent; }
html[data-theme="dark"] .kp-pillbtn { background: var(--surface-sunken); border-color: var(--surface-border); color: var(--teal-300); }
html[data-theme="dark"] .kp-pillbtn:hover { background: rgba(74, 148, 168, 0.18); }
html[data-theme="dark"] .kp-pillbtn-ghost { background: none; border-color: transparent; }

.kp-rowline { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; }
.kp-rowtitle { font-size: 15px; font-weight: 600; min-width: 0; }
.kp-sep { display: block; height: 1px; background: #EDF1F2; }
html[data-theme="dark"] .kp-sep { background: var(--surface-border); }

.kp-wrap .activity-box { padding: 0; }
.kp-wrap .activity-box summary { padding: 20px 22px; font-size: 16.5px; font-weight: 800; letter-spacing: -0.018em; }
.kp-wrap .activity-box summary svg { color: var(--ink-muted); }
.kp-wrap .activity-box .kp-activitybody { padding: 0 22px 20px; }
.kp-wrap .timeline li { margin-bottom: 14px; }
.kp-wrap .timeline li:last-child { margin-bottom: 0; }

.termin-card { padding: 20px 22px; border-radius: 20px; background: #fff; border: 1px solid #E1E8EA; }
html[data-theme="dark"] .termin-card { background: var(--surface); border-color: var(--surface-border); }
a.icon-btn.termin-icon-btn { width: 36px; height: 36px; }

@media (max-width: 760px) {
  .kp-head h1 { font-size: 20px; }
  .kp-headbtn { width: 44px; height: 44px; }
  .kp-profilecard { padding: 20px 16px 18px; border-radius: 20px; }
  .kp-profilename { font-size: 18px; }
  .kp-avatar { width: 78px; height: 78px; font-size: 26px; }
  .profile-actions { gap: 0; }
  .profile-action { min-width: 0; flex: 1; }
  .profile-action span.label { font-size: 11.5px; }
  .tabs { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
  .kp-card, .termin-card { padding: 16px; border-radius: 18px; }
  .kp-cardtitle { font-size: 15.5px; }
  .kp-wrap .activity-box summary { padding: 16px; font-size: 15.5px; }
  .kp-wrap .activity-box .kp-activitybody { padding: 0 16px 16px; }
  .kp-kvrow { flex-direction: column; align-items: flex-start; gap: 2px; }
  .kp-kvval { text-align: left; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .kp-headbtn, .kp-pillbtn { transition-duration: 1ms; }
  .kp-headbtn:active, .kp-pillbtn:active { transform: none; }
}
@media (prefers-contrast: more) {
  .kp-card, .kp-profilecard, .kp-headbtn, .kp-pillbtn, .termin-card { border-color: var(--ink); }
}

.kf-wrap { max-width: 1120px; }
.kf-wrap-narrow { max-width: 920px; }
.kf-card {
  padding: 22px 24px 24px; border-radius: 20px;
  background: #fff; border: 1px solid #E1E8EA;
  box-shadow: 0 4px 14px rgba(12, 40, 49, 0.05);
}
html[data-theme="dark"] .kf-card { background: var(--surface); border-color: var(--surface-border); }

.kf-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 18px; }
.kf-span2 { grid-column: span 2; }
.kf-span4 { grid-column: span 4; }
.kf-sectionhead { font-size: 11.5px; font-weight: 700; letter-spacing: 0.11em; color: #546A72; }
html[data-theme="dark"] .kf-sectionhead { color: #8FA3AD; }
.kf-rule { display: block; height: 1px; margin: 2px 0; background: #EDF1F2; }
html[data-theme="dark"] .kf-rule { background: var(--surface-border); }
.kf-bottom { display: flex; align-items: flex-end; }

.kf-label { display: block; font-size: 13.5px; font-weight: 700; letter-spacing: -0.006em; }
.kf-label-lg { font-size: 15px; letter-spacing: -0.01em; }
.kf-field {
  width: 100%; min-height: 44px; margin-top: 6px; padding: 0 14px;
  border-radius: 12px; border: 1px solid #E1E8EA; background: #FAFCFC; color: var(--ink);
  font-family: inherit; font-size: 14.5px;
  transition: border-color 170ms ease, box-shadow 170ms ease;
}
.kf-field:focus { outline: none; border-color: #F0602F; box-shadow: 0 0 0 3px rgba(240, 96, 47, 0.15); }
select.kf-field { padding: 0 12px; cursor: pointer; }
textarea.kf-field { min-height: 96px; padding: 11px 14px; line-height: 1.5; resize: vertical; }
html[data-theme="dark"] .kf-field { background: #16242D; border-color: var(--surface-border); color: var(--ink); }
.kf-field-lg { min-height: 52px; margin-top: 9px; padding: 0 15px; border-radius: 14px; font-size: 15.5px; font-weight: 600; }
textarea.kf-field-lg { min-height: 110px; padding: 13px 15px; font-weight: 400; }

.kf-iconfield { position: relative; margin-top: 9px; }
.kf-iconfield > svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #3B7C8A; pointer-events: none; }
.kf-iconfield .kf-field { margin-top: 0; padding-left: 46px; }

.field > label:has(+ input[required])::after,
.field > label:has(+ select[required])::after,
.field > label:has(+ textarea[required])::after,
.kf-label:has(+ .kf-field[required])::after,
.kf-label:has(+ .kf-iconfield .kf-field[required])::after,
label.a-field:has(> input[required]) > .a-label::after,
label.a-field:has(> select[required]) > .a-label::after {
  content: '*';
  margin-left: 3px;
  color: var(--danger-ink);
  font-weight: 800;
}

.kf-inforow { display: flex; align-items: flex-start; gap: 8px; margin-top: -4px; }
.kf-inforow svg { flex: none; margin-top: 2px; color: #546A72; }
.kf-inforow p { margin: 0; }
html[data-theme="dark"] .kf-inforow svg { color: var(--ink-muted); }

.kf-foldtoggle {
  display: flex; align-items: center; gap: 9px; min-height: 40px;
  font-size: 13.5px; font-weight: 700; letter-spacing: -0.006em;
  cursor: pointer; list-style: none;
}
.kf-foldtoggle::-webkit-details-marker { display: none; }
.kf-foldtoggle::marker { content: ''; }
.kf-foldtoggle svg { flex: none; color: #546A72; transition: transform 340ms cubic-bezier(.32, .72, 0, 1); }
details[open] > .kf-foldtoggle svg { transform: rotate(90deg); }
html[data-theme="dark"] .kf-foldtoggle svg { color: var(--ink-muted); }
.kf-foldbody { padding-top: 8px; }

.kf-hint { margin: 6px 0 0; font-size: 12.5px; line-height: 1.45; color: #5C6E75; }
html[data-theme="dark"] .kf-hint { color: var(--ink-muted); }
.kf-hint-bottom { margin: 0 0 4px; }
.kf-error { margin: 14px 0 0; font-size: 14px; font-weight: 600; color: var(--danger-ink); }
.kf-linkrow { margin-top: 9px; }
.kf-linkrow a, .kf-linkrow .article-picker-toggle {
  font-size: 14.5px; font-weight: 700; color: var(--teal-700);
  text-decoration: underline; text-underline-offset: 3px;
}

.kf-durbtn {
  min-height: 42px; padding: 0 19px; border-radius: 999px;
  border: 1px solid var(--surface-border); background: #fff; color: var(--ink-muted);
  font-family: inherit; font-size: 14.5px; font-weight: 700; letter-spacing: -0.006em;
  white-space: nowrap; cursor: pointer;
  transition: transform 260ms cubic-bezier(.32, .72, 0, 1), background-color 170ms ease, border-color 170ms ease;
}
.kf-durbtn:hover { border-color: var(--teal-500); color: var(--ink); }
.kf-durbtn:active { transform: scale(0.965); transition-duration: 90ms; }
.kf-durbtn.active { background: linear-gradient(180deg, #FF8F72, #F0602F); border-color: transparent; color: #fff; }
html[data-theme="dark"] .kf-durbtn:not(.active) { background: var(--surface); }

.kf-savebar {
  position: sticky; bottom: 0; z-index: 15;
  margin: 16px -4px -4px; padding: 12px 4px 4px;
  background: linear-gradient(180deg, transparent, var(--surface-muted) 45%);
  backdrop-filter: blur(8px);
}
.kf-savebtn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 54px; border: 0; border-radius: 16px;
  background: linear-gradient(180deg, #FF8F72, #F0602F); color: #fff;
  font-family: inherit; font-size: 16.5px; font-weight: 700; letter-spacing: -0.01em;
  box-shadow: 0 10px 26px rgba(240, 96, 47, 0.3);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform 260ms cubic-bezier(.32, .72, 0, 1), background-color 170ms ease;
}
.kf-savebtn:hover { background: linear-gradient(180deg, #FF7A59, #DB5326); }
.kf-savebtn:active { transform: scale(0.975); transition-duration: 90ms; }
.kf-savebtn:focus-visible { outline: 2px solid #F0602F; outline-offset: 2px; }

.kf-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.kf-timegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.kf-blocktop { margin-top: 22px; }
.kf-cols > div > .kf-blocktop:first-child { margin-top: 0; }

@media (max-width: 1023px) {
  .kf-cols > div + div > .kf-blocktop:first-child { margin-top: 22px; }
  .kf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kf-span4 { grid-column: span 2; }
  .kf-cols { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 760px) {
  .kf-grid { grid-template-columns: 1fr; gap: 14px; }
  .kf-span2, .kf-span4 { grid-column: span 1; }
  .kf-card { padding: 18px 16px; border-radius: 20px; }
  .kf-field { min-height: 50px; font-size: 16px; }
  .kf-field-lg { min-height: 52px; font-size: 16px; }
  .kf-savebar { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .kf-field, .kf-durbtn, .kf-savebtn { transition-duration: 1ms; }
  .kf-durbtn:active, .kf-savebtn:active { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .kf-savebar { background: var(--surface-muted); backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  .kf-card, .kf-field, .kf-durbtn { border-color: var(--ink); }
  .kf-savebtn { background: var(--coral-contrast); box-shadow: none; }
}

.badge-preview {
  margin: 0 0 6px;
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--coral-ink);
}
.badge-steps {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-muted);
}
.badge-steps li { margin-bottom: 4px; }

html[data-theme="dark"] .badge-preview { color: #FFAB94; }

.dash-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.dash-head-main { min-width: 0; flex: 1; display: grid; grid-template-columns: auto minmax(0, 1fr);
  align-items: center; column-gap: 16px; }
.dash-greeting { grid-column: 1; grid-row: 1; font-size: 22px; font-weight: 800; margin: 0; }
.dash-subline { grid-column: 1; grid-row: 2; margin-top: 4px; }
.dash-head-main > .kd-sec { grid-column: 2; grid-row: 1; justify-self: start; }

.kd-sec { position: relative; display: inline-flex; flex-direction: column; align-items: flex-start; }
.kd-chip { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px;
  padding: 7px 13px 7px 10px; border: 0; border-radius: 999px; background: #fff; cursor: pointer;
  box-shadow: 0 1px 3px rgba(27,36,48,.1); font-family: inherit; }
.kd-chip:hover { box-shadow: 0 2px 8px rgba(27,36,48,.16); }
.kd-chip:focus-visible { outline: 2px solid #1f8f57; outline-offset: 2px; }
.kd-chip__icons, .kd-chip__stack { display: contents; }
.kd-chip__label { font-weight: 700; font-size: 12.5px; line-height: 1; color: #1b2430; white-space: nowrap; }
.kd-chip__label--green { color: #1f8f57; }
.kd-chip__divider { width: 1px; height: 12px; background: #e3e9ee; }

.kd-dot { position: relative; width: 9px; height: 9px; flex: none; display: block; }
.kd-dot__core { position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #8fe9bb 0%, #3ecf8e 42%, #1f9e63 100%);
  box-shadow: 0 0 0 .5px rgba(31,143,87,.25), 0 1px 2px rgba(18,49,58,.22), 0 0 7px rgba(52,199,123,.45); }
.kd-dot__ring { position: absolute; inset: 0; border-radius: 50%; box-sizing: border-box;
  border: 1.5px solid rgba(52,199,123,.45); filter: blur(1px);
  animation: kd-ripple 6.5s cubic-bezier(.22,.45,.25,1) infinite; }
.kd-dot__ring--2 { border-color: rgba(52,199,123,.38); animation-delay: 1.8s; }
@keyframes kd-ripple {
  0% { transform: scale(1); opacity: 0; }
  25% { opacity: .26; }
  55% { opacity: .13; }
  100% { transform: scale(3.2); opacity: 0; }
}
.kd-dot--alert .kd-dot__core { background: radial-gradient(circle at 34% 28%, #f7a48b 0%, #ef7259 42%, #c94d2d 100%);
  box-shadow: 0 0 0 .5px rgba(201,77,45,.3), 0 1px 2px rgba(18,49,58,.22), 0 0 7px rgba(232,97,63,.4); }
.kd-dot--alert .kd-dot__ring { border-color: rgba(232,97,63,.45); }
.kd-dot--alert .kd-dot__ring--2 { border-color: rgba(232,97,63,.38); }

.kd-lock { position: relative; width: 13px; height: 15px; flex: none; display: block; }
.kd-lock__shackle { position: absolute; left: 2.5px; top: 0; width: 8px; height: 8.5px; box-sizing: border-box;
  border: 1.7px solid #2b9c63; border-bottom: 0; border-radius: 4.5px 4.5px 0 0; }
.kd-lock__body { position: absolute; left: 0; bottom: 0; width: 13px; height: 9.5px; border-radius: 3px;
  overflow: hidden; background: linear-gradient(160deg, #45bd80 0%, #1f8f57 68%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 1px 1.5px rgba(18,49,58,.18); }
.kd-lock__keyhole { position: absolute; left: 5.6px; bottom: 3.6px; width: 1.8px; height: 1.8px;
  border-radius: 50%; background: rgba(255,255,255,.92); }
.kd-lock__keystem { position: absolute; left: 6.1px; bottom: 2.2px; width: .9px; height: 2px;
  border-radius: .5px; background: rgba(255,255,255,.92); }
.kd-lock__sheen { position: absolute; top: 0; bottom: 0; left: 0; width: 9px; filter: blur(1.2px);
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.28) 35%,
    rgba(255,255,255,.6) 50%, rgba(255,255,255,.28) 65%, rgba(255,255,255,0) 100%);
  animation: kd-sheen 10s cubic-bezier(.45,0,.55,1) infinite; }
@keyframes kd-sheen {
  0%, 80% { transform: translateX(-200%) skewX(-14deg); opacity: 0; }
  85% { opacity: .55; }
  91% { opacity: .55; }
  97%, 100% { transform: translateX(220%) skewX(-14deg); opacity: 0; }
}
.kd-lock--lg { width: 17px; height: 20px; }
.kd-lock--lg .kd-lock__shackle { left: 3.5px; width: 10px; height: 11px; border-width: 2px; border-radius: 5.5px 5.5px 0 0; }
.kd-lock--lg .kd-lock__body { width: 17px; height: 12.5px; border-radius: 4px; box-shadow: inset 0 1px 0 rgba(255,255,255,.42), 0 1px 2px rgba(18,49,58,.2); }
.kd-lock--lg .kd-lock__sheen { width: 12px; filter: blur(1.4px); }
.kd-lock--lg .kd-lock__keyhole { left: 7.4px; bottom: 5px; width: 2.2px; height: 2.2px; }
.kd-lock--lg .kd-lock__keystem { left: 8px; bottom: 3px; width: 1.1px; height: 2.4px; }

.kd-noticebar { position: absolute; left: 14px; top: 100%; margin-top: -13px; z-index: 1; display: flex; }
.kd-noticebar__btn { display: flex; align-items: center; gap: 8px; padding: 17px 13px 8px;
  border: 0; border-radius: 13px; background: rgba(232,97,63,.13); cursor: pointer;
  font-family: inherit; white-space: nowrap; }
.kd-noticebar__btn:hover { background: rgba(232,97,63,.2); }
.kd-noticebar__btn:focus-visible { outline: 2px solid #c94d2d; outline-offset: 2px; }
.kd-noticebar__text { font-weight: 700; font-size: 12px; line-height: 1; color: #c94d2d; }
.kd-noticebar__chev { font-weight: 700; font-size: 13px; line-height: 1; color: #e8613f; }
.kd-warn { position: relative; width: 14px; height: 12.5px; flex: none; display: block; }
.kd-warn__tri { position: absolute; inset: 0; background: #e8613f; border-radius: 2px;
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%); }
.kd-warn__bar { position: absolute; left: 50%; top: 4.5px; margin-left: -.8px; width: 1.6px; height: 3.6px;
  border-radius: 1px; background: #fff; }
.kd-warn__dot { position: absolute; left: 50%; top: 9.6px; margin-left: -.8px; width: 1.6px; height: 1.6px;
  border-radius: 50%; background: #fff; }

.kd-panel { position: absolute; left: 0; top: 39px; width: 318px; z-index: 5; text-align: left;
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity .18s ease, transform .18s ease; }
@media (min-width: 641px) {
  .kd-noticebar ~ .kd-panel { top: 64px; }
}
.kd-panel[data-open="true"] { opacity: 1; transform: translateY(0); pointer-events: auto; }
.kd-panel:focus { outline: none; }
.kd-panel__card { background: #fff; border-radius: 16px; padding: 6px; box-shadow: 0 14px 40px rgba(18,49,58,.18); }
.kd-ssl { display: flex; align-items: center; gap: 11px; padding: 14px 14px 13px; border-radius: 12px;
  background: linear-gradient(140deg, rgba(52,199,123,.16), rgba(52,199,123,.07)); }
.kd-ssl--alert { background: linear-gradient(140deg, rgba(232,97,63,.16), rgba(232,97,63,.07)); }
.kd-ssl--alert .kd-ssl__title { color: #c94d2d; }
.kd-ssl--alert .kd-ssl__meta { color: #a86a56; }
.kd-ssl--alert .kd-lock__body { background: linear-gradient(160deg, #ef7259 0%, #c94d2d 68%); }
.kd-ssl--alert .kd-lock__shackle { border-color: #c94d2d; }
.kd-ssl__text { display: flex; flex-direction: column; gap: 5px; }
.kd-ssl__title { font-weight: 800; font-size: 13.5px; line-height: 1; color: #166b43; }
.kd-ssl__meta { font-weight: 500; font-size: 11.5px; line-height: 1; color: #3f8a64; }
.kd-rows { list-style: none; margin: 0; padding: 8px 2px 2px; display: flex; flex-direction: column; gap: 1px; }
.kd-rows .kd-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px;
  border: 0; background: none; box-shadow: none; margin: 0; }
.kd-row__dot { width: 7px; height: 7px; border-radius: 50%; background: #34c77b; flex: none; }
.kd-row__name { font-weight: 600; font-size: 13.5px; line-height: 1; color: #1b2430; }
.kd-row__meta { margin-left: auto; font-weight: 500; font-size: 12px; line-height: 1; color: #98a2ac; }
.kd-todo { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; margin: 4px 2px;
  border-radius: 10px; background: rgba(232,97,63,.09); }
.kd-todo__dot { width: 7px; height: 7px; border-radius: 50%; background: #e8613f; flex: none; margin-top: 3px; }
.kd-todo__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.kd-todo__head { display: flex; align-items: baseline; gap: 10px; }
.kd-todo__title { font-weight: 700; font-size: 13px; line-height: 1.2; color: #c94d2d; }
.kd-todo__action { margin-left: auto; border: 0; background: none; padding: 0; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 12px; line-height: 1.2; color: #c94d2d; white-space: nowrap; text-decoration: none; }
.kd-todo__text { font-weight: 500; font-size: 11.5px; line-height: 1.35; color: #a86a56; }

@media (prefers-reduced-motion: reduce) {
  .kd-dot__ring, .kd-lock__sheen { animation: none; opacity: 0; }
  .kd-panel { transition: none; }
}

@media (max-width: 640px) {
  .kd-chip { align-items: center; gap: 8px; padding: 7px 11px 7px 9px; border-radius: 14px; }
  .kd-chip__stack { display: flex; flex-direction: column; gap: 6px; }
  .kd-chip__icons { display: flex; flex-direction: column; align-items: center; gap: 7px; padding-top: 1px; }
  .kd-chip__divider { display: none; }
  .kd-chip__label { font-size: 11.5px; }
  .kd-noticebar { position: static; align-self: flex-end; margin: -14px 14px 0 0; }
  .kd-noticebar__btn { padding: 19px 12px 9px; border-radius: 14px; }
  .kd-panel { position: absolute; left: auto; right: 0; top: 100%; margin-top: 4px;
    width: min(340px, calc(100vw - 40px)); }
  .kd-panel:not([data-open="true"]) { display: none; }
  .dash-head-main { position: relative; display: block; padding-right: 146px; }
  .dash-greeting { font-size: 18px; }
  .dash-head-main > .kd-sec { position: absolute; right: 0; top: 0; width: auto; margin-top: 0;
    align-items: flex-end; }
  .dash-head > .icon-btn { display: none; }
}

html[data-theme="dark"] .kd-chip { background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.4); }
html[data-theme="dark"] .kd-chip__label { color: var(--ink); }
html[data-theme="dark"] .kd-chip__divider { background: var(--surface-border); }
html[data-theme="dark"] .kd-panel__card { background: var(--surface); box-shadow: 0 14px 40px rgba(0,0,0,.5); }
html[data-theme="dark"] .kd-row__name { color: var(--ink); }
html[data-theme="dark"] .kd-ssl__title { color: #6fd6a1; }
html[data-theme="dark"] .kd-ssl__meta { color: #8fc7ab; }

/* Kalender und Termin-Formular */

:root {
  --tint-teal-soft: #EAF4F5;
  --tint-teal-strong: #DCEFF1;
  --tint-coral-soft: #FFF1EC;
  --surface-past: #E2E9EC;
  --text-on-muted: #5C6E75;
  --text-on-past: #4C5E65;
}

html[data-theme="dark"] {
  --tint-teal-soft: #1B303C;
  --tint-teal-strong: #24404F;
  --tint-coral-soft: #2C1F1B;
  --surface-past: #152430;
  --text-on-muted: #A9B7C0;
  --text-on-past: #A9B7C0;
}

.cal, .tp { container-type: inline-size; }

.cal-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.cal-hd[hidden] { display: none; }
.cal-hd h1 { margin: 0; font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2rem); font-weight: 900; letter-spacing: -.032em; }
.cal-hd__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cal-hd__actions[hidden] { display: none; }

.cal-card {
  padding: clamp(14px, 1.6vw, 18px); border-radius: var(--radius-card);
  border: 1px solid var(--surface-border); background: var(--surface);
  box-shadow: var(--shadow-glass);
}

.cal-body { display: grid; gap: 14px; }
.cal-body[hidden] { display: none; }
@container (min-width: 1000px) {
  .cal-body { grid-template-columns: minmax(0, 1.55fr) minmax(356px, .62fr); align-items: start; gap: 18px; }
}

.m-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.m-top[hidden] { display: none; }
.m-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.m-name[hidden] { display: none; }
.m-nav { display: flex; align-items: center; gap: 6px; }
.m-nav[hidden] { display: none; }
.m-today {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 38px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--surface-border); background: var(--surface);
  font: inherit; font-size: 13.5px; font-weight: 700; color: var(--ink); cursor: pointer;
  transition: border-color .15s ease, transform .18s cubic-bezier(.32,.72,0,1);
}
.m-today[hidden] { display: none; }
.m-today:hover { border-color: var(--teal-300); }
.m-today:active { transform: scale(.97); }
.m-arrow {
  display: flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border: 1px solid var(--surface-border); border-radius: 10px; background: var(--surface);
  color: var(--ink); cursor: pointer;
  transition: border-color .15s ease, transform .18s cubic-bezier(.32,.72,0,1);
}
.m-arrow[hidden] { display: none; }
.m-arrow:hover { border-color: var(--teal-300); }
.m-arrow:active { transform: scale(.94); }

.m-pick { position: relative; display: inline-flex; align-items: center; }
.m-pick[hidden] { display: none; }
.m-pick__btn {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 42px; padding: 0 7px 0 13px;
  border: 1px solid var(--surface-border); border-radius: 11px; background: var(--surface);
  box-shadow: 0 1px 2px rgba(13,33,48,.06);
  font: inherit; font-size: 18px; font-weight: 800; letter-spacing: -.02em; color: var(--ink);
  cursor: pointer; white-space: nowrap;
  transition: border-color .15s ease, box-shadow .15s ease, transform .18s cubic-bezier(.32,.72,0,1);
}
.m-pick__btn[hidden] { display: none; }
.m-pick__btn:hover { border-color: var(--teal-300); box-shadow: 0 2px 6px rgba(13,33,48,.1); }
.m-pick__btn:active { transform: scale(.97); }
.m-pick__chev {
  display: flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  border-radius: 7px; background: var(--surface-muted); color: var(--ink-muted);
  transition: background-color .15s ease, color .15s ease, transform .2s cubic-bezier(.32,.72,0,1);
}
.m-pick__chev[hidden] { display: none; }
.m-pick__btn:hover .m-pick__chev { background: var(--tint-teal-strong); color: var(--teal-700); }
.m-pick--open .m-pick__chev { background: var(--tint-coral-soft); color: var(--coral-ink); transform: rotate(180deg); }
.m-pick--open .m-pick__btn { border-color: var(--teal-300); }

.m-panel {
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 40;
  padding: 10px; border-radius: 16px;
  border: 1px solid var(--surface-border); background: var(--surface);
  box-shadow: 0 18px 44px rgba(13,33,48,.24);
}
.m-panel[hidden] { display: none; }
.m-panel--month { display: grid; grid-template-columns: repeat(3, 74px); gap: 5px; }
.m-panel--month[hidden] { display: none; }
.m-panel--year { display: grid; grid-template-columns: repeat(2, 74px); gap: 5px; max-height: 236px; overflow-y: auto; }
.m-panel--year[hidden] { display: none; }

.m-opt {
  min-height: 38px; padding: 0 6px; border: 0; border-radius: 10px; background: transparent;
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink); cursor: pointer;
}
.m-opt:hover { background: var(--surface-muted); }
.m-opt--on { background: var(--coral-500); color: #fff; font-weight: 700; }
.m-opt--now { box-shadow: inset 0 0 0 1.5px var(--teal-300); }

.m-head { display: grid; grid-template-columns: 30px repeat(7, minmax(0, 1fr)); gap: 5px; margin-bottom: 6px; }
.m-head[hidden] { display: none; }
.m-head span { text-align: center; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-on-muted); }
.m-rows { display: grid; gap: 5px; }
.m-rows[hidden] { display: none; }
.m-row { display: grid; grid-template-columns: 30px repeat(7, minmax(0, 1fr)); gap: 5px; }
.m-row[hidden] { display: none; }
.m-rows .m-row + .m-row { border-top: 1px solid var(--surface-border); padding-top: 5px; }
.m-kw { display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--text-on-muted); }
.m-kw[hidden] { display: none; }

@container (min-width: 700px) {
  .m-head { grid-template-columns: 34px repeat(7, minmax(0, 1fr)); gap: 7px; }
  .m-row { grid-template-columns: 34px repeat(7, minmax(0, 1fr)); gap: 7px; }
  .m-rows { gap: 7px; }
  .m-rows .m-row + .m-row { padding-top: 7px; }
}

.m-day {
  position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 3px;
  min-height: 46px; padding: 5px 4px; overflow: hidden;
  border-radius: 12px; border: 1.5px solid transparent; background: transparent;
  font: inherit; text-align: left; color: var(--ink); cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .18s cubic-bezier(.32,.72,0,1);
}
.m-day[hidden] { display: none; }
.m-day:hover { background: var(--surface-muted); }
.m-day:active { transform: scale(.97); }
.m-day:focus-visible { outline: 2px solid var(--coral-500); outline-offset: -2px; z-index: 2; }
@container (min-width: 700px) { .m-day { min-height: 104px; border-radius: 14px; padding: 7px 6px; } }

.m-num {
  align-self: center; display: flex; align-items: center; justify-content: center;
  min-width: 26px; height: 26px; padding: 0 6px; border-radius: 99px;
  font-size: 15px; font-weight: 600; line-height: 1;
}
.m-num[hidden] { display: none; }
@container (min-width: 700px) { .m-num { align-self: flex-start; font-size: 15.5px; } }

.m-day--today .m-num { background: var(--coral-500); color: #fff; font-weight: 800; }
.m-day--sel { background: var(--tint-teal-soft); border-color: var(--teal-300); }
html[data-theme="dark"] .m-day--sel { background: var(--tint-teal-strong); }
.m-day--out .m-num { color: color-mix(in srgb, var(--ink-muted) 72%, transparent); font-weight: 500; }

.m-ev, .m-more { display: none; }
.m-dots { display: flex; align-items: center; justify-content: center; gap: 3px; min-height: 8px; }
.m-dots[hidden] { display: none; }
.m-dots i { width: 5px; height: 5px; border-radius: 50%; }

@container (min-width: 700px) {
  .m-dots { display: none; }
  .m-ev {
    display: flex; align-items: center; gap: 5px;
    padding: 2px 5px 2px 4px; border-radius: 5px;
    background: var(--surface-muted);
    font-size: 11.5px; font-weight: 600; line-height: 1.35; color: var(--ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .m-ev[hidden] { display: none; }
  .m-ev i { flex: none; width: 3px; height: 12px; border-radius: 2px; }
  .m-ev b { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
  .m-ev span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .m-more { display: block; padding-left: 5px; font-size: 11px; font-weight: 600; color: var(--text-on-past); }
  .m-more[hidden] { display: none; }
}

@container (min-width: 700px) {
  .m-ev {
    display: grid; grid-template-columns: 3px minmax(0, 1fr); column-gap: 5px;
    align-items: center; padding: 3px 5px 4px 4px; line-height: 1.25;
  }
  .m-ev i { grid-row: 1 / 3; height: 100%; }
  .m-ev b { grid-column: 2; font-size: 10.5px; opacity: .8; }
  .m-ev span { grid-column: 2; white-space: nowrap; }
}

.m-day--past { background: var(--surface-past); }
.m-day--past:hover { background: color-mix(in srgb, var(--teal-500) 9%, var(--surface-past)); }
.m-day--past .m-num { color: var(--text-on-past); font-weight: 500; }
.m-day--past .m-ev { background: transparent; color: var(--text-on-past); font-weight: 500; }
.m-day--past .m-ev i { opacity: .4; }
.m-day--past .m-ev span {
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--text-on-past) 55%, transparent);
  text-decoration-thickness: 1px;
}
.m-day--past .m-dots i { opacity: .42; }
.m-day--past.m-day--sel { background: var(--tint-teal-strong); }
.m-day--past.m-day--sel .m-num, .m-day--past.m-day--sel .m-ev { color: var(--ink); }

.m-day--edge::after {
  content: ""; position: absolute; left: 10%; right: 10%; bottom: 0; height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, transparent, var(--coral-500) 24%, var(--coral-500) 76%, transparent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--coral-500) 55%, transparent);
}

.m-pop { display: none; }
@media (hover: hover) and (pointer: fine) {
  .m-day { overflow: visible; }
  .m-pop {
    display: block; position: absolute; left: 50%; bottom: calc(100% + 9px); z-index: 30;
    width: 236px; padding: 12px 14px 13px; transform: translate(-50%, 4px);
    border-radius: 16px; border: 1px solid var(--surface-border); background: var(--surface);
    box-shadow: 0 16px 38px rgba(13,33,48,.22);
    opacity: 0; pointer-events: none; text-align: left;
    transition: opacity .16s ease, transform .22s cubic-bezier(.32,.72,0,1);
  }
  .m-pop[hidden] { display: none; }
  .m-day:hover .m-pop, .m-day:focus-visible .m-pop { opacity: 1; transform: translate(-50%, 0); }
  .m-row > .m-day:nth-child(2) .m-pop { left: 0; transform: translate(0, 4px); }
  .m-row > .m-day:nth-child(8) .m-pop { left: auto; right: 0; transform: translate(0, 4px); }
  .m-row > .m-day:nth-child(2):hover .m-pop, .m-row > .m-day:nth-child(2):focus-visible .m-pop { transform: translate(0, 0); }
  .m-row > .m-day:nth-child(8):hover .m-pop, .m-row > .m-day:nth-child(8):focus-visible .m-pop { transform: translate(0, 0); }
  .m-rows > .m-row:first-child .m-pop { bottom: auto; top: calc(100% + 9px); }
}
.m-pop__d { display: block; font-size: 12.5px; font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
.m-pop__d[hidden] { display: none; }
.m-pop__r { display: block; margin-top: 4px; font-size: 12px; line-height: 1.45; color: var(--text-on-muted); }
.m-pop__r[hidden] { display: none; }

.ag-col {
  min-width: 0; align-self: stretch;
  padding: clamp(14px, 1.6vw, 18px); border-radius: var(--radius-card);
  border: 1px solid var(--surface-border); background: var(--surface);
  box-shadow: var(--shadow-glass);
}
.ag-col[hidden] { display: none; }
.ag-head { margin-bottom: 12px; }
.ag-head[hidden] { display: none; }
.ag-wd { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-on-muted); }
.ag-date { margin-top: 1px; font-size: 19px; font-weight: 900; letter-spacing: -.03em; color: var(--ink); }
.ag-slot { display: grid; gap: 6px; }
.ag-slot[hidden] { display: none; }
.ag-slot + .ag-slot { margin-top: 12px; }
.ag-hour { display: flex; align-items: center; gap: 9px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; color: var(--text-on-muted); }
.ag-hour[hidden] { display: none; }
.ag-hour::after { content: ""; flex: 1; height: 1px; background: var(--surface-border); }

.ag-card {
  display: grid; grid-template-columns: 3px minmax(0, 1fr) auto auto; align-items: stretch;
  width: 100%; padding: 0; overflow: hidden;
  border: 1px solid var(--surface-border); border-radius: 13px; background: var(--surface-muted);
  transition: border-color .15s ease;
}
.ag-card[hidden] { display: none; }
.ag-card:hover { border-color: var(--teal-300); }
.ag-bar { width: 3px; height: auto; }
.ag-body { min-width: 0; padding: 9px 10px 9px 12px; }
.ag-name { margin: 0; font-size: 14.5px; font-weight: 700; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-sub { margin: 1px 0 0; font-size: 12.5px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-links { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.ag-links[hidden] { display: none; }
.ag-links a { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 8px; color: var(--ink-muted); transition: background-color .15s ease, color .15s ease; }
.ag-links a:hover { background: var(--surface-muted); color: var(--teal-700); }
.ag-meta { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 3px; padding: 9px 12px 9px 8px; font-size: 12px; color: var(--ink-muted); text-align: right; white-space: nowrap; }
.ag-meta[hidden] { display: none; }
.ag-meta strong { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }

.ag-flag { display: inline-flex; align-items: center; height: 18px; padding: 0 8px; border-radius: 99px; font-size: 10.5px; font-weight: 700; }
.ag-flag[hidden] { display: none; }
.ag-flag--neu { background: var(--tint-coral-soft); color: var(--coral-ink); }
.ag-flag--kunde { background: var(--tint-teal-strong); color: var(--teal-700); }

.ag-card--past { background: var(--surface-past); }
.ag-card--past .ag-name, .ag-card--past .ag-sub, .ag-card--past .ag-meta strong { color: var(--text-on-past); }
.ag-card--past .ag-bar { opacity: .4; }
.ag-done { display: inline-flex; align-items: center; gap: 4px; height: 18px; padding: 0 8px; border-radius: 99px; background: color-mix(in srgb, var(--success) 14%, transparent); font-size: 10.5px; font-weight: 700; color: var(--success-ink); }
.ag-done[hidden] { display: none; }

.ag-act { display: flex; align-items: center; gap: 6px; padding: 0 11px 0 4px; }
.ag-act[hidden] { display: none; }
.ag-act form { display: flex; margin: 0; }
.ag-act button, .ag-act a.ag-actbtn {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border: 1px solid var(--surface-border); border-radius: 11px;
  background: linear-gradient(180deg, var(--surface), var(--surface-muted));
  box-shadow: 0 1px 2px rgba(13,33,48,.08), inset 0 1px 0 rgba(255,255,255,.7);
  color: var(--teal-700); cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .18s cubic-bezier(.32,.72,0,1);
}
html[data-theme="dark"] .ag-act button, html[data-theme="dark"] .ag-act a.ag-actbtn { box-shadow: 0 1px 2px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.06); }
.ag-act button::after, .ag-act a.ag-actbtn::after {
  content: ""; position: absolute; left: -12%; right: -12%; top: -52%; height: 80%;
  border-radius: 50%; background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0));
  pointer-events: none;
}
html[data-theme="dark"] .ag-act button::after, html[data-theme="dark"] .ag-act a.ag-actbtn::after { background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,0)); }
.ag-act button svg, .ag-act a.ag-actbtn svg { position: relative; }
.ag-act button:hover, .ag-act a.ag-actbtn:hover { border-color: var(--teal-300); box-shadow: 0 4px 12px rgba(34,84,104,.2), inset 0 1px 0 rgba(255,255,255,.8); }
.ag-act button:active, .ag-act a.ag-actbtn:active { transform: scale(.92); }
.ag-act button[hidden], .ag-act a.ag-actbtn[hidden] { display: none; }
.ag-act .ag-del { color: #C93A50; }
html[data-theme="dark"] .ag-act .ag-del { color: #FF9AAB; }
.ag-act .ag-del:hover { border-color: color-mix(in srgb, #C93A50 45%, var(--surface-border)); box-shadow: 0 4px 12px rgba(201,58,80,.24), inset 0 1px 0 rgba(255,255,255,.7); }

.ag-empty { padding: 18px 4px; font-size: 13.5px; color: var(--text-on-muted); }
.ag-empty[hidden] { display: none; }

.radarbtn {
  display: inline-flex; align-items: center; gap: 9px; flex: none; white-space: nowrap;
  min-height: 44px; padding: 0 15px 0 9px; border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--success) 30%, var(--surface-border));
  background: color-mix(in srgb, var(--success) 9%, var(--surface));
  color: var(--success-ink); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  transition: border-color .15s ease, transform .18s cubic-bezier(.32,.72,0,1);
}
.radarbtn[hidden] { display: none; }
.radarbtn:hover { border-color: color-mix(in srgb, var(--success) 58%, var(--surface-border)); }
.radarbtn:active { transform: scale(.97); }
.radarbtn__i {
  position: relative; overflow: hidden; flex: none;
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 9px; color: #fff;
  background: linear-gradient(160deg, var(--success), var(--success-ink));
}
.radarbtn__i[hidden] { display: none; }
html[data-theme="dark"] .radarbtn__i { background: linear-gradient(160deg, var(--success), #14795C); }
.radar__sweep {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from 0deg,
    rgba(255,255,255,0) 0deg, rgba(255,255,255,0) 250deg,
    rgba(255,255,255,.10) 300deg, rgba(255,255,255,.34) 348deg, rgba(255,255,255,.62) 360deg);
  animation: radar-sweep 3.6s linear infinite;
}
.radar__blip { transform-origin: 12px 12px; animation: radar-blip 3.6s ease-in-out infinite; }
@keyframes radar-sweep { to { transform: rotate(360deg); } }
@keyframes radar-blip { 0%, 60% { opacity: 0; } 68% { opacity: 1; } 100% { opacity: 0; } }

@container (max-width: 620px) {
  .m-ev, .m-more { display: none; }
  .m-dots { display: flex; }
  .m-day { min-height: 54px; padding: 7px 4px; align-items: center; }
  .cal-hd h1 { font-size: 1.45rem; }
}

.tp-hd { display: flex; align-items: center; gap: 14px; margin-bottom: clamp(16px, 2vw, 22px); }
.tp-hd[hidden] { display: none; }
.tp-hd h1 { margin: 0; font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2rem); font-weight: 900; letter-spacing: -.032em; }

.tp-back {
  flex: none; display: flex; align-items: center; justify-content: center; width: 46px; height: 46px;
  border: 1px solid var(--surface-border); border-radius: 50%;
  background: linear-gradient(180deg, var(--surface), var(--surface-muted));
  box-shadow: 0 1px 3px rgba(13,33,48,.1), inset 0 1px 0 rgba(255,255,255,.7);
  color: var(--ink); cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .18s cubic-bezier(.32,.72,0,1);
}
.tp-back[hidden] { display: none; }
.tp-back:hover { border-color: var(--teal-300); box-shadow: 0 4px 12px rgba(34,84,104,.18); }
.tp-back:active { transform: scale(.93); }
.tp-back:focus-visible { outline: 2px solid var(--coral-500); outline-offset: 2px; }

.tp-card {
  padding: clamp(18px, 2.2vw, 26px); border-radius: var(--radius-card);
  border: 1px solid var(--surface-border);
  background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--teal-500) 5%, var(--surface)));
}
.tp-cols { display: grid; gap: clamp(18px, 2.4vw, 32px); }
.tp-cols[hidden] { display: none; }
@container (min-width: 820px) { .tp-cols { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); } }
.tp-col { min-width: 0; }
.tp-col[hidden] { display: none; }
.tp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tp-two[hidden] { display: none; }
.tp-blocktop { margin-top: 18px; }
.tp-blocktop--wide { margin-top: 22px; }

.tp-lb { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 700; letter-spacing: -.005em; color: var(--ink); }
.tp-lb[hidden] { display: none; }
.tp-lb i { font-style: normal; color: var(--coral-ink); }
.tp-lb em { font-style: normal; font-weight: 500; color: var(--text-on-muted); }
.tp-hint { margin: 8px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--text-on-muted); text-wrap: pretty; }
.tp-error { margin: 14px 0 0; font-size: 13.5px; font-weight: 700; color: var(--danger-ink); }

.tp-fld {
  width: 100%; min-height: 48px; padding: 0 14px;
  border: 1px solid var(--surface-border); border-radius: 12px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 15px;
}
.tp-fld:focus { outline: none; border-color: var(--coral-500); box-shadow: 0 0 0 3px color-mix(in srgb, var(--coral-500) 18%, transparent); }
textarea.tp-fld { min-height: 132px; padding: 12px 14px; line-height: 1.55; resize: vertical; }

.tp-seg { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-muted); border: 1px solid var(--surface-border); }
.tp-seg[hidden] { display: none; }
.tp-seg button {
  flex: 1; min-height: 42px; border: 0; border-radius: 10px; background: transparent;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--text-on-muted); cursor: pointer;
  transition: background-color .16s ease, color .16s ease, transform .2s cubic-bezier(.32,.72,0,1);
}
.tp-seg button:active { transform: scale(.97); }
.tp-seg button.on { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(13,33,48,.14); }

.tp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tp-chips[hidden] { display: none; }
.tp-chip {
  min-height: 42px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--surface-border); background: var(--surface);
  font: inherit; font-size: 13.5px; font-weight: 700; color: var(--text-on-muted); cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background-color .16s ease, transform .2s cubic-bezier(.32,.72,0,1);
}
.tp-chip:hover { border-color: var(--teal-300); color: var(--ink); }
.tp-chip:active { transform: scale(.97); }
.tp-chip.on { border-color: transparent; background: var(--coral-500); color: #fff; box-shadow: 0 6px 16px rgba(240,96,47,.26); }

.tp-linkrow { margin-top: 10px; }
.tp-linkrow[hidden] { display: none; }

.tp-save {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; min-height: 54px; margin-top: clamp(16px, 2vw, 22px);
  border: 0; border-radius: 999px;
  background: linear-gradient(180deg, #FF8F72, #F0602F); color: #fff;
  font: inherit; font-size: 16px; font-weight: 800; cursor: pointer;
  box-shadow: 0 10px 26px rgba(240,96,47,.3);
  transition: filter .16s ease, transform .2s cubic-bezier(.32,.72,0,1);
}
.tp-save[hidden] { display: none; }
.tp-save:hover { filter: brightness(1.05); }
.tp-save:active { transform: scale(.98); }

.tp-near {
  display: flex; align-items: center; gap: 13px; width: 100%; margin-top: 16px;
  padding: 14px 15px; border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--success) 28%, var(--surface-border));
  background: linear-gradient(100deg, color-mix(in srgb, var(--success) 11%, var(--surface)), var(--surface) 72%);
  font: inherit; text-align: left; color: var(--ink); cursor: pointer;
  transition: border-color .15s ease, transform .2s cubic-bezier(.32,.72,0,1);
}
.tp-near[hidden] { display: none; }
.tp-near:hover { border-color: color-mix(in srgb, var(--success) 55%, var(--surface-border)); }
.tp-near:active { transform: scale(.99); }
.tp-near__i {
  position: relative; overflow: hidden; flex: none;
  display: flex; align-items: center; justify-content: center; width: 42px; height: 42px;
  border-radius: 14px; color: #fff;
  background: linear-gradient(160deg, var(--success), var(--success-ink));
  box-shadow: 0 5px 14px rgba(15,110,86,.3), inset 0 1px 0 rgba(255,255,255,.4);
}
.tp-near__i[hidden] { display: none; }
html[data-theme="dark"] .tp-near__i { background: linear-gradient(160deg, var(--success), #14795C); }
.tp-near__t { display: block; font-size: 14.5px; font-weight: 700; color: var(--success-ink); }
.tp-near__t[hidden] { display: none; }
.tp-near__s { display: block; margin-top: 1px; font-size: 12.5px; color: var(--text-on-muted); }
.tp-near__s[hidden] { display: none; }

.tp .premium-field { position: relative; }
.tp .premium-field[hidden] { display: none; }
.tp .premium-field-trigger {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 7px 0 13px;
  border: 1px solid var(--surface-border); border-radius: 12px; background: var(--surface);
  font: inherit; font-size: 15px; font-weight: 600; color: var(--ink); cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.tp .premium-field-trigger[hidden] { display: none; }
.tp .premium-field-trigger:hover { border-color: var(--teal-300); box-shadow: 0 2px 6px rgba(13,33,48,.1); }
.tp .premium-field-trigger:focus-visible { outline: 2px solid var(--coral-500); outline-offset: 2px; border-color: var(--surface-border); }
.tp .premium-field-trigger .icon-lead { flex: none; display: flex; color: var(--teal-700); }
.tp .premium-field-trigger .trigger-text { flex: 1; text-align: left; }
.tp .premium-field-trigger .icon-chevron {
  flex: none; display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--surface-muted); color: var(--ink-muted);
  transition: background-color .15s ease, color .15s ease, transform .2s cubic-bezier(.32,.72,0,1);
}
.tp .premium-field-trigger:hover .icon-chevron { background: var(--tint-teal-strong); color: var(--teal-700); }
.tp .premium-field.is-open .premium-field-trigger { border-color: var(--teal-300); }
.tp .premium-field.is-open .premium-field-trigger .icon-chevron { background: var(--tint-coral-soft); color: var(--coral-ink); transform: rotate(180deg); }

.tp .premium-date-panel, .tp .premium-time-panel {
  left: 0; right: 0; width: auto; min-width: 100%; max-width: none; top: calc(100% + 8px);
  padding: 10px; border-radius: 16px;
  border: 1px solid var(--surface-border); background: var(--surface);
  box-shadow: 0 18px 44px rgba(13,33,48,.24);
}
.tp .premium-date-panel[hidden], .tp .premium-time-panel[hidden] { display: none; }
.tp .premium-date-head { padding: 0; border: 0; margin-bottom: 9px; background: none; color: var(--ink); }
.tp .premium-date-head span { font-size: 14px; font-weight: 800; color: var(--ink); }
.tp .premium-date-head button {
  width: 32px; height: 32px; padding: 0; align-items: center; justify-content: center;
  border: 1px solid var(--surface-border); border-radius: 9px;
  background: transparent; color: var(--ink); cursor: pointer;
}
.tp .premium-date-body { padding: 0; }
.tp .premium-date-weekdays, .tp .premium-date-grid { gap: 3px; }
.tp .premium-date-weekdays span {
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-on-muted); padding-bottom: 4px;
}
.tp .premium-date-grid button {
  aspect-ratio: auto; min-height: 36px; border: 0; border-radius: 10px; background: transparent;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer;
}
.tp .premium-date-grid button:hover:not(:disabled) { background: var(--surface-muted); }
.tp .premium-date-grid button.is-muted { color: color-mix(in srgb, var(--ink-muted) 60%, transparent); opacity: 1; }
.tp .premium-date-grid button.is-today { border: 0; box-shadow: inset 0 0 0 1.5px var(--teal-300); font-weight: 700; }
.tp .premium-date-grid button.is-selected { background: var(--coral-500); color: #fff; font-weight: 700; box-shadow: none; }

.tp .premium-time-body { padding: 0; }
.tp .premium-time-columns { background: var(--surface-muted); border-radius: 12px; }
.tp .premium-time-actions { margin-top: 10px; }
.tp .premium-time-actions button { min-height: 40px; border-radius: 10px; font: inherit; font-size: 13.5px; font-weight: 700; }
.tp .premium-time-actions .time-cancel { border: 1px solid var(--surface-border); background: transparent; color: var(--ink); }
.tp .premium-time-actions .time-apply { border: 0; background: var(--coral-500); color: #fff; }

@container (max-width: 819px) {
  .tp-card { padding: 20px 18px 22px; }
  .tp-cols { gap: 22px; }
  textarea.tp-fld { min-height: 108px; }
}

@container (max-width: 560px) {
  .tp-hd { gap: 11px; margin-bottom: 14px; }
  .tp-hd h1 { font-size: 1.45rem; }
  .tp-back { width: 44px; height: 44px; }
  .tp-card { padding: 16px 14px 18px; border-radius: 20px; }
  .tp-two { grid-template-columns: 1fr; gap: 13px; }
  .tp-fld, .tp .premium-field-trigger { min-height: 50px; font-size: 16px; }
  textarea.tp-fld { min-height: 104px; font-size: 16px; }
  .tp-seg button { min-height: 46px; font-size: 14.5px; }
  .tp-chips .tp-chip { flex: 1 1 calc(50% - 4px); min-height: 48px; }
  .tp-near { padding: 13px; }
  .tp-near__i { width: 44px; height: 44px; }
  .tp .premium-date-grid button { min-height: 44px; font-size: 14px; }
  .tp .premium-date-head button { width: 38px; height: 38px; }
  .tp-save { min-height: 52px; font-size: 15.5px; }
}

.ag-liste { min-width: 0; }
.ag-liste[hidden] { display: none; }
.ag-route { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--surface-border); }
.ag-route[hidden] { display: none; }
.ag-route__map { height: 38svh; min-height: 260px; border-radius: 14px; overflow: hidden; background: var(--surface-muted); }
.ag-route__map[hidden] { display: none; }

@media (min-width: 1336px) {
  .cal { height: calc(100svh - 64px); min-height: 520px; display: flex; flex-direction: column; }
  .cal[hidden] { display: none; }
  .cal-body { flex: 1 1 auto; min-height: 0; align-items: stretch; }
  .cal-card, .ag-col { display: flex; flex-direction: column; min-height: 0; }
  .m-rows { flex: 1 1 auto; min-height: 0; grid-auto-rows: minmax(0, 1fr); }
  .m-day { min-height: 0; }
  .m-day { gap: 2px; }
  .m-num { flex: none; height: 18px; }
  .m-ev { min-height: 28px; }
  .m-more { flex: none; margin-top: 0; font-size: 10px; line-height: 1.1; }
  .ag-liste { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
  .ag-route { flex: none; }
  .ag-route__map { height: 190px; min-height: 190px; }
  .ag-route .cal-routebtns { grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 10px; }
  .ag-route .ag-routebtn { min-height: 40px; font-size: 12.5px; padding: 0 10px; }
}

.ag-routebtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--surface-border);
  background: linear-gradient(180deg, var(--surface), var(--surface-muted));
  box-shadow: 0 1px 2px rgba(13, 33, 48, .08), inset 0 1px 0 rgba(255, 255, 255, .7);
  color: var(--teal-700); font: inherit; font-size: 13px; font-weight: 700; letter-spacing: -.005em;
  text-align: center; cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .18s cubic-bezier(.32,.72,0,1);
}
.ag-routebtn[hidden] { display: none; }
.ag-routebtn svg { flex: none; }
.ag-routebtn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-routebtn:hover { border-color: var(--teal-300); box-shadow: 0 4px 12px rgba(34, 84, 104, .2), inset 0 1px 0 rgba(255, 255, 255, .8); }
.ag-routebtn:active { transform: scale(.97); }
.ag-routebtn--haupt {
  border-color: transparent; color: #fff;
  background: linear-gradient(180deg, #4A94A8, #225468);
  box-shadow: 0 6px 16px rgba(34, 84, 104, .28), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.ag-routebtn--haupt:hover { border-color: transparent; box-shadow: 0 8px 20px rgba(34, 84, 104, .34), inset 0 1px 0 rgba(255, 255, 255, .24); }
html[data-theme="dark"] .ag-routebtn { box-shadow: 0 1px 2px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .06); }

@media (max-height: 900px) {
  .tp-hd { margin-bottom: 12px; }
  .tp-card { padding: 16px 20px 18px; }
  .tp-blocktop { margin-top: 12px; }
  .tp-blocktop--wide { margin-top: 14px; }
  .tp-chips { margin-top: 8px; }
  .tp-hint { margin-top: 6px; }
  .tp-near { margin-top: 12px; padding: 11px 13px; }
  .tp-near__i { width: 38px; height: 38px; }
  .tp-save { margin-top: 12px; min-height: 50px; }
  textarea.tp-fld { min-height: 104px; }
}

.cal :focus-visible, .tp :focus-visible { outline: 2px solid var(--coral-500); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .cal *, .tp * { transition-duration: 1ms !important; }
  .radar__sweep, .radar__blip { animation: none; opacity: .7; }
  .m-day:active, .m-arrow:active, .m-today:active, .ag-act button:active, .ag-act a.ag-actbtn:active,
  .tp-back:active, .tp-save:active, .tp-chip:active, .tp-seg button:active, .tp-near:active,
  .radarbtn:active, .m-pick__btn:active { transform: none; }
}

@media (prefers-contrast: more) {
  .m-day, .ag-card, .tp-fld, .tp .premium-field-trigger, .tp-chip, .tp-seg, .m-pick__btn, .tp .premium-date-panel, .tp .premium-time-panel, .m-panel, .cal-card, .tp-card,
  .ag-act button, .ag-act a.ag-actbtn, .tp-back, .m-arrow, .m-today, .radarbtn, .tp-near { border-color: var(--ink); }
}
