/* ============================================================
   NTX INTERNAL — SaaS DASHBOARD DESIGN SYSTEM
   Inspiriert vom NTX-Notification-HTML-Body:
   - Royal-Blue Akzent, weiße Cards auf hellgrauem BG
   - Clean, Apple-like Typografie, Sidebar-Navigation links
   ============================================================ */

:root {
  /* ── Neutrale Palette ─────────────────────────── */
  --color-bg:         #F3F4F8;
  --color-surface:    #FFFFFF;
  --color-surface-2:  #F8F9FC;
  --color-surface-3:  #F1F3F9;
  --color-border:     #E5E7EB;
  --color-border-2:   #EEF0F5;
  --color-text:       #0F172A;
  --color-text-muted: #6B7280;
  --color-text-faint: #9CA3AF;

  /* ── Akzent (Royal Blue wie im Email-Body) ─────── */
  --color-accent:     #2754DB;
  --color-accent-2:   #1F44BC;
  --color-accent-bg:  #EEF2FF;
  --color-accent-soft:#F5F7FF;

  --color-danger:     #DC2626;
  --color-danger-bg:  #FEF2F2;
  --color-success:    #16A34A;
  --color-success-bg: #F0FDF4;
  --color-warning:    #D97706;

  /* ── Category accents (bestehend, leicht angepasst) ─── */
  --cat-meetings:   #2754DB;
  --cat-calls:      #7C3AED;
  --cat-deep-work:  #0891B2;
  --cat-admin:      #EA580C;
  --cat-emails:     #D97706;
  --cat-pause:      #64748B;
  --cat-sonstiges:  #9333EA;

  /* ── Shape & Depth ────────────────────────────── */
  --radius:     14px;
  --radius-sm:  10px;
  --radius-xs:  6px;
  --shadow-xs:  0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm:  0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow:     0 4px 24px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-lg:  0 20px 50px rgba(15, 23, 42, 0.12);

  /* ── Sidebar ─────────────────────────────────── */
  --sidebar-w:  248px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; -webkit-text-size-adjust: 100%; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   APP LAYOUT (Sidebar + Main)
   ============================================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ───────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  padding: 26px 14px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 50;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 22px;
  border-bottom: 1px solid var(--color-border-2);
  margin-bottom: 18px;
  text-decoration: none;
  transition: opacity 0.15s;
}

.sidebar-brand:hover { opacity: 0.88; }

.sidebar-brand-logo {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 10px rgba(39, 84, 219, 0.25));
}

.sidebar-brand-logo svg {
  width: 100%;
  height: 100%;
  display: block;
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.sidebar-brand-name {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.03em;
}

.sidebar-brand-name .brand-accent {
  color: var(--color-accent);
  margin-left: 1px;
}

.sidebar-brand-sub {
  font-size: 0.65rem;
  color: var(--color-text-faint);
  margin-top: 4px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}

.sidebar-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-faint);
  padding: 10px 12px 6px;
}

/* Wenn Label direkt am Sidebar-Top steht (kein Brand-Block darueber) */
.sidebar-section-label--top { padding-top: 18px; }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--color-text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  position: relative;
}

.sidebar-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke-width: 1.75;
  color: var(--color-text-faint);
  transition: color 0.15s;
}

.sidebar-link:hover {
  background: var(--color-surface-3);
  color: var(--color-text);
}
.sidebar-link:hover svg { color: var(--color-text-muted); }

.sidebar-link.is-active {
  background: var(--color-accent-bg);
  color: var(--color-accent);
  font-weight: 600;
}
.sidebar-link.is-active svg { color: var(--color-accent); }

.sidebar-spacer { flex: 1; }

/* ── Sidebar Footer: User + NTX-Branding ─── */
.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border-2);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 9px;
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent) 0%, #5B7FE8 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 0.7rem;
  color: var(--color-text-faint);
  margin-top: 1px;
}

