/* Zeiterfassung – Glas-Design-System */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --bg0: #0c1330;
  --bg1: #182552;
  --glass: rgba(255, 255, 255, 0.07);
  --glass-2: rgba(255, 255, 255, 0.11);
  --glass-3: rgba(255, 255, 255, 0.16);
  --border: rgba(255, 255, 255, 0.16);
  --border-strong: rgba(255, 255, 255, 0.28);
  --text: #eef2ff;
  --muted: #a3aed0;
  --dim: #6f7a9e;
  --amber: #ffb347;
  --amber-2: #ff8c42;
  --mint: #5ee0a0;
  --rose: #ff6b8a;
  --blue: #6c8cff;
  --violet: #9b7bff;
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;
  --shadow: 0 18px 50px rgba(3, 8, 30, 0.45);
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: linear-gradient(160deg, var(--bg0) 0%, var(--bg1) 60%, #10193d 100%);
  background-attachment: fixed;
  font-feature-settings: 'tnum' 1;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: 1.7rem; font-weight: 800; }
h2 { font-size: 1.15rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* Hintergrund-Lichter, die das Glas verwischt */
.orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.orbs::before, .orbs::after, .orbs i {
  content: ''; position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55;
}
.orbs::before { width: 55vw; height: 55vw; left: -15vw; top: -20vw; background: radial-gradient(circle, #4c6fff, transparent 65%); }
.orbs::after { width: 50vw; height: 50vw; right: -18vw; bottom: -18vw; background: radial-gradient(circle, #a259ff, transparent 65%); }
.orbs i { width: 34vw; height: 34vw; right: 12vw; top: 8vh; background: radial-gradient(circle, #ff9f43, transparent 65%); opacity: .32; }
@media (max-width: 720px) {
  .orbs::before { width: 120vw; height: 120vw; left: -50vw; top: -60vw; }
  .orbs::after { width: 110vw; height: 110vw; right: -50vw; bottom: -60vw; }
  .orbs i { width: 70vw; height: 70vw; right: -20vw; top: 20vh; }
}

/* Glas-Panel */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.glass-2 { background: var(--glass-2); }
.card { padding: 22px; }
.card + .card { margin-top: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.card-head p { color: var(--muted); font-size: .92rem; }

/* App-Layout */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.nav {
  position: sticky; top: 0; height: 100vh; padding: 22px 16px; display: flex; flex-direction: column; gap: 6px;
  border-right: 1px solid var(--border); background: rgba(8, 12, 32, 0.35);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; }
.brand-mark { width: 34px; height: 34px; border-radius: 11px; background: linear-gradient(135deg, var(--amber), var(--amber-2)); display: grid; place-items: center; color: #23180a; font-weight: 800; flex: none; box-shadow: 0 6px 18px rgba(255, 160, 60, .35); }
.brand b { display: block; font-size: 1rem; }
.brand small { color: var(--muted); font-size: .78rem; display: block; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-md); color: var(--muted); font-weight: 600; transition: background .15s, color .15s; }
.nav a:hover { background: var(--glass); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--glass-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav .spacer { flex: 1; }
.nav .who { padding: 10px 12px; color: var(--dim); font-size: .82rem; }
.main { padding: 28px clamp(16px, 4vw, 44px) 90px; max-width: 1240px; width: 100%; min-width: 0; }
.main > *, .card > * { min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { color: var(--muted); margin-top: 4px; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .nav { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--border); overflow-x: auto; z-index: 20; }
  .nav .brand, .nav .spacer, .nav .who, .nav .logout-text { display: none; }
  .nav a { flex-direction: column; gap: 4px; font-size: .68rem; padding: 8px 10px; min-width: 64px; flex: 1; text-align: center; }
  .main { padding-top: 18px; }
}

/* Buttons */
.btn {
  appearance: none; border: 1px solid var(--border); background: var(--glass-2); color: var(--text);
  font: inherit; font-weight: 700; padding: 10px 16px; border-radius: var(--r-md); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .08s, background .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--glass-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--amber), var(--amber-2)); color: #23180a; border-color: transparent; box-shadow: 0 8px 24px rgba(255, 150, 60, .3); }
.btn-primary:hover { background: linear-gradient(135deg, #ffc266, #ff9a55); }
.btn-mint { background: linear-gradient(135deg, #6ff0b0, #3cc98a); color: #072616; border-color: transparent; box-shadow: 0 8px 24px rgba(80, 220, 150, .25); }
.btn-mint:hover { background: linear-gradient(135deg, #85f5bf, #4bd898); }
.btn-danger { background: rgba(255, 107, 138, .14); border-color: rgba(255, 107, 138, .4); color: #ffb3c2; }
.btn-danger:hover { background: rgba(255, 107, 138, .24); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 11px; font-size: .84rem; border-radius: var(--r-sm); }
.btn-lg { padding: 16px 26px; font-size: 1.08rem; border-radius: 18px; }
.btn-icon { padding: 7px; width: 34px; height: 34px; border-radius: var(--r-sm); }
.btn svg { width: 18px; height: 18px; }
.btn-sm svg { width: 15px; height: 15px; }

/* Formulare */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: .84rem; color: var(--muted); font-weight: 600; }
.input, select, textarea {
  font: inherit; color: var(--text); background: rgba(6, 10, 30, .35); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 10px 12px; width: 100%; transition: border-color .15s, box-shadow .15s; min-height: 42px;
}
.input:focus, select:focus, textarea:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(255, 179, 71, .2); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a3aed0' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
select option { background: #172049; color: var(--text); }
textarea { resize: vertical; min-height: 70px; }
input[type=date], input[type=time], input[type=month] { color-scheme: dark; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; }
.check input { width: 18px; height: 18px; accent-color: var(--amber); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--glass); cursor: pointer; font-weight: 600; font-size: .86rem; user-select: none; transition: background .15s, border-color .15s; }
.chip.on { background: rgba(255, 179, 71, .18); border-color: var(--amber); color: #ffd79a; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.actions.end { justify-content: flex-end; }

/* Umschalter */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; vertical-align: middle; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: rgba(255, 255, 255, .15); border: 1px solid var(--border); transition: background .2s; cursor: pointer; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + i { background: linear-gradient(135deg, var(--amber), var(--amber-2)); border-color: transparent; }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 2px solid var(--amber); outline-offset: 2px; }

/* Tabellen */
.table-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .78rem; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid rgba(255, 255, 255, .07); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: rgba(255, 255, 255, .03); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .muted { color: var(--muted); }
.table tr.dim td { color: var(--dim); }
.table tr.warn td { background: rgba(255, 179, 71, .06); }
.table tfoot td { font-weight: 700; border-top: 1px solid var(--border); }

/* Status-Pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; border: 1px solid var(--border); background: var(--glass); white-space: nowrap; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-running { color: #ffd08a; border-color: rgba(255, 179, 71, .5); background: rgba(255, 179, 71, .12); }
.pill-running::before { animation: pulse 1.4s infinite; }
.pill-paused { color: #a9c0ff; border-color: rgba(108, 140, 255, .5); background: rgba(108, 140, 255, .12); }
.pill-idle { color: var(--muted); }
.pill-done, .pill-ok { color: #9af0c4; border-color: rgba(94, 224, 160, .5); background: rgba(94, 224, 160, .12); }
.pill-locked { color: #d9c7ff; border-color: rgba(155, 123, 255, .5); background: rgba(155, 123, 255, .12); }
.pill-warn { color: #ffd08a; border-color: rgba(255, 179, 71, .5); background: rgba(255, 179, 71, .12); }
.pill-error { color: #ffb3c2; border-color: rgba(255, 107, 138, .5); background: rgba(255, 107, 138, .12); }
.pill-info { color: #a9c0ff; border-color: rgba(108, 140, 255, .5); background: rgba(108, 140, 255, .12); }
.pill.plain::before { display: none; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* Kennzahlen */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat { padding: 16px 18px; }
.stat b { display: block; font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .84rem; }
.pos { color: var(--mint); }
.neg { color: var(--rose); }

/* Hinweise */
.notice { padding: 12px 16px; border-radius: var(--r-md); border: 1px solid; font-size: .92rem; display: flex; gap: 10px; align-items: flex-start; }
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.notice-warn { border-color: rgba(255, 179, 71, .45); background: rgba(255, 179, 71, .1); color: #ffe1b3; }
.notice-info { border-color: rgba(108, 140, 255, .45); background: rgba(108, 140, 255, .1); color: #d6e0ff; }
.notice-ok { border-color: rgba(94, 224, 160, .45); background: rgba(94, 224, 160, .1); color: #c9f7e0; }
.notice-danger { border-color: rgba(255, 107, 138, .45); background: rgba(255, 107, 138, .1); color: #ffd3dc; }
.empty { padding: 34px 16px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text); margin-bottom: 4px; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86em; }
.code { background: rgba(6, 10, 30, .45); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px 12px; overflow-x: auto; }

/* Toasts */
.toasts { position: fixed; top: 16px; right: 16px; left: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; z-index: 100; pointer-events: none; }
.toast { pointer-events: auto; padding: 11px 16px; border-radius: var(--r-md); font-weight: 600; font-size: .92rem; max-width: 420px; animation: toast-in .25s ease-out; box-shadow: var(--shadow); }
.toast-ok { background: rgba(94, 224, 160, .92); color: #05301b; }
.toast-error { background: rgba(255, 107, 138, .94); color: #3a0a15; }
.toast-info { background: rgba(108, 140, 255, .94); color: #061033; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(4, 8, 24, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); z-index: 50; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; padding: 24px; }
.modal h2 { margin-bottom: 16px; }
@keyframes fade { from { opacity: 0; } }

/* Login */
.center { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login { width: 100%; max-width: 400px; padding: 30px; display: flex; flex-direction: column; gap: 16px; }
.login h1 { font-size: 1.4rem; }

/* Diverses */
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }
.link-box { display: flex; gap: 8px; align-items: center; }
.link-box .input { font-family: ui-monospace, Menlo, monospace; font-size: .82rem; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.hbar { height: 8px; background: rgba(255, 255, 255, .1); border-radius: 999px; overflow: hidden; }
.hbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--amber), var(--amber-2)); border-radius: 999px; transition: width .4s; }
.hbar.mint i { background: linear-gradient(90deg, #6ff0b0, #3cc98a); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .orbs, .nav, .toasts { display: none !important; }
  body { background: #fff; color: #000; }
  .glass { background: #fff; border-color: #ccc; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
