/* ========================================================
   EDITORIAL BOUTIQUE — CABINET & CLIENT HUB (V5.1 LUXURY)
   ======================================================== */

   :root {
    --wine-primary: #3E101D;
    --wine-hover: #5A162B;
    --wine-soft: #F7EFF2;
    --text-main: #1C1917;
    --text-muted: #78716C;
    --gold-accent: #9A7B56;
    --gold-light: #F7F4EF;
    --card-bg: #FFFFFF;
    --card-border: rgba(62, 16, 29, 0.08);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    --page-bg: #FAF9F6;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
}

/* 1. БАЗОВАЯ СТРУКТУРА */
html, body {
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.cabinet-page {
    width: 100%;
    min-height: 100vh;
    padding-top: 110px;
    padding-bottom: 90px;
    background-color: var(--page-bg);
}

.cabinet-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 2. ШАПКА ПРОФИЛЯ */
.cabinet-hero-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #FFFFFF;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 20px 28px;
    margin-bottom: 24px;
    box-shadow: var(--card-shadow);
}

.cabinet-user-badge {
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-avatar {
    width: 54px;
    height: 54px;
    background: var(--wine-soft);
    border: 1.5px solid var(--wine-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.dash-greeting {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    font-weight: 600;
    color: var(--wine-primary);
    line-height: 1.15;
    margin: 0 0 4px;
}

.profile-status-pill {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gold-accent);
    background: var(--gold-light);
    padding: 3px 10px;
    border-radius: 100px;
    border: 1px solid rgba(154, 123, 86, 0.2);
    display: inline-block;
}

.btn-logout-top {
    background: transparent;
    border: 1px solid rgba(192, 57, 43, 0.2);
    color: #C0392B;
    padding: 8px 16px;
    border-radius: 100px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-logout-top:hover {
    background: #FFF5F5;
    border-color: #C0392B;
}

/* 3. МОБИЛЬНОЕ МЕНЮ (Скрыто на ПК) */
.cabinet-mobile-nav-wrap {
    display: none;
}

/* 4. ДЕСКТОПНЫЙ ЛАЙАУТ */
.cabinet-layout {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

.cabinet-desktop-sidebar {
    width: 250px;
    flex-shrink: 0;
    background: #FFFFFF;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 10px;
    box-shadow: var(--card-shadow);
    position: sticky;
    top: 110px;
}

.cab-nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}

.cab-nav-item:hover {
    background: var(--wine-soft);
    color: var(--wine-primary);
}

.cab-nav-item.active {
    background: var(--wine-primary);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(62, 16, 29, 0.2);
}

.cab-nav-icon {
    font-size: 16px;
}

.cabinet-main {
    flex: 1;
    min-width: 0;
}

.cab-tab-pane {
    display: none;
    animation: cabFadeIn 0.25s ease-out;
}
.cab-tab-pane.active { display: block; }

@keyframes cabFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 5. БЫСТРЫЙ ХАБ-ПЛИТКА (ДЛЯ ОБЗОРА) */
.cab-quick-hub-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.hub-tile {
    background: #FFFFFF;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

.hub-tile:hover {
    border-color: var(--wine-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(62, 16, 29, 0.08);
}

.hub-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.hub-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.hub-title {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 2px;
}

.hub-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.hub-arrow {
    font-size: 16px;
    font-weight: 700;
    color: var(--gold-accent);
}

/* 6. БЕНТО-СЕТКА И КАРТОЧКИ */
.cab-bento-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.cab-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--card-shadow);
    min-width: 0;
}

.cab-card.span-full {
    grid-column: 1 / -1;
}

.cab-card.highlight-order {
    border-color: rgba(62, 16, 29, 0.2);
    background: radial-gradient(circle at 100% 0%, #FAF6F7 0%, #FFFFFF 60%);
}

.cab-card-header {
    margin-bottom: 16px;
}

.cab-card-tag {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold-accent);
    display: block;
    margin-bottom: 4px;
}

.cab-card-tag.light {
    color: #E2DDD5;
}

.cab-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--wine-primary);
    margin: 0;
    line-height: 1.2;
}

.cab-card-title.light {
    color: #FFFFFF;
}

.cab-card-desc {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0 0 16px;
}

/* 7. ФОРМЫ, ПОЛЯ ВВОДА */
.cab-form-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.cab-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cab-form-row-three {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.cab-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
}

.cab-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid rgba(62, 16, 29, 0.12);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-main);
    background: #FFFFFF;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.cab-input:focus {
    border-color: var(--wine-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(62, 16, 29, 0.08);
}

