/**
 * Личный кабинет + Вход — V4 (Redesign)
 * /new/assets/css/account.css
 */

/* === Общие === */
.page,
.login-page {
    font-family: var(--fb);
}

/* === PAGE LAYOUT === */
.page { max-width: 1200px; margin: 0 auto; padding: 20px 16px 32px; display: flex; gap: 20px }
.sidebar { width: 240px; flex-shrink: 0; position: sticky; top: 72px; align-self: flex-start; max-height: calc(100vh - 80px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--n2) transparent }
.sidebar::-webkit-scrollbar { width: 4px }
.sidebar::-webkit-scrollbar-thumb { background: var(--n2); border-radius: 4px }
.sidebar::-webkit-scrollbar-track { background: transparent }
.main { flex: 1; min-width: 0 }

/* === SIDEBAR === */
.side-card { background: var(--w); border-radius: var(--r4); box-shadow: var(--s1); overflow: hidden }
.prof-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px 10px }
.prof-ava { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--c1l), var(--g1)); display: grid; place-items: center; font-size: 14px; font-weight: 800; color: var(--c4); flex-shrink: 0; border: 2px solid var(--w); box-shadow: 0 2px 6px rgba(0,0,0,.08) }
.prof-name { font-size: 13px; font-weight: 700; color: var(--c2); line-height: 1.2 }
.prof-phone { font-size: 11px; color: var(--n5); margin-top: 1px }
.prof-edit { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 600; color: var(--c5); margin-top: 2px; cursor: pointer; transition: color .2s }
.prof-edit:hover { color: var(--g5) }
.prof-edit svg { width: 10px; height: 10px }
.prof-bonus { display: flex; align-items: center; gap: 8px; margin: 0 10px 10px; padding: 8px 10px; background: linear-gradient(135deg, var(--g0), var(--c1ll)); border-radius: var(--r2); border: 1px solid rgba(0,180,98,.12) }
.prof-bonus-ico { width: 24px; height: 24px; background: var(--g5); border-radius: 5px; display: grid; place-items: center; color: var(--w); flex-shrink: 0 }
.prof-bonus-ico svg { width: 14px; height: 14px }
.prof-bonus-val { font-size: 14px; font-weight: 800; color: var(--g6) }
.prof-bonus-lbl { font-size: 9px; color: var(--n5); font-weight: 600 }
.side-sep { height: 1px; background: var(--n1); margin: 0 10px }
.side-nav { padding: 4px 6px }
.side-nav-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--r2); font-size: 12px; font-weight: 600; color: var(--n7); transition: all .15s; cursor: pointer; text-decoration: none }
.side-nav-item:hover { background: var(--n0); color: var(--c2) }
.side-nav-item.active { background: var(--c1); color: var(--w) }
.side-nav-item.active svg { stroke: var(--w) }
.side-nav-item svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0 }
.side-nav-item .nav-badge { margin-left: auto; min-width: 16px; height: 16px; padding: 0 4px; background: var(--g5); color: var(--w); border-radius: var(--rf); font-size: 9px; font-weight: 700; display: grid; place-items: center }
.side-nav-item.active .nav-badge { background: var(--g4); color: var(--c1) }
.side-logout { border-top: 1px solid var(--n1); margin: 2px 10px 0; padding: 2px 0 4px }
.side-logout .side-nav-item { color: var(--err); padding: 6px 10px; font-size: 11px }
.side-logout .side-nav-item svg { stroke: var(--err); width: 14px; height: 14px }

/* === NOTIFICATION HINT (sidebar) === */
.notif-hint { display: flex; align-items: center; gap: 6px; padding: 8px 10px; margin: 0 10px 8px; border-radius: var(--r2); background: linear-gradient(135deg, #EDE7F6, #E8EAF6); border: 1px solid rgba(103,58,183,.1); cursor: pointer; transition: all .2s }
.notif-hint:hover { box-shadow: 0 2px 8px rgba(103,58,183,.12) }
.notif-hint svg { width: 14px; height: 14px; stroke: #5E35B1; fill: none; stroke-width: 2; flex-shrink: 0 }
.notif-hint-text { font-size: 10px; font-weight: 600; color: #4527A0; line-height: 1.3 }
.notif-hint-text small { display: block; font-weight: 500; color: #7E57C2; margin-top: 1px; font-size: 9px }

/* === PAGE TITLES === */
.page-title { font-family: var(--fd); font-size: 20px; font-weight: 700; color: var(--c1); margin-bottom: 2px }
.page-subtitle { font-size: 12px; color: var(--n5); margin-bottom: 16px }

/* === MOBILE TABS === */
.mob-tabs { display: none; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 0 16px; margin-bottom: 20px; gap: 8px }
.mob-tabs::-webkit-scrollbar { display: none }
.mob-tab { display: flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: var(--r3); font-size: 13px; font-weight: 600; color: var(--n6); background: var(--w); white-space: nowrap; flex-shrink: 0; border: 1px solid var(--n2); transition: all .2s; text-decoration: none }
.mob-tab.active { background: var(--c1); color: var(--w); border-color: var(--c1) }
.mob-tab svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8 }

/* === MOBILE PROFILE (hidden by default, shown on mobile) === */
.mob-prof { display: none }

/* === Страница входа === */
.login-page {
    max-width: 400px;
    margin: 40px auto;
    padding: 0 20px;
}

.login-box {
    background: #fff;
    border-radius: var(--r4);
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    font-family: var(--fd);
    color: var(--c1);
    margin-bottom: 8px;
    text-align: center;
}

.login-subtitle {
    color: var(--n5);
    text-align: center;
    margin-bottom: 24px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--c1);
}

.form-group input {
    padding: 14px 16px;
    border: 1px solid var(--n2);
    border-radius: var(--r2);
    font-size: 16px;
    font-family: var(--fb);
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--g5);
}

.btn-submit {
    background: var(--g5);
    color: #fff;
    border: none;
    padding: 14px 24px;
    border-radius: var(--r2);
    font-size: 16px;
    font-weight: 500;
    font-family: var(--fb);
    cursor: pointer;
    transition: background 0.2s;
}

.btn-submit:hover {
    background: var(--g6);
}

.btn-submit:disabled {
    background: var(--n3);
    cursor: not-allowed;
}

.code-step {
    display: none;
}

.code-step.active {
    display: block;
}

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

.message {
    padding: 12px 16px;
    border-radius: var(--r2);
    font-size: 14px;
    margin-bottom: 16px;
}

.message.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.message.error {
    background: #ffebee;
    color: #c62828;
}

.message.info {
    background: var(--g1);
    color: var(--g6);
}

.change-phone {
    text-align: center;
    margin-top: 12px;
}

.change-phone a {
    color: var(--g5);
    text-decoration: none;
    font-size: 14px;
}

.timer {
    text-align: center;
    color: var(--n5);
    font-size: 14px;
    margin-top: 12px;
}

.timer a {
    color: var(--g5);
    text-decoration: none;
    cursor: pointer;
}

.timer a.disabled {
    color: var(--n4);
    cursor: default;
}

/* Выбор метода */
.method-step {
    display: none;
}
.method-step.active {
    display: block;
}
.method-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--c1);
    text-align: center;
    margin-bottom: 16px;
}
.method-icons {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.method-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 96px;
    padding: 16px 8px;
    border: 2px solid var(--n2);
    border-radius: var(--r3);
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.method-btn:hover:not(:disabled) {
    border-color: var(--g5);
    background: var(--g0);
}
.method-btn:active:not(:disabled) {
    transform: scale(0.96);
}
.method-btn.preferred {
    border-color: var(--g5);
    background: var(--g1);
}
.method-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    position: relative;
}
.method-btn svg {
    width: 36px;
    height: 36px;
}
.method-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--c1);
}
.method-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ff9800;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 8px;
    white-space: nowrap;
}
.other-method-link {
    text-align: center;
    margin-top: 12px;
}
.other-method-link a {
    color: var(--g5);
    text-decoration: none;
    font-size: 13px;
    cursor: pointer;
}

