/* ═══════════════════════════════════════════════════════════════════════════
   Consillar — Premium Design System v2
   Linear · Vercel · Stripe quality SaaS aesthetic
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1. Design Tokens ─────────────────────────────────────────────────────── */
:root {
  /* Brand */
  --ctm-primary:        #16a34a;
  --ctm-primary-hover:  #15803d;
  --ctm-primary-dark:   #0f6830;
  --ctm-primary-dim:    #dcfce7;
  --ctm-primary-subtle: #f0fdf4;

  /* Neutrals */
  --ctm-bg:          #f8f9f8;
  --ctm-surface:     #ffffff;
  --ctm-surface-2:   #f4f5f4;
  --ctm-border:      #e4e7e4;
  --ctm-border-2:    #ededeb;

  /* Text */
  --ctm-text:         #111814;
  --ctm-text-2:       #3d4a3d;
  --ctm-text-muted:   #6a786a;
  --ctm-text-subtle:  #9baa9b;

  /* Shadows */
  --ctm-shadow-xs: 0 1px 2px rgba(0,0,0,.04);
  --ctm-shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.04);
  --ctm-shadow:    0 2px 6px rgba(0,0,0,.06), 0 6px 20px rgba(0,0,0,.06);
  --ctm-shadow-md: 0 4px 12px rgba(0,0,0,.07), 0 12px 32px rgba(0,0,0,.07);
  --ctm-shadow-lg: 0 8px 24px rgba(0,0,0,.09), 0 24px 56px rgba(0,0,0,.09);

  /* Radii */
  --ctm-r-xs: 4px;
  --ctm-r-sm: 6px;
  --ctm-r:    10px;
  --ctm-r-md: 14px;
  --ctm-r-lg: 18px;
  --ctm-r-xl: 24px;

  /* Motion */
  --ctm-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ctm-t:    0.18s;
  --ctm-t-md: 0.26s;

  /* Layout */
  --ctm-header-h: 64px;
}


/* ── 2. Base Reset & Typography ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body, html {
  font-family: 'Inter', 'system-ui', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  color: var(--ctm-text);
  background-color: var(--ctm-bg);
  font-size: 16px;
  line-height: 1.6;
}

* { outline: none; }

/* Type Scale */
h1 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
h2 { font-size: clamp(1.2rem, 2.5vw, 1.625rem); font-weight: 600; line-height: 1.25; letter-spacing: -0.02em; }
h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.35; letter-spacing: -0.015em; }
h4 { font-size: 0.9375rem; font-weight: 600; line-height: 1.4; letter-spacing: -0.01em; }
h5, h6 { font-weight: 600; }

h1, h2, h3, h4, h5, h6 { color: var(--ctm-text); margin-bottom: 0.5em; }
p { color: var(--ctm-text-2); }

a {
  color: var(--ctm-primary);
  text-decoration: none;
  transition: color var(--ctm-t) var(--ctm-ease);
}
a:hover, a:focus { color: var(--ctm-primary-dark); }

table { width: 100%; }


/* ── 3. Header & Navigation ───────────────────────────────────────────────── */
header {
  z-index: 200;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  height: var(--ctm-header-h);
  position: fixed;
  width: 100%;
  border-bottom: 1px solid var(--ctm-border-2);
  box-shadow: 0 1px 0 rgba(0,0,0,.02), 0 2px 16px rgba(0,0,0,.04);
}

header .navbar { padding: 0; }
header .navbar .container { padding-left: 0; padding-right: 0; position: relative; }

.top-container { padding-top: calc(var(--ctm-header-h) + 32px); }


/* Brand */
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  margin-right: 24px;
  text-decoration: none !important;
}

.navbar-brand-item {
  height: 45px;
  width: auto;
  flex-shrink: 0;
}

.navbar-brand-name {
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ctm-text);
  line-height: 1;
  white-space: nowrap;
}
.navbar-brand-name em {
  font-style: normal;
  color: var(--ctm-primary);
}

/* Nav Items */
header .nav-item {
  height: var(--ctm-header-h);
  line-height: var(--ctm-header-h);
}
header .nav-item .dropdown-menu {
  line-height: initial;
  padding: 0.5rem;
}

