:root {
    --color-warm-cream: #FDFBF7;
    --color-soft-sand: #F4EFEA;
    --color-surface: #FFFFFF;
    --color-blush-rose: #E5989B;
    --color-deep-rose: #B5525C;
    --color-sage-green: #83A086;
    --color-sage-deep: #506B54;
    --color-stem-dark: #456149;
    --color-gold: #D4AF37;
    --color-charcoal: #2E2426;
    --color-muted: #7A6E70;
    --color-border: rgba(221, 210, 198, 0.45);
    
    --radius-pill: 28px;
    --radius-card: 22px;
    --shadow-soft: 0 8px 24px rgba(46, 36, 38, 0.05);
    --shadow-subtle: 0 2px 10px rgba(46, 36, 38, 0.03);
    
    --container-max-width: 1600px;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--color-warm-cream);
    color: var(--color-charcoal);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* ==========================================================================
   1. SPLASH SCREEN (Полноэкранная ваза для любых мониторов)
   ========================================================================== */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--color-warm-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.65s ease-in-out, visibility 0.65s ease-in-out;
}

.splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-canvas-wrapper {
    width: clamp(260px, 35vw, 420px);
    height: clamp(260px, 35vw, 420px);
    display: flex;
    align-items: center;
    justify-content: center;
}

#vase-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ==========================================================================
   2. MAIN APPLICATION (Адаптивность для 21:9, 16:9, планшетов и телефонов)
   ========================================================================== */
.app-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--color-warm-cream);
}

/* HEADER BAR */
.header-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(253, 251, 247, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(221, 210, 198, 0.35);
    width: 100%;
}

.header-inner {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 16px clamp(16px, 4vw, 48px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-box {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(180deg, var(--color-warm-cream), var(--color-soft-sand));
    border: 1.2px solid rgba(212, 175, 55, 0.4);
    box-shadow: 0 4px 12px rgba(46, 36, 38, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 10px;
}

.brand-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--color-charcoal);
    line-height: 1.1;
}

.brand-subtitle {
    font-size: 13px;
    color: var(--color-muted);
    letter-spacing: 0.2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* LOCATION PILL */
.location-pill {
    background-color: var(--color-soft-sand);
    border: 1px solid rgba(221, 210, 198, 0.4);
    border-radius: var(--radius-pill);
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    max-width: 140px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.location-pill:hover {
    background-color: #ECE3DB;
    border-color: var(--color-sage-green);
}

.location-pill:active {
    transform: scale(0.97);
}

.location-pill.loading {
    background-color: var(--color-soft-sand);
}

.location-pill.error {
    background-color: rgba(229, 152, 155, 0.2);
}

.location-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-sage-deep);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.location-spinner {
    width: 12px;
    height: 12px;
    border: 2px solid var(--color-sage-green);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

.location-spinner.hidden {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   3. MAIN CONTENT
   ========================================================================== */
.main-content {
    max-width: var(--container-max-width);
    margin: 0 auto;
    width: 100%;
    padding: clamp(24px, 4vw, 56px) clamp(16px, 4vw, 48px);
    display: flex;
    flex-direction: column;
    gap: clamp(32px, 5vw, 64px);
    flex-grow: 1;
}

/* HERO SECTION */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 22px;
    width: 100%;
}

.hero-heading {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(28px, 4.5vw, 52px);
    font-weight: 700;
    color: var(--color-charcoal);
    line-height: 1.15;
    max-width: 860px;
}

.hero-subheading {
    font-size: clamp(14px, 1.6vw, 18px);
    color: var(--color-muted);
    max-width: 680px;
    line-height: 1.5;
}

/* SEARCH BOX */
.search-box {
    background-color: var(--color-surface);
    border-radius: 20px;
    padding: 16px 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 720px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--color-border);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.search-box:focus-within {
    border-color: var(--color-blush-rose);
    box-shadow: 0 10px 30px rgba(181, 82, 92, 0.08);
}

.search-icon {
    font-size: 18px;
    opacity: 0.8;
}

.search-input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 16px;
    font-family: inherit;
    color: var(--color-charcoal);
    background: transparent;
}

.search-input::placeholder {
    color: var(--color-muted);
}

/* CATEGORY CHIPS */
.categories-nav {
    width: 100%;
    max-width: 900px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 0;
}

.categories-nav::-webkit-scrollbar {
    display: none;
}

/* Режимы сервиса (Самовывоз / Доставка) */
.service-modes-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 6px;
    margin-bottom: 4px;
}

.service-mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--color-charcoal);
    cursor: pointer;
    transition: all 0.2s ease;
}

