/* Digital Eagles interface styles */
:root {
  --coral-100: #FDE4D2;
  --coral-400: #FF8A3D;
  --coral-500: #FF6A00;
  --coral-600: #E05A00;
  --coral-700: #B84800;

  --brand-purple: #0A0A0A;
  --brand-purple-2: #FFB570;

  --green-500: #1FAA6E;
  --green-tint: rgba(31, 170, 110, .14);
  --amber-500: #B0650C;
  --amber-tint: rgba(176, 101, 12, .12);
  --red-500: #E5455A;
  --red-tint: rgba(229, 69, 90, .10);

  --ink-900: #141414;
  --ink-700: #4E4E4E;
  --ink-500: #8A8A8A;
  --ink-border: rgba(0, 0, 0, .12);
  --ink-border-soft: rgba(0, 0, 0, .06);

  --bg-page: #F7F7F5;
  --bg-card: #FFFFFF;
  --bg-inset: #F0F0EE;

  --navy-900: #0A0A0A;
  --navy-800: #161616;
  --navy-700: #232323;
  --navy-accent: #FFB570;

  --charcoal-900: #0A0A0A;
  --charcoal-800: #161616;
  --charcoal-700: #232323;

  --radius-sm: 6px;
  --radius-md: 9px;
  --radius-lg: 13px;
  --radius-xl: 18px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .1);
  --shadow-md: 0 10px 24px -14px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 52px -26px rgba(0, 0, 0, .45);
  --shadow-brand: 0 0 26px -2px rgba(255, 106, 0, .55);
  --shadow-blue: 0 10px 24px -10px rgba(0, 0, 0, .5);
  --glow-focus: 0 0 0 4px var(--coral-100);

  --font-display: 'Oswald', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-logo: 'Cinzel', 'Oswald', serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: linear-gradient(160deg, #FAFAF9 0%, #F5F5F3 50%, #F0EDE8 100%) 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;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  top: -60px; right: -60px;
  width: 620px; height: 620px;
  background: url('../img/logo-icon.png') no-repeat center / contain;
  opacity: .07;
  pointer-events: none;
  z-index: 0;
  animation: eagleWatermarkFloat 11s ease-in-out infinite;
}
@keyframes eagleWatermarkFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-22px); } }
.app-shell, .admin-shell, .auth-shell, .error-shell { position: relative; z-index: 1; }

h1, h2, h3, h4, .font-display { font-family: var(--font-display); font-weight: 700; letter-spacing: -.005em; }
* { font-style: normal !important; }
.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(29, 36, 48, .18); border-radius: 0; }
::-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 eagleFlap {
  0%, 100% { transform: rotate(-4deg) scaleY(1); }
  50%      { transform: rotate(4deg) scaleY(.94); }
}
@keyframes liveNotificationPulse { 0%,100%{transform:scale(1)} 40%{transform:scale(1.12)} }

