/* EARNOW interface styles */
:root {
  --coral-100: #EAF3FA;
  --coral-400: #4AA7D8;
  --coral-500: #237FAF;
  --coral-600: #1C678F;
  --coral-700: #174A6B;

  --brand-purple: #173F5F;
  --brand-purple-2: #74B6D8;

  --green-500: #12946B;
  --green-tint: rgba(18, 148, 107, .12);
  --amber-500: #B0650C;
  --amber-tint: rgba(176, 101, 12, .12);
  --red-500: #D23F4F;
  --red-tint: rgba(210, 63, 79, .10);

  --ink-900: #22262B;
  --ink-700: #5B6470;
  --ink-500: #8B93A0;
  --ink-border: rgba(34, 38, 43, .12);
  --ink-border-soft: rgba(34, 38, 43, .07);

  --bg-page: #F3F6F8;
  --bg-card: #FFFFFF;
  --bg-inset: #F4F6F8;

  --charcoal-900: #17324A;
  --charcoal-800: #1D425F;
  --charcoal-700: #275774;

  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;
  --radius-xl: 0px;

  --shadow-sm: 0 1px 2px rgba(34, 38, 43, .06);
  --shadow-md: 0 10px 24px -14px rgba(34, 38, 43, .20);
  --shadow-lg: 0 20px 48px -28px rgba(34, 38, 43, .26);
  --shadow-brand: 0 10px 24px -14px rgba(35, 127, 175, .38);
  --glow-emerald: 0 0 14px rgba(35, 127, 175, .22);

  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-logo: 'Michroma', 'Plus Jakarta Sans', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--bg-page);
  background-attachment: fixed;
  color: var(--ink-900);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, .font-display { font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; }
.font-mono { font-family: var(--font-mono); }
.font-logo { font-family: var(--font-logo); }

a { color: var(--coral-500); text-decoration: none; }
a:hover { color: var(--coral-600); }

img { max-width: 100%; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(34, 38, 43, .20); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

button, input, select, textarea { font-family: inherit; font-size: inherit; }

.mt-0 { margin-top: 0; }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes softPulseGlow {
  0%, 100% { box-shadow: 0 0 0 6px #fff, 0 0 0 9px rgba(35,127,175,.22), 0 0 22px rgba(35,127,175,.34), 0 12px 28px -14px rgba(35,127,175,.44); }
  50%      { box-shadow: 0 0 0 6px #fff, 0 0 0 9px rgba(35,127,175,.22), 0 0 30px rgba(35,127,175,.45), 0 12px 28px -14px rgba(35,127,175,.44); }
}
@keyframes ringGlowPulse {
  0%, 100% { box-shadow: 0 0 0 2.5px var(--brand-purple-2), 0 0 10px rgba(109, 211, 245, .30); }
  50%      { box-shadow: 0 0 0 2.5px var(--brand-purple-2), 0 0 20px rgba(109, 211, 245, .60); }
}
@keyframes shimmerFlow { 0% { background-position: 0% 0; } 100% { background-position: 200% 0; } }
@keyframes ringSpin { to { transform: rotate(360deg); } }
@keyframes floatBlob {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(3%, -3%, 0) scale(1.06); }
}

/* ============================================================
   Form controls
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; position: relative; }
.field label { font-size: 12px; font-weight: 700; color: var(--ink-700); }
.field input, .field select {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--ink-border);
  border-radius: 0;
  background: #fff;
  color: var(--ink-900);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.field input::placeholder { color: var(--ink-500); }
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--coral-500);
  box-shadow: 0 0 0 4px var(--coral-100);
}
.field .toggle-pw {
  position: absolute;
  right: 12px;
  bottom: 12px;
  cursor: pointer;
  color: var(--ink-500);
  background: none;
  border: none;
  padding: 0;
  display: flex;
}
.field .toggle-pw:hover { color: var(--coral-500); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 0;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: .01em;
  padding: 13px 22px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, opacity 160ms ease;
  text-align: center;
  text-decoration: none;
}
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 12.5px; }
.btn-primary {
  background: var(--coral-500);
  color: #fff;
  box-shadow: var(--shadow-brand), 0 0 22px rgba(41, 171, 226, .5);
}
.btn-primary:hover { transform: translateY(-1px); background: var(--coral-600); box-shadow: 0 20px 42px -12px rgba(41, 171, 226, .55), 0 0 30px rgba(41, 171, 226, .7); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-secondary {
  background: #fff;
  color: var(--ink-900);
  border: 1.5px solid var(--ink-border);
}
.btn-secondary:hover { background: var(--bg-inset); border-color: rgba(34,38,43,.2); }
.btn-danger { background: #fff; color: var(--red-500); border: 1.5px solid rgba(210, 63, 79, .28); }
.btn-danger:hover { background: var(--red-tint); }
.btn.disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* ============================================================
   Cards / badges / tags / avatar
   ============================================================ */
.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--ink-border);
  border-radius: 0;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  animation: fadeInUp .5s cubic-bezier(.16, 1, .3, 1) both;
}
.card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--coral-500);
  opacity: .8;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 11px;
  border-radius: 0;
  text-transform: capitalize;
}
.badge-success { background: var(--green-tint); color: var(--green-500); }
.badge-warning { background: var(--amber-tint); color: var(--amber-500); }
.badge-danger  { background: var(--red-tint); color: var(--red-500); }
.badge-neutral { background: var(--bg-inset); color: var(--ink-500); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 0;
  border: 1px solid rgba(41, 171, 226, .3);
  color: var(--coral-600);
  background: var(--coral-100);
}