.service-mode-btn:hover {
    background: var(--color-surface);
    border-color: var(--color-blush-rose);
}

.service-mode-btn.active {
    background: var(--color-surface);
    border-color: var(--color-sage-deep);
    color: var(--color-sage-deep);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(92, 114, 99, 0.12);
}

.service-mode-btn.unavailable {
    opacity: 0.85;
    background: rgba(244, 239, 234, 0.6);
    border-style: dashed;
    cursor: pointer;
}

.service-mode-btn.unavailable:hover {
    background: rgba(229, 152, 155, 0.15);
    border-color: var(--color-deep-rose);
}

.badge-status-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(181, 82, 92, 0.12);
    color: var(--color-deep-rose);
    border: 1px solid rgba(181, 82, 92, 0.25);
    white-space: nowrap;
}

.categories-list {
    display: flex;
    justify-content: center;
    gap: 10px;
    list-style: none;
    white-space: nowrap;
    padding: 0 4px;
}

.category-chip {
    background-color: var(--color-surface);
    color: var(--color-charcoal);
    border: 1px solid var(--color-border);
    border-radius: 24px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow-subtle);
    transition: all 0.2s ease;
}

.category-chip:hover {
    border-color: var(--color-blush-rose);
    transform: translateY(-1px);
}

.category-chip.active {
    background-color: var(--color-deep-rose);
    color: var(--color-warm-cream);
    border-color: var(--color-deep-rose);
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(181, 82, 92, 0.25);
}

/* ==========================================================================
   4. SHOPS & EMPTY STATE SECTION (Широкоформатная адаптивная сетка)
   ========================================================================== */
.shops-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.section-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(22px, 2.5vw, 32px);
    font-weight: 600;
    color: var(--color-charcoal);
}

.section-meta {
    font-size: 14px;
    color: var(--color-muted);
}

/* EMPTY STATE CONTAINER */
.empty-state-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    width: 100%;
}

/* Главная карточка */
.empty-state-main-card {
    background-color: var(--color-surface);
    border-radius: var(--radius-card);
    padding: clamp(36px, 5vw, 64px) clamp(24px, 4vw, 48px);
    text-align: center;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-badge {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--color-soft-sand);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
}

.empty-icon {
    font-size: 38px;
}

.empty-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 600;
    color: var(--color-charcoal);
    margin-bottom: 12px;
}

.empty-description {
    font-size: clamp(14px, 1.4vw, 17px);
    color: var(--color-muted);
    line-height: 1.6;
    max-width: 540px;
    margin-bottom: 28px;
}

.btn-primary {
    background-color: var(--color-deep-rose);
    border: none;
    color: var(--color-warm-cream);
    padding: 12px 28px;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(181, 82, 92, 0.25);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: #9E4756;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(181, 82, 92, 0.35);
}

.btn-primary:active {
    transform: scale(0.98);
}

/* Сетка преимуществ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    width: 100%;
}

.feature-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    padding: 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    background: var(--color-surface);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

/* Карточки временно недоступных сервисов */
.feature-card-unavailable {
    background: rgba(247, 243, 239, 0.7);
    border: 1px dashed var(--color-border);
    cursor: pointer;
    position: relative;
}

.feature-card-unavailable:hover {
    background: rgba(255, 245, 245, 0.9);
    border-color: var(--color-blush-rose);
}

.feature-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.badge-unavailable {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--color-deep-rose);
    background: rgba(181, 82, 92, 0.12);
    border: 1px solid rgba(181, 82, 92, 0.28);
    padding: 3px 10px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.feature-icon {
    font-size: 26px;
    margin-bottom: 4px;
}

.feature-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 19px;
    font-weight: 600;
    color: var(--color-charcoal);
}

.feature-text {
    font-size: 13px;
    color: var(--color-muted);
    line-height: 1.5;
}

/* Всплывающее Toast-уведомление */
.toast-notification {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    background: #2E2426;
    color: #FAF7F2;
    padding: 14px 24px;
    border-radius: 18px;
    font-size: 14.5px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    z-index: 20000;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast-notification.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 15px);
}

.toast-icon {
    font-size: 18px;
}

/* ==========================================================================
   5. FOOTER
   ========================================================================== */
.site-footer {
    border-top: 1px solid rgba(221, 210, 198, 0.4);
    background: rgba(244, 239, 234, 0.5);
    margin-top: auto;
    width: 100%;
}

