/* ==========================================================================
   Ozmun AI — Green design layer
   Loaded after the other stylesheets. Brings the shell and shared components
   in line with the green / yellow design (Unbounded + Manrope, white chrome,
   #0B7F58 primary, #FACC15 accent).
   ========================================================================== */

:root,
[data-theme="light"] {
  --oz-green: #0B7F58;
  --oz-green-dark: #075C40;
  --oz-green-bright: #0E9F6E;
  --oz-green-soft: #E3F4EC;
  --oz-ink: #0B2A1F;
  --oz-ink-2: #3C5248;
  --oz-muted: #4A6358;
  --oz-muted-2: #5C766A;
  --oz-line: #DCEAE2;
  --oz-line-soft: #EEF4F0;
  --oz-page: #F5FAF7;
  --oz-yellow: #FACC15;
  --oz-yellow-soft: #FEF6C7;
  --oz-yellow-ink: #6B4E00;
  --oz-on-dark-muted: #B9D8C9;

  --color-page-bg: var(--oz-page);
  --color-bg: var(--oz-page);
  --bg-gradient: var(--oz-page);
  --color-surface: #FFFFFF;
  --color-surface-2: #FFFFFF;
  --color-surface-elevated: #FFFFFF;
  --color-surface-offset: var(--oz-line-soft);
  --color-border: var(--oz-line);
  --color-text: var(--oz-ink);
  --color-text-secondary: var(--oz-ink-2);
  --color-text-muted: var(--oz-muted);
  --color-primary: var(--oz-green);
  --color-primary-end: var(--oz-green-dark);
  --color-primary-gradient: var(--oz-green);
  --color-primary-hover: var(--oz-green-dark);
  --color-primary-highlight: var(--oz-green-soft);
  --color-success: var(--oz-green-bright);
  --color-warning: #B07A00;
  --color-error: #9A1C13;
  --color-cat-gold: var(--oz-yellow);
  --focus-ring: rgba(14, 159, 110, 0.35);

  --shadow-sm: 0 1px 2px rgba(11, 42, 31, 0.04);
  --shadow-md: 0 4px 14px rgba(11, 42, 31, 0.06);
  --shadow-lg: 0 12px 32px rgba(11, 42, 31, 0.08);
  --shadow-card: none;
}

body {
  background: var(--oz-page);
  color: var(--oz-ink);
  font-family: var(--font-body);
}

/* ── Typography ── */
h1, h2, .h1, .font-display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}
h1, .h1 { font-size: clamp(1.9rem, 4.2vw, 3.25rem); line-height: 1.1; }
h2 { font-size: clamp(1.35rem, 2.6vw, 2.1rem); }
h3 {
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: 0;
}
p { color: var(--oz-muted); }
a { color: var(--oz-green); }
a:hover { color: var(--oz-green-dark); }

/* ── Buttons ── */
.btn,
.button {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 15px;
}
.button--sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.button--lg { min-height: 52px; padding: 0 24px; font-size: 16px; }