/* === Личный кабинет === */
.orders-section {
    margin-top: 24px;
}

/* Уведомления */
.notification-section {
    background: #fff;
    border-radius: var(--r3);
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 24px;
}
.notification-section .section-title {
    font-size: 18px;
    margin-bottom: 16px;
}
.notif-channel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--n1);
}
.notif-channel:last-child {
    border-bottom: none;
}
.notif-channel-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.notif-channel-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--r2);
    display: flex;
    align-items: center;
    justify-content: center;
}
.notif-channel-name {
    font-size: 15px;
    font-weight: 500;
}
.notif-channel-desc {
    font-size: 12px;
    color: var(--n4);
}
.notif-toggle {
    position: relative;
    width: 48px;
    height: 28px;
}
.notif-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.notif-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--n3);
    border-radius: 28px;
    transition: background 0.3s;
}
.notif-toggle-slider:before {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
}
.notif-toggle input:checked + .notif-toggle-slider {
    background: var(--g5);
}
.notif-toggle input:checked + .notif-toggle-slider:before {
    transform: translateX(20px);
}
.notif-warning {
    background: #fff3e0;
    color: #e65100;
    padding: 10px 14px;
    border-radius: var(--r2);
    font-size: 13px;
    margin-top: 12px;
    display: none;
}
.notif-warning.visible {
    display: block;
}
.notif-recommended {
    font-size: 11px;
    color: var(--g5);
    font-weight: 500;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    font-family: var(--fd);
    color: var(--c1);
    margin-bottom: 16px;
}

/* Фильтры по статусу */
.order-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
}
.order-filters::-webkit-scrollbar {
    display: none;
}
.order-filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--n2);
    border-radius: 20px;
    background: #fff;
    font-size: 14px;
    font-family: var(--fb);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    color: var(--c1);
}
.order-filter-btn:hover {
    border-color: var(--g5);
    color: var(--g5);
}
.order-filter-btn.active {
    background: var(--g5);
    color: #fff;
    border-color: var(--g5);
}
.order-filter-btn .filter-count {
    display: inline-block;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
    font-size: 11px;
    margin-left: 6px;
    background: rgba(0,0,0,0.08);
    color: inherit;
}
.order-filter-btn.active .filter-count {
    background: rgba(255,255,255,0.3);
}

/* Кнопка "Показать ещё" */
.show-more-wrap {
    text-align: center;
    margin: 20px 0;
}
.btn-show-more {
    padding: 12px 32px;
    border: 1px solid var(--n2);
    border-radius: var(--r2);
    background: #fff;
    font-size: 15px;
    font-family: var(--fb);
    cursor: pointer;
    color: var(--g5);
    transition: all 0.2s;
}
.btn-show-more:hover {
    background: var(--g0);
    border-color: var(--g5);
}

.no-filtered-orders {
    text-align: center;
    padding: 40px 20px;
    color: var(--n4);
    font-size: 15px;
    display: none;
}

/* Карточка заказа */
.order-card {
    background: #fff;
    border-radius: var(--r3);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--n1);
}

.order-number {
    font-size: 18px;
    font-weight: 600;
    color: var(--c1);
}

.order-date {
    color: var(--n5);
    font-size: 14px;
    margin-top: 4px;
}

.order-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

/* Статусы — семантические цвета, не меняем */
.status-new {
    background: #e3f2fd;
    color: #1565c0;
}
.status-processing {
    background: #fff3e0;
    color: #ef6c00;
}
.status-ready {
    background: #e8f5e9;
    color: #2e7d32;
}
.status-completed {
    background: #f5f5f5;
    color: var(--n5);
}
.status-cancelled {
    background: #ffebee;
    color: #c62828;
}
.status-confirmed {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Кнопки действий */
.order-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--n1);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-cancel-order {
    background: none;
    border: 1px solid var(--err);
    color: var(--err);
    padding: 8px 20px;
    border-radius: var(--r2);
    cursor: pointer;
    font-size: 14px;
    font-family: var(--fb);
    transition: all 0.2s;
}
.btn-cancel-order:hover {
    background: var(--err);
    color: #fff;
}
.btn-cancel-order:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-reorder {
    background: none;
    border: 1px solid var(--g5);
    color: var(--g5);
    padding: 8px 20px;
    border-radius: var(--r2);
    cursor: pointer;
    font-size: 14px;
    font-family: var(--fb);
    transition: all 0.2s;
}
.btn-reorder:hover {
    background: var(--g5);
    color: #fff;
}
.btn-reorder:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-edit-order {
    padding: 6px 16px;
    background: #fff;
    border: 1px solid var(--g5);
    color: var(--g5);
    border-radius: var(--r2);
    cursor: pointer;
    font-size: 13px;
    font-family: var(--fb);
    transition: all 0.2s;
}
.btn-edit-order:hover {
    background: var(--g5);
    color: #fff;
}

.reservation-label {
    font-size: 12px;
    color: var(--n5);
    margin-left: 4px;
}

.order-store {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--n0);
    border-radius: var(--r2);
}

.order-store-icon {
    font-size: 20px;
}

.order-store-address {
    font-size: 14px;
}

.order-items {
    margin-bottom: 16px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--n1);
}

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

.order-item-name {
    flex: 1;
}

.order-item-qty {
    color: var(--n5);
    margin: 0 16px;
}

.order-item-sum {
    font-weight: 500;
    white-space: nowrap;
}