/* ============================================================
   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: var(--radius-sm);
  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: var(--glow-focus);
}
.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: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 700;
  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 {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--coral-500), var(--coral-600));
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.btn-primary::after {
  content: "";
  position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.45), transparent);
  animation: btnShine 3.2s ease-in-out infinite;
}
@keyframes btnShine { 0% { left: -60%; } 60%, 100% { left: 140%; } }
.btn-primary:hover { transform: translateY(-1px); background: var(--coral-600); box-shadow: var(--shadow-md); }
.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(29,36,48,.18); }
.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: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  animation: fadeInUp .5s cubic-bezier(.16, 1, .3, 1) both;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  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: 0; background: currentColor; flex-shrink: 0; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 0;
  border: 1px solid rgba(169, 134, 47, .28);
  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: 700;
  font-family: var(--font-display);
  border: 3px solid #fff;
  box-shadow: 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: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-700); margin-bottom: 14px;
}
.section-label::before {
  content: ""; width: 14px; height: 2px;
  background: var(--coral-500);
  flex-shrink: 0;
  border-radius: 2px;
}

/* ============================================================
   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(150deg, var(--navy-900) 0%, var(--navy-800) 45%, var(--coral-600) 100%);
  overflow: hidden;
  color: #fff;
}
.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: 60px; height: 60px; background: #fff; padding: 8px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}
.auth-brand-logo .logo-badge img { width: 100%; height: 100%; object-fit: contain; }
.auth-wordmark {
  font-family: var(--font-logo);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: .06em;
  color: #fff;
}
.auth-eyebrow {
  font-size: 11.5px; font-weight: 700; letter-spacing: .16em; 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;
  font-size: clamp(32px, 4.2vw, 46px); line-height: 1.15; margin: 0 0 20px;
}
.auth-brand p { font-size: 16px; line-height: 1.7; color: rgba(255, 255, 255, .82); margin: 0 0 44px; max-width: 380px; }
.auth-stats { display: flex; gap: 36px; }
.auth-stats .stat-num { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: #fff; }
.auth-stats .stat-label { font-size: 11.5px; color: rgba(255, 255, 255, .68); margin-top: 5px; letter-spacing: .02em; }

.auth-form-panel { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px; background: #fff; position: relative; overflow: hidden; }
.auth-form-panel::before {
  content: "";
  position: absolute; inset: 0;
  background: url('../img/logo-icon.png') no-repeat center 65% / 320px auto;
  opacity: .05;
  pointer-events: none;
}
.auth-form-inner { width: 100%; max-width: 400px; position: relative; z-index: 1; 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: 800;
  font-size: clamp(18px, 3.6vw, 22px);
  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: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 9px;
}
.auth-card-head h2 { font-size: 24px; 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: var(--radius-lg);
  padding: 38px;
  position: relative;
  overflow: hidden;
  border-top: 4px solid var(--coral-500);
}
.auth-shell.auth-only .auth-form-inner::before {
  content: "";
  position: absolute; inset: 0;
  background: url('../img/logo-icon.png') no-repeat center 75% / 260px auto;
  opacity: .05;
  pointer-events: none;
}
.auth-shell.auth-only .auth-form-inner > * { position: relative; z-index: 1; }
.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: linear-gradient(155deg, #F5EEDC 0%, #FFFDF8 60%);
}
.admin-login-card {
  width: 100%;
  max-width: 400px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--ink-border);
  border-top: 5px solid var(--coral-500);
  border-radius: var(--radius-lg);
  padding: 42px 34px;
  box-shadow: var(--shadow-lg);
  color: var(--ink-900);
}
.admin-login-mark {
  font-family: var(--font-logo); font-weight: 800;
  font-size: 18px; letter-spacing: .03em; color: var(--ink-900); margin-bottom: 6px;
}
.admin-login-kicker {
  font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--coral-500); margin-bottom: 20px;
}
.admin-login-card h1 { font-size: 21px; font-weight: 700; margin: 0 0 8px; color: var(--ink-900); }
.admin-login-card p { font-size: 13px; color: var(--ink-500); margin: 0 0 24px; }
.admin-login-card .field label { color: var(--ink-700); }
.admin-login-card .field input {
  background: var(--bg-inset);
  border-color: var(--ink-border);
  color: var(--ink-900);
}
.admin-login-card .field input::placeholder { color: var(--ink-500); }
.admin-login-card .field input:focus { border-color: var(--coral-500); box-shadow: var(--glow-focus); }
.admin-login-card .field .toggle-pw { color: var(--ink-500); }
.admin-login-card a { color: var(--coral-500); font-weight: 700; }

/* ============================================================
   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: 260px; 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: 8px 8px 30px; color: #fff; }
.app-sidebar-brand .logo-badge {
  width: 40px; height: 40px; flex-shrink: 0; background: #fff; padding: 5px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.app-sidebar-brand .logo-badge img { width: 100%; height: 100%; object-fit: contain; }
.app-sidebar-wordmark { font-family: var(--font-logo); font-weight: 700; font-size: 15px; color: #fff; letter-spacing: .01em; }
.app-sidebar-wordmark em { font-style: normal; color: var(--coral-400); }

.app-sidebar-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; flex: 1; }
.app-sidebar-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: .1em; 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: var(--radius-sm); font-size: 13px; font-weight: 600; font-family: var(--font-display); letter-spacing: .01em; color: rgba(255,255,255,.65); white-space: nowrap;
  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: var(--shadow-brand);
}

.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: var(--radius-sm); color: rgba(255,255,255,.7); font-size: 13px; font-weight: 600; }
.app-sidebar-logout:hover { background: rgba(255,255,255,.08); color: #fff; }



.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; align-items: center; gap: 10px; }
.app-topbar-logo-mobile { display: flex; align-items: center; }
.app-topbar-logo-mobile img { display: block; }
.app-topbar-wordmark { font-family: var(--font-logo); font-weight: 700; font-size: 16px; color: var(--ink-900); letter-spacing: .01em; }
.app-topbar-wordmark em { font-style: normal; color: var(--coral-500); }
.app-topbar-wordmark-mobile { display: none; }
@media (max-width: 899px) {
  .app-topbar-wordmark-mobile { display: inline; font-family: var(--font-logo); font-weight: 700; font-size: 16px; color: var(--ink-900); letter-spacing: .01em; }
  .app-topbar-wordmark-mobile em { font-style: normal; color: var(--coral-500); }
}
.app-topbar-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: .12em; 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: none; }
.app-topbar-avatar { width: 38px; height: 38px; flex-shrink: 0; }
.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);
  border-radius: 50%;
}
.app-topbar-settings:hover { background: var(--coral-100); color: var(--coral-600); border-color: rgba(255,106,0,.28); }
@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; animation: fadeInUp .4s ease both; }
.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-sidebar { display: none; }
  .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: 7px;
  border-radius: 999px;
  background: linear-gradient(175deg, var(--coral-400), var(--coral-600));
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: var(--shadow-lg);
}
.bottom-nav a {
  flex: 1; max-width: 110px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 10px; border-radius: 999px;
  color: rgba(255,255,255,.75);
  font-size: 10px; font-weight: 700; letter-spacing: .02em;
}
.bottom-nav a.active { background: rgba(255,255,255,.18); color: #fff; }
@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);
  border-radius: var(--radius-md);
  animation: fadeInUp .5s cubic-bezier(.16,1,.3,1) both;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.dash-stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.dash-stat-grid .dash-stat:nth-child(1) { animation-delay: .02s; }
.dash-stat-grid .dash-stat:nth-child(2) { animation-delay: .1s; }
.dash-stat-grid .dash-stat:nth-child(3) { animation-delay: .18s; }
.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: 700; letter-spacing: .05em; 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(--navy-800); color: #fff; border-color: var(--navy-800); box-shadow: var(--shadow-md); }
.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; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; background: rgba(29,36,48,.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); border-radius: var(--radius-md); animation: fadeInUp .55s cubic-bezier(.16,1,.3,1) both; transition: transform 180ms ease, box-shadow 180ms ease; }
.dash-panel:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.dash-panel:nth-of-type(2) { border-top-color: var(--navy-800); }
.dash-panel-title { font-size: 11px; font-weight: 700; letter-spacing: .05em; 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: 700; color: var(--ink-500); text-transform: uppercase; letter-spacing: .03em; }
.dash-ring-legend-row .count-chip { font-size: 11px; font-weight: 600; color: var(--ink-500); background: var(--bg-inset); padding: 3px 9px; white-space: nowrap; flex-shrink: 0; border-radius: 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); }
.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; border-radius: 0; overflow: hidden; }
.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: 600; 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); border-radius: var(--radius-md);
}
.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); border-radius: var(--radius-sm); }
.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: var(--navy-800);
  border: 1px solid var(--ink-border);
  border-radius: var(--radius-lg);
  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(--navy-900), var(--coral-600) 70%, var(--coral-400));
  position: relative;
  overflow: hidden;
}
.profile-cover::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.25) 50%, transparent 70%);
  background-size: 220% 100%;
  animation: coverShine 5s ease-in-out infinite;
}
@keyframes coverShine { 0%, 100% { background-position: 200% 0; } 50% { background-position: -20% 0; } }
.profile-card-body { padding: 0 30px; margin-top: -46px; }
.profile-card-body > * { position: relative; z-index: 1; }
.profile-card .profile-name, .profile-card .profile-role { color: #fff; }
.profile-card .profile-role { color: var(--navy-accent); }
.profile-card .help-text, .profile-card .dash-stat-sub, .profile-card .progress-label { color: rgba(255,255,255,.65); }
.profile-card .dash-stat:not(.dash-stat-primary) { background: rgba(255,255,255,.06); border-color: var(--coral-400); }
.profile-card .dash-stat:not(.dash-stat-primary) .dash-stat-label { color: rgba(255,255,255,.6); }
.profile-card .dash-stat:not(.dash-stat-primary) .dash-stat-value { color: #fff; }
.profile-card .progress-track { background: rgba(255,255,255,.12); }
.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: 700; letter-spacing: .08em; 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: 700; text-transform: uppercase; letter-spacing: .06em;
}
.verify-pill.verified { color: var(--green-500); background: var(--green-tint); }
.verify-pill.unverified { color: var(--red-500); background: var(--red-tint); }

.code-reveal-box {
  margin-top: 18px;
  background: var(--coral-100);
  color: var(--coral-600);
  border: 1px solid rgba(169, 134, 47, .22);
  border-radius: var(--radius-md);
  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: var(--radius-md); padding: 15px; display: flex; align-items: center; gap: 11px; text-align: left;
  transition: transform 180ms ease, box-shadow 180ms ease;
  animation: fadeInUp .5s cubic-bezier(.16,1,.3,1) both;
}
.stat-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.stat-tile .stat-icon {
  width: 36px; height: 36px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-tile .stat-label { font-size: 10.5px; font-weight: 600; letter-spacing: .05em; 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: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-500); margin-bottom: 9px; }
.progress-track { height: 10px; border-radius: 999px; background: var(--bg-inset); overflow: hidden; }
.progress-fill {
  height: 100%;
  background: var(--green-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(--navy-900), var(--coral-500));
  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, var(--shadow-brand);
  transition: transform 160ms ease, box-shadow 160ms ease;
  animation: startBtnPulse 2.2s ease-in-out infinite;
}
.start-btn::before {
  content: "";
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0%, rgba(255,255,255,.55) 8%, transparent 16%);
  animation: startBtnShine 2.6s linear infinite;
  pointer-events: none;
}
.start-btn:hover { transform: translateY(-1px); box-shadow: 0 0 0 7px #fff, var(--shadow-lg); }
@keyframes startBtnPulse {
  0%, 100% { box-shadow: 0 0 0 7px #fff, var(--shadow-brand); }
  50% { box-shadow: 0 0 0 7px #fff, 0 0 44px rgba(255, 106, 0, .7); }
}
@keyframes startBtnShine { to { transform: rotate(360deg); } }
.start-btn:disabled { opacity: .75; cursor: wait; transform: none; }
.start-btn.pending-review { background: linear-gradient(150deg, #FFB84D, var(--amber-500)); }
.start-btn.no-task { background: linear-gradient(150deg, var(--ink-500), var(--ink-700)); }
.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(15, 24, 40, .5); 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: var(--radius-lg);
  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: 50%;
  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: var(--radius-md);
  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: 700; 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: var(--radius-md); padding: 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 10px;
  transition: transform 180ms ease, box-shadow 180ms ease;
  animation: fadeInUp .4s ease both;
}
.list-row:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.list-row .thumb { width: 52px; height: 52px; object-fit: cover; border-radius: var(--radius-sm); 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(169, 134, 47, .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(169, 134, 47, .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: 600; 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(169, 134, 47, .35); border-radius: var(--radius-md); padding: 18px;
  cursor: pointer; color: var(--ink-500); font-size: 13px; font-weight: 600;
  transition: border-color 140ms ease, background 140ms ease;
  position: relative; overflow: hidden;
}
.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: var(--radius-md); 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(15, 24, 40, .48); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 2000;
}
.modal-box {
  background: #fff; border-radius: var(--radius-lg); width: 100%; max-width: 460px;
  max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow-lg); 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: 50%;
  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: var(--radius-lg);
  background: var(--coral-100);
  color: var(--coral-600);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 22px;
  font-size: 32px;
}
.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(15, 24, 40, .42); backdrop-filter: blur(6px);
}
.task-loading-card {
  width: min(360px, 100%); border-radius: var(--radius-lg); padding: 38px 28px; text-align: center;
  background: #fff; box-shadow: var(--shadow-lg);
}
.task-loader-ring {
  width: 66px; height: 66px; margin: 0 auto 18px;
  animation: eagleFlap .5s ease-in-out infinite;
  transform-origin: 50% 55%;
}
.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: var(--radius-md); 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: var(--radius-md);
  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: 10px; padding: 8px 8px 26px; color: #fff; }
.admin-sidebar .logo-badge {
  width: 40px; height: 40px; flex-shrink: 0; background: #fff; padding: 5px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.admin-sidebar .logo-badge img { width: 100%; height: 100%; object-fit: contain; }
.admin-logo-wordmark { font-family: var(--font-logo); font-weight: 700; font-size: 15px; letter-spacing: .01em; color: #fff; }
.admin-logo-wordmark em { font-style: normal; color: var(--coral-400); }
.admin-sidebar .brand-sub { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--coral-400); }

.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: var(--radius-sm); font-size: 13px; font-weight: 600; font-family: var(--font-display); letter-spacing: .01em; color: rgba(255,255,255,.62); white-space: nowrap;
  transition: background 140ms ease, color 140ms ease;
}
.admin-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.admin-nav a.active { background: var(--coral-500); color: #fff; }
.admin-nav a .count-badge { margin-left: auto; background: var(--coral-500); color: #fff; font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 999px; }

.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: 600; border-radius: var(--radius-sm); }
.back-link:hover { background: rgba(255,255,255,.07); 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-topbar { display: flex; justify-content: flex-end; margin-bottom: 18px; }
.admin-main-topbar img { display: block; }
.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: var(--radius-lg);
  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: .07em; font-size: 11px; }

.admin-table { background: #fff; border: 1px solid var(--ink-border); border-radius: var(--radius-lg); overflow: hidden; width: 100%; border-collapse: collapse; }
.assign-task-table { table-layout: fixed; }
.admin-table th {
  text-align: left; padding: 14px 18px; background: var(--bg-inset); font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: var(--ink-500);
}
.admin-table td { padding: 16px 18px; border-top: 1px solid var(--ink-border-soft); font-size: 13px; vertical-align: middle; overflow-wrap: break-word; }
.admin-table tbody tr:hover { background: var(--bg-inset); }
.premium-table { border-radius: var(--radius-lg); }
.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(255,106,0,.2);
  color: var(--coral-600); font-weight: 700; font-size: 12.5px; letter-spacing: .03em;
}

.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: var(--radius-md); 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: var(--radius-sm); 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: var(--glow-focus); }
.task-icon-cell { display: flex; align-items: center; gap: 8px; }
.task-icon-preview { width: 40px; height: 40px; border-radius: var(--radius-sm); 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; border-radius: var(--radius-sm);
}
.task-icon-upload { position: relative; 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: var(--radius-md); 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: var(--radius-sm); 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: var(--radius-md);
  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: .05em; 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: var(--radius-md);
  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: var(--radius-sm);
  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: var(--glow-focus); }

.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: 600; 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: 700; }

/* ============================================================
   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: var(--radius-lg);
  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: 700; letter-spacing: .14em; 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-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: 6px; }
  .bottom-nav a { padding: 8px 6px; min-height: 40px; }
  .start-btn { width: 150px; height: 150px; }
  .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) {
  .start-btn { width: 130px; height: 130px; font-size: 13px; }
  .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:var(--radius-lg);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}}


.live-notification-button {
  position: relative;
  width: 38px;
  height: 38px;
  border: 1px solid var(--ink-border-soft);
  border-radius: 50%;
  background: #fff;
  color: var(--ink-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.live-notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 0;
  background: var(--red-500);
  color: #fff;
  border: 2px solid #fff;
  font-size: 10px;
  line-height: 15px;
  font-weight: 800;
  text-align: center;
}
.live-notification-button.has-new-notification { color: var(--red-500); }
.live-notification-button.notification-pulse { animation: liveNotificationPulse .9s ease; }
.admin-live-notification { margin-left: auto; flex: 0 0 auto; }
.task-rejection-note {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(210,63,79,.24);
  border-radius: var(--radius-md);
  background: var(--red-tint);
  color: #8f2433;
  font-size: 13px;
}
.task-rejection-note strong { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }

/* Task schedule card titles and per-card save controls. */
.task-card-title{
  font-family:var(--font-display);
  font-size:19px;
  font-weight:800;
  letter-spacing:.005em;
  color: var(--coral-600);
}
.task-schedule-cards .task-edit-card:nth-child(6n+1) .task-card-title{color:var(--coral-600)}
.task-schedule-cards .task-edit-card:nth-child(6n+2) .task-card-title{color:var(--brand-purple)}
.task-schedule-cards .task-edit-card:nth-child(6n+3) .task-card-title{color:var(--coral-500)}
.task-schedule-cards .task-edit-card:nth-child(6n+4) .task-card-title{color:var(--coral-700)}
.task-schedule-cards .task-edit-card:nth-child(6n+5) .task-card-title{color:var(--coral-400)}
.task-schedule-cards .task-edit-card:nth-child(6n) .task-card-title{color:#7A5C1F}
.task-card-save-row{display:flex;justify-content:flex-end;margin-top:16px}

/* Mobile layout cleanup: keep content readable and prevent overlapping. */
.history-list-row{align-items:flex-start}
.history-list-content{flex:1;min-width:0}
.history-list-title{font-size:13px;font-weight:700;overflow-wrap:anywhere}
.history-list-meta{font-size:11px;color:var(--ink-500);margin-top:3px;overflow-wrap:anywhere}
.history-list-reason{margin-top:8px;color:#a82e3d;font-size:12px;line-height:1.45;overflow-wrap:anywhere}
.history-list-status{text-align:right;flex:0 0 auto;min-width:90px}
.history-list-reward{font-size:13px;font-weight:700;margin-bottom:5px}

@media(max-width:780px){
  html,body{max-width:100%;overflow-x:hidden}
  .auth-form-panel{padding:24px 16px}
  .auth-card-head{margin-bottom:22px}
  .auth-card-head h2{font-size:22px}
  .app-body,.admin-main,.admin-main-inner,.app-page{min-width:0;width:100%}
  .card{padding:18px}
  .list-row{min-width:0}
  .submission-row{flex-wrap:wrap}
  .submission-row>div{min-width:0}
  .history-filter-card>*{width:100%;min-width:0}
  .history-filter-card input,.history-filter-card select{width:100%;min-width:0}
  .history-pagination-bar,.history-pager{width:100%}
  .history-pager{justify-content:space-between}
  .task-card-save-row .btn{width:100%}
  table{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}

  .profile-card{padding-bottom:22px; border-radius:var(--radius-lg); overflow:hidden;}
  .profile-cover{
    height:120px;
    background:
      linear-gradient(160deg, rgba(11,46,78,.72), rgba(169,129,46,.55)),
      url('../img/logo-icon.png') no-repeat center 28% / 84px auto,
      linear-gradient(120deg, var(--coral-600), var(--coral-400));
  }
  .profile-card-body{padding:0 18px; margin-top:-38px;}
  .profile-card .avatar{width:68px !important; height:68px !important;}
  .profile-name{font-size:18px; margin-top:12px;}
  .profile-role{font-size:10px;}
  .dash-stat-grid-compact{gap:8px; margin-top:16px;}
  .dash-stat-grid-compact .dash-stat{padding:11px 12px;}
  .dash-stat-grid-compact .dash-stat-value{font-size:16px;}
  .dash-stat-grid-compact .dash-stat-label{font-size:9px;}
  .dash-stat-grid-compact .dash-stat-sub{font-size:10px;}
  .dash-stat-icon{width:24px;height:24px;}
  .progress-block{margin-top:18px;}
  .start-btn{margin-top:22px;}
}

@media(max-width:560px){
  .app-topbar{gap:10px;align-items:center}
  .app-topbar-section{min-width:0}
  .app-topbar-logo-mobile img{width:36px;height:36px}
  .app-topbar-wordmark-mobile{font-size:13px}
  .app-topbar-title{max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .app-topbar-user{gap:7px;flex:0 0 auto}
  .app-topbar-balance{padding:8px 10px;font-size:12px;white-space:nowrap}
  .app-topbar-avatar{display:none}
  .app-main{padding:24px 12px 112px}
  .dash-panel{padding:14px}
  .dash-panel-title{font-size:10px; margin-bottom:12px;}
  .dash-ring-wrap{gap:10px}
  .dash-ring-legend-row .day, .dash-ring-legend-row .count-chip{font-size:10px}
  .dash-bars{height:110px}
  .dash-platform-grid{gap:8px}
  .dash-platform-pill{padding:12px 14px}
  .dash-platform-pill .count{font-size:16px}
  .dash-platform-pill .label{font-size:10px}
  .history-list-row{display:grid;grid-template-columns:52px minmax(0,1fr);gap:12px;padding:14px}
  .history-list-thumb{grid-row:1;grid-column:1}
  .history-list-content{grid-row:1;grid-column:2}
  .history-list-status{grid-row:2;grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;text-align:left;min-width:0;padding-top:10px;border-top:1px solid var(--ink-border-soft)}
  .history-list-reward{margin:0}
  .badge{white-space:nowrap}
  .modal-body{padding:22px 18px}
  .bottom-nav{overflow-x:auto;grid-template-columns:repeat(5,minmax(64px,1fr))!important}
}
