/* ═══════════════════════════════════════════════════════════
   CAFE PIGEON — Staff Portal
   style.css · v8.0 · Premium Production Build
   ───────────────────────────────────────────────────────────
   Sections:
   1. Design Tokens (variables)
   2. Reset & Base
   3. Typography
   4. Auth Screen
   5. App Shell (sidebar, mobile header)
   6. Page Layout & Headers
   7. Dashboard (banner, stats, panels)
   8. Announcements
   9. Training
   10. Profile
   11. Team
   12. Admin
   13. Buttons
   14. Forms & Inputs
   15. Badges & Chips
   16. Modals
   17. Toasts & Loader
   18. Skeletons & Empty States
   19. Animations
   20. Responsive
   ═══════════════════════════════════════════════════════════ */

/* ════════ 1. DESIGN TOKENS ════════ */
:root {
  /* Brand palette */
  --espresso:   #1A0F08;
  --brown:      #3B2212;
  --brown-soft: #4D2E1A;
  --caramel:    #A0623A;
  --latte:      #C9956A;
  --gold:       #C4962A;
  --gold-soft:  #E8C97A;

  /* Surfaces */
  --cream:      #F5EFE6;
  --cream2:     #EDE4D8;
  --cream3:     #E2D5C3;
  --paper:      #FBF8F3;
  --white:      #FFFFFF;

  /* Text */
  --ink:        #2A1B0E;
  --muted:      #8A7058;
  --muted-soft: #A89580;

  /* Status */
  --danger:     #C0392B;
  --danger-bg:  #FBEAE8;
  --success:    #2E7D52;
  --success-bg: #E6F3EC;
  --info:       #1A5276;
  --info-bg:    #E7EFF5;

  /* Shadows — soft, layered, premium */
  --sh-xs:  0 1px 2px rgba(26,15,8,.06);
  --sh-sm:  0 2px 8px rgba(26,15,8,.07), 0 1px 2px rgba(26,15,8,.05);
  --sh-md:  0 6px 20px rgba(26,15,8,.09), 0 2px 6px rgba(26,15,8,.06);
  --sh-lg:  0 14px 40px rgba(26,15,8,.13), 0 4px 12px rgba(26,15,8,.08);
  --sh-xl:  0 24px 64px rgba(26,15,8,.20), 0 8px 20px rgba(26,15,8,.12);
  --sh-glow: 0 0 0 4px rgba(160,98,58,.10);

  /* Radii */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 999px;

  /* Motion */
  --ease:        cubic-bezier(.4, 0, .2, 1);
  --ease-out:    cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --t-fast:  .15s var(--ease);
  --t-med:   .28s var(--ease);
  --t-slow:  .45s var(--ease-out);

  /* Fonts */
  --f-serif: 'Playfair Display', Georgia, serif;
  --f-sans:  'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --sidebar-w: 264px;
  --maxw:      1280px;
}

/* ════════ 2. RESET & BASE ════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; width: 100%; }

body {
  font-family: var(--f-sans);
  background: var(--cream);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; border: none; background: none; }
button:disabled { cursor: not-allowed; opacity: .6; }

/* Pointer cursor on every clickable element. Buttons get it by default above,
   but anchors, cards, avatars, tabs, list rows, and items with onclick handlers
   need it explicitly. */
a,
[onclick],
[role="button"],
[role="checkbox"],
select,
label,
.sb-link,
.sb-profile,
.sb-logout-btn,
.stat-tile,
.ann-preview,
.quick-task,
.task-card,
.member-card,
.cat-pill,
.shift-tab,
.shift-check,
.admin-tab,
.auth-tab,
.role-card,
.verify-choice,
.modal-close-btn,
.icon-btn,
.media-thumb {
  cursor: pointer;
}

/* Inputs and textareas should keep the text cursor — only the select dropdown
   gets the pointer (it acts like a button). */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
textarea,
.field-input,
.field-textarea,
.search-input,
.comment-inp {
  cursor: text;
}

/* File-input wrappers and checkbox/radio buttons still get the pointer. */
input[type="checkbox"],
input[type="radio"],
input[type="file"] {
  cursor: pointer;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

::selection { background: var(--caramel); color: var(--white); }

/* Scrollbar */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--cream3);
  border-radius: var(--r-full);
  border: 2px solid var(--cream);
}
::-webkit-scrollbar-thumb:hover { background: var(--latte); }

:focus-visible {
  outline: 2px solid var(--caramel);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

/* ════════ 3. TYPOGRAPHY ════════ */
h1, h2, h3, h4, h5 { font-family: var(--f-serif); font-weight: 600; line-height: 1.2; color: var(--brown); }

.page-title  { font-size: clamp(24px, 3.4vw, 34px); font-weight: 700; letter-spacing: -.5px; }
.page-sub    { font-size: 14px; color: var(--muted); margin-top: 4px; font-family: var(--f-sans); }
.composer-title { font-size: 16px; color: var(--brown); }

/* ════════ 4. AUTH SCREEN ════════ */
.auth-screen {
  position: fixed; inset: 0; z-index: 1000;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(196,150,42,.10), transparent 70%),
    linear-gradient(160deg, #1F1108 0%, var(--espresso) 55%, #120A04 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 32px 20px; overflow-y: auto;
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.auth-screen.hiding { opacity: 0; transform: scale(1.03); pointer-events: none; }

.auth-bg-orbs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; }
.orb-1 { width: 420px; height: 420px; background: radial-gradient(circle, rgba(196,150,42,.45), transparent 70%); top: -120px; right: -80px; animation: orbFloat 14s var(--ease-out) infinite; }
.orb-2 { width: 360px; height: 360px; background: radial-gradient(circle, rgba(160,98,58,.40), transparent 70%); bottom: -100px; left: -60px; animation: orbFloat 18s var(--ease-out) infinite reverse; }
.orb-3 { width: 280px; height: 280px; background: radial-gradient(circle, rgba(201,149,106,.30), transparent 70%); top: 40%; left: 55%; animation: orbFloat 22s var(--ease-out) infinite; }

.auth-container {
  position: relative; z-index: 2;
  width: 100%; max-width: 430px;
  display: flex; flex-direction: column; align-items: center;
}

.auth-brand { text-align: center; margin-bottom: 30px; animation: fadeUp .7s var(--ease-out) both; }
.auth-logo-ring {
  width: 86px; height: 86px; margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.03));
  border: 1.5px solid rgba(232,201,122,.35);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 50px rgba(196,150,42,.30), inset 0 1px 1px rgba(255,255,255,.15);
  position: relative;
}
.auth-logo-ring::after {
  content: ''; position: absolute; inset: -6px;
  border-radius: 50%; border: 1px solid rgba(232,201,122,.20);
  animation: pulseRing 3s var(--ease-out) infinite;
}
.auth-bird { font-size: 42px; animation: floatY 3.5s var(--ease-out) infinite; }
.auth-title { font-size: 34px; color: var(--cream); letter-spacing: -.5px; }
.auth-subtitle { font-size: 11px; color: var(--gold-soft); letter-spacing: 4px; text-transform: uppercase; margin-top: 5px; font-family: var(--f-sans); font-weight: 500; }

.auth-card {
  width: 100%; padding: 32px 30px;
  border-radius: var(--r-xl);
  animation: fadeUp .7s .12s var(--ease-out) both;
}
.glass-card {
  background: linear-gradient(155deg, rgba(251,248,243,.97), rgba(245,239,230,.94));
  border: 1px solid rgba(255,255,255,.5);
  box-shadow: var(--sh-xl), inset 0 1px 1px rgba(255,255,255,.6);
  backdrop-filter: blur(20px);
}

.auth-tabs {
  position: relative;
  display: flex; gap: 4px;
  background: var(--cream2);
  border-radius: var(--r-md);
  padding: 5px; margin-bottom: 22px;
}
.auth-tab {
  flex: 1; padding: 11px; z-index: 2;
  border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600; color: var(--muted);
  transition: color var(--t-med);
}
.auth-tab.active { color: var(--brown); }
.auth-tab-slider {
  position: absolute; top: 5px; left: 5px;
  width: calc(50% - 5px); height: calc(100% - 10px);
  background: var(--white);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-sm);
  transition: transform var(--t-med) var(--ease-spring);
}
#tab-signup.active ~ .auth-tab-slider { transform: translateX(100%); }

.auth-alert {
  display: none;
  background: var(--danger-bg);
  border: 1px solid #F0C8C3;
  border-left: 3px solid var(--danger);
  border-radius: var(--r-sm);
  padding: 11px 14px;
  font-size: 13px; color: var(--danger); font-weight: 500;
  margin-bottom: 16px;
  animation: shake .4s var(--ease);
}
.auth-alert.show { display: block; }
.auth-alert.success {
  background: var(--success-bg); border-color: #BFE0CD;
  border-left-color: var(--success); color: var(--success);
}

.auth-form { display: none; }
.auth-form.active { display: block; animation: fadeIn .3s var(--ease); }

