/* Boniv Web — Warm Café Palette */
:root {
  --primary: #C67C4E;
  --primary-dark: #A0613A;
  --primary-light: #E8C4A8;
  --primary-bg: #FFF8F0;
  --white: #FFFFFF;
  --off-white: #FBF7F2;
  --cream: #F5EDE4;
  --light-gray: #EDE5DB;
  --gray: #B8ADA3;
  --dark-gray: #7A6F65;
  --charcoal: #3C3228;
  --black: #1A1612;
  --success: #5B9A6F;
  --warning: #D4A04E;
  --error: #C25B5B;
  --border: #E8DFD4;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(26,22,18,0.06);
  --shadow-md: 0 2px 8px rgba(26,22,18,0.08);
  --shadow-lg: 0 4px 16px rgba(26,22,18,0.1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--charcoal);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* Nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); padding: 16px 0;
}
.nav-inner { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 24px; font-weight: 700; color: var(--primary); text-decoration: none; letter-spacing: 0.5px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { text-decoration: none; color: var(--dark-gray); font-size: 14px; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--primary); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 28px; border-radius: var(--radius-md); font-size: 15px;
  font-weight: 600; text-decoration: none; transition: all 0.2s; cursor: pointer; border: none;
}
.btn-primary { background: var(--primary); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-sm { padding: 8px 20px; font-size: 13px; }
.btn-lg { padding: 16px 36px; font-size: 16px; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-ghost { background: transparent; color: var(--dark-gray); }
.btn-ghost:hover { color: var(--primary); }

.text-primary { color: var(--primary); }

/* Hero */
.hero {
  padding: 140px 0 80px; background: var(--primary-bg);
  text-align: center;
}
.hero-title { font-size: 52px; font-weight: 700; line-height: 1.15; letter-spacing: -1px; margin-bottom: 20px; }
.hero-subtitle { font-size: 18px; color: var(--dark-gray); max-width: 600px; margin: 0 auto 36px; line-height: 1.7; }
.hero-actions { display: flex; gap: 16px; justify-content: center; margin-bottom: 60px; }
.hero-stats { display: flex; justify-content: center; gap: 60px; }
.stat-item { text-align: center; }
.stat-num { display: block; font-size: 28px; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 13px; color: var(--gray); font-weight: 500; }

/* Sections */
.section { padding: 100px 0; }
.section-alt { background: var(--off-white); }
.section-title { font-size: 36px; font-weight: 700; text-align: center; margin-bottom: 12px; letter-spacing: -0.5px; }
.section-subtitle { font-size: 17px; color: var(--dark-gray); text-align: center; max-width: 560px; margin: 0 auto 48px; }

/* Features */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 32px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border); transition: all 0.2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-icon { font-size: 36px; margin-bottom: 16px; }
.feature-card h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--dark-gray); line-height: 1.6; }

/* Steps */
.steps { display: flex; gap: 40px; justify-content: center; }
.step { text-align: center; flex: 1; max-width: 280px; }
.step-num {
  width: 48px; height: 48px; border-radius: 50%; background: var(--primary);
  color: var(--white); font-size: 20px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--dark-gray); }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 960px; margin: 0 auto; }
.pricing-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 36px;
  border: 1px solid var(--border); text-align: center; position: relative;
}
.pricing-featured { border-color: var(--primary); box-shadow: var(--shadow-lg); transform: scale(1.04); }
.pricing-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: var(--white); font-size: 12px; font-weight: 600;
  padding: 4px 16px; border-radius: 20px;
}
.pricing-card h3 { font-size: 20px; margin-bottom: 8px; }
.price { font-size: 42px; font-weight: 700; color: var(--primary); margin-bottom: 24px; }
.price span { font-size: 16px; color: var(--gray); font-weight: 400; }
.pricing-card ul { list-style: none; margin-bottom: 28px; }
.pricing-card li { padding: 8px 0; font-size: 14px; color: var(--dark-gray); border-bottom: 1px solid var(--border); }
.pricing-card li:last-child { border-bottom: none; }

/* CTA */
.cta-section { text-align: center; padding: 40px 0; }

/* Footer */
.footer { background: var(--charcoal); color: var(--gray); padding: 60px 0 24px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.footer-brand .logo { color: var(--primary-light); }
.footer-brand p { margin-top: 8px; font-size: 14px; }
.footer-links { display: flex; gap: 60px; }
.footer-links h4 { color: var(--white); font-size: 14px; margin-bottom: 12px; }
.footer-links a { display: block; color: var(--gray); text-decoration: none; font-size: 13px; margin-bottom: 6px; }
.footer-links a:hover { color: var(--primary-light); }
.footer-copy { width: 100%; text-align: center; font-size: 12px; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); }

