:root {
  --bg: #f8fafc;
  --white: #ffffff;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-700: #334155;
  --slate-900: #0f172a;
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-600: #0284c7;
  --sky-700: #0369a1;
  --rose-50: #fff1f2;
  --rose-100: #ffe4e6;
  --rose-600: #e11d48;
  --rose-700: #be123c;
  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --indigo-50: #eef2ff;
  --indigo-100: #e0e7ff;
  --indigo-600: #4f46e5;
  --violet-50: #f5f3ff;
  --violet-100: #ede9fe;
  --violet-700: #6d28d9;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  --shadow-soft: 0 24px 72px rgba(59, 130, 246, 0.14);
  --shadow-card: 0 14px 34px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--slate-900);
  background: var(--bg);
}

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

.is-hidden,
[hidden] {
  display: none !important;
}

.background-orb {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(72px);
  pointer-events: none;
}
.background-orb.orb-left {
  width: 18rem;
  height: 18rem;
  top: 1rem;
  left: -5rem;
  background: rgba(125, 211, 252, 0.45);
}
.background-orb.orb-right {
  width: 20rem;
  height: 20rem;
  top: 0;
  right: -6rem;
  background: rgba(147, 197, 253, 0.38);
}
.background-orb.orb-bottom {
  width: 22rem;
  height: 22rem;
  bottom: -8rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(199, 210, 254, 0.38);
}

.page-shell {
  width: min(100%, 1200px);
  margin: 0 auto;
  padding: 1rem;
}

.hero-card,
.data-card,
.summary-card,
.info-panel,
.login-panel {
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow-card);
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 1.25rem;
  border-radius: 2.25rem;
  background: linear-gradient(180deg, #dff2ff 0%, #d7efff 50%, #d1ecff 100%);
  box-shadow: var(--shadow-soft);
}

.hero-card-admin {
  margin-bottom: 1.25rem;
}

.compact-hero {
  padding-bottom: 1.5rem;
}

.hero-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 0.75rem;
  position: relative;
  z-index: 2;
}

.hero-topbar-between {
  justify-content: space-between;
}

.hero-actions-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 48rem;
  margin: 1.25rem auto 0;
  text-align: center;
}

.compact-hero-content {
  margin-top: 1rem;
}

.hero-logo {
  width: 7.5rem;
  height: 7.5rem;
  margin: 0 auto;
  border-radius: 2rem;
  display: grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-600), #1e40af);
  box-shadow: 0 26px 56px rgba(37, 99, 235, 0.32);
}

.hero-logo-small {
  width: 6.75rem;
  height: 6.75rem;
}

.hero-logo-icon {
  width: 4rem;
  height: 4rem;
}

.hero-title {
  margin: 1.1rem 0 0;
  font-size: clamp(2.2rem, 7vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 900;
}

.hero-subtitle {
  margin: 0.55rem 0 0;
  color: var(--slate-500);
  font-size: clamp(1rem, 3vw, 1.25rem);
  font-weight: 600;
}

.time-card {
  margin-top: 1.4rem;
  padding: 1rem 1.1rem;
  border-radius: 1.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-card);
}

.compact-time-card {
  margin-top: 1.15rem;
}

.time-date-block,
.time-hour-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.time-clock-icon {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--blue-50);
  box-shadow: inset 0 0 0 1px rgba(191, 219, 254, 0.7);
}

.time-date-text {
  font-size: clamp(1rem, 3.5vw, 1.75rem);
  font-weight: 900;
  color: var(--blue-700);
}

.time-divider {
  width: 100%;
  max-width: 3rem;
  height: 1px;
  background: var(--slate-200);
}

.time-hour-text {
  font-size: clamp(1.65rem, 5.2vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.time-zone-pill,
.badge-pill,
.total-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  font-weight: 900;
}

.time-zone-pill {
  padding: 0.7rem 0.95rem;
  background: var(--blue-500);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.22);
}

.badge-pill {
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.9);
}
.badge-neutral { color: var(--slate-700); }
.badge-success { color: var(--emerald-700); border-color: var(--emerald-100); }
.badge-warning { color: var(--amber-600); border-color: var(--amber-100); }

.summary-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.3rem;
}

.summary-card {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 1.8rem;
  padding: 1.25rem;
}

.summary-card-emerald {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: rgba(16, 185, 129, 0.15);
  box-shadow: 0 18px 38px rgba(5, 150, 105, 0.18);
}

.summary-label {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--slate-400);
  font-weight: 800;
}

.summary-label-light {
  color: rgba(236, 253, 245, 0.92);
}

.summary-value {
  margin: 0.7rem 0 0;
  font-size: clamp(1.7rem, 5vw, 2.2rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 900;
}

.summary-value-light {
  color: var(--white);
}

.summary-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  display: grid;
  place-items: center;
  font-weight: 900;
  flex-shrink: 0;
}

