@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ============================================================
   CSS CUSTOM PROPERTIES – Apple Design System
   ============================================================ */
:root {
  --white:          #FFFFFF;
  --off-white:      #F5F5F7;
  --blue:           #0071E3;
  --blue-hover:     #0077ED;
  --blue-dark:      #004F9E;
  --blue-light:     #E8F1FB;
  --black:          #1D1D1F;
  --gray-text:      #6E6E73;
  --light-text:     #86868B;
  --border:         #D2D2D7;
  --border-light:   #E8E8ED;
  --green:          #34C759;
  --green-light:    #E8F8ED;
  --red:            #FF3B30;
  --red-light:      #FFF0EF;
  --orange:         #FF9500;
  --orange-light:   #FFF4E5;
  --purple:         #AF52DE;
  --purple-light:   #F5EAFB;
  --card-shadow:    0 2px 20px rgba(0,0,0,0.08);
  --card-shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
  --radius-sm:      8px;
  --radius-md:      12px;
  --radius-lg:      18px;
  --radius-xl:      24px;
  --radius-pill:    980px;
  --transition:     all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --font:           'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font); color: var(--black); background: var(--white); -webkit-font-smoothing: antialiased; line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--blue-hover); }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }
input, textarea, select { font-family: var(--font); }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; color: var(--black); }
h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
p { color: var(--gray-text); line-height: 1.75; }
.text-center { text-align: center; }
.text-dark { color: var(--black); }
.text-blue { color: var(--blue); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-gray { color: var(--gray-text); }

/* ============================================================
   LAYOUT
   ============================================================ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 100px 0; }
.section-sm { padding: 60px 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.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 { display: flex; align-items: center; gap: 12px; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }

/* ============================================================
   PUBLIC NAVIGATION
   ============================================================ */
.nav-public {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 0 24px; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  transition: var(--transition);
}
.nav-public.scrolled {
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.nav-logo { font-size: 1.1rem; font-weight: 700; color: var(--black); letter-spacing: -0.02em; }
.nav-logo:hover { color: var(--black); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { font-size: 0.875rem; font-weight: 500; color: var(--black); opacity: 0.85; }
.nav-links a:hover { opacity: 1; }
.nav-cta { font-size: 0.875rem; font-weight: 500; padding: 8px 18px; background: var(--blue); color: white !important; border-radius: var(--radius-pill); opacity: 1 !important; }
.nav-cta:hover { background: var(--blue-hover) !important; color: white; }
.nav-hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--black); border-radius: 2px; transition: var(--transition); }
.mobile-nav { display: none; position: fixed; top: 64px; left: 0; right: 0; background: white; border-bottom: 1px solid var(--border); padding: 20px 24px; z-index: 999; }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: 14px 0; font-size: 1rem; font-weight: 500; color: var(--black); border-bottom: 1px solid var(--border-light); }
.mobile-nav a:last-child { border-bottom: none; }

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  min-height: 100vh; display: flex; align-items: center; padding-top: 64px;
  background: var(--white);
  position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 20%, rgba(0,113,227,0.06) 0%, transparent 60%),
              radial-gradient(ellipse 60% 50% at 80% 80%, rgba(52,199,89,0.04) 0%, transparent 50%);
  z-index: 0;
}
.hero-content { position: relative; z-index: 1; text-align: center; max-width: 800px; margin: 0 auto; }
.hero-eyebrow { font-size: 0.875rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); margin-bottom: 16px; display: block; }
.hero h1 {
  font-size: clamp(3rem, 6vw, 5rem); font-weight: 800;
  letter-spacing: -0.04em; line-height: 1.05; margin-bottom: 24px;
  background: linear-gradient(135deg, var(--black) 0%, #3a3a3c 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero p { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--gray-text); max-width: 560px; margin: 0 auto 40px; }
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; background: var(--blue); color: white;
  border-radius: var(--radius-pill); font-size: 0.95rem; font-weight: 600;
  transition: var(--transition); white-space: nowrap;
}
.btn-primary:hover { background: var(--blue-hover); color: white; transform: scale(1.02); box-shadow: 0 4px 16px rgba(0,113,227,0.3); }
.btn-primary:active { transform: scale(0.98); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px; background: var(--off-white); color: var(--black);
  border-radius: var(--radius-pill); font-size: 0.95rem; font-weight: 600;
  transition: var(--transition); white-space: nowrap; border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--border); color: var(--black); transform: scale(1.02); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; background: transparent; color: var(--blue);
  border-radius: var(--radius-pill); font-size: 0.95rem; font-weight: 600;
  transition: var(--transition); border: 1.5px solid var(--blue);
}
.btn-ghost:hover { background: var(--blue); color: white; }
.btn-success {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; background: var(--green); color: white;
  border-radius: var(--radius-pill); font-size: 0.875rem; font-weight: 600;
  transition: var(--transition);
}
.btn-success:hover { background: #28a745; color: white; transform: scale(1.02); }
.btn-danger {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; background: var(--red); color: white;
  border-radius: var(--radius-pill); font-size: 0.875rem; font-weight: 600;
  transition: var(--transition);
}
.btn-danger:hover { background: #e0321f; color: white; transform: scale(1.02); }
.btn-sm { padding: 8px 16px; font-size: 0.8rem; }
.btn-white { background: white; color: var(--black); }
.btn-white:hover { background: var(--off-white); color: var(--black); }
.btn-full { width: 100%; justify-content: center; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow); border: 1px solid var(--border-light);
  overflow: hidden; transition: var(--transition);
}
.card:hover { box-shadow: var(--card-shadow-lg); transform: translateY(-2px); }
.card-header { padding: 20px 24px; border-bottom: 1px solid var(--border-light); }
.card-body { padding: 24px; }
.card-footer { padding: 16px 24px; background: var(--off-white); border-top: 1px solid var(--border-light); }
.card-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.card-subtitle { font-size: 0.875rem; color: var(--gray-text); }

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-tag { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); margin-bottom: 12px; display: block; }
.section-title { font-size: clamp(1.8rem, 3vw, 2.8rem); margin-bottom: 16px; }
.section-sub { font-size: 1.1rem; color: var(--gray-text); max-width: 560px; margin: 0 auto 60px; }

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how-section { background: var(--off-white); }
.step-card { background: white; border-radius: var(--radius-lg); padding: 36px 28px; box-shadow: var(--card-shadow); transition: var(--transition); }
.step-card:hover { transform: translateY(-4px); box-shadow: var(--card-shadow-lg); }
.step-number { font-size: 3rem; font-weight: 900; color: var(--blue); opacity: 0.15; line-height: 1; margin-bottom: 16px; }
.step-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--blue-light); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.step-icon svg { width: 24px; height: 24px; color: var(--blue); }
.step-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.step-card p { font-size: 0.9rem; }

