/* Reset и базовые стили */
.tab-content.hidden { display: none !important; }
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background: var(--tg-theme-bg-color, #1a1f2e);
    color: var(--tg-theme-text-color, #ffffff);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    overscroll-behavior: none;
}

#app {
    max-width: 100%;
    min-height: 100vh;
}

/* iOS-style Header */
.header {
    padding: 6px 12px;
    background: var(--tg-theme-secondary-bg-color, #242b3d);
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.header-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.header h1 {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.3px;
    padding-right: 120px;
    padding-left: 120px;
}

/* iOS-style Tabs (Segmented Control) */
.tabs {
    display: flex;
    padding: 8px 16px;
    gap: 0;
    background: var(--tg-theme-secondary-bg-color, #242b3d);
}

.tabs-container {
    display: flex;
    flex: 1;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    padding: 2px;
    position: relative;
}

.tab {
    flex: 1;
    padding: 8px 12px;
    background: transparent;
    border: none;
    color: var(--tg-theme-hint-color, #8e9aaf);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: color 0.25s ease, transform 0.1s ease;
    border-radius: 8px;
    z-index: 1;
}

.tab:active {
    transform: scale(0.97);
}

.tab.active {
    background: var(--tg-theme-button-color, #00BFA6);
    color: var(--tg-theme-button-text-color, #ffffff);
    box-shadow: 0 2px 8px rgba(0, 191, 166, 0.3);
}

.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 9px;
    font-size: 11px;
    font-weight: 600;
}

.tab.active .tab-badge {
    background: rgba(255, 255, 255, 0.3);
}

/* iOS-style Create Button */
.create-btn-wrapper {
    padding: 12px 16px;
}

.btn-create {
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(180deg, #00D4B5 0%, #00BFA6 50%, #00A896 100%);
    color: var(--tg-theme-button-text-color, #ffffff);
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.2s ease,
                filter 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(0, 191, 166, 0.35),
                0 1px 3px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
    letter-spacing: 0.2px;
    position: relative;
    overflow: hidden;
}

.btn-create::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 50%);
    pointer-events: none;
}

/* Shimmer sweep effect */
.btn-create::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 35%,
        rgba(255,255,255,0.2) 50%,
        transparent 65%
    );
    background-size: 250% 100%;
    background-position: -200% center;
    animation: btnShimmer 3.5s ease-in-out infinite;
    pointer-events: none;
    border-radius: inherit;
}

@keyframes btnShimmer {
    0%   { background-position: -200% center; }
    60%  { background-position: 200% center; }
    100% { background-position: 200% center; }
}

.btn-create:hover {
    filter: brightness(1.08);
}

.btn-create:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(0, 191, 166, 0.25),
                0 1px 2px rgba(0, 0, 0, 0.1),
                inset 0 1px 3px rgba(0, 0, 0, 0.15);
    filter: brightness(0.95);
}

.btn-create svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2.5;
}

.btn-start-all.hidden {
    display: none;
}

.btn-start-all {
    width: 100%;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 13px 20px;
    background: transparent;
    color: var(--tg-theme-hint-color, #8e8e93);
    border: 1.5px solid rgba(0, 191, 166, 0.4);
    border-radius: 14px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.18s ease;
}

.btn-start-all:active {
    transform: scale(0.97);
    background: rgba(0, 191, 166, 0.08);
}

.btn-start-all svg {
    width: 16px;
    height: 16px;
    fill: rgba(0, 191, 166, 0.7);
}

.btn-delete-all.hidden {
    display: none;
}

.delete-all-hint {
    text-align: right;
    font-size: 13px;
    color: var(--tg-theme-hint-color, #8e8e93);
    margin: 4px 2px 0;
    padding: 4px 0;
    cursor: pointer;
    user-select: none;
}

.delete-all-hint:active {
    opacity: 0.5;
}

/* Список заявок */
.requests-list {
    padding: 0 16px 20px;
}

.requests-list.hidden {
    display: none;
}

.empty-state.hidden {
    display: none;
}

.empty-state {
    text-align: center;
    padding: 32px 20px 24px;
    color: var(--tg-theme-hint-color, #8e9aaf);
    font-size: 15px;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Section headers for grouped lists */
.section-header {
    font-size: 13px;
    font-weight: 600;
    color: var(--tg-theme-hint-color, #8e9aaf);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px 4px 8px;
}

.section-header:first-child {
    padding-top: 4px;
}

/* ─── Accordion summary row ─── */
.request-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.request-summary .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.summary-middle {
    flex: 1;
    min-width: 0;
}

.summary-product {
    font-size: 14px;
    font-weight: 600;
    color: var(--tg-theme-text-color, #fff);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.summary-route {
    font-size: 12px;
    color: var(--tg-theme-hint-color, #8e9aaf);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.summary-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.summary-qty {
    font-size: 13px;
    font-weight: 600;
    color: var(--tg-theme-text-color, #fff);
}

.summary-chevron {
    width: 16px;
    height: 16px;
    color: var(--tg-theme-hint-color, #8e9aaf);
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.request-card.expanded .summary-chevron {
    transform: rotate(180deg);
}

/* ─── Accordion details panel ─── */
.request-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-top: 0px solid rgba(255, 255, 255, 0.04);
}

.request-card.expanded .request-details {
    max-height: 800px;
    border-top-width: 1px;
}

/* iOS-style Request Card */
.request-card {
    background: var(--tg-theme-secondary-bg-color, #242b3d);
    border-radius: 16px;
    padding: 0;
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08),
                0 4px 12px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.25s ease;
}

.request-card:active {
    transform: scale(0.975);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12),
                0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Card Header with Status */
.request-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px 10px;
}

.request-product {
    flex: 1;
    min-width: 0;
}

.request-product-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--tg-theme-text-color, #ffffff);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.request-article {
    font-size: 13px;
    color: var(--tg-theme-hint-color, #8e9aaf);
    font-family: 'SF Mono', 'Menlo', monospace;
}

.request-id-badge {
    color: var(--tg-theme-hint-color, #8e9aaf);
    opacity: 0.6;
    font-size: 12px;
}

/* Имя поставщика в свёрнутой карточке */
.summary-supplier-label {
    font-size: 11px;
    color: var(--tg-theme-hint-color, #8e8e93);
    margin-top: 2px;
}

.summary-in-transit {
    font-size: 11px;
    color: #e6a700;
    margin-top: 2px;
}

/* UX-1 (12.06): причина паузы в свёрнутой карточке — иконка + короткий текст */
.summary-pause-reason {
    font-size: 11px;
    color: #e6a700;
    margin-top: 2px;
    font-weight: 500;
}
.summary-pause-reason.self-heal {
    color: #34c759;  /* зелёный — возобновится сам, не требует действий */
}

/* UX-4 (12.06): плашка «товар в пути» вместо disabled-кнопки (title не работает на тапе) */
.request-transit-note {
    font-size: 12px;
    color: #e6a700;
    background: rgba(230, 167, 0, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    line-height: 1.4;
}

/* UX-3 (12.06): подсказка «склад давно закрыт» для зависших searching-заявок */
.request-stale-warn {
    font-size: 12px;
    color: #ff9500;
    background: rgba(255, 149, 0, 0.08);
    padding: 8px 12px;
    border-radius: 8px;
    margin-top: 8px;
    line-height: 1.4;
}

/* Фильтр по поставщику */
.supplier-filter-bar {
    display: flex;
    gap: 6px;
    padding: 0 16px 10px;
    overflow-x: auto;
    scrollbar-width: none;
}
.supplier-filter-bar::-webkit-scrollbar { display: none; }
.supplier-chip {
    flex-shrink: 0;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1.5px solid var(--tg-theme-hint-color, #8e8e93);
    background: transparent;
    color: var(--tg-theme-hint-color, #8e8e93);
    font-size: 13px;
    cursor: pointer;
}
.supplier-chip.active {
    border-color: #00BFA6;
    color: #00BFA6;
    background: rgba(0, 191, 166, 0.1);
}

/* Бейдж "от [Имя]" для чужих заявок в общем кабинете */
.creator-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 10px;
    background: rgba(0, 191, 166, 0.12);
    color: #00BFA6;
}

/* Card Body - Route */
.request-card-body {
    padding: 0 16px 14px;
}

.request-route {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--tg-theme-bg-color, #1a1f2e);
    border-radius: 12px;
}

.warehouse-block {
    flex: 1;
    min-width: 0;
}

.warehouse-label {
    font-size: 11px;
    color: var(--tg-theme-hint-color, #8e9aaf);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.warehouse-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--tg-theme-text-color, #ffffff);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.route-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #00D4B5, #00A896);
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 191, 166, 0.3);
}

.route-arrow svg {
    width: 16px;
    height: 16px;
    stroke: #ffffff;
    fill: none;
}

/* Card Footer - Meta info */
.request-card-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.12);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    gap: 8px;
}

/* Quantity */
.request-quantity {
    font-size: 20px;
    font-weight: 700;
    color: var(--tg-theme-text-color, #ffffff);
    text-align: center;
}

.request-quantity-label {
    font-size: 13px;
    font-weight: 400;
    color: var(--tg-theme-hint-color, #8e9aaf);
    margin-left: 3px;
}

/* Meta row - дата и поставщик */
.request-meta-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 12px;
    color: var(--tg-theme-hint-color, #8e9aaf);
}

.request-supplier {
    font-size: 12px;
    color: var(--tg-theme-hint-color, #8e9aaf);
}

.request-date {
    font-size: 12px;
    color: var(--tg-theme-hint-color, #8e9aaf);
}

/* Inline edit mode */
.request-edit-mode {
    display: flex;
    align-items: center;
    gap: 12px;
}

.request-edit-input {
    width: 100px;
    padding: 10px 14px;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    background: var(--tg-theme-bg-color, #1a1f2e);
    border: 2px solid var(--tg-theme-button-color, #00BFA6);
    border-radius: 12px;
    color: var(--tg-theme-text-color, #ffffff);
    outline: none;
}

.request-edit-input:focus {
    border-color: var(--tg-theme-button-color, #00BFA6);
    box-shadow: 0 0 0 3px rgba(0, 191, 166, 0.2);
}

.btn-save {
    padding: 10px 20px;
    background: linear-gradient(180deg, #00D4B5, #00A896);
    color: var(--tg-theme-button-text-color, #ffffff);
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 2px 8px rgba(0, 191, 166, 0.3);
}

.btn-save:active {
    transform: scale(0.95);
    box-shadow: 0 1px 4px rgba(0, 191, 166, 0.2);
}

.btn-cancel-edit {
    padding: 10px 16px;
    background: transparent;
    color: var(--tg-theme-hint-color, #8e9aaf);
    border: none;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.btn-cancel-edit:active {
    transform: scale(0.95);
}

.request-quantity-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
}

.request-quantity-display.hidden,
.request-edit-mode.hidden {
    display: none;
}

/* Actions row */
.request-actions {
    display: flex;
    gap: 8px;
    padding: 0 16px 14px;
}

.btn-action {
    flex: 1;
    padding: 12px 16px;
    min-height: 44px;
    background: rgba(0, 191, 166, 0.08);
    border: none;
    border-radius: 12px;
    color: var(--tg-theme-button-color, #00BFA6);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                background 0.15s ease,
                box-shadow 0.15s ease;
}

.btn-action:active {
    transform: scale(0.96);
    background: rgba(0, 191, 166, 0.18);
}

.btn-delete {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

.btn-delete:hover  { background: rgba(239, 68, 68, 0.13); }
.btn-delete:active { background: rgba(239, 68, 68, 0.18); transform: scale(0.96); }

/* Bottom Sheet */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 1000;
    transition: background 0.35s ease;
    pointer-events: none;
}

.modal.visible {
    background: rgba(0, 0, 0, 0.55);
    pointer-events: auto;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--tg-theme-bg-color, #1a1f2e);
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    padding-bottom: env(safe-area-inset-bottom);
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.3);
}

.modal.visible .modal-content {
    transform: translateY(0);
}

/* iOS: supplier dropdown needs to overflow the scroll container */
.modal-content.supplier-dropdown-open {
    overflow: visible;
}

.modal-handle {
    width: 36px;
    height: 5px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 3px;
    margin: 8px auto 0;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: sticky;
    top: 0;
    background: var(--tg-theme-bg-color, #1a1f2e);
    z-index: 1;
}

.modal-header h2 {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.btn-close {
    background: var(--tg-theme-secondary-bg-color, #242b3d);
    border: none;
    color: var(--tg-theme-hint-color, #8e9aaf);
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, background 0.15s ease;
}

.btn-close:active {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.1);
}

.btn-cancel-modal {
    background: none;
    border: none;
    color: var(--tg-theme-hint-color, #8e9aaf);
    font-size: 15px;
    cursor: pointer;
    padding: 8px 4px;
    min-height: 44px;
    min-width: 60px;
    display: flex;
    align-items: center;
}

/* Форма */
form {
    padding: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group.hidden,
.btn-submit.hidden {
    display: none;
}

.no-redistribution-hint {
    margin-top: 12px;
    padding: 14px 16px;
    background: rgba(255, 200, 50, 0.08);
    border: 1px solid rgba(255, 200, 50, 0.2);
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--tg-theme-text-color, #ffffff);
}

.no-redistribution-hint b {
    color: #ffc832;
}

.no-redistribution-hint li {
    margin-bottom: 2px;
}

.warehouse-quota-hint {
    margin-top: 8px;
    padding: 7px 12px;
    background: rgba(0, 191, 166, 0.08);
    border: 1px solid rgba(0, 191, 166, 0.2);
    border-radius: 8px;
    font-size: 12px;
    color: var(--tg-theme-hint-color, #999);
}

.warehouse-quota-hint b {
    color: #00BFA6;
}

/* ── Multi-select target warehouses ── */
.btn-select-all-targets {
    background: none;
    border: none;
    color: #00BFA6;
    font-size: 13px;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    flex-shrink: 0;
}

.target-warehouses-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    max-height: 300px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.target-wh-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--tg-theme-secondary-bg-color, #f5f5f5);
    cursor: pointer;
    user-select: none;
    transition: background 0.15s, outline 0.15s;
    outline: 1.5px solid transparent;
}
.target-wh-item:active { opacity: 0.7; }
.target-wh-item.selected {
    background: rgba(0, 191, 166, 0.08);
    outline-color: #00BFA6;
}

.target-wh-checkmark {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 1.5px solid var(--tg-theme-hint-color, #999);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
    position: relative;
}
.target-wh-item.selected .target-wh-checkmark {
    background: #00BFA6;
    border-color: #00BFA6;
}
.target-wh-checkmark::after {
    content: '';
    display: none;
    width: 5px;
    height: 9px;
    border: 2px solid white;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
}
.target-wh-item.selected .target-wh-checkmark::after {
    display: block;
}

.target-wh-name {
    flex: 1;
    font-size: 15px;
}
.target-wh-limit {
    font-size: 12px;
    color: var(--tg-theme-hint-color, #999);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Confirmation: multiple destinations */
.confirm-targets-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: right;
}
.confirm-targets-list span {
    font-size: 14px;
    color: var(--tg-theme-text-color, #000);
}

/* Custom supplier dropdown (replaces native <select> that breaks out of Mini App viewport) */
.custom-select-wrapper {
    position: relative;
}

.custom-select-trigger {
    width: 100%;
    padding: 13px 14px;
    background: var(--tg-theme-secondary-bg-color, #242b3d);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: var(--tg-theme-text-color, #ffffff);
    font-size: 16px;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    box-sizing: border-box;
}

.custom-select-trigger:focus {
    outline: none;
    border-color: var(--tg-theme-button-color, #00BFA6);
    box-shadow: 0 0 0 3px rgba(0, 191, 166, 0.15);
}

.custom-select-trigger-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-trigger-text.placeholder {
    color: rgba(142, 154, 175, 0.5);
}

.custom-select-arrow {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: rgba(142, 154, 175, 0.6);
    transition: transform 0.2s ease;
}

.custom-select-wrapper.open .custom-select-trigger {
    border-color: var(--tg-theme-button-color, #00BFA6);
    box-shadow: 0 0 0 3px rgba(0, 191, 166, 0.15);
    border-radius: 12px 12px 0 0;
}

.custom-select-wrapper.open .custom-select-arrow {
    transform: rotate(180deg);
}

.custom-select-wrapper.disabled .custom-select-trigger,
.custom-select-wrapper.single .custom-select-trigger {
    cursor: default;
    pointer-events: none;
}

.custom-select-wrapper.disabled .custom-select-trigger {
    opacity: 0.6;
}

.custom-select-wrapper.single .custom-select-trigger {
    opacity: 0.7;
}

.custom-select-wrapper.single .custom-select-arrow,
.custom-select-wrapper.disabled .custom-select-arrow {
    display: none;
}

.custom-select-panel {
    position: absolute;
    top: calc(100% - 1.5px);
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--tg-theme-secondary-bg-color, #242b3d);
    border: 1.5px solid var(--tg-theme-button-color, #00BFA6);
    border-top: 1px solid rgba(255,255,255,0.06);
    border-radius: 0 0 12px 12px;
    max-height: min(320px, 45vh);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.custom-select-panel.hidden {
    display: none;
}

.custom-select-item {
    padding: 12px 14px;
    font-size: 15px;
    color: var(--tg-theme-text-color, #ffffff);
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-select-item:last-child {
    border-bottom: none;
}

.custom-select-item:active,
.custom-select-item:hover {
    background: rgba(255, 255, 255, 0.07);
}

.custom-select-item.locked {
    color: var(--tg-theme-hint-color, #8e9aaf);
    cursor: default;
    opacity: 0.55;
}

.custom-select-separator {
    padding: 6px 14px 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--tg-theme-hint-color, #8e9aaf);
    opacity: 0.7;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--tg-theme-hint-color, #8e9aaf);
}

.form-group-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.form-group-label-row label {
    margin-bottom: 0;
}

.btn-refresh-suppliers {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 2px 4px;
    cursor: pointer;
    color: #00BFA6;
    font-size: 12px;
    font-weight: 500;
    opacity: 0.85;
    transition: opacity 0.15s;
}

.btn-refresh-suppliers:active { opacity: 0.5; }

.btn-refresh-suppliers svg {
    width: 13px;
    height: 13px;
}

.btn-refresh-suppliers.spinning svg {
    animation: spin 0.8s linear infinite;
}

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 13px 14px;
    background: var(--tg-theme-secondary-bg-color, #242b3d);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: var(--tg-theme-text-color, #ffffff);
    font-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--tg-theme-button-color, #00BFA6);
    box-shadow: 0 0 0 3px rgba(0, 191, 166, 0.15);
}

.form-group input::placeholder {
    color: rgba(142, 154, 175, 0.5);
}

/* Input with inline spinner */
.input-with-loader {
    position: relative;
}

/* Autocomplete dropdown */
.autocomplete-dropdown.hidden {
    display: none;
}
.autocomplete-dropdown {
    background: var(--tg-theme-bg-color, #1c2230);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    margin-top: 4px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.autocomplete-item {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2px 0;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.autocomplete-item:last-child {
    border-bottom: none;
}
.autocomplete-item:active,
.autocomplete-item:hover {
    background: rgba(255,255,255,0.06);
}
.autocomplete-sa {
    font-size: 14px;
    font-weight: 600;
    color: var(--tg-theme-text-color, #fff);
}
.autocomplete-subject {
    font-size: 13px;
    color: rgba(142, 154, 175, 0.8);
}
.autocomplete-nm {
    font-size: 12px;
    color: rgba(142, 154, 175, 0.55);
    font-variant-numeric: tabular-nums;
}
.autocomplete-sep {
    font-size: 13px;
    color: rgba(142, 154, 175, 0.35);
}

.input-with-loader input {
    padding-right: 40px;
}

.input-spinner {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--tg-theme-button-color, #00BFA6);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

/* Размеры */
.sizes-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.qty-stock-hint {
    font-size: 13px;
    color: var(--tg-theme-hint-color, #999);
    margin-top: 6px;
}

/* ── Плоский список размеров ── */
#size-list { display: flex; flex-direction: column; gap: 6px; }

.size-row {
    border-radius: 12px;
    background: var(--tg-theme-secondary-bg-color, #f5f5f5);
    overflow: hidden;
    transition: background 0.15s;
}
.size-row.selected {
    background: rgba(0, 191, 166, 0.08);
    outline: 1.5px solid #00BFA6;
}

.size-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    cursor: pointer;
    user-select: none;
}
.size-row-header:active { opacity: 0.7; }

.size-row-label { font-weight: 600; font-size: 15px; }
.size-row-stock { font-size: 13px; color: var(--tg-theme-hint-color, #999); }
.size-row.selected .size-row-stock { display: none; }

.size-row-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px 12px;
}
.size-row-qty.hidden { display: none; }

.size-row-input {
    flex: 1;
    border: 1.5px solid #00BFA6;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 15px;
    background: var(--tg-theme-bg-color, #fff);
    color: var(--tg-theme-text-color, #000);
    text-align: center;
}
.size-row-max { font-size: 12px; color: var(--tg-theme-hint-color, #999); white-space: nowrap; }

.sizes-total { text-align: right; font-size: 13px; color: var(--tg-theme-hint-color, #999); margin-top: 6px; }

/* Количество: хинт при превышении максимума */
.qty-hint {
    margin-top: 6px;
    font-size: 13px;
    color: #ff9500;
    animation: fadeIn 0.2s ease;
}

/* UX#1: статус поиска под полем артикула */
.search-status {
    margin-top: 6px;
    font-size: 13px;
    color: var(--tg-theme-hint-color, #8e9aaf);
    display: flex;
    align-items: center;
    gap: 6px;
    animation: fadeIn 0.2s ease;
}

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

/* Button loading state */
.btn-submit.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-submit.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

.product-name {
    padding: 13px 14px;
    background: rgba(0, 191, 166, 0.08);
    border-radius: 12px;
    color: var(--tg-theme-text-color, #ffffff);
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(0, 191, 166, 0.15);
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background: linear-gradient(180deg, #00D4B5 0%, #00BFA6 50%, #00A896 100%);
    color: var(--tg-theme-button-text-color, #ffffff);
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.2s ease,
                opacity 0.2s ease,
                filter 0.2s ease;
    box-shadow: 0 4px 14px rgba(0, 191, 166, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
    letter-spacing: 0.2px;
    position: relative;
    overflow: hidden;
}

.btn-submit::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 50%);
    pointer-events: none;
}

.btn-submit:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
    filter: saturate(0.5);
}

.btn-submit:hover:not(:disabled) {
    filter: brightness(1.06);
}

.btn-submit:active:not(:disabled) {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(0, 191, 166, 0.25),
                inset 0 1px 3px rgba(0, 0, 0, 0.15);
    filter: brightness(0.95);
}

/* Confirmation step */
.confirm-step {
    margin-top: 8px;
}

.confirm-step.hidden {
    display: none;
}

.confirm-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--tg-theme-text-color, #ffffff);
    margin-bottom: 12px;
}

.confirm-card {
    background: var(--tg-theme-secondary-bg-color, #242b3d);
    border-radius: 14px;
    padding: 4px 0;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.confirm-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
}
.confirm-row.hidden { display: none; }

.confirm-row + .confirm-row {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.confirm-label {
    font-size: 14px;
    color: var(--tg-theme-hint-color, #8e9aaf);
}

.confirm-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--tg-theme-text-color, #ffffff);
    text-align: right;
    max-width: 65%;
    word-break: break-word;
    white-space: normal;
}

/* Размеры — многострочное значение */
.confirm-sizes-value {
    white-space: pre-line;
    text-align: right;
    line-height: 1.6;
}

.confirm-row-accent .confirm-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--tg-theme-button-color, #00BFA6);
}

.btn-back {
    width: 100%;
    padding: 13px;
    background: transparent;
    color: var(--tg-theme-button-color, #00BFA6);
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 8px;
    transition: transform 0.15s ease, background 0.15s ease;
}

.btn-back:active {
    transform: scale(0.97);
    background: rgba(0, 191, 166, 0.08);
}

.submit-bulk-hint {
    text-align: center;
    font-size: 13px;
    color: var(--tg-theme-hint-color, #8e8e93);
    margin-top: 6px;
    margin-bottom: 0;
}

/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loader.hidden {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--tg-theme-button-color, #00BFA6);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* iOS-style Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    border: 1px solid transparent;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

.status-pending {
    background: rgba(255, 204, 0, 0.15);
    color: #ffcc00;
}

.status-pending .status-dot {
    background: #ffcc00;
    animation: none;
}

.status-searching {
    background: rgba(0, 122, 255, 0.12);
    color: #3d9aff;
    border-color: rgba(0, 122, 255, 0.2);
}

.status-searching .status-dot {
    background: #007aff;
    box-shadow: 0 0 6px rgba(0, 122, 255, 0.5);
}

.status-executing {
    background: rgba(175, 82, 222, 0.12);
    color: #c47aef;
    border-color: rgba(175, 82, 222, 0.2);
}

.status-executing .status-dot {
    background: #af52de;
    box-shadow: 0 0 6px rgba(175, 82, 222, 0.5);
}

.status-completed {
    background: rgba(52, 199, 89, 0.12);
    color: #34c759;
    border-color: rgba(52, 199, 89, 0.15);
}

.status-completed .status-dot {
    background: #34c759;
    animation: none;
}

.status-cancelled {
    background: rgba(255, 59, 48, 0.15);
    color: #ff3b30;
}

.status-cancelled .status-dot {
    background: #ff3b30;
    animation: none;
}

.status-paused {
    background: rgba(255, 204, 0, 0.15);
    color: #e6a700;
}

.status-paused .status-dot {
    background: #e6a700;
    animation: none;
}

.status-failed {
    background: rgba(255, 59, 48, 0.15);
    color: #ff3b30;
}

.status-failed .status-dot {
    background: #ff3b30;
    animation: none;
}

/* Error message under status */
.request-error {
    font-size: 13px;
    color: var(--tg-theme-hint-color, #8e9aaf);
    padding: 4px 16px 0;
    line-height: 1.4;
}

.request-next-check {
    font-size: 12px;
    color: var(--tg-theme-hint-color, #8e9aaf);
    padding: 4px 16px 0;
    opacity: 0.75;
}

.request-recovery-hint {
    font-size: 12px;
    color: var(--tg-theme-link-color, #00bfa6);
    padding: 4px 16px 0;
    line-height: 1.4;
    opacity: 0.85;
}

/* Start/Stop/Execute buttons */
.btn-start {
    color: #34c759;
    background: rgba(52, 199, 89, 0.08);
}

.btn-start:hover  { background: rgba(52, 199, 89, 0.13); }
.btn-start:active { background: rgba(52, 199, 89, 0.18); }

.btn-execute {
    color: #007aff;
    font-weight: 600;
    background: rgba(0, 122, 255, 0.08);
}

.btn-execute:hover  { background: rgba(0, 122, 255, 0.13); }
.btn-execute:active { background: rgba(0, 122, 255, 0.18); }

.btn-stop {
    color: #e6a700;
    background: rgba(230, 167, 0, 0.08);
}

.btn-stop:hover  { background: rgba(230, 167, 0, 0.13); }
.btn-stop:active { background: rgba(230, 167, 0, 0.18); }

/* Button inline loading state */
.btn-action.loading {
    pointer-events: none;
    opacity: 0.6;
    position: relative;
}

.btn-action.loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-left: 6px;
    vertical-align: middle;
}

/* Swipe actions hint */
.swipe-hint {
    font-size: 11px;
    color: var(--tg-theme-hint-color, #8e9aaf);
    text-align: center;
    padding: 8px;
    opacity: 0.7;
}

/* Card animations — spring-like entrance */
@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateY(24px) scale(0.97);
    }
    60% {
        opacity: 1;
        transform: translateY(-2px) scale(1.005);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.request-card {
    animation: slideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.request-card:nth-child(1) { animation-delay: 0ms; }
.request-card:nth-child(2) { animation-delay: 60ms; }
.request-card:nth-child(3) { animation-delay: 120ms; }
.request-card:nth-child(4) { animation-delay: 180ms; }
.request-card:nth-child(5) { animation-delay: 240ms; }

/* Enhanced empty state */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px 24px;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 14px;
    opacity: 0.4;
    stroke: var(--tg-theme-hint-color, #8e9aaf);
}

.empty-state-text {
    font-size: 15px;
    color: var(--tg-theme-hint-color, #8e9aaf);
    text-align: center;
}

.empty-state-hint {
    font-size: 13px;
    color: var(--tg-theme-hint-color, #8e9aaf);
    opacity: 0.7;
    margin-top: 8px;
}

.btn-create-first {
    margin-top: 16px;
    padding: 10px 20px;
    background: var(--tg-theme-button-color, #00BFA6);
    color: var(--tg-theme-button-text-color, #ffffff);
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    min-height: 44px;
    transition: opacity 0.15s;
}
.btn-create-first:active { opacity: 0.8; }

/* Onboarding steps */
.onboarding-steps {
    margin-top: 20px;
    text-align: left;
    width: 100%;
    max-width: 280px;
}

.onboarding-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 14px;
    color: var(--tg-theme-text-color, #ffffff);
    opacity: 0.8;
}

.onboarding-step + .onboarding-step {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.onboarding-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #00D4B5, #00A896);
    color: #ffffff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 191, 166, 0.3);
}

/* Haptic feedback simulation */
.request-card:active {
    transition: transform 0.1s ease;
}

/* Tab transition */
.requests-list {
    transition: opacity 0.2s ease;
}

.requests-list.hidden {
    opacity: 0;
    display: none;
}

/* Better button feedback — already handled in individual button styles */

/* Skeleton loading */
.skeleton-card {
    padding: 16px !important;
}

.skeleton-line,
.skeleton-block,
.skeleton-circle {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}

.skeleton-line {
    height: 14px;
    margin-bottom: 10px;
}

.skeleton-line-wide { width: 70%; }
.skeleton-line-medium { width: 40%; }
.skeleton-line-narrow { width: 30%; margin: 12px auto 0; }

.skeleton-route {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
}

.skeleton-block {
    flex: 1;
    height: 48px;
    border-radius: 10px;
}

.skeleton-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

#skeleton-list.hidden {
    display: none;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: max(env(safe-area-inset-top, 0px), 16px);
    left: 16px;
    right: 16px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.toast {
    padding: 14px 22px;
    background: var(--tg-theme-secondary-bg-color, #242b3d);
    color: var(--tg-theme-text-color, #ffffff);
    border-radius: 14px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35),
                0 1px 4px rgba(0, 0, 0, 0.15);
    animation: toastIn 0.35s cubic-bezier(0.32, 0.72, 0, 1) forwards;
    pointer-events: auto;
    text-align: center;
    max-width: 320px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

.toast.toast-success {
    border-left: 3px solid #34c759;
}

.toast.toast-error {
    border-left: 3px solid #ff3b30;
}

.toast.toast-out {
    animation: toastOut 0.25s ease-in forwards;
}

@keyframes toastIn {
    0% { opacity: 0; transform: translateY(-24px) scale(0.95); }
    70% { opacity: 1; transform: translateY(14px) scale(1.01); }
    100% { opacity: 1; transform: translateY(12px) scale(1); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateY(12px) scale(1); }
    to { opacity: 0; transform: translateY(-20px) scale(0.95); }
}

/* Pull-to-refresh */
.pull-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    font-size: 13px;
    color: var(--tg-theme-hint-color, #8e9aaf);
    transition: opacity 0.2s;
}

.pull-indicator.hidden {
    display: none;
}

.pull-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--tg-theme-button-color, #00BFA6);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* UX#1: Активность на searching/executing карточках */
.request-activity {
    font-size: 11px;
    color: var(--tg-theme-hint-color, #8e9aaf);
    padding: 4px 16px 0;
    letter-spacing: 0.1px;
}

/* UX#2: Победная вспышка при completed */
@keyframes completedFlash {
    0%   { background: rgba(52, 199, 89, 0.0); }
    30%  { background: rgba(52, 199, 89, 0.18); }
    100% { background: rgba(52, 199, 89, 0.0); }
}

.card-completed-flash {
    animation: completedFlash 1.2s ease-out forwards;
}

/* UX#3: Кнопка "Повторить" в архиве */
.btn-repeat {
    color: #00BFA6;
    border-color: rgba(0, 191, 166, 0.3);
}

.btn-repeat:hover  { background: rgba(0, 191, 166, 0.08); }
.btn-repeat:active { background: rgba(0, 191, 166, 0.18); }

/* Apple-polish: animated arrow on searching/executing cards */
@keyframes arrowPulse {
    0%, 100% { transform: translateX(0) scale(1); opacity: 0.7; }
    50%       { transform: translateX(3px) scale(1.18); opacity: 1; }
}

.request-card[data-status="searching"] .route-arrow,
.request-card[data-status="executing"] .route-arrow {
    animation: arrowPulse 1.4s ease-in-out infinite;
}

/* Apple-polish: card removal animation */
@keyframes cardRemove {
    0%   { opacity: 1; transform: translateX(0) scale(1); max-height: 300px; margin-bottom: 12px; }
    45%  { opacity: 0; transform: translateX(-28px) scale(0.97); }
    100% { opacity: 0; transform: translateX(-28px) scale(0.97); max-height: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; }
}

.card-removing {
    animation: cardRemove 0.38s cubic-bezier(0.32, 0.72, 0, 1) forwards;
    pointer-events: none;
    overflow: hidden;
}

/* Apple-polish: smooth status badge color transitions */
.status-badge {
    transition: background 0.4s ease, color 0.3s ease, border-color 0.3s ease;
}

.status-dot {
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

/* Apple-polish: skeleton → content smooth fade */
@keyframes contentFadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}

#current-list:not(.hidden),
#archive-list:not(.hidden) {
    animation: contentFadeIn 0.22s ease forwards;
}

/* Apple-polish: autocomplete item scale on press */
.autocomplete-item {
    transition: background 0.15s ease, transform 0.1s ease;
}

.autocomplete-item:active {
    transform: scale(0.985);
    background: rgba(255, 255, 255, 0.1) !important;
}

.btn-load-more {
    display: block;
    width: 100%;
    padding: 14px;
    margin: 8px 0 16px;
    background: var(--tg-theme-secondary-bg-color, #242b3d);
    border: none;
    border-radius: 12px;
    color: var(--tg-theme-hint-color, #8e9aaf);
    font-size: 14px;
    cursor: pointer;
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════
   QUOTA SNAPSHOT: статусы квот в dropdown и карта квот
   ═══════════════════════════════════════════════════════════ */

/* Предупреждение о закрытых dst-складах */
/* Группа кнопок заголовка dst */
.target-wh-header-btns {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-select-open {
    background: none;
    border: none;
    padding: 3px 8px;
    font-size: 12px;
    color: var(--tg-theme-link-color, #00897b);
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s;
    white-space: nowrap;
    line-height: 1.4;
}
.btn-select-open:active { background: rgba(255,255,255,0.1); }
.btn-select-open.hidden { display: none; }

/* Легенда значков квот */
.quota-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 0 2px;
    font-size: 12px;
    color: var(--tg-theme-hint-color, #8e9aaf);
    position: relative;
}
.quota-legend.no-snapshot { display: none; }

.quota-legend-items { flex: 1; line-height: 1.4; }

.quota-legend-hint-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--tg-theme-secondary-bg-color, #2a2f3e);
    color: var(--tg-theme-hint-color, #8e9aaf);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    flex-shrink: 0;
    user-select: none;
}

.quota-legend-tooltip {
    position: absolute;
    bottom: calc(100% + 6px);
    right: 0;
    width: 260px;
    background: var(--tg-theme-secondary-bg-color, #1e2330);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.55;
    color: var(--tg-theme-text-color, #e0e0e0);
    box-shadow: 0 4px 20px rgba(0,0,0,0.35);
    z-index: 200;
}
.quota-legend-tooltip.hidden { display: none; }

.quota-dst-warning {
    margin: 8px 0 4px;
    padding: 10px 12px;
    background: rgba(230, 167, 0, 0.12);
    border: 1px solid rgba(230, 167, 0, 0.35);
    border-radius: 10px;
    font-size: 13px;
    color: var(--tg-theme-text-color, #e0e0e0);
    line-height: 1.5;
}
.quota-dst-warning.hidden { display: none; }

/* Тёмная подсветка для закрытых dst в списке */
.target-wh-item.quota-closed { opacity: 0.65; }
.target-wh-item.quota-stale  { opacity: 0.5; }

/* Запрещённый WB склад (категорийный запрет) — серый, не выбирается (23.06) */
.target-wh-item.dst-forbidden {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}
.target-wh-item.dst-forbidden .target-wh-checkmark { visibility: hidden; }
.dst-forbidden-tag {
    font-size: 11px;
    color: #ff3b30;
    margin-left: 4px;
    white-space: nowrap;
}

.district-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 16px 7px 13px;
    /* Лёгкий бирюзовый акцент: плашка-разделитель округа выделяется от складов */
    background: rgba(0, 191, 166, 0.10);
    border-left: 3px solid #00BFA6;
    border-bottom: 1px solid rgba(0, 191, 166, 0.18);
    margin-top: 6px;
}
.district-header:first-child {
    margin-top: 0;
}
.district-name {
    font-size: 11px;
    color: #00BFA6;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    font-weight: 700;
}
.district-all-btn {
    font-size: 12px;
    color: #00BFA6;
    background: none;
    border: 1px solid #00BFA6;
    border-radius: 10px;
    padding: 4px 10px;
    min-height: 32px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    line-height: 1.6;
}

/* Вкладка карты квот */
.quota-map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.quota-map-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--tg-theme-text-color, #ffffff);
}
.quota-map-hint {
    font-size: 12px;
    color: var(--tg-theme-hint-color, #8e9aaf);
    margin-bottom: 12px;
}
.btn-quota-refresh {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.15s;
}
.btn-quota-refresh:active { background: rgba(255,255,255,0.1); }

.quota-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.quota-table th {
    text-align: left;
    padding: 6px 8px;
    color: var(--tg-theme-hint-color, #8e9aaf);
    font-weight: 500;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}
.quota-table td {
    padding: 7px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    vertical-align: middle;
}
.quota-table tr:last-child td { border-bottom: none; }
.quota-wh-name { font-weight: 500; color: var(--tg-theme-text-color, #e0e0e0); }
.quota-cell-open   { color: #34c759; font-size: 12px; }
.quota-cell-closed { color: var(--tg-theme-hint-color, #8e9aaf); font-size: 12px; }
.quota-cell-stale  { color: #e6a700; font-size: 12px; }
.quota-cell-unknown{ color: #555; font-size: 12px; }

/* ═════════════════════════════════════════════════════════════════════
   Billing — balance badge + packages modal (23.05.2026)
   ═════════════════════════════════════════════════════════════════════ */

/* Balance badge в шапке */
.header {
    position: relative;
}

.balance-badge {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(0, 191, 166, 0.18) 0%, rgba(0, 191, 166, 0.08) 100%);
    border: 1px solid rgba(0, 191, 166, 0.4);
    border-radius: 999px;
    color: #00BFA6;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.balance-badge:hover, .balance-badge:active {
    background: rgba(0, 191, 166, 0.25);
    transform: translateY(-50%) scale(1.03);
}

.balance-icon {
    font-size: 14px;
    line-height: 1;
}

.balance-text {
    line-height: 1.2;
    white-space: nowrap;
}

.balance-badge.balance-low {
    background: rgba(230, 167, 0, 0.18);
    border-color: rgba(230, 167, 0, 0.5);
    color: #e6a700;
}

.balance-badge.balance-zero {
    background: rgba(255, 90, 90, 0.18);
    border-color: rgba(255, 90, 90, 0.5);
    color: #ff5a5a;
}

/* Пульсация бейджа при низком/нулевом балансе — подсказывает «нажми меня».
   Клиенты не понимали, что на алмазик надо нажать для тарифной сетки (вопрос Елены 15.06). */
@keyframes balancePulse {
    0%, 100% {
        transform: translateY(-50%) scale(1);
        box-shadow: 0 0 0 0 rgba(0, 191, 166, 0.0);
    }
    50% {
        transform: translateY(-50%) scale(1.06);
        box-shadow: 0 0 0 5px rgba(0, 191, 166, 0.0), 0 0 12px 2px rgba(0, 191, 166, 0.35);
    }
}

@keyframes balancePulseZero {
    0%, 100% {
        transform: translateY(-50%) scale(1);
        box-shadow: 0 0 0 0 rgba(255, 90, 90, 0.0);
    }
    50% {
        transform: translateY(-50%) scale(1.06);
        box-shadow: 0 0 12px 2px rgba(255, 90, 90, 0.4);
    }
}

.balance-badge.balance-pulse {
    animation: balancePulse 2s ease-in-out infinite;
}

.balance-badge.balance-zero.balance-pulse {
    animation: balancePulseZero 2s ease-in-out infinite;
}

/* На тапе пульсация не мешает hover-эффекту */
.balance-badge.balance-pulse:active {
    animation: none;
}

/* Плашка-указатель на 💎 в empty state — ведёт клиента к тарифной сетке.
   Стрелка ↗ показывает вверх-вправо, туда где находится бейдж. */
.pay-pointer-hint {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    margin: 16px auto 4px;
    max-width: 340px;
    padding: 12px 14px;
    background: linear-gradient(135deg, rgba(0, 191, 166, 0.14) 0%, rgba(0, 191, 166, 0.06) 100%);
    border: 1px solid rgba(0, 191, 166, 0.35);
    border-radius: 14px;
}

.pay-pointer-arrow {
    font-size: 22px;
    line-height: 1.2;
    color: #00BFA6;
    flex-shrink: 0;
    animation: payArrowNudge 1.8s ease-in-out infinite;
}

@keyframes payArrowNudge {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(3px, -3px); }
}

.pay-pointer-text {
    font-size: 13.5px;
    line-height: 1.4;
    color: var(--tg-theme-text-color, #e9edf2);
}

.pay-pointer-text strong {
    color: #00BFA6;
}

/* Уведомление «сначала кабинет» в модалке тарифов */
.cabinet-notice {
    margin: 0 0 14px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(0, 191, 166, 0.16) 0%, rgba(0, 191, 166, 0.07) 100%);
    border: 1px solid rgba(0, 191, 166, 0.4);
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.45;
    color: var(--tg-theme-text-color, #e9edf2);
}

.cabinet-notice strong {
    color: #00BFA6;
}

.cabinet-notice-btn {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    background: #00BFA6;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.cabinet-notice-btn:active {
    background: #00a890;
}

/* Packages modal */
.packages-modal-content {
    max-width: 480px;
    width: calc(100% - 32px);
}

/* Close button — бирюзовый круг в стиле бренда #00BFA6.
   Применяется для .modal-close (X в шапке модалок). Раньше не было кастомного
   стиля → браузер рисовал дефолтную белую таблетку. */
.modal-close {
    /* UX audit 27.05: 32→44px — Apple HIG Touch Target minimum.
       Особенно критично на iPhone SE / Mini App в маленькой шапке. */
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 191, 166, 0.12);
    color: #00BFA6;
    font-size: 22px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, transform 0.1s ease;
    -webkit-tap-highlight-color: transparent;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.modal-close:hover {
    background: rgba(0, 191, 166, 0.22);
}

.modal-close:active {
    background: rgba(0, 191, 166, 0.32);
    transform: scale(0.92);
}

.balance-summary {
    background: rgba(0, 191, 166, 0.08);
    border: 1px solid rgba(0, 191, 166, 0.3);
    border-radius: 12px;
    padding: 12px 16px;
    margin: 0 0 16px 0;
}

.balance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 14px;
    color: var(--tg-theme-text-color, #e0e0e0);
}

.balance-row strong {
    color: #00BFA6;
    font-size: 16px;
}

.balance-row-muted {
    color: var(--tg-theme-hint-color, #8e9aaf);
    font-size: 13px;
}

.packages-lead {
    font-size: 14px;
    color: var(--tg-theme-hint-color, #8e9aaf);
    text-align: center;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.packages-lead strong {
    color: var(--tg-theme-text-color, #e0e0e0);
}

.packages-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.pkg-card {
    position: relative;
    padding: 16px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--tg-theme-text-color, #e0e0e0);
    text-align: center;
    -webkit-tap-highlight-color: transparent;
}

.pkg-card:hover, .pkg-card:active {
    background: rgba(0, 191, 166, 0.1);
    border-color: rgba(0, 191, 166, 0.5);
    transform: translateY(-1px);
}

.pkg-card.pkg-loading {
    opacity: 0.6;
    pointer-events: none;
}

.pkg-popular {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: #00BFA6;
    color: #06120F;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.pkg-qty {
    font-size: 14px;
    color: var(--tg-theme-hint-color, #8e9aaf);
    margin-bottom: 4px;
}

.pkg-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--tg-theme-text-color, #e0e0e0);
    margin-bottom: 2px;
}

.pkg-per-unit {
    font-size: 11px;
    color: var(--tg-theme-hint-color, #8e9aaf);
}

.packages-note {
    font-size: 12px;
    color: var(--tg-theme-hint-color, #8e9aaf);
    text-align: center;
    margin: 0;
    line-height: 1.5;
}

.packages-email-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    margin: 12px 0;
    background: var(--tg-theme-secondary-bg-color, #f4f4f5);
    border-radius: 10px;
    font-size: 13px;
}

.packages-email-label {
    color: var(--tg-theme-hint-color, #8e9aaf);
    white-space: nowrap;
}

.packages-email-value {
    flex: 1;
    color: var(--tg-theme-text-color, #000);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.packages-email-value.empty {
    color: var(--tg-theme-hint-color, #8e9aaf);
    font-style: italic;
    font-weight: 400;
}

.packages-email-edit {
    background: none;
    border: none;
    color: #00BFA6;
    cursor: pointer;
    font-size: 13px;
    padding: 4px 8px;
    font-weight: 500;
}

.packages-email-edit:active {
    opacity: 0.6;
}

/* Inline-поле email (замена window.prompt, не работает в Telegram WebView) */
.packages-email-edit-box {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    align-items: center;
}
.packages-email-edit-box.hidden {
    display: none;
}
.packages-email-input {
    flex: 1;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--tg-theme-hint-color, #999);
    border-radius: 8px;
    font-size: 16px;  /* ≥16px — иначе iOS WebView зумит viewport при фокусе */
    background: var(--tg-theme-bg-color, #fff);
    color: var(--tg-theme-text-color, #000);
}
.packages-email-input:focus {
    outline: none;
    border-color: #00BFA6;
}
.packages-email-save {
    min-height: 44px;
    padding: 10px 16px;
    background: #00BFA6;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.packages-email-save:active {
    opacity: 0.7;
}

.packages-loading, .packages-empty, .packages-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 24px;
    color: var(--tg-theme-hint-color, #8e9aaf);
    font-size: 14px;
}

.packages-error {
    color: #ff5a5a;
}

@media (max-width: 380px) {
    .packages-list {
        grid-template-columns: 1fr;
    }
}

/* ─── Trial Block (50 шт за подписку) ────────────────────────────────── */
.trial-block {
    background: linear-gradient(135deg, rgba(0, 191, 166, 0.08) 0%, rgba(0, 191, 166, 0.16) 100%);
    border: 1.5px solid rgba(0, 191, 166, 0.35);
    border-radius: 16px;
    padding: 16px;
    margin: 12px 0;
    text-align: center;
}

.trial-block-title {
    font-size: 16px;
    font-weight: 600;
    color: #00BFA6;
    margin-bottom: 6px;
}

.trial-block-text {
    font-size: 13px;
    color: var(--tg-theme-text-color, #1a1a1a);
    line-height: 1.4;
    margin-bottom: 12px;
}

.trial-claim-btn {
    background: linear-gradient(180deg, #00D4B5 0%, #00BFA6 50%, #00A896 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    min-width: 200px;
    min-height: 44px;
    box-shadow: 0 2px 8px rgba(0, 191, 166, 0.25);
    transition: all 0.15s ease;
}

.trial-claim-btn:active {
    transform: scale(0.96);
    box-shadow: 0 1px 4px rgba(0, 191, 166, 0.2);
}

.trial-claim-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.trial-claim-btn.trial-loading {
    opacity: 0.7;
}

/* ─── Empty balance hint ─────────────────────────────────────────────── */
.empty-balance-hint {
    background: rgba(255, 200, 100, 0.1);
    border-left: 3px solid #ffb347;
    border-radius: 8px;
    padding: 10px 12px;
    margin: 8px 0 4px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--tg-theme-text-color, #1a1a1a);
}

.empty-balance-hint strong {
    color: #ffb347;
}

/* ─── Club Block — для участников клуба Titan ─────────────────────── */
.club-block {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08) 0%, rgba(0, 191, 166, 0.10) 100%);
    border: 1.5px solid rgba(255, 215, 0, 0.4);
    border-radius: 16px;
    padding: 16px;
    margin: 12px 0;
    text-align: center;
}

.club-block-icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.club-block-title {
    font-size: 15px;
    font-weight: 600;
    color: #ffd700;
    margin-bottom: 8px;
}

.club-block-text {
    font-size: 13px;
    color: var(--tg-theme-text-color, #1a1a1a);
    line-height: 1.4;
}

.club-block-text strong {
    color: #00BFA6;
}

/* === Кнопка помощи === */
.help-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  background: none;
  color: var(--tg-theme-hint-color, #888);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

/* === Тур-онбординг === */
.tour-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
}
.tour-overlay.hidden { display: none; }

.tour-sheet {
  background: var(--tg-theme-bg-color, #1a1a2e);
  border-radius: 20px 20px 0 0;
  padding: 24px 20px 32px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
}

.tour-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.tour-step-label {
  font-size: 13px;
  color: var(--tg-theme-hint-color, #888);
}

.tour-skip-btn {
  font-size: 13px;
  color: var(--tg-theme-hint-color, #888);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
}

.tour-screen { display: block; }
.tour-screen.hidden { display: none; }

.tour-icon {
  font-size: 48px;
  text-align: center;
  margin-bottom: 16px;
}

.tour-title {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 14px;
  line-height: 1.3;
  color: var(--tg-theme-text-color, #e0e0e0);
}

.tour-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--tg-theme-hint-color, #aaa);
  text-align: center;
}
.tour-text strong { color: var(--tg-theme-text-color, #e0e0e0); }
.tour-text code {
  background: rgba(0,191,166,0.15);
  color: #00BFA6;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 14px;
}

.tour-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 32px;
}

.tour-dots { display: flex; gap: 6px; }

.tour-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transition: background 0.2s;
}
.tour-dot.active { background: #00BFA6; }

.tour-btn-primary {
  background: #00BFA6;
  color: #000;
  border: none;
  border-radius: 20px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.tour-btn-secondary {
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--tg-theme-hint-color, #888);
  border-radius: 20px;
  padding: 8px 18px;
  font-size: 14px;
  cursor: pointer;
}
.tour-btn-secondary:disabled { opacity: 0.3; cursor: default; }

/* === Подсказки при фокусе === */
.field-hint {
  font-size: 12px;
  color: #00BFA6;
  padding: 4px 2px 0;
  line-height: 1.5;
}
.field-hint.hidden { display: none; }

/* Баннер «нужна подписка на канал» (отписался от Ленивый Селлер) */
.sub-required-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 0 16px 12px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(255,59,48,0.12), rgba(255,149,0,0.10));
    border: 1px solid rgba(255,149,0,0.45);
    border-radius: 14px;
    text-align: center;
}
.sub-required-banner.hidden { display: none !important; }
.sub-banner-icon { font-size: 28px; }
.sub-banner-text { font-size: 14px; line-height: 1.45; color: var(--tg-theme-text-color, #fff); }
.sub-banner-link {
    color: #00BFA6;
    font-weight: 600;
    text-decoration: underline;
}
.sub-banner-btn {
    width: 100%;
    min-height: 44px;
    border: none;
    border-radius: 12px;
    background: #00BFA6;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.sub-banner-btn:active { opacity: 0.85; }
.btn-create.btn-disabled,
.btn-create:disabled {
    opacity: 0.45;
    pointer-events: none;
    filter: grayscale(0.4);
}

/* ═══════════════════════════════════════════════════════════════════
   support_2026_07 — акция поддержки продавцов (главный экран, вне модалки)
   ═══════════════════════════════════════════════════════════════════ */
.support-campaign {
    margin: 0 16px 14px;
    padding: 18px 16px;
    background: linear-gradient(160deg, rgba(0, 191, 166, 0.16) 0%, rgba(0, 60, 55, 0.55) 100%);
    border: 1px solid rgba(0, 191, 166, 0.4);
    border-radius: 16px;
    text-align: center;
}
.support-campaign.hidden { display: none !important; }

.support-campaign-kicker {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #00E6C3;
    background: rgba(0, 191, 166, 0.15);
    border-radius: 20px;
    padding: 3px 10px;
    margin-bottom: 8px;
}

.support-campaign-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--tg-theme-text-color, #ffffff);
    margin: 0 0 6px;
}

.support-campaign-copy {
    font-size: 13px;
    line-height: 1.45;
    color: var(--tg-theme-hint-color, #c7d0dd);
    margin: 0 0 14px;
}

.support-campaign-social {
    font-size: 12px;
    color: #00E6C3;
    margin: -6px 0 12px;
}
.support-campaign-social.hidden { display: none; }

.support-campaign-primary {
    display: block;
    width: 100%;
    min-height: 44px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(180deg, #00D4B5 0%, #00BFA6 50%, #00A896 100%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 191, 166, 0.3);
    transition: transform 0.15s ease, opacity 0.15s ease;
}
.support-campaign-primary:active { transform: scale(0.97); }
.support-campaign-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.support-campaign-primary.hidden { display: none; }
.support-campaign-primary + .support-campaign-primary { margin-top: 8px; }

.support-campaign-secondary {
    display: block;
    width: 100%;
    min-height: 44px;
    margin-top: 8px;
    border: 1.5px solid rgba(0, 191, 166, 0.5);
    border-radius: 12px;
    background: transparent;
    color: #00E6C3;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.support-campaign-secondary:active { opacity: 0.8; }
.support-campaign-secondary.hidden { display: none; }

.support-campaign-link {
    display: inline-block;
    margin-top: 10px;
    border: none;
    background: none;
    color: var(--tg-theme-hint-color, #8e9aaf);
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
}

.support-campaign-rules-body {
    padding: 4px 4px 16px;
    max-height: 60vh;
    overflow-y: auto;
}
.support-campaign-rules-body p {
    font-size: 13px;
    line-height: 1.5;
    color: var(--tg-theme-text-color, #ffffff);
    margin: 0 0 12px;
}
.support-campaign-rules-body strong { color: #00E6C3; }

@media (prefers-color-scheme: light) {
    .support-campaign {
        background: linear-gradient(160deg, rgba(0, 191, 166, 0.10) 0%, rgba(0, 191, 166, 0.04) 100%);
        border-color: rgba(0, 150, 136, 0.3);
    }
    .support-campaign-title { color: #0a3d3a; }
    .support-campaign-copy { color: #4a5a6a; }
    .support-campaign-rules-body p { color: #1a1a1a; }
}

@media (max-width: 380px) {
    .support-campaign { padding: 14px 12px; }
    .support-campaign-title { font-size: 16px; }
}
