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

html, body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  background: #f4f4f4;
}

/* ── Navbar (mobile only) ── */
.navbar { display: none; }
.navbar-title { font-size: 17px; font-weight: 600; color: #1F2937; }

/* ── Layout ── */
.main-layout { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.sidebar {
  width: 250px; background: #2E2E2E;
  border-top-right-radius: 40px; border-bottom-right-radius: 40px;
  display: flex; flex-direction: column; flex-shrink: 0;
}
.side-nav {
  padding: 24px 16px; color: #fff;
  display: flex; flex-direction: column; gap: 12px;
  width: 100%; flex: 1; overflow: auto;
}
.side-title { font-size: 18px; font-weight: 600; opacity: .9; margin-bottom: 6px; }
.side-menu { list-style: none; display: grid; gap: 6px; margin: 0; padding: 0; }
.side-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; width: 100%; border-radius: 14px;
  color: rgba(255,255,255,.9); text-decoration: none;
  font-weight: 500; transition: background .2s ease;
}
.side-menu a:hover { background: #3a3a3a; }
.side-menu a.active { background: #1F6F79; color: #fff; box-shadow: 0 6px 18px rgba(31,111,121,.35); }
.side-menu a::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: transparent; transition: background .2s ease; flex-shrink: 0;
}
.side-menu a.active::before { background: #fff; }
.side-footer { margin-top: auto; padding: 16px; border-top: 1px solid rgba(255,255,255,.08); }
.logout-btn {
  width: 100%; padding: 10px 14px; border-radius: 12px;
  border: 1px solid #ef4444; background: transparent;
  color: #ef4444; font-size: 14px; font-weight: 500;
  font-family: 'Inter', sans-serif; cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.logout-btn:hover { background: #ef4444; color: #fff; }

/* ── Content ── */
.content {
  flex: 1; overflow-y: auto;
  padding: 40px; display: flex; flex-direction: column; gap: 24px;
}

/* ── Page header ── */
.page-header {
  display: flex; align-items: center; gap: 20px;
  margin-bottom: 8px;
}
.avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: #1F6F79; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700; flex-shrink: 0;
}
.page-title { font-size: 24px; font-weight: 700; color: #1a1a1a; }
.page-sub { font-size: 14px; color: #6b7280; margin-top: 2px; }

/* ── Cards ── */
.card {
  background: #fff; border-radius: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.card-header {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 24px 0;
}
.card-title { font-size: 16px; font-weight: 600; color: #1a1a1a; }
.card-sub { font-size: 13px; color: #6b7280; margin-left: auto; }
.card-body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 16px; }

/* ── Fields ── */
.field { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.field label { font-size: 13px; font-weight: 500; color: #374151; }
.field input {
  padding: 10px 14px; border: 1px solid #e5e7eb; border-radius: 10px;
  font-size: 14px; font-family: 'Inter', sans-serif; color: #1a1a1a;
  background: #fafafa; transition: border-color .15s ease, box-shadow .15s ease;
  outline: none;
}
.field input:focus { border-color: #1F6F79; box-shadow: 0 0 0 3px rgba(31,111,121,.12); background: #fff; }
.field-row { display: flex; gap: 16px; }
.unit-hint { font-size: 11px; color: #9ca3af; font-weight: 400; }

/* ── Buttons ── */
.card-actions { display: flex; align-items: center; gap: 16px; margin-top: 4px; flex-wrap: wrap; }
.btn-primary {
  padding: 10px 22px; background: #1F6F79; color: #fff;
  border: none; border-radius: 10px; font-size: 14px; font-weight: 600;
  font-family: 'Inter', sans-serif; cursor: pointer;
  transition: background .2s ease;
}
.btn-primary:hover { background: #185f68; }
.btn-primary:disabled { background: #9ca3af; cursor: not-allowed; }
.btn-outline {
  padding: 9px 20px; background: transparent; color: #1F6F79;
  border: 1px solid #1F6F79; border-radius: 10px;
  font-size: 14px; font-weight: 500; font-family: 'Inter', sans-serif;
  cursor: pointer; transition: background .2s ease;
  text-decoration: none; display: inline-flex; align-items: center;
}
.btn-outline:hover { background: #f0f9fa; }
.save-msg { font-size: 13px; font-weight: 500; }

/* ── Result cards ── */
.result-section { display: none; }
.result-section.visible { display: flex; flex-direction: column; gap: 24px; }
.result-grid { display: flex; gap: 20px; flex-wrap: wrap; }
.result-stat {
  flex: 1; min-width: 220px;
  background: #f7fbfc; border: 1px solid #d0eaed; border-radius: 16px;
  padding: 20px 24px;
}
.result-stat-label { font-size: 13px; font-weight: 600; color: #0F5A63; text-transform: uppercase; letter-spacing: .04em; }
.result-stat-price { font-size: 32px; font-weight: 700; color: #1a1a1a; margin-top: 6px; }
.result-stat-note { font-size: 13px; color: #6b7280; margin-top: 4px; }
.result-disclaimer { font-size: 13px; color: #6b7280; line-height: 1.6; }
.result-cta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* ── Sidebar overlay ── */
.sidebar-overlay { display: none; }

/* ── Mobile ── */
@media (max-width: 900px) {
  html, body { background: #f7f7f7; }

  .navbar {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px; padding: 10px 14px;
    position: sticky; top: 0; z-index: 1000;
    background: rgba(255,255,255,.92);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid #e5e7eb;
  }
  .navbar-title { display: flex; align-items: center; font-size: 17px; font-weight: 600; }

  .dash-toggle {
    display: inline-grid; width: 38px; height: 38px; place-items: center;
    border: 1px solid #e5e7eb; border-radius: 10px; background: #fff;
  }
  .dash-toggle img { width: 22px; height: 22px; display: block; }

  .main-layout { display: block; min-height: auto; }

  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 1100;
    width: min(84vw, 320px); border-radius: 0 20px 20px 0;
    transform: translateX(-100%); transition: transform .25s ease;
    box-shadow: 8px 0 24px rgba(0,0,0,.12);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay {
    position: fixed; inset: 0; z-index: 1090;
    display: none; background: rgba(0,0,0,.38);
  }
  .sidebar-overlay.show { display: block; }

  .content { padding: 16px; gap: 16px; }

  .page-header { gap: 14px; }
  .avatar { width: 52px; height: 52px; font-size: 20px; }
  .page-title { font-size: 20px; }

  .card { border-radius: 16px; }
  .card-header { padding: 16px 16px 0; }
  .card-body { padding: 16px; gap: 14px; }

  .field-row { flex-direction: column; gap: 14px; }

  .result-grid { flex-direction: column; }
}