/* ============================================================
   FEATURE GRID
   ============================================================ */
.feature-card { padding: 28px; border-radius: var(--radius-lg); border: 1px solid var(--border-light); transition: var(--transition); }
.feature-card:hover { border-color: var(--blue); background: var(--blue-light); }
.feature-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; background: var(--blue-light); }
.feature-icon svg { width: 24px; height: 24px; color: var(--blue); }
.feature-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.feature-card p { font-size: 0.875rem; }

/* ============================================================
   ASSIGNMENT / JOB CARDS
   ============================================================ */
.assignment-card {
  background: white; border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--card-shadow); border: 1px solid var(--border-light);
  transition: var(--transition); display: flex; flex-direction: column; gap: 16px;
}
.assignment-card:hover { box-shadow: var(--card-shadow-lg); transform: translateY(-3px); border-color: var(--border); }
.assignment-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.assignment-card-title { font-size: 1.05rem; font-weight: 700; color: var(--black); line-height: 1.3; }
.assignment-card-desc { font-size: 0.875rem; color: var(--gray-text); line-height: 1.6; }
.assignment-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.assignment-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.assignment-meta-item { font-size: 0.8rem; color: var(--light-text); display: flex; align-items: center; gap: 4px; }
.payout-badge {
  background: var(--green-light); color: var(--green); font-size: 1.1rem;
  font-weight: 800; padding: 6px 16px; border-radius: var(--radius-pill);
  white-space: nowrap; letter-spacing: -0.02em;
}