.avatar {
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--coral-100), #fff);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--coral-600);
  font-weight: 800;
  font-family: var(--font-display);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2.5px var(--brand-purple-2), var(--shadow-sm);
}

.help-text { font-size: 13px; color: var(--ink-500); }
.avatar-icon-placeholder {
  color: var(--coral-500);
  background: var(--coral-100);
}
.avatar-icon-placeholder svg { width: 58%; height: 58%; }
.section-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-700); margin-bottom: 14px;
}
.section-label::before {
  content: ""; width: 14px; height: 2px;
  background: var(--coral-500);
  flex-shrink: 0;
}

/* ============================================================
   Auth pages - split hero + form (login / signup)
   ============================================================ */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}

.auth-brand {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px;
  background: linear-gradient(160deg, #123F72 0%, #1C86B8 45%, #29ABE2 100%);
  overflow: hidden;
  color: #fff;
}
.auth-brand::before {
  content: "";
  position: absolute; inset: -10%;
  background-image: radial-gradient(rgba(255, 255, 255, .22) 1.4px, transparent 1.4px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle at 30% 30%, black, transparent 65%);
  pointer-events: none;
  animation: floatBlob 14s ease-in-out infinite;
}
.auth-brand::after {
  content: "";
  position: absolute; bottom: -120px; left: -90px; width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(109, 211, 245, .30), transparent 70%);
  pointer-events: none;
}
.auth-blob {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 32% 30%, #4DC3ED, #123F72 72%);
  box-shadow: inset 0 0 40px rgba(255,255,255,.12);
}
.auth-blob-a { width: 260px; height: 260px; right: -70px; bottom: -90px; opacity: .9; }
.auth-blob-b { width: 150px; height: 150px; right: 90px; bottom: 40px; opacity: .95; animation: floatBlob 9s ease-in-out infinite; }
.auth-blob-c { width: 90px; height: 90px; left: 40px; top: 60px; opacity: .5; }
.auth-brand-inner { max-width: 460px; position: relative; z-index: 1; }
.auth-brand-logo { display: flex; align-items: center; gap: 11px; margin-bottom: 52px; }
.auth-brand-logo .logo-badge {
  width: 38px; height: 38px; background: rgba(255, 255, 255, .16);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, .34); color: var(--brand-purple-2);
  animation: ringGlowPulse 3s ease-in-out infinite;
}
.auth-wordmark {
  font-family: var(--font-logo);
  font-weight: 400;
  font-size: 17px;
  letter-spacing: .04em;
  color: #fff;
}
.auth-eyebrow {
  font-size: 11.5px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
  margin-bottom: 18px; color: var(--brand-purple-2);
  display: flex; align-items: center; gap: 8px;
}
.auth-eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--brand-purple-2); }
.auth-brand h1 {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(34px, 4.4vw, 48px); line-height: 1.1; margin: 0 0 20px;
}
.auth-brand p { font-size: 16px; line-height: 1.7; color: rgba(255, 255, 255, .85); margin: 0 0 44px; max-width: 380px; }
.auth-stats { display: flex; gap: 36px; }
.auth-stats .stat-num { font-family: var(--font-display); font-size: 29px; font-weight: 800; color: #fff; text-shadow: 0 0 18px rgba(109, 211, 245, .6); }
.auth-stats .stat-label { font-size: 11.5px; color: rgba(255, 255, 255, .7); margin-top: 5px; letter-spacing: .02em; }

.auth-form-panel { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px; background: #fff; }
.auth-form-inner { width: 100%; max-width: 400px; animation: fadeInUp .55s cubic-bezier(.16, 1, .3, 1) both; }

.auth-card-head { text-align: left; margin-bottom: 30px; }
.auth-page-logo {
  font-family: var(--font-logo);
  font-weight: 400;
  font-size: clamp(20px, 4vw, 25px);
  color: var(--ink-900);
  margin-bottom: 16px;
  letter-spacing: .02em;
}
.auth-page-logo span { color: var(--ink-900); }
.auth-page-logo em { font-style: normal; color: var(--coral-500); }
.auth-page-subtitle {
  color: var(--coral-600);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 9px;
}
.auth-card-head h2 { font-size: 25px; line-height: 1.28; font-weight: 800; margin: 0; color: var(--ink-900); }
.auth-card-head p { margin: 10px 0 0; }

/* Centered variant (no side hero): admin/code confirmation pages */
.auth-shell.auth-only {
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: var(--bg-page);
}
.auth-shell.auth-only .auth-form-panel { flex: 0 1 440px; width: 100%; padding: 0; background: transparent; }
.auth-shell.auth-only .auth-form-inner {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--ink-border);
  box-shadow: var(--shadow-lg);
  border-radius: 0;
  padding: 38px;
  position: relative;
  border-top: 4px solid var(--coral-500);
}
.auth-shell.auth-only .auth-card-head { text-align: center; }

@media (max-width: 860px) {
  .auth-brand { display: none; }
  .auth-form-panel { flex: 1 1 100%; }
}

/* ============================================================
   Admin login (separate, dark, distinct from user auth)
   ============================================================ */
.admin-login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 0%, rgba(41, 171, 226, .32), transparent 42%),
    radial-gradient(circle at 100% 100%, rgba(109, 211, 245, .18), transparent 46%),
    linear-gradient(180deg, #1B1E22 0%, #101215 100%);
}
.admin-login-card {
  width: 100%;
  max-width: 400px;
  text-align: center;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(109, 211, 245, .22);
  border-radius: 0;
  padding: 42px 34px;
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7), var(--glow-emerald);
  color: #fff;
}
.admin-login-mark {
  font-family: var(--font-logo); font-weight: 400;
  font-size: 19px; letter-spacing: .05em; color: #fff; margin-bottom: 6px;
}
.admin-login-kicker {
  font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
  color: var(--brand-purple-2); margin-bottom: 20px;
}
.admin-login-card h1 { font-size: 21px; font-weight: 700; margin: 0 0 8px; color: #fff; }
.admin-login-card p { font-size: 13px; color: rgba(255,255,255,.6); margin: 0 0 24px; }
.admin-login-card .field label { color: rgba(255,255,255,.7); }
.admin-login-card .field input {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.14);
  color: #fff;
}
.admin-login-card .field input::placeholder { color: rgba(255,255,255,.32); }
.admin-login-card .field input:focus { border-color: var(--brand-purple-2); box-shadow: 0 0 0 4px rgba(109,211,245,.18); }
.admin-login-card .field .toggle-pw { color: rgba(255,255,255,.5); }
.admin-login-card a { color: var(--brand-purple-2); font-weight: 800; }

