/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #1a1a1a;
  --navy-mid: #2a2a2a;
  --gold: #E8820C;
  --gold-light: #F5960E;
  --cream: #faf8f5;
  --white: #ffffff;
  --gray-100: #f5f5f5;
  --gray-200: #e8e8e8;
  --gray-400: #9e9e9e;
  --gray-600: #555;
  --red: #c0392b;
  --green: #27ae60;
  --font-head: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --radius: 8px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.15);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--white);
  font-size: 16px;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
input, textarea, select {
  font-family: var(--font-body);
  font-size: 15px;
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  outline: none;
  transition: border-color .2s;
  background: white;
}
input:focus, textarea:focus { border-color: var(--gold); }
textarea { resize: vertical; }

/* ===== NAVBAR ===== */
#navbar {
  position: fixed; top: 0; left: 0; right: 0;
  background: rgba(13, 27, 42, 0.97);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid rgba(184, 150, 12, 0.3);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center;
  padding: 0 2rem; height: 64px;
  gap: 2rem;
}
.logo { display: flex; align-items: center; gap: 10px; color: white; font-weight: 700; font-size: 18px; }
.logo-mark {
  background: var(--gold); color: #1a1a1a;
  font-family: 'DM Sans', sans-serif; font-weight: 800;
  width: 38px; height: 38px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
  letter-spacing: -0.5px;
}
.logo-mark.sm { width: 30px; height: 30px; font-size: 10px; }
.logo-text {
  color: white; font-weight: 800; font-size: 17px; letter-spacing: 0.5px;
  font-family: 'DM Sans', sans-serif;
}
.logo-text em { color: var(--gold); font-style: normal; }
.logo-sub { display: block; font-size: 9px; letter-spacing: 2px; color: rgba(255,255,255,0.5); text-transform: uppercase; font-weight: 400; margin-top: -2px; }
.nav-links { display: flex; gap: 2rem; margin-left: auto; }
.nav-links a { color: rgba(255,255,255,0.75); font-size: 14px; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: var(--gold-light); }
.nav-actions { display: flex; gap: 10px; }
.btn-login {
  padding: 8px 20px; border-radius: var(--radius); font-size: 14px;
  font-weight: 500; cursor: pointer; border: none;
  background: var(--gold); color: var(--navy); transition: all .2s;
}
.btn-login:hover { background: var(--gold-light); }
.btn-login.btn-outline { background: transparent; border: 1px solid var(--gold); color: var(--gold); }
.btn-login.btn-outline:hover { background: var(--gold); color: var(--navy); }
.btn-login.btn-danger { background: var(--red); color: white; }

/* ===== PAGES ===== */
main { padding-top: 64px; }
.page { display: none; }
.page.active { display: block; }

/* ===== HERO ===== */
.hero {
  min-height: calc(100vh - 64px);
  background: var(--navy);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(232,130,12,0.15) 0%, transparent 60%),
              linear-gradient(135deg, #111111 0%, #2a2a2a 100%);
}
.hero-bg::before {
  content: '';
  position: absolute; top: -200px; right: -200px;
  width: 600px; height: 600px;
  border: 1px solid rgba(184,150,12,0.15);
  border-radius: 50%;
}
.hero-bg::after {
  content: '';
  position: absolute; bottom: -100px; left: -100px;
  width: 400px; height: 400px;
  border: 1px solid rgba(184,150,12,0.1);
  border-radius: 50%;
}
.hero-content {
  position: relative; max-width: 1200px; margin: 0 auto;
  padding: 6rem 2rem 3rem;
}
.hero-eyebrow {
  color: var(--gold); font-size: 13px; letter-spacing: 2px;
  text-transform: uppercase; margin-bottom: 1.5rem;
}
.hero-title {
  font-family: var(--font-body);
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  font-weight: 800;
  color: white; line-height: 1.1; margin-bottom: 1.5rem;
  letter-spacing: -1px;
  text-transform: uppercase;
}
.hero-title em { color: var(--gold-light); font-style: italic; }
.hero-sub {
  color: rgba(255,255,255,0.65); font-size: 18px;
  max-width: 540px; margin-bottom: 2.5rem;
}
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-primary {
  padding: 12px 28px; background: var(--gold); color: var(--navy);
  border: none; border-radius: var(--radius); font-size: 15px;
  font-weight: 600; cursor: pointer; transition: all .2s;
  font-family: var(--font-body);
}
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-ghost {
  padding: 12px 28px; background: transparent; color: white;
  border: 1.5px solid rgba(255,255,255,0.3); border-radius: var(--radius);
  font-size: 15px; font-weight: 500; cursor: pointer;
  transition: all .2s; font-family: var(--font-body);
}
.btn-ghost:hover { border-color: white; background: rgba(255,255,255,0.08); }
.hero-stats {
  position: relative; max-width: 1200px; margin: 0 auto;
  padding: 2rem 2rem 4rem;
  display: flex; gap: 3rem;
}
.stat { display: flex; flex-direction: column; }
.stat-n { font-family: var(--font-head); font-size: 2.5rem; color: var(--gold-light); font-weight: 700; }
.stat-l { color: rgba(255,255,255,0.5); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; }

