@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

:root {
  --ink: #0b1020;
  --line: rgba(255,255,255,.08);
  --text: #f3f6ff;
  --muted: #93a0c2;
  --blue: #4f8cff;
  --blue2: #7aa7ff;
  --mint: #2ee6a8;
  --amber: #ffb020;
  --pink: #ff5d8f;
  --shadow: 0 24px 60px rgba(4, 8, 20, .45);
  --r: 22px;
  --font: "Plus Jakarta Sans", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  min-height: 100vh;
  position: relative;
  isolation: isolate;
  background: #070b16;
}
body::before,
body::after {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -2;
  pointer-events: none;
}
body::before {
  background:
    radial-gradient(34% 32% at 8% 16%, rgba(79,140,255,.42), transparent 62%),
    radial-gradient(30% 28% at 92% 10%, rgba(46,230,168,.20), transparent 60%),
    radial-gradient(38% 34% at 70% 90%, rgba(139,123,255,.22), transparent 62%),
    radial-gradient(24% 22% at 48% 48%, rgba(255,176,32,.08), transparent 70%),
    #070b16;
  animation: driftA 22s ease-in-out infinite alternate;
  filter: saturate(1.08);
}
body::after {
  background:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  opacity: .42;
  animation: driftB 36s linear infinite;
}
@keyframes driftA {
  0% { transform: translate3d(-2%, 1%, 0) scale(1) rotate(0deg); }
  50% { transform: translate3d(4%, -3%, 0) scale(1.08) rotate(2deg); }
  100% { transform: translate3d(-3%, 4%, 0) scale(1.04) rotate(-1.5deg); }
}
@keyframes driftB {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-64px, -64px, 0); }
}
.page-in {
  animation: pageIn .55s cubic-bezier(.22,1,.36,1) both;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(14px) scale(.985); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}