header .navbar-expand .navbar-nav .nav-link {
  padding: 0 14px;
  color: var(--ctm-text-2);
  font-weight: 500;
  font-size: 0.875rem;
  position: relative;
  transition: color var(--ctm-t) var(--ctm-ease);
  letter-spacing: -0.01em;
}

header .navbar-expand .navbar-nav .nav-link:hover,
header .navbar-expand .navbar-nav .nav-link:focus {
  color: var(--ctm-primary);
}

/* Subtle underline on hover */
header .navbar-expand .navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  bottom: 16px;
  left: 14px;
  right: 14px;
  height: 2px;
  background-color: var(--ctm-primary);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform var(--ctm-t) var(--ctm-ease);
  transform-origin: center;
}
header .navbar-expand .navbar-nav .nav-link:hover::after { transform: scaleX(1); }

/* Dropdown */
.dropdown-menu {
  border: 1px solid var(--ctm-border);
  border-radius: var(--ctm-r-md);
  box-shadow: var(--ctm-shadow-md);
  padding: 0.5rem;
  min-width: 210px;
  background: var(--ctm-surface);
  animation: dropdownIn var(--ctm-t-md) var(--ctm-ease);
}

@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.dropdown-item {
  display: block;
  padding: 0.475rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ctm-text-2);
  border-radius: var(--ctm-r-sm);
  transition: background var(--ctm-t) var(--ctm-ease), color var(--ctm-t) var(--ctm-ease);
  text-decoration: none;
  background: none;
  font-family: inherit;
}
.dropdown-item:hover { background: var(--ctm-primary-subtle); color: var(--ctm-primary-dark); }
.dropdown-divider { border-color: var(--ctm-border-2); margin: 0.35rem 0; }
.dropdown-fullwidth .dropdown-menu { margin: 0 auto; top: 60px; left: 0; right: 0; width: 220px; }

/* Search form */
header .navbar form {
  width: 380px;
  justify-content: flex-end;
  margin-right: 0;
}

input[name="q"] {
  padding: 0 16px;
  height: 38px;
  border: 1.5px solid var(--ctm-border);
  border-right: none;
  border-top-left-radius: var(--ctm-r);
  border-bottom-left-radius: var(--ctm-r);
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  font-size: 0.875rem;
  color: var(--ctm-text);
  background: var(--ctm-surface-2);
  transition: border-color var(--ctm-t) var(--ctm-ease), background var(--ctm-t) var(--ctm-ease), box-shadow var(--ctm-t) var(--ctm-ease);
  font-family: inherit;
}
input[name="q"]:focus {
  border-color: var(--ctm-primary);
  background: var(--ctm-surface);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}
input[name="q"]::placeholder { color: var(--ctm-text-subtle); }

header .navbar form .btn {
  height: 38px;
  padding: 0 16px;
  font-size: 0.875rem;
  font-weight: 600;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: var(--ctm-r);
  border-bottom-right-radius: var(--ctm-r);
  border: 1.5px solid var(--ctm-primary-hover);
  background: var(--ctm-primary);
  color: #fff;
  margin: 0;
  transition: background var(--ctm-t) var(--ctm-ease);
  letter-spacing: -0.01em;
}
header .navbar form .btn:hover { background: var(--ctm-primary-hover); }


/* ── 4. Buttons ───────────────────────────────────────────────────────────── */
.btn {
  font-family: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: -0.01em;
  border-radius: var(--ctm-r);
  transition:
    background var(--ctm-t) var(--ctm-ease),
    border-color var(--ctm-t) var(--ctm-ease),
    box-shadow var(--ctm-t) var(--ctm-ease),
    transform 0.1s var(--ctm-ease),
    color var(--ctm-t) var(--ctm-ease);
}
.btn:active { transform: translateY(1px); }

.btn-success {
  background: var(--ctm-primary);
  border-color: var(--ctm-primary);
  color: #fff;
  box-shadow: 0 1px 3px rgba(22,163,74,.25), 0 2px 8px rgba(22,163,74,.12);
}
.btn-success:hover, .btn-success:focus {
  background: var(--ctm-primary-hover);
  border-color: var(--ctm-primary-hover);
  color: #fff;
  box-shadow: 0 2px 8px rgba(22,163,74,.3), 0 4px 16px rgba(22,163,74,.15);
}