.sidebar-logout {
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 9px;
  color: var(--color-text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 7px 12px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
}

.sidebar-logout:hover {
  background: var(--color-danger-bg);
  border-color: #FECACA;
  color: var(--color-danger);
}

.sidebar-brandmark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 0 2px;
  font-size: 0.7rem;
  color: var(--color-text-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.sidebar-brandmark-logo {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-transform: none;
}

.sidebar-brandmark-logo .x-mark {
  color: var(--color-accent);
  transform: translateY(-1px);
  font-weight: 800;
  margin: 0 -1px;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: 56px 40px 64px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 34px;
  gap: 20px;
  flex-wrap: wrap;
}

.page-title {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.page-subtitle {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.hidden { display: none !important; }

/* ============================================================
   TAB BAR (User tabs)
   ============================================================ */
.tab-bar {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  display: flex;
  padding: 4px;
  gap: 2px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-xs);
  flex-wrap: wrap;
}

.tab-btn {
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--color-text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 16px;
  transition: color 0.2s, background 0.2s;
  letter-spacing: -0.005em;
}

.tab-btn:hover { color: var(--color-text); background: var(--color-surface-3); }

.tab-btn.active {
  color: var(--color-accent);
  background: var(--color-accent-bg);
  font-weight: 600;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-group label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
select,
textarea {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.92rem;
  padding: 10px 13px;
  width: 100%;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

input::placeholder, textarea::placeholder { color: var(--color-text-faint); }

input:focus, select:focus, textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(39, 84, 219, 0.12);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

select option {
  background: var(--color-surface);
  color: var(--color-text);
}

textarea { resize: vertical; min-height: 60px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  background: var(--color-accent);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 20px;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(39, 84, 219, 0.15), 0 2px 8px rgba(39, 84, 219, 0.18);
  letter-spacing: -0.005em;
}

.btn-primary:hover { background: var(--color-accent-2); box-shadow: 0 2px 4px rgba(39, 84, 219, 0.2), 0 4px 14px rgba(39, 84, 219, 0.25); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-block { width: 100%; }

.btn-secondary {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.87rem;
  font-weight: 500;
  padding: 9px 18px;
  transition: background 0.15s, border-color 0.15s;
}
.btn-secondary:hover { background: var(--color-surface-3); border-color: var(--color-text-faint); }

.btn-logout {
  /* legacy — aus Templates evtl. noch referenziert */
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xs);
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 6px 14px;
  transition: color 0.15s, border-color 0.15s;
}
.btn-logout:hover { color: var(--color-danger); border-color: #FECACA; background: var(--color-danger-bg); }

.btn-delete {
  background: transparent;
  border: none;
  border-radius: 50%;
  color: var(--color-text-faint);
  cursor: pointer;
  font-size: 1.1rem;
  height: 28px;
  width: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
}
.btn-delete:hover { background: var(--color-danger-bg); color: var(--color-danger); }

.btn-danger {
  background: transparent;
  border: 1px solid #FECACA;
  color: var(--color-danger);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-danger:hover { background: var(--color-danger-bg); }

/* ============================================================
   LOGIN / REGISTER
   ============================================================ */
body.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  padding: 20px;
}

.login-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 44px 40px 36px;
  width: 380px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.login-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: var(--color-accent);
  border-radius: 14px;
  margin-bottom: 18px;
  color: #fff;
  box-shadow: 0 4px 14px rgba(39, 84, 219, 0.3);
}

.login-card h1 {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 4px;
  color: var(--color-text);
}

.login-subtitle {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.login-switch {
  margin-top: 22px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.login-switch a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
}

.login-switch a:hover { text-decoration: underline; }

.login-footer {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--color-border-2);
  font-size: 0.7rem;
  color: var(--color-text-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.error-banner {
  background: var(--color-danger-bg);
  border: 1px solid #FECACA;
  border-radius: var(--radius-sm);
  color: #B91C1C;
  font-size: 0.85rem;
  padding: 10px 14px;
  margin-bottom: 20px;
  text-align: left;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 16px;
  border-bottom: 1px solid var(--color-border-2);
  gap: 16px;
  flex-wrap: wrap;
}

.card-header h2 {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-faint);
}

.week-label,
.entry-count {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 500;
  letter-spacing: -0.005em;
}

/* ============================================================
   DAY GRID (Tagesübersicht)
   ============================================================ */
.day-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--color-border-2);
  border-top: 1px solid var(--color-border-2);
}

.day-col {
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  min-height: 124px;
}

.day-col.is-today { background: var(--color-accent-soft); }

.day-col-header {
  padding: 10px 10px 8px;
  border-bottom: 1px solid var(--color-border-2);
  text-align: center;
}

.day-col.is-today .day-col-header {
  border-bottom-color: var(--color-accent);
  border-bottom-width: 2px;
}

.day-name {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-faint);
}

.day-col.is-today .day-name { color: var(--color-accent); }

.day-date {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
  margin-top: 2px;
}

.day-entries {
  padding: 7px 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.day-entry-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 5px;
  padding: 3px 6px;
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.4;
  border-left: 2px solid var(--chip-accent, var(--color-border));
  background: var(--color-surface-2);
  overflow: hidden;
  cursor: default;
}

.day-entry-chip .chip-time { color: var(--color-text); font-variant-numeric: tabular-nums; white-space: nowrap; }

.day-entry-chip .chip-has-note {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--chip-accent, var(--color-text-muted));
  flex-shrink: 0;
  opacity: 0.6;
}

.day-entry-chip.cat-meetings   { --chip-accent: var(--cat-meetings); }
.day-entry-chip.cat-calls      { --chip-accent: var(--cat-calls); }
.day-entry-chip.cat-deep-work  { --chip-accent: var(--cat-deep-work); }
.day-entry-chip.cat-admin      { --chip-accent: var(--cat-admin); }
.day-entry-chip.cat-emails     { --chip-accent: var(--cat-emails); }
.day-entry-chip.cat-pause      { --chip-accent: var(--cat-pause); }
.day-entry-chip.cat-sonstiges  { --chip-accent: var(--cat-sonstiges); }

.day-empty {
  color: var(--color-text-faint);
  font-size: 0.7rem;
  text-align: center;
  padding: 14px 4px;
  opacity: 0.65;
}

@media (max-width: 820px) {
  .day-grid {
    grid-template-columns: repeat(7, minmax(100px, 1fr));
    overflow-x: auto;
  }
}

/* ============================================================
   SUMMARY TABLE
   ============================================================ */
.table-wrapper { overflow-x: auto; }

.summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.summary-table th {
  color: var(--color-text-faint);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 12px 22px;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--color-surface-2);
  border-bottom: 1px solid var(--color-border-2);
}

.summary-table th.num,
.summary-table td.num { text-align: right; }

.summary-table td {
  border-top: 1px solid var(--color-border-2);
  padding: 12px 22px;
  color: var(--color-text);
}

.summary-table tbody tr:hover td { background: var(--color-accent-soft); }

.summary-table tfoot .total-row td {
  border-top: 1px solid var(--color-border);
  font-weight: 700;
  padding: 14px 22px;
  background: var(--color-surface-2);
}

.cat-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: middle;
  flex-shrink: 0;
}

