* {
    box-sizing: border-box;
}

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

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.si-body {
    background: #F4F2EE;
    min-height: 100vh;
}

.phone-frame {
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
    background: #F4F2EE;
    position: relative;
}

@media (max-width: 1024px) {
    .phone-frame {
        max-width: 100%;
    }
}

/* ---------- Login screen ---------- */
.si-login {
    padding: 60px 24px 24px;
    text-align: center;
}

.si-login__logo {
    max-width: 220px;
    margin: 0 auto 20px;
}

.si-login__badge {
    display: inline-block;
    background: #fbe4e6;
    color: #c0152a;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    margin-bottom: 28px;
}

.si-login__input {
    width: 100%;
    height: 50px;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    padding: 0 16px;
    font-size: 15px;
    margin-bottom: 16px;
    background: #fff;
    color: #333;
}

    .si-login__input::placeholder {
        color: #9b9b9b;
    }

.si-field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.si-login__btn {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 10px;
    background: #c0152a;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

    .si-login__btn:disabled {
        opacity: 0.7;
    }

.si-login__hint {
    margin-top: 18px;
    font-size: 13px;
    color: #9b9b9b;
    line-height: 1.5;
}

.si-login__error {
    color: #c0152a;
    font-size: 13px;
    margin: -4px 0 12px;
    text-align: left;
    display: block;
    min-height: 16px;
}

/* ---------- Order screen ---------- */
.si-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    max-width: 430px;
    margin: 0 auto;
    z-index: 10;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    background: #fff;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
}

.si-header__logo {
    height: 32px;
}

.si-header__shop {
    font-weight: 700;
    font-size: 15px;
    color: #222;
    margin-top: 4px;
}

.si-header__menu {
    border: none;
    background: none;
    padding: 4px 4px 4px 8px;
    cursor: pointer;
    margin-top: 2px;
}

.si-content {
    padding-top: 88px;
}

    .si-content--compact {
        padding-top: 56px;
    }

.si-greeting {
    padding: 14px 16px 4px;
    font-size: 15px;
    color: #555;
}

    .si-greeting strong {
        color: #222;
    }

.si-banner {
    margin: 16px 16px 0;
    background: #fdeceb;
    color: #c0152a;
    font-size: 13px;
    border-radius: 8px;
    padding: 10px 12px;
}

.si-reorder {
    margin: 16px 16px 0;
    background: #fff;
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: #333;
    text-decoration: none;
}

    .si-reorder b {
        color: #c0152a;
    }

.si-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 20px 16px 16px;
}

.si-tab {
    flex: 0 0 auto;
    padding: 9px 18px;
    border-radius: 20px;
    background: #fff;
    color: #333;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #fff;
    cursor: pointer;
    white-space: nowrap;
}

    .si-tab.active {
        background: #1d1d1d;
        color: #fff;
    }

.si-products {
    background: #F4F2EE;
    margin-top: 16px;
    padding: 4px 16px 110px;
}

.si-product {
    padding: 14px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f0f0f0;
}

    .si-product:last-child {
        border-bottom: none;
    }

    .si-product--reordered {
        background: #fdf3f4;
        border-left: 3px solid #e8a0a8;
        margin-left: -16px;
        margin-right: -16px;
        padding-left: 16px;
        padding-right: 16px;
    }

.si-product__name {
    font-weight: 600;
    font-size: 14px;
    color: #222;
}

