:root {
  --sky-0: #e9fbff;
  --sky-1: #b7ecff;
  --sky-2: #6fb9ee;
  --glass: rgba(255, 255, 255, 0.42);
  --glass-strong: rgba(255, 255, 255, 0.62);
  --ink: #06324d;
  --muted: #477083;
  --blue: #1376c9;
  --green: #2daf65;
  --lime: #a8f35d;
  --danger: #c93452;
  --shadow: 0 26px 70px rgba(11, 83, 124, 0.28);
  --inner: inset 0 1px 0 rgba(255,255,255,.9), inset 0 -18px 38px rgba(58, 154, 218, .18);
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% 10%, rgba(184, 246, 87, .9), transparent 18rem),
    radial-gradient(circle at 84% 14%, rgba(76, 187, 255, .95), transparent 22rem),
    radial-gradient(circle at 70% 86%, rgba(85, 218, 132, .78), transparent 18rem),
    linear-gradient(145deg, #e7fbff 0%, #9ce1ff 42%, #72c9ec 64%, #d9fff1 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,.23) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.orb {
  position: fixed;
  width: 19rem;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(.3px);
  pointer-events: none;
  opacity: .58;
  box-shadow: inset -28px -42px 70px rgba(0, 93, 140, .18), inset 24px 22px 42px rgba(255,255,255,.85);
}
.orb-kiwi { left: -5rem; top: 12rem; background: radial-gradient(circle at 32% 28%, #fff, #caff65 32%, #58be64 72%); }
.orb-blueberry { right: -6rem; top: 7rem; background: radial-gradient(circle at 32% 28%, #fff, #76ceff 30%, #2d7bc2 76%); }
.orb-lime { right: 8rem; bottom: -9rem; background: radial-gradient(circle at 35% 25%, #fff, #e7ff8d 25%, #3fc871 74%); }

.glass {
  background: linear-gradient(145deg, rgba(255,255,255,.76), rgba(255,255,255,.32));
  border: 1px solid rgba(255,255,255,.72);
  box-shadow: var(--shadow), var(--inner);
  backdrop-filter: blur(22px) saturate(155%);
  -webkit-backdrop-filter: blur(22px) saturate(155%);
}
.deep-glass {
  background:
    linear-gradient(180deg, rgba(255,255,255,.78), rgba(182, 237, 255, .34) 42%, rgba(94, 202, 166, .28)),
    linear-gradient(90deg, rgba(9,116,195,.18), rgba(129,255,119,.18));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  margin: 1rem auto 0;
  width: min(1180px, calc(100% - 1.5rem));
  min-height: 4.25rem;
  border-radius: 1.45rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
}
.brand { display: flex; align-items: center; gap: .75rem; }
.brand-mark {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: radial-gradient(circle at 30% 24%, #fff 0 8%, #7df269 18%, #0f8de3 78%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 12px 28px rgba(0,91,160,.28);
}
.brand strong { display: block; font-size: 1.08rem; }
.brand small { color: var(--muted); font-weight: 700; letter-spacing: .03em; }
.top-actions { display: flex; align-items: center; gap: .7rem; }
.user-pill, .badge, .nav-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .45rem .75rem;
  background: rgba(255,255,255,.5);
  border: 1px solid rgba(255,255,255,.72);
  color: #0c5e91;
  font-weight: 800;
}
.link-button {
  border: 0;
  background: transparent;
  color: #0c5e91;
  font-weight: 800;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 1.5rem));
  margin: 1.25rem auto 5rem;
}

.flash-stack { display: grid; gap: .7rem; margin-bottom: 1rem; }
.flash {
  border-radius: 1rem;
  padding: .8rem 1rem;
  border: 1px solid rgba(255,255,255,.76);
  background: rgba(255,255,255,.7);
  box-shadow: 0 14px 28px rgba(23,99,136,.14);
  font-weight: 750;
}
.flash.ok { color: #0e7043; }
.flash.error { color: #b01d3a; }

.login-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .72fr);
  gap: 1.25rem;
  align-items: stretch;
  min-height: calc(100vh - 9rem);
}
.hero-copy, .login-card, .panel, .timer-hero, .stat-card {
  border-radius: 2rem;
}
.hero-copy { padding: clamp(1.5rem, 4vw, 3.5rem); display: flex; flex-direction: column; justify-content: center; overflow: hidden; position: relative; }
.hero-copy::after {
  content: "";
  position: absolute;
  width: 18rem;
  height: 5rem;
  right: -3rem;
  top: 2rem;
  transform: rotate(-18deg);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,.55), rgba(255,255,255,.06));
}
.aero-window-title {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .8rem;
  border-radius: .9rem;
  background: rgba(255,255,255,.48);
  border: 1px solid rgba(255,255,255,.72);
  color: #0b659d;
  font-weight: 850;
}
.win-dot { width: .7rem; height: .7rem; border-radius: 50%; display: inline-block; box-shadow: inset 0 1px 0 rgba(255,255,255,.9); }
.win-dot.red { background: #ff6682; }
.win-dot.yellow { background: #ffd65c; }
.win-dot.green { background: #62dc72; }
.hero-copy h1, .timer-copy h1 {
  margin: 1rem 0;
  max-width: 11ch;
  font-size: clamp(2.6rem, 8vw, 6.8rem);
  line-height: .9;
  letter-spacing: -.07em;
  text-shadow: 0 2px 0 rgba(255,255,255,.7), 0 18px 42px rgba(0,84,142,.18);
}
.hero-copy p { max-width: 50ch; color: #245b75; font-size: 1.08rem; font-weight: 650; }
.fruit-strip { display: flex; gap: .7rem; margin-top: 1.5rem; font-size: 2.2rem; filter: drop-shadow(0 14px 16px rgba(17,92,125,.2)); }

.login-card { padding: clamp(1.25rem, 3vw, 2rem); align-self: center; }
.login-card h2 { margin-top: 0; font-size: 2rem; }
label { display: grid; gap: .42rem; color: #11445f; font-weight: 850; }
input, select {
  width: 100%;
  border: 1px solid rgba(255,255,255,.88);
  border-radius: 1rem;
  padding: .9rem 1rem;
  color: var(--ink);
  background: rgba(255,255,255,.62);
  box-shadow: inset 0 2px 12px rgba(25, 117, 170, .11), 0 1px 0 rgba(255,255,255,.8);
  outline: none;
}
input:focus, select:focus { border-color: rgba(35,143,218,.9); box-shadow: 0 0 0 .25rem rgba(31, 151, 226, .18); }
.login-card label + label, .login-card button { margin-top: 1rem; }
.mini-note, .empty-state { color: var(--muted); font-weight: 650; }

.primary-button, .secondary-button, .danger-button, .start-button, .stop-button, .user-row button {
  border: 1px solid rgba(255,255,255,.84);
  border-radius: 1.1rem;
  padding: .9rem 1.15rem;
  font-weight: 950;
  color: white;
  background: linear-gradient(180deg, #61d6ff, #0b7ed0 48%, #075991);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.74), inset 0 -16px 30px rgba(5,51,104,.22), 0 16px 30px rgba(0,95,164,.26);
}
.secondary-button { background: linear-gradient(180deg, #baf779, #35b76b 50%, #16844d); }
.danger-button, .tiny-danger { background: linear-gradient(180deg, #ff8aa2, #d8385b 52%, #9b1732); color: white; }

.admin-grid, .work-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 1.25rem;
}
.panel { padding: clamp(1rem, 2vw, 1.45rem); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.panel-heading h1, .panel-heading h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -.04em; }
.eyebrow { margin: 0 0 .2rem; color: #0c77b7; text-transform: uppercase; letter-spacing: .13em; font-size: .78rem; font-weight: 1000; }
.create-user-form, .manual-form { display: grid; gap: .85rem; }
.user-list { display: grid; gap: .8rem; }
.user-row {
  padding: .85rem;
  border-radius: 1.2rem;
  background: rgba(255,255,255,.46);
  border: 1px solid rgba(255,255,255,.62);
}
.user-main { display: flex; justify-content: space-between; gap: .85rem; align-items: center; }
.user-main span { color: var(--muted); font-weight: 750; }
details { margin-top: .7rem; }
summary { cursor: pointer; font-weight: 900; color: #0c679e; }
details form { display: flex; gap: .5rem; margin-top: .6rem; align-items: center; }
details input { min-width: 0; }

.timer-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
  gap: 1.25rem;
  padding: clamp(1.2rem, 3vw, 2.5rem);
  align-items: center;
  overflow: hidden;
  position: relative;
}
.timer-hero::before {
  content: "";
  position: absolute;
  inset: 1rem 1rem auto auto;
  width: 16rem;
  height: 4rem;
  border-radius: 100%;
  background: linear-gradient(90deg, rgba(255,255,255,.7), rgba(255,255,255,.03));
  transform: rotate(-15deg);
}
.timer-copy { position: relative; z-index: 1; }
.timer-copy h1 { font-size: clamp(2.4rem, 7vw, 5.8rem); }
.running-note { color: #245b75; font-weight: 850; }
.elapsed {
  display: inline-flex;
  margin-top: .6rem;
  padding: .55rem .85rem;
  border-radius: 1rem;
  background: rgba(4,41,64,.72);
  color: #d7fff5;
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-variant-numeric: tabular-nums;
  font-weight: 1000;
  letter-spacing: .03em;
  box-shadow: inset 0 2px 20px rgba(0,0,0,.22), 0 12px 28px rgba(0,60,105,.22);
}
.elapsed.idle { opacity: .72; }
.current-task { font-size: 1.2rem; font-weight: 900; color: #0b5f93; }
.timer-controls { position: relative; z-index: 1; }
.start-form { display: grid; gap: 1rem; }
.big-action {
  width: 100%;
  min-height: 9.5rem;
  border-radius: 2rem;
  font-size: clamp(2.5rem, 8vw, 5rem);
  text-transform: uppercase;
  letter-spacing: -.05em;
}
.start-button { background: linear-gradient(180deg, #d9ff87 0%, #39ca74 48%, #10824c 100%); }
.stop-button { background: linear-gradient(180deg, #ffc0cd 0%, #ef4d70 48%, #a61234 100%); }

.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.25rem 0; }
.stat-card { padding: 1rem; }
.stat-card span { display: block; color: var(--muted); font-weight: 850; }
.stat-card strong { display: block; margin-top: .25rem; font-size: clamp(1.3rem, 3vw, 2rem); letter-spacing: -.04em; }

.calendar-panel { min-width: 0; }
.month-nav { align-items: center; }
.nav-pill:hover { background: rgba(255,255,255,.75); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .55rem; }
.weekday { text-align: center; color: #0e6da5; font-weight: 1000; font-size: .86rem; }
.day-cell {
  min-height: 6.2rem;
  border-radius: 1.05rem;
  padding: .55rem;
  background: rgba(255,255,255,.38);
  border: 1px solid rgba(255,255,255,.62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
.day-cell.empty { opacity: .32; }
.day-cell.has-time {
  background: linear-gradient(180deg, rgba(255,255,255,.64), rgba(114,223,141,.32));
  border-color: rgba(255,255,255,.9);
}
.day-number { display: inline-grid; place-items: center; width: 1.65rem; height: 1.65rem; border-radius: .6rem; background: rgba(255,255,255,.52); font-weight: 1000; }
.day-cell strong { display: block; margin-top: .5rem; font-size: .95rem; color: #0b6a48; }
.day-dots { display: flex; gap: .22rem; margin-top: .45rem; }
.day-dots span { width: .42rem; height: .42rem; border-radius: 50%; background: #0b88d5; box-shadow: 0 0 0 2px rgba(255,255,255,.55); }
.manual-panel { align-self: start; }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

.entries-panel { margin-top: 1.25rem; }
.entry-list { display: grid; gap: .7rem; }
.entry-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem;
  border-radius: 1.15rem;
  background: rgba(255,255,255,.48);
  border: 1px solid rgba(255,255,255,.68);
}
.entry-card strong, .entry-card span { display: block; }
.entry-card span { color: var(--muted); font-weight: 750; margin-top: .12rem; }
.entry-actions { display: flex; align-items: center; gap: .75rem; }
.tiny-danger {
  width: 2.15rem;
  height: 2.15rem;
  border: 0;
  border-radius: .8rem;
  font-size: 1.4rem;
  line-height: 1;
  font-weight: 1000;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 880px) {
  .login-stage, .admin-grid, .work-grid, .timer-hero { grid-template-columns: 1fr; }
  .hero-copy h1 { max-width: 9ch; }
  .timer-controls {
    position: sticky;
    bottom: .75rem;
    z-index: 6;
  }
  .big-action { min-height: 7.5rem; }
  .stats-row { grid-template-columns: 1fr; }
  .calendar-grid { gap: .35rem; }
  .day-cell { min-height: 4.9rem; padding: .4rem; border-radius: .85rem; }
  .day-cell strong { font-size: .78rem; }
  .topbar { border-radius: 1.1rem; }
  .brand small { display: none; }
  details form { flex-direction: column; align-items: stretch; }
  .user-main { display: grid; }
}

@media (max-width: 560px) {
  .page-shell, .topbar { width: min(100% - .85rem, 1180px); }
  .topbar { padding: .55rem; }
  .user-pill { display: none; }
  .hero-copy, .login-card, .panel, .timer-hero { border-radius: 1.35rem; }
  .hero-copy h1, .timer-copy h1 { font-size: 3rem; }
  .calendar-grid { gap: .25rem; }
  .weekday { font-size: .72rem; }
  .day-cell { min-height: 4rem; }
  .day-number { width: 1.35rem; height: 1.35rem; font-size: .78rem; }
  .day-cell strong { margin-top: .25rem; }
  .month-nav { display: grid; grid-template-columns: 1fr; text-align: center; }
  .nav-pill { justify-content: center; }
  .two-cols { grid-template-columns: 1fr; }
  .entry-card { align-items: flex-start; }
  .entry-actions { flex-direction: column; align-items: flex-end; }
}

/* Arbeitszeit-/Überstunden-Erweiterung */
.stats-row-four { grid-template-columns: repeat(4, 1fr); }
.stat-card.positive strong,
.week-focus.positive > strong,
.week-card.positive b:last-child { color: #087b47; }
.stat-card.negative strong,
.week-focus.negative > strong,
.week-card.negative b:last-child { color: #b21f3d; }

.live-net-box {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: .8rem;
}
.live-net-box span {
  display: inline-flex;
  gap: .35rem;
  align-items: center;
  border-radius: 999px;
  padding: .5rem .75rem;
  color: #074f77;
  background: rgba(255,255,255,.56);
  border: 1px solid rgba(255,255,255,.76);
  font-weight: 850;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}

.week-focus {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.25rem 0;
  padding: 1.15rem 1.25rem;
}
.week-focus h2 { margin: .15rem 0; font-size: clamp(1.8rem, 5vw, 3rem); letter-spacing: -.05em; }
.week-focus p { margin: 0; color: var(--muted); font-weight: 800; }
.week-focus > strong { font-size: clamp(2rem, 6vw, 4rem); letter-spacing: -.06em; }

.day-cell small,
.day-cell em {
  display: block;
  margin-top: .2rem;
  font-size: .72rem;
  font-style: normal;
  font-weight: 900;
}
.day-cell small { color: #315d76; }
.day-cell em { color: #0d7d4c; }
.day-cell.day-minus em { color: #b21f3d; }
.day-cell.day-plus { box-shadow: inset 0 1px 0 rgba(255,255,255,.75), 0 0 0 2px rgba(72, 212, 116, .16); }
.day-cell.day-minus { box-shadow: inset 0 1px 0 rgba(255,255,255,.75), 0 0 0 2px rgba(216, 56, 91, .12); }

.rules-card {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 1.25rem;
  background: rgba(255,255,255,.48);
  border: 1px solid rgba(255,255,255,.68);
}
.rules-card strong,
.rules-card span { display: block; }
.rules-card strong { font-size: 1.05rem; }
.rules-card span { margin-top: .35rem; color: var(--muted); font-weight: 750; }

.week-panel { margin-top: 1.25rem; }
.week-list { display: grid; gap: .75rem; }
.week-card {
  display: grid;
  grid-template-columns: 1.1fr .8fr .8fr;
  gap: .85rem;
  align-items: center;
  padding: .9rem;
  border-radius: 1.15rem;
  background: rgba(255,255,255,.48);
  border: 1px solid rgba(255,255,255,.68);
}
.week-card.current {
  background: linear-gradient(180deg, rgba(255,255,255,.7), rgba(118,223,255,.32));
  border-color: rgba(255,255,255,.92);
}
.week-card strong,
.week-card b,
.week-card span { display: block; }
.week-card span { color: var(--muted); font-weight: 750; margin-top: .12rem; }
.week-card b { font-size: 1.15rem; }

@media (max-width: 880px) {
  .stats-row-four { grid-template-columns: repeat(2, 1fr); }
  .week-focus { align-items: flex-start; flex-direction: column; }
  .week-card { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .stats-row-four { grid-template-columns: 1fr; }
  .live-net-box { display: grid; }
}