.auth-footer-note {
  margin-top: 24px; font-size: 12px;
  color: rgba(245,239,230,.45);
  letter-spacing: .5px;
  animation: fadeUp .7s .24s var(--ease-out) both;
}

/* role grid */
.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 9px; }
.role-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 12px;
  border: 2px solid var(--cream3);
  border-radius: var(--r-md);
  background: var(--paper);
  transition: all var(--t-med);
}
.role-card:hover { border-color: var(--caramel); transform: translateY(-2px); box-shadow: var(--sh-sm); }
.role-card.active {
  border-color: var(--brown);
  background: linear-gradient(135deg, var(--brown), var(--brown-soft));
  box-shadow: var(--sh-md);
}
.role-emoji { font-size: 26px; line-height: 1; }
.role-name { font-size: 13px; font-weight: 600; color: var(--muted); transition: color var(--t-med); }
.role-card.active .role-name { color: var(--cream); }

.mgr-code-panel { display: none; margin-top: 16px; animation: slideDown .35s var(--ease-out); overflow: hidden; }
.mgr-code-inner {
  background: linear-gradient(150deg, var(--espresso), var(--brown));
  border-radius: var(--r-md);
  padding: 20px 18px; text-align: center;
  border: 1px solid rgba(232,201,122,.20);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.06);
}
.mgr-code-emoji { font-size: 26px; }
.mgr-code-title { font-family: var(--f-serif); font-size: 16px; font-weight: 600; color: var(--cream); margin-top: 6px; }
.mgr-code-hint { font-size: 11.5px; color: var(--gold-soft); margin: 4px 0 13px; }

/* ════════ 5. APP SHELL ════════ */
#app { display: none; }

/* Mobile header */
.mobile-header {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  height: 60px;
  height: calc(60px + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  background: linear-gradient(180deg, var(--espresso), #160C05);
  align-items: center; justify-content: space-between;
  padding-left: 16px; padding-right: 16px;
  box-shadow: var(--sh-md);
}
.mobile-logo { color: var(--cream); font-family: var(--f-serif); font-size: 17px; font-weight: 600; }
.mobile-menu-btn {
  width: 42px; height: 42px; border-radius: var(--r-sm);
  background: rgba(255,255,255,.08);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  transition: background var(--t-fast);
}
.mobile-menu-btn:hover { background: rgba(255,255,255,.14); }
.mobile-menu-btn span { width: 18px; height: 2px; background: var(--cream); border-radius: 2px; transition: var(--t-fast); }

.sidebar-overlay {
  display: none; position: fixed; inset: 0; z-index: 290;
  background: rgba(26,15,8,.55); backdrop-filter: blur(3px);
  animation: fadeIn .25s var(--ease);
}
.sidebar-overlay.open { display: block; }

/* Sidebar */
.sidebar {
  position: fixed; top: 0; left: 0; z-index: 295;
  width: var(--sidebar-w); height: 100vh;
  background: linear-gradient(178deg, var(--espresso) 0%, #160C05 100%);
  display: flex; flex-direction: column;
  border-right: 1px solid rgba(232,201,122,.07);
  transition: transform var(--t-slow);
}

.sb-header { padding: 22px 20px 18px; border-bottom: 1px solid rgba(255,255,255,.06); }
.sb-brand { display: flex; align-items: center; gap: 13px; }
.sb-brand-icon {
  width: 42px; height: 42px; border-radius: var(--r-sm);
  background: linear-gradient(135deg, rgba(196,150,42,.22), rgba(160,98,58,.18));
  border: 1px solid rgba(232,201,122,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 21px;
}
.sb-brand-name { font-family: var(--f-serif); font-size: 17px; font-weight: 600; color: var(--cream); line-height: 1.1; }
.sb-brand-sub { font-size: 9.5px; color: var(--gold-soft); letter-spacing: 2.5px; text-transform: uppercase; margin-top: 3px; }

.sb-profile {
  display: flex; align-items: center; gap: 12px;
  margin: 14px 14px 6px; padding: 12px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.05);
  transition: all var(--t-med);
}
.sb-profile:hover { background: rgba(255,255,255,.07); transform: translateY(-1px); }
.sb-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--caramel), var(--latte));
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-weight: 700; font-size: 15px;
  flex-shrink: 0; overflow: hidden;
  box-shadow: 0 2px 10px rgba(160,98,58,.4);
}
.sb-profile-info { flex: 1; min-width: 0; }
.sb-profile-name { font-size: 13.5px; font-weight: 600; color: var(--cream); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-profile-role { font-size: 10px; color: var(--gold-soft); letter-spacing: 1.2px; text-transform: uppercase; margin-top: 1px; }
.sb-arrow { color: rgba(255,255,255,.3); flex-shrink: 0; transition: transform var(--t-fast); }
.sb-profile:hover .sb-arrow { transform: translateX(2px); color: rgba(255,255,255,.55); }

.sb-nav { flex: 1; padding: 12px 12px; overflow-y: auto; }
.sb-nav::-webkit-scrollbar { width: 0; }
.sb-nav-section {
  font-size: 9.5px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: rgba(255,255,255,.22);
  padding: 14px 10px 7px;
}
.sb-link {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; margin-bottom: 3px;
  border-radius: var(--r-sm);
  color: rgba(255,255,255,.62);
  font-size: 14px; font-weight: 500;
  position: relative;
  transition: all var(--t-med);
}
.sb-link::before {
  content: ''; position: absolute; left: 0; top: 50%;
  width: 3px; height: 0; transform: translateY(-50%);
  background: var(--gold-soft); border-radius: 0 3px 3px 0;
  transition: height var(--t-med);
}
.sb-link:hover { background: rgba(255,255,255,.06); color: var(--cream); }
.sb-link.active {
  background: linear-gradient(100deg, rgba(196,150,42,.20), rgba(196,150,42,.06));
  color: var(--cream); font-weight: 600;
}
.sb-link.active::before { height: 60%; }
.sb-link-icon { font-size: 17px; width: 22px; text-align: center; flex-shrink: 0; }
.sb-badge {
  margin-left: auto;
  background: var(--gold); color: var(--espresso);
  font-size: 10px; font-weight: 700;
  min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: var(--r-full);
  display: inline-flex; align-items: center; justify-content: center;
}

.sb-footer { padding: 12px; border-top: 1px solid rgba(255,255,255,.06); }
.sb-logout-btn {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px;
  border-radius: var(--r-sm);
  color: rgba(255,255,255,.45);
  font-size: 13.5px; font-weight: 500;
  transition: all var(--t-med);
}
.sb-logout-btn:hover { background: rgba(192,57,43,.14); color: #E88; }

/* Main content */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  padding: 30px 36px 60px;
  max-width: calc(var(--maxw) + var(--sidebar-w));
}

/* ════════ 6. PAGE LAYOUT ════════ */
.page { display: none; }
.page.active { display: block; animation: pageEnter .4s var(--ease-out); }

.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 18px; margin-bottom: 26px; flex-wrap: wrap;
}
.header-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  background: var(--paper);
  border: 1px solid var(--cream3);
  display: flex; align-items: center; justify-content: center;
  color: var(--brown);
  transition: all var(--t-med);
  position: relative;
  box-shadow: var(--sh-xs);
}
.icon-btn:hover { border-color: var(--caramel); transform: translateY(-2px); box-shadow: var(--sh-sm); }

/* ════════ 7. DASHBOARD ════════ */
.welcome-banner {
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 60% 100% at 85% 50%, rgba(196,150,42,.16), transparent 70%),
    linear-gradient(135deg, var(--brown) 0%, var(--espresso) 100%);
  border-radius: var(--r-lg);
  padding: 32px 36px;
  margin-bottom: 22px;
  box-shadow: var(--sh-lg);
}
.welcome-content { position: relative; z-index: 2; }
.welcome-date { font-size: 11px; color: var(--gold-soft); letter-spacing: 2.5px; text-transform: uppercase; font-weight: 600; margin-bottom: 8px; }
.welcome-greeting { font-size: clamp(22px, 3vw, 32px); color: var(--cream); font-weight: 700; letter-spacing: -.5px; }
.welcome-hint { font-size: 14px; color: rgba(245,239,230,.62); margin-top: 6px; }
.welcome-art {
  position: absolute; right: 36px; top: 50%; transform: translateY(-50%);
  font-size: 130px; opacity: .07; z-index: 1; user-select: none;
}
.welcome-particles { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.particle { position: absolute; opacity: .18; }
.particle.p1 { font-size: 22px; top: 22%; right: 24%; animation: floatY 5s var(--ease-out) infinite; }
.particle.p2 { font-size: 18px; bottom: 26%; right: 36%; animation: floatY 6.5s var(--ease-out) infinite 1s; }
.particle.p3 { font-size: 26px; top: 56%; right: 14%; animation: floatY 7.5s var(--ease-out) infinite .5s; }

/* Stats */
.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-bottom: 22px;
}
.stat-tile {
  display: flex; align-items: center; gap: 14px;
  background: var(--paper);
  border: 1px solid var(--cream3);
  border-radius: var(--r-md);
  padding: 18px;
  box-shadow: var(--sh-sm);
  transition: all var(--t-med) var(--ease-out);
}
.stat-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-lg);
  border-color: var(--latte);
}
.stat-tile-icon {
  width: 50px; height: 50px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
  box-shadow: var(--sh-sm);
}
.stat-tile-body { flex: 1; min-width: 0; }
.stat-tile-num { font-family: var(--f-serif); font-size: 30px; font-weight: 700; color: var(--brown); line-height: 1; }
.stat-tile-lbl { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin-top: 4px; font-weight: 500; }
.stat-tile-arrow { font-size: 22px; color: var(--cream3); transition: all var(--t-med); }
.stat-tile:hover .stat-tile-arrow { color: var(--caramel); transform: translateX(3px); }