/* ============================================================
   Employee-code reveal card (post-signup)
   ============================================================ */
.code-card { text-align: center; }

/* ============================================================
   User app shell - sidebar (desktop) + topbar + bottom-nav (mobile)
   ============================================================ */
.app-shell { min-height: 100vh; display: flex; }

.app-sidebar {
  width: 252px; flex-shrink: 0;
  background: linear-gradient(190deg, var(--charcoal-800), var(--charcoal-900));
  display: flex; flex-direction: column; padding: 26px 16px;
  position: sticky; top: 0; height: 100vh;
  border-right: 1px solid rgba(255, 255, 255, .06);
}
.app-sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 32px; color: #fff; }
.app-sidebar-brand .logo-badge {
  width: 34px; height: 34px; flex-shrink: 0;
  background: var(--coral-500);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 18px rgba(41, 171, 226, .55);
}
.app-sidebar-wordmark { font-family: var(--font-logo); font-weight: 400; font-size: 15px; color: #fff; }
.app-sidebar-wordmark em { font-style: normal; color: var(--brand-purple-2); }

.app-sidebar-nav { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; flex: 1; }
.app-sidebar-section-label {
  font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255, 255, 255, .4); padding: 16px 14px 6px;
}
.app-sidebar-section-label:first-child { padding-top: 4px; }
.app-sidebar-nav a {
  position: relative;
  cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-radius: 0; font-size: 13.5px; font-weight: 700; color: rgba(255, 255, 255, .6);
  transition: background 160ms ease, color 160ms ease;
}
.app-sidebar-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.app-sidebar-nav a.active {
  background: var(--coral-500);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.15);
}
.app-sidebar-nav a.active::before {
  content: ""; position: absolute; left: -16px; top: 50%; transform: translateY(-50%);
  width: 4px; height: 22px;
  background: var(--brand-purple-2); box-shadow: 0 0 10px var(--brand-purple-2);
}

.app-sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .1); }
.app-sidebar-logout { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 0; color: rgba(255, 255, 255, .7); font-size: 13px; font-weight: 700; }
.app-sidebar-logout:hover { background: rgba(255, 255, 255, .08); color: #fff; }

@media (max-width: 899px) { .app-sidebar { display: none; } }

.app-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.app-topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 34px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--ink-border-soft);
}
.app-topbar-section { display: flex; flex-direction: column; gap: 2px; }
.app-topbar-eyebrow { font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--coral-500); }
.app-topbar-title { font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--ink-900); }
.app-topbar-user { display: flex; align-items: center; gap: 10px; }
.app-topbar-balance {
  display: flex; align-items: center; gap: 6px;
  background: var(--coral-500); border: 1px solid var(--coral-500);
  color: #fff; font-weight: 800; font-size: 12.5px;
  padding: 8px 14px; border-radius: 0;
  box-shadow: 0 0 16px rgba(41,171,226,.5);
}
.app-topbar-avatar { width: 38px; height: 38px; flex-shrink: 0; animation: ringGlowPulse 3s ease-in-out infinite; }
.app-topbar-settings {
  display: none;
  align-items: center; justify-content: center;
  width: 38px; height: 38px; flex-shrink: 0;
  background: var(--bg-inset); border: 1px solid var(--ink-border);
  color: var(--ink-700);
}
.app-topbar-settings:hover { background: var(--coral-100); color: var(--coral-600); border-color: rgba(41,171,226,.3); }
@media (min-width: 900px) { .app-topbar-settings { display: flex; } }

