/* ────────────────────────────────────────────────────────
   The Munch Box — Global Design Tokens & Base Styles
   Used across all apps in the Turborepo
──────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* Brand Colors */
  --color-brand-dark:    #0D1B2A;
  --color-brand-blue:    #2D7DD2;
  --color-brand-blue-lt: #EBF3FF;
  --color-brand-green:   #27AE60;
  --color-brand-red:     #E74C3C;
  --color-brand-gold:    #C9A84C;
  --color-brand-orange:  #F4A736;

  /* Neutrals */
  --color-bg:        #F0F4F8;
  --color-surface:   #FFFFFF;
  --color-border:    #E2EAF4;
  --color-border-lt: #F0F4F8;
  --color-text:      #1A2533;
  --color-text-sub:  #6B7C93;
  --color-text-muted:#A0AABF;

  /* Sidebar */
  --sidebar-bg:      #0D1B2A;
  --sidebar-width:   240px;
  --topbar-height:   60px;

  /* Status Colors */
  --color-ok:       #27AE60;
  --color-low:      #F4A736;
  --color-critical: #E74C3C;

  /* Radius */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;
  --radius-xl:  20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.12);
  --shadow-xl:  0 20px 60px rgba(0,0,0,0.20);

  /* Typography */
  --font-family: 'Inter', sans-serif;
  --font-size-xs:   0.68rem;
  --font-size-sm:   0.75rem;
  --font-size-base: 0.85rem;
  --font-size-md:   0.95rem;
  --font-size-lg:   1.1rem;
  --font-size-xl:   1.4rem;

  /* Transitions */
  --transition-fast:   0.1s ease;
  --transition-normal: 0.15s ease;
  --transition-slow:   0.2s ease;
}

/* Dark mode overrides */
.dark {
  --color-bg:        #111827;
  --color-surface:   #1E2A3A;
  --color-border:    rgba(255,255,255,0.08);
  --color-border-lt: rgba(255,255,255,0.04);
  --color-text:      #F1F5F9;
  --color-text-sub:  rgba(255,255,255,0.5);
  --color-text-muted:rgba(255,255,255,0.3);
}

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: var(--font-family);
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
input { min-height: 44px; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-text-muted); }

/* ── UTILITY CLASSES ── */
.hide { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── ANIMATIONS ── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInRight { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideInUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* Attendance PWA mobile helpers */
.att-card-button {
  width: 100%;
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 2px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.07);
  color: white;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}
.att-card-button:active,
.att-primary-button:active,
.att-ghost-button:active {
  transform: translateY(1px);
}
.att-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.att-ghost-button {
  min-height: 40px;
  padding: 7px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.78);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 750;
}
.att-primary-button {
  min-height: 52px;
  padding: 14px 32px;
  border-radius: 16px;
  border: none;
  background: #2D7DD2;
  color: white;
  cursor: pointer;
  font-weight: 850;
  font-size: 0.94rem;
  box-shadow: 0 12px 26px rgba(45,125,210,0.25);
}
.att-search {
  width: 100%;
  margin-bottom: 14px;
  border: 1.5px solid rgba(255,255,255,0.16);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.08);
  color: white;
  outline: none;
  font-size: 0.92rem;
}
.att-search::placeholder {
  color: rgba(255,255,255,0.45);
}
.att-search:focus {
  border-color: #2D7DD2;
  box-shadow: 0 0 0 3px rgba(45,125,210,0.18);
}
@media (max-width: 420px) {
  .att-card-button {
    min-height: 70px;
    padding: 14px 16px;
  }
}
