/* ============================================================
   TinyApps — Stylesheet  ·  "Fresh Teal" design system
   ============================================================ */

/* ---- Self-hosted Inter (variable) ----
   Served from /static/fonts instead of the Google Fonts CDN, so no visitor
   IP is sent to a third party (GDPR) and the CSP can stay strict. One
   variable file per subset covers weights 100–900. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/inter-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
    U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/inter-cyrillic-wght-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --teal: #0D9488;
  --teal-600: #0F766E;
  --teal-700: #115E59;
  --accent: #14B8A6;
  --ink: #0F172A;
  --muted: #5B6B7A;
  --line: #E3EEEB;
  --bg: #FFFFFF;
  --soft: #F0FDFA;
  --card: #FFFFFF;
  --danger: #E11D48;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(13, 148, 136, .05), 0 10px 30px rgba(13, 148, 136, .08);
  --shadow-lg: 0 24px 50px rgba(13, 148, 136, .16);
  --maxw: 1120px;       /* public pages: comfortable reading width */
  --maxw-app: 1400px;   /* logged-in app shells: wider so 2/3-col middles breathe */
}

/* ---- Reset & base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  /* Enable localized letterforms (e.g. Bulgarian Cyrillic) per <html lang>. */
  font-feature-settings: "locl" 1;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { letter-spacing: -.02em; line-height: 1.2; }

/* ---- Header / nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .8);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 0 24px;
}

.nav-public, .nav-private {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
  gap: 16px;
}

.nav-public ul, .nav-private ul {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }

.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: linear-gradient(135deg, #14B8A6, #0D9488);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: .95rem;
}

.nav-public a:not(.btn), .nav-private a:not(.btn) {
  color: var(--muted);
  font-weight: 500;
  font-size: .95rem;
  transition: color .15s;
}
.nav-public a:not(.btn):hover, .nav-private a:not(.btn):hover {
  color: var(--teal);
  text-decoration: none;
}

.logout-link { color: var(--danger) !important; }

/* Logout is a POST form (logout-CSRF guard); make its button look like a nav link. */
.logout-form { display: inline; margin: 0; }
.logout-form button.logout-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 500;
}
.logout-form button.logout-link:hover { text-decoration: underline; }

/* ---- Hamburger toggle (shown only on small screens) ---- */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 6px;
  border-radius: 10px;
  color: var(--ink);
  cursor: pointer;
  line-height: 0;
}
.nav-toggle:hover { color: var(--teal); background: var(--soft); }
.nav-toggle:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.nav-toggle .icon-close { display: none; }