@media (max-width: 640px) {
  .app-topbar { padding: 14px 18px; }
  .app-topbar-balance span { display: none; }
}

.app-main { flex: 1; display: flex; justify-content: center; padding: 40px 20px 132px; }
.app-page { width: 100%; max-width: 620px; }
.app-page-wide { max-width: 620px; }

@media (min-width: 900px) {
  .app-main { padding: 40px 40px 56px; align-items: flex-start; }
  .app-page-wide { max-width: 1120px; }
}
@media (max-width: 899px) {
  .app-main { padding-top: 30px; }
}

.bottom-nav {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  width: min(480px, calc(100% - 24px));
  padding: 9px;
  border-radius: 24px;
  background: linear-gradient(175deg, var(--charcoal-800), var(--charcoal-900));
  border: 1px solid rgba(109, 211, 245, .22);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 46px -18px rgba(6, 15, 41, .6);
}
.bottom-nav a {
  flex: 1; max-width: 110px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 9px 12px; border-radius: 16px;
  color: rgba(255, 255, 255, .55);
  font-size: 10.5px; font-weight: 800; letter-spacing: .02em;
}
.bottom-nav a.active { background: var(--coral-500); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
@media (min-width: 900px) { .bottom-nav { display: none; } }

/* ============================================================
   Dashboard overview grid (stat cards / weekly ring / monthly bars / platforms)
   ============================================================ */
.dash-section { margin-top: 30px; }
.dash-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dash-section-head h3 { font-size: 15px; margin: 0; }
.dash-section-head .help-text { margin: 0; }

.dash-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dash-stat-grid.dash-stat-grid-compact { gap: 12px; margin-top: 24px; }
.dash-stat {
  background: #fff; border: 1px solid var(--ink-border); padding: 18px 20px;
  display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-sm);
}
.dash-stat-grid-compact .dash-stat { padding: 15px 16px; text-align: left; }
.dash-stat-head { display: flex; align-items: center; justify-content: space-between; }
.dash-stat-label { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-500); }
.dash-stat-value { font-family: var(--font-display); font-size: 27px; font-weight: 800; }
.dash-stat-sub { font-size: 12px; color: var(--ink-500); }
.dash-stat-primary { background: var(--coral-500); color: #fff; border-color: var(--coral-500); box-shadow: var(--shadow-sm), 0 0 24px rgba(41,171,226,.4); }
.dash-stat-primary .dash-stat-label { color: rgba(255,255,255,.8); }
.dash-stat-primary .dash-stat-sub { color: rgba(255,255,255,.75); }
.dash-stat-icon { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.06); color: inherit; flex-shrink: 0; }
.dash-stat-primary .dash-stat-icon { background: rgba(255,255,255,.2); }

.dash-panel-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; margin-top: 16px; }
.dash-panel { background: #fff; border: 1px solid var(--ink-border); border-top: 3px solid var(--coral-500); padding: 20px; box-shadow: var(--shadow-sm); }
.dash-panel:nth-of-type(2) { border-top-color: var(--brand-purple); }
.dash-panel-title { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-500); margin-bottom: 16px; }

.dash-ring-wrap { display: flex; align-items: center; justify-content: center; gap: 18px; }
.dash-ring-legend { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.dash-ring-legend-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--ink-border-soft); }
.dash-ring-legend-row:last-child { border-bottom: none; }
.dash-ring-legend-row .day { font-size: 11.5px; font-weight: 800; color: var(--ink-500); text-transform: uppercase; letter-spacing: .04em; }
.dash-ring-legend-row .count-chip { font-size: 11px; font-weight: 700; color: var(--ink-500); background: var(--bg-inset); padding: 3px 9px; white-space: nowrap; flex-shrink: 0; }
.dash-ring-legend-row.is-active .day { color: var(--ink-900); }
.dash-ring-legend-row.is-active .count-chip { color: #fff; background: var(--coral-500); box-shadow: 0 0 10px rgba(41,171,226,.4); }
.dash-ring-total { font-family: var(--font-display); font-size: 22px; font-weight: 800; fill: var(--ink-900); }

.dash-bars { display: flex; align-items: flex-end; gap: 10px; height: 140px; padding-top: 10px; }
.dash-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.dash-bar { width: 100%; max-width: 30px; background: var(--coral-100); position: relative; min-height: 4px; }
.dash-bar-fill { background: var(--coral-500); width: 100%; position: absolute; bottom: 0; left: 0; transition: height 500ms ease; }
.dash-bar-col.is-current .dash-bar-fill { background: var(--coral-700); }
.dash-bar-label { font-size: 10.5px; font-weight: 700; color: var(--ink-500); text-transform: uppercase; }

.dash-platform-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-top: 16px; }
.dash-platform-pill {
  display: flex; align-items: center; gap: 12px; padding: 16px 18px;
  color: #fff; box-shadow: var(--shadow-sm);
}
.dash-platform-pill .icon { width: 34px; height: 34px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.18); }
.dash-platform-pill .count { font-family: var(--font-display); font-size: 19px; font-weight: 800; line-height: 1; }
.dash-platform-pill .label { font-size: 11px; opacity: .85; margin-top: 2px; }

