/* HeinzeriT Zeiterfassung – Brand-Styles nach HeinzeriT Design System */
:root {
  --hit-yellow: #FECC37;
  --hit-orange: #EA6721;
  --hit-pink: #E42067;
  --hit-ink: #2D3537;
  --hit-gradient: linear-gradient(100deg, var(--hit-yellow), var(--hit-orange), var(--hit-pink));

  --accent: var(--hit-orange);
  --accent-hover: #D25A1A;
  --accent-active: #B84E15;
  --accent-soft: #FDF0E8;

  --surface-page: #FBFAF9;
  --surface-card: #FFFFFF;
  --border-default: #DCD9D4;
  --text-primary: #2D3537;
  --text-secondary: #6E6A64;
  --danger: #C0392B;
  --success: #2E7D4F;

  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 3px rgba(34, 31, 28, 0.08);
  --shadow-md: 0 4px 14px rgba(34, 31, 28, 0.10);
  --shadow-lg: 0 10px 30px rgba(34, 31, 28, 0.14);
  --shadow-orange: 0 6px 20px rgba(234, 103, 33, 0.35);

  --font-head: "Ubuntu", system-ui, sans-serif;
  --font-body: "Roboto", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--surface-page);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .eyebrow, button, .tab { font-family: var(--font-head); }
h1 { font-weight: 700; }
h2 { font-weight: 500; font-size: 1.15rem; margin: 0 0 12px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary);
}

#app { max-width: 560px; margin: 0 auto; padding: 0 16px 96px; }

/* ---- Header ---- */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 2px 14px;
  position: sticky; top: 0; z-index: 10;
  background: rgba(251, 250, 249, 0.85);
  backdrop-filter: blur(8px);
}
.logo-tiles { display: grid; grid-template-columns: 10px 22px; grid-template-rows: 16px 16px; gap: 2px; align-items: end; }
.logo-tiles .t-yellow { grid-column: 2; grid-row: 1; background: var(--hit-yellow); border-radius: 4px; height: 16px; }
.logo-tiles .t-orange { grid-column: 2; grid-row: 2; background: var(--hit-orange); border-radius: 4px; height: 16px; }
.logo-tiles .t-pink { grid-column: 1; grid-row: 1 / span 2; align-self: center; background: var(--hit-pink); border-radius: 3px; height: 10px; }
.topbar .title { flex: 1; }
.topbar .title strong { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.01em; }
.topbar .title span { display: block; font-size: 0.72rem; color: var(--text-secondary); }
.demo-badge {
  background: var(--hit-pink); color: #fff; font-size: 0.68rem; font-weight: 500;
  padding: 3px 10px; border-radius: var(--radius-pill); font-family: var(--font-head);
}

/* ---- Cards ---- */
.card {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  margin-bottom: 16px;
}
.card.grad-top { border-top: none; position: relative; }
.card.grad-top::before {
  content: ""; position: absolute; top: 0; left: 16px; right: 16px; height: 3px;
  background: var(--hit-gradient); border-radius: 0 0 3px 3px;
}

/* ---- Buttons ---- */
button {
  cursor: pointer; border: none; font-weight: 500; font-size: 0.95rem;
  transition: all 200ms cubic-bezier(0.2, 0.7, 0.3, 1);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px; border-radius: var(--radius-pill);
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-orange); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-primary:active { background: var(--accent-active); transform: scale(0.98); }
.btn-primary:disabled { background: #E8C7B4; box-shadow: none; cursor: default; transform: none; }
.btn-secondary { background: #fff; color: var(--text-primary); border: 1px solid var(--border-default); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--accent); }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid var(--border-default); }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; margin-top: 16px; }
.btn-row .btn { flex: 1; }
.icon-btn {
  width: 44px; height: 44px; border-radius: var(--radius-pill);
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--text-secondary);
}
.icon-btn:hover { background: var(--accent-soft); color: var(--accent); }
.icon-btn svg { width: 22px; height: 22px; }

/* ---- Aufnahme-Button ---- */
.record-wrap { text-align: center; padding: 26px 0 10px; }
.record-btn {
  width: 128px; height: 128px; border-radius: 50%;
  background: var(--surface-card);
  border: none; position: relative;
  box-shadow: var(--shadow-md);
  display: inline-flex; align-items: center; justify-content: center;
}
.record-btn::before {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  background: var(--hit-gradient); z-index: -1;
}
.record-btn::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--surface-card); z-index: -1; margin: 0;
}
.record-btn svg { width: 48px; height: 48px; color: var(--accent); }
.record-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.record-btn:active { transform: scale(0.97); }
.record-btn.recording svg { color: var(--hit-pink); }
.record-btn.recording { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(228, 32, 103, 0.35); }
  50% { box-shadow: 0 0 0 18px rgba(228, 32, 103, 0); }
}
.record-hint { margin-top: 14px; color: var(--text-secondary); font-size: 0.9rem; }
.record-timer { font-family: var(--font-head); font-weight: 500; color: var(--hit-pink); }