/* Dashboard grid */
.dash-grid { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.dash-col-wide, .dash-col-side { min-width: 0; }

.panel-card {
  background: var(--paper);
  border: 1px solid var(--cream3);
  border-radius: var(--r-md);
  padding: 22px;
  box-shadow: var(--sh-sm);
}
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.panel-header h3 { font-size: 16px; color: var(--brown); }
.panel-body { min-height: 60px; }

.btn-text {
  font-size: 13px; color: var(--caramel); font-weight: 600;
  transition: all var(--t-fast);
}
.btn-text:hover { color: var(--brown); transform: translateX(2px); }

/* Announcement preview (dashboard) */
.ann-preview {
  display: flex; gap: 12px;
  padding: 12px 14px; margin-bottom: 9px;
  background: var(--cream);
  border-left: 3px solid var(--cream3);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  transition: all var(--t-med);
}
.ann-preview:last-child { margin-bottom: 0; }
.ann-preview:hover { background: var(--cream2); border-left-color: var(--caramel); transform: translateX(3px); }
.ann-preview.urgent  { border-left-color: var(--danger); }
.ann-preview.pinned  { border-left-color: var(--gold); }
.ann-preview.info    { border-left-color: var(--info); }
.ann-preview > div { min-width: 0; }
.ann-preview-title { font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.ann-preview-body { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* Quick task */
.quick-task {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--cream2);
  transition: all var(--t-fast);
}
.quick-task:last-child { border-bottom: none; }
.quick-task:hover { transform: translateX(3px); }
.quick-task-emoji {
  width: 38px; height: 38px;
  background: var(--cream);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.quick-task-name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.quick-task-cat { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-top: 1px; }

/* ════════ 8. ANNOUNCEMENTS ════════ */
.ann-card {
  background: var(--paper);
  border: 1px solid var(--cream3);
  border-radius: var(--r-md);
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: var(--sh-sm);
  transition: all var(--t-med) var(--ease-out);
  animation: fadeUp .4s var(--ease-out) both;
}
.ann-card:hover { box-shadow: var(--sh-md); transform: translateY(-2px); }
.ann-card.pinned { border-top: 3px solid var(--gold); }
.ann-card.urgent { border-top: 3px solid var(--danger); }
.ann-card.info   { border-top: 3px solid var(--info); }
.ann-body { padding: 22px 24px; }
.ann-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ann-headline { font-family: var(--f-serif); font-size: 21px; font-weight: 600; color: var(--brown); margin-bottom: 8px; }
.ann-text { font-size: 14.5px; color: var(--ink); line-height: 1.7; white-space: pre-wrap; }
.ann-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 12px 24px;
  background: var(--cream);
  border-top: 1px solid var(--cream2);
}
.ann-footer-left { font-size: 12px; color: var(--muted); }
.ann-footer-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.ack-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--cream3);
  background: var(--white);
  color: var(--muted);
  font-size: 12px; font-weight: 600;
  transition: all var(--t-med);
}
.ack-btn:hover:not(.done) { border-color: var(--caramel); color: var(--caramel); }
.ack-btn.done { background: var(--success-bg); border-color: #BFE0CD; color: var(--success); }

/* Comments */
.comments-section { padding: 16px 24px; border-top: 1px solid var(--cream2); background: rgba(245,239,230,.4); }
.comment { display: flex; gap: 9px; margin-bottom: 11px; }
.comment-av {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--caramel), var(--latte));
  color: var(--white); font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.comment-bubble {
  flex: 1;
  background: var(--white);
  border: 1px solid var(--cream2);
  border-radius: 4px var(--r-sm) var(--r-sm) var(--r-sm);
  padding: 9px 13px;
}
.comment-name { font-size: 12px; font-weight: 600; color: var(--brown); margin-bottom: 2px; }
.comment-text { font-size: 13px; color: var(--ink); line-height: 1.5; }
.comment-form { display: flex; gap: 8px; margin-top: 10px; }
.comment-inp {
  flex: 1; padding: 9px 13px;
  border: 1.5px solid var(--cream3);
  border-radius: var(--r-sm);
  background: var(--white);
  font-size: 16px; color: var(--ink);
  transition: all var(--t-fast);
}
.comment-inp:focus { outline: none; border-color: var(--caramel); box-shadow: var(--sh-glow); }

/* ════════ 9. TRAINING ════════ */
.training-filters { display: flex; gap: 14px; align-items: center; margin-bottom: 22px; flex-wrap: wrap; }

.search-box {
  position: relative;
  display: flex; align-items: center;
  background: var(--paper);
  border: 1.5px solid var(--cream3);
  border-radius: var(--r-md);
  padding: 0 14px;
  min-width: 240px;
  transition: all var(--t-med);
}
.search-box:focus-within { border-color: var(--caramel); box-shadow: var(--sh-glow); }
.search-icon { color: var(--muted); flex-shrink: 0; }
.search-input {
  flex: 1; padding: 11px 10px;
  background: none; border: none; outline: none;
  font-size: 16px; color: var(--ink);
}
.search-input::placeholder { color: var(--muted-soft); }

.cat-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.cat-pill {
  padding: 8px 16px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--cream3);
  background: var(--paper);
  color: var(--muted);
  font-size: 13px; font-weight: 600;
  transition: all var(--t-med);
}
.cat-pill:hover:not(.active) { border-color: var(--caramel); color: var(--caramel); transform: translateY(-1px); }
.cat-pill.active {
  background: linear-gradient(135deg, var(--brown), var(--brown-soft));
  border-color: var(--brown); color: var(--cream);
  box-shadow: var(--sh-sm);
}

.tasks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.task-card {
  background: var(--paper);
  border: 1px solid var(--cream3);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--sh-sm);
  transition: all var(--t-med) var(--ease-out);
}
.task-card:hover { transform: translateY(-6px); box-shadow: var(--sh-lg); border-color: var(--latte); }
.task-thumb {
  position: relative;
  height: 140px;
  background:
    radial-gradient(circle at 50% 40%, var(--cream2), var(--cream3));
  display: flex; align-items: center; justify-content: center;
  font-size: 56px;
}
.task-overlay {
  position: absolute; inset: 0;
  background: rgba(26,15,8,.42);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity var(--t-med);
}
.task-card:hover .task-overlay { opacity: 1; }
.task-play {
  width: 50px; height: 50px;
  background: rgba(255,255,255,.94);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--brown);
  box-shadow: var(--sh-md);
  transform: scale(.8); transition: transform var(--t-med) var(--ease-spring);
}
.task-card:hover .task-play { transform: scale(1); }
.task-body { padding: 16px; }
.task-cat { font-size: 10px; font-weight: 700; color: var(--gold); letter-spacing: 1.4px; text-transform: uppercase; margin-bottom: 5px; }
.task-title { font-family: var(--f-serif); font-size: 17px; font-weight: 600; color: var(--brown); margin-bottom: 5px; }
.task-desc { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-bottom: 11px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.task-meta { display: flex; gap: 12px; font-size: 11px; color: var(--muted); }

/* Task detail modal media */
.task-detail-media {
  height: 260px;
  background: linear-gradient(135deg, var(--brown), var(--espresso));
  display: flex; align-items: center; justify-content: center;
  font-size: 78px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  overflow: hidden;
}
.task-detail-media iframe { width: 100%; height: 100%; border: none; }
.task-detail-cat { font-size: 10px; font-weight: 700; color: var(--gold); letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 5px; }
.task-detail-desc { font-size: 14px; color: var(--muted); margin-top: 4px; }

.steps-heading { font-size: 15px; color: var(--brown); margin-bottom: 16px; }
.steps-list { display: flex; flex-direction: column; gap: 13px; }
.steps-list li { display: flex; gap: 13px; align-items: flex-start; }
.step-num {
  width: 28px; height: 28px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--brown), var(--brown-soft));
  color: var(--cream);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  box-shadow: var(--sh-xs);
}
.step-txt { font-size: 14px; color: var(--ink); line-height: 1.6; padding-top: 3px; }

