/* ═══════════════════════════════════════════════════════════
   SHARED DESIGN SYSTEM — linked by every page
═══════════════════════════════════════════════════════════ */

:root {
  /* Brand colours */
  --primary:        #38bdf8;   /* sky-400 – light blue accent */
  --primary-dark:   #0284c7;   /* sky-600 */
  --primary-light:  #e0f2fe;   /* sky-100 */
  --brand-blue:     #38bdf8;
  --brand-red:      #ef4444;
  --brand-yellow:   #f59e0b;

  /* Neutrals */
  --text:           #0f172a;   /* slate-900 */
  --muted:          #64748b;   /* slate-500 */
  --bg:             #f8fafc;   /* slate-50  */
  --card:           #ffffff;
  --border:         #e2e8f0;   /* slate-200 */
  --shadow:         0 1px 3px rgba(15,23,42,0.08), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-md:      0 4px 12px rgba(15,23,42,0.10), 0 2px 4px rgba(15,23,42,0.06);

  /* Geometry */
  --radius:         18px;
  --radius-sm:      12px;
  --radius-btn:     14px;
  --radius-input:   12px;

  /* Status colours (logo palette: blue / red / yellow) */
  --pending-bg:     #fef9c3;
  --pending-text:   #854d0e;
  --approved-bg:    #dcfce7;
  --approved-text:  #14532d;
  --rejected-bg:    #fee2e2;
  --rejected-text:  #7f1d1d;

  /* Bottom nav */
  --nav-h:          60px;
  --safe-bottom:    env(safe-area-inset-bottom, 0px);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; }

body {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

/* ── Page fade-in ── */
@keyframes pageIn {
  from { opacity: 0; transform: translateY(7px); }
  to   { opacity: 1; transform: none; }
}
body { animation: pageIn 0.2s ease both; }

/* ── Bottom navigation ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  padding-top: 0.4rem;
  padding-bottom: var(--safe-bottom);
  height: calc(var(--nav-h) + var(--safe-bottom));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
}

.nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.3rem 0.5rem;
  min-height: 48px;
  font-size: 0.67rem;
  font-weight: 600;
  font-family: system-ui, -apple-system, sans-serif;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.nav-tab:active  { opacity: 0.6; }
.nav-tab.active  { color: var(--primary-dark); }
.nav-tab.active svg { stroke: var(--primary-dark); }

.nav-tab svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ── Search bar ── */
.search-bar {
  position: relative;
  margin-bottom: 0.85rem;
}
.search-bar svg {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.search-bar input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.6rem;
  font-size: 1rem;
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-input);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.search-bar input:focus    { border-color: var(--primary); }
.search-bar input::placeholder { color: #94a3b8; }

/* ── Shared status badges ── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 99px;
  white-space: nowrap;
}
.status-badge.pending  { background: var(--pending-bg);  color: var(--pending-text);  }
.status-badge.approved { background: var(--approved-bg); color: var(--approved-text); }
.status-badge.rejected { background: var(--rejected-bg); color: var(--rejected-text); }

/* ── ECA Logo ── */
.eca-logo {
  display: inline-flex;
  gap: 3px;
  text-decoration: none;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.eca-l {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.eca-ch {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.01em;
}

.eca-dot {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.eca-r { background: var(--brand-red);    }
.eca-y { background: var(--brand-yellow); }
.eca-b { background: var(--brand-blue);   }

/* Large variant — login page */
.eca-logo.lg            { gap: 6px; }
.eca-logo.lg .eca-l     { gap: 6px; }
.eca-logo.lg .eca-ch    { font-size: 2.4rem; }
.eca-logo.lg .eca-dot   { width: 9px; height: 9px; }

/* ── Utility ── */
.hidden { display: none !important; }
