/* cabinet.css — Личный кабинет */

.cab-wrap {
    max-width: 500px;
    margin: 0 auto;
    padding: 90px 15px 40px;
    text-align: center;
}

.cab-title {
    font-size: 1.4rem;
    font-weight: 400;
    text-align: center;
    padding: 10px 0 25px;
    margin: 0;
    color: #2D7D9A;
}

.cab-subtitle {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 300;
    margin: 0 0 15px;
}

.cab-userinfo {
    text-align: center;
    margin-bottom: 25px;
}
.cab-userinfo__name {
    font-size: 1rem;
    color: #333;
}
.cab-userinfo__email {
    font-size: 0.85rem;
    color: #888;
    margin-left: 12px;
}
.cab-userinfo__verified {
    color: #4caf50;
}
.cab-userinfo__unverified {
    color: #e57373;
}

/* --- Menu --- */

.cab-menu {
    display: flex;
    flex-direction: column;
}

.cab-menu-item {
    display: block;
    padding: 14px 10px;
    border-bottom: 1px solid #eee;
    color: #333;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.15s;
}

.cab-menu-item:hover {
    background: #f8f8f8;
}

.cab-menu-item--admin {
    color: #c00;
}

.cab-menu-item--logout {
    color: #888;
}

/* --- Guest links --- */

.cab-guest-links {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

/* --- Forms --- */

.cab-form-box {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

.cab-form {
    margin: 0;
}

.cab-field {
    margin-bottom: 18px;
}

.cab-field--checkbox {
    margin-bottom: 20px;
}

.cab-field--checkbox label {
    font-size: 0.9rem;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cab-label {
    display: block;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 5px;
    text-align: center;
}

.cab-input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: none;
    border-bottom: 1px solid #ccc;
    font-size: 1rem;
    outline: none;
    background: transparent;
    box-sizing: border-box;
    transition: border-color 0.2s;
    text-align: center;
}

.cab-input:focus {
    border-bottom-color: #2D7D9A;
}

.cab-input--center {
    text-align: center;
}

.cab-input--code {
    max-width: 120px;
    text-align: center;
    font-size: 1.3rem;
    letter-spacing: 6px;
}

.cab-textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    outline: none;
    resize: vertical;
    box-sizing: border-box;
    font-family: inherit;
}

.cab-textarea:focus {
    border-color: #2D7D9A;
}

.cab-phone-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    border-bottom: 1px solid #ccc;
}

.cab-phone-prefix {
    font-size: 1rem;
    color: #333;
    padding: 0 6px 0 0;
    flex-shrink: 0;
}

.cab-phone-row .cab-input {
    border-bottom: none;
}

/* --- Buttons --- */

.cab-btn {
    display: block;
    width: 100%;
    max-width: 250px;
    margin: 20px auto 0;
    padding: 12px 20px;
    background: #2D7D9A;
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: 1rem;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s;
}

.cab-btn:hover {
    background: #246a84;
}

.cab-btn:disabled {
    background: #aaa;
    cursor: default;
}

.cab-btn--secondary {
    background: transparent;
    color: #2D7D9A;
    border: 1px solid #2D7D9A;
}

.cab-btn--secondary:hover {
    background: #f0f8fb;
}

.cab-btn--danger {
    background: transparent;
    color: #ed4956;
    border: 1px solid #ed4956;
}
.cab-btn--danger:hover {
    background: #fef0f0;
}

/* --- Subscriptions --- */

.cab-sub-section {
    text-align: left;
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #efefef;
    border-radius: 10px;
    background: #fafafa;
}
.cab-sub-section .cab-subtitle {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 600;
}
.cab-sub-active {
    margin-bottom: 0;
}
.cab-sub-info {
    font-size: 14px;
    margin-bottom: 8px;
    color: #333;
}
.cab-sub-label {
    color: #888;
}
.cab-sub-empty {
    font-size: 14px;
    color: #666;
    margin: 0 0 14px;
}
.cab-sub-section .cab-btn {
    margin-top: 14px;
}

/* --- Links --- */

.cab-link {
    color: #2D7D9A;
    text-decoration: none;
    font-size: 1.05rem;
}

.cab-link:hover {
    text-decoration: underline;
}

.cab-alt-link {
    text-align: center;
    margin-top: 25px;
    font-size: 0.95rem;
    color: #666;
}

.cab-alt-link .cab-link {
    display: block;
    margin-top: 5px;
}