/* ════════ 11.5 SHIFT TASKS ════════ */
.shift-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}
.shift-tab {
  display: flex; align-items: center; gap: 14px;
  background: var(--paper);
  border: 1.5px solid var(--cream3);
  border-radius: var(--r-md);
  padding: 16px 18px;
  text-align: left;
  transition: all var(--t-med) var(--ease-out);
  box-shadow: var(--sh-xs);
}
.shift-tab:hover { transform: translateY(-2px); box-shadow: var(--sh-sm); border-color: var(--latte); }
.shift-tab.active {
  background: linear-gradient(135deg, var(--brown), var(--brown-soft));
  border-color: var(--brown);
  box-shadow: var(--sh-md);
}
.shift-tab.active .shift-tab-name { color: var(--cream); }
.shift-tab.active .shift-tab-progress { color: var(--gold-soft); }
.shift-tab-icon {
  font-size: 28px;
  width: 48px; height: 48px;
  background: var(--cream);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.shift-tab.active .shift-tab-icon { background: rgba(255,255,255,.12); }
.shift-tab-name {
  font-family: var(--f-serif);
  font-size: 16px; font-weight: 600;
  color: var(--brown);
  margin-bottom: 2px;
  transition: color var(--t-med);
}
.shift-tab-progress {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  transition: color var(--t-med);
}
.shift-tab-carried {
  display: inline-flex;
  margin-top: 4px;
  font-size: 10.5px; font-weight: 700;
  color: var(--danger);
  background: var(--danger-bg);
  border-radius: var(--r-full);
  padding: 2px 8px;
}

.shift-carried-section {
  border: 1.5px solid var(--gold-soft);
  border-radius: var(--r-md);
  background: rgba(196,150,42,.05);
  padding: 14px 16px 4px;
  margin-bottom: 20px;
}
.shift-carried-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.shift-carried-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.shift-carried-header h3 {
  font-family: var(--f-serif);
  font-size: 16px; color: var(--brown); margin: 0 0 2px;
}
.shift-carried-header p {
  font-size: 12.5px; color: var(--muted); margin: 0;
}
.shift-carried-list .shift-item:last-child { margin-bottom: 12px; }
.shift-today-header {
  margin: 4px 0 12px;
}
.shift-today-header h3 {
  font-family: var(--f-serif);
  font-size: 16px; color: var(--brown); margin: 0;
}
.shift-group-header {
  display: flex; align-items: center; gap: 8px;
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1.5px solid var(--cream3);
}
.shift-carried-section + .shift-group-header, .shift-today-header + .shift-group-header, .shift-list > .shift-group-header:first-child { margin-top: 4px; }
.shift-group-header h4 {
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted);
  margin: 0;
}
.shift-group-count {
  font-size: 11.5px; font-weight: 700;
  color: var(--muted);
  background: var(--cream2);
  border-radius: var(--r-full);
  padding: 1px 8px;
}
.shift-group-attention h4 { color: var(--danger); }
.shift-group-awaiting h4  { color: var(--gold); }
.shift-group-verified h4  { color: #2E7D52; }

.shift-explain {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: linear-gradient(135deg, rgba(196,150,42,.07), rgba(160,98,58,.04));
  border: 1px solid rgba(196,150,42,.16);
  border-radius: var(--r-md);
  padding: 15px 18px;
  margin-bottom: 16px;
  box-shadow: var(--sh-xs);
  animation: fadeUp .35s var(--ease-out);
}
.shift-explain-body {
  flex: 1;
  min-width: 0;
}
.shift-explain-edit-btn {
  flex-shrink: 0;
  align-self: center;
}
.shift-explain-icon {
  font-size: 24px;
  width: 42px; height: 42px;
  flex-shrink: 0;
  background: rgba(196,150,42,.14);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
}
.shift-explain-title {
  font-family: var(--f-serif);
  font-size: 15.5px;
  font-weight: 600;
  color: var(--brown);
  margin-bottom: 3px;
}
.shift-explain-text {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  white-space: pre-wrap;
}

@media (max-width: 640px) {
  .shift-explain { flex-wrap: wrap; }
  .shift-explain-edit-btn { width: 100%; margin-top: 8px; }
}

.shift-progress-bar {
  height: 8px;
  background: var(--cream2);
  border-radius: var(--r-full);
  overflow: hidden;
  margin-bottom: 8px;
}
.shift-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  border-radius: var(--r-full);
  transition: width .5s var(--ease-out);
}
.shift-progress-label {
  font-size: 13px; color: var(--muted);
  margin-bottom: 18px;
  font-weight: 500;
}

.shift-list { display: flex; flex-direction: column; gap: 10px; }

.shift-mgr-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: linear-gradient(100deg, rgba(196,150,42,.10), rgba(196,150,42,.04));
  border: 1px solid rgba(196,150,42,.30);
  border-radius: var(--r-md);
  padding: 12px 16px;
  margin-bottom: 14px;
  box-shadow: var(--sh-xs);
}
.shift-mgr-banner-text {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.shift-mgr-banner-icon {
  font-size: 22px;
  width: 38px; height: 38px;
  background: rgba(196,150,42,.18);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.shift-mgr-banner strong {
  display: block;
  font-size: 13.5px; font-weight: 700;
  color: var(--brown);
  margin-bottom: 1px;
}
.shift-mgr-banner-hint {
  font-size: 12px;
  color: var(--muted);
}

/* Submit Checklist Banner — success/gold style */
.shift-submit-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: linear-gradient(100deg, rgba(46,125,82,.12), rgba(46,125,82,.04));
  border: 1.5px solid rgba(46,125,82,.30);
  border-radius: var(--r-md);
  padding: 14px 18px;
  margin-bottom: 14px;
  box-shadow: var(--sh-sm);
  animation: fadeUp .4s var(--ease-out);
}
.shift-submit-text {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.shift-submit-icon {
  font-size: 24px;
  width: 42px; height: 42px;
  background: rgba(46,125,82,.18);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.shift-submit-box strong {
  display: block;
  font-size: 14px; font-weight: 700;
  color: var(--success);
  margin-bottom: 2px;
}
.shift-submit-hint {
  font-size: 12.5px;
  color: var(--muted);
}
.shift-item {
  background: var(--paper);
  border: 1.5px solid var(--cream3);
  border-radius: var(--r-md);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--sh-xs);
  transition: all var(--t-med) var(--ease-out);
  animation: fadeUp .35s var(--ease-out) both;
}
.shift-item:hover { box-shadow: var(--sh-sm); }
.shift-item.completed { background: linear-gradient(100deg, rgba(196,150,42,.08), var(--paper) 50%); border-color: var(--gold-soft); }
.shift-item.verified  { background: linear-gradient(100deg, rgba(46,125,82,.08), var(--paper) 50%); border-color: #BFE0CD; }
.shift-item.attention { background: linear-gradient(100deg, rgba(192,57,43,.08), var(--paper) 50%); border-color: #F0C8C3; }
.shift-item.carried-over { border-left: 4px solid var(--gold); }
.carried-over-badge { color: var(--gold); font-weight: 700; }

.shift-check {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--white);
  border: 2.5px solid var(--cream3);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--t-med) var(--ease-spring);
}
.shift-check:hover:not(:disabled) { border-color: var(--caramel); transform: scale(1.05); }
.shift-check.checked {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white);
}
.shift-check.verified-style {
  background: var(--success);
  border-color: var(--success);
  color: var(--white);
}
.shift-check.attention-style {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--white);
}
.shift-check:disabled { cursor: not-allowed; opacity: .85; }