.footer-inner {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 24px clamp(16px, 4vw, 48px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-copy {
    font-size: 13px;
    color: var(--color-charcoal);
}

.footer-meta {
    font-size: 13px;
    color: var(--color-muted);
}

/* ==========================================================================
   6. RESPONSIVE BREAKPOINTS (Desktop, UltraWide 21:9 & Mobile)
   ========================================================================== */

/* Большие мониторы и 21:9 UltraWide (от 1200px и шире) */
@media (min-width: 1200px) {
    :root {
        --container-max-width: 1680px;
    }

    .empty-state-container {
        grid-template-columns: 1fr 1.25fr;
        align-items: stretch;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Мониторы UltraWide 21:9 и 4K (от 1920px до 3440px+) */
@media (min-width: 1920px), (min-aspect-ratio: 21/9) {
    :root {
        --container-max-width: 1820px;
    }

    .hero-heading {
        font-size: 56px;
    }

    .hero-subheading {
        font-size: 19px;
    }

    .search-box {
        max-width: 820px;
        padding: 18px 26px;
    }

    .categories-list {
        gap: 14px;
    }

    .category-chip {
        padding: 12px 28px;
        font-size: 15px;
    }

    .empty-state-container {
        grid-template-columns: 1fr 1.35fr;
        gap: 32px;
    }

    .empty-state-main-card {
        padding: 64px 52px;
    }
}

/* Мобильные экраны (до 768px) */
@media (max-width: 768px) {
    .header-inner {
        padding: 12px 14px;
        gap: 10px;
    }

    .brand-title {
        font-size: 20px;
    }

    .brand-subtitle {
        display: none;
    }

    .header-actions {
        gap: 8px;
    }

    .location-pill {
        max-width: 115px;
        padding: 6px 12px;
        font-size: 12.5px;
    }

    .auth-btn {
        padding: 6px 12px;
        font-size: 12.5px;
    }

    .categories-list {
        justify-content: flex-start;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* Компактные мобильные экраны (до 480px) */
@media (max-width: 480px) {
    .header-inner {
        padding: 10px 10px;
        gap: 6px;
    }

    .logo-box {
        width: 36px;
        height: 36px;
    }

    .brand-title {
        font-size: 17px;
    }

    .header-actions {
        gap: 5px;
    }

    .location-pill {
        max-width: 95px;
        padding: 5px 8px;
        font-size: 11.5px;
    }

    .location-text {
        font-size: 11.5px;
    }

    .auth-btn {
        padding: 5px 9px;
        font-size: 11.5px;
    }

    .auth-modal-card {
        padding: 18px 16px;
    }
}

/* ==========================================================================
   7. CITY SELECTION MODAL
   ========================================================================== */
.city-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: clamp(12px, 3vh, 32px) 16px;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 10000;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.city-modal.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.city-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(46, 36, 38, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.city-modal-card {
    position: relative;
    z-index: 1;
    background: var(--color-surface);
    border-radius: var(--radius-card);
    width: 100%;
    max-width: 500px;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    margin: auto;
    padding: 24px 20px;
    box-shadow: 0 16px 40px rgba(46, 36, 38, 0.16);
    border: 1px solid var(--color-border);
    animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

@keyframes modalPop {
    from { transform: scale(0.94); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.city-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.city-modal-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--color-charcoal);
}

.city-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: var(--color-muted);
    cursor: pointer;
    padding: 4px;
    transition: color 0.15s;
}

.city-modal-close:hover {
    color: var(--color-charcoal);
}

.city-modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.city-modal-hint {
    font-size: 14px;
    color: var(--color-muted);
    line-height: 1.4;
}

.city-input-container {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.city-input-group {
    display: flex;
    gap: 10px;
    width: 100%;
}

.city-input {
    flex: 1;
    border: 1.5px solid var(--color-border);
    border-radius: 14px;
    padding: 12px 16px;
    font-size: 15px;
    font-family: inherit;
    color: var(--color-charcoal);
    background: var(--color-warm-cream);
    outline: none;
    transition: border-color 0.2s;
}

.city-input:focus {
    border-color: var(--color-deep-rose);
}

/* Выпадающие подсказки адресов */
.city-suggestions-wrapper {
    margin-top: 8px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(46, 36, 38, 0.08);
    overflow: hidden;
    animation: fadeInSuggestions 0.18s ease;
    max-height: 240px;
    display: flex;
    flex-direction: column;
}

.city-suggestions-wrapper.hidden {
    display: none;
}

@keyframes fadeInSuggestions {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.city-suggestions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: rgba(237, 230, 222, 0.5);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-muted);
    border-bottom: 1px solid rgba(221, 210, 198, 0.6);
}

.suggestions-spinner {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(181, 82, 92, 0.2);
    border-top-color: var(--color-deep-rose);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.suggestions-spinner.hidden {
    display: none;
}

.city-suggestions-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    overflow-y: auto;
    max-height: 200px;
}

.city-suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid rgba(221, 210, 198, 0.25);
}

.city-suggestion-item:last-child {
    border-bottom: none;
}

.city-suggestion-item:hover {
    background-color: var(--color-soft-sand);
}

.city-suggestion-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.city-suggestion-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.city-suggestion-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-charcoal);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.city-suggestion-subtitle {
    font-size: 12px;
    color: var(--color-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.popular-cities-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.popular-cities-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-charcoal);
}

.popular-cities-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.city-tag {
    background: var(--color-soft-sand);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 6px 14px;
    font-size: 13px;
    color: var(--color-sage-deep);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.city-tag:hover {
    background: #ECE3DB;
    border-color: var(--color-sage-green);
    transform: translateY(-1px);
}

.gps-detect-btn {
    background: var(--color-warm-cream);
    border: 1px dashed var(--color-blush-rose);
    border-radius: 14px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-deep-rose);
    transition: background 0.15s, border-color 0.15s;
    width: 100%;
}

.gps-detect-btn:hover {
    background: rgba(229, 152, 155, 0.15);
    border-color: var(--color-deep-rose);
}

/* ==========================================================================
   8. USER AUTH WIDGET & MODAL (MAILCOW INTEGRATION)
   ========================================================================== */
.user-auth-wrapper {
    position: relative;
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 7px 14px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--color-charcoal);
    cursor: pointer;
    box-shadow: var(--shadow-subtle);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.auth-btn:hover {
    border-color: var(--color-deep-rose);
    background: var(--color-soft-sand);
    transform: translateY(-1px);
}

.auth-btn.authenticated {
    border-color: var(--color-sage-deep);
    color: var(--color-sage-deep);
    font-weight: 600;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(46, 36, 38, 0.12);
    padding: 12px;
    min-width: 220px;
    z-index: 1000;
    animation: fadeInSuggestions 0.18s ease;
}

.user-dropdown.hidden {
    display: none;
}

.user-dropdown-header {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 6px 8px;
}

.dropdown-user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-charcoal);
}

.dropdown-user-email {
    font-size: 12px;
    color: var(--color-muted);
    word-break: break-all;
}

.user-dropdown-divider {
    height: 1px;
    background: var(--color-border);
    margin: 8px 0;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 13.5px;
    color: var(--color-charcoal);
    cursor: pointer;
    transition: background 0.15s ease;
}

.user-dropdown-item:hover {
    background: var(--color-soft-sand);
}

.user-dropdown-item.logout {
    color: var(--color-deep-rose);
}

.user-dropdown-item.logout:hover {
    background: rgba(181, 82, 92, 0.1);
}

/* AUTH MODAL STYLES */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: clamp(10px, 2.5vh, 28px) 14px;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 10000;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.auth-modal.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.auth-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(46, 36, 38, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.auth-modal-card {
    position: relative;
    z-index: 1;
    background: var(--color-surface);
    border-radius: var(--radius-card);
    width: 100%;
    max-width: 460px;
    max-height: calc(100dvh - 24px);
    margin: auto;
    display: flex;
    flex-direction: column;
    padding: 20px 22px;
    box-shadow: 0 16px 40px rgba(46, 36, 38, 0.18);
    border: 1px solid var(--color-border);
    animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    overflow: hidden;
}

.auth-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.auth-brand-badge {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--color-deep-rose);
}

.auth-modal-close {
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: var(--color-muted);
    cursor: pointer;
    padding: 4px;
    transition: color 0.15s;
}

.auth-modal-close:hover {
    color: var(--color-charcoal);
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 14px;
    gap: 4px;
    flex-shrink: 0;
}

.auth-tab-btn {
    flex: 1;
    padding: 8px 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-tab-btn.active {
    color: var(--color-deep-rose);
    border-bottom-color: var(--color-deep-rose);
    font-weight: 600;
}

.auth-modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-right: 4px;
}

.auth-modal-body::-webkit-scrollbar {
    width: 4px;
}
.auth-modal-body::-webkit-scrollbar-track {
    background: transparent;
}
.auth-modal-body::-webkit-scrollbar-thumb {
    background: rgba(181, 82, 92, 0.3);
    border-radius: 4px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-form.hidden {
    display: none;
}

.form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.form-label-opt {
    font-size: 11px;
    font-weight: 400;
    color: var(--color-muted);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.form-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-charcoal);
}

.form-input {
    border: 1.5px solid var(--color-border);
    border-radius: 12px;
    padding: 8.5px 12px;
    font-size: 13.5px;
    color: var(--color-charcoal);
    background: var(--color-warm-cream);
    outline: none;
    transition: border-color 0.2s ease;
    font-family: inherit;
    box-sizing: border-box;
    width: 100%;
}

.form-input:focus {
    border-color: var(--color-deep-rose);
}

.form-input.code-input {
    letter-spacing: 4px;
    font-size: 20px;
    text-align: center;
    font-weight: bold;
}

.form-hint {
    font-size: 12px;
    color: var(--color-muted);
    line-height: 1.4;
    margin-bottom: 8px;
}

.link-btn {
    background: transparent;
    border: none;
    color: var(--color-deep-rose);
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    transition: opacity 0.15s;
}

.link-btn:hover {
    opacity: 0.8;
}

.auth-submit-btn {
    width: 100%;
    margin-top: 2px;
    padding: 10px 0;
    font-size: 14px;
}

.auth-alert {
    padding: 9px 12px;
    border-radius: 12px;
    font-size: 12.5px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.auth-alert.hidden {
    display: none;
}

.auth-alert.error {
    background: rgba(181, 82, 92, 0.12);
    color: var(--color-deep-rose);
    border: 1px solid rgba(181, 82, 92, 0.3);
}

.auth-alert.success {
    background: rgba(92, 114, 99, 0.12);
    color: var(--color-sage-deep);
    border: 1px solid rgba(92, 114, 99, 0.3);
}

.back-to-login-row {
    margin-top: 6px;
    text-align: center;
}

.auth-modal-footer {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(221, 210, 198, 0.5);
    text-align: center;
    flex-shrink: 0;
}

.mailcow-secure-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--color-muted);
}

/* ==========================================================================
   9. USER REGISTRATION & BOUTIQUE SEPARATION STYLES
   ========================================================================== */
.form-input-hint {
    font-size: 11px;
    color: var(--color-muted);
    margin-top: 2px;
}

.dropdown-user-role {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-sage-deep);
    background: rgba(131, 160, 134, 0.15);
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
    align-self: flex-start;
    margin-top: 2px;
}

.boutique-notice-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--color-soft-sand);
    border: 1px solid rgba(131, 160, 134, 0.45);
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.boutique-notice-card:hover {
    background: #EDE6DE;
    border-color: var(--color-sage-deep);
    transform: translateY(-1px);
}

