/* ============================================================
   A&R ACCOUNTING — Main Stylesheet
   Aesthetic: Refined editorial — deep slate + warm gold
   Fonts: Cormorant Garamond (display) + DM Sans (body)
   ============================================================ */

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

:root {
  --navy:       #0f1f2e;
  --navy-mid:   #1a2f42;
  --navy-light: #243d52;
  --gold:       #c9a84c;
  --gold-light: #e2c97e;
  --gold-pale:  #f5edd8;
  --cream:      #faf8f4;
  --white:      #ffffff;
  --text:       #1e2d3d;
  --text-muted: #6b7f8f;
  --border:     #ddd8ce;
  --shadow-sm:  0 2px 8px rgba(15,31,46,0.08);
  --shadow-md:  0 8px 32px rgba(15,31,46,0.12);
  --shadow-lg:  0 24px 64px rgba(15,31,46,0.16);
  --radius:     4px;
  --radius-lg:  8px;
  --transition: 0.25s ease;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', sans-serif;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ─── TYPOGRAPHY ─────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  color: var(--navy);
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.8rem, 3vw, 2.8rem); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }
p  { color: var(--text-muted); line-height: 1.8; }

a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }

/* ─── LAYOUT ─────────────────────────────────────────── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 2rem; }
.section    { padding: 6rem 0; }
.section-sm { padding: 3rem 0; }

/* ─── NAVBAR ─────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(15,31,46,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201,168,76,0.2);
  padding: 0 2rem;
  height: 70px;
  display: flex; align-items: center; justify-content: space-between;
}
.navbar-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--white) !important;
  letter-spacing: 0.02em;
}
.navbar-brand span { color: var(--gold); }
.navbar-links { display: flex; align-items: center; gap: 2rem; list-style: none; }
.navbar-links a {
  color: rgba(255,255,255,0.75);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color var(--transition);
}
.navbar-links a:hover, .navbar-links a.active { color: var(--gold); }
.navbar-cta {
  background: var(--gold);
  color: var(--navy) !important;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600 !important;
  transition: background var(--transition) !important;
}
.navbar-cta:hover { background: var(--gold-light) !important; color: var(--navy) !important; }

.navbar-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 5px; padding: 4px;
}
.navbar-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--white); border-radius: 2px;
  transition: var(--transition);
}

/* ─── HERO ───────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  background: var(--navy);
  display: flex; align-items: center;
  position: relative; overflow: hidden;
  padding-top: 70px;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 50%, rgba(201,168,76,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 80% at 10% 20%, rgba(201,168,76,0.05) 0%, transparent 60%);
}
.hero-grid {
  position: absolute; inset: 0; opacity: 0.04;
  background-image:
    linear-gradient(var(--gold) 1px, transparent 1px),
    linear-gradient(90deg, var(--gold) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-content {
  position: relative; z-index: 1;
  max-width: 700px;
  animation: fadeUp 0.9s ease both;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(201,168,76,0.3);
}
.hero h1 { color: var(--white); margin-bottom: 1.5rem; }
.hero h1 em { color: var(--gold); font-style: normal; }
.hero p { color: rgba(255,255,255,0.65); font-size: 1.125rem; max-width: 520px; margin-bottom: 2.5rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ─── BUTTONS ────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-family: var(--font-body); font-size: 0.875rem;
  font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  border-radius: var(--radius); border: none; cursor: pointer;
  transition: all var(--transition); text-decoration: none;
}
.btn-primary {
  background: var(--gold); color: var(--navy);
  box-shadow: 0 4px 16px rgba(201,168,76,0.3);
}
.btn-primary:hover {
  background: var(--gold-light); color: var(--navy);
  box-shadow: 0 6px 24px rgba(201,168,76,0.4);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.3);
}
.btn-outline:hover {
  border-color: var(--gold); color: var(--gold);
  background: rgba(201,168,76,0.05);
}
.btn-dark {
  background: var(--navy); color: var(--white);
}
.btn-dark:hover { background: var(--navy-mid); color: var(--white); }
.btn-sm { padding: 0.5rem 1.25rem; font-size: 0.8rem; }
.btn-block { width: 100%; justify-content: center; }

/* ─── SECTION HEADER ─────────────────────────────────── */
.section-header { margin-bottom: 3.5rem; }
.section-header.centered { text-align: center; }
.section-label {
  display: inline-block;
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1rem;
}
.section-header h2 { margin-bottom: 1rem; }
.section-header p { max-width: 540px; }
.section-header.centered p { margin: 0 auto; }
.divider {
  width: 48px; height: 2px;
  background: var(--gold);
  margin: 1.25rem 0;
}
.section-header.centered .divider { margin: 1.25rem auto; }

/* ─── CARDS ──────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-icon {
  width: 48px; height: 48px;
  background: var(--gold-pale);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.25rem;
}
.card h3 { margin-bottom: 0.75rem; font-size: 1.25rem; }

/* ─── GRID ───────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* ─── STATS BAR ──────────────────────────────────────── */
.stats-bar {
  background: var(--navy);
  padding: 3rem 0;
}
.stats-bar .grid-4 { align-items: center; }
.stat-item { text-align: center; padding: 1rem; }
.stat-number {
  font-family: var(--font-display);
  font-size: 2.5rem; color: var(--gold);
  display: block; line-height: 1;
  margin-bottom: 0.5rem;
}
.stat-label { font-size: 0.8rem; color: rgba(255,255,255,0.55); letter-spacing: 0.08em; text-transform: uppercase; }