.summary-icon-sky { background: var(--sky-50); color: var(--sky-700); }
.summary-icon-rose { background: var(--rose-50); color: var(--rose-700); }
.summary-icon-indigo { background: var(--indigo-50); color: var(--indigo-600); }
.summary-icon-white { background: rgba(255,255,255,0.16); color: var(--white); }

.info-panel {
  margin-top: 1rem;
  border-radius: 1.8rem;
  padding: 1rem;
  display: grid;
  gap: 0.85rem;
  background: rgba(255, 255, 255, 0.92);
}

.info-box {
  background: var(--slate-50);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 1.35rem;
  padding: 1rem;
}

.info-label,
.preview-label,
.card-badge,
.table-mini-label {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 800;
}

.info-label,
.table-mini-label { color: var(--slate-400); }
.info-value {
  margin: 0.5rem 0 0;
  color: var(--slate-900);
  font-weight: 800;
  line-height: 1.45;
}

.section-stack {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
}

.data-card,
.login-panel {
  border-radius: 1.95rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.92);
}

.loading-card {
  min-height: 14rem;
}

.loading-card::before {
  content: '';
  display: block;
  width: 100%;
  height: 12rem;
  border-radius: 1.4rem;
  background: linear-gradient(90deg, var(--slate-100), var(--blue-50), var(--slate-100));
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.section-head,
.card-head,
.panel-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  justify-content: space-between;
  flex-wrap: wrap;
}

.panel-head-center {
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.panel-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 1.4rem;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
}

.panel-icon-blue { background: var(--blue-50); color: var(--blue-700); }

.section-title,
.card-title,
.panel-title {
  margin: 0;
  font-size: clamp(1.3rem, 4vw, 2rem);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.panel-subtitle {
  margin: 0.35rem 0 0;
  color: var(--slate-500);
  font-weight: 600;
}

.card-badge {
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
}

.card-badge-sky { background: var(--sky-50); color: var(--sky-700); }
.card-badge-rose { background: var(--rose-50); color: var(--rose-700); }
.card-badge-violet { background: var(--violet-50); color: var(--violet-700); }
.card-badge-emerald { background: var(--emerald-50); color: var(--emerald-700); }
.card-badge-indigo { background: var(--indigo-50); color: var(--indigo-600); }
.card-badge-amber { background: var(--amber-50); color: var(--amber-600); }

.total-pill {
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.9);
}
.total-pill-sky { background: var(--sky-50); color: var(--sky-700); }
.total-pill-violet { background: var(--violet-50); color: var(--violet-700); }
.total-pill-emerald { background: var(--emerald-50); color: var(--emerald-700); }

.form-grid,
.admin-bottom-grid {
  display: grid;
  gap: 1rem;
}

.form-stack {
  display: grid;
  gap: 1rem;
  margin-top: 1.2rem;
}

.field-block {
  display: grid;
  gap: 0.65rem;
}

.field-label {
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--slate-700);
}

