/* ==========================================
   ISPSC Accreditation System — Clean Light Theme
   ========================================== */



@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Jost:wght@300;400;500&display=swap');

:root {
  /* ── Core palette ── */
  --maroon:           #6b1d1d;
  --maroon-dark:      #4e1515;
  --maroon-light:     #8b2e2e;
  --maroon-pale:      #f5eaea;
  --maroon-border:    rgba(107,29,29,0.18);

  /* ── Backgrounds ── */
  --bg-page:          #f8f8f8;
  --bg-white:         #ffffff;
  --bg-subtle:        #f2f2f2;
  --bg-hover:         #eeeeee;

  /* ── Borders ── */
  --glass-border:         rgba(0,0,0,0.10);
  --glass-border-strong:  rgba(0,0,0,0.18);

  /* ── Glass card (light) ── */
  --glass-bg:         rgba(255,255,255,0.85);
  --glass-bg-hover:   rgba(255,255,255,1);
  --glass-shadow:     0 2px 12px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.05);
  --glass-backdrop:   blur(8px);

  /* ── Text ── */
  --text-primary:     #1a1a1a;
  --text-secondary:   #4a4a4a;
  --text-muted:       #888888;

  /* ── Accent colours (kept for status badges etc.) ── */
  --accent-blue:      #2563eb;
  --accent-teal:      #0d9488;
  --accent-amber:     #d97706;
  --accent-green:     #16a34a;
  --accent-rose:      #dc2626;

  --font-display:     'Cormorant Garamond', Georgia, serif;
  --font-display-size: 48px;
  --font-body:        'Jost', sans-serif;
  

  --radius:           12px;
  --radius-sm:        7px;
  --transition:       0.18s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Background decorations (subtle on light) ── */
.bg-grid {
  position: fixed; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.orb { display: none; } /* Remove coloured orbs on light theme */

/* ─── Glass / Surface Card ─────────────────── */
.glass-card {
  background: var(--bg-white);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
  position: relative;
}
.glass-card::before { display: none; }

/* ─── PUBLIC HEADER ─────────────────────────── */
.glass-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--maroon);
  border-bottom: 1px solid var(--maroon-dark);
  border-radius: 0;
}
.header-inner {
  max-width: 1400px; margin: 0 auto;
  padding: 0.85rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
}
.header-brand {
  display: flex; align-items: center; gap: 0.75rem;
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 500;
  color: #fff; text-decoration: none;
}
.header-text .brand-title { color: #fff; }
.header-text .brand-sub   { color: rgba(255,255,255,0.6); }
.header-divider { background: rgba(255,255,255,0.3); }
.header-nav { display: flex; gap: 0.75rem; align-items: center; }

.btn-glass {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: none;
}
.btn-glass:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.4);
}

.back-link { color: rgba(255,255,255,0.75); text-decoration: none; font-size: 0.85rem; transition: color var(--transition); }
.back-link:hover { color: #fff; }

/* ─── BUTTONS ────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem; padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm); border: none;
  font-family: var(--font-body); font-size: 0.85rem; font-weight: 500;
  letter-spacing: 0.03em; cursor: pointer;
  text-decoration: none; transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--maroon);
  color: #fff;
}
.btn-primary:hover { background: var(--maroon-light); transform: translateY(-1px); }
.btn-full { width: 100%; }

.btn-sm {
  display: inline-flex; align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 5px; border: none;
  font-family: var(--font-body); font-size: 0.72rem; font-weight: 500;
  cursor: pointer; text-decoration: none; transition: all var(--transition);
  white-space: nowrap;
}
.btn-approve { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.btn-approve:hover { background: #bbf7d0; }
.btn-reject  { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }
.btn-reject:hover  { background: #fecaca; }
.btn-view    { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.btn-view:hover    { background: #dbeafe; }

/* ─── ALERTS ─────────────────────────────── */
.alert {
  padding: 0.85rem 1.25rem; border-radius: var(--radius-sm);
  font-size: 0.87rem; margin-bottom: 1.5rem; border: 1px solid;
}
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.alert-error   { background: #fef2f2; border-color: #fecaca; color: #dc2626; }

/* ─── FORM ELEMENTS ──────────────────────── */
.login-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 2rem;
}
.login-wrap { position: relative; z-index: 1; width: 100%; max-width: 420px; }
.login-card { padding: 3rem 2.5rem; }
.login-logo { text-align: center; margin-bottom: 2.5rem; }
.logo-icon { width: 56px; height: 56px; margin: 0 auto 1rem; }
.logo-icon.small { width: 36px; height: 36px; }
.logo-icon svg { width: 100%; height: 100%; }
.login-logo h1 {
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 500; letter-spacing: 0.05em;
  color: var(--text-primary);
}
.login-logo p { color: var(--text-secondary); font-size: 0.85rem; font-weight: 300; margin-top: 0.25rem; }
.login-form { display: flex; flex-direction: column; gap: 1.25rem; }

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label {
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-secondary);
}
.form-group input, .form-group select, .form-group textarea {
  background: #fafafa;
  border: 1px solid #d1d5db;
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  color: var(--text-primary);
  font-family: var(--font-body); font-size: 0.9rem;
  outline: none; width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input::placeholder { color: #aaa; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--maroon);
  box-shadow: 0 0 0 3px rgba(107,29,29,0.08);
}
.form-group select option { background: #fff; color: var(--text-primary); }
.form-group textarea { resize: vertical; min-height: 80px; }

.login-note { text-align: center; margin-top: 1.5rem; font-size: 0.82rem; color: var(--text-muted); }
.login-note a { color: var(--maroon); text-decoration: none; }
.login-note a:hover { text-decoration: underline; }

/* ─── LANDING PAGE ───────────────────────── */
.landing-page { position: relative; z-index: 1; }
.hero {
  padding: 10rem 2rem 5rem;
  max-width: 1400px; margin: 0 auto;
}
.hero-badge {
  display: inline-block; padding: 0.3rem 0.9rem;
  border: 1px solid var(--maroon-border); border-radius: 100px;
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--maroon); margin-bottom: 1.5rem;
  background: var(--maroon-pale);
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 300; line-height: 1.05; letter-spacing: -0.01em;
  color: var(--text-primary); margin-bottom: 1.5rem;
}
.hero-title em { font-style: italic; color: var(--maroon); }
.hero-sub { color: var(--text-secondary); font-size: 1.05rem; font-weight: 300; max-width: 520px; line-height: 1.7; }

.areas-section { padding: 2rem 2rem 5rem; max-width: 1400px; margin: 0 auto; position: relative; z-index: 1; }
.section-label {
  font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 1.5rem; display: block;
}
.areas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }

.area-card {
  padding: 1.75rem; text-decoration: none; color: inherit;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  display: flex; flex-direction: column; gap: 0.75rem;
  background: #fff; border: 1px solid var(--glass-border);
}
.area-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(107,29,29,0.10);
  border-color: var(--maroon-border);
}
.area-number {
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--maroon);
}
.area-name {
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 500;
  line-height: 1.3; color: var(--text-primary);
}
.area-desc { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; flex: 1; }
.area-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 0.75rem; border-top: 1px solid #f0f0f0;
}
.doc-count { font-size: 0.78rem; color: var(--text-muted); }
.area-arrow { color: var(--maroon); font-size: 1.1rem; transition: transform var(--transition); }
.area-card:hover .area-arrow { transform: translateX(4px); }

/* ─── AREA VIEW PAGE ─────────────────────── */
.area-hero {
  padding: 8rem 2rem 3rem; max-width: 1400px; margin: 0 auto; position: relative; z-index: 1;
}
.area-hero-num {
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--maroon); margin-bottom: 0.75rem;
}
.area-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 400; color: var(--text-primary); margin-bottom: 1rem;
}
.area-hero-desc { color: var(--text-secondary); max-width: 600px; }

.docs-section { padding: 1rem 2rem 5rem; max-width: 1400px; margin: 0 auto; position: relative; z-index: 1; }
.docs-list { display: flex; flex-direction: column; gap: 0.75rem; }
.doc-card { display: flex; align-items: center; gap: 1.25rem; padding: 1.25rem 1.5rem; }
.doc-icon { width: 40px; height: 40px; flex-shrink: 0; color: var(--maroon); opacity: 0.75; }
.doc-icon svg { width: 100%; height: 100%; }
.doc-info { flex: 1; }
.doc-info h4 { font-size: 0.95rem; font-weight: 500; margin-bottom: 0.25rem; color: var(--text-primary); }
.doc-desc { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 0.4rem; }
.doc-meta { display: flex; gap: 1rem; font-size: 0.75rem; color: var(--text-muted); flex-wrap: wrap; }
.btn-download { flex-shrink: 0; }

.empty-state {
  text-align: center; padding: 4rem 2rem;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
}
.empty-icon { font-size: 3rem; }
.empty-state h3 { font-family: var(--font-display); font-size: 1.5rem; color: var(--text-primary); }
.empty-state p { color: var(--text-secondary); }

/* ─── FOOTER ─────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--glass-border);
  padding: 2rem; text-align: center;
  color: var(--text-muted); font-size: 0.78rem;
  background: #fff; position: relative; z-index: 1;
}

/* ─── MODALS ─────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 2rem;
}
.modal-box { width: 100%; max-width: 560px; padding: 2rem; animation: modalIn 0.2s ease; }
.modal-box h3 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 1.5rem; color: var(--text-primary); }
.modal-actions {
  display: flex; justify-content: flex-end; gap: 0.75rem;
  margin-top: 1.5rem; padding-top: 1.25rem;
  border-top: 1px solid var(--glass-border);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── UPLOAD ─────────────────────────────── */
.upload-wrap { max-width: 640px; }
.upload-card { padding: 2.5rem; }
.upload-card h3 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 0.5rem; color: var(--text-primary); }
.upload-note { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 2rem; }
.upload-form { display: flex; flex-direction: column; gap: 1.25rem; }
.file-drop {
  position: relative; border: 2px dashed #d1d5db;
  border-radius: var(--radius-sm); padding: 2.5rem;
  text-align: center; cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.file-drop:hover { border-color: var(--maroon); background: var(--maroon-pale); }
.file-drop-icon { font-size: 2rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.file-drop-text { font-size: 0.85rem; color: var(--text-muted); }
.file-info { display: flex; gap: 0.75rem; align-items: center; font-size: 0.82rem; padding: 0.5rem 0; }
.file-name { color: var(--maroon); }
.file-size { color: var(--text-muted); }

/* ─── STATUS BADGES ──────────────────────── */
.status-badge {
  display: inline-block; padding: 0.2rem 0.6rem;
  border-radius: 100px; font-size: 0.72rem; font-weight: 500;
}
.status-approved { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.status-pending  { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.status-rejected { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.badge-approved  { background: #f0fdf4; color: #15803d; padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.72rem; }
.badge-pending   { background: #fffbeb; color: #b45309; padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.72rem; }
.badge-role { padding: 0.2rem 0.6rem; border-radius: 100px; font-size: 0.72rem; font-weight: 500; }
.badge-admin { background: var(--maroon-pale); color: var(--maroon); border: 1px solid var(--maroon-border); }
.badge-user  { background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb; }
.area-tag { background: var(--maroon-pale); color: var(--maroon); padding: 0.15rem 0.55rem; border-radius: 4px; font-size: 0.72rem; white-space: nowrap; }