.boutique-notice-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.boutique-notice-content {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.boutique-notice-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--color-sage-deep);
}

.boutique-notice-title .badge-status-pill {
    font-size: 10px;
    padding: 1px 6px;
    background: rgba(80, 107, 84, 0.15);
    color: var(--color-sage-deep);
    border-radius: 6px;
    font-weight: 700;
}

.boutique-notice-text {
    font-size: 11px;
    color: var(--color-muted);
    line-height: 1.35;
    margin: 0;
}

/* User Invite Banner on Main Page */
.user-invite-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 18px;
    padding: 12px 18px;
    margin-top: 14px;
    box-shadow: var(--shadow-subtle);
    transition: all 0.25s ease;
    width: 100%;
    max-width: 720px;
    box-sizing: border-box;
}

.user-invite-banner.hidden {
    display: none;
}

.user-invite-icon {
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(229, 152, 155, 0.2);
    flex-shrink: 0;
}

.user-invite-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.user-invite-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-charcoal);
}

.user-invite-subtitle {
    font-size: 12px;
    color: var(--color-muted);
    margin: 0;
    line-height: 1.35;
    word-break: break-word;
}

.banner-auth-btn {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 12px;
    flex-shrink: 0;
}

/* Responsive adjustments for mobile and small viewports */
@media (max-width: 640px) {
    .user-invite-banner {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px 14px;
    }

    .banner-auth-btn {
        width: 100%;
        text-align: center;
    }

    .auth-modal {
        padding: 8px;
    }

    .auth-modal-card {
        padding: 16px 14px;
        max-height: calc(100dvh - 16px);
        border-radius: 18px;
    }

    .form-row-2col {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .auth-form {
        gap: 8px;
    }

    .form-input {
        padding: 8px 10px;
        font-size: 13px;
    }

    .boutique-notice-card {
        padding: 8px 10px;
    }

    .auth-submit-btn {
        padding: 9px 0;
        font-size: 13.5px;
    }
}

@media (max-height: 620px) {
    .auth-modal {
        padding: 6px;
    }

    .auth-modal-card {
        padding: 12px 14px;
        max-height: calc(100dvh - 12px);
    }

    .auth-tabs {
        margin-bottom: 8px;
    }

    .auth-modal-header {
        margin-bottom: 8px;
    }

    .auth-modal-footer {
        margin-top: 6px;
        padding-top: 4px;
    }
}