.cab-select {
    cursor: pointer;
}

/* Кнопки */
.cab-btn-primary {
    background: var(--wine-primary);
    color: #FFFFFF;
    border: none;
    padding: 13px 24px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 16px rgba(62, 16, 29, 0.2);
    width: 100%;
}

.cab-btn-primary:hover {
    background: var(--wine-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(62, 16, 29, 0.3);
}

.cab-action-link {
    display: inline-block;
    margin-top: 12px;
    color: var(--wine-primary);
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
}
.cab-action-link:hover { text-decoration: underline; }

/* Блок аллергий */
.alert-card {
    background: #FFF8F7;
    border: 1.5px solid #F0C4C1;
    margin-bottom: 20px;
}

.alert-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: #C0392B;
    margin-bottom: 6px;
}

.alert-title {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    color: #9E3B43;
    margin: 0 0 6px;
}

.alert-desc {
    font-size: 13px;
    line-height: 1.5;
    color: #7A5558;
    margin: 0 0 12px;
}

.alert-input {
    border-color: #E5B4B0;
    background: #FFFFFF;
}

/* Тумблеры */
.cab-toggles-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(62, 16, 29, 0.06);
}

.cab-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.toggle-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2px;
}

.toggle-sub {
    font-size: 12px;
    color: var(--text-muted);
}

.cab-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.cab-switch input { opacity: 0; width: 0; height: 0; }

.cab-slider {
    position: absolute; cursor: pointer; inset: 0;
    background-color: #E2DDD5;
    transition: .3s;
    border-radius: 34px;
}
.cab-slider:before {
    position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
input:checked + .cab-slider { background-color: var(--wine-primary); }
input:checked + .cab-slider:before { transform: translateX(20px); }

/* Банковская карта */
.cab-bank-card {
    background: linear-gradient(135deg, #1E1C1A 0%, #3E101D 100%);
    border-radius: 20px;
    padding: 22px;
    color: #FFFFFF;
    box-shadow: 0 12px 28px rgba(62, 16, 29, 0.2);
    margin-bottom: 12px;
}

.bank-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.bank-card-chip { font-size: 24px; }

.bank-card-unlink-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #FFFFFF;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: 0.2s;
}
.bank-card-unlink-btn:hover { background: rgba(255, 255, 255, 0.3); }

.bank-card-type {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    margin-bottom: 4px;
}

.bank-card-number {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 3px;
    font-family: monospace;
}

.bank-card-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #2E7D32;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2E7D32;
}

.cab-empty-card-box {
    text-align: center;
    padding: 30px 16px;
    background: var(--page-bg);
    border: 1px dashed var(--card-border);
    border-radius: var(--radius-md);
}
.empty-card-icon { font-size: 36px; margin-bottom: 8px; opacity: 0.7; }
.empty-card-title { font-family: 'Playfair Display', serif; font-size: 17px; margin: 0 0 4px; color: var(--wine-primary); }
.empty-card-desc { font-size: 12.5px; color: var(--text-muted); margin: 0 0 16px; }

/* Скроллы, наборы */
.cab-scroll-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
}
.cab-scroll-row::-webkit-scrollbar { display: none; }

.cab-kit-chips-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    margin-bottom: 16px;
}
.cab-kit-chips-scroll::-webkit-scrollbar { display: none; }