.btn-outline-success {
  border-color: var(--ctm-border);
  color: var(--ctm-primary);
  background: transparent;
}
.btn-outline-success:hover {
  background: var(--ctm-primary-subtle);
  border-color: var(--ctm-primary);
  color: var(--ctm-primary-dark);
}

.btn-link {
  background: linear-gradient(to right, currentColor 0%, currentColor 100%);
  background-size: 0px 2px;
  background-repeat: no-repeat;
  background-position: left 100%;
  transition: background-size var(--ctm-t) var(--ctm-ease);
  font-weight: inherit;
  padding: 0;
  text-decoration: none;
  color: inherit;
  border: none;
}
.btn-link:hover { background-size: 100% 2px; color: inherit; }

.btn-light {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  backdrop-filter: blur(8px);
}
.btn-light:hover { background: rgba(255,255,255,0.22); border-color: rgba(255,255,255,0.4); color: #fff; }

.btn-close { transition: opacity var(--ctm-t) var(--ctm-ease); }


/* ── 5. Form Controls ─────────────────────────────────────────────────────── */
.form-control {
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--ctm-text);
  border: 1.5px solid var(--ctm-border);
  border-radius: var(--ctm-r);
  background: var(--ctm-surface);
  padding: 0.5rem 0.875rem;
  transition: border-color var(--ctm-t) var(--ctm-ease), box-shadow var(--ctm-t) var(--ctm-ease);
}
.form-control:focus {
  border-color: var(--ctm-primary);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
  color: var(--ctm-text);
  background: var(--ctm-surface);
}
.form-control::placeholder { color: var(--ctm-text-subtle); }

.input-group-text {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ctm-text-muted);
  border: 1.5px solid var(--ctm-border);
  background: var(--ctm-surface-2);
  font-family: inherit;
}

.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ctm-text-2);
  letter-spacing: -0.01em;
}

.form-select {
  font-family: inherit;
  font-size: 0.9rem;
  border: 1.5px solid var(--ctm-border);
  border-radius: var(--ctm-r);
  color: var(--ctm-text);
}


/* ── 6. Cards ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--ctm-surface);
  border: none;
  border-radius: var(--ctm-r-md);
  box-shadow: var(--ctm-shadow-sm);
  transition:
    box-shadow var(--ctm-t-md) var(--ctm-ease),
    transform var(--ctm-t-md) var(--ctm-ease);
  height: 100%;
  overflow: hidden;
}
.card:hover { box-shadow: var(--ctm-shadow-md); transform: translateY(-2px); }
.card a { text-decoration: none; }
.card a:hover { color: inherit !important; }
.card.auto-height { height: auto; }

/* Background image cards */
.card.card-with-background {
  background-position: center;
  background-size: cover;
  height: 560px;
  border-radius: var(--ctm-r-md);
}
.card.card-with-background.default-image {
  background-size: 40%;
  background-repeat: no-repeat;
  background-position: center;
}
.card.card-with-background.card-grid-sm { height: calc(280px - var(--bs-gutter-y) / 2); }
.col-md-3 .card.card-with-background  { height: 260px; }
.col-md-2 .card.card-with-background  { height: 160px; }
.col-md-2 > .card                     { margin-bottom: 2em; }
.col-md-2 .card h4                    { font-size: 0.875rem; }
.col-12.small .card.card-with-background { height: 160px; }
.col-md-6 .card.card-with-background  { height: calc(280px - calc(var(--bs-gutter-y) / 2)); }

.col-md-6 .card h1,
.blog-grid .card h1 {
  font-size: calc(0.75rem + 0.75vw);
  text-shadow: 0 1px 6px rgba(0,0,0,.55);
  font-weight: 700;
}
.col-md-6 .card p.text-white { display: none; }

/* Card overlay gradient */
.card-img-overlay {
  padding: 0;
}
.card-img-overlay::before {
  content: "";
  position: absolute;
  height: 58%;
  width: 100%;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0) 100%);
  z-index: 1;
  border-bottom-left-radius: var(--ctm-r-md);
  border-bottom-right-radius: var(--ctm-r-md);
  pointer-events: none;
}
.position-relative .card-img-overlay::before {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.card-body { padding: 1rem 1.125rem; }
.card-body.card-body-centered {justify-content: center; align-items: center;display: flex;}
.card-title { font-size: 0.9375rem; font-weight: 600; line-height: 1.4; letter-spacing: -0.01em; margin-bottom: 0.3rem; }

/* Text holder inside bg-image cards */
.text-holder { padding: 0 1rem 1.125rem; position: relative; z-index: 2; }


/* ── 7. Card Figures (recipe/blog images) ─────────────────────────────────── */
.recipe-figure { width: 100%; position: relative; border-radius: var(--ctm-r-md); overflow: hidden; }
.blog-figure { margin: 16px; width: 85%; position: relative; }
.recipe-figure img, .blog-figure img, .rich-text img { width: 100%; height: auto; display: block; }

.recipe-figure::before, .blog-figure::before {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 80px rgba(0,0,0,.18);
  border-radius: var(--ctm-r-md);
  z-index: 1;
  pointer-events: none;
}
.recipe-figure.no-image::before { box-shadow: inset 0 0 60px rgba(0,0,0,.06); }


/* ── 8. Badges ────────────────────────────────────────────────────────────── */
.badge {
  z-index: 4;
  position: relative;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3em 0.65em;
  border-radius: var(--ctm-r-xs);
  text-decoration: none;
}
a.badge:hover { text-decoration: none; opacity: 0.88; }

.tags_holder { padding: 0.35rem 1rem; display: flex; flex-wrap: wrap; gap: 0.35rem; }


/* ── 9. Recipe Page ───────────────────────────────────────────────────────── */
.text-intro {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ctm-text-2);
}
.rich-text {
  line-height: 1.75;
  font-size: 1.0625rem;
  font-weight: 400;
  color: var(--ctm-text-2);
}
.rich-text h3 { margin-bottom: 0.25em; }

.recipie-step,
.recipie-ingredient {
  font-size: 1rem;
  padding: 0.875rem 1rem;
  border: 0;
  border-bottom: 1px solid var(--ctm-border-2);
  line-height: 1.65;
  color: var(--ctm-text-2);
  transition: background var(--ctm-t) var(--ctm-ease);
  border-radius: 0;
}
.recipie-step:hover,
.recipie-ingredient:hover {
  background: var(--ctm-surface-2);
}
.recipie-step:last-child,
.recipie-ingredient:last-child { border-bottom: 0; }


/* ── 10. Nutrition Table ──────────────────────────────────────────────────── */
.tableinfo {
  margin: 20px auto;
  width: 90%;
  font-size: 1rem;
  font-weight: 400;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--ctm-r-md);
  overflow: hidden;
  box-shadow: var(--ctm-shadow-sm);
}
.tableinfo table { width: 100%; }
.tableinfo table tr { vertical-align: top; }
.tableinfo table td { width: 50%; }
.tableinfo table td, .tableinfo table th { padding: 10px 14px; border: 1px solid rgba(255,255,255,0.8); }
.tableinfo table th {
  background: rgba(22, 163, 74, 0.1);
  text-align: center;
  font-weight: 600;
  color: var(--ctm-primary-dark);
}