/* ---- Formulare ---- */
label { display: block; font-size: 0.8rem; font-weight: 500; color: var(--text-secondary); margin: 14px 0 6px; font-family: var(--font-head); }
input[type="text"], input[type="email"], input[type="password"], input[type="datetime-local"], input[type="number"], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 14px;
  border: 1px solid var(--border-default); border-radius: var(--radius-md);
  font-family: var(--font-body); font-size: 0.95rem; color: var(--text-primary);
  background: #fff; outline: none;
  transition: border-color 200ms;
}
textarea { resize: vertical; min-height: 72px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(234, 103, 33, 0.15); }
.field-error { border-color: var(--danger) !important; }
.check-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.check-row input { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); }
.check-row label { margin: 0; }

/* ---- Kandidaten-Chips ---- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip {
  border: 1px solid var(--border-default); background: #fff; color: var(--text-primary);
  border-radius: var(--radius-pill); padding: 7px 14px; font-size: 0.85rem;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.selected { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip small { opacity: 0.7; margin-left: 4px; }

/* ---- Alerts / Toast ---- */
.alert { border-radius: var(--radius-md); padding: 12px 16px; font-size: 0.9rem; margin: 12px 0; }
.alert-warn { background: #FFF6E0; border: 1px solid #F2DFA6; color: #7A5B12; }
.alert-error { background: #FCEBE8; border: 1px solid #F0C4BC; color: var(--danger); }
.alert-info { background: var(--accent-soft); border: 1px solid #F2CDB4; color: #8A4517; }
#toast-root { position: fixed; bottom: 24px; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 100; pointer-events: none; }
.toast {
  background: var(--hit-ink); color: #fff; border-radius: var(--radius-pill);
  padding: 12px 22px; font-size: 0.9rem; box-shadow: var(--shadow-lg);
  animation: rise 250ms cubic-bezier(0.2, 0.7, 0.3, 1);
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---- Einträge-Liste ---- */
.entry { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #EFEDE9; }
.entry:last-child { border-bottom: none; }
.entry .time { font-family: var(--font-head); font-size: 0.8rem; color: var(--text-secondary); white-space: nowrap; padding-top: 2px; min-width: 86px; }
.entry .body { flex: 1; }
.entry .who { font-weight: 500; font-size: 0.92rem; }
.entry .what { color: var(--text-secondary); font-size: 0.87rem; margin-top: 2px; }
.entry .dur { font-family: var(--font-head); font-weight: 500; color: var(--accent); font-size: 0.85rem; white-space: nowrap; }

/* ---- Tabs unten ---- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(8px);
  border-top: 1px solid var(--border-default);
  display: flex; justify-content: space-around; padding: 6px 0 max(6px, env(safe-area-inset-bottom));
}
.bottom-nav button {
  background: none; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 0.68rem; color: var(--text-secondary); padding: 6px 18px; border-radius: var(--radius-md);
}
.bottom-nav button.active { color: var(--accent); }
.bottom-nav svg { width: 22px; height: 22px; }

/* ---- Login ---- */
.login-wrap { max-width: 400px; margin: 8vh auto 0; }
.login-hero { text-align: center; margin-bottom: 24px; }
.login-hero .logo-tiles { margin: 0 auto 16px; transform: scale(1.6); }
.login-hero h1 { font-size: 1.5rem; margin: 12px 0 4px; }
.login-hero p { color: var(--text-secondary); margin: 0; font-size: 0.9rem; }
.grad-text { background: var(--hit-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

.muted { color: var(--text-secondary); font-size: 0.85rem; }
.spacer { height: 8px; }
.center { text-align: center; }
.hidden { display: none !important; }
a { color: var(--accent); }

.table-users { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.table-users td, .table-users th { text-align: left; padding: 8px 6px; border-bottom: 1px solid #EFEDE9; }
.badge-ok { color: var(--success); font-weight: 500; }
.badge-no { color: var(--text-secondary); }

.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid rgba(234, 103, 33, 0.25); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite; display: inline-block; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }
