:root {
  --dark:   #0d1117;
  --dark-2: #161b22;
  --dark-3: #1c2333;
  --blue:   #1a56db;
  --accent: #f59e0b;
  --light:  #f8fafc;
  --text:   #1e293b;
  --muted:  #64748b;
  --border: #e2e8f0;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; }
body {
  font-family: 'Manrope', -apple-system, sans-serif;
  color: var(--text); background: #fff; line-height: 1.6;
  padding-top: 68px;
  transition: padding-top .3s;
  overflow-x: hidden;
}
body.edit-mode { padding-top: 116px; }

/* ── Navbar ─────────────────────────────────────────────────────── */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,.96); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-nav .container { height: 68px; display: flex; align-items: center; }
.nav-brand { font-weight: 900; font-size: 1.05rem; color: var(--dark) !important; text-decoration: none; }
.nav-link { color: var(--muted) !important; font-weight: 500; font-size: .875rem; padding: 0 !important; }

.navbar-toggler-icon {
  display: inline-block; width: 24px; height: 24px;
  background-repeat: no-repeat; background-position: center; background-size: 100%;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2830%2C41%2C59%2C0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

@media (max-width: 991.98px) {
  #mainNav {
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    padding: 4px 16px 20px;
  }
  #mainNav .nav-link {
    display: block;
    padding: 12px 0 !important;
    font-size: 1rem !important;
    border-bottom: 1px solid var(--border);
  }
  #mainNav .btn-nav-cta {
    display: block;
    text-align: center;
    margin-top: 16px;
  }
}
.btn-nav-cta {
  background: var(--blue); color: #fff !important; border-radius: 8px;
  padding: 9px 22px; font-weight: 700; font-size: .85rem; text-decoration: none;
  white-space: nowrap;
}

/* ── Edit bar ───────────────────────────────────────────────────── */
.edit-bar {
  position: fixed; top: 68px; left: 0; right: 0; z-index: 999;
  height: 48px;
  background: linear-gradient(90deg, #d97706, var(--accent));
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; gap: 12px;
  transform: translateY(-100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.edit-bar.active { transform: translateY(0); }
.edit-bar-text { font-size: .82rem; font-weight: 700; color: #0d1117; }
.edit-bar-dot {
  width: 8px; height: 8px; background: #0d1117; border-radius: 50%;
  animation: pulse 1.4s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

/* ── Hero ───────────────────────────────────────────────────────── */
.hero {
  background: var(--dark);
  padding: 80px 0 64px;
  position: relative; overflow: hidden;
}
.hero-inner { position: relative; z-index: 1; width: 100%; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.3);
  color: var(--accent); border-radius: 100px; padding: 6px 16px;
  font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  margin-bottom: 28px;
}
.hero-badge::before { content: ''; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 900; color: #fff; line-height: 1.08; letter-spacing: -.02em; margin-bottom: 24px; }
.hero h1 .hi { color: var(--accent); }
.hero-desc { color: #8b949e; font-size: 1rem; max-width: 500px; margin-bottom: 40px; line-height: 1.75; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 56px; }
.btn-accent-solid { background: var(--accent); color: var(--dark); border: none; border-radius: 10px; padding: 13px 28px; font-weight: 800; font-size: .92rem; font-family: inherit; cursor: pointer; text-decoration: none; display: inline-block; }
.btn-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.22); border-radius: 10px; padding: 13px 28px; font-weight: 700; font-size: .92rem; font-family: inherit; cursor: pointer; text-decoration: none; display: inline-block; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 0; border-top: 1px solid rgba(255,255,255,.08); padding-top: 36px; }
.hstat { flex: 1 1 22%; padding-right: 28px; margin-right: 28px; border-right: 1px solid rgba(255,255,255,.08); }
.hstat:last-child { border-right: none; margin-right: 0; padding-right: 0; }
.hstat-num { font-size: 2rem; font-weight: 900; color: #fff; line-height: 1; margin-bottom: 6px; }
.hstat-num sup { color: var(--accent); font-size: 1rem; }
.hstat-lbl { color: #6e7681; font-size: .78rem; font-weight: 500; line-height: 1.4; }

/* ── Section commons ────────────────────────────────────────────── */
.py-sec { padding: 80px 0; }
.eyebrow { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); margin-bottom: 10px; }
.eyebrow.gold { color: var(--accent); }
.sec-title { font-size: clamp(1.65rem, 3vw, 2.3rem); font-weight: 900; line-height: 1.15; letter-spacing: -.02em; margin-bottom: 14px; }
.sec-title.on-dark { color: #fff; }
.sec-sub { color: var(--muted); font-size: .95rem; max-width: 560px; }
.sec-sub.on-dark { color: #8b949e; }

/* ── Analytics ──────────────────────────────────────────────────── */
.analytics-section { background: #fff; }
.acard { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 28px 24px; height: 100%; }
.acard-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.acard-icon { width: 40px; height: 40px; border-radius: 8px; background: rgba(26,86,219,.1); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.acard-title { font-size: .88rem; font-weight: 700; line-height: 1.3; }
.arow { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--light); }
.arow:last-child { border-bottom: none; padding-bottom: 0; }
.anum { font-size: clamp(1.3rem, 2.5vw, 1.75rem); font-weight: 900; color: var(--blue); line-height: 1; min-width: 64px; text-align: right; white-space: nowrap; flex-shrink: 0; }
.adesc { font-size: .8rem; color: var(--muted); line-height: 1.4; }

/* ── Finance (dark) ─────────────────────────────────────────────── */
.finance-section { background: var(--dark); }
.finance-section .container { position: relative; z-index: 1; }
.fcard { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09); border-radius: 14px; padding: 28px; height: 100%; }
.fcard-lbl { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #6e7681; margin-bottom: 14px; }
.fcard-big { font-size: clamp(1.8rem, 3.5vw, 2.4rem); font-weight: 900; color: #fff; line-height: 1; letter-spacing: -.02em; }
.fcard-meta { font-size: .78rem; color: #6e7681; margin-bottom: 18px; margin-top: 4px; }
.fcard-div { height: 1px; background: rgba(255,255,255,.07); margin-bottom: 16px; }
.fcard-cost { font-size: 1.1rem; font-weight: 700; color: var(--accent); }
.fcard-cost-lbl { font-size: .72rem; color: #6e7681; margin-top: 2px; }

/* ── Charts ─────────────────────────────────────────────────────── */
.charts-section { background: var(--light); }
.chart-full-wrap { }
.chart-card { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 32px 40px; height: 440px; display: flex; flex-direction: column; }
.chart-card canvas { flex: 1; min-height: 0; }

/* ── Edit sliders ───────────────────────────────────────────────── */
.edit-sliders {
  display: none;
  margin-top: 24px;
  background: var(--dark);
  border-radius: 14px;
  padding: 28px;
  animation: slideDown .35s ease;
}
body.edit-mode .edit-sliders { display: block; }
@keyframes slideDown { from{opacity:0;transform:translateY(-10px)} to{opacity:1;transform:translateY(0)} }

.sliders-grid { display: grid; grid-template-columns: 1fr; gap: 24px; max-width: 480px; }
.sliders-col-title { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #6e7681; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.07); }
.slider-row { margin-bottom: 16px; }
.slider-row:last-child { margin-bottom: 0; }
.slider-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.slider-lbl { font-size: .8rem; color: #c9d1d9; font-weight: 500; }
.slider-val { font-size: .82rem; font-weight: 700; color: var(--accent); }
.edit-range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px;
  background: rgba(255,255,255,.12); border-radius: 2px; outline: none; cursor: pointer;
}
.edit-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); cursor: pointer;
  box-shadow: 0 0 0 3px rgba(245,158,11,.25);
  transition: box-shadow .2s;
}
.edit-range::-webkit-slider-thumb:hover { box-shadow: 0 0 0 5px rgba(245,158,11,.35); }
.edit-range::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); cursor: pointer; border: none; }

/* ── Feedback ───────────────────────────────────────────────────── */
.feedback-section { background: var(--dark); }
.form-wrap { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 40px; box-shadow: 0 4px 24px rgba(0,0,0,.05); }
.f-label { display: block; font-size: .82rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.f-input { width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 10px; font-size: .93rem; font-family: inherit; color: var(--text); background: #fff; outline: none; transition: border-color .2s, box-shadow .2s; }
.f-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,86,219,.1); }
.btn-send { width: 100%; padding: 14px; background: var(--blue); color: #fff; border: none; border-radius: 10px; font-weight: 800; font-size: .95rem; font-family: inherit; cursor: pointer; }
.btn-send:disabled { opacity: .6; cursor: not-allowed; }
.side-stat { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 20px; margin-top: 20px; }
.side-stat-num { font-size: 1.8rem; font-weight: 900; color: var(--accent); line-height: 1; }
.side-stat-lbl { font-size: .78rem; color: #6e7681; margin-top: 4px; }

/* ── Contacts / Footer ──────────────────────────────────────────── */
.contacts-section { background: var(--dark-2); padding: 64px 0 0; }
.contact-block { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.contact-icon-wrap { width: 40px; height: 40px; border-radius: 8px; background: rgba(26,86,219,.18); display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.contact-lbl { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #6e7681; margin-bottom: 3px; }
.contact-val { color: #fff; font-weight: 600; font-size: .92rem; }
.footer-bar { border-top: 1px solid rgba(255,255,255,.06); margin-top: 48px; padding: 20px 0; text-align: center; color: #484f58; font-size: .82rem; }

/* ── Admin FAB ──────────────────────────────────────────────────── */
.admin-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 1050;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--dark-3); color: #8b949e;
  border: 1px solid rgba(255,255,255,.1);
  font-size: 1.1rem; box-shadow: 0 4px 16px rgba(0,0,0,.5);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
body.edit-mode .admin-fab {
  background: var(--accent); color: var(--dark);
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(245,158,11,.4);
}

/* ── FAB popup ──────────────────────────────────────────────────── */
.fab-popup {
  position: fixed; bottom: 82px; right: 24px; z-index: 1060;
  background: var(--dark-2); border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px; padding: 8px;
  min-width: 270px;
  box-shadow: 0 8px 40px rgba(0,0,0,.6);
  opacity: 0; transform: translateY(8px) scale(.97);
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.fab-popup.open { opacity: 1; transform: none; pointer-events: auto; }
.fab-popup-btn {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 13px 16px;
  background: transparent; border: none; border-radius: 10px;
  color: #c9d1d9; font-size: .88rem; font-weight: 600;
  font-family: inherit; cursor: pointer; text-align: left;
}
.fab-popup-btn.primary { color: var(--accent); }
.fab-popup-icon { font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; }
.fab-popup-divider { height: 1px; background: rgba(255,255,255,.07); margin: 4px 0; }
.fab-popup-save-time { font-size: .72rem; color: #6e7681; padding: 0 16px 8px; margin-top: -4px; }

/* ── Login Modal ────────────────────────────────────────────────── */
#loginModal .modal-dialog { max-width: 400px; }
#loginModal .modal-content {
  background: var(--dark-2);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px; overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.7);
}
.login-modal-body { padding: 36px; }
.login-brand {
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), #7e3af2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 900; color: #fff;
  margin: 0 auto 18px;
}
.login-title { font-size: 1.25rem; font-weight: 900; color: #fff; text-align: center; margin-bottom: 6px; }
.login-sub { font-size: .82rem; color: #6e7681; text-align: center; margin-bottom: 24px; line-height: 1.5; }
.login-input {
  width: 100%; padding: 13px 16px;
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(255,255,255,.12);
  border-radius: 10px; color: #fff; font-size: .95rem; font-family: inherit;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.login-input::placeholder { color: #6e7681; }
.login-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,86,219,.2); }
.login-error { font-size: .78rem; color: #f87171; min-height: 22px; margin-top: 6px; text-align: center; }
.login-submit {
  width: 100%; padding: 13px;
  background: var(--blue); color: #fff; border: none; border-radius: 10px;
  font-size: .92rem; font-weight: 800; font-family: inherit; cursor: pointer;
  margin-top: 8px;
}
.login-close-btn {
  position: absolute; top: 14px; right: 14px; z-index: 1;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,.08); border: none; color: #8b949e;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: .95rem;
}

/* ── Edit mode: editable elements ───────────────────────────────── */
body.edit-mode [data-editable] {
  border-radius: 6px;
  transition: outline .15s, background .15s;
  cursor: text;
}
body.edit-mode [data-editable]:hover {
  outline: 2px dashed rgba(26,86,219,.5);
  outline-offset: 3px;
}
body.edit-mode [data-editable][contenteditable="true"]:focus {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  background: rgba(26,86,219,.06);
}
body.edit-mode .anum[data-editable]:hover,
body.edit-mode .fcard-big[data-editable]:hover { background: rgba(26,86,219,.08); }

/* ── Mobile ─────────────────────────────────────────────────────── */
@media (max-width: 991px) {
  .hero { padding: 64px 0 48px; }
  .hero-stats { column-gap: 28px; }
  .hstat { flex: 0 0 calc(50% - 14px); margin-right: 0; padding-right: 0; margin-bottom: 16px; }
  .hstat:not(:last-child) { border-right: none; }
}
@media (max-width: 767px) {
  .py-sec { padding: 56px 0; }
  .hero h1 { font-size: 2rem; }
  .acard { padding: 20px 16px; }
  .fcard { padding: 22px; }
  .form-wrap { padding: 24px 18px; }
  .fab-popup { right: 12px; }
  .chart-card { height: 280px; padding: 20px 16px; }
  .sliders-grid { max-width: 100%; }
}
@media (max-width: 480px) {
  .hstat { flex: 0 0 100%; border-right: none; margin-right: 0; padding-right: 0; border-bottom: 1px solid rgba(255,255,255,.08); padding-bottom: 14px; margin-bottom: 14px; }
  .hero-btns { flex-direction: column; }
}