.btn-primary,
.button--primary,
.button--gradient {
  background: var(--oz-green);
  border: 1px solid var(--oz-green);
  color: #FFFFFF;
  box-shadow: none;
}
.btn-primary:hover,
.button--primary:hover,
.button--gradient:hover {
  background: var(--oz-green-dark);
  border-color: var(--oz-green-dark);
  color: #FFFFFF;
  transform: none;
  box-shadow: none;
}
.btn-secondary,
.button--secondary {
  background: #FFFFFF;
  color: var(--oz-ink);
  border: 1px solid var(--oz-line);
  box-shadow: none;
}
.btn-secondary:hover,
.button--secondary:hover {
  background: var(--oz-page);
  border-color: var(--oz-green);
  color: var(--oz-green);
}
.btn-accent,
.button--accent {
  background: var(--oz-yellow);
  color: var(--oz-ink);
  border: 1px solid var(--oz-yellow);
}
.btn-accent:hover,
.button--accent:hover { background: #EAB308; color: var(--oz-ink); }

/* ── Cards ── */
.card {
  background: #FFFFFF;
  border: 1px solid var(--oz-line);
  border-radius: 20px;
  box-shadow: none;
}

/* ── Public header (logged-out pages) ── */
.shell-head,
.navbar,
[data-theme="dark"] .shell-head,
[data-theme="dark"] .navbar,
body.page-landing .shell-head,
body.page-landing .navbar {
  background: #FFFFFF;
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--oz-line);
}
.logo,
.navbar-logo,
body.page-landing .logo,
body.page-landing .navbar-logo,
body.page-landing .logo .font-display { color: var(--oz-ink); }
.logo__mark {
  background: var(--oz-green);
  border-color: var(--oz-green);
}
.nav-link,
body.page-landing .shell-nav .nav-link {
  color: var(--oz-ink);
  font-weight: 700;
}
.nav-link:hover,
.nav-link.is-active,
body.page-landing .shell-nav .nav-link:hover,
body.page-landing .shell-nav .nav-link.is-active { color: var(--oz-green); }
.nav-link.is-active::after { background: var(--oz-green); height: 3px; }
.shell-head .nav-toggle,
.navbar .nav-toggle,
.shell-head .nav-profile-btn,
.navbar .nav-profile-btn,
.shell-head .lang-switcher,
.navbar .lang-switcher,
.shell-head .theme-toggle,
.navbar .theme-toggle {
  background: #FFFFFF;
  border-color: var(--oz-line);
  color: var(--oz-ink);
}
.shell-head .nav-profile-name,
.navbar .nav-profile-name,
.shell-head .nav-chat-btn,
.navbar .nav-chat-btn { color: var(--oz-ink); }
.shell-head .nav-chat-btn:hover,
.navbar .nav-chat-btn:hover { color: var(--oz-green); }


.oz-highlight {
  background: var(--oz-yellow);
  padding: 0 10px;
  border-radius: 14px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* ── Auth pages ── */
.auth-panel__head .h1,
.auth-panel__head h1 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  line-height: 1.15;
}

/* ── CTA banners: dark ink block with yellow action ── */
.cta-banner {
  background: var(--oz-ink);
  border-radius: 32px;
  color: #FFFFFF;
}
.cta-banner h2,
.cta-banner .font-display { color: #FFFFFF; }
.cta-banner p { color: var(--oz-on-dark-muted); }
.cta-banner .btn-primary,
.cta-banner .button--primary {
  background: var(--oz-yellow);
  border-color: var(--oz-yellow);
  color: var(--oz-ink);
}
.cta-banner .btn-primary:hover,
.cta-banner .button--primary:hover { background: #EAB308; border-color: #EAB308; color: var(--oz-ink); }

/* ── Footer ── */
.oz-footer__heading {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0;
}

/* ==========================================================================
   App shell — measurements taken from the design (D08 / M08)
   Desktop: 256px white sidebar, 72px white top bar (+48px learning tabs).
   Mobile (<768px): 60px top bar, bottom tab bar, no sidebar.
   ========================================================================== */

body[data-user-id] {
  --app-sidebar-width: 256px;
  --app-sidebar-current-width: 256px;
  --app-main-offset: 256px;
  --app-header-height: 72px;
  --app-tabbar-height: 0px;
}
body[data-user-id][data-shell-tabs] { --app-header-height: 130px; }
html.app-shell-collapsed body[data-user-id] {
  --app-sidebar-current-width: 256px;
  --app-main-offset: 256px;
}

/* ── Sidebar ── */
body[data-user-id] .app-sidebar {
  width: 256px;
  background: #FFFFFF;
  color: var(--oz-ink);
  border-right: 1px solid var(--oz-line);
}
body[data-user-id] .app-sidebar__inner {
  padding: 20px 14px;
  gap: 0;
  background: #FFFFFF;
}
body[data-user-id] .app-sidebar__header {
  padding: 0 8px 20px;
  border-bottom: 0;
  min-height: 0;
}
body[data-user-id] .app-sidebar__brand,
body[data-user-id] .app-sidebar__brand:hover {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--oz-ink);
  padding: 0;
}
body[data-user-id] .app-sidebar__brand-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 11px;
  border: 0;
  overflow: hidden;
  background: transparent;
}
body[data-user-id] .app-sidebar__brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
body[data-user-id] .app-sidebar__brand-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--oz-ink);
}
body[data-user-id] .app-sidebar__brand-ai { color: var(--oz-green-bright); }
body[data-user-id] .app-sidebar__collapse-btn,
body[data-user-id] .app-header__toggle { display: none !important; }