.si-product__price {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.si-stepper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.si-stepper__btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.si-stepper__qty {
    min-width: 22px;
    text-align: center;
    font-weight: 600;
}

.si-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 430px;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.si-footer__info {
    font-size: 12px;
    color: #888;
}

.si-footer__total {
    font-weight: 700;
    font-size: 18px;
    color: #222;
}

.si-footer__btn {
    background: #c0152a;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

    .si-footer__btn--full {
        width: 100%;
        padding: 14px 20px;
    }

/* ---------- Confirm order screen ---------- */
.si-header__back {
    font-size: 26px;
    color: #222;
    text-decoration: none;
    width: 24px;
}

.si-section {
    background: #fff;
    margin-bottom: 8px;
    padding: 14px 16px;
}

.si-section__label {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.si-section__bold {
    font-weight: 700;
    font-size: 14px;
    color: #222;
}

.si-section__hint {
    font-size: 13px;
    margin-top: 6px;
}

    .si-section__hint--red {
        color: #c0152a;
    }

.si-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: #333;
    padding: 6px 0;
}

    .si-line--item {
        display: grid;
        grid-template-columns: 1fr 36px 90px;
        align-items: start;
        gap: 8px;
    }

.si-line__name {
    min-width: 0;
    word-break: break-word;
}

.si-line__qty {
    text-align: center;
    color: #888;
    white-space: nowrap;
}

.si-line__price {
    text-align: right;
    white-space: nowrap;
    font-weight: 600;
}

    .si-line em {
        font-size: 11px;
        color: #c0152a;
        background: #fdeceb;
        border-radius: 6px;
        padding: 2px 6px;
        font-style: normal;
        margin-left: 4px;
    }

    .si-line--total {
        font-size: 18px;
        font-weight: 700;
        color: #222;
        padding-top: 10px;
    }

.si-textarea {
    width: 100%;
    min-height: 70px;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    padding: 12px;
    font-size: 14px;
    resize: none;
    background: #fff;
}

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

.si-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 26px;
}

    .si-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.si-switch__slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ddd;
    border-radius: 26px;
    transition: 0.2s;
}

    .si-switch__slider:before {
        position: absolute;
        content: "";
        height: 20px;
        width: 20px;
        left: 3px;
        bottom: 3px;
        background: #fff;
        border-radius: 50%;
        transition: 0.2s;
    }

.si-switch input:checked + .si-switch__slider {
    background: #c0152a;
}

    .si-switch input:checked + .si-switch__slider:before {
        transform: translateX(18px);
    }

.si-vat-fields {
    margin-top: 12px;
}

    .si-vat-fields .si-login__input {
        height: 42px;
        margin-bottom: 10px;
    }

.si-pay-options {
    display: flex;
    gap: 10px;
}

.si-pay-option {
    flex: 1;
    text-align: center;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
}

    .si-pay-option input {
        display: none;
    }

    .si-pay-option.active {
        border-color: #c0152a;
        color: #c0152a;
    }

/* ---------- Bank transfer screen ---------- */
.si-pay-success {
    background: #fff;
    text-align: center;
    padding: 20px 16px;
    margin-bottom: 8px;
}

.si-pay-success__badge {
    display: inline-block;
    background: #e6f4ea;
    color: #1d8a4c;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.si-pay-success__label {
    font-size: 13px;
    color: #888;
}

.si-pay-success__amount {
    font-size: 28px;
    font-weight: 700;
    color: #c0152a;
    margin-top: 4px;
}

.si-qr-section {
    text-align: center;
}

.si-qr-box {
    width: 250px;
    height: 250px;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 10px;
    margin: 0 auto 12px;
    display: block;
}

.si-qr-hint {
    font-size: 12px;
    color: #999;
}

.si-copy {
    font-size: 12px;
    color: #c0152a;
    text-decoration: none;
    margin-left: 6px;
}

.si-transfer-note {
    background: #fdeceb;
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 14px;
}

.si-transfer-note__label {
    font-size: 11px;
    color: #c0152a;
    text-transform: uppercase;
}

.si-transfer-note__code {
    font-weight: 700;
    font-size: 16px;
    color: #c0152a;
    margin-top: 4px;
}

.si-transfer-note__hint {
    font-size: 12px;
    color: #b46a66;
    margin-top: 6px;
}

.si-footer--column {
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 8px;
}

.si-footer__skip {
    color: #999;
    font-size: 13px;
    text-decoration: none;
    text-align: center;
}

/* ---------- Reorder modal ---------- */
.si-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    max-width: 430px;
    margin: 0 auto;
    background: rgba(0,0,0,0.45);
    z-index: 50;
    display: none;
}

    .si-modal-overlay.active {
        display: block;
    }

.si-modal {
    position: fixed;
    left: 0;
    right: 0;
    bottom: -100%;
    max-width: 430px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px 16px 0 0;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    z-index: 51;
    transition: bottom 0.2s ease-out;
}

    .si-modal.active {
        bottom: 0;
    }

.si-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #eee;
    font-weight: 700;
    font-size: 15px;
    color: #222;
}

.si-modal__close {
    border: none;
    background: none;
    font-size: 22px;
    line-height: 1;
    color: #999;
    cursor: pointer;
}

.si-modal__body {
    overflow-y: auto;
    padding: 4px 16px;
    flex: 1;
}

.si-modal__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

    .si-modal__item:last-child {
        border-bottom: none;
    }

    .si-modal__item.is-removed {
        opacity: 0.4;
    }

.si-modal__item-name {
    font-weight: 600;
    font-size: 14px;
    color: #222;
}

