/* e2n-Optik nachgebaut: helles Theme, weiße Top-Nav, hellgrauer BG,
   weiße Karten mit feinem Schatten, Navy-Akzent, Status-Badges, Avatare. */
:root {
  --bg:#eef1f5; --card:#ffffff; --line:#e5e8ee; --line2:#eef0f4;
  --txt:#2b3445; --mut:#7a8597; --soft:#9aa4b2;
  --navy:#1f3a5f; --navy2:#16294a; --accent:#2f6fed; --accent-soft:#eaf1fe;
  --green:#34c759; --amber:#f5a623; --red:#e5544b; --red-soft:#fdecec;
  --blue:#4a90d9; --gray:#6b7280;
}
* { box-sizing:border-box; }
body { margin:0; font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; background:var(--bg); color:var(--txt); font-size:14px; }
a { color:inherit; text-decoration:none; }
button { cursor:pointer; font:inherit; }

/* ---------- Top navigation (e2n style) ---------- */
.topbar { display:flex; align-items:center; gap:4px; padding:0 14px; min-height:56px; background:var(--card); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:50; flex-wrap:wrap; }
.topbar .brand { display:flex; align-items:center; gap:6px; font-weight:700; color:var(--navy); padding-right:6px; font-size:14px; white-space:nowrap; }
.topbar nav { display:flex; align-items:stretch; gap:0; flex:1 1 auto; min-width:0; flex-wrap:wrap; }
.topbar .brand, .topbar .standortwahl, .topbar .logout { flex-shrink:0; }
@media (max-width:1100px) { .topbar nav a .ico { display:none; } .topbar nav a { padding:0 8px; } }
.topbar nav a { display:flex; align-items:center; gap:5px; color:var(--mut); padding:0 9px; min-height:54px; border-bottom:2px solid transparent; font-weight:500; white-space:nowrap; font-size:13.5px; }
.topbar nav a:hover { color:var(--txt); background:#f7f9fc; }
.topbar nav a.active { color:var(--accent); border-color:var(--accent); }
.topbar nav a .ico { font-size:15px; opacity:.85; }
.navdrop { position:relative; display:flex; align-items:stretch; }
.navdrop > summary { display:flex; align-items:center; gap:5px; color:var(--mut); padding:0 9px; min-height:54px; border-bottom:2px solid transparent; font-weight:500; white-space:nowrap; font-size:13.5px; cursor:pointer; list-style:none; user-select:none; }
.navdrop > summary::-webkit-details-marker { display:none; }
.navdrop > summary::marker { content:''; font-size:0; }
.navdrop > summary:hover { color:var(--txt); background:#f7f9fc; }
.navdrop.active > summary { color:var(--accent); border-color:var(--accent); }
.navdrop[open] > summary .caret { transform:rotate(180deg); }
.navdrop > summary .caret { font-size:11px; transition:transform .15s; }
.navmenu { position:absolute; top:100%; left:0; min-width:190px; background:#fff; border:1px solid var(--line); border-radius:10px; box-shadow:0 8px 24px rgba(20,40,80,.12); padding:6px; display:none; flex-direction:column; z-index:60; }
.navdrop[open] > .navmenu { display:flex; }
.navmenu a { padding:9px 12px; border-radius:7px; color:var(--txt); border:none; min-height:0; }
.navmenu a:hover { background:var(--accent-soft); color:var(--accent); }
.navmenu a.active { color:var(--accent); background:var(--accent-soft); }
.standortwahl { flex-shrink:0; }
.standortwahl select { border:1px solid var(--line); background:#f7f9fc; border-radius:8px; padding:7px 8px; color:var(--txt); cursor:pointer; font-size:13px; }
.logout { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.logout .user { color:var(--mut); font-size:12.5px; white-space:nowrap; max-width:120px; overflow:hidden; text-overflow:ellipsis; }
.logout button { background:transparent; border:1px solid var(--line); border-radius:8px; padding:6px 12px; color:var(--mut); }
.logout button:hover { border-color:var(--red); color:var(--red); }

main { max-width:1180px; margin:18px auto; padding:0 18px 60px; }

/* ---------- Card / panel ---------- */
.panel { background:var(--card); border:1px solid var(--line); border-radius:14px; box-shadow:0 1px 3px rgba(20,40,80,.04); padding:20px; margin-bottom:18px; }
.crumb { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--accent); margin-bottom:14px; }
.crumb .sep { color:var(--soft); }
.crumb .here { color:var(--mut); }

h1 { font-size:22px; margin:0 0 16px; font-weight:600; display:flex; align-items:center; gap:10px; }
h1 small { font-size:13px; color:var(--mut); font-weight:400; }
h2 { font-size:15px; margin:0 0 10px; font-weight:600; }
h3 { font-size:13px; color:var(--mut); margin:0 0 8px; font-weight:600; }

/* ---------- Buttons / inputs ---------- */
input, select, textarea { font:inherit; padding:8px 11px; border-radius:8px; border:1px solid var(--line); background:#fff; color:var(--txt); }
select { cursor:pointer; }
.btn { display:inline-flex; align-items:center; gap:6px; padding:8px 13px; border-radius:8px; border:1px solid var(--line); background:#fff; color:var(--txt); font-weight:500; }
.btn:hover { border-color:var(--accent); color:var(--accent); }
.btn.primary { background:var(--accent); border-color:var(--accent); color:#fff; }
.btn.primary:hover { background:#245fd6; color:#fff; }
.btn.nav { width:38px; height:38px; justify-content:center; padding:0; }
.btn.today { padding:8px 16px; }
button[type=submit] { background:var(--accent); border-color:var(--accent); color:#fff; border-radius:8px; padding:8px 14px; }

.toolbar { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:16px; }
.toolbar.right { justify-content:flex-end; }
.toolbar label { font-size:13px; color:var(--mut); display:flex; gap:6px; align-items:center; }
.spacer { flex:1; }

/* ---------- Tabs (module sub-navigation) ---------- */
.tabs { display:flex; gap:2px; flex-wrap:wrap; border-bottom:1px solid var(--line); margin:0 0 18px; }
.tabs a { padding:9px 14px; color:var(--mut); border-bottom:2px solid transparent; font-weight:500; white-space:nowrap; }
.tabs a:hover { color:var(--txt); }
.tabs a.active { color:var(--accent); border-color:var(--accent); }

/* ---------- Tables ---------- */
table { width:100%; border-collapse:collapse; }
th, td { padding:11px 12px; text-align:left; border-bottom:1px solid var(--line2); font-size:13.5px; vertical-align:middle; }
th { color:var(--soft); font-weight:600; font-size:11px; text-transform:uppercase; letter-spacing:.04em; }
tbody tr:hover { background:#f9fafc; }
tr:last-child td { border-bottom:none; }
.num { text-align:right; font-variant-numeric:tabular-nums; }
.muted { color:var(--mut); }
.strong { font-weight:600; }
.grouprow td { background:#f3f6fb; font-weight:600; color:var(--navy); border-top:1px solid var(--line); }
.grouprow.blue td { background:#eaf3fc; color:#2e6fae; }
.grouprow.gray td { background:#f0f1f3; color:#52596a; }
.totalrow td { font-weight:700; border-top:2px solid var(--line); }

/* ---------- Avatars + status ---------- */
.av { width:34px; height:34px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; color:#fff; font-size:12px; font-weight:700; flex-shrink:0; }
.av.lg { width:54px; height:54px; font-size:18px; }
.person { display:flex; align-items:center; gap:10px; }
.dot { width:9px; height:9px; border-radius:50%; display:inline-block; }
.dot.on { background:var(--green); } .dot.off { background:var(--soft); }

/* ---------- Badges ---------- */
.badge { display:inline-block; padding:2px 9px; border-radius:6px; font-size:11.5px; font-weight:600; }
.badge.blue { background:#e8f1fb; color:#2e6fae; }
.badge.gray { background:#eceef1; color:#5a6270; }
.badge.green { background:#e6f7ec; color:#2a9d54; }
.badge.amber { background:#fdf2e0; color:#b9821f; }
.badge.red { background:var(--red-soft); color:var(--red); }
.badge.navy { background:#e7ecf5; color:var(--navy); }
.tag { display:inline-block; padding:2px 9px; border-radius:999px; font-size:12px; background:#f1f3f7; color:var(--mut); border:1px solid var(--line); }
.tag.offen { color:var(--amber); border-color:#f0d9a8; background:#fdf6e8; }
.ok { color:#2a9d54; background:#e6f7ec; border:1px solid #b8e6c8; padding:8px 12px; border-radius:8px; display:inline-block; }
.pill-time { display:inline-flex; align-items:center; gap:5px; font-variant-numeric:tabular-nums; }

/* ---------- Stat cards ---------- */
.cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:14px; margin-bottom:18px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:18px; display:flex; flex-direction:column; gap:4px; color:var(--mut); box-shadow:0 1px 3px rgba(20,40,80,.04); }
.card:hover { border-color:var(--accent); }
.card .num { font-size:28px; font-weight:700; color:var(--txt); text-align:left; }
.card.accent { background:var(--navy); border-color:var(--navy); color:#cdd8ea; }
.card.accent .num { color:#fff; }

/* mini info tiles (Übersicht) */
.tiles { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px; margin-bottom:18px; }
.tile { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:16px 18px; box-shadow:0 1px 3px rgba(20,40,80,.04); }
.tile .big { font-size:26px; font-weight:700; }
.tile.navy { background:var(--navy); color:#fff; } .tile.navy .lbl { color:#aebbd2; }
.tile.red { background:var(--red); color:#fff; } .tile.red .lbl { color:#ffe2e0; }
.tile .lbl { color:var(--mut); font-size:12px; }

/* present-employee cards (Übersicht "Anwesend") */
.presence { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:14px; }
.pcard { border:1px solid var(--line); border-radius:12px; overflow:hidden; background:#fff; }
.pcard .top { height:78px; display:flex; align-items:center; justify-content:center; }
.pcard .meta { padding:10px 12px; text-align:center; }
.pcard .nm { font-weight:600; font-size:13.5px; }
.pcard .role { font-size:11px; margin-top:4px; }
.pcard .since { font-size:12px; color:var(--mut); margin-top:6px; display:flex; align-items:center; justify-content:center; gap:5px; }

/* bar for duration */
.bar { height:6px; border-radius:3px; background:#eef1f5; overflow:hidden; min-width:80px; }
.bar > span { display:block; height:100%; background:var(--blue); }

.empty { text-align:center; color:var(--mut); padding:40px 20px; }

/* ---------- Login ---------- */
.login { max-width:380px; margin:9vh auto; background:var(--card); border:1px solid var(--line); border-radius:16px; padding:30px; box-shadow:0 6px 24px rgba(20,40,80,.08); }
.login h1 { margin:0; color:var(--navy); }
.login .sub { color:var(--mut); margin:4px 0 20px; }
.login form { display:flex; flex-direction:column; gap:13px; }
.login label { display:flex; flex-direction:column; gap:5px; font-size:13px; color:var(--mut); }
.login .error { color:var(--red); background:var(--red-soft); border:1px solid #f3c9c6; padding:8px 12px; border-radius:8px; }

code { background:#f1f3f7; padding:1px 6px; border-radius:6px; font-size:12px; }