/* ─── FORM ELEMENTS ──────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text); margin-bottom: 0.5rem;
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body); font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}
textarea.form-control { min-height: 130px; resize: vertical; }
.form-text { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.35rem; }

/* ─── ALERTS ─────────────────────────────────────────── */
.alert {
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem; margin-bottom: 1rem;
  border-left: 3px solid;
}
.alert-success { background: #f0faf4; color: #1a6b3c; border-color: #34a85a; }
.alert-danger   { background: #fdf0f0; color: #8b1a1a; border-color: #e05252; }
.alert-info     { background: #f0f6ff; color: #1a4480; border-color: #4a80d4; }
.alert-warning  { background: #fffbf0; color: #7a5c00; border-color: var(--gold); }

/* ─── PAGE HERO (inner pages) ────────────────────────── */
.page-hero {
  background: var(--navy);
  padding: 8rem 0 4rem;
  position: relative; overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.page-hero h1 { color: var(--white); margin-bottom: 0.75rem; }
.page-hero p  { color: rgba(255,255,255,0.6); font-size: 1.1rem; }

/* ─── FOOTER ─────────────────────────────────────────── */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.55);
  padding: 4rem 0 2rem;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-brand {
  font-family: var(--font-display);
  font-size: 1.4rem; color: var(--white);
  margin-bottom: 1rem; display: block;
}
.footer-brand span { color: var(--gold); }
.footer-desc { font-size: 0.9rem; line-height: 1.7; max-width: 280px; }
.footer h4 {
  color: var(--white); font-size: 0.75rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 1.25rem; font-family: var(--font-body); font-weight: 600;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.6rem; }
.footer-links a { color: rgba(255,255,255,0.55); font-size: 0.9rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 2rem;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.8rem;
}
.footer-bottom a { color: rgba(255,255,255,0.4); }
.footer-bottom a:hover { color: var(--gold); }

/* ─── AUTH PAGES ─────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
  position: relative;
}
.auth-page::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 40%, rgba(201,168,76,0.07) 0%, transparent 70%);
}
.auth-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 3rem;
  width: 100%; max-width: 440px;
  box-shadow: var(--shadow-lg);
  position: relative; z-index: 1;
}
.auth-logo {
  font-family: var(--font-display);
  font-size: 1.6rem; color: var(--navy);
  text-align: center; display: block;
  margin-bottom: 0.5rem;
}
.auth-logo span { color: var(--gold); }
.auth-subtitle { text-align: center; font-size: 0.875rem; margin-bottom: 2rem; }
.auth-card h2 { text-align: center; margin-bottom: 0.5rem; font-size: 1.6rem; }

/* ─── PORTAL / ADMIN LAYOUT ──────────────────────────── */
.portal-layout { display: flex; min-height: 100vh; padding-top: 0; }
.sidebar {
  width: 260px; min-height: 100vh;
  background: var(--navy);
  padding: 0;
  position: fixed; top: 0; left: 0;
  display: flex; flex-direction: column;
  z-index: 100;
}
.sidebar-brand {
  padding: 1.5rem 1.75rem;
  font-family: var(--font-display);
  font-size: 1.3rem; color: var(--white);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: block;
}
.sidebar-brand span { color: var(--gold); }
.sidebar-nav { padding: 1.5rem 0; flex: 1; }
.sidebar-label {
  font-size: 0.65rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  padding: 0 1.75rem; margin: 1rem 0 0.5rem;
}
.sidebar-link {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 1.75rem;
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem; font-weight: 400;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}
.sidebar-link:hover { color: var(--white); background: rgba(255,255,255,0.05); }
.sidebar-link.active { color: var(--gold); border-left-color: var(--gold); background: rgba(201,168,76,0.08); }
.sidebar-icon { font-size: 1rem; width: 18px; text-align: center; }
.sidebar-footer {
  padding: 1.5rem 1.75rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.sidebar-user { font-size: 0.8rem; color: rgba(255,255,255,0.5); margin-bottom: 0.75rem; }
.portal-main { margin-left: 260px; flex: 1; background: #f4f2ee; min-height: 100vh; }
.portal-header {
  background: var(--white);
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.portal-header h1 { font-size: 1.5rem; color: var(--navy); }
.portal-content { padding: 2rem; }

/* ─── BADGE ──────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 999px; font-size: 0.75rem; font-weight: 600;
}
.badge-success { background: #e8f5ee; color: #1a6b3c; }
.badge-warning { background: #fff8e6; color: #7a5c00; }
.badge-danger  { background: #fdf0f0; color: #8b1a1a; }
.badge-muted   { background: #f0f0f0; color: #666; }

/* ─── TABLE ──────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; padding: 0.75rem 1rem;
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
}
td { padding: 1rem; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(201,168,76,0.03); }

/* ─── ANIMATIONS ─────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.7s ease both; }
.fade-up-1 { animation-delay: 0.1s; }
.fade-up-2 { animation-delay: 0.2s; }
.fade-up-3 { animation-delay: 0.3s; }

/* ─── UTILITIES ──────────────────────────────────────── */
.text-gold   { color: var(--gold); }
.text-muted  { color: var(--text-muted); }
.text-center { text-align: center; }
.text-white  { color: var(--white); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* ─── RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .sidebar { transform: translateX(-100%); transition: transform var(--transition); }
  .sidebar.open { transform: translateX(0); }
  .portal-main { margin-left: 0; }
}
@media (max-width: 640px) {
  .navbar-links { display: none; flex-direction: column; position: absolute; top: 70px; left: 0; right: 0; background: var(--navy); padding: 1rem 2rem 2rem; gap: 1rem; border-bottom: 1px solid rgba(201,168,76,0.2); }
  .navbar-links.open { display: flex; }
  .navbar-toggle { display: flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-actions { flex-direction: column; }
  .auth-card { padding: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}