/* ── 11. Pagination ───────────────────────────────────────────────────────── */
.pagination .page-item { margin: 0 2px; }
.pagination .page-link {
  color: var(--ctm-text-2);
  border: 1.5px solid var(--ctm-border);
  border-radius: var(--ctm-r-sm) !important;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  transition: all var(--ctm-t) var(--ctm-ease);
  background: var(--ctm-surface);
  font-family: inherit;
}
.pagination .page-link:hover {
  background: var(--ctm-primary-subtle);
  border-color: var(--ctm-primary);
  color: var(--ctm-primary);
}
.pagination .page-item.active .page-link {
  background: var(--ctm-primary);
  border-color: var(--ctm-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(22,163,74,.28);
}
.page-item.disabled .page-link {
  color: var(--ctm-text-subtle);
  border-color: var(--ctm-border-2);
  background: var(--ctm-surface-2);
}


/* ── 12. Breadcrumb ───────────────────────────────────────────────────────── */
.breadcrumb-item + .breadcrumb-item::before { color: rgb(255,255,255); }
.breadcrumb-item a, .breadcrumb-item.active { color: rgb(255,255,255); }

.breadcrumb-green .breadcrumb-item + .breadcrumb-item::before { color: #333; }
.breadcrumb-green .breadcrumb-item a, .breadcrumb-green .breadcrumb-item.active { color: #333; }


/* ── 13. A-Z Section ──────────────────────────────────────────────────────── */
.section-a-z h6 {
  display: inline-block;
  background: var(--ctm-primary);
  padding: 0.45em 0.8em;
  color: #fff;
  font-weight: 700;
  border-radius: var(--ctm-r-sm);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
}
.letter-block li { padding: 8px 10px; }
.letter-block li a { text-decoration: none; color: var(--ctm-text-2); font-size: 0.9rem; }
.letter-block li a:hover { text-decoration: underline; color: var(--ctm-primary); }


/* ── 14. Nav Divider ──────────────────────────────────────────────────────── */
.nav.nav-divider .nav-item { display: inline-block; vertical-align: middle; }
.nav.nav-divider .nav-item + .nav-item::before {
  content: "·"; color: var(--ctm-text-subtle); padding: 0 0.5rem;
}


/* ── 15. Avatar ───────────────────────────────────────────────────────────── */
.avatar { height: 3rem; width: 3rem; position: relative; display: inline-block !important; }
.avatar-xl { height: 5.125rem; width: 5.125rem; }
.avatar-xxl { width: 8rem; height: 8rem; }
.avatar-img { width: 100%; height: 100%; object-fit: cover; }
.rounded-circle { border-radius: 50% !important; }


/* ── 16. Footer ───────────────────────────────────────────────────────────── */
footer {
  margin-top: 80px;
  background: var(--ctm-surface);
  border-top: 1px solid var(--ctm-border-2);
}

footer .nav-link {
  padding: 0 12px;
  font-size: 0.875rem;
  color: var(--ctm-text-muted);
  font-weight: 500;
  transition: color var(--ctm-t) var(--ctm-ease);
}
footer .nav-link:hover { color: var(--ctm-primary); }

footer section.pt-1 { background: var(--ctm-bg); border-top: 1px solid var(--ctm-border-2); }
footer h3 { font-size: 1rem; font-weight: 700; letter-spacing: -0.02em; }
footer h5 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ctm-text-subtle);
  text-transform: uppercase;
  padding-top: 0.75rem;
}
footer ul.list-inline a { font-size: 0.875rem; color: var(--ctm-text-muted); }
footer ul.list-inline a:hover { color: var(--ctm-primary); }

#footerNlSection { border-radius: var(--ctm-r-lg) !important; }

footer .mt-2 { font-size: 0.8125rem; color: var(--ctm-text-subtle); }


/* ── 17. Newsletter Modal ─────────────────────────────────────────────────── */
.modal-content { border-radius: var(--ctm-r-lg) !important; box-shadow: var(--ctm-shadow-lg) !important; }


/* ── 18. Home Page Hero Card ──────────────────────────────────────────────── */
.home-planner-card {
  background: var(--ctm-surface);
  border-radius: var(--ctm-r-lg);
  box-shadow: var(--ctm-shadow-md);
  padding: 2rem 2rem 1.75rem;
  color: var(--ctm-text);
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid var(--ctm-border-2);
}
.home-planner-card h1 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  letter-spacing: -0.03em;
}
.home-planner-card .lead {
  font-size: 0.9375rem;
  margin-bottom: 1.25rem;
  color: var(--ctm-text-muted);
  line-height: 1.5;
}
.home-planner-inputs .form-control { border-radius: var(--ctm-r); text-align: center; }
.home-planner-inputs .form-label { font-weight: 600; font-size: 0.8125rem; margin-bottom: 0.2rem; }