.order-total {
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--n1);
    font-weight: 600;
    font-size: 16px;
    color: var(--c1);
}

.order-reservations {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--n1);
}

.reservation-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--n5);
}

.reservation-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    padding: 8px 12px;
    background: var(--n0);
    border-radius: var(--r1);
    margin-bottom: 6px;
    font-size: 13px;
}

.reservation-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.reservation-status.confirmed {
    background: #4caf50;
}

.reservation-status.pending {
    background: #ff9800;
}

.reservation-status.cancelled {
    background: #f44336;
}

.reservation-ready {
    color: var(--g6);
    margin-left: auto;
    white-space: nowrap;
}

/* Пустое состояние */
.no-orders {
    text-align: center;
    padding: 60px 20px;
    color: var(--n5);
}

.no-orders-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.no-orders h3 {
    font-size: 20px;
    font-weight: 700;
    font-family: var(--fd);
    margin-bottom: 8px;
    color: var(--c1);
}

.no-orders a {
    display: inline-block;
    margin-top: 16px;
    padding: 12px 24px;
    background: var(--g5);
    color: #fff;
    text-decoration: none;
    border-radius: var(--r2);
    transition: background 0.2s;
}
.no-orders a:hover {
    background: var(--g6);
}

/* === PROFILE PAGE === */
.profile-card {
    background: var(--w);
    border-radius: var(--r3);
    box-shadow: var(--s1);
    padding: 16px;
    margin-bottom: 12px;
}
.profile-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--c2);
    margin-bottom: 12px;
}

.profile-avatar-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--n1);
}
.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--c1l), var(--g1));
    display: grid;
    place-items: center;
    font-size: 16px;
    font-weight: 800;
    color: var(--c4);
    flex-shrink: 0;
    border: 2px solid var(--w);
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.profile-avatar-link {
    font-size: 11px;
    font-weight: 600;
    color: var(--c5);
    cursor: pointer;
    transition: color .2s;
}
.profile-avatar-link:hover {
    color: var(--g5);
}

.form-row {
    margin-bottom: 12px;
}
.form-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--n5);
    margin-bottom: 4px;
}
.form-input {
    width: 100%;
    height: 36px;
    font-size: 13px;
    font-family: var(--fb);
    border: 1px solid var(--n2);
    border-radius: var(--r2);
    padding: 0 12px;
    color: var(--n9);
    background: var(--w);
    transition: border-color .2s;
    outline: none;
    box-sizing: border-box;
}
.form-input:focus {
    border-color: var(--c4);
    box-shadow: 0 0 0 3px rgba(42,85,128,.08);
}
.form-input[readonly] {
    background: var(--n0, #f9fafb);
    color: var(--n6);
    cursor: default;
}
.form-input-wrap {
    position: relative;
}
.form-input-wrap .form-input {
    padding-right: 90px;
}
.form-badge {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--rf);
}
.form-badge.verified {
    background: var(--g1);
    color: var(--g6);
}
.form-badge.unverified {
    color: var(--warn);
    cursor: pointer;
}
.form-badge.unverified:hover {
    text-decoration: underline;
}

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

.form-radio-group {
    display: flex;
    gap: 16px;
    align-items: center;
    height: 36px;
}
.form-radio {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--n7);
    cursor: pointer;
}
.form-radio input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--g5);
    cursor: pointer;
}

.btn-save {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: var(--rf);
    font-size: 13px;
    font-weight: 600;
    background: var(--g5);
    color: var(--w);
    border: none;
    cursor: pointer;
    box-shadow: var(--sg);
    transition: all .2s;
    margin-top: 4px;
}
.btn-save:hover {
    background: var(--g6);
    transform: translateY(-1px);
}
.btn-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Security & notification settings */
.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--n1);
}
.settings-row:last-child {
    border-bottom: none;
}
.settings-row-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--n8);
}
.settings-row-action {
    display: flex;
    align-items: center;
    gap: 6px;
}
.settings-arrow {
    width: 16px;
    height: 16px;
    stroke: var(--n4);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    cursor: pointer;
}

/* Toggle switch (profile page) */
.toggle {
    position: relative;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}
.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--n2);
    border-radius: var(--rf);
    transition: .3s;
}
.toggle-slider::before {
    content: '';
    position: absolute;
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background: var(--w);
    border-radius: 50%;
    transition: .3s;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.toggle input:checked + .toggle-slider {
    background: var(--g5);
}
.toggle input:checked + .toggle-slider::before {
    transform: translateX(16px);
}

/* Profile save toast */
.profile-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--g5);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.profile-toast.visible {
    opacity: 1;
}

/* === RECIPES PAGE === */
.rx-info-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: linear-gradient(135deg, var(--c1l), var(--c1ll)); border-radius: var(--r3); border: 1px solid rgba(42,85,128,.12); margin-bottom: 16px }
.rx-info-banner svg { width: 28px; height: 28px; stroke: var(--c4); fill: none; stroke-width: 1.6; flex-shrink: 0 }
.rx-info-text { flex: 1; font-size: 12px; color: var(--c2); line-height: 1.4; font-weight: 500 }
.rx-info-btn { display: inline-flex; align-items: center; gap: 5px; padding: 7px 16px; border-radius: var(--rf); font-size: 12px; font-weight: 600; background: var(--c4); color: var(--w); cursor: pointer; transition: all .2s; white-space: nowrap; flex-shrink: 0; border: none }
.rx-info-btn:hover { background: var(--c2); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(19,46,74,.25) }
.rx-info-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2 }
.rx-check-time { display: flex; align-items: center; gap: 6px; padding: 8px 14px; background: var(--g0); border-radius: var(--r2); border: 1px solid rgba(0,180,98,.12); margin-bottom: 16px; font-size: 11px; color: var(--g6); font-weight: 600 }
.rx-check-time svg { width: 14px; height: 14px; stroke: var(--g5); fill: none; stroke-width: 2; flex-shrink: 0 }
.rx-filters { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap }
.rx-filter { display: inline-flex; align-items: center; gap: 5px; padding: 6px 14px; border-radius: var(--rf); font-size: 12px; font-weight: 600; color: var(--n6); background: var(--w); border: 1px solid var(--n2); cursor: pointer; transition: all .2s; white-space: nowrap }
.rx-filter:hover { border-color: var(--c4); color: var(--c2) }
.rx-filter.active { background: var(--c1); color: var(--w); border-color: var(--c1) }
.rx-filter-cnt { min-width: 16px; height: 16px; padding: 0 5px; border-radius: var(--rf); font-size: 9px; font-weight: 700; display: inline-grid; place-items: center; background: var(--n1); color: var(--n5) }
.rx-filter.active .rx-filter-cnt { background: rgba(255,255,255,.2); color: var(--w) }
.rx-upload { border: 2px dashed var(--n3); border-radius: var(--r3); padding: 28px 16px; text-align: center; margin-bottom: 20px; cursor: pointer; transition: all .2s; background: var(--w) }
.rx-upload:hover { border-color: var(--c4); background: var(--c1ll) }
.rx-upload.drag-over { border-color: var(--g5); background: var(--g0); border-style: solid }
.rx-upload-ico { width: 40px; height: 40px; margin: 0 auto 10px; background: var(--n1); border-radius: 50%; display: grid; place-items: center }
.rx-upload-ico svg { width: 22px; height: 22px; stroke: var(--n4); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round }
.rx-upload-title { font-size: 13px; font-weight: 600; color: var(--n7); margin-bottom: 4px }
.rx-upload-hint { font-size: 11px; color: var(--n4) }
.rx-upload-camera { display: none }
.rx-empty { text-align: center; padding: 40px 20px; background: var(--w); border-radius: var(--r3); box-shadow: var(--s1) }
.rx-empty-ico { width: 72px; height: 72px; margin: 0 auto 16px; background: var(--n1); border-radius: 50%; display: grid; place-items: center }
.rx-empty-ico svg { width: 36px; height: 36px; stroke: var(--n3); fill: none; stroke-width: 1.5 }
.rx-empty-title { font-size: 15px; font-weight: 700; color: var(--n7); margin-bottom: 6px }
.rx-empty-desc { font-size: 12px; color: var(--n5); margin-bottom: 16px; line-height: 1.5 }
.rx-empty-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap }
.rx-empty-btn { display: inline-flex; align-items: center; gap: 5px; padding: 8px 20px; border-radius: var(--rf); font-size: 12px; font-weight: 600; cursor: pointer; transition: all .2s; border: none }
.rx-empty-btn.primary { background: var(--c4); color: var(--w) }
.rx-empty-btn.primary:hover { background: var(--c2); transform: translateY(-1px) }
.rx-empty-btn.secondary { background: var(--g0); color: var(--g6); border: 1px solid rgba(0,180,98,.2) }
.rx-empty-btn.secondary:hover { background: var(--g1) }
.rx-empty-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2 }
.rx-card { background: var(--w); border-radius: var(--r3); box-shadow: var(--s1); overflow: hidden; margin-bottom: 12px; transition: box-shadow .2s }
.rx-card:hover { box-shadow: var(--s2) }
.rx-card.status-expired { opacity: .7 }
.rx-card.status-rejected { border-left: 3px solid var(--err) }
.rx-card.status-pending { border-left: 3px solid #F59E0B }
.rx-card.status-verified { border-left: 3px solid var(--g5) }
.rx-card-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--n1) }
.rx-card-ico { width: 32px; height: 32px; border-radius: var(--r2); background: var(--c1l); display: grid; place-items: center; flex-shrink: 0 }
.rx-card-ico svg { width: 16px; height: 16px; stroke: var(--c4); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round }
.rx-card-info { flex: 1; min-width: 0 }
.rx-card-title { font-size: 13px; font-weight: 700; color: var(--c2); line-height: 1.2 }
.rx-card-meta { font-size: 11px; color: var(--n5); margin-top: 2px }
.rx-card-doctor { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--n6); margin-top: 3px }
.rx-card-doctor svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0 }
.rx-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--rf); font-size: 11px; font-weight: 700; white-space: nowrap; flex-shrink: 0 }
.rx-badge.verified { background: var(--g1); color: var(--g6) }
.rx-badge.pending { background: #FFF3E0; color: #E65100 }
.rx-badge.rejected { background: #FFEBEE; color: #C62828 }
.rx-badge.expired { background: var(--n1); color: var(--n5) }
.rx-badge .rx-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor }
.rx-card-body { padding: 10px 14px }
.rx-meds-label { font-size: 10px; font-weight: 600; color: var(--n4); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px }
.rx-med-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--n1) }
.rx-med-item:last-child { border-bottom: none }
.rx-med-item svg.rx-pill-ico { width: 14px; height: 14px; stroke: var(--g5); fill: none; stroke-width: 2; flex-shrink: 0 }
.rx-med-info { flex: 1; min-width: 0 }
.rx-med-name { font-size: 12px; font-weight: 600; color: var(--n8) }
.rx-med-avail { font-size: 10px; font-weight: 600; margin-top: 1px }
.rx-med-avail.in-stock { color: var(--g6) }
.rx-med-avail.order { color: #D97706 }
.rx-med-avail.no-stock { color: var(--err) }
.rx-med-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0 }
.rx-med-price { font-size: 12px; font-weight: 700; color: var(--c2); white-space: nowrap }
.rx-med-cart-btn { width: 28px; height: 28px; border-radius: var(--r2); background: var(--g5); color: var(--w); display: grid; place-items: center; cursor: pointer; transition: all .2s; flex-shrink: 0; border: none }
.rx-med-cart-btn:hover { background: var(--g6); transform: scale(1.05) }
.rx-med-cart-btn.disabled { background: var(--n2); color: var(--n4); pointer-events: none }
.rx-med-cart-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2 }
.rx-drugs { padding: 10px 14px }
/* rx-card from API (list layout) */
#rxList .rx-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; position: relative }
.rx-card-preview { width: 48px; height: 48px; border-radius: var(--r2); overflow: hidden; flex-shrink: 0; background: var(--g7); display: flex; align-items: center; justify-content: center }
.rx-card-thumb { width: 100%; height: 100%; object-fit: cover }
.rx-card-icon { width: 28px; height: 28px; stroke: var(--c4); fill: none; stroke-width: 1.5 }
#rxList .rx-card-info { flex: 1; min-width: 0 }
.rx-card-name { font-size: 13px; font-weight: 600; color: var(--n8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
#rxList .rx-card-meta { font-size: 11px; color: var(--n5); margin-top: 2px }
.rx-card-reason { font-size: 11px; color: var(--err); margin-top: 2px }
.rx-card-del { position: absolute; top: 8px; right: 8px; background: none; border: none; font-size: 18px; color: var(--n3); cursor: pointer; padding: 0 4px; line-height: 1; opacity: 0; transition: opacity .15s }
.rx-card:hover .rx-card-del { opacity: 1 }
.rx-badge--pending { background: #FFF3E0; color: #E65100 }
.rx-badge--verified { background: var(--g1); color: var(--g6) }
.rx-badge--rejected { background: #FFEBEE; color: #C62828 }
.rx-badge--expired { background: var(--n1); color: var(--n5) }
/* bonus-tx from API */
.bonus-tx { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--n1) }
.bonus-tx:last-child { border-bottom: none }
.bonus-tx-info { flex: 1; min-width: 0 }
.bonus-tx-label { font-size: 13px; font-weight: 600; color: var(--n8) }
.bonus-tx-date { font-size: 11px; color: var(--n5); margin-top: 2px }
.bonus-tx-amount { font-size: 16px; font-weight: 700; flex-shrink: 0; margin-left: 12px }

/* === BONUSES PAGE === */
.bonus-balance-card { background: linear-gradient(135deg, var(--c1), var(--c3)); border-radius: var(--r3); padding: 14px; margin-bottom: 10px; color: var(--w); box-shadow: var(--s2) }
.bonus-big-number { font-size: 22px; font-weight: 800; line-height: 1.1; margin-bottom: 2px }
.bonus-big-label { font-size: 11px; font-weight: 600; opacity: .8; margin-bottom: 4px }
.bonus-equiv { font-size: 12px; font-weight: 600; color: var(--g4); margin-bottom: 8px }
.bonus-progress-wrap { margin-bottom: 8px }
.bonus-progress-label { font-size: 10px; font-weight: 600; opacity: .75; margin-bottom: 4px }
.bonus-progress-bar { height: 6px; background: rgba(255,255,255,.15); border-radius: var(--rf); overflow: hidden }
.bonus-progress-fill { height: 100%; border-radius: var(--rf); background: linear-gradient(90deg, var(--g5), var(--g4)); transition: width .6s ease }
.bonus-level-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: var(--rf); background: rgba(255,255,255,.12); font-size: 10px; font-weight: 700; margin-top: 6px }
.bonus-level-badge svg { width: 14px; height: 14px; stroke: var(--warn); fill: none; stroke-width: 2 }
.bonus-cta-btn { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; background: var(--g5); color: var(--w); border-radius: var(--r2); font-size: 12px; font-weight: 700; margin-bottom: 10px; text-decoration: none; transition: background .2s; box-shadow: var(--sg) }
.bonus-cta-btn:hover { background: var(--g6) }
.bonus-levels-card { background: var(--w); border-radius: var(--r3); box-shadow: var(--s1); margin-bottom: 10px; overflow: hidden }
.bonus-levels-title { font-size: 12px; font-weight: 700; color: var(--c2); padding: 10px 12px 6px }
.bonus-levels-table { width: 100%; font-size: 10px; border-collapse: collapse }
.bonus-levels-header { background: var(--n0); color: var(--n5); font-weight: 600 }
.bonus-levels-header td { padding: 5px 12px }
.bonus-level-row td { padding: 5px 12px }
.bonus-level-row { border-bottom: 1px solid var(--n1) }
.bonus-level-row:last-child { border-bottom: none }
.bonus-info { display: flex; gap: 0; background: var(--w); border-radius: var(--r3); box-shadow: var(--s1); margin-bottom: 10px; overflow: hidden; flex-wrap: wrap }
.bonus-info-item { flex: 1; min-width: 0; padding: 8px 10px; text-align: center; border-right: 1px solid var(--n1); font-size: 10px; color: var(--n6); font-weight: 600; line-height: 1.4 }
.bonus-info-item:last-child { border-right: none }
.bonus-info-item b { display: block; font-size: 12px; color: var(--c2); font-weight: 700 }
.bonus-disclaimer { font-size: 9px; color: var(--n4); line-height: 1.5; margin-bottom: 10px; padding: 0 2px }
.bonus-history-title { font-size: 13px; font-weight: 700; color: var(--c2); margin-bottom: 8px }
.bonus-filter-tabs { display: flex; gap: 4px; margin-bottom: 12px }
.bonus-filter-tab { padding: 5px 12px; border-radius: var(--rf); font-size: 12px; font-weight: 600; color: var(--n6); background: var(--w); border: 1px solid var(--n2); cursor: pointer; transition: all .2s }
.bonus-filter-tab:hover { border-color: var(--n3); background: var(--n1) }
.bonus-filter-tab.active { background: var(--c1); color: var(--w); border-color: var(--c1) }
.bonus-tx-list { background: var(--w); border-radius: var(--r3); box-shadow: var(--s1); overflow: hidden }
.bonus-tx { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--n1) }
.bonus-tx:last-child { border-bottom: none }
.bonus-tx-icon { width: 28px; height: 28px; border-radius: var(--r1); display: grid; place-items: center; flex-shrink: 0 }
.bonus-tx-icon.credit { background: var(--g1); color: var(--g6) }
.bonus-tx-icon.debit { background: #FFEBEE; color: var(--err) }
.bonus-tx-icon svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round }
.bonus-tx-info { flex: 1; min-width: 0 }
.bonus-tx-desc { font-size: 11px; font-weight: 600; color: var(--n8); line-height: 1.3 }
.bonus-tx-date { font-size: 10px; color: var(--n5); margin-top: 1px }
.bonus-tx-amount { font-size: 12px; font-weight: 700; white-space: nowrap; flex-shrink: 0 }
.bonus-tx-amount.credit { color: var(--g6) }
.bonus-tx-amount.debit { color: var(--err) }
.bonus-tx-empty { text-align: center; padding: 40px 20px }
.bonus-tx-empty-title { font-size: 15px; font-weight: 700; color: var(--n7); margin-top: 12px; margin-bottom: 6px }
.bonus-tx-empty-desc { font-size: 12px; color: var(--n5); line-height: 1.5 }

/* === HISTORY PAGE === */
.ord-tabs { display: flex; gap: 4px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch }
.ord-tabs::-webkit-scrollbar { display: none }
.ord-tab { display: flex; align-items: center; gap: 4px; padding: 6px 14px; border-radius: var(--rf); font-size: 12px; font-weight: 600; color: var(--n6); background: var(--w); border: 1px solid var(--n2); white-space: nowrap; cursor: pointer; transition: all .2s; font-family: var(--fb) }
.ord-tab:hover { border-color: var(--n3); background: var(--n1) }
.ord-tab.active { background: var(--c1); color: var(--w); border-color: var(--c1) }
.ord-card { background: var(--w); border-radius: var(--r3); padding: 0; margin-bottom: 10px; box-shadow: var(--s1); overflow: hidden; transition: box-shadow .2s }
.ord-card:hover { box-shadow: var(--s2) }
.ord-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--n1); flex-wrap: wrap }
.ord-num { font-size: 13px; font-weight: 700; color: var(--c2) }
.ord-date { font-size: 11px; color: var(--n5) }
.ord-status { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--rf); font-size: 11px; font-weight: 700; white-space: nowrap }
.ord-status.st-done { background: var(--n1); color: var(--n5) }
.ord-status.st-cancel { background: #FEF2F2; color: var(--err) }
.ord-status.st-return { background: #FFF7ED; color: #C2410C }
.ord-status.st-process { background: #FFFBEB; color: #B45309 }
.ord-status .st-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0 }
.ord-items { padding: 6px 14px }
.ord-item { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--n1) }
.ord-item:last-child { border-bottom: none }
.ord-item-img { width: 30px; height: 30px; border-radius: var(--r1); background: var(--n0); display: grid; place-items: center; flex-shrink: 0; overflow: hidden; border: 1px solid var(--n2) }
.ord-item-img svg { width: 15px; height: 15px; stroke: var(--n3); fill: none; stroke-width: 1.5 }
.ord-item-info { flex: 1; min-width: 0 }
.ord-item-name { font-size: 12px; font-weight: 600; color: var(--n8); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden }
.ord-item-meta { font-size: 10px; color: var(--n5); margin-top: 1px }
.ord-item-price { font-size: 13px; font-weight: 700; color: var(--c2); white-space: nowrap; flex-shrink: 0 }
.ord-foot { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; border-top: 1px solid var(--n1); gap: 8px; flex-wrap: wrap }
.ord-total { font-size: 12px; color: var(--n5) }
.ord-total b { font-size: 14px; color: var(--c1); margin-left: 4px }
.ord-actions { display: flex; gap: 6px; flex-wrap: wrap }
.ord-btn { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: var(--rf); font-size: 11px; font-weight: 600; cursor: pointer; transition: all .2s; font-family: var(--fb); border: none }
.ord-btn-primary { background: var(--g5); color: var(--w); box-shadow: var(--sg) }
.ord-btn-primary:hover { background: var(--g6); transform: translateY(-1px) }
.ord-btn-secondary { background: var(--w); color: var(--c4); border: 1px solid var(--n2) }
.ord-btn-secondary:hover { border-color: var(--c4); background: var(--c1ll) }
.ord-btn svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round }
.ord-bonus { display: flex; align-items: center; gap: 4px; padding: 4px 12px 6px; font-size: 10px; font-weight: 600; color: var(--g6) }
.ord-bonus svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2 }
.history-summary { background: var(--w); border-radius: var(--r3); padding: 12px 16px; box-shadow: var(--s1); margin-top: 6px; font-size: 12px; color: var(--n5); font-weight: 600; display: flex; align-items: center; gap: 8px }
.history-summary b { color: var(--c1); font-size: 13px }