.shift-item-body { flex: 1; min-width: 0; }
.shift-item-title {
  font-size: 15px; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.shift-item-emoji { font-size: 19px; }
.shift-item-meta {
  font-size: 12.5px; color: var(--muted);
  margin-top: 4px;
}
.shift-item-comment {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(192,57,43,.08);
  border-left: 3px solid var(--danger);
  border-radius: 0 var(--r-xs) var(--r-xs) 0;
  font-size: 13px; color: var(--ink);
  font-style: italic;
}
.shift-item-actions { flex-shrink: 0; }

.shift-status-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  border-radius: var(--r-full);
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .4px; text-transform: uppercase;
}
.pill-awaiting  { background: rgba(196,150,42,.16); color: #9A7415; }
.pill-verified  { background: var(--success-bg); color: var(--success); }
.pill-attention { background: var(--danger-bg); color: var(--danger); }
.pill-pending   { background: var(--cream2); color: var(--muted); }

/* Verify modal cards */
.verify-task-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--cream);
  border: 1px solid var(--cream2);
  border-radius: var(--r-md);
  padding: 14px;
  margin-bottom: 18px;
}
.verify-task-emoji { font-size: 28px; flex-shrink: 0; }
.verify-task-title { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.verify-task-sub { font-size: 12px; color: var(--muted); }

.verify-choice-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-top: 9px;
}
.verify-choice {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 12px;
  border: 2px solid var(--cream3);
  border-radius: var(--r-md);
  background: var(--paper);
  transition: all var(--t-med);
}
.verify-choice:hover { transform: translateY(-2px); box-shadow: var(--sh-sm); }
.verify-choice.verify-good.active {
  border-color: var(--success);
  background: var(--success-bg);
}
.verify-choice.verify-bad.active {
  border-color: var(--danger);
  background: var(--danger-bg);
}
.verify-choice-emoji {
  font-size: 26px; line-height: 1;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.verify-good.active .verify-choice-emoji { background: var(--success); color: var(--white); }
.verify-bad.active .verify-choice-emoji { background: var(--danger); color: var(--white); }
.verify-choice-name { font-size: 13px; font-weight: 600; color: var(--muted); }
.verify-choice.active .verify-choice-name { color: var(--ink); }

/* Dashboard shift summary */
.daily-summary { margin-top: 18px; }
.shift-summary-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.shift-summary-card {
  background: var(--cream);
  border: 1px solid var(--cream2);
  border-radius: var(--r-md);
  padding: 16px;
}
.shift-summary-head {
  display: flex; align-items: center; gap: 9px;
  margin-bottom: 12px;
}
.shift-summary-emoji { font-size: 22px; }
.shift-summary-title { font-family: var(--f-serif); font-size: 16px; font-weight: 600; color: var(--brown); }
.shift-summary-progress {
  height: 6px;
  background: var(--cream3);
  border-radius: var(--r-full);
  overflow: hidden;
  margin: 10px 0;
}
.shift-summary-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  border-radius: var(--r-full);
  transition: width .6s var(--ease-out);
}
.shift-summary-stats {
  display: flex; gap: 14px;
  font-size: 12px; color: var(--muted);
  flex-wrap: wrap;
}
.shift-summary-stat strong {
  display: block;
  font-family: var(--f-serif);
  font-size: 22px; font-weight: 700;
  color: var(--brown);
  font-variant-numeric: tabular-nums;
}

/* ════════ 12. PROFILE ════════ */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 28px;
  position: relative;
  overflow: hidden;
}
.profile-meta {
  flex: 1;
  min-width: 0;
}
.profile-greeting {
  font-size: 12px;
  font-weight: 700;
  color: var(--caramel);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
  animation: fadeUp .5s var(--ease-out);
}
.profile-bio { font-size: 14px; color: var(--ink); font-style: italic; margin-top: 8px; }

/* Warm quote panel on the right side of profile hero */
.profile-quote {
  position: relative;
  flex: 1.2;
  max-width: 420px;
  padding: 22px 24px 20px;
  background: linear-gradient(135deg, rgba(196,150,42,.08), rgba(160,98,58,.06));
  border: 1px solid rgba(196,150,42,.18);
  border-radius: var(--r-md);
  box-shadow: var(--sh-xs);
}
.profile-quote-mark {
  position: absolute;
  top: -10px; left: 18px;
  font-family: var(--f-serif);
  font-size: 70px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  opacity: .35;
  pointer-events: none;
}
.profile-quote-text {
  font-family: var(--f-serif);
  font-size: 15px;
  font-style: italic;
  color: var(--brown);
  line-height: 1.55;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}
.profile-quote-sub {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
}
.profile-av-wrap { flex-shrink: 0; }
.profile-avatar {
  width: 92px; height: 92px; border-radius: 50%;
  background: linear-gradient(135deg, var(--caramel), var(--latte));
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 34px; font-weight: 700;
  overflow: hidden;
  box-shadow: var(--sh-md), 0 0 0 4px var(--cream), 0 0 0 5px var(--cream3);
}
.profile-meta { min-width: 0; }
.profile-name { font-size: 25px; color: var(--brown); font-weight: 700; }
.profile-role { font-size: 14px; color: var(--caramel); font-weight: 600; margin-top: 3px; }
.profile-email { font-size: 13px; color: var(--muted); margin-top: 2px; }
.profile-bio { font-size: 14px; color: var(--ink); font-style: italic; margin-top: 8px; }

/* ════════ 11. TEAM ════════ */
.team-toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.team-stats-row { display: flex; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.team-stat {
  flex: 1; min-width: 130px;
  background: var(--paper);
  border: 1px solid var(--cream3);
  border-radius: var(--r-md);
  padding: 16px 20px;
  font-size: 12px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .6px; font-weight: 600;
  box-shadow: var(--sh-xs);
  transition: all var(--t-med);
}
.team-stat:hover { transform: translateY(-2px); box-shadow: var(--sh-sm); }
.team-stat strong {
  display: block;
  font-family: var(--f-serif); font-size: 28px; font-weight: 700;
  color: var(--brown); letter-spacing: 0; margin-bottom: 2px;
}
.member-card {
  background: var(--paper);
  border: 1px solid var(--cream3);
  border-radius: var(--r-md);
  margin-bottom: 11px;
  box-shadow: var(--sh-xs);
  transition: all var(--t-med) var(--ease-out);
}
.member-card:hover { box-shadow: var(--sh-md); transform: translateY(-2px); border-color: var(--latte); }
.member-card-inner { display: flex; align-items: center; gap: 15px; padding: 16px 18px; }
.member-avatar {
  width: 50px; height: 50px; border-radius: 50%;
  background: linear-gradient(135deg, var(--caramel), var(--latte));
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-weight: 700; font-size: 16px;
  flex-shrink: 0; overflow: hidden;
  box-shadow: 0 2px 8px rgba(160,98,58,.3);
}
.member-info { flex: 1; min-width: 0; }
.member-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 3px; }
.member-sub { font-size: 13px; color: var(--muted); }
.member-bio { font-size: 12.5px; color: var(--muted-soft); font-style: italic; margin-top: 3px; }
.member-actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.you-tag {
  font-size: 11px; font-weight: 600;
  background: var(--cream2); color: var(--muted);
  padding: 3px 9px; border-radius: var(--r-full);
}

.member-preview-card {
  display: flex; align-items: center; gap: 13px;
  background: var(--cream);
  border: 1px solid var(--cream2);
  border-radius: var(--r-md);
  padding: 14px;
  margin-bottom: 18px;
}
.member-preview-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.member-preview-email { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ════════ 12. ADMIN ════════ */
.admin-tab-bar {
  display: flex; gap: 4px;
  border-bottom: 2px solid var(--cream2);
  margin-bottom: 20px;
  overflow-x: auto;
}
.admin-tab {
  padding: 11px 16px;
  font-size: 13px; font-weight: 600; color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all var(--t-med);
}
.admin-tab:hover { color: var(--brown); }
.admin-tab.active { color: var(--brown); border-bottom-color: var(--caramel); }
.admin-content-area { min-height: 200px; }
.admin-hdr {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; flex-wrap: wrap; gap: 10px;
}
.admin-hdr h4 { font-size: 15px; color: var(--brown); }
.admin-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-radius: var(--r-sm);
  margin-bottom: 6px;
  background: var(--cream);
  border: 1px solid transparent;
  transition: all var(--t-fast);
}
.admin-row:hover { background: var(--cream2); border-color: var(--cream3); }
.admin-row-info { flex: 1; min-width: 0; }
.admin-row-title { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.admin-row-sub { font-size: 12px; color: var(--muted); }
.admin-row-acts { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }

.upload-drop {
  border: 2px dashed var(--cream3);
  border-radius: var(--r-md);
  padding: 36px 20px;
  text-align: center;
  background: var(--cream);
  transition: all var(--t-med);
}
.upload-drop:hover { border-color: var(--caramel); background: var(--cream2); }
.upload-drop-icon { font-size: 36px; margin-bottom: 10px; }
.upload-drop p { font-size: 13.5px; color: var(--muted); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 16px; }
.media-thumb {
  position: relative;
  aspect-ratio: 1;
  background: var(--cream2);
  border: 1px solid var(--cream3);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  overflow: hidden;
  transition: transform var(--t-med);
}
.media-thumb:hover { transform: scale(1.03); }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-del {
  position: absolute; top: 6px; right: 6px;
  width: 24px; height: 24px;
  background: var(--danger); color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  opacity: 0; transition: opacity var(--t-fast);
}
.media-thumb:hover .media-del { opacity: 1; }

/* ════════ 12.5 WASTE LOG ════════ */
.waste-banner {
  display: flex; align-items: center; gap: 12px;
  background: var(--danger-bg);
  border: 1px solid var(--danger);
  color: var(--danger);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 18px;
  font-size: 13.5px; font-weight: 600;
}
.waste-banner-icon { font-size: 20px; flex-shrink: 0; }
.waste-banner-text { flex: 1; line-height: 1.4; }

.waste-toolbar {
  display: flex; align-items: center; justify-content: flex-end;
  margin-bottom: 14px;
}
.waste-total { font-size: 13px; font-weight: 700; color: var(--brown); }

.waste-table {
  background: var(--paper);
  border: 1px solid var(--cream3);
  border-radius: var(--r-md);
  overflow: hidden;
}
.waste-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1.1fr 1fr 1.3fr 90px;
  gap: 10px; align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--cream2);
}
.waste-row:last-child { border-bottom: none; }
.waste-head {
  background: var(--cream);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted);
  padding: 10px 16px;
}
.waste-cell { font-size: 13.5px; color: var(--ink); overflow-wrap: break-word; }
.waste-cell-by { color: var(--muted); font-size: 12.5px; }
.waste-cell-acts { display: flex; gap: 6px; justify-content: flex-end; }