/* ===== FEATURES ===== */
.section-features { background: var(--cream); padding: 5rem 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section-title {
  font-family: var(--font-head); font-size: 2.2rem; margin-bottom: 3rem;
  color: var(--navy); text-align: center;
}
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem; }
.feature-card {
  background: white; padding: 2rem; border-radius: var(--radius);
  box-shadow: var(--shadow); transition: transform .2s;
}
.feature-card:hover { transform: translateY(-4px); }
.feature-icon { font-size: 2rem; margin-bottom: 1rem; }
.feature-card h3 { font-family: var(--font-head); margin-bottom: .5rem; }
.feature-card p { color: var(--gray-600); font-size: 14px; }

/* ===== PAGE HEADER ===== */
.page-header {
  background: #1a1a1a; color: white;
  padding: 4rem 2rem 3rem;
  border-bottom: 3px solid var(--gold);
}
.page-header h1 { font-family: var(--font-head); font-size: 2.5rem; margin-bottom: .5rem; }
.page-header p { color: rgba(255,255,255,0.6); }
.section-pad { padding: 4rem 0; }

/* ===== SERVICES ===== */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.service-item {
  padding: 2rem; border: 1.5px solid var(--gray-200); border-radius: var(--radius);
  transition: all .2s;
}
.service-item:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.service-item h3 { font-family: var(--font-head); margin-bottom: .75rem; color: var(--navy); }
.service-item p { color: var(--gray-600); font-size: 14px; }

/* ===== ABOUT ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.about-text h2 { font-family: var(--font-head); font-size: 1.8rem; margin-bottom: 1rem; }
.about-text p { color: var(--gray-600); margin-bottom: 1rem; }
.about-values { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.value-item { padding: 1.5rem; background: var(--cream); border-radius: var(--radius); }
.value-item strong { display: block; margin-bottom: .25rem; }
.value-item p { font-size: 13px; color: var(--gray-600); }

/* ===== CONTACT ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 4rem; }
.contact-item { display: flex; gap: 1rem; margin-bottom: 1.5rem; align-items: flex-start; }
.ci-icon { font-size: 1.5rem; margin-top: 2px; }
.contact-item strong { display: block; margin-bottom: .25rem; }
.contact-item p { color: var(--gray-600); font-size: 14px; }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--navy); }

/* ===== LOGIN ===== */
.login-wrapper {
  min-height: calc(100vh - 64px);
  background: var(--cream);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
}
.login-card {
  background: white; padding: 2.5rem; border-radius: 12px;
  width: 100%; max-width: 420px; box-shadow: var(--shadow-lg);
}
.login-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 1.5rem; font-size: 18px; font-weight: 600; }
.login-card h2 { font-family: var(--font-head); font-size: 1.8rem; margin-bottom: .25rem; }
.login-sub { color: var(--gray-400); margin-bottom: 1.5rem; font-size: 14px; }
.login-help { text-align: center; font-size: 13px; color: var(--gray-400); margin-top: 1rem; }
.full-width { width: 100%; }

