/* TazaQala — общий стиль публичной части («мягкая эко-эстетика + жидкое стекло»).
   Здесь — токены, стекло, кнопки, шапка, подвал и мобильное меню.
   Правила конкретной страницы живут в её шаблоне (block extra_css).

   Пороги вместо контейнерных запросов дизайна — обычные media-запросы:
   container-type на корне делает его containing block для position:fixed
   (ломает модалки, мобильное меню, fullscreen карты). cqi без контейнера
   считается от ширины окна — для полноширинной страницы это то же самое. */

:root {
    --tq-bg: #F4F7F1;
    --tq-ink: #0F2A1D;
    --tq-text-2: #3E5046;
    --tq-text-3: #4B5B52;
    --tq-text-photo: #34463B;
    --tq-primary: #17663F;
    --tq-primary-hover: #0F4A2D;
    --tq-accent: #1F7A4A;
    --tq-footer: #0F2A1D;

    --tq-cleaned: #22A06B;
    --tq-cleaned-bg: #E1F5EA;
    --tq-cleaned-ink: #146140;
    --tq-work: #1597B0;
    --tq-work-bg: #E0F2F6;
    --tq-work-ink: #0D6478;
    --tq-wait: #F2B705;
    --tq-wait-bg: #FFF4D6;
    --tq-wait-ink: #8A5A00;
    /* «В работе» — красный: на карте сразу видно, где сейчас идёт уборка */
    --tq-pending: #E5484D;
    --tq-pending-bg: #FDE7E7;
    --tq-pending-ink: #B42318;
    --tq-error: #A3261C;
    --tq-error-bg: #FBE3E0;

    --tq-font-head: 'Montserrat', 'Segoe UI', sans-serif;
    --tq-font-body: 'Onest', 'Segoe UI', system-ui, sans-serif;

    /* Старые переменные — для страниц, которые ещё не переведены
       на новый дизайн (профиль, новая заявка, кабинет клинера). */
    --kz-blue: #17663F;
    --kz-blue-dark: #0F4A2D;
    --kz-gold: #F2B705;
    --kz-gold-dark: #8A5A00;
    --green-lime: #22A06B;
    --blue-ice: #1597B0;
    --white: #FFFFFF;
    --graphite: #0F2A1D;
    --apple-red: #A3261C;
    --bg-light: #F4F7F1;
    --shadow: rgba(18, 58, 38, 0.10);
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--tq-bg);
    color: var(--tq-ink);
    font-family: var(--tq-font-body);
    font-size: 16px;
    line-height: 1.55;
}

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

.tq-page { overflow-x: clip; }

.tq-h1, .tq-h2, .tq-h3 {
    margin: 0;
    font-family: var(--tq-font-head);
    font-weight: 800;
    letter-spacing: -0.03em;
    text-wrap: balance;
}
.tq-h1 { font-size: clamp(36px, 4.6cqi, 64px); line-height: 1.05; letter-spacing: -0.035em; }
.tq-h2 { font-size: clamp(30px, 3.6cqi, 52px); line-height: 1.08; }
.tq-h3 { font-size: clamp(22px, 2cqi, 28px); line-height: 1.15; letter-spacing: -0.02em; }
.tq-accent { color: var(--tq-accent); }
.tq-eyebrow {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tq-primary);
}
.tq-lead { margin: 0; font-size: clamp(17px, 1.4cqi, 20px); color: var(--tq-text-2); text-wrap: pretty; }
.tq-muted { color: var(--tq-text-3); }