@media (max-width: 899px) {
  .dash-stat-grid { grid-template-columns: 1fr; }
  .dash-panel-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Profile / task card
   ============================================================ */
.profile-card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--ink-border);
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 34px) 0, 100% 34px, 100% 100%, 0 100%);
  padding: 0 0 30px;
  text-align: center;
  margin-bottom: 22px;
  box-shadow: var(--shadow-md);
  animation: fadeInUp .5s cubic-bezier(.16, 1, .3, 1) both;
}
.profile-cover {
  height: 96px;
  background: linear-gradient(120deg, var(--coral-600), var(--coral-500) 55%, var(--brand-purple-2));
  position: relative;
  overflow: hidden;
}
.profile-cover::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.35) 1.2px, transparent 1.2px);
  background-size: 20px 20px;
  mask-image: radial-gradient(circle at 80% 20%, black, transparent 70%);
}
.profile-card-body { padding: 0 30px; margin-top: -46px; }
.profile-card-body > * { position: relative; z-index: 1; }
.profile-card .avatar { animation: ringGlowPulse 3s ease-in-out infinite; }
.profile-name { font-family: var(--font-display); font-size: 21px; font-weight: 800; margin-top: 16px; }
.profile-role {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--coral-600); margin-top: 6px;
}

.verify-pill {
  display: inline-flex; align-items: center; gap: 5px; justify-content: center;
  margin: 14px auto 0; padding: 6px 14px; border-radius: 0;
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
}
.verify-pill.verified { color: var(--green-500); background: var(--green-tint); box-shadow: inset 0 0 0 1px rgba(18,148,107,.18); }
.verify-pill.unverified { color: var(--red-500); background: var(--red-tint); box-shadow: inset 0 0 0 1px rgba(210,63,79,.18); }

.code-reveal-box {
  margin-top: 18px;
  background: var(--coral-100);
  color: var(--coral-600);
  border: 1px solid rgba(41, 171, 226, .24);
  border-radius: 0;
  padding: 12px 14px;
  font-size: 12.5px;
  font-weight: 700;
}

.stat-row { display: flex; gap: 12px; margin-top: 26px; }
.stat-tile {
  flex: 1; background: var(--bg-inset); border: 1px solid var(--ink-border-soft);
  border-radius: 0; padding: 15px; display: flex; align-items: center; gap: 11px; text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.stat-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.stat-tile .stat-icon {
  width: 36px; height: 36px; border-radius: 0; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.5);
}
.stat-tile .stat-label { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-500); }
.stat-tile .stat-value { font-family: var(--font-display); font-size: 19px; font-weight: 800; }

.progress-block { text-align: left; margin-top: 26px; }
.progress-label { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-500); margin-bottom: 9px; }
.progress-track { height: 10px; border-radius: 0; background: var(--bg-inset); overflow: hidden; box-shadow: inset 0 1px 2px rgba(34,38,43,.08); }
.progress-fill {
  height: 100%;
  background: var(--coral-500);
  transition: width 700ms cubic-bezier(.16, 1, .3, 1);
}