/* ===== ALERTS ===== */
.alert {
  padding: 10px 14px; border-radius: var(--radius); font-size: 14px; margin-bottom: 1rem;
}
.alert-error { background: #fde8e8; color: var(--red); border: 1px solid #f5c6c6; }
.alert-success { background: #e8f8ee; color: var(--green); border: 1px solid #b8e4c8; }
.alert-info { background: #e8f0fe; color: #1a73e8; border: 1px solid #c5d8fc; }

/* ===== CUSTOMER PORTAL ===== */
.portal-header {
  background: var(--navy); color: white; padding: 2rem;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
}
.portal-header h1 { font-family: var(--font-head); font-size: 1.8rem; }
.portal-header p { color: rgba(255,255,255,0.6); font-size: 14px; }
.portal-actions { display: flex; gap: 1rem; }
.btn-outline {
  padding: 10px 20px; background: transparent; border: 1.5px solid var(--gold);
  color: var(--gold); border-radius: var(--radius); font-size: 14px;
  font-weight: 500; cursor: pointer; transition: all .2s; font-family: var(--font-body);
}
.btn-outline:hover { background: var(--gold); color: var(--navy); }

.docs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.5rem; }
.doc-card {
  background: white; border: 1.5px solid var(--gray-200); border-radius: var(--radius);
  padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem;
  transition: all .2s; box-shadow: var(--shadow);
}
.doc-card:hover { border-color: var(--gold); }
.doc-icon { font-size: 2.5rem; }
.doc-name { font-weight: 600; font-size: 15px; }
.doc-date { font-size: 12px; color: var(--gray-400); }
.doc-btn {
  padding: 8px; background: var(--navy); color: white;
  border: none; border-radius: var(--radius); font-size: 13px;
  cursor: pointer; transition: background .2s; font-family: var(--font-body);
}
.doc-btn:hover { background: var(--navy-mid); }

/* ===== DASHBOARD ===== */
.dash-layout { display: flex; min-height: calc(100vh - 64px); }

.sidebar {
  width: 240px; background: var(--navy); display: flex; flex-direction: column;
  padding: 1.5rem 0; position: fixed; left: 0; top: 64px; bottom: 0;
  overflow-y: auto; z-index: 100;
}
.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 0 1.25rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 1rem;
}
.sidebar-nav { flex: 1; display: flex; flex-direction: column; padding: 0 .5rem; }
.sn-item {
  display: block; padding: 10px 1rem; border-radius: var(--radius);
  color: rgba(255,255,255,0.65); font-size: 14px; font-weight: 500;
  transition: all .2s; margin-bottom: 2px; cursor: pointer;
}
.sn-item:hover, .sn-item.active { background: rgba(255,255,255,0.1); color: white; }
.sn-item.active { color: var(--gold-light); }
.sidebar-bottom { padding: 1rem 1.25rem; border-top: 1px solid rgba(255,255,255,0.1); }
.sidebar-user { margin-bottom: .75rem; }
.sidebar-user span:first-child { display: block; color: white; font-weight: 700; font-size: 14px; }
.role-badge {
  display: inline-block; background: var(--gold); color: #1a1a1a;
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 1px;
}
.btn-logout {
  width: 100%; padding: 8px; background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7); border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius); font-size: 13px; cursor: pointer;
  font-family: var(--font-body); transition: all .2s;
}
.btn-logout:hover { background: rgba(192,57,43,0.3); color: white; border-color: var(--red); }

.dash-main { margin-left: 240px; flex: 1; padding: 2rem; background: var(--gray-100); min-height: calc(100vh - 64px); }
.dash-tab { display: none; }
.dash-tab.active { display: block; }
.dash-title { font-family: var(--font-head); font-size: 1.6rem; margin-bottom: 1.5rem; color: var(--navy); }
.tab-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.section-subtitle { font-family: var(--font-head); font-size: 1.4rem; margin-bottom: 1.5rem; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.25rem; }
.stat-card {
  background: white; padding: 1.5rem; border-radius: var(--radius);
  box-shadow: var(--shadow); display: flex; align-items: center; gap: 1rem;
}
.stat-card-icon { font-size: 2rem; }
.stat-card-n { display: block; font-family: var(--font-head); font-size: 2rem; color: var(--navy); font-weight: 700; }
.stat-card-l { font-size: 12px; color: var(--gray-400); text-transform: uppercase; letter-spacing: 1px; }

/* ===== TABLES ===== */
.table-wrap { overflow-x: auto; background: white; border-radius: var(--radius); box-shadow: var(--shadow); }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--gray-600); border-bottom: 2px solid var(--gray-200); }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--gray-200); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--gray-100); }

.search-bar { margin-bottom: 1rem; }
.search-bar input { max-width: 400px; }

.pagination { display: flex; gap: .5rem; margin-top: 1rem; justify-content: flex-end; }
.pg-btn {
  padding: 6px 12px; border: 1.5px solid var(--gray-200); background: white;
  border-radius: var(--radius); font-size: 13px; cursor: pointer; font-family: var(--font-body);
}
.pg-btn.active { background: var(--navy); color: white; border-color: var(--navy); }
.pg-btn:hover:not(.active) { border-color: var(--gold); }