/* ---- Language switch ---- */
.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}
.lang-switch a {
  padding: 6px 12px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--muted) !important;
  transition: background .15s, color .15s;
}
.lang-switch a:hover { text-decoration: none; color: var(--teal) !important; }
.lang-switch a.active { background: var(--teal); color: #fff !important; }

/* ---- Layout ---- */
.main-content { flex: 1; width: 100%; }
/* Interior (non-landing) pages center their own content; landing sections
   use `.full` + an inner wrapper and span full width. Each interior wrapper
   sets its own max-width below to avoid specificity clashes. */

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: .9rem;
  padding: 32px 24px;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
/* Centered middle zone (page-provided via the footer_center block). It grows to
   fill the space between the brand (left) and "logged in as" (right). Empty on
   most pages, so the layout is unchanged there. */
.footer-center { flex: 1 1 auto; min-width: 0; text-align: center; }
.footer-right { text-align: right; }
.viewing-note { color: var(--teal-700); font-weight: 600; }

/* ---- Flash messages ---- */
.flash-messages { max-width: var(--maxw); margin: 16px auto 0; padding: 0 24px; }
.flash {
  padding: 12px 15px;
  border-radius: 13px;
  margin-bottom: 10px;
  font-size: .93rem;
}
.flash-success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.flash-error   { background: #FEF2F2; color: #9F1239; border: 1px solid #FECDD3; }
.flash-info    { background: var(--soft); color: var(--teal-700); border: 1px solid #99F6E4; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform .12s, box-shadow .15s, background .15s, color .15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 10px 22px rgba(13, 148, 136, .28); }
.btn-primary:hover { background: var(--teal-600); color: #fff; }

.btn-secondary { background: #fff; color: var(--teal); border-color: #CCEAE4; }
.btn-secondary:hover { background: var(--soft); color: var(--teal-600); }

.btn-white { background: #fff; color: var(--teal-600); }
.btn-white:hover { color: var(--teal-700); }

.btn-link { background: none; color: var(--teal); padding: 0; border: none; font-size: .95rem; box-shadow: none; }
.btn-link:hover { transform: none; text-decoration: underline; }

.btn-full { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: .85rem; }
.btn-lg { padding: 15px 30px; font-size: 1.02rem; }

/* ---- Forms ---- */
.form-container {
  max-width: 460px;
  margin: 48px auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow);
}
.form-container h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: 1.5rem; }

.form-section { max-width: 640px; margin: 0 auto; padding: 48px 24px; }
.form-section h1 { font-size: 1.7rem; font-weight: 800; margin-bottom: .5rem; }
.setup-steps { margin: 1rem 0 1.5rem; padding-left: 1.4rem; line-height: 1.6; }
.setup-steps li { margin-bottom: .35rem; }
.form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
  margin-top: 20px;
}

.form-group { margin-bottom: 1.15rem; }
.form-group label { display: block; margin-bottom: .4rem; font-weight: 600; font-size: .9rem; }

.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid #CFE6E1;
  border-radius: 13px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, .16);
}
.form-group small { display: block; margin-top: .35rem; color: var(--muted); font-size: .82rem; }

.form-check { display: flex; align-items: center; gap: 10px; }
.form-check input { width: auto; }
.form-check label { margin-bottom: 0; }

.form-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.form-divider { border: none; border-top: 1px solid var(--line); margin: 28px 0; }

.form-footer { margin-top: 1.25rem; text-align: center; font-size: .93rem; color: var(--muted); }

.input-code {
  font-size: 1.5rem !important;
  letter-spacing: .3em;
  text-align: center;
}

/* ---- Hero (public landing) ---- */
/* Full-screen photo background (img/header.jpg) under a teal-tinted overlay,
   keeping the Fresh Teal identity and white text legible. */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Fill the first screen: full viewport minus the 70px sticky header. */
  min-height: calc(100vh - 70px);
  text-align: center;
  padding: 96px 24px;
  color: #fff;
  background: linear-gradient(135deg, rgba(13, 148, 136, .72), rgba(11, 18, 32, .74)),
              url("../img/header.jpg") center / cover no-repeat;
}
.hero h1 {
  font-size: 3.4rem;
  font-weight: 800;
  margin-bottom: 18px;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .25);
}
.hero h1 .grad {
  background: linear-gradient(120deg, #5EEAD4, #99F6E4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-lead {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, .92);
  max-width: 640px;
  margin: 0 auto 30px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .32);
  color: #fff;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 22px;
  backdrop-filter: blur(4px);
}
.hero-trust { margin-top: 26px; font-size: .88rem; color: rgba(255, 255, 255, .82); }

/* ---- Generic section ---- */
.section { padding: 80px 0; }
.section-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section.alt { background: var(--soft); }
.eyebrow {
  text-align: center;
  color: var(--teal);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-title { text-align: center; font-size: 2.1rem; font-weight: 800; margin-bottom: 12px; }
.section-sub { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 50px; font-size: 1.05rem; }

/* ---- Benefits ---- */
.benefits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.benefit {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
}
.benefit:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.benefit-icon {
  width: 50px;
  height: 50px;
  border-radius: 15px;
  background: #E6FBF6;
  color: var(--teal);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
.benefit h3 { font-size: 1.06rem; font-weight: 700; margin-bottom: 7px; }
.benefit p { color: var(--muted); font-size: .95rem; }

/* ---- Products ---- */
/* auto-fit + centered so any number of cards (currently 2) stays balanced;
   cards cap at 300px instead of stretching across the full row. */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 300px));
  gap: 24px;
  justify-content: center;
}
.product {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
}
.product:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.product-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #CCFBF1, #99F6E4);
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  margin-bottom: 16px;
}
.product h3 {
  font-size: 1.16rem;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.product p { color: var(--muted); font-size: .94rem; }
.badge {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--teal-600);
  background: #CCFBF1;
  padding: 3px 9px;
  border-radius: 999px;
}