/* ════════ 12.6 WARNING PEOPLE ════════ */
.warning-table {
  background: var(--paper);
  border: 1px solid var(--cream3);
  border-radius: var(--r-md);
  overflow: hidden;
}
.warning-row {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr 1fr 1fr 0.9fr 0.9fr 1.6fr;
  gap: 10px; align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--cream2);
}
.warning-row:last-child { border-bottom: none; }
.warning-row-active { background: var(--danger-bg); }
.warning-head {
  background: var(--cream);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted);
  padding: 10px 16px;
}
.warning-cell { font-size: 13.5px; color: var(--ink); overflow-wrap: break-word; min-width: 0; }
.warning-cell-name { font-weight: 600; color: var(--brown); }
.warning-cell-notes { display: flex; align-items: center; gap: 8px; justify-content: space-between; min-width: 0; }
.warning-cell-notes span { overflow-wrap: break-word; min-width: 0; }

/* ════════ 13. BUTTONS ════════ */
.btn-primary, .btn-secondary, .btn-danger, .btn-auth {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-family: var(--f-sans); font-weight: 600;
  border-radius: var(--r-sm);
  transition: all var(--t-med) var(--ease-out);
  white-space: nowrap;
}

.btn-primary {
  padding: 11px 22px; font-size: 14px;
  background: linear-gradient(135deg, var(--brown), var(--brown-soft));
  color: var(--cream);
  box-shadow: var(--sh-sm);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  padding: 10px 18px; font-size: 13.5px;
  background: var(--paper);
  color: var(--brown);
  border: 1.5px solid var(--cream3);
  box-shadow: var(--sh-xs);
}
.btn-secondary:hover { border-color: var(--caramel); transform: translateY(-2px); box-shadow: var(--sh-sm); }

.btn-danger {
  padding: 11px 22px; font-size: 14px;
  background: linear-gradient(135deg, var(--danger), #A52F22);
  color: var(--white);
  box-shadow: var(--sh-sm);
}
.btn-danger:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }

.btn-auth {
  width: 100%;
  padding: 14px 22px; font-size: 15px;
  background: linear-gradient(135deg, var(--gold), #B0851F);
  color: var(--espresso);
  box-shadow: 0 6px 20px rgba(196,150,42,.35);
  position: relative; overflow: hidden;
}
.btn-auth::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.4), transparent);
  transform: translateX(-100%);
  transition: transform .6s var(--ease);
}
.btn-auth:hover::before { transform: translateX(100%); }
.btn-auth:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(196,150,42,.45); }
.btn-auth:active { transform: translateY(0); }

.btn-sm { padding: 8px 14px !important; font-size: 12.5px !important; }

/* Small action buttons */
.btn-outline-sm, .btn-danger-sm, .btn-gold-sm {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px;
  font-size: 12px; font-weight: 600;
  border-radius: var(--r-xs);
  transition: all var(--t-med);
}
.btn-outline-sm {
  background: var(--white);
  border: 1.5px solid var(--cream3);
  color: var(--brown);
}
.btn-outline-sm:hover { border-color: var(--caramel); color: var(--caramel); transform: translateY(-1px); }
.btn-danger-sm {
  background: var(--danger-bg);
  border: 1.5px solid #F0C8C3;
  color: var(--danger);
}
.btn-danger-sm:hover { background: #F5D6D2; transform: translateY(-1px); }
.btn-gold-sm {
  background: linear-gradient(135deg, var(--gold), #B0851F);
  color: var(--white);
}
.btn-gold-sm:hover { transform: translateY(-1px); box-shadow: var(--sh-sm); }

/* ════════ 14. FORMS & INPUTS ════════ */
.field-group { margin-bottom: 16px; }
.field-label {
  display: block;
  font-size: 11px; font-weight: 700;
  color: var(--muted); letter-spacing: .8px; text-transform: uppercase;
  margin-bottom: 6px;
}
.field-wrap {
  position: relative;
  display: flex; align-items: center;
  background: var(--paper);
  border: 1.5px solid var(--cream3);
  border-radius: var(--r-sm);
  transition: all var(--t-med);
}
.field-wrap:focus-within { border-color: var(--caramel); box-shadow: var(--sh-glow); }
.field-icon { padding-left: 13px; font-size: 14px; opacity: .6; }
.field-wrap .field-input { border: none; box-shadow: none; background: none; }
.field-wrap .field-input:focus { box-shadow: none; }

.field-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--paper);
  border: 1.5px solid var(--cream3);
  border-radius: var(--r-sm);
  font-size: 16px; color: var(--ink);
  transition: all var(--t-med);
}
.field-input::placeholder { color: var(--muted-soft); }
.field-input:focus { outline: none; border-color: var(--caramel); box-shadow: var(--sh-glow); }
.field-textarea { resize: vertical; min-height: 80px; line-height: 1.6; }

.field-input-dark {
  background: rgba(255,255,255,.07);
  border-color: rgba(232,201,122,.25);
  color: var(--cream);
  text-align: center; letter-spacing: 2px;
}
.field-input-dark::placeholder { color: rgba(232,201,122,.4); letter-spacing: .5px; }
.field-input-dark:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(196,150,42,.15); }

.filter-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24' stroke='%238A7058' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 38px;
  cursor: pointer;
  font-size: 16px;
}

/* Safety net: iOS Safari auto-zooms the page when a tapped form field renders
   text below 16px. Force every form control to be at least 16px so tapping
   any input/select/textarea never triggers an unwanted zoom-in. */