.start-btn {
  position: relative; overflow: visible; cursor: pointer; border: none;
  width: 176px; height: 176px; border-radius: 50%; margin: 30px auto 0;
  background: linear-gradient(150deg, var(--coral-400), var(--coral-600));
  color: #fff; font-family: var(--font-display); font-size: 15.5px; font-weight: 800;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px;
  box-shadow: 0 0 0 7px #fff, 0 0 0 10px rgba(41,171,226,.3), 0 0 45px rgba(41,171,226,.75), 0 16px 40px -10px rgba(41,171,226,.7);
  animation: softPulseGlow 2.2s ease-in-out infinite;
}
.start-btn::before {
  content: "";
  position: absolute; inset: -8px;
  border-radius: 50%;
  border: 1.5px dashed rgba(41, 171, 226, .6);
  animation: ringSpin 26s linear infinite;
}
.start-btn:hover { transform: translateY(-1px); }
.start-btn:disabled { opacity: .75; cursor: wait; transform: none; }
.start-btn.pending-review { background: linear-gradient(150deg, #C9821B, var(--amber-500)); animation: none; box-shadow: var(--shadow-brand), 0 0 0 7px #fff; }
.start-btn.no-task { background: linear-gradient(150deg, #4A525A, var(--ink-900)); animation: none; box-shadow: var(--shadow-brand), 0 0 0 7px #fff; }
.all-done-msg { margin-top: 24px; color: var(--green-500); font-size: 14px; font-weight: 700; }

.quit-progress-form { margin-top: 20px; }
.quit-progress-btn { color: var(--red-500) !important; border-color: rgba(210, 63, 79, .28) !important; }

/* ============================================================
   Milestone celebration overlay
   ============================================================ */
.milestone-overlay {
  position: fixed; inset: 0; z-index: 2200;
  background: rgba(20, 24, 28, .58); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.milestone-card {
  position: relative; overflow: hidden;
  width: min(370px, 100%);
  background: #fff;
  border-radius: 0;
  padding: 40px 32px 32px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--ink-border);
  border-top: 4px solid var(--coral-500);
  animation: fadeInUp .4s cubic-bezier(.16, 1, .3, 1) both;
}
.milestone-close {
  position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border-radius: 0;
  background: var(--bg-inset); border: none; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--ink-700); z-index: 1;
}
.milestone-icon {
  position: relative; z-index: 1;
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 0;
  background: var(--coral-500);
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-brand);
}
.milestone-hurrah {
  position: relative; z-index: 1;
  font-family: var(--font-display); font-weight: 800; font-size: 30px; color: var(--coral-600);
}
.milestone-title {
  position: relative; z-index: 1;
  font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--ink-900); margin-top: 2px;
}
.milestone-card p { position: relative; z-index: 1; color: var(--ink-700); font-size: 13.5px; margin: 10px 0 18px; }
.milestone-progress { position: relative; z-index: 1; font-size: 12px; font-weight: 800; color: var(--coral-600); margin-bottom: 18px; }
.milestone-ok { position: relative; z-index: 1; width: 100%; margin-bottom: 10px; }

/* ============================================================
   Generic content list rows / empty states
   ============================================================ */
.list-row {
  background: #fff; border: 1px solid var(--ink-border);
  border-radius: 0; padding: 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 10px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.list-row:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.list-row .thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 0; border: 1px solid var(--ink-border); flex-shrink: 0; }
.empty-state { text-align: center; padding: 54px 0; color: var(--ink-500); font-size: 13px; }
.empty-state::before {
  content: "✦"; display: block; font-size: 22px; color: var(--coral-400); margin-bottom: 10px;
}

.wallet-card { background: #fff; border-color: rgba(41, 171, 226, .22); border-top: 4px solid var(--coral-500); }
.wallet-card .balance-figure { color: var(--coral-600); }
.balance-figure { font-family: var(--font-display); font-size: 38px; font-weight: 800; margin-bottom: 12px; }
.withdraw-settings-card { border-color: rgba(41, 171, 226, .22); }

.tabs-pill { display: flex; gap: 4px; background: var(--bg-inset); border-radius: 0; padding: 4px; }
.tabs-pill button {
  flex: 1; border: none; background: none; padding: 9px 10px; border-radius: 0;
  font-size: 13px; font-weight: 700; color: var(--ink-500); cursor: pointer; transition: background 140ms ease, color 140ms ease;
}
.tabs-pill button.active { background: #fff; color: var(--coral-600); box-shadow: var(--shadow-sm); }

.upload-drop {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px dashed rgba(41, 171, 226, .4); border-radius: 0; padding: 18px;
  cursor: pointer; color: var(--ink-500); font-size: 13px; font-weight: 700;
  transition: border-color 140ms ease, background 140ms ease;
}
.upload-drop:hover { border-color: var(--coral-500); background: var(--coral-100); color: var(--coral-600); }
.upload-preview { border: 1px solid var(--ink-border); border-radius: 0; overflow: hidden; margin-bottom: 8px; }
.upload-preview img { width: 100%; display: block; max-height: 200px; object-fit: cover; }

/* ============================================================
   Modal / task loading overlay
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(20, 24, 28, .55); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 2000;
}
.modal-box {
  background: #fff; border-radius: 0; width: 100%; max-width: 460px;
  max-height: 88vh; overflow-y: auto; box-shadow: 0 40px 90px -30px rgba(20, 24, 28, .5); position: relative;
  border-top: 4px solid var(--coral-500);
  animation: fadeInUp .35s cubic-bezier(.16, 1, .3, 1) both;
}
.modal-close {
  position: absolute; top: 16px; right: 16px; width: 30px; height: 30px; border-radius: 0;
  background: var(--bg-inset); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink-700);
  border: none; z-index: 2;
}
.modal-close:hover { background: var(--ink-border); }
.modal-body { padding: 28px; }
.modal-body.centered { padding: 48px 32px; text-align: center; }

.premium-empty-icon {
  width: 76px; height: 76px; border-radius: 0;
  background: var(--coral-100);
  color: var(--coral-600);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 22px;
  font-size: 32px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), var(--shadow-sm), 0 0 0 1px rgba(41,171,226,.18);
}
.premium-empty-icon.big-empty-icon { font-size: 36px; }

.no-task-modal-body .help-text { max-width: 340px; margin-left: auto; margin-right: auto; }
.close-modal-btn { width: min(240px, 100%); }

.task-loading-overlay {
  position: fixed; inset: 0; z-index: 2100;
  display: flex; align-items: center; justify-content: center; padding: 22px;
  background: rgba(20, 24, 28, .48); backdrop-filter: blur(6px);
}
.task-loading-card {
  width: min(360px, 100%); border-radius: 0; padding: 38px 28px; text-align: center;
  background: #fff; box-shadow: var(--shadow-lg);
}
.task-loader-ring {
  width: 58px; height: 58px; border-radius: 50%;
  border: 4px solid var(--coral-100);
  border-top-color: var(--coral-500);
  border-right-color: var(--brand-purple);
  margin: 0 auto 18px;
  animation: taskLoaderSpin .8s linear infinite;
}
@keyframes taskLoaderSpin { to { transform: rotate(360deg); } }
.task-loading-title { font-family: var(--font-display); font-weight: 800; font-size: 17px; color: var(--ink-900); }
.task-loading-sub { margin-top: 8px; color: var(--ink-500); font-size: 13px; }

/* ============================================================
   Toast
   ============================================================ */
.toast {
  position: fixed; bottom: 24px; right: 24px; left: 24px; max-width: 360px; margin-left: auto;
  background: var(--ink-900); border-radius: 0; padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px; z-index: 3000; color: #fff; font-size: 13px;
}

.notice-card {
  background: var(--bg-inset);
  border: 1px solid var(--ink-border);
  border-radius: 0;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--ink-700);
  margin-bottom: 16px;
}

/* ============================================================
   Admin shell
   ============================================================ */
.admin-shell { min-height: 100vh; display: flex; }
.admin-sidebar {
  width: 260px; flex-shrink: 0;
  background: linear-gradient(190deg, var(--charcoal-800), var(--charcoal-900));
  display: flex; flex-direction: column; padding: 24px 16px;
  position: sticky; top: 0; height: 100vh;
  border-right: 1px solid rgba(255, 255, 255, .06);
}
.admin-sidebar .brand, .elegant-admin-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 28px; color: #fff; }
.admin-sidebar .logo-badge {
  width: 34px; height: 34px; flex-shrink: 0;
  background: var(--coral-500);
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800;
  box-shadow: 0 0 18px rgba(41, 171, 226, .55);
}
.admin-logo-wordmark { font-family: var(--font-logo); font-weight: 400; font-size: 15px; letter-spacing: .03em; color: #fff; }
.admin-sidebar .brand-sub { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-purple-2); }

.admin-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.admin-nav a {
  cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-radius: 0; font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, .58);
  transition: background 140ms ease, color 140ms ease;
}
.admin-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-nav a.active { background: var(--coral-500); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.admin-nav a .count-badge { margin-left: auto; background: var(--brand-purple-2); color: #0B1B26; font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 0; }

.admin-sidebar-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.back-link { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: rgba(255, 255, 255, .7); font-size: 13px; font-weight: 700; border-radius: 0; }
.back-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-logout-link { border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); }

.admin-main { flex: 1; padding: 38px 42px 60px; overflow-y: auto; min-width: 0; }
.admin-main-inner { max-width: 1180px; }
.admin-page-title { font-family: var(--font-display); font-size: 24px; font-weight: 800; }
.admin-page-sub { font-size: 13px; color: var(--ink-500); margin: 7px 0 0; max-width: 640px; }

.admin-hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  margin-bottom: 24px; padding: 26px 28px; border-radius: 0;
  background: #fff;
  border: 1px solid var(--ink-border);
  border-top: 4px solid var(--coral-500);
  box-shadow: var(--shadow-sm);
}
.hero-metric { text-align: right; }
.hero-metric span { display: block; font-family: var(--font-display); font-size: 34px; font-weight: 800; line-height: 1; color: var(--coral-600); }
.hero-metric small { color: var(--ink-500); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }

.admin-table { background: #fff; border: 1px solid var(--ink-border); border-radius: 0; overflow: hidden; width: 100%; border-collapse: collapse; }
.admin-table th {
  text-align: left; padding: 14px 18px; background: var(--bg-inset); font-size: 10.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em; color: var(--ink-500);
}
.admin-table td { padding: 16px 18px; border-top: 1px solid var(--ink-border-soft); font-size: 13px; vertical-align: middle; }
.admin-table tbody tr:hover { background: var(--bg-inset); }
.premium-table { border-radius: 0; }
.users-clean-table th, .users-clean-table td,
.assign-task-table th, .assign-task-table td { vertical-align: middle; }

.employee-code-pill {
  display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 0;
  background: var(--coral-100);
  border: 1px solid rgba(41,171,226,.24);
  color: var(--coral-600); font-weight: 800; font-size: 12.5px; letter-spacing: .04em;
}

.task-schedule-hero { margin-bottom: 22px; }
.task-row-grid {
  display: grid; grid-template-columns: 50px 1.3fr 1.3fr 110px 110px; gap: 12px; align-items: center;
  background: #fff; border: 1px solid var(--ink-border); border-radius: 0; padding: 14px 16px; margin-bottom: 10px;
}
.task-row-grid-with-image { grid-template-columns: 50px 1.2fr 1.2fr 110px 140px; }
.task-row-grid input {
  border: 1px solid var(--ink-border); border-radius: 0; padding: 9px 10px; font-size: 13px; font-family: inherit; width: 100%;
}
.task-row-grid input:focus { outline: none; border-color: var(--coral-500); box-shadow: 0 0 0 3px var(--coral-100); }
.task-icon-cell { display: flex; align-items: center; gap: 8px; }
.task-icon-preview { width: 40px; height: 40px; border-radius: 0; object-fit: cover; border: 1px solid var(--ink-border); flex-shrink: 0; }
.task-icon-empty {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-inset); color: var(--ink-500); font-size: 9px; font-weight: 700;
}
.task-icon-upload { cursor: pointer; white-space: nowrap; }
@media (max-width: 900px) {
  .task-row-grid, .task-row-grid-with-image { grid-template-columns: 1fr; }
}

.submission-row { background: #fff; border: 1px solid var(--ink-border); border-radius: 0; padding: 18px; display: flex; gap: 16px; align-items: flex-start; margin-bottom: 12px; }
.submission-row .thumb { width: 84px; height: 84px; object-fit: cover; border-radius: 0; border: 1px solid var(--ink-border); flex-shrink: 0; }

/* ============================================================
   Admin > All Tasks History
   ============================================================ */
.history-hero .admin-page-title { font-size: 25px; }
.history-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.history-summary-card {
  background: #fff; border: 1px solid var(--ink-border); border-radius: 0;
  padding: 17px; text-align: center; box-shadow: var(--shadow-sm);
}
.history-summary-card strong { display: block; font-family: var(--font-display); font-size: clamp(19px, 3vw, 25px); font-weight: 700; color: var(--coral-600); }
.history-summary-card span { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-500); }

.history-filter-card {
  display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--ink-border); border-radius: 0;
  padding: 16px; margin-bottom: 16px;
}
.history-search-field, .history-status-field { display: flex; flex-direction: column; gap: 6px; }
.history-search-field { flex: 1; min-width: 220px; }
.history-filter-card label { font-size: 12px; font-weight: 700; color: var(--ink-700); }
.history-filter-card input, .history-filter-card select {
  padding: 10px 12px; border: 1.5px solid var(--ink-border); border-radius: 0;
  font-size: 13px; min-width: 160px; background: #fff; color: var(--ink-900);
}
.history-filter-card input:focus, .history-filter-card select:focus { outline: none; border-color: var(--coral-500); box-shadow: 0 0 0 4px var(--coral-100); }