.login-grid {
  animation: cardIn .7s cubic-bezier(.22,1,.36,1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px) scale(.96); }
  to { opacity: 1; transform: none; }
}
body.leaving .login-wrap {
  animation: leaveOut .45s ease forwards;
}
@keyframes leaveOut {
  to { opacity: 0; transform: translateY(-10px) scale(.98); filter: blur(8px); }
}
.enter-veil {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  background: rgba(7,11,22,.55);
  backdrop-filter: blur(10px);
  opacity: 0; pointer-events: none;
  transition: opacity .35s ease;
}
.enter-veil.on { opacity: 1; pointer-events: auto; }
.enter-veil span {
  font-weight: 750; letter-spacing: .4px;
  padding: 12px 18px; border-radius: 14px;
  background: rgba(16,24,43,.9);
  border: 1px solid var(--line);
}
a { color: var(--blue2); text-decoration: none; }
a:hover { color: #fff; }
.wrap, .app {
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 18px 70px;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 12px 14px 12px 12px;
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo {
  width: 44px; height: 44px; border-radius: 14px;
  background: conic-gradient(from 210deg, #4f8cff, #2ee6a8, #8b7bff, #4f8cff);
  color: #061018; font-weight: 800; display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(79,140,255,.35);
}
.brand h1 { font-size: 17px; margin: 0; font-weight: 800; letter-spacing: -.3px; }
.brand small { color: var(--muted); display: block; margin-top: 2px; font-size: 12px; }
.who { color: var(--muted); font-size: 14px; }
.btn, button {
  appearance: none; border: 0; cursor: pointer; font-family: inherit;
  background: linear-gradient(180deg, #7aa7ff, #3d7fff);
  color: #071226; font-weight: 750;
  padding: 11px 16px; border-radius: 14px; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: .16s transform, .16s filter;
  box-shadow: 0 8px 18px rgba(61,127,255,.25);
}
.btn:hover, button:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn:disabled, button:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.ghost, button.ghost {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  color: var(--text);
  box-shadow: none;
}
.notify-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 12px;
  background: rgba(79,140,255,.12); border: 1px solid rgba(79,140,255,.35);
  color: #dbe7ff; font-weight: 700; font-size: 13px;
}
.notify-btn .bell { font-size: 16px; line-height: 1; }
.notify-btn.on {
  background: rgba(46,230,168,.14); border-color: rgba(46,230,168,.4); color: #b6ffdf;
}
.notify-btn.denied {
  background: rgba(255,93,143,.12); border-color: rgba(255,93,143,.35); color: #ffc1d3;
}
.btn.good, button.good { background: linear-gradient(180deg, #57f0bc, #17c98a); }
.btn.warn, button.warn { background: linear-gradient(180deg, #ffd36a, #f0a000); color: #2a1a00; }
.btn.danger, button.danger { background: linear-gradient(180deg, #ff8aa8, #ef4d73); color: #2a0712; box-shadow: none; }
.btn.big { width: 100%; padding: 16px 18px; font-size: 15px; border-radius: 16px; }
.grid { display: grid; gap: 16px; }
.grid.2 { grid-template-columns: 1.05fr .95fr; }
.grid.3 { grid-template-columns: repeat(3, 1fr); }
.grid.4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.02));
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card h2 { margin: 0 0 14px; font-size: 16px; font-weight: 750; }
label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 6px; font-weight: 600; }
input, select, textarea {
  width: 100%; background: #0c1324; color: var(--text);
  border: 1px solid rgba(255,255,255,.1); border-radius: 12px;
  padding: 12px 13px; font-size: 16px; font-family: inherit;
  max-width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: rgba(79,140,255,.8);
  box-shadow: 0 0 0 4px rgba(79,140,255,.16);
}
.flash { list-style: none; padding: 0; margin: 0 0 16px; }
.flash li { padding: 11px 14px; border-radius: 12px; margin-bottom: 8px; font-size: 14px; }
.flash .ok { background: rgba(46,230,168,.14); color: #b6ffdf; }
.flash .error { background: rgba(255,93,143,.14); color: #ffc1d3; }
.kpi {
  border-radius: 16px;
  padding: 16px 16px 14px;
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
}
.kpi .v { font-size: 24px; font-weight: 800; margin-top: 6px; letter-spacing: -.6px; }
.kpi .l { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; font-weight: 700; opacity: .85; }
.kpi { background: #0d1528; border: 1px solid var(--line); }
.kpi::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
}
.kpi .l { color: var(--muted); }
.kpi .v { color: var(--text); }
.kpi-hours::before { background: #4f8cff; }
.kpi-extra::before { background: #2ee6a8; }
.kpi-pay::before { background: #ffb020; }
.kpi-pct::before { background: #8b7bff; }
.kpi-sun::before { background: #ff5d8f; }
.rate-now, .rate-extra, .rate-sun { background: transparent; margin: 0; padding: 8px 0; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
tr:hover td { background: rgba(255,255,255,.025); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-grid {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  background: rgba(16,24,43,.72);
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: cardIn .7s cubic-bezier(.22,1,.36,1) both;
}
.login-hero {
  padding: 36px 32px;
  background:
    linear-gradient(160deg, rgba(79,140,255,.28), transparent 55%),
    linear-gradient(20deg, rgba(46,230,168,.16), transparent 40%),
    #0c1426;
}
.login-hero h2 { font-size: 32px; margin: 12px 0 10px; letter-spacing: -.8px; line-height: 1.15; }
.login-hero p { color: #c5d0ee; margin: 0; line-height: 1.6; }
.login-form { padding: 36px 30px; }
.login-card { width: min(440px, 100%); }
.login-kicker { font-size: 11px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.login-title { font-size: 28px; margin: 8px 0 8px; letter-spacing: -.6px; }
.login-sub { color: var(--muted); margin: 0 0 18px; }
.clock {
  font-variant-numeric: tabular-nums;
  font-size: 58px; font-weight: 800; letter-spacing: -2px; line-height: 1;
  background: linear-gradient(180deg, #fff, #9ec0ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.muted { color: var(--muted); }
.tag {
  display: inline-flex; align-items: center;
  padding: 4px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
  background: rgba(255,255,255,.06); color: #d5def5;
}
.tag.on { background: rgba(46,230,168,.14); color: #2ee6a8; }
.tag.sun { background: rgba(255,176,32,.14); color: #ffb020; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.status-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 16px; }
.hero-dots { display: flex; gap: 8px; margin-top: 28px; }
.hero-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--blue); }
.hero-dots span:nth-child(2) { background: var(--mint); }
.hero-dots span:nth-child(3) { background: var(--pink); }
.avatar-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 12px; margin: 8px 0 12px; }
.avatar-pick > p { grid-column: 1 / -1; line-height: 1.5; }
.avatar-opt { margin: 0; cursor: pointer; position: relative; }
.avatar-opt input { position: absolute; opacity: 0; pointer-events: none; }
.avatar-opt img {
  width: 100%; height: auto; aspect-ratio: 1; border-radius: 50%; display: block;
  border: 3px solid transparent; background: #0c1324;
  transition: .15s transform, .15s border-color, .15s box-shadow;
}
.avatar-opt input:checked + img {
  border-color: #7aa7ff;
  box-shadow: 0 0 0 4px rgba(79,140,255,.25);
  transform: scale(1.06);
}
.avatar-opt:hover img { transform: translateY(-2px); }
.avatar-mini, .avatar-face {
  width: 36px; height: 36px; border-radius: 12px; object-fit: cover; display: block;
}
.logo.avatar-face { width: 44px; height: 44px; border-radius: 14px; padding: 0; background: none; box-shadow: none; }
.avatar-wrap { position: relative; display: inline-block; line-height: 0; }
.cam-badge {
  position: absolute; right: -4px; bottom: -4px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #3d7fff; display: grid; place-items: center;
  font-size: 10px; border: 2px solid #070b16;
}
.rate-box { background: #0c1324; border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.rate-row { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.rate-row b { font-size: 16px; }
.rate-row em { color: var(--muted); font-style: normal; font-size: 12px; }
.rate-row.on-sun { color: var(--amber); }
.kpi-row { align-items: stretch; }
@media (max-width: 900px) {
  .grid.2, .grid.3, .grid.4, .login-grid, .kpi-row { grid-template-columns: 1fr; }
  .clock { font-size: 40px; }
  .login-hero {
    display: block;
    padding: 22px 18px 16px;
  }
  .login-hero h2 { font-size: 26px; margin: 10px 0 8px; }
  .login-hero p { font-size: 14px; }
  .hero-dots { margin-top: 14px; }
  .login-wrap {
    min-height: 100dvh;
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 20px 14px calc(24px + env(safe-area-inset-bottom));
  }
  .login-grid {
    width: 100%;
    border-radius: 22px;
    display: block;
  }
  .login-form { padding: 22px 18px 24px; }
  .login-title { font-size: 24px; }
  .wrap, .app {
    padding: 12px 12px calc(28px + env(safe-area-inset-bottom));
  }
  .topbar {
    flex-wrap: wrap;
    align-items: flex-start;
    padding: 12px;
    gap: 12px;
  }
  .topbar .who, .topbar .actions {
    width: 100%;
    justify-content: flex-end;
  }
  .brand h1 { font-size: 15px; }
  .card { padding: 16px; border-radius: 18px; }
  .actions { flex-direction: column; align-items: stretch; }
  .actions form { width: 100%; }
  .btn.big, .actions .btn { width: 100%; }
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .rate-row { flex-direction: column; align-items: flex-start; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  body::before, body::after { animation: none; }
}
