:root {
  --navy: #0f1e3d;
  --navy-light: #1a305c;
  --gold: #c9a227;
  --gold-dark: #a88420;
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-500: #64748b;
  --gray-700: #334155;
  --gray-900: #0f172a;
  --success: #16a34a;
  --danger: #dc2626;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--white);
  color: var(--gray-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--navy);
}

.logo-mark {
  width: 42px;
  height: 42px;
  background: var(--navy);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.5px;
}

.logo-text {
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.2;
}

.logo-text span {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--gray-500);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav a {
  color: var(--gray-700);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.nav a:hover { color: var(--navy); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--gold);
  color: var(--navy);
}

.btn-primary:hover {
  background: var(--gold-dark);
  transform: translateY(-1px);
}

.btn-navy {
  background: var(--navy);
  color: var(--white);
}

.btn-navy:hover {
  background: var(--navy-light);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}

.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}

.btn-lg { padding: 16px 36px; font-size: 1.05rem; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero h1 em {
  color: var(--gold);
  font-style: normal;
}

.hero p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 32px;
  max-width: 500px;
}

.hero-badges {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
}

.hero-img {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.3);
}

.hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Trust bar */
.trust-bar {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  padding: 20px 0;
}

.trust-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--gray-500);
  font-weight: 500;
}

.trust-inner span {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Sections */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--gray-50);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-header h2 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 12px;
}

.section-header p {
  color: var(--gray-500);
  font-size: 1.1rem;
}

/* Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  padding: 32px;
  transition: all 0.3s;
}

.card:hover {
  border-color: var(--gray-300);
  box-shadow: 0 20px 40px rgba(15,30,61,0.08);
  transform: translateY(-4px);
}

.card-icon {
  width: 56px;
  height: 56px;
  background: var(--gray-100);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 20px;
}

.card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}

.card p {
  color: var(--gray-500);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.card-meta {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-500);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  margin-top: 16px;
}

.card-link:hover { color: var(--gold-dark); }

/* Loan detail page */
.loan-hero {
  background: var(--gray-50);
  padding: 60px 0;
  border-bottom: 1px solid var(--gray-200);
}

.loan-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.loan-hero h1 {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 16px;
}

.loan-hero p {
  color: var(--gray-500);
  font-size: 1.1rem;
  margin-bottom: 28px;
}

.loan-highlights {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.loan-highlights li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gray-700);
  font-weight: 500;
}

.loan-img {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(15,30,61,0.1);
}

.loan-img img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

/* Form */
.form-wrap {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  padding: 40px;
  max-width: 640px;
  margin: 0 auto;
  box-shadow: 0 4px 24px rgba(0,0,0,0.04);
}

.form-wrap h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.form-wrap > p {
  color: var(--gray-500);
  margin-bottom: 28px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 4px;
}

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

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--gray-700);
}

input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  color: var(--gray-900);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(15,30,61,0.08);
}

.checkbox-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
}

.checkbox-item:hover { border-color: var(--gray-300); }

.checkbox-item input { width: auto; accent-color: var(--navy); }

.form-note {
  text-align: center;
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--gray-500);
}

.submit-btn {
  width: 100%;
  margin-top: 16px;
  justify-content: center;
}

/* Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.step {
  text-align: center;
  padding: 24px;
}

.step-num {
  width: 56px;
  height: 56px;
  background: var(--navy);
  color: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  margin: 0 auto 20px;
}

.step h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.step p {
  color: var(--gray-500);
  font-size: 0.9rem;
}

/* Footer */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand {
  max-width: 320px;
}

.footer-brand h3 {
  color: var(--white);
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.footer-col a {
  display: block;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 10px;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--gold); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
}

/* Breadcrumb */
.breadcrumb {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  padding: 16px 0;
  font-size: 0.85rem;
  color: var(--gray-500);
}

.breadcrumb a {
  color: var(--gray-500);
  text-decoration: none;
}

.breadcrumb a:hover { color: var(--navy); }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--navy);
  color: var(--white);
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.2);
  display: none;
  align-items: center;
  gap: 12px;
  z-index: 1000;
  font-weight: 500;
}

.toast.show { display: flex; animation: slideUp 0.3s ease; }

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Admin */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th, .admin-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}

.admin-table th {
  background: var(--gray-50);
  font-weight: 600;
  color: var(--gray-700);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table tr:hover { background: var(--gray-50); }

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tag-mca { background: #dbeafe; color: #1e40af; }
.tag-term { background: #dcfce7; color: #166534; }
.tag-sba { background: #fef3c7; color: #92400e; }
.tag-equipment { background: #f3e8ff; color: #6b21a8; }
.tag-loc { background: #ccfbf1; color: #0f766e; }
.tag-processing { background: #fee2e2; color: #991b1b; }
.tag-invoice { background: #e0e7ff; color: #3730a3; }

/* Mobile */
@media (max-width: 768px) {
  .nav { display: none; }
  .hero-grid, .loan-hero-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .form-grid { grid-template-columns: 1fr; }
  .checkbox-group { grid-template-columns: 1fr; }
  .hero { padding: 60px 0; }
  .section { padding: 60px 0; }
}