.field-input {
  width: 100%;
  min-height: 3.7rem;
  border-radius: 1.25rem;
  border: 1px solid var(--slate-200);
  background: var(--slate-50);
  padding: 0.95rem 1rem;
  color: var(--slate-900);
  font-size: 1rem;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.field-input-large {
  font-size: 1.08rem;
}

.field-input:focus {
  outline: none;
  border-color: var(--blue-500);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.password-wrap {
  position: relative;
}

.password-wrap .field-input {
  padding-right: 5.6rem;
}

.toggle-password-button {
  position: absolute;
  top: 50%;
  right: 0.8rem;
  transform: translateY(-50%);
  border: 1px solid var(--slate-200);
  background: var(--white);
  color: var(--slate-500);
  border-radius: 0.9rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.preview-box {
  border-radius: 1.3rem;
  padding: 1rem;
  border: 1px solid;
}
.preview-box-sky { background: var(--sky-50); border-color: var(--sky-100); color: var(--sky-700); }
.preview-box-rose { background: var(--rose-50); border-color: var(--rose-100); color: var(--rose-700); }
.preview-label { color: currentColor; opacity: 0.9; }
.preview-value {
  margin: 0.45rem 0 0;
  font-size: clamp(2rem, 6vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.last-submission-box {
  margin-top: 1rem;
  background: var(--slate-50);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 1.3rem;
  padding: 1rem;
  color: var(--slate-600);
}

.last-submission-grid {
  display: grid;
  gap: 0.75rem;
}

.last-item {
  border-radius: 1rem;
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 0.85rem;
}

.last-item-label {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slate-400);
  font-weight: 800;
}

.last-item-value {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--slate-900);
}

.table-wrap {
  margin-top: 1.1rem;
  overflow-x: auto;
  border-radius: 1.45rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.table-wrap::-webkit-scrollbar {
  height: 9px;
}
.table-wrap::-webkit-scrollbar-track {
  background: var(--blue-50);
}
.table-wrap::-webkit-scrollbar-thumb {
  background: var(--slate-300);
  border-radius: 999px;
}

.data-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 0.93rem;
}

.data-table th,
.data-table td {
  padding: 0.85rem 0.75rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.data-table thead th {
  color: var(--white);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 900;
  text-align: center;
}

.data-table thead th:first-child,
.data-table tbody th,
.data-table tfoot th {
  text-align: left;
}

.data-table tbody th,
.data-table tfoot th,
.data-table tfoot td {
  font-weight: 900;
}

.data-table tbody td,
.data-table tfoot td {
  text-align: right;
  white-space: nowrap;
}

.data-table tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.75);
}

.data-table .row-total {
  font-weight: 900;
}

.data-table .sticky-label {
  position: sticky;
  left: 0;
  z-index: 1;
  background: inherit;
}

.table-head-sky th { background: var(--sky-700); }
.table-head-violet th { background: var(--violet-700); }
.table-head-emerald th { background: var(--emerald-700); }
.table-foot-dark th,
.table-foot-dark td { background: var(--slate-900); color: var(--white); }

.total-card {
  margin-top: 1rem;
  padding: 1.15rem 1.2rem;
  border-radius: 1.6rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #10b981, #059669);
  color: var(--white);
  box-shadow: 0 16px 40px rgba(5, 150, 105, 0.2);
}

.total-card-title {
  margin: 0;
  font-size: clamp(1.2rem, 4vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.total-card-value {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.toast-container {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  width: min(100%, 420px);
  padding: 0 1rem;
}

.toast {
  border-radius: 1.1rem;
  border: 1px solid;
  background: rgba(255, 255, 255, 0.96);
  padding: 0.95rem 1rem;
  box-shadow: var(--shadow-card);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.45;
}

.toast-info { color: var(--blue-700); border-color: var(--blue-100); }
.toast-success { color: var(--emerald-700); border-color: var(--emerald-100); }
.toast-warning { color: var(--amber-600); border-color: var(--amber-100); }
.toast-error { color: var(--rose-700); border-color: var(--rose-100); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3.25rem;
  border: none;
  border-radius: 1.2rem;
  padding: 0.8rem 1rem;
  font-weight: 900;
  transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }
.btn-large { min-height: 3.8rem; }
.btn-with-icon { gap: 0.55rem; }
.btn-icon { font-size: 1rem; }

.btn-primary {
  background: var(--blue-600);
  color: var(--white);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.22);
}
.btn-primary:hover { background: var(--blue-700); }
.btn-sky { background: var(--sky-600); box-shadow: 0 14px 30px rgba(2, 132, 199, 0.22); }
.btn-sky:hover { background: var(--sky-700); }
.btn-rose { background: var(--rose-600); box-shadow: 0 14px 30px rgba(225, 29, 72, 0.18); }
.btn-rose:hover { background: var(--rose-700); }
.btn-amber { background: var(--amber-500); box-shadow: 0 14px 30px rgba(245, 158, 11, 0.18); }
.btn-amber:hover { background: var(--amber-600); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.82);
  color: var(--blue-700);
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}
.btn-danger {
  background: rgba(255, 255, 255, 0.82);
  color: var(--rose-600);
  border: 1px solid var(--rose-100);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.login-panel {
  max-width: 40rem;
  margin: 0 auto;
}

.empty-state {
  padding: 1.5rem;
  text-align: center;
  color: var(--slate-500);
  font-weight: 700;
}

@media (min-width: 640px) {
  .page-shell { padding: 1.5rem; }
  .time-card {
    flex-direction: row;
    justify-content: center;
  }
  .time-divider {
    width: 1px;
    height: 2.75rem;
  }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .last-submission-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
  .summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .info-panel {
    grid-template-columns: 1fr 1fr auto;
    align-items: center;
  }
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-bottom-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  }
}

@media (max-width: 639px) {
  .page-shell { padding: 0.9rem; }
  .hero-card { border-radius: 2rem; }
  .data-card, .summary-card, .info-panel, .login-panel { border-radius: 1.6rem; }
  .hero-topbar,
  .hero-actions-right {
    flex-wrap: wrap;
  }
  .hero-topbar-between {
    gap: 0.65rem;
  }
  .hero-actions-right {
    justify-content: flex-end;
  }
  .btn,
  .badge-pill,
  .toggle-password-button,
  .time-zone-pill {
    font-size: 0.9rem;
  }
}