/* ---- CTA band ---- */
.cta { padding: 0 24px 80px; }
.cta-card {
  max-width: var(--maxw);
  margin: 0 auto;
  background: linear-gradient(135deg, #0D9488, #14B8A6);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.cta-card h2 { font-size: 2rem; font-weight: 800; margin-bottom: 10px; }
.cta-card p { color: rgba(255, 255, 255, .92); margin-bottom: 26px; font-size: 1.05rem; }

/* ---- Dashboard ---- */
.dashboard { max-width: var(--maxw); margin: 0 auto; padding: 48px 24px; }
.dashboard h1 { font-size: 1.85rem; font-weight: 800; margin-bottom: .4rem; }
.text-muted { color: var(--muted); }
.dashboard > .text-muted { margin-bottom: 2rem; }
.text-center { text-align: center; }
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  margin-top: 1.5rem;
}
.dashboard-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
}
.dashboard-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.dashboard-card h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: .5rem; }
.dashboard-card p { color: var(--muted); margin-bottom: 1rem; font-size: .95rem; }

/* ---- Dashboard: apps + subscriptions (left/main/right layout) ---- */
.dash-wrap { max-width: var(--maxw-app); margin: 0 auto; padding: 40px 24px; }
.dash-wrap > h1 { font-size: 1.7rem; font-weight: 800; margin-bottom: 4px; }
.dashboard-layout { display: grid; gap: 26px; margin-top: 24px; align-items: start; }
.dashboard-layout.cols-2 { grid-template-columns: 260px 1fr; }
.dashboard-layout.cols-3 { grid-template-columns: 240px 1fr 260px; }

.dash-side h2 {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin-bottom: 14px;
}
.side-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.side-list form { width: 100%; }
.side-empty { color: var(--muted); font-size: .9rem; }

.app-item, .user-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.app-item:hover, .user-item:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.user-item.active { border-color: var(--teal); background: var(--soft); }
.app-item .ico { font-size: 1.2rem; line-height: 1; }
.app-item .app-add { margin-left: auto; font-weight: 800; color: var(--teal); font-size: 1.15rem; }
.app-item-static { cursor: default; }
.app-item-static:hover { border-color: var(--line); box-shadow: none; }
.user-item small { display: block; color: var(--muted); font-size: .8rem; font-weight: 400; }

.dash-main-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 16px; }
.dashboard-main .products { justify-content: start; }
.dash-empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 44px 24px;
  text-align: center;
}
.dash-empty h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 6px; }

@media (max-width: 900px) {
  .dashboard-layout.cols-2, .dashboard-layout.cols-3 { grid-template-columns: 1fr; }
}

.product-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { color: var(--danger); }