#home-btn-plan {
  border-radius: var(--ctm-r);
  font-weight: 700;
  background: var(--ctm-primary);
  color: #fff;
  border: none;
  padding: 0.5rem 1.5rem;
  box-shadow: 0 2px 8px rgba(22,163,74,.22);
  transition: background var(--ctm-t) var(--ctm-ease), box-shadow var(--ctm-t) var(--ctm-ease);
  font-family: inherit;
}
#home-btn-plan:hover { background: var(--ctm-primary-hover); box-shadow: 0 4px 16px rgba(22,163,74,.32); }

.home-planner-hint { font-size: 0.8125rem; color: var(--ctm-text-subtle); margin-top: 0.4rem; }
.home-planner-hint a { color: var(--ctm-primary); font-weight: 500; }


/* CTA BOXES*/
.cta-box{color:#fff;border-radius:16px;padding:2.5rem;text-align:center}
.cta-box h3, .cta-box h2, .cta-box p {color: #fff; margin-top: 0;}


/* Calculators*/
.calcs-hero{
  background:linear-gradient(135deg,#0d2137 0%,#1178a0 40%,#5a2d82 100%);
  color:#fff;padding:5rem 1rem 2rem
}
.calcs-hero h1{font-weight:700;margin-bottom:.65rem; color:#fff;}
.calcs-hero .lead{opacity:.88;max-width:680px; color:#fff;}
.calcs-hero .container{padding:20px; color:#fff;}


/* ── 19. Plan Page ────────────────────────────────────────────────────────── */
.plan-hero {
  background: linear-gradient(135deg, #0a5c36 0%, #16a34a 100%);
  color: #fff;
  padding: 4.75rem 1rem 1.75rem;
}
.plan-hero h1 { font-weight: 700; margin-bottom: 0.6rem; color: #fff; }
.plan-hero .lead {max-width: 660px; color: #fff; }
.plan-hero .container { padding: 20px; }

.input-card {
  border: 1px solid var(--ctm-border-2);
  border-radius: var(--ctm-r-lg);
  box-shadow: var(--ctm-shadow);
  padding: 1.75rem 2rem;
  background: var(--ctm-surface);
  margin-top: -1rem;
}

.macro-inputs .form-label { font-weight: 600; font-size: 0.8125rem; margin-bottom: 0.25rem; }
.macro-inputs .form-control { border-radius: var(--ctm-r); text-align: center; }

.diet-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0 1.25rem; }
.diet-chip {
  border: 1.5px solid var(--ctm-border);
  border-radius: 20px;
  padding: 0.28rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--ctm-surface);
  color: var(--ctm-text-muted);
  transition: all var(--ctm-t) var(--ctm-ease);
  letter-spacing: -0.01em;
  font-family: inherit;
}
.diet-chip:hover { border-color: var(--ctm-primary); color: var(--ctm-primary); }
.diet-chip.active { border-color: var(--ctm-primary); background: var(--ctm-primary); color: #fff; }

#btn-generate {
  border-radius: var(--ctm-r);
  font-size: 0.9375rem;
  font-weight: 700;
  padding: 0.75rem;
  margin-top: 0.25rem;
  letter-spacing: -0.02em;
  font-family: inherit;
}
#btn-generate:disabled { opacity: 0.55; }

/* Totals banner */
.totals-banner {
  background: var(--ctm-surface);
  border-radius: var(--ctm-r-md);
  padding: 1.125rem 1.5rem;
  box-shadow: var(--ctm-shadow-sm);
  border: 1px solid var(--ctm-border-2);
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  align-items: center;
}
.totals-banner .tb-label {
  font-size: 0.69rem;
  color: var(--ctm-text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  margin-bottom: 0.1rem;
}
.totals-banner .tb-val { font-size: 1.25rem; font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
.totals-banner .tb-delta { font-size: 0.73rem; font-weight: 600; padding: 0.15rem 0.45rem; border-radius: var(--ctm-r-xs); margin-left: 0.3rem; }
.delta-pos  { background: #fef3c7; color: #92400e; }
.delta-neg  { background: var(--ctm-primary-dim); color: #065f46; }
.delta-zero { background: var(--ctm-surface-2); color: var(--ctm-text-muted); }

/* Meal cards */
.meal-card {
  border: 1px solid var(--ctm-border-2);
  border-radius: var(--ctm-r-md);
  box-shadow: var(--ctm-shadow-sm);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--ctm-surface);
  transition: box-shadow var(--ctm-t-md) var(--ctm-ease), transform var(--ctm-t-md) var(--ctm-ease);
}
.meal-card:hover { box-shadow: var(--ctm-shadow-md); transform: translateY(-2px); }

.meal-card-header {
  padding: 0.6rem 0.9rem 0.5rem;
  background: var(--ctm-surface-2);
  border-bottom: 1px solid var(--ctm-border-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.meal-card-header .slot-label { font-weight: 700; font-size: 0.825rem; color: var(--ctm-text); }
.meal-card-header .slot-cal { font-size: 0.775rem; color: var(--ctm-text-muted); font-weight: 500; }

.meal-card-body { flex: 1; display: flex; flex-direction: column; }
.meal-card-body a { text-decoration: none; color: inherit; flex: 1; display: flex; flex-direction: column; }
.meal-card-body img { width: 100%; height: 160px; object-fit: cover; }
.meal-card-body .mc-noimg {
  height: 160px;
  background: var(--ctm-surface-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--ctm-text-subtle);
  font-size: 0.8rem;
}
.meal-card-info { padding: 0.75rem 0.875rem; }
.meal-card-info .mc-title { font-weight: 600; font-size: 0.9rem; color: var(--ctm-text); line-height: 1.35; margin-bottom: 0.3rem; }
.meal-card-info .mc-kcal { font-size: 0.8125rem; font-weight: 700; color: var(--ctm-primary); }
.meal-card-info .mc-macros { font-size: 0.75rem; color: var(--ctm-text-subtle); margin-top: 0.2rem; }
.meal-card-footer { padding: 0.6rem 0.875rem; border-top: 1px solid var(--ctm-border-2); }
.btn-regen { font-size: 0.78rem; border-radius: var(--ctm-r-sm); padding: 0.35rem 0.7rem; font-weight: 600; }

/* Skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--ctm-surface-2) 25%, #e8ebe8 50%, var(--ctm-surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.sk-img { height: 160px; border-radius: 0; }
.sk-line { height: 10px; border-radius: 5px; margin-bottom: 8px; }
.sk-line.w80 { width: 80%; } .sk-line.w50 { width: 50%; } .sk-line.w65 { width: 65%; }

/* Save section */
.save-card {
  background: linear-gradient(135deg, #0a3d24 0%, #16a34a 100%);
  color: #fff;
  border-radius: var(--ctm-r-lg);
  padding: 2rem 2.25rem;
  margin-top: 2rem;
}
.save-card h3 { font-size: 1.125rem; margin-bottom: 0.35rem; color: #fff; }
.save-card p { opacity: 0.82; font-size: 0.9rem; margin-bottom: 1.2rem; color: rgba(255,255,255,.82); }
.save-input-group { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.save-input-group input {
  border-radius: var(--ctm-r);
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.12);
  color: #fff;
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  flex: 1;
  min-width: 200px;
  font-family: inherit;
  transition: border-color var(--ctm-t) var(--ctm-ease), background var(--ctm-t) var(--ctm-ease);
}
.save-input-group input::placeholder { color: rgba(255,255,255,.5); }
.save-input-group input:focus { outline: none; border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.18); }
.save-input-group button { border-radius: var(--ctm-r); padding: 0.6rem 1.2rem; font-weight: 600; font-size: 0.875rem; white-space: nowrap; }
.save-status { margin-top: 0.75rem; font-size: 0.85rem; color: rgba(255,255,255,.85); }

.plan-output { margin-top: 2.5rem; }


/* ── 20. Utility Overrides ────────────────────────────────────────────────── */
.text-muted         { color: var(--ctm-text-muted) !important; }
.text-primary       { color: var(--ctm-primary) !important; }
.bg-success         { background: var(--ctm-primary) !important; }
.rounded-3          { border-radius: var(--ctm-r-md) !important; }
.rounded-4          { border-radius: var(--ctm-r-lg) !important; }
.shadow             { box-shadow: var(--ctm-shadow) !important; }
.shadow-sm          { box-shadow: var(--ctm-shadow-sm) !important; }
.text-primary-hover a:hover { color: var(--ctm-primary) !important; }

.full-width-image { width: 100%; }
.navbar-collapse  { justify-content: space-between; }


/* ── 21. Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1023px) {
  .tableinfo { width: 100%; }
  .tableinfo table, .tableinfo thead, .tableinfo tbody,
  .tableinfo th, .tableinfo td, .tableinfo tr { display: block; width: 100% !important; }

  h1 { font-size: clamp(1.4rem, 6vw, 2rem); margin-bottom: 0; line-height: 1.1; }
  .blog-grid .card h1 { font-size: 1.2rem; }
  h4 { font-size: 1.2rem; }
  h4.card-title { font-size: 0.9375rem; }

  .top-container { padding-top: calc(var(--ctm-header-h) + 16px); }

  header { height: var(--ctm-header-h); }
  .navbar-brand-name { display: none; }
  .navbar-brand-item { height: 45px; margin-left: 12px; }

  .text-holder { padding: 0 0.625rem 0.75rem; }
  .tags_holder { padding: 0.25rem 0.5rem; }

  .card.card-with-background         { height: 200px; }
  .col-md-3 .card.card-with-background { height: 175px; }
  .col-12.small .card.card-with-background { height: 160px; }
  .col-md-6 .card.card-with-background { height: 175px; }
  .col-main .card.card-with-background { height: 270px; }

  .card-img-overlay::before { height: 65%; }
  .card-body { padding: 0.625rem 0.75rem !important; }
  .recipie-step, .recipie-ingredient { padding: 0.625rem 0; }
  .recipie-ingredient .col-2 { padding-right: 10px !important; }
  .section-a-z nav { display: none; }

  .navbar-expand .navbar-toggler { display: block; }
  .navbar-toggler:focus { box-shadow: none; }
  .navbar-toggler-icon { background-image: url('/static/menu.svg'); }
  .collapse:not(.show) { display: none !important; }

  .navbar-collapse {
    box-shadow: 0 12px 40px rgba(0,0,0,.1);
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    background: var(--ctm-surface);
    height: calc(100vh - var(--ctm-header-h));
    overflow: scroll;
    align-items: flex-start;
    flex-direction: column-reverse;
    justify-content: flex-end;
    border-bottom: 1px solid var(--ctm-border-2);
  }

  header .navbar-expand .navbar-nav .nav-link { padding: 0 16px; }
  header .navbar-expand .navbar-nav .nav-link::after { display: none; }

  .nav-item { height: 52px !important; line-height: 52px !important; padding: 0 !important; }
  .navbar-expand .navbar-nav { flex-direction: column; width: 100%; }
  .navbar-expand .navbar-nav .dropdown-menu {
    border: 0; position: relative; top: 0; width: 100%;
    box-shadow: none; background: var(--ctm-surface-2);
  }
  .navbar-expand .navbar-nav .dropdown-menu .p-3 { padding: 0 !important; }
  .dropdown-fullwidth .dropdown-menu { padding: 0.25rem 0; }

  input[name="q"] { flex: 1; }
  header .navbar form { padding: 20px 16px; width: 100%; }

  footer .nav-link { padding: 0 12px 12px 0; }

  .totals-banner { flex-direction: column; gap: 0.5rem; }
  .plan-hero { padding: 3rem 1rem 1.25rem; }
  .input-card { padding: 1.25rem; }
  .save-card { padding: 1.5rem; }
  .home-planner-card { padding: 1.25rem; }
  .home-planner-card h1 { font-size: 1.2rem; }
}

@media (max-width: 575px) {
  .card.card-with-background           { height: 175px; }
  .col-md-3 .card.card-with-background { height: 155px; }
  .col-main .card.card-with-background { height: 210px; }
  .pb-3 { padding-bottom: 0.5rem !important; }
  .mb-4 { margin-bottom: 0.5rem !important; }
}