.history-pagination-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 13px; color: var(--ink-500); margin: 0 0 14px; flex-wrap: wrap;
}
.history-pagination-bar.bottom { margin: 16px 0 0; }
.history-pager { display: flex; align-items: center; gap: 8px; }
.page-chip {
  display: inline-flex; align-items: center; justify-content: center; min-height: 34px;
  padding: 7px 14px; border-radius: 0; background: var(--bg-inset); border: 1px solid var(--ink-border);
  color: var(--ink-700); font-weight: 700; font-size: 12.5px;
}

.history-user-name { font-size: 14px; font-weight: 700; color: var(--ink-900); }
.history-task-title { font-size: 13.5px; font-weight: 700; color: var(--ink-900); }
.history-muted, .history-date { font-size: 12px; color: var(--ink-500); }
.proof-btn { font-weight: 800; }

/* ============================================================
   404 / error page
   ============================================================ */
.error-shell {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: var(--bg-page);
}
.error-card {
  width: 100%; max-width: 440px; text-align: center;
  background: #fff; border: 1px solid var(--ink-border); border-radius: 0;
  border-top: 4px solid var(--coral-500);
  padding: 50px 36px; box-shadow: var(--shadow-lg);
}
.error-code {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(56px, 14vw, 88px); line-height: .9; margin-bottom: 12px;
  color: var(--coral-500);
}
.error-kicker { font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--coral-600); margin-bottom: 12px; }
.error-card h1 { font-size: 21px; font-weight: 800; margin: 0 0 10px; color: var(--ink-900); }
.error-card p { font-size: 13.5px; color: var(--ink-500); margin: 0 0 28px; }
.error-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 780px) {
  .auth-form-inner { padding: 6px; }
  .auth-shell.auth-only .auth-form-inner { padding: 28px 22px; }
  .profile-card-body { padding: 0 20px; }
  .stat-row { flex-direction: column; }
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: relative; }
  .admin-main { padding: 24px 16px 50px; }
  .admin-hero { flex-direction: column; align-items: flex-start; }
  .hero-metric { text-align: left; }
  .history-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .bottom-nav { gap: 2px; padding: 8px; }
  .bottom-nav a { padding: 10px 8px; min-height: 44px; }
  .start-btn { width: 156px; height: 156px; }
  .btn { min-height: 46px; }
  .field input, .field select { min-height: 46px; padding: 12px 14px; }
  .app-topbar { padding: 14px 16px; }
  .app-main { padding-left: 16px; padding-right: 16px; }
  .dash-platform-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .auth-blob-b, .auth-blob-c { display: none; }
  .start-btn { width: 148px; height: 148px; font-size: 14px; }
  .dash-stat-grid-compact { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

.task-edit-card{background:#fff;border:1px solid var(--ink-border-soft);border-radius:14px;padding:18px;margin-bottom:16px}.task-edit-heading{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:14px}.task-edit-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.task-edit-wide{grid-column:1/-1}.task-edit-grid textarea{width:100%;resize:vertical}.mobile-logout-link{color:var(--red-500)!important}.bottom-nav{grid-template-columns:repeat(5,1fr)!important}@media(max-width:760px){.task-edit-grid{grid-template-columns:1fr}.task-edit-wide{grid-column:auto}.task-edit-heading{align-items:flex-start;flex-direction:column}.bottom-nav a{font-size:10px}}

/* Client fix: Start button must remain visible on every active user dashboard. */
.force-start-visible{display:flex!important;visibility:visible!important;opacity:1!important;position:relative!important;z-index:2!important;}

/* Task schedule: two complete editable task cards per row. */
.task-schedule-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start}
.task-schedule-cards .task-edit-card{margin-bottom:0;min-width:0}
.task-schedule-cards .task-edit-grid{grid-template-columns:1fr}
.task-schedule-cards .task-edit-wide{grid-column:auto}
@media(max-width:1180px){.task-schedule-cards{grid-template-columns:1fr}}
