/* =========================
   COLOR VARIABLES
========================= */
:root {
  --primary: #0d9488;
  --primary-hover: #0f766e;
  --secondary: #4f46e5;
  --bg-main: #f9fafb;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-light: #e5e7eb;
}

/* =========================
   GLOBAL
========================= */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.65;
}

a {
  color: var(--secondary);
}

a:hover {
  color: #3730a3;
}

h1,
h2,
h3 {
  font-weight: 800;
}

/* =========================
   NAVBAR
========================= */
.navbar {
  background: #ffffff !important;
}

.navbar-brand {
  color: var(--primary) !important;
  font-weight: 800;
}

.nav-link {
  color: var(--text-main) !important;
}

.nav-link:hover {
  color: var(--primary) !important;
}

/* =========================
   HERO
========================= */
.hero {
  background: linear-gradient(145deg, #ecfeff, #f9fafb);
  padding: 4rem 1rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.4rem;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.15rem;
}

.hero .btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
}

.hero .btn-primary:hover {
  background-color: var(--primary-hover);
}

/* =========================
   SEO CONTENT (HIDDEN BUT CRAWLABLE)
========================= */
.seo-content {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}


/* =========================
   BUTTONS
========================= */
.btn-outline-secondary {
  border-color: var(--secondary);
  color: var(--secondary);
}

.btn-outline-secondary:hover {
  background-color: var(--secondary);
  color: #ffffff;
}

/* =========================
   CARDS
========================= */
.card {
  background-color: var(--bg-card);
  border-radius: 0.9rem;
  border: 1px solid var(--border-light);
}

.card-title {
  font-size: 1.05rem;
}

.card-text {
  color: var(--text-muted);
}

/* =========================
   CATEGORY BOX
========================= */
.category-box {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 1rem;
  padding: 1.2rem;
  font-weight: 600;
  text-align: center;
}

/* =========================
   AD BOX
========================= */
.ad-box {
  background: #ffffff;
  border: 1px dashed var(--border-light);
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
}

/* =========================
   EMAIL SECTION
========================= */
.email-box {
  background: linear-gradient(145deg, #ecfeff, #ffffff);
  border-radius: 1.2rem;
  padding: 3.5rem 1rem;
}

.email-box h3 {
  color: var(--text-main);
}

/* =========================
   FOOTER
========================= */
footer {
  background-color: #020617;
}

footer a {
  color: #e5e7eb;
}

footer a:hover {
  color: #ffffff;
}

/* =========================
   RELATED CALCULATORS
========================= */
.related-calculators {
  border-top: 1px solid var(--border-light);
  padding-top: 2rem;
}

.related-calculators h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.related-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 0.75rem;
  font-weight: 600;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.related-card:hover {
  border-color: var(--primary);
  background: #ecfeff;
  text-decoration: none;
}

/* =========================
   PREMIUM CALCULATOR UI
========================= */

/* Hero strip */
.calc-hero {
  background: linear-gradient(135deg, #0d9488, #4f46e5);
  color: #ffffff;
  padding: 3.5rem 1rem;
}

.calc-hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
}

.calc-hero p {
  font-size: 1.1rem;
  opacity: 0.95;
}

/* Panels */
.calc-panel {
  background: #ffffff;
  border-radius: 1.25rem;
  padding: 1.75rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.panel-title {
  font-weight: 700;
  margin-bottom: 1.25rem;
}

/* City toggle */
.city-toggle {
  display: flex;
  gap: 1rem;
}

.city-toggle label {
  flex: 1;
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.6rem;
  text-align: center;
  cursor: pointer;
}

.city-toggle input {
  display: none;
}

.city-toggle input:checked+span {
  font-weight: 700;
  color: #0d9488;
}

/* Result */
.result-panel {
  background: linear-gradient(145deg, #ecfeff, #ffffff);
}

.result-box {
  display: flex;
  justify-content: space-between;
  padding: 1rem 0;
  font-size: 1.2rem;
}

.result-box strong {
  font-size: 1.4rem;
}

.tax-red {
  color: #dc2626;
}

.confidence-note {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #065f46;
}

/* Explanation */
.explain-list li {
  margin-bottom: 0.6rem;
}

/* =========================
   LAYOUT UI (USING EXISTING COLORS)
========================= */

body {
  background-color: var(--bg-main);
  color: var(--text-main);
}

/* ---------- HEADER ---------- */
.site-header {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
}

.navbar-brand {
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--primary);
}

.navbar-brand:hover {
  color: var(--primary-hover);
}

.nav-link {
  font-weight: 600;
  color: var(--text-main);
}

.nav-link:hover {
  color: var(--primary);
}

/* ---------- PAGE WRAPPER ---------- */
.page-wrapper {
  padding: 2.5rem 0;
}

/* ---------- BREADCRUMBS ---------- */
.breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 1.75rem;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--text-muted);
}

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