.kit-chip {
    padding: 7px 16px;
    border-radius: 100px;
    background: #FFFFFF;
    border: 1px solid var(--card-border);
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.kit-chip:hover { border-color: var(--wine-primary); color: var(--wine-primary); }
.kit-chip.active {
    background: var(--wine-primary);
    color: #FFFFFF;
    border-color: var(--wine-primary);
    box-shadow: 0 4px 12px rgba(62, 16, 29, 0.2);
}

.kit-preview-panel {
    background: var(--page-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 18px;
}

.kit-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 14px;
    gap: 12px;
}

.kit-preview-title {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    color: var(--wine-primary);
    margin: 0 0 4px;
}

.kit-preview-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

.kit-preview-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--wine-primary);
}

.kit-product-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 72px;
    flex-shrink: 0;
}

.kit-img-frame {
    width: 64px;
    height: 64px;
    background: #FFFFFF;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.kit-product-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.kit-item-qty {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Заказы */
.cab-orders-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cab-order-item {
    background: #FFFFFF;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 18px 20px 18px 26px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.order-status-stripe {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
}

.order-main-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.order-id-title {
    font-family: 'Playfair Display', serif;
    font-size: 17px;
    color: var(--text-main);
    margin: 0 0 2px;
}

.order-date-status {
    font-size: 12.5px;
    color: var(--text-muted);
}

.order-price-val {
    font-size: 18px;
    font-weight: 800;
    color: var(--wine-primary);
}

.order-footer-note {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
}

/* Бонусы и рефералка */
.cab-referral-banner {
    background: var(--gold-light);
    border: 1.5px dashed rgba(154, 123, 86, 0.4);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
}

.ref-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold-accent);
    margin-bottom: 6px;
}

.ref-code-value {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 3px;
    color: var(--wine-primary);
    margin-bottom: 12px;
    font-family: monospace;
}

.cab-copy-btn {
    background: #FFFFFF;
    border: 1px solid rgba(62, 16, 29, 0.2);
    color: var(--wine-primary);
    padding: 8px 18px;
    border-radius: 100px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}