/* ===== STATUS BADGES ===== */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
}
.badge-pending { background: #fff3cd; color: #856404; }
.badge-reviewed { background: #cce5ff; color: #004085; }
.badge-sent { background: #d4edda; color: #155724; }

/* ===== BUTTONS (table actions) ===== */
.btn-sm {
  padding: 5px 10px; font-size: 12px; border: none; border-radius: 5px;
  cursor: pointer; font-family: var(--font-body); font-weight: 500; transition: all .2s;
}
.btn-sm-primary { background: var(--navy); color: white; }
.btn-sm-danger { background: var(--red); color: white; }
.btn-sm-gold { background: var(--gold); color: var(--navy); }
.btn-sm:hover { opacity: .85; }

/* ===== ADMIN ===== */
.admin-sections { display: flex; flex-direction: column; gap: 2rem; }
.admin-section {
  background: white; padding: 2rem; border-radius: var(--radius);
  box-shadow: var(--shadow); max-width: 600px;
}
.admin-section h3 { font-family: var(--font-head); margin-bottom: 1.25rem; }

/* ===== MODALS ===== */
.modal-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(13, 27, 42, 0.7); z-index: 2000;
  align-items: center; justify-content: center; padding: 1rem;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: white; padding: 2rem; border-radius: 12px;
  width: 100%; max-width: 560px; max-height: 90vh;
  overflow-y: auto; box-shadow: var(--shadow-lg);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.modal-header h3 { font-family: var(--font-head); font-size: 1.3rem; }
.modal-header button { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--gray-400); }
.modal-hint { font-size: 13px; color: var(--gray-600); margin-bottom: 1rem; background: var(--cream); padding: 10px; border-radius: var(--radius); }
.btn-row { display: flex; gap: 1rem; }

/* ===== DOCUMENTS (admin) ===== */
.docs-list { display: flex; flex-direction: column; gap: 1rem; }
.doc-list-item {
  background: white; padding: 1.25rem 1.5rem; border-radius: var(--radius);
  box-shadow: var(--shadow); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
}
.doc-list-info { flex: 1; }
.doc-list-name { font-weight: 600; margin-bottom: .25rem; }
.doc-list-meta { font-size: 12px; color: var(--gray-400); }
.doc-list-actions { display: flex; gap: .5rem; }

/* ===== FILE DROP ===== */
.file-drop {
  border: 2px dashed var(--gray-200); border-radius: var(--radius);
  padding: 2rem; text-align: center; cursor: pointer; transition: all .2s; color: var(--gray-400);
}
.file-drop:hover { border-color: var(--gold); color: var(--navy); }
.file-drop.has-file { border-color: var(--green); color: var(--green); }

/* ===== CHECKLIST ===== */
.clients-checklist {
  max-height: 200px; overflow-y: auto; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius); margin-top: .5rem;
}
.checklist-item {
  display: flex; align-items: center; gap: .75rem; padding: 10px 14px;
  border-bottom: 1px solid var(--gray-200); cursor: pointer; font-size: 14px;
}
.checklist-item:last-child { border-bottom: none; }
.checklist-item:hover { background: var(--gray-100); }
.checklist-item input[type=checkbox] { width: auto; accent-color: var(--navy); }

/* ===== OVERLAY ===== */
.overlay {
  position: fixed; inset: 0; background: rgba(255,255,255,0.8);
  z-index: 9999; display: flex; align-items: center; justify-content: center;
}
.spinner {
  width: 40px; height: 40px; border: 4px solid var(--gray-200);
  border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== FOOTER ===== */
#site-footer { background: var(--navy); color: rgba(255,255,255,0.65); padding: 3rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 3rem; margin-bottom: 2rem; }
.footer-grid h4 { color: white; margin-bottom: .75rem; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; }
.footer-grid a { display: block; color: rgba(255,255,255,0.6); font-size: 14px; margin-bottom: .5rem; }
.footer-grid a:hover { color: var(--gold-light); }
.footer-grid p { font-size: 14px; margin-bottom: .4rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.5rem; text-align: center; font-size: 13px; }

/* ===== LOADING ===== */
.loading { text-align: center; padding: 3rem; color: var(--gray-400); }

hr { border: none; border-top: 1px solid var(--gray-200); margin: 1.5rem 0; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero-title { font-size: 2.2rem; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .dash-layout { flex-direction: column; }
  .sidebar { position: static; width: 100%; top: auto; flex-direction: row; flex-wrap: wrap; }
  .dash-main { margin-left: 0; }
  .portal-header { flex-direction: column; align-items: flex-start; }
}

/* ===== WORKER FORM ADDITIONS ===== */
.modal-wide { max-width: 720px; }

.form-section-title {
  font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--gold); margin-bottom: .75rem; padding-bottom: .5rem;
  border-bottom: 1px solid var(--gray-200);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem 1rem;
}

.form-group-full { grid-column: 1 / -1; }

.req { color: var(--red); font-size: 12px; }

select {
  font-family: var(--font-body);
  font-size: 15px;
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  outline: none;
  transition: border-color .2s;
  background: white;
  cursor: pointer;
}
select:focus { border-color: var(--gold); }

@media (max-width: 560px) {
  .form-grid-2 { grid-template-columns: 1fr; }
  .form-group-full { grid-column: 1; }
}