.si-modal__item-price {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.si-modal__footer {
    padding: 14px 16px;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.si-modal__total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    font-size: 15px;
    color: #222;
    margin-bottom: 4px;
}

.si-modal__btn-secondary {
    background: #fff;
    border: 1px solid #c0152a;
    color: #c0152a;
    border-radius: 8px;
    padding: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.si-modal__btn-primary {
    background: #c0152a;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

/* ---------- Side menu ---------- */
/* Clip container: same footprint as phone-frame, clips the slide-in panel */
.si-menu-clip {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    max-width: 430px;
    margin: 0 auto;
    overflow: hidden;
    pointer-events: none;
    z-index: 60;
}

    .si-menu-clip.active {
        pointer-events: auto;
    }

.si-menu-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    opacity: 0;
    transition: opacity 0.25s;
}

    .si-menu-overlay.active {
        opacity: 1;
    }

.si-menu {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f5f5f3;
    transform: translateX(100%);
    transition: transform 0.25s ease-out;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

    .si-menu.active {
        transform: translateX(0);
    }

.si-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1;
}

.si-menu__back {
    border: none;
    background: none;
    font-size: 26px;
    color: #222;
    cursor: pointer;
    line-height: 1;
    width: 32px;
}

.si-menu__title {
    font-size: 17px;
    font-weight: 700;
    color: #222;
}

.si-menu__body {
}

.si-menu__section {
    background: #fff;
    margin-bottom: 0;
}

    .si-menu__section + .si-menu__divider + .si-menu__section,
    .si-menu__body + .si-menu__section {
        margin-top: 8px;
    }

.si-menu__divider {
    height: 8px;
    background: #f0efed;
}

.si-menu__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px;
    font-size: 15px;
    color: #222;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
}

    .si-menu__item:last-child {
        border-bottom: none;
    }

    .si-menu__item--red {
        color: #c0152a;
    }

.si-menu__arrow {
    font-size: 18px;
    color: #ccc;
}

/* ---------- Order history screen ---------- */
.si-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.si-badge--green {
    background: #e8f5e9;
    color: #2e7d32;
}

.si-badge--orange {
    background: #fff3e0;
    color: #e65100;
}

.si-badge--gray {
    background: #f0f0f0;
    color: #888;
}

.si-history-card {
    background: #fff;
    border-radius: 12px;
    margin: 12px 16px 0;
    padding: 14px 16px;
}

.si-history-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.si-history-card__id {
    font-weight: 700;
    font-size: 14px;
    color: #222;
}

.si-history-card__info {
    font-size: 13px;
    color: #888;
    margin-bottom: 14px;
}

.si-history-card__actions {
    display: flex;
    gap: 10px;
}

.si-history-btn {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    border: none;
}

.si-history-btn--outline {
    background: #fff;
    border: 1.5px solid #ddd;
    color: #333;
}

.si-history-btn--primary {
    background: #c0152a;
    color: #fff;
}

    .si-history-btn--primary:disabled {
        opacity: 0.7;
    }

.si-history-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    text-align: center;
}

.si-history-empty__icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.si-history-empty__text {
    font-size: 15px;
    color: #888;
}

/* ---------- Order success screen ---------- */
.si-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 48px 24px 40px;
    text-align: center;
    background: #F4F2EE;
}

.si-success__icon {
    margin-bottom: 24px;
}

.si-success__heading {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    margin: 0 0 14px;
}

.si-success__code {
    display: inline-block;
    border: 1.5px solid #ccc;
    border-radius: 8px;
    padding: 8px 22px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 14px;
    background: #fff;
}

.si-success__desc {
    font-size: 14px;
    color: #2d7dd2;
    line-height: 1.65;
    margin: 0 0 36px;
}

.si-success__note {
    font-size: 12.5px;
    color: #888;
    line-height: 1.6;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 0 0 24px;
    text-align: left;
}

.si-success__actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.si-success__btn-primary {
    display: block;
    text-align: center;
    text-decoration: none;
    background: #c0152a;
    color: #fff;
    border-radius: 10px;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
}

.si-success__btn-outline {
    display: block;
    text-align: center;
    text-decoration: none;
    border: 1.5px solid #ccc;
    border-radius: 10px;
    padding: 13px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    background: #fff;
}

.si-success__btn-ghost {
    display: block;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    color: #aaa;
    padding: 8px;
}

/* ---------- Full width on iPad and below ---------- */
@media (max-width: 1024px) {
    .phone-frame,
    .si-header,
    .si-footer,
    .si-modal-overlay,
    .si-modal,
    .si-menu-clip {
        max-width: 100%;
    }
}