input, select, textarea {
  font-size: max(16px, 1em);
}

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ════════ 15. BADGES ════════ */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase;
}
.badge-general { background: var(--cream2); color: var(--muted); }
.badge-pinned  { background: rgba(196,150,42,.15); color: #9A7415; }
.badge-urgent  { background: var(--danger-bg); color: var(--danger); }
.badge-info    { background: var(--info-bg); color: var(--info); }
.badge-mgr     { background: linear-gradient(135deg, var(--brown), var(--brown-soft)); color: var(--gold-soft); }
.badge-staff   { background: var(--cream2); color: var(--muted); }

/* ════════ 16. MODALS ════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 800;
  background: rgba(26,15,8,.55);
  backdrop-filter: blur(5px);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.modal-overlay.open { display: flex; animation: fadeIn .25s var(--ease); }
.modal-box {
  width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--cream3);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xl);
  animation: modalPop .4s var(--ease-spring);
}
.modal-wide { max-width: 680px; }
.modal-compact { max-width: 420px; }
.modal-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px;
  padding: 22px 24px 0;
}
.modal-header h3 { font-size: 21px; color: var(--brown); }
.modal-close-btn {
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  background: var(--cream2);
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all var(--t-med);
}
.modal-close-btn:hover { background: var(--cream3); color: var(--brown); transform: rotate(90deg); }
.modal-body { padding: 18px 24px; }

/* Explanation box shown inside modals to guide the user. */
.modal-explain {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  background: linear-gradient(135deg, rgba(196,150,42,.08), rgba(160,98,58,.04));
  border: 1px solid rgba(196,150,42,.16);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  margin-bottom: 18px;
}
.modal-explain-icon {
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1.4;
}
.modal-explain-text {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
}
.modal-explain-text strong {
  color: var(--brown);
  font-weight: 600;
}
.modal-footer {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 0 24px 22px;
}
.confirm-body { text-align: center; padding-top: 8px; }
.confirm-icon {
  font-size: 48px; margin-bottom: 12px;
  animation: floatY 2.5s var(--ease-out) infinite;
}
.confirm-msg { font-size: 15px; color: var(--ink); line-height: 1.6; }

/* ════════ 17. TOASTS & LOADER ════════ */
#toast-rack {
  position: fixed; bottom: 24px; right: 24px; z-index: 900;
  display: flex; flex-direction: column-reverse; gap: 10px;
  pointer-events: none;
}
.toast-item {
  display: flex; align-items: center; gap: 10px;
  min-width: 260px; max-width: 360px;
  padding: 13px 18px;
  border-radius: var(--r-md);
  font-size: 14px; font-weight: 500;
  box-shadow: var(--sh-lg);
  pointer-events: auto;
  animation: toastIn .4s var(--ease-spring);
}
.toast-item.out { animation: toastOut .35s var(--ease) forwards; }
.toast-icon {
  width: 22px; height: 22px; flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.toast-success { background: linear-gradient(135deg, #2E7D52, #246B43); color: var(--white); }
.toast-success .toast-icon { background: rgba(255,255,255,.22); }
.toast-error { background: linear-gradient(135deg, var(--danger), #A52F22); color: var(--white); }
.toast-error .toast-icon { background: rgba(255,255,255,.22); }
.toast-info { background: linear-gradient(135deg, var(--info), #144460); color: var(--white); }
.toast-info .toast-icon { background: rgba(255,255,255,.22); }

#g-loader {
  position: fixed; inset: 0; z-index: 950;
  display: none; align-items: center; justify-content: center;
  background: rgba(26,15,8,.72);
  backdrop-filter: blur(6px);
}
.loader-content { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.loader-ring { position: relative; width: 56px; height: 56px; }
.loader-ring div {
  position: absolute; width: 100%; height: 100%;
  border: 3px solid transparent;
  border-top-color: var(--gold-soft);
  border-radius: 50%;
  animation: spin 1.1s var(--ease) infinite;
}
.loader-ring div:nth-child(2) { animation-delay: -.1s; border-top-color: var(--latte); }
.loader-ring div:nth-child(3) { animation-delay: -.2s; border-top-color: var(--caramel); }
.loader-ring div:nth-child(4) { animation-delay: -.3s; opacity: .4; }
#g-loader-msg { color: var(--cream); font-size: 14px; font-weight: 500; letter-spacing: .3px; }

/* ════════ 18. SKELETONS & EMPTY STATES ════════ */
.skeleton-list, .skeleton-cards { display: flex; flex-direction: column; gap: 10px; }
.skeleton-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.skeleton-list::before, .skeleton-list::after,
.skeleton-cards::before, .skeleton-cards::after {
  content: '';
  height: 64px;
  border-radius: var(--r-sm);
  background: linear-gradient(90deg, var(--cream2) 25%, var(--cream3) 50%, var(--cream2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s var(--ease) infinite;
}
.skeleton-cards::before, .skeleton-cards::after { height: 200px; border-radius: var(--r-md); }

.empty-state {
  text-align: center; padding: 60px 24px;
  color: var(--muted);
}
.empty-state-icon { font-size: 52px; display: block; margin-bottom: 14px; opacity: .55; }
.empty-state h3 { font-size: 18px; color: var(--brown); margin-bottom: 6px; }
.empty-state p { font-size: 13.5px; color: var(--muted); }

/* ════════ FANCY ENHANCEMENTS ════════
   Premium professional polish: gradient sweeps, glow effects, refined transitions.
   All optional — purely visual, doesn't change behavior. */

/* —— Stat tiles: light-sweep on hover —— */
.stat-tile {
  position: relative;
  overflow: hidden;
}
.stat-tile::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  transition: left .65s var(--ease);
  pointer-events: none;
}
.stat-tile:hover::before { left: 100%; }
.stat-tile:hover .stat-tile-num {
  background: linear-gradient(135deg, var(--brown), var(--caramel));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all .4s var(--ease);
}

/* —— Primary button: light-sweep on hover (matches auth button) —— */
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.18) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform .6s var(--ease);
  pointer-events: none;
}
.btn-primary:hover::after { transform: translateX(100%); }

/* —— Sidebar active link: subtle glow pulse —— */
.sb-link.active {
  position: relative;
}
.sb-link.active::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--r-sm);
  background: radial-gradient(circle at 0% 50%, rgba(232,201,122,.10), transparent 60%);
  pointer-events: none;
  animation: linkGlow 3.5s var(--ease-out) infinite;
}
@keyframes linkGlow {
  0%, 100% { opacity: .6; }
  50%      { opacity: 1;  }
}

/* —— Sidebar profile card: subtle gradient border on hover —— */
.sb-profile {
  position: relative;
  background: linear-gradient(140deg, rgba(255,255,255,.04), rgba(255,255,255,.025));
}
.sb-profile::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--r-md);
  padding: 1px;
  background: linear-gradient(135deg, rgba(232,201,122,.0), rgba(232,201,122,.0));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  transition: background .4s var(--ease);
  pointer-events: none;
}
.sb-profile:hover::before {
  background: linear-gradient(135deg, rgba(232,201,122,.5), rgba(160,98,58,.3));
}

/* —— Avatar: subtle inner highlight & gentle bob on hover —— */
.sb-avatar, .profile-avatar, .member-avatar, .comment-av {
  position: relative;
}
.sb-avatar::after, .profile-avatar::after, .member-avatar::after {
  content: '';
  position: absolute;
  top: 8%; left: 12%;
  width: 30%; height: 22%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.4), transparent 70%);
  pointer-events: none;
}
.member-card:hover .member-avatar {
  transform: scale(1.05) rotate(-3deg);
  transition: transform .3s var(--ease-spring);
}

/* —— Welcome banner: animated gradient + soft moving glow —— */
.welcome-banner {
  background:
    radial-gradient(ellipse 60% 100% at 85% 50%, rgba(196,150,42,.18), transparent 70%),
    linear-gradient(135deg, var(--brown) 0%, var(--espresso) 100%);
  background-size: 200% 100%, 100% 100%;
  animation: bannerShift 15s ease infinite alternate;
}
@keyframes bannerShift {
  0%   { background-position: 0% 50%, 0 0; }
  100% { background-position: 100% 50%, 0 0; }
}
.welcome-banner::before {
  content: '';
  position: absolute;
  top: -50%; left: -10%;
  width: 60%; height: 200%;
  background: radial-gradient(ellipse, rgba(232,201,122,.08), transparent 60%);
  pointer-events: none;
  animation: bannerGlow 10s var(--ease-out) infinite alternate;
}
@keyframes bannerGlow {
  0%   { transform: translateX(0) rotate(0deg); }
  100% { transform: translateX(50%) rotate(8deg); }
}
.welcome-greeting {
  background: linear-gradient(135deg, var(--cream) 0%, var(--gold-soft) 50%, var(--cream) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmerText 6s ease infinite;
}
@keyframes shimmerText {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* —— Progress bars: shimmer overlay so they feel alive —— */
.shift-progress-fill,
.shift-summary-fill {
  position: relative;
  overflow: hidden;
}
.shift-progress-fill::after,
.shift-summary-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.35) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: progShimmer 2.5s linear infinite;
}
@keyframes progShimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* —— Page title: graceful underline accent —— */
.page-title {
  position: relative;
  display: inline-block;
}
.page-title::after {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  height: 3px; width: 36px;
  background: linear-gradient(90deg, var(--gold), var(--caramel));
  border-radius: var(--r-full);
  transform-origin: left;
  transform: scaleX(0);
  animation: titleUnderline .7s .3s var(--ease-out) forwards;
}
@keyframes titleUnderline {
  to { transform: scaleX(1); }
}

/* —— Cards: gentle lift + warm glow on hover —— */
.panel-card,
.ann-card,
.task-card,
.member-card,
.shift-summary-card {
  position: relative;
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out), border-color .4s var(--ease-out);
}
.task-card:hover,
.member-card:hover,
.ann-card:hover {
  box-shadow:
    0 14px 40px rgba(26,15,8,.13),
    0 4px 12px rgba(26,15,8,.08),
    0 0 0 1px rgba(196,150,42,.10);
}

/* —— Inputs: gentle gradient border glow on focus —— */
.field-input:focus,
.field-textarea:focus {
  box-shadow:
    0 0 0 4px rgba(160,98,58,.10),
    0 0 14px rgba(196,150,42,.08);
}

/* —— Shift checkboxes: smoother snap when ticked —— */
.shift-check {
  transition:
    transform .25s var(--ease-spring),
    background .3s var(--ease),
    border-color .3s var(--ease),
    box-shadow .3s var(--ease);
}
.shift-check.checked,
.shift-check.verified-style,
.shift-check.attention-style {
  animation: checkPop .35s var(--ease-spring);
}
@keyframes checkPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}
.shift-check.checked {
  box-shadow: 0 4px 12px rgba(196,150,42,.35);
}
.shift-check.verified-style {
  box-shadow: 0 4px 12px rgba(46,125,82,.35);
}
.shift-check.attention-style {
  box-shadow: 0 4px 12px rgba(192,57,43,.30);
}

/* —— Shift status pills: gentle entrance —— */
.shift-status-pill {
  animation: pillIn .35s var(--ease-spring);
}
@keyframes pillIn {
  from { opacity: 0; transform: scale(.85); }
  to   { opacity: 1; transform: scale(1); }
}

/* —— Toast: soft inner glow —— */
.toast-success { box-shadow: 0 14px 40px rgba(46,125,82,.30), 0 0 0 1px rgba(46,125,82,.20); }
.toast-error   { box-shadow: 0 14px 40px rgba(192,57,43,.30), 0 0 0 1px rgba(192,57,43,.20); }
.toast-info    { box-shadow: 0 14px 40px rgba(26,82,118,.30), 0 0 0 1px rgba(26,82,118,.20); }

