/* JANUS component classes - ported from janus.html.
   Class names are unchanged from the mockup. Reset and table rules
   are scoped under the .janus root class so they never leak outside a JANUS surface.
   "#0e161a on accent in dark mode" is expressed through --on-accent. */

/* Zero-specificity reset: Radzen component styles always win over it. */
:where(.janus, .janus *) { box-sizing: border-box; margin: 0; padding: 0; }
.janus {
  font-family: var(--font-sans);
  background: var(--page-bg); color: var(--text-primary);
  transition: background 0.25s, color 0.25s;
  -webkit-font-smoothing: antialiased;
  font-size: 13.5px; line-height: 1.4;
}
.janus :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .janus, .janus * { transition: none !important; } }

/* Schwebende Shell */
.app {
  display: flex;
  height: calc(100vh - 28px);
  margin: 14px;
  background: var(--bg-primary);
  border-radius: var(--r-shell);
  box-shadow: var(--shadow-shell);
  overflow: hidden;
  transition: background 0.25s;
}

/* Sidebar */
.sidebar {
  width: 218px; flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 0 10px;
  transition: background 0.25s, border-color 0.25s;
}
.logo { display: flex; align-items: center; gap: 11px; padding: 1.35rem 0.75rem 1.2rem; }
.logo-mark { width: 34px; height: auto; flex-shrink: 0; }
.logo-text { font-size: 16px; font-weight: 600; color: var(--text-primary); letter-spacing: 0.13em; line-height: 1.15; }
.logo-sub { font-size: 9.5px; color: var(--text-tertiary); letter-spacing: 0.07em; margin-top: 2px; white-space: nowrap; }
[data-theme="dark"] .logo-mark, [data-theme="dark"] .brand-word { filter: brightness(1.45); }
.brand-foot { display: flex; flex-direction: column; gap: 7px; padding-top: 1rem; border-top: 1px solid var(--border); }
.brand-word { width: 156px; height: auto; opacity: 0.75; }
.brand-meta { font-size: 11px; color: var(--text-tertiary); line-height: 1.55; }
.nav-section {
  font-size: 10.5px; font-weight: 600; color: var(--text-tertiary);
  letter-spacing: 0.04em; padding: 1rem 0.75rem 0.4rem;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0.75rem; cursor: pointer; font-size: 13.5px;
  color: var(--text-secondary); border-radius: var(--r-nav);
  transition: all 0.15s; user-select: none; margin-bottom: 2px;
  text-decoration: none;
}
.nav-item:hover { background: var(--bg-secondary); color: var(--text-primary); }
.nav-item.active { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.nav-icon { width: 16px; height: 16px; flex-shrink: 0; }

/* Profil-Fuss */
.sidebar-user {
  margin-top: auto; padding: 0.85rem 0.75rem;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; border-radius: var(--r-nav); transition: background 0.15s;
}
.sidebar-user:hover { background: var(--bg-secondary); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--tint-aqua); color: var(--accent-text);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.user-name { font-size: 13px; font-weight: 600; color: var(--text-primary); line-height: 1.2; }
.user-role { font-size: 11px; color: var(--text-tertiary); }

/* Main */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.topbar {
  padding: 1.15rem 1.6rem 0.9rem;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.topbar-title { font-size: 21px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.4px; }
.topbar-sub { font-size: 12px; color: var(--text-tertiary); margin-top: 1px; }
.topbar-right { display: flex; gap: 8px; align-items: center; }

/* Buttons */
.btn {
  padding: 7px 14px; border-radius: var(--r-btn); font-size: 13px; cursor: pointer;
  border: 1px solid var(--border-md); background: var(--bg-primary);
  color: var(--text-primary); font-family: var(--font-sans); font-weight: 500;
  transition: all 0.15s;
}
.btn:hover { background: var(--bg-secondary); }
.btn-primary { background: var(--accent); color: var(--on-accent); border-color: transparent; font-weight: 600; }
.btn-primary:hover { background: var(--accent-deep); }
[data-theme="dark"] .btn-primary:hover { opacity: 0.85; background: var(--accent); }
.btn-pill { border-radius: var(--r-pill); padding: 5px 13px; font-size: 12px; }

.theme-toggle, .icon-btn {
  cursor: pointer; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border-md); background: var(--bg-primary);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; color: var(--text-secondary); flex-shrink: 0;
}
.theme-toggle:hover, .icon-btn:hover { background: var(--bg-secondary); color: var(--text-primary); }
.icon-btn:hover { color: var(--danger-text); border-color: var(--danger-text); }

/* Pages: one scroll area per view. Show with .page.active */
.page { display: none; flex: 1; overflow-y: auto; padding: 0.25rem 1.6rem 1.6rem; flex-direction: column; gap: 1rem; }
.page.active { display: flex; }
.page::-webkit-scrollbar { width: 8px; }
.page::-webkit-scrollbar-thumb { background: var(--border-md); border-radius: var(--r-pill); }

/* Pastell-Statistikkacheln */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat-card {
  background: var(--bg-primary); border-radius: var(--r-card);
  border: 1px solid var(--border); padding: 1rem 1.15rem;
  transition: background 0.25s, border-color 0.25s;
}
.stat-card.tint-aqua { background: var(--tint-aqua); border-color: var(--tint-aqua-line); }
.stat-card.tint-peri { background: var(--tint-peri); border-color: var(--tint-peri-line); }
.stat-card.tint-sage { background: var(--tint-sage); border-color: var(--tint-sage-line); }
.stat-card.tint-sand { background: var(--tint-sand); border-color: var(--tint-sand-line); }
.stat-top { display: flex; align-items: flex-start; justify-content: space-between; }
.stat-chip {
  width: 30px; height: 30px; border-radius: 10px;
  background: rgba(255,255,255,0.65); display: flex;
  align-items: center; justify-content: center; flex-shrink: 0;
  color: var(--text-secondary);
}
[data-theme="dark"] .stat-chip { background: rgba(255,255,255,0.07); }
.stat-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 5px; font-weight: 500; }
.stat-value { font-size: 25px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.8px; }
.stat-badge {
  display: inline-flex; align-items: center; gap: 3px; font-size: 11px;
  margin-top: 6px; padding: 2px 8px; border-radius: var(--r-pill); font-weight: 600;
}
.badge-up { background: var(--success-bg); color: var(--success-text); }
.badge-down { background: var(--danger-bg); color: var(--danger-text); }