/* --- Messages --- */

.cab-error {
    color: #c00;
    font-size: 0.9rem;
    min-height: 0;
    margin-top: 4px;
}

.cab-success {
    color: #2a7;
    font-size: 0.95rem;
    text-align: center;
    margin: 10px 0;
}

.cab-note {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    margin-top: 20px;
}

.cab-empty {
    text-align: center;
    color: #888;
    font-size: 1rem;
    margin: 20px 0;
}

/* --- SMS verify --- */

.cab-sms-verify {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.cab-sms-verify .cab-field {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- Details (accordion) --- */

.cab-details {
    margin-top: 25px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.cab-details-summary {
    padding: 12px 15px;
    cursor: pointer;
    font-size: 1rem;
    color: #2D7D9A;
    user-select: none;
}

.cab-details-body {
    padding: 0 15px 15px;
}

/* --- Orders --- */

.cab-orders {
    margin-top: 10px;
}

.cab-order {
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    margin-bottom: 12px;
    overflow: hidden;
}

.cab-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f9f9f9;
    gap: 10px;
    flex-wrap: wrap;
}

.cab-order-num {
    font-weight: 500;
    color: #2D7D9A;
}

.cab-order-date {
    color: #888;
    font-size: 0.9rem;
}

.cab-order-cost {
    font-weight: 500;
}

.cab-order-items {
    padding: 10px 15px;
}

.cab-order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 0.9rem;
    gap: 8px;
}

.cab-order-item-name {
    flex: 1;
    color: #333;
}

.cab-order-item-qty {
    color: #888;
    flex-shrink: 0;
}

.cab-order-item-price {
    flex-shrink: 0;
    min-width: 70px;
    text-align: right;
}

.cab-order-actions {
    padding: 10px 15px;
    border-top: 1px solid #eee;
}

/* --- Track result --- */

#cab-track-result {
    margin-top: 20px;
}

/* --- Phone lookup --- */

.cab-phone-lookup {
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.cab-phone-result {
    margin-top: 15px;
    text-align: center;
}

.cab-phone-result .cab-note {
    background: #f8f8f8;
    border-radius: 4px;
    padding: 12px 15px;
    margin: 0;
}

/* --- Track form row --- */

.cab-field-row {
    display: flex;
    gap: 15px;
}

.cab-field--grow {
    flex: 1;
}

/* --- Tracking results (black & white design) --- */

.cab-track-loading {
    text-align: center;
    padding: 30px 0;
    color: #888;
    font-size: 0.95rem;
}

.cab-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 2px solid #ddd;
    border-top-color: #333;
    border-radius: 50%;
    animation: cab-spin 0.6s linear infinite;
    margin-bottom: 10px;
}

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

.cab-track-result-wrap {
    text-align: left;
    margin-top: 20px;
}

.cab-track-card {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 15px 18px;
    margin-bottom: 20px;
    background: #fafafa;
}

.cab-track-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cab-track-row:last-child {
    border-bottom: none;
}

.cab-track-label {
    color: #888;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-right: 10px;
}

.cab-track-value {
    font-weight: 500;
    text-align: right;
    word-break: break-all;
}

.cab-track-note {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
}

.cab-track-error {
    color: #c00;
    font-size: 0.9rem;
    padding: 8px 0;
}

.cab-track-section {
    margin-bottom: 25px;
}

.cab-track-carrier {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    margin: 0 0 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #333;
}

.cab-track-badge {
    display: inline-block;
    background: #f0f0f0;
    color: #333;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.8rem;
    margin-bottom: 8px;
    font-family: monospace;
}

.cab-track-timeline {
    position: relative;
    padding-left: 16px;
    border-left: 2px solid #e0e0e0;
    margin-bottom: 15px;
}

.cab-track-event {
    position: relative;
    padding: 6px 0 6px 12px;
    margin-bottom: 2px;
}

.cab-track-event::before {
    content: '';
    position: absolute;
    left: -21px;
    top: 12px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    border: 2px solid #fff;
}

.cab-track-event:first-child::before {
    background: #333;
    width: 10px;
    height: 10px;
    left: -22px;
    top: 11px;
}

.cab-track-event-date {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 1px;
}

.cab-track-event-text {
    font-size: 0.9rem;
    color: #333;
    line-height: 1.4;
}

.cab-track-event-loc {
    color: #888;
    font-size: 0.85rem;
}