/* Portal shared */
.portal-page { min-height: 100vh; background: var(--primary-bg); display: flex; align-items: center; justify-content: center; padding: 24px; }
.portal-card { background: var(--white); border-radius: var(--radius-xl); padding: 48px; box-shadow: var(--shadow-lg); width: 100%; max-width: 440px; }
.portal-card .logo { display: block; text-align: center; font-size: 32px; margin-bottom: 8px; }
.portal-card .portal-subtitle { text-align: center; color: var(--dark-gray); font-size: 14px; margin-bottom: 32px; }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--dark-gray); margin-bottom: 4px; }
.form-input {
  width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-md);
  font-size: 15px; background: var(--off-white); color: var(--charcoal); outline: none; transition: border 0.2s;
}
.form-input:focus { border-color: var(--primary); }
.form-error { color: var(--error); font-size: 13px; margin-top: 4px; display: none; }
.form-link { font-size: 14px; color: var(--dark-gray); text-align: center; display: block; margin-top: 20px; }
.form-link a { color: var(--primary); font-weight: 600; text-decoration: none; }

/* Dashboard layout */
.dash-layout { display: flex; min-height: 100vh; }
.dash-sidebar {
  width: 240px; background: var(--charcoal); color: var(--white); padding: 24px 0;
  display: flex; flex-direction: column;
}
.dash-sidebar .logo { padding: 0 24px; margin-bottom: 32px; }
.dash-nav a {
  display: flex; align-items: center; gap: 12px; padding: 12px 24px;
  color: var(--gray); text-decoration: none; font-size: 14px; font-weight: 500; transition: all 0.2s;
}
.dash-nav a:hover, .dash-nav a.active { color: var(--white); background: rgba(198,124,78,0.15); }
.dash-nav a.active { border-left: 3px solid var(--primary); }
.dash-main { flex: 1; padding: 32px; background: var(--off-white); overflow-y: auto; }
.dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.dash-title { font-size: 24px; font-weight: 700; }
.dash-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; margin-bottom: 32px; }
.dash-stat {
  background: var(--white); border-radius: var(--radius-md); padding: 20px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.dash-stat-label { font-size: 13px; color: var(--gray); margin-bottom: 4px; }
.dash-stat-value { font-size: 28px; font-weight: 700; color: var(--charcoal); }
.dash-stat-sub { font-size: 12px; color: var(--success); margin-top: 4px; }
.dash-table {
  width: 100%; border-collapse: collapse; background: var(--white);
  border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.dash-table th { background: var(--cream); padding: 12px 16px; text-align: left; font-size: 12px; font-weight: 600; color: var(--dark-gray); text-transform: uppercase; letter-spacing: 0.5px; }
.dash-table td { padding: 12px 16px; font-size: 14px; border-top: 1px solid var(--border); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-success { background: #edf7f0; color: var(--success); }
.badge-warning { background: #fef6e7; color: var(--warning); }
.badge-error { background: #fbeded; color: var(--error); }
.badge-info { background: #e8f0fb; color: #3A6EA5; }
.badge-primary { background: #fdf0e7; color: var(--primary-dark); }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(26,22,18,0.5);
  z-index: 200; backdrop-filter: blur(2px);
}
.modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  z-index: 201; max-height: 90vh; overflow-y: auto;
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 17px; font-weight: 700; }
.modal-close {
  background: none; border: none; font-size: 18px; cursor: pointer;
  color: var(--gray); width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; transition: background 0.2s;
}
.modal-close:hover { background: var(--light-gray); color: var(--charcoal); }

/* Card section */
.dash-card-section {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 24px; box-shadow: var(--shadow-sm);
}

/* Table scroll wrapper */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Hamburger button — hidden on desktop */
.hamburger {
  display: none; background: none; border: none; cursor: pointer;
  padding: 8px; flex-direction: column; gap: 5px; z-index: 10;
}
.hamburger span {
  display: block; width: 24px; height: 2px; background: var(--charcoal);
  border-radius: 2px; transition: all 0.3s;
}

/* Sidebar backdrop — hidden by default */
.sidebar-backdrop {
  position: fixed; inset: 0; background: rgba(26,22,18,0.5);
  z-index: 299; opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.sidebar-backdrop.open { opacity: 1; pointer-events: auto; }

/* Responsive */
@media (max-width: 768px) {
  /* Landing page */
  .hero-title { font-size: 32px; }
  .features-grid, .pricing-grid { grid-template-columns: 1fr; }
  .steps { flex-direction: column; align-items: center; }
  .nav-links a:not(.btn) { display: none; }
  .hero-stats { gap: 32px; }
  .pricing-featured { transform: none; }

  /* Hamburger visible on mobile */
  .hamburger { display: flex; }

  /* Sidebar: slide-in overlay instead of display:none */
  .dash-sidebar {
    position: fixed; left: -260px; top: 0; bottom: 0;
    z-index: 300; transition: left 0.3s ease;
    width: 240px;
  }
  .dash-sidebar.open { left: 0; }

  /* Main area spacing */
  .dash-main { padding: 16px; }
  .dash-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .dash-title { font-size: 20px; }

  /* Stat cards */
  .dash-cards { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  /* Tables scroll horizontally */
  .dash-table { min-width: 600px; }

  /* Modal responsive */
  .modal { width: 95vw; max-width: none; left: 2.5vw; transform: translate(0, -50%); }

  /* Filter rows */
  .form-input { min-width: 0; }

  /* Prevent horizontal page scroll */
  html, body { overflow-x: hidden; }
  .dash-layout { overflow-x: hidden; }
  .dash-main { overflow-x: hidden; min-width: 0; }
  .table-wrap { max-width: 100%; }
}