/* —— Modal: smoother backdrop fade-in —— */
.modal-overlay {
  transition: backdrop-filter .3s var(--ease);
}
.modal-overlay.open {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* —— Loader: more elegant orbital motion —— */
.loader-ring div {
  filter: drop-shadow(0 0 6px rgba(232,201,122,.4));
}

/* —— Auth screen: softer extra glow layer —— */
.auth-card {
  position: relative;
}
.auth-card::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  border-radius: var(--r-xl);
  background: linear-gradient(135deg, rgba(232,201,122,.25), rgba(160,98,58,.0) 50%, rgba(232,201,122,.15));
  z-index: -1;
  filter: blur(12px);
  opacity: .6;
}

/* —— Submit banner: soft pulsing ambient glow —— */
.shift-submit-box {
  animation: submitPulse 2.5s ease-in-out infinite;
}
@keyframes submitPulse {
  0%, 100% { box-shadow: 0 2px 8px rgba(46,125,82,.10), 0 0 0 0 rgba(46,125,82,.0); }
  50%      { box-shadow: 0 4px 18px rgba(46,125,82,.22), 0 0 0 4px rgba(46,125,82,.08); }
}

/* —— Shift tab: gradient sheen when active —— */
.shift-tab.active {
  position: relative;
  overflow: hidden;
}
.shift-tab.active::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 200%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(232,201,122,.12), transparent);
  animation: tabSheen 4s ease infinite;
  pointer-events: none;
}
@keyframes tabSheen {
  0%   { left: -100%; }
  60%  { left: 100%;  }
  100% { left: 100%;  }
}

/* —— Sidebar brand icon: subtle rotation accent on hover —— */
.sb-brand-icon { transition: transform .5s var(--ease-spring); }
.sb-header:hover .sb-brand-icon { transform: rotate(-10deg) scale(1.06); }

/* —— Category pills: glow when active —— */
.cat-pill.active {
  box-shadow: 0 4px 14px rgba(59,34,18,.25), 0 0 0 4px rgba(160,98,58,.10);
}

/* —— Better link hover —— */
.btn-text {
  position: relative;
}
.btn-text::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1.5px;
  background: var(--caramel);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform .3s var(--ease-out);
}
.btn-text:hover::after { transform: scaleX(1); }

/* Reduce motion preference — turn off all the fancy stuff if user prefers it */
@media (prefers-reduced-motion: reduce) {
  .welcome-banner,
  .welcome-greeting,
  .sb-link.active::after,
  .shift-progress-fill::after,
  .shift-summary-fill::after,
  .shift-tab.active::before,
  .shift-submit-box,
  .page-title::after { animation: none !important; }
  .stat-tile::before, .btn-primary::after { transition: none !important; }
}

/* ════════ 19. ANIMATIONS ════════ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pageEnter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; max-height: 0; } to { opacity: 1; max-height: 280px; } }
@keyframes modalPop { from { opacity: 0; transform: scale(.94) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(28px, -22px) scale(1.06); }
  66% { transform: translate(-18px, 16px) scale(.96); }
}
@keyframes pulseRing {
  0% { transform: scale(1); opacity: .7; }
  100% { transform: scale(1.25); opacity: 0; }
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(192,57,43,.5); }
  70% { box-shadow: 0 0 0 7px rgba(192,57,43,0); }
  100% { box-shadow: 0 0 0 0 rgba(192,57,43,0); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}
@keyframes toastIn { from { opacity: 0; transform: translateX(40px) scale(.92); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px) scale(.92); } }

/* ════════ 20. RESPONSIVE ════════ */
@media (max-width: 1100px) {
  .dash-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--sh-xl); height: 100vh; height: 100dvh; padding-top: calc(60px + env(safe-area-inset-top, 0px)); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: calc(78px + env(safe-area-inset-top, 0px)) 18px 50px; }
  .mobile-header { display: flex; }
}

@media (max-width: 640px) {
  .stats-row { grid-template-columns: 1fr; }
  .tasks-grid { grid-template-columns: 1fr; }
  .skeleton-cards { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .shift-tabs { grid-template-columns: 1fr; }
  .shift-summary-grid { grid-template-columns: 1fr; }
  .verify-choice-grid { grid-template-columns: 1fr; }
  .shift-item { padding: 12px 13px; gap: 12px; }
  .shift-check { width: 38px; height: 38px; }
  .shift-mgr-banner { flex-direction: column; align-items: stretch; gap: 10px; }
  .shift-mgr-banner button { width: 100%; }
  .shift-submit-box { flex-direction: column; align-items: stretch; gap: 10px; }
  .shift-submit-box button { width: 100%; }
  .page-header { flex-direction: column; align-items: stretch; }
  .header-actions { flex-direction: column; align-items: stretch; }
  .header-actions button { width: 100%; }
  .welcome-banner { padding: 24px 22px; }
  .welcome-art { font-size: 90px; right: 16px; }
  .profile-hero { flex-direction: column; text-align: center; gap: 18px; }
  .profile-quote { max-width: 100%; padding: 18px 20px; }
  .profile-quote-text { font-size: 14px; }
  .profile-quote-sub { text-align: center; }
  .ann-body { padding: 18px; }
  .ann-footer { padding: 12px 18px; }
  .comments-section { padding: 14px 18px; }
  .modal-overlay { padding: 14px; }
  .modal-header { padding: 18px 18px 0; }
  .modal-body { padding: 16px 18px; }
  .modal-footer { padding: 0 18px 18px; flex-direction: column-reverse; }
  .modal-footer button { width: 100%; }
  .member-card-inner { flex-wrap: wrap; }
  .member-actions { width: 100%; }
  .member-actions button { flex: 1; }
  #toast-rack { left: 14px; right: 14px; bottom: 14px; }
  .toast-item { min-width: 0; max-width: 100%; }
  .auth-card { padding: 26px 22px; }
  .waste-head { display: none; }
  .waste-row { grid-template-columns: 1fr 1fr; row-gap: 10px; padding: 14px 16px; }
  .waste-cell { display: flex; flex-direction: column; gap: 3px; }
  .waste-cell::before { content: attr(data-label); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted-soft); }
  .waste-cell-acts { grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; }
  .waste-cell-acts::before { content: none; }
  .waste-toolbar { justify-content: flex-start; }
  .warning-head { display: none; }
  .warning-row { grid-template-columns: 1fr 1fr; row-gap: 10px; padding: 14px 16px; }
  .warning-cell { display: flex; flex-direction: column; gap: 3px; }
  .warning-cell::before { content: attr(data-label); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted-soft); }
  .warning-cell-notes { grid-column: 1 / -1; flex-direction: row; align-items: flex-start; }
  .warning-cell-notes::before { content: none; }
}

@media (max-width: 400px) {
  .auth-screen { padding: 20px 14px; }
  .auth-title { font-size: 28px; }
  .role-grid { grid-template-columns: 1fr; }
  .training-filters { flex-direction: column; align-items: stretch; }
  .search-box { min-width: 0; }
}

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

/* Print */
@media print {
  .sidebar, .mobile-header, .header-actions, .mgr-btn, #toast-rack, #g-loader, #pg-splash { display: none !important; }
  .main-content { margin: 0; padding: 0; }
}

/* ════════ 21. INTRO SPLASH ════════ */
.pg-splash { position: fixed; inset: 0; z-index: 9999; background: #120B05; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; transition: opacity .7s var(--ease), transform .7s var(--ease); }
.pg-splash.hide { opacity: 0; transform: scale(1.08); pointer-events: none; }
.pg-mark { width: min(230px, 58vw); height: auto; }
.pg-line, .pg-glow { stroke-dasharray: 220; stroke-dashoffset: 220; animation: pgDraw .7s ease forwards; }
.pg-p1 { animation-delay: 0s; }
.pg-p2 { animation-delay: .15s; }
.pg-p3 { animation-delay: .55s; }
.pg-p4 { animation-delay: .7s; }
.pg-p5 { animation-delay: .8s; }
.pg-p6 { animation-delay: .86s; }
.pg-p7 { animation-delay: .92s; }
.pg-g1 { animation-delay: 0s; }
.pg-g2 { animation-delay: .15s; }
.pg-dot { opacity: 0; animation: pgDot .3s ease 1.1s forwards; }
.pg-flash { position: absolute; top: 20%; left: 50%; width: 220px; height: 220px; margin-left: -110px; margin-top: -110px; border-radius: 50%; background: #C9956A; opacity: 0; animation: pgFlash .7s ease 1.2s forwards; }
.pg-splash-text { color: #B9724A; font-family: var(--f-serif); font-size: 23px; font-weight: 600; letter-spacing: .5px; opacity: 0; transform: translateY(10px) scale(.97); animation: pgTitle .6s ease 1.5s forwards; }
.pg-underline { width: 0; height: 2px; background: var(--gold); animation: pgLine .5s ease 2.15s forwards; }
@keyframes pgDraw { to { stroke-dashoffset: 0; } }
@keyframes pgDot { to { opacity: 1; } }
@keyframes pgFlash { 0% { opacity: 0; transform: scale(.3); } 40% { opacity: .3; } 100% { opacity: 0; transform: scale(1.35); } }
@keyframes pgTitle { to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes pgLine { to { width: 150px; } }