.cat-dot.cat-meetings   { background: var(--cat-meetings); }
.cat-dot.cat-calls      { background: var(--cat-calls); }
.cat-dot.cat-deep-work  { background: var(--cat-deep-work); }
.cat-dot.cat-admin      { background: var(--cat-admin); }
.cat-dot.cat-emails     { background: var(--cat-emails); }
.cat-dot.cat-pause      { background: var(--cat-pause); }
.cat-dot.cat-sonstiges  { background: var(--cat-sonstiges); }

.delta-pos { color: var(--color-success); font-weight: 600; }
.delta-neg { color: var(--color-danger); font-weight: 600; }

/* ============================================================
   ENTRY FORM
   ============================================================ */
.entry-form-card .card-header { border-bottom: 1px solid var(--color-border-2); }

.entry-form {
  padding: 18px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.form-row {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.form-row .form-group {
  min-width: 140px;
  margin-bottom: 0;
}

.form-row .form-group.flex-grow { flex: 1; min-width: 200px; }

.form-row + .form-row { margin-top: 12px; }

.form-submit { flex-shrink: 0; min-width: auto; }

/* ============================================================
   ENTRIES LIST
   ============================================================ */
.entries-list {
  padding: 14px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.entry-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-2);
  border-left: 3px solid var(--card-accent, var(--color-border));
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  transition: background 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.entry-card:hover {
  background: var(--color-surface-2);
  box-shadow: var(--shadow-sm);
  border-color: var(--color-border);
  border-left-color: var(--card-accent, var(--color-border));
}

.entry-card.cat-meetings   { --card-accent: var(--cat-meetings); }
.entry-card.cat-calls      { --card-accent: var(--cat-calls); }
.entry-card.cat-deep-work  { --card-accent: var(--cat-deep-work); }
.entry-card.cat-admin      { --card-accent: var(--cat-admin); }
.entry-card.cat-emails     { --card-accent: var(--cat-emails); }
.entry-card.cat-pause      { --card-accent: var(--cat-pause); }
.entry-card.cat-sonstiges  { --card-accent: var(--cat-sonstiges); }

.entry-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 92px;
  flex-shrink: 0;
}

.entry-date {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
}

.entry-time {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.entry-body {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.entry-cat {
  font-size: 0.87rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--color-text);
}

.entry-note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entry-note::before { content: "— "; }

/* ============================================================
   STATES
   ============================================================ */
.loading-state,
.empty-state {
  color: var(--color-text-muted);
  font-size: 0.88rem;
  padding: 24px 0;
  text-align: center;
}

/* ============================================================
   CATEGORY MANAGER
   ============================================================ */
.cat-manager {
  padding: 16px 22px 20px;
  border-top: 1px solid var(--color-border-2);
  background: var(--color-surface-2);
}

.cat-manager-row {
  display: flex;
  gap: 10px;
}

.input-new-cat {
  flex: 1;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-new-cat:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(39, 84, 219, 0.12);
}

.btn-add-cat {
  background: var(--color-accent-bg);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--color-accent);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 9px 16px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.btn-add-cat:hover { background: var(--color-accent); color: #fff; }

.cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 4px 10px 4px 12px;
  color: var(--color-text);
}
.cat-chip.is-default { opacity: 0.55; }

.cat-chip-del {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--color-text-faint);
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  transition: color 0.1s;
}
.cat-chip-del:hover { color: var(--color-danger); }

/* ============================================================
   WEEK NAVIGATION
   ============================================================ */
.week-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-week-nav {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}
.btn-week-nav:hover:not(:disabled) {
  background: var(--color-accent-bg);
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.btn-week-nav:disabled { opacity: 0.3; cursor: default; }

/* ============================================================
   PROGRESS BARS
   ============================================================ */
.anteil-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.progress-bar-wrap {
  width: 78px;
  height: 5px;
  background: var(--color-surface-3);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--color-accent);
  transition: width 0.4s ease;
}

.progress-bar-fill.cat-meetings  { background: var(--cat-meetings); }
.progress-bar-fill.cat-calls     { background: var(--cat-calls); }
.progress-bar-fill.cat-deep-work { background: var(--cat-deep-work); }
.progress-bar-fill.cat-admin     { background: var(--cat-admin); }
.progress-bar-fill.cat-emails    { background: var(--cat-emails); }
.progress-bar-fill.cat-pause     { background: var(--cat-pause); }
.progress-bar-fill.cat-sonstiges { background: var(--cat-sonstiges); }

/* ============================================================
   INLINE EDIT / NOTE BUTTONS
   ============================================================ */
.btn-edit,
.btn-note-inline {
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--color-text-faint);
  cursor: pointer;
  height: 30px;
  width: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.btn-edit:hover { background: var(--color-accent-bg); color: var(--color-accent); }
.btn-note-inline:hover { background: #FEF3C7; color: #CA8A04; }

.inline-note-form {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-top: 1px solid var(--color-border-2);
  width: 100%;
}
.inline-note-input {
  flex: 1;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xs);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.82rem;
  padding: 5px 9px;
  outline: none;
}
.inline-note-input:focus { border-color: var(--color-accent); }

.btn-note-save, .btn-note-cancel {
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 3px 7px;
}
.btn-note-save { color: var(--color-success); }
.btn-note-save:hover { background: var(--color-success-bg); }
.btn-note-cancel { color: var(--color-text-muted); }
.btn-note-cancel:hover { background: var(--color-surface-3); }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 20px;
}

