/* ============================================================
   base.css — BookKeepPro Design System
   Shared by every page. Load first.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,1,0');

/* ── Brand Tokens ─────────────────────────────────────────── */
:root {
  --blue:         #0077C8;
  --blue-dark:    #005fa3;
  --blue-light:   #e9f5ff;
  --orange:       #FF7F11;
  --orange-dark:  #e56e0d;
  --orange-light: #fff3e0;
  --header-bg:    #BEE2FA;
  --footer-bot:   #A9D9F8;
  --navy:         #0B2540;
  --accent:       #3AB4F2;
  --bg:           #f1f7fb;
  --card:         #ffffff;
  --muted:        #6b7a86;
  --border:       #e2eaf2;
  --success:      #2e7d32;
  --success-bg:   #e6f9ec;
  --error:        #c62828;
  --error-bg:     #fdecea;
  --warn:         #f57f17;
  --warn-bg:      #fff8e1;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 4px rgba(0,0,0,0.06);
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.07);
  --shadow-md: 0 6px 24px rgba(0,0,0,0.09);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.12);

  --transition: 0.2s ease;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: "Poppins", system-ui, sans-serif;
  background: var(--bg);
  color: #222;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a   { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }
.material-symbols-outlined { font-size: inherit; vertical-align: middle; line-height: 1; font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }

/* ── Typography ──────────────────────────────────────────── */
h1 { font-size: clamp(22px,3vw,30px); font-weight: 700; color: var(--navy); line-height: 1.25; }
h2 { font-size: clamp(18px,2.5vw,24px); font-weight: 600; color: var(--navy); line-height: 1.3; }
h3 { font-size: clamp(15px,2vw,18px); font-weight: 600; color: var(--navy); }
p  { line-height: 1.7; color: #444; }
small, .text-sm { font-size: 13px; color: var(--muted); }
.text-muted { color: var(--muted); }

/* ── Card ────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  padding: clamp(20px, 4vw, 32px);
  transition: box-shadow var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-flat  { background: var(--card); border-radius: var(--radius-md); border: 1px solid var(--border); padding: clamp(16px, 3vw, 24px); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 22px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.97); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary   { background: var(--orange); color: #fff; }
.btn-primary:hover:not(:disabled)   { background: var(--orange-dark); box-shadow: 0 4px 12px rgba(255,127,17,0.3); }

.btn-secondary { background: var(--blue); color: #fff; }
.btn-secondary:hover:not(:disabled) { background: var(--blue-dark); box-shadow: 0 4px 12px rgba(0,119,200,0.25); }

.btn-ghost  { background: transparent; color: var(--muted); border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 10px 18px; }
.btn-ghost:hover:not(:disabled) { background: var(--bg); color: var(--navy); border-color: #c0cfe0; }

.btn-danger { background: #ff4d4d; color: #fff; }
.btn-danger:hover:not(:disabled) { background: #e03c3c; box-shadow: 0 4px 12px rgba(255,77,77,0.3); }

.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-xs { padding: 5px 12px; font-size: 12px; }
.btn-icon { padding: 9px; border-radius: var(--radius-sm); }

/* ── Form Inputs ─────────────────────────────────────────── */
.input, .select-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  color: #222;
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input:focus, .select-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,119,200,0.10);
}
.input::placeholder { color: #a8b5c2; }
.input[readonly] { background: #f8fafc; color: var(--muted); cursor: default; }
label.form-label { display: block; font-size: 13px; font-weight: 500; color: #444; margin-bottom: 6px; }
.form-group { margin-bottom: 18px; }
.password-wrap { position: relative; }
.password-wrap .input { padding-right: 56px; }
.password-toggle {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--blue); font-weight: 600; font-size: 13px; cursor: pointer;
}

/* ── Badges ──────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 700; letter-spacing: 0.3px;
  white-space: nowrap;
}
.badge-blue    { background: var(--blue-light);   color: var(--blue); }
.badge-orange  { background: var(--orange-light);  color: #e65100; border: 1px solid #ffc89a; }
.badge-red     { background: #fce4ec; color: var(--error); }
.badge-green   { background: var(--success-bg); color: var(--success); }
.badge-yellow  { background: var(--warn-bg);    color: var(--warn); border: 1px solid #ffe082; }
.badge-muted   { background: #f0f4f8; color: var(--muted); }

/* ── Status Pills (doc review) ───────────────────────────── */
.pill-approved { background:var(--success-bg); color:var(--success); border:1px solid #a5d6a7; padding:2px 10px; border-radius:20px; font-size:11px; font-weight:700; }
.pill-rejected { background:var(--error-bg); color:var(--error); border:1px solid #ef9a9a; padding:2px 10px; border-radius:20px; font-size:11px; font-weight:700; }
.pill-pending  { background:var(--warn-bg); color:var(--warn); border:1px solid #ffe082; padding:2px 10px; border-radius:20px; font-size:11px; font-weight:700; }

/* ── Divider ─────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ── App Layout Scaffold ─────────────────────────────────── */
.app-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.page-main {
  flex: 1;
  width: min(100%, 1100px);
  margin: clamp(24px, 4vw, 40px) auto;
  padding: 0 clamp(16px, 3vw, 24px);
}
.page-main-wide {
  flex: 1;
  width: min(100%, 1300px);
  margin: clamp(24px, 4vw, 40px) auto;
  padding: 0 clamp(16px, 3vw, 24px);
}

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeIn  { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }
@keyframes slideUp { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:none; } }
.fade-in  { animation: fadeIn  0.3s ease both; }
.slide-up { animation: slideUp 0.35s ease both; }

/* ── Skeleton loading ────────────────────────────────────── */
@keyframes shimmer {
  from { background-position: -600px 0; }
  to   { background-position:  600px 0; }
}
.skeleton {
  background: linear-gradient(90deg, #e8edf2 25%, #f4f6f9 50%, #e8edf2 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: var(--radius-sm);
}

/* ── Utility ─────────────────────────────────────────────── */
.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between{ display: flex; align-items: center; justify-content: space-between; }
.flex-gap-sm { gap: 8px; }
.flex-gap-md { gap: 16px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-8  { margin-top:  8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom:  8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.font-600 { font-weight: 600; }


/* --- UI/UX Polish --- */

/* Button Micro-animations */
.btn {
  transition: transform 0.1s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.btn:active {
  transform: scale(0.96);
}

/* Focus States for Accessibility */
.input:focus, 
input[type="text"]:focus, 
input[type="email"]:focus, 
input[type="password"]:focus, 
textarea:focus {
  outline: none;
  border-color: var(--blue) !important;
  box-shadow: 0 0 0 3px rgba(0, 119, 200, 0.25) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Document & Admin Card Lift Effects */
.doc-card, .doc-row, .admin-docs-td {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.doc-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  background: #fafafa;
}

/* --- Dark Mode Overrides --- */
.dark-theme {
  --bg:           #0B1521;
  --card:         #152538;
  --navy:         #f1f7fb;
  --muted:        #a8b5c2;
  --border:       #2A3F54;
  
  --header-bg:    #0F2B44;
  --footer-bot:   #06182B;
  
  --blue-light:   #0d263b;
  --orange-light: #2d1a0a;
  
  --success-bg:   #0b2e13;
  --error-bg:     #420f0f;
  --warn-bg:      #3d2508;
  
  --shadow-xs: 0 1px 4px rgba(0,0,0,0.3);
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.4);
  --shadow-md: 0 6px 24px rgba(0,0,0,0.5);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.6);
}

/* Ensure text on dark theme maps correctly if using base html/body color */
body.dark-theme {
  background-color: var(--bg);
  color: var(--navy);
}
