* {
  box-sizing: border-box;
}

:root {
  --bg: #0f172a;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.12);
  --text: #f8fafc;
  --muted: #a7b3c7;
  --line: rgba(255, 255, 255, 0.14);
  --blue: #38bdf8;
  --blue-soft: rgba(56, 189, 248, 0.16);
  --yellow: #facc15;
  --yellow-soft: rgba(250, 204, 21, 0.17);
  --green: #34d399;
  --danger: #fb7185;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.22), transparent 34%),
    radial-gradient(circle at bottom right, rgba(250, 204, 21, 0.12), transparent 30%),
    var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

.home-shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
}

.hero-card,
.apps-section,
.timer-panel,
.report-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  border-radius: 28px;
}

.hero-card {
  padding: 48px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.76rem;
}

.hero-card h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 5rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-text {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.7;
}

.apps-section {
  margin-top: 24px;
  padding: 32px;
}

.section-heading {
  margin-bottom: 20px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.6rem;
}

.app-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.app-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.58);
  background: rgba(56, 189, 248, 0.10);
}

.app-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: var(--blue-soft);
  font-size: 1.7rem;
}

.app-card h3 {
  margin: 0 0 6px;
}

.app-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.arrow {
  color: var(--blue);
  font-size: 1.8rem;
}

/* Kronometre */
.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.brand {
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 1.35rem;
}

.back-link {
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 999px;
  transition: background 180ms ease;
}

.back-link:hover {
  background: var(--panel-strong);
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
}

.timer-panel,
.report-panel {
  padding: 26px;
}

.panel-title {
  margin: 0 0 18px;
  color: var(--muted);
  font-weight: 700;
}

.setup {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 22px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 14px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  font-size: 1rem;
  outline: none;
}

.field input:focus {
  border-color: var(--blue);
}

button {
  border: 0;
  border-radius: 16px;
  padding: 14px 18px;
  color: #08111f;
  background: var(--blue);
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.44;
  transform: none;
}

.secondary {
  color: var(--text);
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.danger {
  color: #fff;
  background: rgba(251, 113, 133, 0.28);
  border: 1px solid rgba(251, 113, 133, 0.4);
}

.timer-stage {
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 30px;
  background: rgba(15, 23, 42, 0.46);
}

.status-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--blue);
  background: var(--blue-soft);
  font-weight: 800;
}

.badge.yellow {
  color: var(--yellow);
  background: var(--yellow-soft);
}

.badge.green {
  color: var(--green);
  background: rgba(52, 211, 153, 0.14);
}

.target {
  color: var(--muted);
  font-weight: 700;
}

.timer {
  margin: 12px 0 10px;
  font-variant-numeric: tabular-nums;
  font-size: clamp(4rem, 13vw, 9.5rem);
  line-height: 0.9;
  letter-spacing: -0.08em;
  color: var(--blue);
}

.timer.overtime {
  color: var(--yellow);
}

.overtime-text {
  min-height: 28px;
  margin: 0;
  color: var(--yellow);
  font-weight: 800;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.total-card {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.total-label {
  margin: 0 0 6px;
  color: var(--muted);
}

.total-time {
  margin: 0;
  color: var(--green);
  font-size: 1.8rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.report-panel {
  min-height: 620px;
}

.report-list {
  display: grid;
  gap: 12px;
}

.empty {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.period-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.period-card h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.period-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.period-row strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.hint {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.92rem;
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .setup {
    grid-template-columns: 1fr;
  }

  .hero-card {
    padding: 32px;
  }

  .report-panel {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .timer-stage {
    padding: 20px;
  }

  .controls button {
    width: 100%;
  }
}