/* ---- Car Service app ---- */
.cs-filter, .cs-add { display: flex; gap: 8px; margin-bottom: 12px; }
.cs-filter input, .cs-add input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid #CFE6E1; border-radius: 10px; font: inherit; }
.cs-tree-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.cs-tree-list details { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.cs-tree-list summary {
  cursor: pointer; padding: 10px 12px; font-weight: 600; font-size: .95rem;
  border-radius: 12px; list-style-position: inside;
}
.cs-tree-list summary:hover { background: var(--soft); }
.cs-node-body { padding: 4px 12px 12px; }
.cs-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.cs-row .cs-link { flex: 1; color: var(--muted); font-size: .9rem; }
.cs-row .cs-link:hover, .cs-row .cs-link.active { color: var(--teal); text-decoration: none; font-weight: 600; }
.cs-cars { list-style: none; margin-top: 4px; padding-left: 6px; border-left: 2px solid var(--line); display: flex; flex-direction: column; }
.cs-del {
  background: none; border: none; cursor: pointer; color: var(--muted);
  font-size: .85rem; line-height: 1; padding: 4px 6px; border-radius: 8px;
}
.cs-del:hover { color: var(--danger); background: #FEF2F2; }
.cs-add-car { margin-top: 6px; }

.cs-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.cs-tab {
  padding: 10px 16px; color: var(--muted); font-weight: 600; font-size: .95rem;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.cs-tab:hover { color: var(--teal); text-decoration: none; }
.cs-tab.active { color: var(--teal); border-bottom-color: var(--teal); }

.cs-table {
  width: 100%; border-collapse: separate; border-spacing: 0; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); font-size: .92rem; margin-bottom: 20px;
}
.cs-table th, .cs-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.cs-table thead th { background: var(--soft); color: var(--teal-700); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.cs-table tbody tr:last-child td { border-bottom: none; }
.cs-actions { display: flex; gap: 8px; align-items: center; white-space: nowrap; }
/* Repairs table: shrink the Actions column to its buttons; give the room to Description. */
.cs-repairs th:last-child, .cs-repairs td.cs-actions { width: 1%; white-space: nowrap; }
.cs-repairs th:nth-child(3), .cs-repairs td:nth-child(3) { width: 55%; }
/* Operations table: narrow Price + Actions, Description takes the rest. */
.cs-ops th:last-child, .cs-ops td.cs-actions { width: 1%; white-space: nowrap; }
.cs-ops th:nth-child(2), .cs-ops td:nth-child(2) { width: 9rem; }
/* Inline row-edit inputs (operations table): fill the cell, match form fields. */
.cs-table td input { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid #CFE6E1; border-radius: 10px; font: inherit; background: #fff; color: var(--ink); }
.cs-table td input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(20, 184, 166, .16); }

.cs-add-row .form-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}
.cs-add-row .form-group { margin-bottom: 0; }
.cs-repair-summary p { margin-bottom: 6px; }
.cs-doc { max-width: 640px; }
.cs-doc h2 { font-size: 1.25rem; font-weight: 800; margin-bottom: 10px; }
.cs-doc p { color: var(--muted); margin-bottom: 12px; }
.cs-doc ol { margin: 0 0 12px 1.2rem; color: var(--ink); display: flex; flex-direction: column; gap: 6px; }

@media (max-width: 760px) {
  .cs-table { display: block; overflow-x: auto; }
}

/* ---- Admin ---- */
.admin-users { max-width: var(--maxw); margin: 0 auto; padding: 48px 24px; }
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.admin-header h1 { font-size: 1.7rem; font-weight: 800; }
.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: .92rem;
}
.admin-table th, .admin-table td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.admin-table thead th {
  background: var(--soft);
  color: var(--teal-700);
  font-weight: 700;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: #FAFEFD; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .benefits, .products { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  /* Collapse the whole menu behind the hamburger; it drops down as a panel. */
  .nav-public, .nav-private { position: relative; }
  .nav-toggle { display: inline-flex; }
  nav.open .nav-toggle .icon-open { display: none; }
  nav.open .nav-toggle .icon-close { display: inline; }

  .nav-public > ul, .nav-private > ul {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin: 0;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 0 0 16px 16px;
    box-shadow: var(--shadow-lg);
    z-index: 60;
  }
  nav.open > ul { display: flex; }

  .nav-public > ul > li, .nav-private > ul > li { width: 100%; }
  .nav-public > ul > li > a:not(.btn),
  .nav-private > ul > li > a:not(.btn) {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
  }
  .nav-public > ul > li > a:not(.btn):hover,
  .nav-private > ul > li > a:not(.btn):hover { background: var(--soft); }
  .nav-public > ul > li > .btn { width: 100%; }
  .logout-form { display: block; }
  .logout-form button.logout-link { display: block; width: 100%; text-align: left; padding: 10px 12px; }
  .lang-switch { margin-top: 6px; }

  .hero h1 { font-size: 2.4rem; }
  .section-title { font-size: 1.7rem; }
  .admin-table { display: block; overflow-x: auto; }
}
@media (max-width: 560px) {
  .benefits, .products { grid-template-columns: 1fr; }
  .form-container { margin: 24px 16px; padding: 24px; }
}