.modal-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 580px;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--color-border-2);
}

.modal-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.015em;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--color-text-faint);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  padding: 2px 8px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.modal-close:hover { background: var(--color-surface-3); color: var(--color-text); }

#edit-form {
  padding: 18px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ============================================================
   GOAL COLUMN
   ============================================================ */
.goal-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  min-width: 110px;
}

.goal-bar-wrap {
  width: 96px;
  height: 5px;
  background: var(--color-surface-3);
  border-radius: 3px;
  overflow: hidden;
}

.goal-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--color-accent);
  transition: width 0.4s ease;
}

.goal-bar-fill.goal-met { background: var(--color-success); }

.goal-label {
  font-size: 0.74rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.goal-label.goal-met {
  color: var(--color-success);
  font-weight: 600;
}

.btn-set-goal {
  background: transparent;
  border: 1px dashed var(--color-border);
  color: var(--color-text-faint);
  border-radius: var(--radius-xs);
  padding: 2px 9px;
  font-family: inherit;
  font-size: 0.72rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-set-goal:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.modal-card--narrow { max-width: 360px; }

.goal-modal-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.goal-modal-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

#goal-hours-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  background: var(--color-surface);
  color: var(--color-text);
}
#goal-hours-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(39, 84, 219, 0.12);
}

.goal-modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ============================================================
   SHOW MORE
   ============================================================ */
.btn-show-more {
  display: block;
  width: 100%;
  background: transparent;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 10px;
  margin-top: 4px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.btn-show-more:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-soft);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  main { padding: 22px 22px 40px; }
}

@media (max-width: 820px) {
  :root { --sidebar-w: 72px; }
  .sidebar { padding: 18px 10px; }
  .sidebar-brand-text,
  .sidebar-user-info,
  .sidebar-link span,
  .sidebar-section-label,
  .sidebar-logout span,
  .sidebar-brandmark { display: none; }
  .sidebar-brand { justify-content: center; padding: 4px 0 16px; }
  .sidebar-link { justify-content: center; padding: 10px; }
  .sidebar-logout { padding: 9px; }
  .sidebar-user { justify-content: center; }
  main { padding: 18px 18px 36px; }
  .page-title { font-size: 1.3rem; }
}

@media (max-width: 600px) {
  .summary-table th, .summary-table td { padding: 10px 14px; }
  .entries-list { padding: 10px 14px 16px; }
  .form-row { flex-direction: column; gap: 0; }
  .card-header { padding: 14px 16px 12px; }
  main { padding: 14px 14px 28px; }
}