/* ============================================================
   STATUS BADGES
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: var(--radius-pill);
  font-size: 0.78rem; font-weight: 600; white-space: nowrap;
}
.badge-available  { background: var(--blue-light);   color: var(--blue); }
.badge-active     { background: #E8F3FF;              color: #0055B3; }
.badge-submitted  { background: var(--purple-light);  color: var(--purple); }
.badge-revision   { background: var(--orange-light);  color: var(--orange); }
.badge-approved   { background: var(--green-light);   color: #1A7A38; }
.badge-rejected   { background: var(--red-light);     color: var(--red); }
.badge-cancelled  { background: var(--off-white);     color: var(--gray-text); }
.badge-default    { background: var(--off-white);     color: var(--gray-text); }
.badge-onboarding { background: #FFF4E5;              color: #9A5700; }
.badge-awaiting   { background: var(--orange-light);  color: var(--orange); }
.badge-suspended  { background: var(--red-light);     color: var(--red); }
.badge-admin      { background: #1D1D1F;              color: white; }
.category-badge {
  display: inline-flex; padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: 0.75rem; font-weight: 500; background: var(--off-white); color: var(--gray-text);
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--black); margin-bottom: 8px; }
.form-label span.required { color: var(--red); margin-left: 4px; }
.form-control {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--border); border-radius: var(--radius-md);
  font-size: 0.95rem; color: var(--black); background: white;
  transition: var(--transition); outline: none;
}
.form-control:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,113,227,0.12); }
.form-control:disabled { background: var(--off-white); color: var(--gray-text); cursor: not-allowed; }
textarea.form-control { resize: vertical; min-height: 120px; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%236E6E73'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-text { font-size: 0.8rem; color: var(--light-text); margin-top: 6px; }
.form-error { font-size: 0.8rem; color: var(--red); margin-top: 6px; }
.form-section { margin-bottom: 32px; }
.form-section-title { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--light-text); margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--border-light); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius-lg); padding: 40px 24px;
  text-align: center; cursor: pointer; transition: var(--transition); background: var(--off-white);
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--blue); background: var(--blue-light); }
.upload-zone-icon { width: 48px; height: 48px; margin: 0 auto 12px; color: var(--light-text); }
.upload-zone p { font-size: 0.875rem; color: var(--gray-text); margin-bottom: 4px; }
.upload-zone small { font-size: 0.75rem; color: var(--light-text); }
.upload-zone input[type=file] { display: none; }
.upload-preview { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--green-light); border-radius: var(--radius-md); margin-top: 8px; }
.upload-preview svg { width: 20px; height: 20px; color: var(--green); flex-shrink: 0; }
.upload-preview span { font-size: 0.875rem; color: var(--black); font-weight: 500; }
.checkbox-group { display: flex; align-items: flex-start; gap: 12px; padding: 16px; background: var(--off-white); border-radius: var(--radius-md); margin-bottom: 12px; }
.checkbox-group input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--blue); flex-shrink: 0; margin-top: 2px; }
.checkbox-group label { font-size: 0.9rem; color: var(--black); line-height: 1.5; }

/* ============================================================
   ONBOARDING
   ============================================================ */
