:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #111111;
  --muted: #72706b;
  --line: #e8e2d6;
  --panel: #ffffff;
  --bg: #f7f5ef;
  --black: #111111;
  --gold: #bf9850;
  --gold-soft: #f5ead4;
  --green: #0f7a55;
  --rose: #b4233a;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
button, input, select { font: inherit; }
button { border: 0; cursor: pointer; }

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    linear-gradient(150deg, rgba(17, 17, 17, .92), rgba(17, 17, 17, .72)),
    linear-gradient(135deg, #f8f3e9, #ffffff 48%, #efe4d0);
}

.login-card {
  width: min(100%, 430px);
  border: 1px solid rgba(191, 152, 80, .26);
  background: rgba(255, 255, 255, .96);
  border-radius: 16px;
  padding: 26px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .24);
}

.brand-mark {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--black);
  color: var(--gold);
  border: 1px solid var(--gold);
  font-weight: 950;
  letter-spacing: .02em;
  margin-bottom: 18px;
}

.login-card h1 { margin: 0; font-size: 31px; letter-spacing: 0; }
.login-card p { color: var(--muted); margin: 8px 0 24px; }
.login-card form, .compact-form { display: grid; gap: 13px; }

.auth-panel {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fbfaf7;
}

.auth-panel summary {
  cursor: pointer;
  color: var(--black);
  font-weight: 900;
}

.auth-panel form { margin-top: 12px; }

label { display: grid; gap: 7px; color: #5d5a53; font-size: 13px; font-weight: 800; }
input, select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 13px;
  background: white;
  color: var(--ink);
}

.phone-shell {
  max-width: 520px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  box-shadow: 0 0 0 1px rgba(17, 17, 17, .05);
}

.app-top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 16px 12px;
  background: rgba(247, 245, 239, .92);
  backdrop-filter: blur(16px);
}

.app-top span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; }
.app-top strong { display: block; font-size: 20px; }
.avatar, .icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--black);
  color: var(--gold);
  border: 1px solid rgba(191, 152, 80, .45);
  font-weight: 950;
}

.avatar.big {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
}

.app-main {
  display: grid;
  gap: 14px;
  padding: 0 14px 94px;
}

.hero-app {
  min-height: 205px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 20px;
  border-radius: 18px;
  color: white;
  background:
    linear-gradient(145deg, rgba(17, 17, 17, .97), rgba(44, 40, 34, .93)),
    linear-gradient(35deg, transparent, rgba(191, 152, 80, .32));
  box-shadow: 0 22px 45px rgba(0, 0, 0, .18);
}

.hero-app h2 { margin: 12px 0 8px; font-size: 42px; letter-spacing: 0; }
.hero-app p { margin: 0; max-width: 330px; color: rgba(255, 255, 255, .78); }
.eyebrow { font-size: 12px; font-weight: 900; text-transform: uppercase; color: var(--gold); }

.punch-panel, .card, .salary-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 8px 26px rgba(17, 17, 17, .05);
}

.status-line, .section-head, .list-row, .setting-line, .profile-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.profile-card { justify-content: flex-start; }
.profile-card h3, .profile-card p { margin: 0; }
.profile-card p { color: var(--muted); margin-top: 4px; }

.status-line { margin-bottom: 14px; color: var(--muted); font-weight: 900; }
.punch-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.stack-actions { display: grid; gap: 10px; }
.punch {
  min-height: 92px;
  border-radius: 14px;
  color: white;
  font-size: 20px;
  font-weight: 950;
}
.punch.in { background: linear-gradient(145deg, #0c6d4f, #16a36e); }
.punch.out { background: linear-gradient(145deg, #7f1d1d, #c92a4a); }

.primary, .secondary, .ghost {
  min-height: 48px;
  border-radius: 10px;
  padding: 0 15px;
  font-weight: 900;
}
.primary { background: var(--black); color: var(--gold); border: 1px solid var(--gold); }
.secondary { background: var(--gold); color: #111111; }
.ghost { background: #f3efe7; color: #111111; border: 1px solid var(--line); }
.full { width: 100%; }

.quick-grid, .stats, .action-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.employee-only button:first-child strong { font-size: 14px; line-height: 1.2; }
.quick-grid button, .stats div, .action-grid button {
  min-height: 82px;
  border-radius: 14px;
  background: white;
  border: 1px solid var(--line);
  padding: 10px;
  text-align: left;
}
.stats { grid-template-columns: repeat(3, 1fr); }
.action-grid { grid-template-columns: 1fr 1fr; }
.action-grid button {
  min-height: 76px;
  background: #171717;
  color: white;
}
.action-grid span { color: rgba(255,255,255,.72); }
.quick-grid strong, .stats strong, .action-grid strong { display: block; font-size: 20px; overflow-wrap: anywhere; }
.quick-grid span, .stats span, .action-grid span, .muted { color: var(--muted); font-size: 13px; }

.card h3, .section-head h3 { margin: 0; font-size: 18px; }
.section-head { margin-bottom: 12px; }
.section-head button {
  min-height: 34px;
  border-radius: 9px;
  background: var(--gold-soft);
  color: #5f4319;
  padding: 0 10px;
  font-weight: 900;
}

.shift-focus {
  display: grid;
  gap: 5px;
  padding: 14px;
  border-radius: 12px;
  background: #171717;
  color: white;
}
.shift-focus strong { font-size: 24px; }
.shift-focus span { color: rgba(255,255,255,.7); }

.list-row {
  padding: 13px 0;
  border-top: 1px solid #f0ebe1;
}
.list-row:first-of-type { border-top: 0; }
.list-row strong, .list-row span { display: block; }
.list-row span { margin-top: 4px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: #f1f1ef;
  color: #3f3d38;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.tag.good { background: #dff5e8; color: #12623e; }
.tag.warn { background: #fff1cf; color: #8a5a00; }

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

.mini-actions button {
  min-width: 38px;
  height: 32px;
  border-radius: 9px;
  background: #f3efe7;
  color: #111111;
  font-size: 12px;
  font-weight: 900;
  padding: 0 8px;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.report-grid button {
  min-height: 54px;
  border-radius: 10px;
  background: #fbfaf7;
  color: #111111;
  border: 1px solid var(--line);
  font-weight: 900;
}

.salary-card {
  background: linear-gradient(145deg, #111111, #2c261b);
  color: white;
}
.salary-card span { color: rgba(255,255,255,.72); font-weight: 800; }
.salary-card strong { display: block; margin: 8px 0; font-size: 37px; }
.salary-card p { color: rgba(255,255,255,.72); margin: 0; }

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(520px, 100%);
  display: grid;
  gap: 4px;
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
}
.bottom-nav button {
  min-height: 54px;
  border-radius: 11px;
  background: transparent;
  color: #77736b;
  font-weight: 900;
}
.bottom-nav b, .bottom-nav span { display: block; }
.bottom-nav span { margin-top: 3px; font-size: 11px; }
.bottom-nav button.active { background: #171717; color: var(--gold); }

.alert, .toast {
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 900;
}
.alert { background: #ffe1e7; color: #9f1239; }
.toast { background: #e0f6e9; color: #12623e; }
.empty { min-height: 102px; display: grid; place-items: center; color: var(--muted); text-align: center; }

@media (min-width: 760px) {
  body { background: #ebe6dc; }
  .phone-shell { min-height: 100vh; }
}

@media (max-width: 390px) {
  .hero-app h2 { font-size: 35px; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .punch-actions { grid-template-columns: 1fr; }
  .list-row { align-items: flex-start; flex-direction: column; }
  .mini-actions { justify-content: flex-start; }
}