/* ---------- FOOTER ---------- */
.site-footer {
  margin-top: 4rem;
  padding: 2.5rem 0;
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-light);
}

.footer-brand {
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.footer-text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------- CONTAINER REFINEMENTS ---------- */
.container-xl {
  max-width: 1140px;
}

/* ---------- MOBILE POLISH ---------- */
@media (max-width: 768px) {
  .page-wrapper {
    padding: 1.5rem 0;
  }

  .navbar-brand {
    font-size: 1.15rem;
  }
}

/* =========================
   GLOBAL HERO STRIP
========================= */

.hero-strip {
  background: linear-gradient(135deg,
      var(--primary),
      var(--secondary));
  color: #ffffff;
  padding: 3.5rem 1rem;
  margin-bottom: 2.5rem;
}

.hero-strip h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.hero-strip p {
  font-size: 1.1rem;
  max-width: 820px;
  margin: 0 auto;
  opacity: 0.95;
}

/* Mobile polish */
@media (max-width: 768px) {
  .hero-strip {
    padding: 2.5rem 1rem;
  }

  .hero-strip h1 {
    font-size: 1.8rem;
  }

  .hero-strip p {
    font-size: 1rem;
  }
}

/* =========================
   GLOBAL AD PLACEMENT STYLES
========================= */

.ad-container {
  margin: 1.75rem 0;
}

.ad-hero {
  margin-top: 1.25rem;
}

/* Placeholder style (remove after AdSense) */
.ad-placeholder {
  background: #ffffff;
  border: 1px dashed var(--border-light);
  color: var(--text-muted);
  text-align: center;
  padding: 1.2rem;
  font-size: 0.9rem;
}

/* Mobile spacing */
@media (max-width: 768px) {
  .ad-container {
    margin: 1.25rem 0;
  }
}

/* =========================
   MOBILE-ONLY STICKY AD
========================= */

.mobile-sticky-ad {
  display: none;
}

/* Mobile only */
@media (max-width: 768px) {
  .mobile-sticky-ad {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg-card);
    border-top: 1px solid var(--border-light);
    z-index: 1050;
    padding: 0.5rem 0.75rem 0.75rem;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
  }

  .mobile-sticky-ad .ad-placeholder {
    text-align: center;
    padding: 0.75rem;
    border: 1px dashed var(--border-light);
    font-size: 0.85rem;
    color: var(--text-muted);
  }

  .sticky-close {
    position: absolute;
    top: 4px;
    right: 6px;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--text-muted);
    cursor: pointer;
  }

  /* Prevent content overlap */
  body {
    padding-bottom: 90px;
  }
}

/* =========================
   TENURE TOGGLE
========================= */

.tenure-toggle {
  border: 2px solid var(--border-light);
  border-radius: 0.6rem;
  padding: 0.4rem 1rem;
  cursor: pointer;
  font-weight: 600;
}

.tenure-toggle input {
  display: none;
}

.tenure-toggle span {
  color: var(--text-muted);
}

.tenure-toggle input:checked+span {
  color: var(--primary);
}

#emiPieChart {
  max-width: 320px;
  margin: 0 auto;
}

.result-panel canvas {
  max-width: 320px;
  margin: 0 auto;
  display: block;
}

#oldRegimeFields {
  display: none;
}

#taxSavings {
  font-size: 1.05rem;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.2s ease;
}

.category-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.category-card h5 {
  margin-bottom: 8px;
}

.calc-list-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 16px;
  height: 100%;
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.2s ease;
}

.calc-list-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.calc-list-card:hover {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
  text-decoration: none;
}


.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 18px;
}

.guide-card h5 {
  margin-bottom: 12px;
}

.guide-card a {
  color: var(--primary);
  text-decoration: none;
}

.guide-card a:hover {
  text-decoration: underline;
}

canvas {
  max-width: 100%;
}

.navbar-brand img {
  height: 32px;
  width: auto;
}

@media (max-width: 576px) {
  .navbar-brand img {
    height: 28px;
  }
}

.bmi-scale {
  position: relative;
}

.bmi-bar {
  display: flex;
  height: 14px;
  border-radius: 8px;
  overflow: hidden;
}

.bmi-range {
  flex: 1;
  font-size: 0.65rem;
  text-align: center;
  color: #fff;
  line-height: 14px;
}

.bmi-range.underweight {
  background: #38bdf8;
}

.bmi-range.normal {
  background: #22c55e;
}

.bmi-range.overweight {
  background: #facc15;
  color: #000;
}

.bmi-range.obese {
  background: #ef4444;
}

.bmi-indicator {
  position: absolute;
  top: -6px;
  width: 3px;
  height: 26px;
  background: #000;
  transition: left 0.3s ease;
}