body[data-user-id] .app-sidebar__nav {
  padding: 0;
  gap: 0;
  scrollbar-color: var(--oz-line) transparent;
}
body[data-user-id] .app-sidebar__nav::-webkit-scrollbar-thumb { background: var(--oz-line); }
body[data-user-id] .app-sidebar__group,
body[data-user-id] .app-sidebar__group:first-child { margin: 0; padding: 0; }
body[data-user-id] .app-sidebar__group-items { display: flex; flex-direction: column; gap: 2px; }
body[data-user-id] .app-sidebar__group-label {
  margin: 0;
  padding: 18px 12px 6px;
  color: var(--oz-muted-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
body[data-user-id] .app-sidebar__link {
  height: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--oz-ink-2);
  font-size: 15px;
  font-weight: 700;
  box-shadow: none;
}
body[data-user-id] .app-sidebar__link:hover,
body[data-user-id] .app-sidebar__link:focus-visible {
  background: var(--oz-page);
  color: var(--oz-ink);
}
body[data-user-id] .app-sidebar__link.is-active {
  background: var(--oz-green-soft);
  color: var(--oz-green-dark);
  font-weight: 800;
  box-shadow: none;
}
body[data-user-id] .app-sidebar__icon,
body[data-user-id] .app-sidebar__icon .app-sidebar__svg { width: 20px; height: 20px; flex: 0 0 20px; }

body[data-user-id] .app-sidebar__utilities {
  margin-top: auto;
  padding: 12px 0 0;
  border-top: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
body[data-user-id] .app-sidebar__utility-btn {
  height: 36px;
  padding: 0 12px;
  gap: 8px;
  border-radius: 10px;
  color: var(--oz-muted);
  font-size: 13px;
  font-weight: 800;
}
body[data-user-id] .app-sidebar__utility-btn:hover,
body[data-user-id] .app-sidebar__utility-btn:focus-visible { background: var(--oz-page); color: var(--oz-ink); }
body[data-user-id] .app-sidebar__profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: var(--oz-page);
  color: var(--oz-ink);
  text-decoration: none;
}
body[data-user-id] .app-sidebar__profile:hover,
body[data-user-id] .app-sidebar__profile.is-active { background: var(--oz-green-soft); color: var(--oz-ink); }
body[data-user-id] .app-sidebar__profile .nav-profile-avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  background: var(--oz-yellow);
  color: var(--oz-ink);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 0;
}
body[data-user-id] .app-sidebar__profile .nav-profile-avatar__img { width: 100%; height: 100%; object-fit: cover; }
body[data-user-id] .app-sidebar__profile-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
body[data-user-id] .app-sidebar__profile-text strong {
  display: block;
  color: var(--oz-ink);
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body[data-user-id] .app-sidebar__profile-text span { color: var(--oz-muted); font-size: 13px; font-weight: 600; }

/* ── Top bar ── */
body[data-user-id] .app-header {
  height: var(--app-header-height);
  padding: 0 32px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  background: #FFFFFF;
  border-bottom: 1px solid var(--oz-line);
}
body[data-user-id] .app-header__row {
  height: 72px;
  flex: 0 0 72px;
  display: flex;
  align-items: center;
  gap: 10px;
}
body[data-user-id] .app-header__left { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
body[data-user-id] .app-header__right { display: flex; align-items: center; gap: 10px; }
body[data-user-id] .app-header__title {
  margin: 0;
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
  color: var(--oz-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body[data-user-id] .app-header__brand,
body[data-user-id] .app-header__icon-btn.app-header__back,
body[data-user-id] .app-header__icon-btn.app-header__search-btn { display: none; }

/* The design has no floating assistant button — Hamroh lives in the navigation. */
.ai-floating-button { display: none !important; }

body[data-user-id] .app-header__search { position: relative; display: block; margin: 0; }
body[data-user-id] .app-header__search .app-sidebar__svg {
  position: absolute;
  left: 14px;
  top: 13px;
  color: var(--oz-muted);
  pointer-events: none;
}
body[data-user-id] .app-header__search input {
  width: 340px;
  height: 44px;
  padding: 0 14px 0 42px;
  border-radius: 12px;
  border: 1px solid var(--oz-line);
  background: var(--oz-page);
  font: 600 14px var(--font-body);
  color: var(--oz-ink);
  box-sizing: border-box;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
body[data-user-id] .app-header__search input::placeholder { color: var(--oz-muted); opacity: 1; }
body[data-user-id] .app-header__search input:focus { border-color: var(--oz-green-bright); background: #FFFFFF; }

body[data-user-id] .app-header__icon-btn {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--oz-line);
  border-radius: 12px;
  background: #FFFFFF;
  color: var(--oz-ink);
  padding: 0;
}
body[data-user-id] .app-header__icon-btn:hover,
body[data-user-id] .app-header__icon-btn:focus-visible { background: var(--oz-page); color: var(--oz-green); }
/* Unread indicator is a yellow dot, as in the design. */
body[data-user-id] .app-header__badge {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 9px;
  height: 9px;
  min-width: 0;
  padding: 0;
  border-radius: 50%;
  background: #E0A800;
  border: 2px solid #FFFFFF;
  font-size: 0;
  line-height: 0;
  color: transparent;
  box-sizing: content-box;
}

/* Learning tabs under the title row */
/* Section tabs: one white strip, equal tabs with an icon, the open one tinted. */
body[data-user-id] .app-tabs {
  display: flex;
  gap: 4px;
  height: 50px;
  flex: 0 0 50px;
  margin: 0 0 8px;
  padding: 4px;
  box-sizing: border-box;
  background: #FFFFFF;
  border: 1px solid var(--oz-line);
  border-radius: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
body[data-user-id] .app-tabs::-webkit-scrollbar { display: none; }
body[data-user-id] .app-tabs__tab {
  flex: 1 1 auto;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 800;
  color: var(--oz-muted);
  border: 1px solid transparent;
  border-radius: 10px;
  white-space: nowrap;
  text-decoration: none;
  box-sizing: border-box;
}
button.app-tabs__tab { background: none; font-family: inherit; cursor: pointer; }
/* a tab that only phones need (the sidebar has the same link on wider screens) */
@media (min-width: 768px) { body[data-user-id] .app-tabs__tab--mobile { display: none; } }
/* «PRO» mark on a Premium tab (NTC forecast) */
.app-tabs__pro { flex: none; padding: 1px 6px; border-radius: 6px; background: #FACC15; color: #3B2A00; font-size: 10px; font-weight: 800; letter-spacing: .02em; line-height: 1.4; }
body[data-user-id] .app-tabs__ic { flex: none; }
body[data-user-id] .app-tabs__tab:hover { color: var(--oz-ink); background: var(--oz-page); }
body[data-user-id] .app-tabs__tab.is-active {
  color: var(--oz-green-dark);
  background: linear-gradient(180deg, var(--oz-green-soft), #FFFFFF);
  border-color: var(--oz-line);
  box-shadow: 0 6px 14px -10px rgba(11, 127, 88, .55);
}

body[data-user-id] .app-shell__workspace {
  background: var(--oz-page);
  padding: calc(var(--app-header-height) + 28px) 32px 40px;
}

body[data-user-id] .app-tabbar { display: none; }

/* ── Mobile shell ── */
@media (max-width: 767px) {
  body[data-user-id] {
    --app-main-offset: 0px;
    --app-header-height: 60px;
    --app-tabbar-height: 74px;
  }
  body[data-user-id][data-shell-tabs] { --app-header-height: 116px; }
  body[data-user-id] .app-sidebar,
  body[data-user-id] .app-shell__overlay { display: none !important; }
  body[data-user-id] .app-shell__main { margin-left: 0; }
  body[data-user-id] .app-header {
    left: 0;
    width: 100%;
    padding: 0;
  }
  body[data-user-id] .app-header__row {
    height: 60px;
    flex-basis: 60px;
    gap: 6px;
    padding: 0 10px 0 16px;
  }
  body[data-user-id] .app-header__left { gap: 4px; }
  body[data-user-id] .app-header__right { gap: 0; }
  body[data-user-id] .app-header__title { font-size: 22px; }
  body[data-user-id] .app-header__title--dashboard { display: none; }
  body[data-user-id] .app-header__search { display: none; }
  body[data-user-id] .app-header__icon-btn,
  body[data-user-id] .app-header__icon-btn.app-header__search-btn,
  body[data-user-id] .app-header__icon-btn.app-header__back {
    display: flex;
    border: 0;
    background: transparent;
    border-radius: 12px;
  }
  body[data-user-id] .app-header__back { margin-left: -10px; }
  body[data-user-id] .app-header__brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--oz-ink);
    text-decoration: none;
  }
  body[data-user-id] .app-header__brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    overflow: hidden;
    flex: 0 0 36px;
  }
  body[data-user-id] .app-header__brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
  body[data-user-id] .app-header__brand-name {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-left: 4px;
  }
  body[data-user-id] .app-header__brand-name span { color: var(--oz-green-bright); }

  body[data-user-id] .app-tabs {
    height: 48px;
    flex-basis: 48px;
    margin: 0 12px 8px;
    padding: 4px;
  }
  body[data-user-id] .app-tabs__tab { flex: 1 0 auto; height: 38px; gap: 5px; padding: 0 8px; font-size: 13px; }
  body[data-user-id] .app-tabs__ic { width: 16px; height: 16px; }

  body[data-user-id] .app-shell__workspace {
    padding: calc(var(--app-header-height) + 22px) 16px calc(var(--app-tabbar-height) + 24px);
  }

  body[data-user-id] .app-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 115;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    height: calc(74px + env(safe-area-inset-bottom, 0px));
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    background: #FFFFFF;
    border-top: 1px solid var(--oz-line);
    box-sizing: border-box;
  }
  body[data-user-id] .app-tabbar__tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 800;
    color: var(--oz-muted-2);
    text-decoration: none;
  }
  body[data-user-id] .app-tabbar__tab .app-sidebar__svg { width: 24px; height: 24px; }
  body[data-user-id] .app-tabbar__tab.is-active { color: var(--oz-green); }
}

/* ==========================================================================
   Shared components (oz-*) — use these in page templates.
   Values mirror the design's utility classes (.card, .btn, .tag, .ic, …).
   ========================================================================== */

/* Page wrapper inside the app workspace: vertical stack like the design's .bd */
.oz-page { display: flex; flex-direction: column; gap: 24px; max-width: 1376px; margin: 0 auto; width: 100%; }
@media (max-width: 767px) { .oz-page { gap: 18px; } }

.oz-display { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; color: var(--oz-ink); }
.oz-h1 { margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; font-size: 30px; line-height: 1.15; color: var(--oz-ink); }
.oz-h2 { margin: 0; font-family: var(--font-body); font-size: 19px; font-weight: 800; letter-spacing: 0; line-height: 1.3; color: var(--oz-ink); }
.oz-muted { color: var(--oz-muted); }
.oz-eyebrow { font-size: 12px; font-weight: 800; color: var(--oz-green); text-transform: uppercase; letter-spacing: 0.08em; }
.oz-section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.oz-section-head a { font-size: 14px; font-weight: 800; color: var(--oz-green); text-decoration: none; }
@media (max-width: 767px) { .oz-h1 { font-size: 26px; } .oz-h2 { font-size: 18px; } }

.oz-card { background: #FFFFFF; border: 1px solid var(--oz-line); border-radius: 20px; }
.oz-card--dark { background: var(--oz-ink); border-color: var(--oz-ink); color: #FFFFFF; border-radius: 22px; }
.oz-card--dark .oz-muted { color: var(--oz-on-dark-muted); }

.oz-btn {
  height: 46px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  font: 800 15px var(--font-body);
  border: 1px solid transparent;
  box-sizing: border-box;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.oz-btn--primary { background: var(--oz-green); color: #FFFFFF; }
.oz-btn--primary:hover { background: var(--oz-green-dark); color: #FFFFFF; }
.oz-btn--secondary { background: #FFFFFF; color: var(--oz-ink); border-color: var(--oz-line); }
.oz-btn--secondary:hover { border-color: var(--oz-green); color: var(--oz-green); }
.oz-btn--yellow { background: var(--oz-yellow); color: var(--oz-ink); }
.oz-btn--yellow:hover { background: #EAB308; color: var(--oz-ink); }
.oz-btn--ghost-dark { background: transparent; color: #FFFFFF; border-color: #2C5A48; }
.oz-btn--lg { height: 52px; padding: 0 24px; font-size: 16px; border-radius: 14px; }
.oz-btn--sm { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.oz-btn--block { width: 100%; }
.oz-btn:disabled { opacity: .55; cursor: not-allowed; }

.oz-tag { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 8px; font-size: 12px; font-weight: 800; white-space: nowrap; line-height: 1.2; }
.oz-tag--green { background: var(--oz-green-soft); color: var(--oz-green-dark); }
.oz-tag--yellow { background: var(--oz-yellow-soft); color: var(--oz-yellow-ink); }
.oz-tag--neutral { background: #F0F3F1; color: var(--oz-ink-2); }
.oz-tag--red { background: #FDECEA; color: #9A1C13; }
.oz-tag--solid { background: var(--oz-green); color: #FFFFFF; }
.oz-tag--white { background: #FFFFFF; color: var(--oz-green-dark); }
.oz-tag--ink { background: var(--oz-ink); color: #FFFFFF; }
.oz-tag--sun { background: var(--oz-yellow); color: var(--oz-ink); }

.oz-ic {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--oz-green-soft);
  color: var(--oz-green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.oz-ic--lg { width: 56px; height: 56px; border-radius: 16px; }
.oz-ic--yellow { background: var(--oz-yellow); color: var(--oz-ink); }
.oz-ic--dark { background: var(--oz-ink); color: var(--oz-yellow); }

.oz-chip {
  height: 38px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 99px;
  border: 1px solid var(--oz-line);
  background: #FFFFFF;
  font: 700 14px var(--font-body);
  color: var(--oz-ink);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
.oz-chip:hover { border-color: var(--oz-green); }
.oz-chip.is-on, .oz-chip[aria-pressed="true"] { background: var(--oz-ink); color: #FFFFFF; border-color: var(--oz-ink); }
.oz-chips { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 767px) { .oz-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; } .oz-chips::-webkit-scrollbar { display: none; } }

.oz-progress { height: 8px; border-radius: 99px; background: var(--oz-green-soft); overflow: hidden; }
.oz-progress > span { display: block; height: 100%; border-radius: 99px; background: var(--oz-green-bright); }

.oz-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--oz-line);
  background: #FFFFFF;
  font: 600 15px var(--font-body);
  color: var(--oz-ink);
  box-sizing: border-box;
  outline: none;
}
.oz-input:focus { border-color: var(--oz-green-bright); box-shadow: 0 0 0 3px rgba(14, 159, 110, 0.15); }
.oz-label { font-size: 13px; font-weight: 800; color: var(--oz-ink); }

.oz-row { display: flex; gap: 14px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--oz-line-soft); }
.oz-row:last-child { border-bottom: 0; }

.oz-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--oz-yellow);
  color: var(--oz-ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.oz-avatar img { width: 100%; height: 100%; object-fit: cover; }

.oz-empty { padding: 32px; text-align: center; color: var(--oz-muted); font-weight: 700; }


/* ── Legacy in-app headings: lowest specificity so page styles always win ── */
:where(body[data-user-id] .app-shell__workspace) :is(h2, h3, h4) {
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: -0.005em;
}

/* Mobile safety net: desktop grids use align-items:start; when they collapse
   into one column the cards must still span the full width (design M-screens). */
@media (max-width: 767px) {
  body[data-user-id] .app-shell__workspace :is(.oz-card, section, [class*="__col"], [class*="__card"]) {
    align-self: stretch;
    justify-self: stretch;
  }
}

/* Page stylesheets (e.g. oz-roadmaps.css) restyle .lang-switcher; keep the shell's colours. */
body[data-user-id] .app-sidebar .app-sidebar__utility-btn.lang-switcher,
body[data-user-id] .app-sidebar .app-sidebar__utility-btn.lang-switcher #langLabel { color: var(--oz-muted); background: transparent; border: 0; box-shadow: none; }
body[data-user-id] .app-sidebar .app-sidebar__utility-btn.lang-switcher:hover { color: var(--oz-ink); background: var(--oz-page); }

/* Tablet / small laptop: give the page title room — shrink, then hide the search field. */
@media (max-width: 1180px) and (min-width: 768px) {
  body[data-user-id] .app-header__search input { width: 240px; }
}
@media (max-width: 960px) and (min-width: 768px) {
  body[data-user-id] .app-header__search { display: none; }
  body[data-user-id] .app-header__icon-btn.app-header__search-btn { display: flex; }
}

/* Сообщения: a sidebar item on a computer; on the phone a header button next to the bell. */
body[data-user-id] .app-header__msgs { display: none; }
@media (max-width: 767px) { body[data-user-id] .app-header__msgs { display: inline-flex; } }

/* ── Phone polish: a calmer top bar and scrollable section pills ── */
@media (max-width: 767px) {
  /* Top bar: title gets the room; «Что здесь?» lives in Профиль → Тур по сайту on the phone. */
  body[data-user-id] .app-header__help { display: none; }
  body[data-user-id] .app-header__title { font-size: 19px; letter-spacing: -0.01em; }
  body[data-user-id] .app-header__row { gap: 4px; padding: 0 8px 0 16px; }
  body[data-user-id] .app-header__icon-btn,
  body[data-user-id] .app-header__icon-btn.app-header__search-btn,
  body[data-user-id] .app-header__icon-btn.app-header__back { width: 40px; height: 40px; flex: 0 0 40px; }
  body[data-user-id] .app-header__badge { top: 8px; right: 8px; }
  body[data-user-id] .app-header .game-hud { margin: 0 2px; }

  /* Section tabs: a row of pills that scrolls sideways, fading out at the edge. */
  body[data-user-id][data-shell-tabs] { --app-header-height: 112px; }
  body[data-user-id] .app-tabs {
    height: 44px;
    flex-basis: 44px;
    margin: 0 0 8px;
    padding: 2px 16px;
    gap: 6px;
    background: transparent;
    border: 0;
    border-radius: 0;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 16px;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  }
  body[data-user-id] .app-tabs__tab {
    flex: 0 0 auto;
    height: 38px;
    padding: 0 14px;
    gap: 6px;
    font-size: 13.5px;
    color: var(--oz-ink);
    background: #FFFFFF;
    border: 1px solid var(--oz-line);
    border-radius: 999px;
    scroll-snap-align: start;
  }
  body[data-user-id] .app-tabs__tab:last-child { margin-right: 20px; }
  body[data-user-id] .app-tabs__tab .app-tabs__ic { color: var(--oz-green); }
  body[data-user-id] .app-tabs__tab.is-active {
    color: #FFFFFF;
    background: var(--oz-green);
    border-color: var(--oz-green);
    box-shadow: 0 6px 14px -8px rgba(11, 127, 88, .6);
  }
  body[data-user-id] .app-tabs__tab.is-active .app-tabs__ic { color: #FFFFFF; }
}