.onboarding-wrapper { min-height: 100vh; background: var(--off-white); display: flex; align-items: center; justify-content: center; padding: 100px 24px 40px; }
.onboarding-container { width: 100%; max-width: 640px; }
.onboarding-logo { text-align: center; margin-bottom: 32px; }
.onboarding-logo a { font-size: 1.3rem; font-weight: 800; color: var(--black); letter-spacing: -0.03em; }
.step-indicator { display: flex; align-items: center; margin-bottom: 32px; }
.step-item { display: flex; align-items: center; flex: 1; }
.step-item:last-child { flex: none; }
.step-circle {
  width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 0.85rem;
  font-weight: 700; color: var(--light-text); background: white; flex-shrink: 0; z-index: 1;
}
.step-circle.active { border-color: var(--blue); background: var(--blue); color: white; }
.step-circle.done { border-color: var(--green); background: var(--green); color: white; }
.step-line { flex: 1; height: 2px; background: var(--border); margin: 0 8px; }
.step-line.done { background: var(--green); }
.step-label { font-size: 0.75rem; color: var(--light-text); text-align: center; margin-top: 6px; }
.step-label.active { color: var(--blue); font-weight: 600; }
.onboarding-card { background: white; border-radius: var(--radius-xl); padding: 40px; box-shadow: 0 4px 40px rgba(0,0,0,0.1); }
.onboarding-title { font-size: 1.8rem; margin-bottom: 8px; }
.onboarding-sub { color: var(--gray-text); margin-bottom: 32px; font-size: 0.95rem; }
.contract-box {
  border: 1px solid var(--border); border-radius: var(--radius-md);
  max-height: 420px; overflow-y: scroll; padding: 24px;
  background: var(--off-white); margin-bottom: 24px; font-size: 0.875rem;
  line-height: 1.8; color: var(--black);
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.signature-box { border: 2px dashed var(--border); border-radius: var(--radius-lg); padding: 24px; text-align: center; margin-bottom: 24px; }
.signature-preview { max-width: 300px; margin: 0 auto; border: 1px solid var(--border); border-radius: var(--radius-md); }
.btn-sign { padding: 12px 24px; border: 2px solid var(--blue); color: var(--blue); border-radius: var(--radius-pill); font-weight: 600; font-size: 0.9rem; background: transparent; transition: var(--transition); }
.btn-sign:hover { background: var(--blue); color: white; }

/* ============================================================
   SIGNATURE MODAL
   ============================================================ */
.signature-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 2000;
  display: none; align-items: center; justify-content: center; padding: 24px;
  backdrop-filter: blur(4px);
}
.signature-modal-overlay.open { display: flex; }
.signature-modal { background: white; border-radius: var(--radius-xl); padding: 32px; max-width: 560px; width: 100%; }
.signature-modal h3 { margin-bottom: 8px; }
.signature-modal p { font-size: 0.875rem; color: var(--gray-text); margin-bottom: 20px; }
.signature-canvas-wrapper { border: 1.5px solid var(--border); border-radius: var(--radius-md); cursor: crosshair; background: white; position: relative; }
.signature-canvas-wrapper canvas { display: block; width: 100%; border-radius: var(--radius-md); touch-action: none; }
.signature-canvas-hint { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; font-size: 0.75rem; color: var(--light-text); pointer-events: none; }
.signature-modal-actions { display: flex; gap: 12px; margin-top: 16px; justify-content: flex-end; }

/* ============================================================
   PORTAL LAYOUT
   ============================================================ */
.portal-body { background: var(--off-white); }
.portal-layout { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.portal-sidebar {
  background: white; border-right: 1px solid var(--border-light);
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; padding: 0;
}
.portal-logo { padding: 24px 24px 16px; border-bottom: 1px solid var(--border-light); }
.portal-logo a { font-size: 1.1rem; font-weight: 800; color: var(--black); letter-spacing: -0.02em; }
.sidebar-balance { padding: 20px 24px; background: linear-gradient(135deg, #f0f7ff 0%, #e8f1fb 100%); border-bottom: 1px solid var(--border-light); }
.balance-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--light-text); display: block; margin-bottom: 4px; }
.balance-amount { font-size: 1.6rem; font-weight: 800; color: var(--green); letter-spacing: -0.03em; }
.portal-nav { padding: 16px 12px; flex: 1; }
.portal-nav-link {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px;
  border-radius: var(--radius-md); font-size: 0.9rem; font-weight: 500;
  color: var(--gray-text); transition: var(--transition); margin-bottom: 2px;
}
.portal-nav-link:hover { background: var(--off-white); color: var(--black); }
.portal-nav-link.active { background: var(--blue-light); color: var(--blue); font-weight: 600; }
.portal-nav-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.portal-sidebar-footer { padding: 20px 24px; border-top: 1px solid var(--border-light); }
.portal-sidebar-footer .user-name { display: block; font-size: 0.875rem; font-weight: 600; color: var(--black); margin-bottom: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-logout { font-size: 0.8rem; color: var(--gray-text); font-weight: 500; padding: 6px 12px; border-radius: var(--radius-pill); border: 1px solid var(--border); transition: var(--transition); }
.btn-logout:hover { color: var(--red); border-color: var(--red); }
.portal-main { min-height: 100vh; overflow: auto; }
.portal-header { padding: 20px 32px; background: white; border-bottom: 1px solid var(--border-light); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; }
.portal-header-title { font-size: 0.875rem; font-weight: 600; color: var(--black); }
.portal-content { padding: 32px; }
.page-title { font-size: 1.8rem; font-weight: 800; margin-bottom: 8px; }
.page-sub { color: var(--gray-text); margin-bottom: 32px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--light-text); margin-bottom: 24px; }
.breadcrumb a { color: var(--blue); }
.breadcrumb span { color: var(--border); }
.mobile-menu-toggle { display: none; padding: 8px; background: var(--off-white); border-radius: 8px; }
.mobile-menu-toggle svg { width: 20px; height: 20px; }

/* ============================================================
   STAT CARDS
   ============================================================ */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 32px; }