/* Karten */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.card {
  background: var(--bg-primary); border-radius: var(--r-card);
  border: 1px solid var(--border); transition: background 0.25s, border-color 0.25s;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem 0.75rem;
}
.card-title { font-size: 15px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.2px; }
.card-body { padding: 0 1.25rem 1.15rem; }

/* Promo-Karte */
.promo {
  background: linear-gradient(140deg, var(--accent) 0%, var(--accent-deep) 100%);
  border-radius: var(--r-card); padding: 1.25rem; color: #fff;
  display: flex; flex-direction: column; gap: 4px;
}
[data-theme="dark"] .promo { background: linear-gradient(140deg, #2d5f6e 0%, #15242b 100%); }
.promo-title { font-size: 15px; font-weight: 700; }
.promo-text { font-size: 12.5px; opacity: 0.78; line-height: 1.5; }
.promo-btn {
  margin-top: 10px; align-self: flex-start; background: #fff; color: var(--accent-deep);
  border: none; border-radius: var(--r-pill); padding: 7px 16px;
  font-size: 12.5px; font-weight: 600; cursor: pointer;
  font-family: var(--font-sans); transition: transform 0.15s;
}
.promo-btn:hover { transform: translateY(-1px); }

/* Eintraege */
.time-entry { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.time-entry:last-child { border-bottom: none; }
.entry-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.entry-info { flex: 1; min-width: 0; }
.entry-project { font-size: 13.5px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry-task { font-size: 11.5px; color: var(--text-secondary); }
.entry-tag { font-size: 10.5px; padding: 3px 9px; border-radius: var(--r-pill); white-space: nowrap; font-weight: 600; display: inline-block; }
.entry-time { font-size: 13px; font-weight: 500; color: var(--text-secondary); font-family: var(--font-mono); white-space: nowrap; }

/* Balkendiagramm */
.bar-chart { display: flex; align-items: flex-end; gap: 7px; height: 100px; padding-bottom: 4px; }
.bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; justify-content: flex-end; }
.bar { width: 100%; border-radius: 6px 6px 3px 3px; background: var(--tint-aqua-line); transition: background 0.25s; }
.bar.today { background: var(--accent); }
.bar-label { font-size: 10.5px; color: var(--text-tertiary); font-weight: 500; }
.progress-wrap { margin-top: 12px; }
.progress-info { display: flex; justify-content: space-between; margin-bottom: 6px; }
.progress-bar { height: 7px; background: var(--bg-tertiary); border-radius: var(--r-pill); overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); border-radius: var(--r-pill); transition: width 0.4s ease; }

/* Schnelleingabe */
.quick-add { display: flex; gap: 8px; margin-bottom: 11px; }
.input-field {
  flex: 1; padding: 8px 12px; border-radius: var(--r-btn);
  border: 1px solid var(--border-md); background: var(--bg-secondary);
  font-size: 13px; color: var(--text-primary); font-family: var(--font-sans);
  outline: none; transition: all 0.15s;
}
.input-field:focus { border-color: var(--accent); background: var(--bg-primary); }
.input-field::placeholder { color: var(--text-tertiary); }
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.tag {
  font-size: 11.5px; padding: 4px 11px; border-radius: var(--r-pill); cursor: pointer;
  border: 1px solid var(--border-md); background: var(--bg-secondary);
  color: var(--text-secondary); transition: all 0.15s; font-weight: 500;
}
.tag:hover { color: var(--text-primary); }
.tag.active { background: var(--accent); color: var(--on-accent); border-color: transparent; font-weight: 600; }

/* Filterleisten und Tabellen */
.report-filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.table-wrap { background: var(--bg-primary); border-radius: var(--r-card); border: 1px solid var(--border); overflow: hidden; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table-wrap thead th {
  background: var(--bg-secondary); font-size: 11px; font-weight: 600;
  color: var(--text-secondary); letter-spacing: 0.02em;
  padding: 11px 1.25rem; text-align: left; border-bottom: 1px solid var(--border);
}
.table-wrap tbody td { padding: 11px 1.25rem; border-bottom: 1px solid var(--border); color: var(--text-primary); }
.table-wrap tbody tr:last-child td { border-bottom: none; }
.table-wrap tbody tr:hover td { background: var(--bg-secondary); }

/* Projekte */
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.project-card {
  background: var(--bg-primary); border-radius: var(--r-card);
  border: 1px solid var(--border); padding: 1.25rem; transition: all 0.15s;
}
.project-card:hover { border-color: var(--border-md); box-shadow: var(--shadow-md); }
.project-header { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.project-dot { width: 13px; height: 13px; border-radius: 4px; flex-shrink: 0; }
.project-name { font-size: 14.5px; font-weight: 700; color: var(--text-primary); }
.project-client { font-size: 12px; color: var(--text-secondary); }
.project-stats { display: flex; gap: 18px; margin-bottom: 13px; }
.ps-label { font-size: 11px; color: var(--text-tertiary); margin-bottom: 2px; }
.ps-value { font-size: 16px; font-weight: 700; color: var(--text-primary); }

/* Formulare */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.form-input {
  padding: 9px 13px; border-radius: var(--r-btn); border: 1px solid var(--border-md);
  background: var(--bg-secondary); font-size: 13.5px; color: var(--text-primary);
  font-family: var(--font-sans); outline: none; transition: all 0.15s;
}
.form-input:focus { border-color: var(--accent); background: var(--bg-primary); }
select.form-input { cursor: pointer; }
select.form-input:disabled { cursor: not-allowed; opacity: 0.6; }
.form-hint { font-size: 11px; color: var(--text-tertiary); }
.num { font-family: var(--font-mono); }

/* Dauerfeld mit 0,25-Schritten */
.duration-field { display: flex; align-items: stretch; gap: 6px; }
.duration-field .form-input {
  flex: 1; min-width: 0; text-align: center;
  font-family: var(--font-mono); font-size: 15px; font-weight: 500;
  -moz-appearance: textfield;
}
.duration-field .form-input::-webkit-outer-spin-button,
.duration-field .form-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.duration-step {
  width: 40px; flex-shrink: 0; border-radius: var(--r-btn);
  border: 1px solid var(--border-md); background: var(--bg-secondary);
  color: var(--text-secondary); font-size: 17px; cursor: pointer;
  font-family: var(--font-sans); transition: all 0.15s;
}
.duration-step:hover { background: var(--accent-light); color: var(--accent-text); border-color: transparent; }
.form-input.invalid { border-color: var(--danger-text); }
