/* ==== Marti Zeiterfassung - Prototyp-Styles ==== */

:root {
  --brand-primary: #0f2545;
  --brand-accent:  #d4a017;
  --bg:            #eef2f7;
  --card-bg:       #ffffff;
  --border:        #d8dee7;
  --text:          #1c2535;
  --text-muted:    #5d6b82;
  --heading:       #0f2545;
  --ok:            #1a7a4a;
  --warn:          #c77400;
  --danger:        #b42318;
  --positive-bg:   #e6f4ec;
  --warn-bg:       #fdf3e3;
  --review-bg:     #fbe8c4;
  --active-bg:     #dae9ff;
  --shadow:        0 2px 8px rgba(15, 37, 69, 0.08);
  --radius:        10px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.45;
}

h1, h2, h3 { color: var(--heading); margin-top: 0; }

a { color: var(--brand-primary); }

/* ===== Logo ===== */
.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-primary);
  color: var(--brand-accent);
  font-weight: 800; font-size: 26px;
  border-radius: 8px;
  letter-spacing: -1px;
}
.logo-brand { font-weight: 800; letter-spacing: 2px; color: var(--brand-primary); }
.logo-sub   { font-size: 12px; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; }
.logo-sm .logo-mark { width: 36px; height: 36px; font-size: 21px; }
.logo-sm .logo-brand { font-size: 14px; }
.logo-sm .logo-sub { font-size: 10px; }

/* ===== Login-Screen ===== */
.login-bg {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f2545 0%, #1a3a7a 50%, #2a4f98 100%);
  padding: 20px;
}
.login-wrapper { width: 100%; max-width: 400px; }
.login-card {
  background: var(--card-bg);
  padding: 32px 28px;
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
.login-card h1 { margin: 18px 0 4px 0; font-size: 22px; }
.login-card .lead { color: var(--text-muted); margin: 0 0 22px 0; font-size: 14px; }
.login-card label { display: block; margin-bottom: 14px; }
.login-card label span {
  display: block; font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 4px;
}
.login-card input {
  width: 100%; padding: 11px 12px;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 15px; background: #fafbfd;
}
.login-card input:focus { outline: 2px solid var(--brand-accent); outline-offset: -1px; }
.login-card .help { text-align: center; margin: 14px 0 0 0; font-size: 13px; }
.footer-note { text-align: center; color: rgba(255,255,255,0.7); font-size: 12px; margin-top: 18px; }
.footer-note a { color: rgba(255,255,255,0.9); }

/* ===== Top-Bar ===== */
.top-bar {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.top-bar-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 12px 20px;
  display: flex; justify-content: space-between; align-items: center;
}
.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--brand-primary); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.user-name { font-weight: 600; font-size: 14px; }
.user-role { font-size: 12px; color: var(--text-muted); }

/* ===== Nav ===== */
.nav-cards {
  max-width: 1100px; margin: 14px auto 0;
  padding: 0 20px;
  display: flex; gap: 8px; flex-wrap: wrap;
}
.nav-card {
  display: inline-block; padding: 8px 16px;
  text-decoration: none; color: var(--text);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px; font-weight: 500;
  transition: all 0.15s;
}
.nav-card:hover { border-color: var(--brand-primary); }
.nav-card.active {
  background: var(--brand-primary); color: white; border-color: var(--brand-primary);
}