.stat-card { background: white; border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--card-shadow); border: 1px solid var(--border-light); }
.stat-card-label { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--light-text); margin-bottom: 8px; }
.stat-card-value { font-size: 2rem; font-weight: 800; color: var(--black); letter-spacing: -0.03em; line-height: 1; }
.stat-card-value.green { color: var(--green); }
.stat-card-value.blue { color: var(--blue); }
.stat-card-link { font-size: 0.78rem; color: var(--blue); margin-top: 12px; display: inline-block; font-weight: 500; }

/* ============================================================
   SMS DISPLAY
   ============================================================ */
.sms-container { background: var(--off-white); border-radius: var(--radius-lg); padding: 16px; min-height: 100px; }
.sms-message { background: white; border-radius: var(--radius-md); padding: 14px 16px; margin-bottom: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.sms-message:last-child { margin-bottom: 0; }
.sms-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.sms-sender { font-size: 0.8rem; font-weight: 700; color: var(--black); }
.sms-time { font-size: 0.75rem; color: var(--light-text); }
.sms-text { font-size: 0.9rem; color: var(--black); line-height: 1.5; word-break: break-word; }
.sms-empty { text-align: center; padding: 32px; color: var(--light-text); font-size: 0.875rem; }
.resource-card { border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px; }
.resource-card-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--light-text); margin-bottom: 8px; }
.resource-value { font-size: 1.1rem; font-weight: 700; color: var(--black); font-family: 'SF Mono', 'Consolas', monospace; letter-spacing: 0.02em; }
.password-field { display: flex; align-items: center; gap: 8px; }
.btn-reveal { padding: 6px 10px; background: var(--off-white); border-radius: 6px; font-size: 0.75rem; color: var(--gray-text); border: 1px solid var(--border); }
.btn-reveal:hover { background: var(--border); }

/* ============================================================
   ADMIN LAYOUT
   ============================================================ */