.bmi-range {
  opacity: 0.45;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.bmi-range.active {
  opacity: 1;
  font-weight: 600;
  transform: scaleY(1.3);
}

.ideal-weight {
  padding: 10px 14px;
  background: #f9fafb;
  border-left: 4px solid var(--primary);
  border-radius: 6px;
}


/* =========================
   CALCULATOR RESULT STYLES
========================= */

.calc-panel {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 24px;
  border: 1px solid var(--border-light);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.panel-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-main);
}

/* RESULT BOX (shared across calculators) */
.result-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  background: #f8fafc;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
}

.result-box div {
  display: flex;
  flex-direction: column;
}

.result-box span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.result-box strong {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 4px;
}

/* Full-width result row (like Total Days, Next Birthday) */
.result-row {
  background: #f8fafc;
  padding: 14px 16px;
  border-radius: 8px;
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.result-row span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.result-row strong {
  font-size: 1rem;
  font-weight: 600;
}

/* Confirmation note */
.confidence-note {
  margin-top: 12px;
  font-size: 0.85rem;
  color: #16a34a;
}

footer a:hover {
  text-decoration: underline;
  opacity: 0.9;
}

/* =========================
   COOKIE CONSENT BANNER
========================= */
.cookie-banner {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
  padding: 1rem 0;
  z-index: 9999;
}

.cookie-text {
  max-width: 700px;
}

.cookie-banner p {
  font-size: 0.85rem;
}

@media (max-width: 576px) {
  .cookie-actions {
    width: 100%;
    display: flex;
    justify-content: flex-end;
  }
}

/* =========================
   JSON TREE COLORS
========================= */

#jsonTree {
  font-size: 0.9rem;
  line-height: 1.6;
}

#jsonTree div:hover {
  background: #f8fafc;
}

.json-key {
  color: #d97706;
  /* amber */
  font-weight: 600;
}

.json-string {
  color: #16a34a;
  /* green */
}

.json-number {
  color: #2563eb;
  /* blue */
}

.json-boolean {
  color: #7c3aed;
  /* purple */
}

.json-null {
  color: #6b7280;
  /* gray */
  font-style: italic;
}

.json-toggle {
  color: #0d9488;
  /* primary */
  font-weight: 700;
}

.json-children {
  border-left: 1px dashed #e5e7eb;
  margin-left: 8px;
  padding-left: 8px;
}

/* =========================
   JSON TREE LINE NUMBERS
========================= */

#jsonTree {
  position: relative;
}

.json-line {
  display: grid;
  grid-template-columns: 42px auto;
  align-items: start;
}

.json-line-number {
  text-align: right;
  padding-right: 10px;
  user-select: none;
  color: #9ca3af;
  /* muted gray */
  font-size: 0.75rem;
}

.json-line-content {
  white-space: nowrap;
}

.alert-warning {
  position: sticky;
  top: 0;
  z-index: 1000;
}


.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 28px;
}

.app-tile {
  text-decoration: none;
  color: inherit;
  text-align: center;
  padding: 16px;
  border-radius: 16px;
  transition: all 0.2s ease;
}

.app-tile:hover {
  background: #f5f5f7;
  transform: translateY(-4px);
}

.app-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 10px auto;
}

.app-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.app-title {
  font-size: 14px;
  font-weight: 500;
}

.dashboard-shell {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */

.dashboard-header {
  height: 60px;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: white;
}

.logo {
  font-weight: 600;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Workspace */

.dashboard-workspace {
  flex: 1;
  overflow: hidden;
}

/* App iframe */

.app-frame {
  width: 100%;
  height: 100%;
  border: none;
  /* background: white; */
}

/* App launcher */

.app-launcher {
  display: grid;
  grid-template-columns: repeat(auto-fill, 120px);
  gap: 32px;
  padding: 40px;
}

/* App tile */

.app-tile {
  text-align: center;
  text-decoration: none;
  color: inherit;
}

.app-icon {
  width: 64px;
  height: 64px;
}

.app-name {
  margin-top: 8px;
  font-size: 14px;
}

.app-launcher {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.app-tile {
  display: block;
  text-decoration: none;
  border-radius: 14px;
  overflow: hidden;
  background: white;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  transition: transform .15s ease, box-shadow .15s ease;
}

.app-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.app-banner {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.app-tile-footer {
  padding: 12px 16px;
  font-weight: 500;
}

.app-header {
  height: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid #eee;
  background: white;
}

.running-app-icon {
  width: 24px;
  height: 24px;
}

.fullscreen-btn {

  border: 1px solid #ddd;
  background: white;

  padding: 6px 12px;

  border-radius: 6px;

  cursor: pointer;

  font-size: 13px;

}