/* Status color dots */
.cab-track-delivered::before { background: #2a7 !important; }
.cab-track-problem::before { background: #c00 !important; }
.cab-track-transit::before { background: #555 !important; }
.cab-track-courier::before { background: #333 !important; }
.cab-track-ready_for_pickup::before { background: #2a7 !important; }
.cab-track-temporary_problem::before { background: #e90 !important; }

/* --- Responsive --- */

@media (max-width: 600px) {
    .cab-wrap {
        padding: 15px 10px 30px;
    }

    .cab-order-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .cab-field-row {
        flex-direction: column;
        gap: 0;
    }
}

/* --- Email verified display --- */

.cab-email-verified {
    text-align: left;
}
.cab-email-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 1rem;
    color: #222;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-bottom: none;
    background: #fafafa;
}
.cab-email-display__text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cab-email-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #00a86b;
    white-space: nowrap;
    flex-shrink: 0;
}
.cab-email-badge__icon {
    font-size: 14px;
}
.cab-email-badge--pending {
    color: #b89400;
}
.cab-email-actions {
    display: flex;
    margin-bottom: 16px;
}
.cab-email-action-btn {
    flex: 1;
    padding: 10px 0;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #222;
    color: #fff;
    border: 1px solid #ddd;
    border-left: none;
    cursor: pointer;
    transition: background .2s;
}
.cab-email-action-btn:first-child { border-left: 1px solid #ddd; }
.cab-email-action-btn:hover { background: #444; }
.cab-email-action-btn--secondary {
    background: #fff;
    color: #222;
}
.cab-email-action-btn--secondary:hover { background: #f5f5f5; }
.cab-link-btn {
    display: inline-block;
    background: none;
    border: none;
    color: #0064b5;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    padding: 4px 8px;
}
.cab-link-btn:hover {
    text-decoration: underline;
}

/* --- Email flow (subscribe-style) --- */

.cab-email-flow {
    margin-top: 16px;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.cab-email-flow__hint {
    font-size: 14px;
    color: #555;
    margin: 0 0 16px;
    line-height: 1.5;
}
.cab-email-flow__field {
    margin-bottom: 16px;
}
.cab-email-flow__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}
.cab-email-flow__input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    background: #fafafa;
    transition: border-color .2s;
}
.cab-email-flow__input:focus {
    border-color: #0095f6;
    background: #fff;
}
.cab-email-flow__input--code {
    max-width: 140px;
    text-align: center;
    letter-spacing: 6px;
    font-size: 20px;
}
.cab-email-flow__btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: #0095f6;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s;
    text-align: center;
}
.cab-email-flow__btn:hover { opacity: .85; }
.cab-email-flow__btn:disabled { opacity: .4; cursor: default; }
.cab-email-flow__msg {
    font-size: 13px;
    margin-top: 10px;
    min-height: 18px;
    color: #ed4956;
}
.cab-email-flow__msg--ok {
    color: #00a86b;
}

/* Cabinet refresh */
body.cabinet-page {
    --cab-bg: #f5f5f7;
    --cab-surface: #ffffff;
    --cab-surface-muted: #fafafc;
    --cab-line: rgba(15, 23, 42, 0.08);
    --cab-line-strong: rgba(15, 23, 42, 0.14);
    --cab-text: #111111;
    --cab-muted: #6e6e73;
    --cab-blue: #0071e3;
    --cab-blue-soft: rgba(0, 113, 227, 0.12);
    --cab-success: #1d9a6c;
    --cab-danger: #d93025;
    background: var(--cab-bg);
    color: var(--cab-text);
    font-family: 'Roboto Condensed', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body.cabinet-page .cab-wrap {
    max-width: 640px;
    padding: 100px 18px 56px;
    text-align: left;
}

body.cabinet-page .cab-form-box,
body.cabinet-page #cab-edit-form,
body.cabinet-page .cab-sub-section,
body.cabinet-page .cab-track-card,
body.cabinet-page .cab-order,
body.cabinet-page .cab-phone-result .cab-note,
body.cabinet-page .cab-details {
    background: var(--cab-surface);
    border: 1px solid var(--cab-line);
    border-radius: 28px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.06);
}

body.cabinet-page .cab-form-box,
body.cabinet-page #cab-edit-form {
    padding: 32px 28px;
}

body.cabinet-page .cab-title,
body.cabinet-page .ui-form-header__title,
body.cabinet-page .checkout-header__title {
    margin: 0 0 10px;
    padding: 0;
    color: var(--cab-text);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 0.98;
    text-align: center;
    text-transform: none;
}

body.cabinet-page .cab-subtitle {
    margin: 0 0 22px;
    color: var(--cab-muted);
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.45;
    text-align: center;
}

body.cabinet-page .cab-username {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin: 0 auto 26px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--cab-surface);
    border: 1px solid var(--cab-line);
    color: var(--cab-muted);
    font-size: 0.98rem;
}

body.cabinet-page .cab-guest-links,
body.cabinet-page .cab-phone-lookup,
body.cabinet-page .cab-sms-verify {
    margin-bottom: 22px;
    padding: 18px 20px;
    border: 1px solid var(--cab-line);
    border-radius: 22px;
    background: var(--cab-surface-muted);
}

body.cabinet-page .cab-menu {
    gap: 12px;
    margin-top: 8px;
}

body.cabinet-page .cab-menu-item {
    position: relative;
    display: block;
    padding: 18px 52px 18px 20px;
    border: 1px solid var(--cab-line);
    border-radius: 20px;
    background: var(--cab-surface);
    color: var(--cab-text);
    font-size: 1.04rem;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

body.cabinet-page .cab-menu-item::after {
    content: '\203A';
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    color: #9aa0a6;
    font-size: 1.5rem;
    line-height: 1;
}

body.cabinet-page .cab-menu-item:hover {
    background: var(--cab-surface);
    border-color: var(--cab-line-strong);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

body.cabinet-page .cab-menu-item--admin {
    color: var(--cab-danger);
}

body.cabinet-page .cab-menu-item--logout {
    color: #5f6368;
}

body.cabinet-page .cab-field,
body.cabinet-page .cab-email-flow__field {
    margin-bottom: 16px;
}

body.cabinet-page .cab-label,
body.cabinet-page .ui-form__field-label,
body.cabinet-page .checkout-form__field-label,
body.cabinet-page .cab-email-flow__label {
    display: block;
    margin: 0 0 8px;
    color: var(--cab-muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-transform: uppercase;
    text-align: left;
}

body.cabinet-page .cab-input,
body.cabinet-page .cab-textarea,
body.cabinet-page .cab-email-flow__input,
body.cabinet-page .ui-input,
body.cabinet-page .checkout-input {
    width: 100%;
    min-height: 54px;
    padding: 0 16px;
    border: 1px solid #d8dbe3;
    border-radius: 16px;
    background: var(--cab-bg);
    box-sizing: border-box;
    color: var(--cab-text);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.3;
    text-align: left;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

body.cabinet-page .cab-input::placeholder,
body.cabinet-page .cab-email-flow__input::placeholder,
body.cabinet-page .ui-input::placeholder,
body.cabinet-page .checkout-input::placeholder {
    color: #9aa0a6;
}

body.cabinet-page .cab-input:focus,
body.cabinet-page .cab-textarea:focus,
body.cabinet-page .cab-email-flow__input:focus,
body.cabinet-page .ui-input:focus,
body.cabinet-page .checkout-input:focus {
    border-color: var(--cab-blue);
    box-shadow: 0 0 0 4px var(--cab-blue-soft);
    background: #fff;
}

body.cabinet-page .cab-textarea,
body.cabinet-page .ui-input--textarea,
body.cabinet-page .checkout-input--textarea {
    min-height: 112px;
    padding-top: 14px;
    padding-bottom: 14px;
    resize: vertical;
}

body.cabinet-page .cab-input--code,
body.cabinet-page .cab-email-flow__input--code {
    max-width: 160px;
    margin-left: 0;
    text-align: center;
    letter-spacing: 0.28em;
    font-size: 1.2rem;
}

body.cabinet-page .cab-phone-row,
body.cabinet-page .ui-phone-wrap,
body.cabinet-page .checkout-phone-wrap {
    border: 1px solid #d8dbe3;
    border-radius: 16px;
    background: var(--cab-bg);
    overflow: hidden;
}

body.cabinet-page .cab-phone-row {
    padding: 0 14px;
}

body.cabinet-page .cab-phone-prefix {
    padding-right: 10px;
    color: var(--cab-muted);
    font-size: 0.95rem;
}

body.cabinet-page .cab-phone-row .cab-input {
    border: none;
    box-shadow: none;
    background: transparent;
    padding-left: 0;
}

body.cabinet-page .ui-phone-wrap,
body.cabinet-page .checkout-phone-wrap {
    height: 54px;
}

body.cabinet-page .ui-phone-wrap:focus-within,
body.cabinet-page .checkout-phone-wrap:focus-within {
    border-color: var(--cab-blue);
    box-shadow: 0 0 0 4px var(--cab-blue-soft);
    background: #fff;
}

body.cabinet-page .ui-phone-wrap__code,
body.cabinet-page .checkout-phone-wrap__code {
    min-width: 124px;
    padding: 0 18px 0 14px;
    border-right: 1px solid #d8dbe3;
    background: transparent;
    color: var(--cab-text);
    font-size: 0.95rem;
}

body.cabinet-page .ui-phone-wrap__code-caret,
body.cabinet-page .checkout-phone-wrap__code-caret {
    border-right-color: #7d8593;
    border-bottom-color: #7d8593;
}

body.cabinet-page .ui-phone-wrap .ui-input--phone,
body.cabinet-page .checkout-phone-wrap .checkout-input--phone {
    background: transparent;
}

body.cabinet-page .cab-btn,
body.cabinet-page .cab-email-flow__btn,
body.cabinet-page .ui-submit-btn,
body.cabinet-page .checkout-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 56px;
    margin: 22px 0 0;
    padding: 0 22px;
    border: none;
    border-radius: 18px;
    background: #111111;
    box-shadow: 0 16px 34px rgba(17, 17, 17, 0.14);
    color: #fff;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

body.cabinet-page .cab-btn:hover,
body.cabinet-page .cab-email-flow__btn:hover,
body.cabinet-page .ui-submit-btn:hover,
body.cabinet-page .checkout-submit-btn:hover {
    background: #1c1c1e;
    transform: translateY(-1px);
    box-shadow: 0 20px 38px rgba(17, 17, 17, 0.18);
}

body.cabinet-page .cab-btn:disabled,
body.cabinet-page .cab-email-flow__btn:disabled {
    background: #a3a3a3;
    box-shadow: none;
    transform: none;
}

body.cabinet-page .cab-btn--secondary {
    background: var(--cab-surface);
    color: var(--cab-text);
    border: 1px solid var(--cab-line-strong);
    box-shadow: none;
}

body.cabinet-page .cab-btn--secondary:hover {
    background: var(--cab-surface-muted);
}

body.cabinet-page .cab-btn--danger {
    background: #fff5f5;
    color: var(--cab-danger);
    border: 1px solid rgba(217, 48, 37, 0.18);
    box-shadow: none;
}

body.cabinet-page .cab-btn--danger:hover {
    background: #ffe9e7;
}

body.cabinet-page .cab-link,
body.cabinet-page .cab-link-btn {
    color: var(--cab-blue);
}

body.cabinet-page .cab-link {
    font-size: 0.98rem;
}

body.cabinet-page .cab-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    margin: 4px 8px 0 0;
    padding: 0 14px;
    border: 1px solid rgba(0, 113, 227, 0.14);
    border-radius: 999px;
    background: rgba(0, 113, 227, 0.08);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
}

body.cabinet-page .cab-link-btn:hover {
    text-decoration: none;
    background: rgba(0, 113, 227, 0.12);
}

body.cabinet-page .cab-alt-link,
body.cabinet-page .cab-note,
body.cabinet-page .cab-empty,
body.cabinet-page .cab-track-note,
body.cabinet-page .cab-track-label,
body.cabinet-page .cab-order-date,
body.cabinet-page .cab-sub-label {
    color: var(--cab-muted);
}

body.cabinet-page .cab-error,
body.cabinet-page .cab-track-error,
body.cabinet-page .cab-email-flow__msg {
    color: var(--cab-danger);
}

body.cabinet-page .cab-success,
body.cabinet-page .cab-email-flow__msg--ok,
body.cabinet-page .cab-email-badge {
    color: var(--cab-success);
}

body.cabinet-page .cab-email-display {
    min-height: 54px;
    padding: 15px 16px;
    border: 1px solid #d8dbe3;
    border-bottom: none;
    border-radius: 16px 16px 0 0;
    background: var(--cab-bg);
    text-align: left;
}

body.cabinet-page .cab-email-badge {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 600;
}

body.cabinet-page .cab-email-badge--pending {
    color: #b7791f;
}

body.cabinet-page .cab-email-action-btn {
    border-radius: 0;
    border-color: #d8dbe3;
}

body.cabinet-page .cab-email-action-btn:first-child {
    border-radius: 0 0 0 16px;
    border-left: 1px solid #d8dbe3;
}

body.cabinet-page .cab-email-action-btn:last-child {
    border-radius: 0 0 16px 0;
}

body.cabinet-page .cab-email-action-btn--secondary {
    background: var(--cab-bg);
}

body.cabinet-page .cab-email-flow {
    margin-top: 18px;
    padding: 20px;
    border: 1px solid var(--cab-line);
    border-radius: 22px;
    background: var(--cab-surface-muted);
    box-shadow: none;
}

body.cabinet-page .cab-details {
    margin-top: 24px;
    overflow: hidden;
}

body.cabinet-page .cab-details-summary {
    padding: 18px 20px;
    color: var(--cab-text);
    font-size: 1rem;
    font-weight: 600;
    background: var(--cab-surface-muted);
}

body.cabinet-page .cab-details-body {
    padding: 0 20px 20px;
}

body.cabinet-page .cab-orders {
    margin-top: 18px;
}

body.cabinet-page .cab-order {
    margin-bottom: 16px;
    overflow: hidden;
}

body.cabinet-page .cab-order-header {
    padding: 18px 20px;
    background: var(--cab-surface-muted);
    border-bottom: 1px solid var(--cab-line);
}

body.cabinet-page .cab-order-num,
body.cabinet-page .cab-order-cost,
body.cabinet-page .cab-track-value {
    color: var(--cab-text);
    font-weight: 700;
}

body.cabinet-page .cab-order-items,
body.cabinet-page .cab-order-actions {
    padding: 16px 20px;
}

body.cabinet-page .cab-order-item {
    padding: 9px 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

body.cabinet-page .cab-order-item:last-child {
    border-bottom: none;
}

body.cabinet-page .cab-track-result-wrap {
    margin-top: 24px;
}

body.cabinet-page .cab-track-card {
    padding: 20px 22px;
    background: var(--cab-surface);
}

body.cabinet-page .cab-track-row {
    padding: 9px 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

body.cabinet-page .cab-track-carrier {
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--cab-line);
    color: var(--cab-text);
    font-size: 1.02rem;
    font-weight: 700;
}

body.cabinet-page .cab-track-badge {
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
    color: #4a4a4a;
    font-size: 0.78rem;
    font-family: inherit;
}

body.cabinet-page .cab-track-timeline {
    padding-left: 18px;
    border-left: 2px solid rgba(15, 23, 42, 0.1);
}

body.cabinet-page .cab-track-event::before {
    border-color: var(--cab-surface);
}

body.cabinet-page .ui-form-header,
body.cabinet-page .checkout-header {
    padding: 0 0 20px;
    border-bottom: none;
}

body.cabinet-page .ui-form,
body.cabinet-page .checkout-form {
    padding-top: 0;
}

body.cabinet-page .ui-form__row,
body.cabinet-page .checkout-form__row {
    gap: 14px;
    margin-bottom: 18px;
}

body.cabinet-page .ui-form__group,
body.cabinet-page .checkout-form__group {
    min-width: 0;
}

body.cabinet-page .ui-form__submit,
body.cabinet-page .checkout-form__submit {
    margin-top: 30px;
    padding-bottom: 0;
}

@media (max-width: 640px) {
    body.cabinet-page .cab-wrap {
        padding: 68px 14px 42px;
    }

    body.cabinet-page .cab-form-box,
    body.cabinet-page #cab-edit-form {
        padding: 24px 18px;
        border-radius: 24px;
    }

    body.cabinet-page .cab-title,
    body.cabinet-page .ui-form-header__title,
    body.cabinet-page .checkout-header__title {
        font-size: 2rem;
    }

    body.cabinet-page .cab-menu-item {
        padding: 16px 46px 16px 16px;
        border-radius: 18px;
    }

    body.cabinet-page .cab-order-header,
    body.cabinet-page .cab-order-items,
    body.cabinet-page .cab-order-actions,
    body.cabinet-page .cab-track-card,
    body.cabinet-page .cab-email-flow,
    body.cabinet-page .cab-details-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    body.cabinet-page .cab-field-row,
    body.cabinet-page .ui-form__row,
    body.cabinet-page .checkout-form__row {
        flex-direction: column;
        gap: 12px;
    }

    body.cabinet-page .cab-order-item {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    body.cabinet-page .cab-order-item-price {
        min-width: 0;
        text-align: left;
    }
}

/* ─── Merge modal ─── */
.merge-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.merge-modal {
    background: #fff;
    max-width: 400px;
    width: 100%;
    padding: 32px 28px 28px;
    position: relative;
}
.merge-modal__close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    line-height: 1;
}
.merge-modal__close:hover { color: #222; }
.merge-modal__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
}
.merge-modal__text {
    font-size: 0.9rem;
    color: #444;
    margin: 0 0 12px;
    line-height: 1.4;
}
.merge-modal__input {
    display: block;
    width: 100%;
    padding: 10px 12px;
    font-size: 1.1rem;
    letter-spacing: 0.3em;
    text-align: center;
    border: 1px solid #ccc;
    margin-bottom: 12px;
    box-sizing: border-box;
}
.merge-modal__input:focus { outline: none; border-color: #222; }
.merge-modal__error {
    font-size: 0.82rem;
    color: #c00;
    min-height: 1.2em;
    margin-bottom: 8px;
}
.merge-modal__btn {
    display: block;
    width: 100%;
    padding: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #222;
    color: #fff;
    border: none;
    cursor: pointer;
}
.merge-modal__btn:hover { background: #444; }
.merge-modal__btn:disabled { background: #999; cursor: default; }

/* --- Notify --- */

body.notify-page .notify-card {
    max-width: 460px;
}

body.notify-page .notify-title {
    margin-bottom: 12px;
}

body.notify-page .notify-subtitle {
    margin-bottom: 24px;
}

body.notify-page .notify-product {
    margin-bottom: 26px;
    padding: 20px;
    border: 1px solid var(--cab-line);
    border-radius: 22px;
    background: var(--cab-surface-muted);
}

body.notify-page .notify-product__media {
    width: 196px;
    height: 196px;
    margin: 0 auto 16px;
    border: 1px solid var(--cab-line);
    border-radius: 22px;
    overflow: hidden;
    background: #fff;
}

body.notify-page .notify-product__image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    padding: 6px;
    box-sizing: border-box;
}

body.notify-page .notify-subtitle--product {
    margin-bottom: 0;
}

body.notify-page .notify-step {
    margin-top: 0;
}

body.notify-page .notify-phone-row {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 12px;
}

body.notify-page .notify-phone-code-wrap {
    position: relative;
}

body.notify-page .notify-phone-code-prefix {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--cab-muted);
    font-size: 1rem;
    pointer-events: none;
}

body.notify-page .notify-code-input {
    padding-left: 30px;
}

body.notify-page .notify-label-note {
    color: var(--cab-muted);
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}

body.notify-page .notify-status {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    border: 1px solid rgba(29, 154, 108, 0.18);
    border-radius: 22px;
    background: #f4fbf8;
    text-align: left;
}

body.notify-page .notify-status__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 999px;
    background: rgba(29, 154, 108, 0.14);
    color: var(--cab-success);
    font-size: 1.3rem;
    font-weight: 700;
}

body.notify-page .notify-status__text {
    color: var(--cab-text);
    font-size: 0.98rem;
    line-height: 1.5;
}

body.notify-page .notify-actions {
    margin: 18px 0 0;
    text-align: center;
}

body.notify-page .notify-btn-link {
    margin-top: 20px;
}

body.notify-page .notify-msg {
    min-height: 20px;
    margin-top: 12px;
    color: var(--cab-muted);
    font-size: 0.92rem;
    line-height: 1.4;
}

body.notify-page .notify-msg--error {
    color: var(--cab-danger);
}

@media (max-width: 640px) {
    body.notify-page .notify-card {
        max-width: none;
    }

    body.notify-page .notify-product,
    body.notify-page .notify-status {
        padding: 16px;
        border-radius: 20px;
    }

    body.notify-page .notify-product__media {
        width: 168px;
        height: 168px;
        border-radius: 18px;
    }

    body.notify-page .notify-product__image {
        padding: 5px;
    }

    body.notify-page .notify-phone-row {
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 10px;
    }
}

@media (max-width: 390px) {
    body.notify-page .notify-phone-row {
        grid-template-columns: 1fr;
    }
}