.admin-body { background: var(--off-white); }
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar {
  background: #1D1D1F; color: white;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column;
}
.admin-sidebar-logo { padding: 24px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.admin-sidebar-logo .logo-name { font-size: 1.05rem; font-weight: 800; color: white; letter-spacing: -0.02em; display: block; }
.admin-sidebar-logo .logo-tag { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.4); }
.admin-nav { padding: 16px 12px; flex: 1; }
.admin-nav-section { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: rgba(255,255,255,0.3); padding: 4px 12px 8px; margin-top: 12px; }
.admin-nav-link {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: var(--radius-md); font-size: 0.875rem; font-weight: 500;
  color: rgba(255,255,255,0.6); transition: var(--transition); margin-bottom: 2px;
}
.admin-nav-link:hover { background: rgba(255,255,255,0.08); color: white; }
.admin-nav-link.active { background: rgba(0,113,227,0.3); color: #60ACFF; font-weight: 600; }
.admin-nav-link svg { width: 17px; height: 17px; flex-shrink: 0; }
.admin-sidebar-footer { padding: 20px 24px; border-top: 1px solid rgba(255,255,255,0.08); }
.admin-sidebar-footer .admin-email { font-size: 0.8rem; color: rgba(255,255,255,0.4); display: block; margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-admin-logout { font-size: 0.8rem; color: rgba(255,255,255,0.5); padding: 6px 12px; border: 1px solid rgba(255,255,255,0.15); border-radius: var(--radius-pill); transition: var(--transition); }
.btn-admin-logout:hover { color: var(--red); border-color: var(--red); }
.admin-main { min-height: 100vh; overflow: auto; }
.admin-header { padding: 20px 32px; background: white; border-bottom: 1px solid var(--border-light); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; }
.admin-header-title { font-size: 1rem; font-weight: 700; color: var(--black); }
.admin-content { padding: 32px; }

/* ============================================================
   DATA TABLES
   ============================================================ */
.table-container { overflow-x: auto; border-radius: var(--radius-lg); box-shadow: var(--card-shadow); border: 1px solid var(--border-light); background: white; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead { background: var(--off-white); }
.data-table th { padding: 12px 16px; text-align: left; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--light-text); white-space: nowrap; border-bottom: 1px solid var(--border-light); }
.data-table td { padding: 14px 16px; font-size: 0.875rem; color: var(--black); border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background 0.15s; }
.data-table tbody tr:hover { background: #FAFAFA; }
.table-actions { display: flex; align-items: center; gap: 8px; }
.btn-table { padding: 6px 14px; font-size: 0.78rem; font-weight: 600; border-radius: var(--radius-pill); transition: var(--transition); display: inline-flex; align-items: center; gap: 4px; }
.btn-table-view { background: var(--blue-light); color: var(--blue); }
.btn-table-view:hover { background: var(--blue); color: white; }
.btn-table-approve { background: var(--green-light); color: var(--green); }
.btn-table-approve:hover { background: var(--green); color: white; }
.btn-table-danger { background: var(--red-light); color: var(--red); }
.btn-table-danger:hover { background: var(--red); color: white; }
.btn-table-edit { background: var(--orange-light); color: var(--orange); }
.btn-table-edit:hover { background: var(--orange); color: white; }

/* ============================================================
   FILTERS & SEARCH
   ============================================================ */
.filter-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-tab { padding: 8px 16px; font-size: 0.8rem; font-weight: 600; border-radius: var(--radius-pill); border: 1.5px solid var(--border); color: var(--gray-text); transition: var(--transition); }
.filter-tab:hover { border-color: var(--blue); color: var(--blue); }
.filter-tab.active { border-color: var(--blue); background: var(--blue); color: white; }
.filter-tab .count { background: rgba(255,255,255,0.3); padding: 1px 6px; border-radius: 10px; font-size: 0.7rem; margin-left: 4px; }
.search-box { display: flex; align-items: center; gap: 8px; background: white; border: 1.5px solid var(--border); border-radius: var(--radius-pill); padding: 8px 16px; flex: 1; max-width: 320px; }
.search-box svg { width: 16px; height: 16px; color: var(--light-text); flex-shrink: 0; }
.search-box input { border: none; outline: none; font-size: 0.875rem; flex: 1; color: var(--black); }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 18px; border-radius: var(--radius-md); margin-bottom: 20px;
  font-size: 0.875rem; font-weight: 500;
  animation: slideInDown 0.3s ease;
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--green-light); color: #1A7A38; border: 1px solid #A8E6B8; }
.alert-error { background: var(--red-light); color: #C0392B; border: 1px solid #F5BFBC; }
.alert-info { background: var(--blue-light); color: var(--blue-dark); border: 1px solid #B3D4F5; }
.alert-warning { background: var(--orange-light); color: #9A5700; border: 1px solid #FECDA0; }

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item { display: flex; gap: 16px; align-items: flex-start; padding-bottom: 20px; position: relative; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--border); background: white; flex-shrink: 0; margin-top: 4px; position: relative; z-index: 1; }
.timeline-dot.done { background: var(--green); border-color: var(--green); }
.timeline-dot.active { background: var(--blue); border-color: var(--blue); }
.timeline-item:not(:last-child)::before { content: ''; position: absolute; left: 5px; top: 16px; bottom: 0; width: 2px; background: var(--border-light); }
.timeline-content { flex: 1; }
.timeline-label { font-size: 0.8rem; font-weight: 700; color: var(--black); }
.timeline-date { font-size: 0.75rem; color: var(--light-text); }

/* ============================================================
   DETAIL LAYOUT (2 COLUMN)
   ============================================================ */
.detail-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
.detail-sidebar-card { background: white; border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--card-shadow); border: 1px solid var(--border-light); margin-bottom: 16px; }
.detail-sidebar-card h4 { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--light-text); margin-bottom: 16px; }
.detail-meta-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border-light); font-size: 0.875rem; }
.detail-meta-row:last-child { border-bottom: none; }
.detail-meta-label { color: var(--gray-text); }
.detail-meta-value { font-weight: 600; color: var(--black); }

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section { background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%); color: white; padding: 80px 0; text-align: center; }
.cta-section h2 { color: white; margin-bottom: 16px; }
.cta-section p { color: rgba(255,255,255,0.8); margin-bottom: 32px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer-public { background: var(--off-white); border-top: 1px solid var(--border-light); padding: 60px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand .footer-logo { font-size: 1.1rem; font-weight: 800; color: var(--black); letter-spacing: -0.02em; display: block; margin-bottom: 12px; }
.footer-brand p { font-size: 0.875rem; color: var(--gray-text); max-width: 260px; }
.footer-col h5 { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--black); margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 0.875rem; color: var(--gray-text); }
.footer-col ul li a:hover { color: var(--blue); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 24px; border-top: 1px solid var(--border); font-size: 0.8rem; color: var(--light-text); }

/* ============================================================
   LOADING STATES
   ============================================================ */
.spinner { width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--blue); border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block; }
.skeleton { background: linear-gradient(90deg, var(--border-light) 25%, var(--off-white) 50%, var(--border-light) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-md); }
.empty-state { text-align: center; padding: 60px 24px; }
.empty-state svg { width: 64px; height: 64px; color: var(--border); margin: 0 auto 16px; }
.empty-state h3 { font-size: 1.1rem; margin-bottom: 8px; }
.empty-state p { font-size: 0.875rem; color: var(--gray-text); margin-bottom: 24px; }