.cab-copy-btn:hover { background: var(--wine-primary); color: #FFFFFF; }

.cab-stats-pair {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.cab-stat-box {
    background: var(--page-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.cab-stat-box.accent {
    background: var(--wine-soft);
    border-color: rgba(62, 16, 29, 0.15);
}

.stat-number {
    font-size: 24px;
    font-weight: 800;
    color: var(--wine-primary);
    margin-bottom: 2px;
}

.stat-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.cab-mini-wallet {
    text-align: center;
    padding: 10px 0;
}
.wallet-amount { font-size: 32px; font-weight: 800; color: var(--wine-primary); margin-bottom: 4px; }
.wallet-hint { font-size: 12px; color: var(--text-muted); margin: 0 0 14px; }
.cab-sub-btn {
    background: #FFFFFF;
    border: 1px solid var(--card-border);
    padding: 8px 16px;
    border-radius: 100px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    color: var(--wine-primary);
    cursor: pointer;
}

/* Комьюнити */
.community-banner-card {
    background: linear-gradient(135deg, #1C1917 0%, #3E101D 100%);
    color: #FFFFFF;
}

.community-content-box {
    text-align: center;
    padding: 24px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
}
.community-icon { font-size: 40px; margin-bottom: 8px; }
.community-title { font-family: 'Playfair Display', serif; font-size: 20px; color: #FFFFFF; margin: 0 0 8px; }
.community-desc { font-size: 13.5px; line-height: 1.6; color: #E2DDD5; max-width: 560px; margin: 0 auto 20px; }
.cab-btn-gold {
    background: var(--gold-accent);
    color: #FFFFFF;
    border: none;
    padding: 12px 28px;
    border-radius: 100px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(154, 123, 86, 0.3);
}

/* Пустые состояния */
.cab-empty-state {
    text-align: center;
    padding: 40px 16px;
    background: var(--page-bg);
    border-radius: var(--radius-md);
    border: 1px dashed var(--card-border);
}
.cab-empty-state.full-width { width: 100%; }
.cab-empty-icon { font-size: 36px; margin-bottom: 8px; opacity: 0.8; }
.cab-empty-title { font-family: 'Playfair Display', serif; font-size: 18px; color: var(--wine-primary); margin: 0 0 4px; }
.cab-empty-desc { font-size: 13px; color: var(--text-muted); max-width: 440px; margin: 0 auto; line-height: 1.5; }

/* ========================================================
   АДАПТИВНОСТЬ (TABLET & SMARTPHONE)
   ======================================================== */

@media (max-width: 1024px) {
    .cabinet-desktop-sidebar {
        width: 210px;
    }
    .cab-nav-item {
        font-size: 12.5px;
        padding: 10px 12px;
    }
}

/* ========================================================
   СМАРТФОНЫ (ЯСНОЕ, ПОНЯТНОЕ И УДОБНОЕ МЕНЮ)
   ======================================================== */
@media (max-width: 768px) {
    .cabinet-page {
        padding-top: 75px;
        padding-bottom: 40px;
    }

    .cabinet-container {
        padding: 0 10px;
    }

    .cabinet-hero-header {
        padding: 14px 16px;
        border-radius: 18px;
        margin-bottom: 12px;
    }

    .profile-avatar {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .dash-greeting {
        font-size: 18px;
    }

    .profile-status-pill {
        font-size: 9.5px;
        padding: 2px 7px;
    }

    .btn-logout-top .logout-text {
        display: none;
    }
    .btn-logout-top {
        padding: 6px 10px;
    }

    /* Скрываем десктопный сайдбар */
    .cabinet-desktop-sidebar {
        display: none !important;
    }

    /* 🌟 ПОКАЗЫВАЕМ СВЕРХУДОБНОЕ МОБИЛЬНОЕ МЕНЮ 🌟 */
    .cabinet-mobile-nav-wrap {
        display: block;
        margin-bottom: 16px;
    }

    .mobile-nav-title {
        font-size: 11px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        color: var(--gold-accent);
        margin-bottom: 8px;
        padding-left: 4px;
    }

    .cabinet-mobile-tabs {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        padding: 4px 2px 8px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .cabinet-mobile-tabs::-webkit-scrollbar { display: none; }

    .cabinet-mobile-tabs .cab-nav-item {
        flex: 0 0 auto;
        background: #FFFFFF;
        border: 1.5px solid var(--card-border);
        padding: 9px 15px;
        font-size: 12.5px;
        font-weight: 700;
        border-radius: 100px;
        color: var(--text-main);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
        display: inline-flex;
        align-items: center;
        gap: 6px;
        white-space: nowrap;
        min-height: 42px; /* Удобный размер для пальца */
    }

    .cabinet-mobile-tabs .cab-nav-item.active {
        background: var(--wine-primary);
        color: #FFFFFF;
        border-color: var(--wine-primary);
        box-shadow: 0 4px 12px rgba(62, 16, 29, 0.25);
    }

    .cab-quick-hub-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 16px;
    }

    .hub-tile {
        padding: 12px 14px;
        border-radius: 14px;
    }

    .cab-bento-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .cab-card {
        padding: 16px 14px;
        border-radius: 18px;
    }

    .cab-card-title {
        font-size: 17px;
    }

    .cab-input {
        font-size: 16px !important; /* Защита от авто-зума на iPhone */
        padding: 11px 13px;
    }

    .cab-form-row-three {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .bank-card-number {
        font-size: 16px;
        letter-spacing: 2px;
    }

    .ref-code-value {
        font-size: 22px;
    }
}


/* Гарантирует кликабельность поверх любых шапок */
.cabinet-mobile-nav-wrap {
    position: relative;
    z-index: 999 !important;
    margin: 12px 0 20px;
}

.cabinet-mobile-tabs {
    display: flex !important;
    gap: 8px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 6px 2px 10px !important;
}

.cab-nav-btn {
    flex: 0 0 auto !important;
    background: #FFFFFF !important;
    color: #1A1A1A !important;
    border: 1.5px solid rgba(59, 13, 27, 0.12) !important;
    border-radius: 100px !important;
    padding: 10px 16px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
    user-select: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.cab-nav-btn.active {
    background: #3E101D !important;
    color: #FFFFFF !important;
    border-color: #3E101D !important;
    box-shadow: 0 4px 12px rgba(62, 16, 29, 0.25) !important;
}

/* Карточка заказа в стиле бутика */
.cab-order-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
    margin-bottom: 18px;
    overflow: hidden;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.cab-order-card:hover {
    border-color: rgba(62, 16, 29, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.order-card-header {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f2f2f2;
    background: #fafaf9;
    flex-wrap: wrap;
    gap: 10px;
}

.order-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.order-num-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1c1917;
    margin: 0;
}

.order-date-sub {
    font-size: 0.82rem;
    color: #78716c;
}

.order-status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Превью фотографий товаров в свернутом виде */
.order-preview-bar {
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}

.order-preview-bar:hover {
    background: #fdfbf7;
}

.order-thumbs-row {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
}

.order-thumb-mini {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    background: #f5f5f4;
    border: 1px solid #e7e5e4;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    flex-shrink: 0;
}

.order-thumb-mini img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.order-thumbs-more {
    font-size: 0.8rem;
    font-weight: 600;
    color: #78716c;
    background: #f5f5f4;
    padding: 6px 10px;
    border-radius: 8px;
}

.order-right-sum {
    text-align: right;
    display: flex;
    align-items: center;
    gap: 14px;
}

.order-sum-val {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1c1917;
}

.btn-toggle-details {
    background: #f5f5f4;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-toggle-details:hover {
    background: #e7e5e4;
    color: #000;
}

/* Раскрывающийся блок деталей */
.order-expand-body {
    display: none;
    padding: 0 20px 20px 20px;
    border-top: 1px dashed #e7e5e4;
    animation: fadeIn 0.25s ease-in-out;
}

.order-expand-body.open {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Таблица / Список позиций */
.order-items-table {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #fcfbf9;
    border-radius: 10px;
    border: 1px solid #f0ede6;
    gap: 12px;
}

.order-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.order-item-img {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #fff;
    object-fit: contain;
    padding: 2px;
    border: 1px solid #eee;
}

.order-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.order-item-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: #292524;
}

.order-item-sub {
    font-size: 0.8rem;
    color: #78716c;
}

.ripeness-tag {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 4px;
}

.order-item-right {
    text-align: right;
    white-space: nowrap;
}

.order-item-qty {
    font-size: 0.85rem;
    color: #78716c;
}

.order-item-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1c1917;
}

/* Дополнительные опции (Открытка / Ваза) */
.order-addons-summary {
    margin-top: 14px;
    background: #fafaf9;
    border-radius: 10px;
    padding: 12px 14px;
    border: 1px solid #f0ede6;
    font-size: 0.88rem;
}

.addon-badge-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
    color: #44403c;
}

.addon-badge-item:last-child {
    margin-bottom: 0;
}

.postcard-quote {
    font-style: italic;
    color: #57534e;
    background: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    border-left: 2px solid #3E101D;
    margin-top: 4px;
    font-size: 0.82rem;
}

/* Инфо-блок доставки и чека */
.order-details-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 16px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #f0ede6;
}

@media (max-width: 640px) {
    .order-details-grid {
        grid-template-columns: 1fr;
    }
}

.meta-box-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #a8a29e;
    margin-bottom: 6px;
}

.meta-box-text {
    font-size: 0.88rem;
    color: #44403c;
    line-height: 1.4;
}

.order-calc-ledger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.88rem;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    color: #78716c;
}

.calc-row.total-row {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #eee;
    font-weight: 700;
    color: #1c1917;
    font-size: 1rem;
}

.btn-repeat-order {
    background: #2E7D32;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease, transform 0.1s ease;
}

.btn-repeat-order:hover {
    background: #1e5a23;
}

.btn-repeat-order:active {
    transform: scale(0.97);
}