.tq-wrap { max-width: 1320px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* ── Стекло ─────────────────────────────────────────────── */
.glass {
    background: rgba(255, 255, 255, 0.34);
    -webkit-backdrop-filter: blur(22px) saturate(170%);
    backdrop-filter: blur(22px) saturate(170%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(255, 255, 255, 0.3), 0 24px 60px rgba(18, 58, 38, 0.16);
}
.glass-soft {
    background: rgba(255, 255, 255, 0.58);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: inset 0 1px 0 #FFFFFF, 0 16px 40px rgba(18, 58, 38, 0.10);
}
.glass-dark {
    background: rgba(10, 40, 26, 0.34);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
    backdrop-filter: blur(22px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 24px 60px rgba(0, 0, 0, 0.2);
}
.sheen { background: linear-gradient(135deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 42%); }
.bottom-fade { background: linear-gradient(0deg, #F4F7F1 0%, rgba(244, 247, 241, 0) 100%); }

/* Мягкие цветные пятна позади стекла на страницах без фото */
.tq-blob { position: absolute; border-radius: 50%; pointer-events: none; }
.tq-blob-green { background: radial-gradient(circle, rgba(126, 200, 150, 0.45) 0%, rgba(126, 200, 150, 0) 70%); }
.tq-blob-blue { background: radial-gradient(circle, rgba(120, 190, 220, 0.35) 0%, rgba(120, 190, 220, 0) 70%); }
.tq-blob-sun { background: radial-gradient(circle, rgba(242, 183, 5, 0.22) 0%, rgba(242, 183, 5, 0) 70%); }

.lift { transition: transform .2s ease, box-shadow .2s ease; }
.lift:hover { transform: translateY(-2px); }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.floaty { animation: floaty 6s ease-in-out infinite; }
@keyframes up { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.in { animation: up 1s cubic-bezier(.2, .7, .2, 1) both; }

/* ── Кнопки-пилюли ──────────────────────────────────────── */
.tq-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 54px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    font-family: inherit;
    font-weight: 600;
    font-size: 16px;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.tq-btn:hover { transform: translateY(-2px); }
.tq-btn-primary {
    background: var(--tq-primary);
    color: #FFFFFF;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 12px 28px rgba(23, 102, 63, 0.3);
}
.tq-btn-primary:hover { background: var(--tq-primary-hover); color: #FFFFFF; }
.tq-btn-ghost { color: var(--tq-ink); }
.tq-btn-ghost:hover { color: var(--tq-ink); }
.tq-btn-lg { height: 62px; padding: 0 28px; font-size: 18px; gap: 12px; }
.tq-btn-sm { height: 46px; padding: 0 20px; font-size: 15px; }
.tq-btn-block { width: 100%; }

/* Статусы заявок */
.tq-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}
.tq-status::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex: none; }
.tq-status-cleaned { background: var(--tq-cleaned-bg); color: var(--tq-cleaned-ink); }
.tq-status-work { background: var(--tq-pending-bg); color: var(--tq-pending-ink); }
.tq-status-wait { background: var(--tq-wait-bg); color: var(--tq-wait-ink); }
.tq-status-error { background: var(--tq-error-bg); color: var(--tq-error); }

/* ── Шапка ──────────────────────────────────────────────── */
.site-header { position: relative; z-index: 50; }
/* Главная: шапка лежит поверх фото первого экрана */
body.has-hero .site-header { position: absolute; left: 0; right: 0; top: 0; }

.site-header-inner {
    max-width: 1480px;
    margin: 0 auto;
    padding: 22px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: none;
    text-decoration: none;
    color: var(--tq-ink);
}
.site-logo:hover { color: var(--tq-ink); }
.site-logo img { width: 52px; height: 52px; display: block; }
.site-logo span { font-family: var(--tq-font-head); font-weight: 800; font-size: 25px; letter-spacing: -0.02em; }

.site-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 5px;
    border-radius: 999px;
}
.site-nav a {
    padding: 9px 13px;
    border-radius: 999px;
    font-weight: 500;
    font-size: 15px;
    color: var(--tq-ink);
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s ease;
}
.site-nav a:hover { background: rgba(255, 255, 255, 0.7); color: var(--tq-ink); }
.site-nav a.is-active { background: var(--tq-primary); color: #FFFFFF; font-weight: 600; }

.site-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    font-family: inherit;
    font-weight: 600;
    font-size: 15px;
    color: var(--tq-ink);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}
.pill:hover { color: var(--tq-ink); }
button.pill { border: 1px solid rgba(255, 255, 255, 0.8); }
.pill-icon { width: 46px; padding: 0; justify-content: center; font-size: 19px; position: relative; }

.nav-chip { color: var(--tq-primary) !important; }

.nav-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--tq-error);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 700;
    line-height: 19px;
    text-align: center;
}

.site-cta { height: 50px; padding: 0 22px; }
.site-cta svg { flex: none; }
.site-cta-short { display: none; }
.site-cta-ico { display: none; }
/* Залогиненным в полосе тесно (аватар, колокольчик, «Админ») — короткая подпись */
.site-header:has(.account-menu) .site-cta-full { display: none; }
.site-header:has(.account-menu) .site-cta-short { display: inline; }
@media (min-width: 1700px) {
    .site-header:has(.account-menu) .site-cta-full { display: inline; }
    .site-header:has(.account-menu) .site-cta-short { display: none; }
}
.nav-chip { width: 46px; padding: 0; justify-content: center; font-size: 18px; }

.burger {
    display: none;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    color: var(--tq-ink);
    border-radius: 50%;
    cursor: pointer;
    flex: none;
}

/* Выпадающие меню: аккаунт и язык */
.menu { position: relative; flex: none; }
.menu-caret { font-size: 11px; transition: transform .2s; }
.menu-trigger[aria-expanded="true"] .menu-caret { transform: rotate(180deg); }
.menu-panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 230px;
    padding: 6px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(22px) saturate(170%);
    backdrop-filter: blur(22px) saturate(170%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 24px 60px rgba(18, 58, 38, 0.18);
    z-index: 60;
}
.menu-panel-narrow { min-width: 140px; }
.menu-panel.open { display: block; }
.menu-head { display: flex; flex-direction: column; padding: 10px 14px 12px; }
.menu-head-name { font-weight: 700; }
.menu-head-meta { font-size: 13px; font-weight: 600; color: var(--tq-primary); }
.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 14px;
    color: var(--tq-ink);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    white-space: nowrap;
}
.menu-item:hover { background: rgba(23, 102, 63, 0.08); color: var(--tq-primary); }
.menu-item.active { color: var(--tq-primary); font-weight: 700; justify-content: space-between; }
.menu-item-danger:hover { background: var(--tq-error-bg); color: var(--tq-error); }
.menu-sep { height: 1px; margin: 4px 10px; background: rgba(15, 42, 29, 0.08); }
.account-avatar {
    width: 32px;
    height: 32px;
    margin-left: -10px;
    border-radius: 50%;
    background: var(--tq-primary);
    color: #FFFFFF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--tq-font-head);
    font-weight: 800;
    font-size: 14px;
}

/* ── Мобильная панель (бургер) ──────────────────────────── */
.mnav-overlay {
    position: fixed;
    inset: 0;
    z-index: 900;
    background: rgba(15, 42, 29, 0.35);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s;
}
.mnav {
    position: fixed;
    top: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 901;
    width: min(400px, calc(100vw - 24px));
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px;
    overflow-y: auto;
    border-radius: 30px;
    background: rgba(244, 247, 241, 0.94);
    -webkit-backdrop-filter: blur(24px) saturate(170%);
    backdrop-filter: blur(24px) saturate(170%);
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 30px 80px rgba(15, 42, 29, 0.28);
    transform: translateX(calc(100% + 24px));
    visibility: hidden;
    transition: transform .3s cubic-bezier(.2, .7, .2, 1), visibility .3s;
}
body.nav-open { overflow: hidden; }
body.nav-open .mnav-overlay { opacity: 1; visibility: visible; }
body.nav-open .mnav { transform: none; visibility: visible; }

.mnav-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mnav-title {
    padding: 14px 12px 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tq-text-3);
}
.mnav a.mnav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 50px;
    padding: 10px 14px;
    border-radius: 16px;
    color: var(--tq-ink);
    text-decoration: none;
    font-weight: 500;
    font-size: 17px;
}
.mnav a.mnav-link i { width: 22px; text-align: center; font-size: 18px; color: var(--tq-primary); }
.mnav a.mnav-link:hover { background: rgba(255, 255, 255, 0.8); }
.mnav a.mnav-link.is-active { background: var(--tq-primary); color: #FFFFFF; font-weight: 600; }
.mnav a.mnav-link.is-active i { color: #FFFFFF; }
.mnav a.mnav-danger, .mnav a.mnav-danger i { color: var(--tq-error); }
.mnav .nav-badge { position: static; margin-left: auto; }
.mnav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 20px;
}
.mnav-user .account-avatar { width: 44px; height: 44px; margin: 0; font-size: 18px; }
.mnav-auth { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 6px 0; }
.mnav-auth .tq-btn { height: 50px; padding: 0 12px; }
.mnav-lang { display: flex; gap: 8px; }
.mnav-lang a {
    flex: 1;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    color: var(--tq-ink);
    text-decoration: none;
}
.mnav-lang a.active { background: var(--tq-primary); color: #FFFFFF; }
.mnav .tq-btn-primary { margin-top: 10px; }

/* ── Флеш-сообщения ─────────────────────────────────────── */
.flash-messages { position: relative; z-index: 40; max-width: 1320px; margin: 0 auto 8px; padding: 0 24px; }
body.has-hero .flash-messages { position: absolute; top: 104px; left: 0; right: 0; }
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding: 14px 20px;
    border-radius: 20px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 16px 40px rgba(18, 58, 38, 0.10);
    animation: up .4s ease both;
}
.alert-success { color: var(--tq-cleaned-ink); }
.alert-danger, .alert-error { color: var(--tq-error); }
.alert-info { color: var(--tq-work-ink); }
.alert-warning { color: var(--tq-wait-ink); }

/* ── Подвал ─────────────────────────────────────────────── */
.site-footer { position: relative; overflow: hidden; background: var(--tq-footer); color: #FFFFFF; margin-top: 0; }
.site-footer-leaf { position: absolute; right: -40px; bottom: -50px; width: 320px; height: 320px; opacity: 0.08; transform: rotate(-30deg); pointer-events: none; }
.site-footer-grid {
    position: relative;
    max-width: 1320px;
    margin: 0 auto;
    padding: 64px 24px 36px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: 40px;
}
.site-footer-col { display: flex; flex-direction: column; gap: 10px; }
.site-footer-col a { color: #FFFFFF; text-decoration: none; }
.site-footer-col a:hover { color: #9FD7B5; }
.site-footer-head { font-weight: 700; color: #9FD7B5; margin-bottom: 4px; }
.site-footer-brand { display: flex; align-items: center; gap: 12px; }
.site-footer-brand > span:first-child { width: 50px; height: 50px; border-radius: 50%; background: #FFFFFF; display: flex; align-items: center; justify-content: center; }
.site-footer-brand img { width: 40px; height: 40px; }
.site-footer-brand > span:last-child { font-family: var(--tq-font-head); font-weight: 800; font-size: 23px; }
.site-footer-note { margin: 0; color: #C5D6CB; max-width: 22em; }
.site-footer-small { color: #C5D6CB; font-size: 14px; line-height: 1.45; }
.site-footer-bottom {
    position: relative;
    max-width: 1320px;
    margin: 0 auto;
    padding: 20px 24px 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    color: #C5D6CB;
}
.site-footer-bottom a { color: #C5D6CB; text-decoration: none; }
.site-footer-bottom a:hover, .site-footer-bottom a[aria-current] { color: #FFFFFF; }

/* ── Совместимость со страницами, ещё не переведёнными на новый дизайн ── */
.container { max-width: 1320px; margin: 0 auto; padding: 24px; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border: 0;
    border-radius: 999px;
    font-family: inherit;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--tq-primary); color: #FFFFFF; box-shadow: 0 10px 24px rgba(23, 102, 63, 0.25); }
.btn-primary:hover { background: var(--tq-primary-hover); color: #FFFFFF; }
.btn-secondary { background: var(--tq-work); color: #FFFFFF; }
.btn-secondary:hover { background: var(--tq-work-ink); color: #FFFFFF; }
.btn-success { background: var(--tq-cleaned); color: #FFFFFF; }
.btn-outline { background: transparent; border: 2px solid var(--tq-primary); color: var(--tq-primary); }
.btn-outline:hover { background: var(--tq-primary); color: #FFFFFF; }

/* ── Адаптивность ───────────────────────────────────────── */
/* Полоса меню целиком помещается примерно от 1280px; уже — бургер */
@media (max-width: 1280px) {
    .site-nav { display: none !important; }
    .burger { display: flex; }
}
@media (max-width: 1100px) {
    .hide-md { display: none !important; }
}
/* Казахские подписи длиннее, а у админа/модератора/клинера в полосе
   ещё «Админ», колокольчик и аватар — бургер включается раньше */
@media (max-width: 1400px) {
    html[lang="kk"] .site-nav,
    .site-header-extended .site-nav,
    .site-header-extended .hide-md { display: none !important; }
    html[lang="kk"] .burger,
    .site-header-extended .burger { display: flex; }
}
@media (max-width: 620px) {
    .hide-sm { display: none !important; }
    .site-header-inner { gap: 12px; padding-left: 16px; padding-right: 16px; }
    /* Шапка на телефоне: логотип с названием, круглые кнопки «камера» и «меню» */
    .site-logo { gap: 10px; }
    .site-logo img { width: 46px; height: 46px; }
    .site-logo span { display: inline; font-size: 22px; }
    .site-cta { width: 50px; height: 50px; padding: 0; border-radius: 50%; justify-content: center; box-shadow: 0 8px 20px rgba(23,102,63,0.3); }
    .site-cta .site-cta-full, .site-cta .site-cta-short, .site-cta > svg:not(.site-cta-ico) { display: none !important; }
    .site-cta .site-cta-ico { display: block; }
    .burger { width: 50px; height: 50px; background: rgba(255,255,255,0.88); box-shadow: 0 6px 18px rgba(15,42,29,0.12); }
    /* Верх страницы — панорама гор, плавно уходящая в фон */
    body:not(.has-hero) > .tq-page {
        background:
            linear-gradient(180deg, rgba(244,247,241,0.42) 0px, rgba(244,247,241,0.2) 200px, rgba(244,247,241,0.6) 400px, var(--tq-bg) 640px),
            url("../img/tq/hero-mobile.jpg") center top / 100% auto no-repeat,
            var(--tq-bg);
    }
    /* Декоративные пятна страниц не обрезаются по верхнему краю — иначе на панораме виден шов */
    body:not(.has-hero) > .tq-page main > .tq-page { overflow: visible; overflow-x: clip; }
    .tq-wrap, .flash-messages { padding-left: 16px; padding-right: 16px; }
    .container { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .in, .floaty { animation: none; }
    .lift, .tq-btn, .mnav, .mnav-overlay { transition: none; }
}