/* ============================================================
   CONFIRM MODAL
   ============================================================ */
.confirm-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 3000; display: none; align-items: center; justify-content: center; padding: 24px; backdrop-filter: blur(4px); }
.confirm-modal-overlay.open { display: flex; }
.confirm-modal { background: white; border-radius: var(--radius-xl); padding: 32px; max-width: 400px; width: 100%; text-align: center; }
.confirm-modal h3 { margin-bottom: 12px; }
.confirm-modal p { font-size: 0.9rem; color: var(--gray-text); margin-bottom: 24px; }
.confirm-modal-actions { display: flex; gap: 12px; justify-content: center; }

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  .portal-sidebar, .admin-sidebar, .portal-header, .admin-header,
  .btn-primary, .btn-secondary, .btn-danger, nav { display: none !important; }
  .portal-main, .admin-main { grid-column: 1 / -1; }
  body { background: white; }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes shimmer {
  to { background-position: -200% 0; }
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}
.animate-on-scroll { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }
.animate-delay-1 { transition-delay: 0.1s; }
.animate-delay-2 { transition-delay: 0.2s; }
.animate-delay-3 { transition-delay: 0.3s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .detail-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .portal-layout, .admin-layout { grid-template-columns: 1fr; }
  .portal-sidebar, .admin-sidebar {
    position: fixed; left: -100%; top: 0; height: 100vh; width: 260px;
    z-index: 500; transition: left 0.3s ease;
  }
  .portal-sidebar.open, .admin-sidebar.open { left: 0; }
  .portal-content, .admin-content { padding: 20px; }
  .mobile-menu-toggle { display: flex; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .form-row { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .hero { min-height: calc(100vh - 64px); }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .onboarding-card { padding: 24px; }
  .data-table th, .data-table td { padding: 10px 12px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 2.4rem; }
  .btn-primary, .btn-secondary { padding: 12px 20px; font-size: 0.875rem; }
}