/* ===== Main + Cards ===== */
main {
  max-width: 1100px; margin: 0 auto;
  padding: 16px 20px 40px;
  display: flex; flex-direction: column; gap: 16px;
}
.card {
  background: var(--card-bg);
  padding: 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ===== Stempel-Uhr ===== */
.stamp-header { display: flex; justify-content: space-between; align-items: start; gap: 16px; flex-wrap: wrap; }
.stamp-header h2 { margin: 0 0 4px 0; font-size: 18px; }
.stamp-header .muted { margin: 0; color: var(--text-muted); font-size: 14px; }
.live-clock {
  font-family: "SF Mono", Menlo, monospace;
  font-size: 32px; font-weight: 600; color: var(--brand-primary);
  letter-spacing: 1px;
}
.stamp-actions {
  display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 18px 0;
}
.stamp-btn {
  flex: 1 1 120px; min-width: 120px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--text);
}
.stamp-btn:not(:disabled):hover { border-color: var(--brand-primary); }
.stamp-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.stamp-btn.stamp-done { background: var(--positive-bg); border-color: var(--ok); color: var(--ok); }
.stamp-btn.stamp-active {
  background: var(--brand-primary); color: white; border-color: var(--brand-primary);
  box-shadow: 0 4px 14px rgba(15, 37, 69, 0.2);
}

.day-summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px; margin-top: 16px;
  padding-top: 16px; border-top: 1px solid var(--border);
}
.sum-item { display: flex; flex-direction: column; gap: 2px; }
.sum-item span { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.sum-item strong { font-size: 18px; color: var(--heading); }
.positive { color: var(--ok); }
.neutral  { color: var(--text-muted); }

/* ===== Tabellen ===== */
.entry-table, .week-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 14px;
}
.entry-table th, .week-table th,
.entry-table td, .week-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.entry-table th, .week-table th {
  color: var(--text-muted); font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.week-table tfoot td { border-top: 2px solid var(--brand-primary); border-bottom: none; padding-top: 12px; }
.row-today { background: var(--active-bg); }
.row-future { color: var(--text-muted); }

.link-btn {
  background: transparent; border: none;
  color: var(--brand-primary); font-weight: 600;
  cursor: pointer; font-size: 13px;
}
.link-btn:hover { text-decoration: underline; }

/* ===== Kachel-Reihe ===== */
.card-tile-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  padding: 0; background: transparent; box-shadow: none;
}
.tile {
  background: var(--card-bg);
  padding: 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--border);
}
.tile-positive { border-left-color: var(--ok); }
.tile-warn     { border-left-color: var(--warn); }
.tile-label    { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.tile-value    { font-size: 26px; font-weight: 700; color: var(--heading); margin: 4px 0; }
.tile-sub      { font-size: 12px; color: var(--text-muted); }

/* ===== Wochen-Navigation ===== */
.week-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.week-header h2 { margin: 0; font-size: 17px; }
.week-nav {
  background: transparent; border: 1px solid var(--border);
  padding: 6px 14px; border-radius: 6px;
  cursor: pointer; color: var(--text); font-weight: 600;
}

/* ===== Badges ===== */
.badge {
  display: inline-block; padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-ok     { background: var(--positive-bg); color: var(--ok); }
.badge-review { background: var(--review-bg); color: var(--warn); }
.badge-active { background: var(--active-bg); color: var(--brand-primary); }

/* ===== Buttons ===== */
.btn-primary, .btn-secondary {
  padding: 10px 18px; border-radius: var(--radius);
  border: 1px solid var(--brand-primary);
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.btn-primary {
  background: var(--brand-primary); color: white; width: 100%;
}
.btn-primary:hover { background: #17336b; }
.btn-secondary {
  background: var(--card-bg); color: var(--brand-primary);
}
.btn-secondary:hover { background: var(--bg); }
.btn-row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.btn-row .btn-primary { width: auto; }

/* ===== Mobile ===== */
@media (max-width: 640px) {
  .top-bar-inner { padding: 10px 14px; }
  main { padding: 14px; }
  .card { padding: 16px; }
  .live-clock { font-size: 24px; }
  .stamp-btn { flex: 1 1 100%; }
  .week-table { font-size: 13px; }
  .week-table th:nth-child(2), .week-table td:nth-child(2),
  .week-table th:nth-child(4), .week-table td:nth-child(4) { display: none; }
  .nav-cards { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 6px; }
  .nav-card { white-space: nowrap; }
}