/* === ADDRESSES PAGE === */
.addr-add-btn { display: inline-flex; align-items: center; gap: 5px; padding: 7px 14px; border-radius: var(--rf); font-size: 11px; font-weight: 600; background: var(--g5); color: var(--w); cursor: pointer; transition: all .2s; box-shadow: var(--sg); margin-bottom: 10px; border: none; font-family: var(--fb) }
.addr-add-btn:hover { background: var(--g6); transform: translateY(-1px) }
.addr-add-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round }
.adr-card { background: var(--w); border-radius: var(--r3); box-shadow: var(--s1); overflow: hidden; margin-bottom: 8px; padding: 10px 12px; display: flex; align-items: flex-start; gap: 10px; transition: box-shadow .2s }
.adr-card:hover { box-shadow: var(--s2) }
.adr-card-ico { width: 28px; height: 28px; border-radius: var(--r1); background: var(--c1l); display: grid; place-items: center; flex-shrink: 0 }
.adr-card-ico svg { width: 14px; height: 14px; stroke: var(--c4); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round }
.adr-card-body { flex: 1; min-width: 0 }
.adr-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap }
.adr-card-label { font-size: 12px; font-weight: 700; color: var(--c2) }
.adr-default-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--rf); font-size: 10px; font-weight: 700; background: #EBF5FF; color: #1565C0 }
.adr-card-address { font-size: 11px; color: var(--n7); line-height: 1.3; margin-bottom: 3px }
.adr-card-type { display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px; border-radius: var(--rf); font-size: 9px; font-weight: 600; background: var(--n1); color: var(--n5); margin-bottom: 6px }
.adr-card-type svg { width: 10px; height: 10px; stroke: currentColor; fill: none; stroke-width: 2 }
.adr-card-actions { display: flex; gap: 4px; flex-wrap: wrap }
.adr-btn { display: inline-flex; align-items: center; gap: 3px; padding: 4px 10px; border-radius: var(--rf); font-size: 10px; font-weight: 600; cursor: pointer; transition: all .2s; border: none; font-family: var(--fb) }
.adr-btn-default { background: var(--w); color: var(--c4); border: 1px solid var(--n2) }
.adr-btn-default:hover { border-color: var(--c4); background: var(--c1ll) }
.adr-btn-edit { background: var(--w); color: var(--c4); border: 1px solid var(--n2) }
.adr-btn-edit:hover { border-color: var(--c4); background: var(--c1ll) }
.adr-btn-delete { background: var(--w); color: var(--err); border: 1px solid var(--n2) }
.adr-btn-delete:hover { border-color: var(--err); background: #FFF5F5 }

/* Delete confirm modal */
.del-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 9000; display: none; align-items: center; justify-content: center }
.del-overlay.show { display: flex }
.del-box { background: var(--w); border-radius: var(--r4); padding: 20px; max-width: 340px; width: 90%; text-align: center; box-shadow: var(--s4) }
.del-box h3 { font-size: 14px; font-weight: 700; color: var(--n9); margin-bottom: 6px }
.del-box p { font-size: 11px; color: var(--n5); margin-bottom: 14px; line-height: 1.4 }
.del-box-btns { display: flex; gap: 8px; justify-content: center }
.del-box-btns button { padding: 8px 20px; border-radius: var(--rf); font-size: 11px; font-weight: 700; cursor: pointer; border: none; transition: all .2s; font-family: var(--fb) }
.del-box-btns .del-yes { background: var(--err); color: var(--w) }
.del-box-btns .del-no { background: var(--n1); color: var(--n6) }

