:root {
  --ink: #10131a;
  --paper: #eef1f7;
  --accent: #2c7be5;
  --accent-2: #ff8a5c;
  --accent-3: #4fd1c5;
  --shadow: rgba(16, 19, 26, 0.18);
  --muted: #6b7283;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-border: rgba(16, 19, 26, 0.08);
  --ring: rgba(44, 123, 229, 0.25);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  min-height: 100vh;
  background: radial-gradient(circle at 10% 10%, #ffffff 0%, #eef1f7 45%, #e6ebf5 100%);
  overflow-x: hidden;
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  filter: blur(40px);
  z-index: 0;
  opacity: 0.7;
}

body::before {
  top: -160px;
  right: -120px;
  background: radial-gradient(circle, rgba(44, 123, 229, 0.5), rgba(44, 123, 229, 0));
}

body::after {
  bottom: -200px;
  left: -120px;
  background: radial-gradient(circle, rgba(255, 138, 92, 0.45), rgba(255, 138, 92, 0));
}

.glow {
  position: fixed;
  inset: 20% auto auto 60%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(79, 209, 197, 0.35), rgba(79, 209, 197, 0));
  filter: blur(18px);
  z-index: 0;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 90px;
  position: relative;
  z-index: 1;
}

.admin,
.client {
  display: grid;
  gap: 22px;
}

.admin-top {
  display: flex;
  gap: 22px;
  align-items: stretch;
  flex-wrap: wrap;
}

.admin-top > .panel {
  flex: 1 1 360px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--muted);
  margin-bottom: 8px;
}

h1 {
  font-family: "Fraunces", serif;
  font-size: clamp(2.6rem, 5vw, 4.3rem);
  letter-spacing: 0.5px;
}

.subtitle {
  max-width: 560px;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.5;
}

.total-card {
  background: linear-gradient(135deg, var(--accent), #4f9cf7);
  color: #fff;
  padding: 26px 34px;
  border-radius: 26px;
  box-shadow: 0 22px 45px rgba(44, 123, 229, 0.35);
  min-width: 230px;
  position: relative;
  overflow: hidden;
  animation: float-in 700ms ease-out both;
}

.total-card::after {
  content: "";
  position: absolute;
  inset: -40% auto auto -30%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0));
  opacity: 0.8;
}

.big-time {
  font-size: 2.2rem;
  margin-top: 8px;
  font-weight: 600;
}

.grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.panel {
  background: var(--panel);
  backdrop-filter: blur(18px);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 18px 40px var(--shadow);
  border: 1px solid var(--panel-border);
  animation: rise 650ms ease-out both;
  transition: transform 180ms ease, box-shadow 180ms ease;
  position: relative;
}

.timer-panel {
  grid-column: auto;
}

.timer-form {
  grid-template-columns: 1fr 1fr;
  align-items: start;
}

.timer-form .actions,
.timer-form .helper {
  grid-column: 1 / -1;
}

.timer-form textarea {
  min-height: 86px;
}

.tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  border: 1px solid var(--panel-border);
  box-shadow: 0 12px 30px rgba(16, 19, 26, 0.12);
}

.tab {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  transition: all 160ms ease;
}

.tab:hover {
  color: var(--ink);
  background: rgba(44, 123, 229, 0.12);
}

.tab.active {
  background: linear-gradient(135deg, rgba(44, 123, 229, 0.2), rgba(79, 209, 197, 0.2));
  color: var(--ink);
  border-color: rgba(44, 123, 229, 0.2);
  box-shadow: inset 0 0 0 1px rgba(44, 123, 229, 0.2);
}

.tab-panels {
  display: grid;
  gap: 22px;
}

.tab-panel {
  display: none;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.tab-panel.active {
  display: grid;
}

.panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 60px rgba(16, 19, 26, 0.22);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  pointer-events: none;
}

.auth-panel {
  max-width: 760px;
}

.auth-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 16px;
}

.timer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--muted);
}

.running {
  font-size: 2.5rem;
  font-weight: 600;
  margin-top: 6px;
}

.badge {
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 600;
}

.badge.idle {
  background: rgba(107, 114, 131, 0.18);
  color: var(--muted);
}

.badge.live {
  background: rgba(44, 123, 229, 0.18);
  color: #1f4e9b;
}

.form {
  display: grid;
  gap: 16px;
}

select {
  border-radius: 14px;
  border: 1px solid var(--panel-border);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.9);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.quick-pick {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

label {
  font-size: 14px;
  display: grid;
  gap: 8px;
}

input,
textarea {
  border-radius: 14px;
  border: 1px solid var(--panel-border);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.92);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(44, 123, 229, 0.5);
  box-shadow: 0 0 0 3px var(--ring);
}

textarea {
  resize: vertical;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

button {
  border: none;
  border-radius: 14px;
  padding: 12px 20px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
  font-family: inherit;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(16, 19, 26, 0.18);
}

.small {
  padding: 10px 16px;
}

.primary {
  background: linear-gradient(135deg, var(--accent), #4f9cf7);
  color: #fff;
}

.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #2a6fcb, #3d8ef2);
}

.ghost {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--panel-border);
  color: var(--ink);
}

.helper {
  color: var(--muted);
  font-size: 13px;
}

.error {
  color: #d7462d;
}

.hidden {
  display: none;
}

.reset-request {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

h2 {
  font-family: "Fraunces", serif;
  font-size: 1.5rem;
}

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

.project-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(16, 19, 26, 0.05);
}

.project-item span {
  font-weight: 600;
}

.entries {
  display: grid;
  gap: 12px;
}

.entry {
  border-radius: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(16, 19, 26, 0.08);
  background: rgba(255, 255, 255, 0.85);
}

.entry-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-weight: 600;
}

.entry-meta {
  color: var(--muted);
  font-size: 12px;
}

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

.manage-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(16, 19, 26, 0.05);
}

.manage-item span {
  font-weight: 600;
}

.danger {
  background: transparent;
  border: 1px solid rgba(215, 70, 45, 0.4);
  color: #d7462d;
}

.grid .panel:nth-child(1) {
  animation-delay: 40ms;
}

.grid .panel:nth-child(2) {
  animation-delay: 80ms;
}

.grid .panel:nth-child(3) {
  animation-delay: 120ms;
}

.grid .panel:nth-child(4) {
  animation-delay: 160ms;
}

.grid .panel:nth-child(5) {
  animation-delay: 200ms;
}

.grid .panel:nth-child(6) {
  animation-delay: 240ms;
}

.grid .panel:nth-child(7) {
  animation-delay: 280ms;
}

.grid .panel:nth-child(8) {
  animation-delay: 320ms;
}

@keyframes rise {
  from {
    transform: translateY(16px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes float-in {
  from {
    transform: translateY(-12px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 720px) {
  .admin-top {
    flex-direction: column;
  }

  .timer-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .hero-actions {
    justify-content: flex-start;
  }
}