/* Add/Edit address modal */
.add-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 9000; display: none; align-items: center; justify-content: center }
.add-overlay.show { display: flex }
.add-box { background: var(--w); border-radius: var(--r4); padding: 20px; max-width: 480px; width: 92%; box-shadow: var(--s4); max-height: 90vh; overflow-y: auto }
.add-box h3 { font-size: 14px; font-weight: 700; color: var(--c2); margin-bottom: 12px; display: flex; align-items: center; gap: 6px }
.add-box h3 svg { width: 18px; height: 18px; stroke: var(--g5); fill: none; stroke-width: 2 }
.add-field { margin-bottom: 8px }
.add-field label { display: block; font-size: 10px; font-weight: 600; color: var(--n5); margin-bottom: 3px; text-transform: uppercase; letter-spacing: .03em }
.add-field input, .add-field textarea, .add-field select { width: 100%; padding: 8px 10px; border: 1.5px solid var(--n2); border-radius: var(--r2); font-size: 12px; font-family: var(--fb); color: var(--n8); transition: border-color .2s; outline: none; box-sizing: border-box }
.add-field input:focus, .add-field textarea:focus, .add-field select:focus { border-color: var(--c4) }
.add-field textarea { resize: vertical; min-height: 50px }
.add-row { display: flex; gap: 8px }
.add-row .add-field { flex: 1 }
.add-actions { display: flex; gap: 8px; margin-top: 12px }
.add-actions button { flex: 1; padding: 9px; border-radius: var(--r2); font-size: 12px; font-weight: 700; cursor: pointer; border: none; transition: all .2s; font-family: var(--fb) }
.add-actions .add-save { background: var(--g5); color: var(--w) }
.add-actions .add-cancel { background: var(--n1); color: var(--n6) }

/* === FAVORITES PAGE === */
/* Filter toggle */
.fav-filter { display: flex; gap: 4px; margin-bottom: 10px }
.fav-filter-btn { padding: 5px 12px; border-radius: var(--rf); font-size: 11px; font-weight: 600; color: var(--n6); background: var(--w); border: 1px solid var(--n2); cursor: pointer; transition: all .2s; font-family: var(--fb) }
.fav-filter-btn:hover { border-color: var(--n3); background: var(--n1) }
.fav-filter-btn.active { background: var(--c1); color: var(--w); border-color: var(--c1) }

/* Product grid */
.fav-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px }
.fav-card { background: var(--w); border-radius: var(--r4); box-shadow: var(--s1); padding: 8px; position: relative; transition: box-shadow .2s }
.fav-card:hover { box-shadow: var(--s2) }
.fav-card.out-of-stock { opacity: .55 }
.fav-img { width: 100%; aspect-ratio: 1; border-radius: var(--r3); background: var(--n0); display: grid; place-items: center; margin-bottom: 6px; overflow: hidden; position: relative }
.fav-img img { width: 100%; height: 100%; object-fit: contain }
.fav-img svg { width: 28px; height: 28px; stroke: var(--n3); fill: none; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round }
.fav-name { font-size: 11px; font-weight: 600; color: var(--n8); line-height: 1.3; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 28px }
.fav-name a { color: inherit; text-decoration: none }
.fav-name a:hover { color: var(--c4) }
.fav-prices { display: flex; align-items: baseline; gap: 4px; margin-bottom: 2px }
.fav-price { font-size: 13px; font-weight: 800; color: var(--g6) }
.fav-old-price { font-size: 10px; color: var(--n4); text-decoration: line-through; font-weight: 500 }
.fav-discount { position: absolute; top: 6px; left: 6px; background: #FF6B35; color: var(--w); font-size: 9px; font-weight: 800; padding: 2px 6px; border-radius: var(--rf); z-index: 2 }
.fav-stock { font-size: 9px; font-weight: 600; margin-bottom: 6px }
.fav-stock.in { color: var(--g6) }
.fav-stock.out { color: var(--err) }
.fav-actions { display: flex; gap: 4px; align-items: center }
.fav-btn-cart { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 6px 10px; border-radius: var(--rf); font-size: 10px; font-weight: 700; background: linear-gradient(135deg, var(--g5), var(--g6)); color: var(--w); box-shadow: 0 2px 8px rgba(0,180,98,.3); transition: all .2s; cursor: pointer; border: none; font-family: inherit; height: 28px; letter-spacing: .02em }
.fav-btn-cart:hover { background: linear-gradient(135deg, var(--g6), #048a48); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,180,98,.4) }
.fav-btn-cart:active { transform: scale(.96) }
.fav-btn-cart:disabled { background: var(--n2); color: var(--n4); box-shadow: none; cursor: not-allowed; transform: none }
.fav-btn-cart svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round }
.fav-btn-heart { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid rgba(239,68,68,.3); background: var(--w); display: grid; place-items: center; cursor: pointer; transition: all .2s; flex-shrink: 0; box-shadow: 0 1px 4px rgba(239,68,68,.1) }
.fav-btn-heart:hover { background: #FEE2E2; border-color: var(--err); box-shadow: 0 2px 8px rgba(239,68,68,.2) }
.fav-btn-heart:active { transform: scale(.9) }
.fav-btn-heart svg { width: 12px; height: 12px; stroke: var(--err); fill: var(--err); stroke-width: 1.5 }
.fav-remove { cursor: pointer }

/* Counter (in-cart state) */
.fav-counter { flex: 1; display: flex; align-items: center; border-radius: var(--rf); overflow: hidden; background: var(--g0); border: 1.5px solid var(--g4); height: 28px }
.fav-counter button { width: 30px; height: 100%; background: var(--g5); color: var(--w); border: none; font-size: 15px; font-weight: 700; cursor: pointer; display: grid; place-items: center; transition: background .15s; font-family: inherit; line-height: 1 }
.fav-counter button:first-child { border-radius: var(--rf) 0 0 var(--rf) }
.fav-counter button:last-child { border-radius: 0 var(--rf) var(--rf) 0 }
.fav-counter button:hover { background: var(--g6) }
.fav-counter .cnt-qty { flex: 1; text-align: center; font-size: 12px; font-weight: 800; color: var(--g6) }

/* OOS separator */
.fav-oos-sep { grid-column: 1 / -1; font-size: 11px; font-weight: 600; color: var(--n4); padding: 8px 0 2px; border-top: 1px solid var(--n2); margin-top: 4px }

/* Sticky bottom bar */
.fav-bar { position: sticky; bottom: 12px; background: var(--w); border: 1px solid var(--n2); padding: 8px 14px; display: flex; align-items: center; justify-content: space-between; z-index: 100; box-shadow: 0 4px 20px rgba(0,0,0,.1); border-radius: 14px; margin: 10px 0 }
.fav-bar-info { font-size: 11px; color: var(--n5) }
.fav-bar-info strong { font-size: 14px; color: var(--c1); margin-left: 4px }
.fav-bar-btn { padding: 6px 14px; background: var(--g5); color: var(--w); border-radius: var(--rf); font-size: 11px; font-weight: 700; border: none; cursor: pointer; font-family: var(--fb); display: flex; align-items: center; gap: 4px }
.fav-bar-btn:hover { background: var(--g6) }
.fav-bar-btn svg { width: 14px; height: 14px }

/* Empty state */
.fav-empty { display: none; text-align: center; padding: 30px 20px }
.fav-empty.show { display: block }
.fav-empty-ico { width: 44px; height: 44px; margin: 0 auto 10px; background: var(--n1); border-radius: 50%; display: grid; place-items: center }
.fav-empty-ico svg { width: 22px; height: 22px; stroke: #EF4444; fill: none; stroke-width: 1.5 }
.fav-empty h3 { font-size: 14px; font-weight: 700; color: var(--n8); margin-bottom: 4px }
.fav-empty p { font-size: 11px; color: var(--n5); margin-bottom: 12px }
.fav-empty-btn { display: inline-flex; align-items: center; gap: 5px; padding: 8px 16px; background: var(--g5); color: var(--w); border-radius: var(--rf); font-size: 12px; font-weight: 700; text-decoration: none }
.fav-empty-btn:hover { background: var(--g6) }

/* Toast notifications (favorites) */
.toast-wrap { position: fixed; top: 16px; right: 16px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--w); border-radius: var(--r3); box-shadow: 0 8px 28px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06); pointer-events: auto; animation: toastIn .35s var(--e); max-width: 320px; border-left: 3px solid var(--g5) }
.toast.toast-remove { border-left-color: var(--err) }
.toast.toast-out { animation: toastOut .3s var(--e) forwards }
.toast-ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0 }
.toast-ico.ico-cart { background: var(--g0) }
.toast-ico.ico-cart svg { width: 14px; height: 14px; stroke: var(--g6); fill: none; stroke-width: 2 }
.toast-ico.ico-heart { background: #FEE2E2 }
.toast-ico.ico-heart svg { width: 14px; height: 14px; stroke: var(--err); fill: none; stroke-width: 2 }
.toast-body { flex: 1; min-width: 0 }
.toast-title { font-size: 12px; font-weight: 700; color: var(--n9); line-height: 1.3 }
.toast-desc { font-size: 10px; color: var(--n5); margin-top: 1px; line-height: 1.3 }
.toast-undo { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 700; color: var(--c4); cursor: pointer; text-decoration: underline }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px) } to { opacity: 1; transform: translateX(0) } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px) } }

/* === CANCEL MODAL === */
.cancel-modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 9999 }
.cancel-modal { background: #fff; border-radius: 16px; max-width: 420px; width: 92%; box-shadow: 0 8px 32px rgba(0,0,0,.15) }
.cancel-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 0 }
.cancel-modal-header h3 { margin: 0; font-size: 18px; font-weight: 700; color: var(--n1) }
.cancel-modal-close { background: none; border: none; font-size: 24px; color: var(--n3); cursor: pointer; padding: 0; line-height: 1 }
.cancel-modal-body { padding: 16px 24px }
.cancel-modal-body p { margin: 0 0 12px; font-size: 14px; color: var(--n2) }
.cancel-reasons { display: flex; flex-direction: column; gap: 8px }
.cancel-reason-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--g5); border-radius: 10px; cursor: pointer; transition: border-color .15s, background .15s }
.cancel-reason-item:hover { border-color: var(--c1); background: var(--g6) }
.cancel-reason-item input[type="radio"] { accent-color: var(--c1); width: 18px; height: 18px; margin: 0 }
.cancel-reason-item span { font-size: 14px; color: var(--n1) }
.cancel-reason-text { width: 100%; margin-top: 12px; padding: 10px 14px; border: 1px solid var(--g5); border-radius: 10px; font-size: 14px; font-family: var(--fb); resize: vertical; outline: none; transition: border-color .15s }
.cancel-reason-text:focus { border-color: var(--c1) }
.cancel-modal-footer { display: flex; gap: 12px; padding: 0 24px 20px; justify-content: flex-end }
.cancel-modal-btn { padding: 10px 20px; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: background .15s }
.cancel-modal-btn--secondary { background: var(--g5); color: var(--n1) }
.cancel-modal-btn--secondary:hover { background: var(--g4) }
.cancel-modal-btn--danger { background: var(--r4); color: #fff }
.cancel-modal-btn--danger:hover { background: #c0392b }
.cancel-modal-btn:disabled { opacity: .5; cursor: not-allowed }

/* === RESPONSIVE — account redesign === */
@media (max-width: 767px) {
    .page { flex-direction: column; gap: 0; padding: 16px 12px 24px }
    .sidebar { display: none }
    .mob-tabs { display: flex }
    .page-title { font-size: 22px }
    .page-subtitle { margin-bottom: 16px }
    .mob-prof { display: flex !important; align-items: center; gap: 12px; padding: 12px 16px; background: var(--w); border-radius: var(--r3); box-shadow: var(--s1); margin-bottom: 10px }
    .mob-prof .prof-ava { width: 40px; height: 40px; font-size: 16px }
    .mob-prof .prof-name { font-size: 14px }
    .mob-prof .prof-phone { font-size: 11px }
    .order-header {
        flex-direction: column;
        gap: 8px;
    }
    .order-item {
        font-size: 14px;
    }
    .login-page {
        margin: 20px auto;
    }
    .login-box {
        padding: 24px 20px;
    }
    /* Profile page mobile */
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
    .profile-card {
        padding: 14px;
    }
    /* Favorites mobile */
    .fav-grid { grid-template-columns: repeat(2, 1fr); gap: 6px }
    .fav-card { padding: 8px }
    .fav-bar { bottom: 82px; margin: 12px 8px; border-radius: 14px }
    /* Recipes mobile */
    .rx-info-banner { flex-direction: column; text-align: center; gap: 8px }
    .rx-card-head { flex-wrap: wrap }
    .rx-upload-camera { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px; background: var(--c4); color: var(--w); border-radius: var(--r3); font-size: 13px; font-weight: 600; margin-top: 8px; cursor: pointer }
    .rx-upload-camera svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2 }
    .rx-filters { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 4px }
    .rx-filters::-webkit-scrollbar { display: none }
    .rx-med-right { gap: 6px }
    /* Bonuses mobile */
    .bonus-info { flex-wrap: wrap }
    .bonus-info-item { flex: 1 1 30%; min-width: 90px; border-bottom: none; font-size: 9px; padding: 6px 8px }
    .bonus-info-item b { font-size: 11px }
    .bonus-big-number { font-size: 20px }
    /* History page mobile */
    .ord-head { flex-wrap: wrap }
    .ord-status { margin-left: 0 }
    .ord-foot { flex-direction: column; align-items: flex-start }
    .ord-actions { width: 100% }
    .ord-btn { flex: 1; justify-content: center }
    /* Addresses page mobile */
    .adr-card { flex-direction: column; gap: 6px }
    .adr-card-actions { width: 100% }
    .adr-btn { flex: 1; justify-content: center }
    .add-row { flex-direction: column; gap: 0 }
}
@media (min-width: 768px) {
    .page { padding: 24px 24px 40px }
}
@media (min-width: 1024px) {
    .page { padding: 24px 40px 40px }
}
