/* ─── Checkout wrapper ────────────────────────────────── */
.checkout-wrapper {
    padding: 60px 0 90px;
    background: #ffffff;
    min-height: 60vh;
}

.checkout-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* ─── Summary (left column) ───────────────────────────── */
.checkout-summary {
    width: 300px;
    flex-shrink: 0;
}

.summary-card {
    background: #fff;
    border: 2px solid #3f4079;
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 4px 20px rgba(63,64,121,0.08);
}

.summary-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: #3f4079;
    margin: 0 0 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-pack-name {
    font-size: 22px;
    font-weight: 800;
    color: #3f4079;
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #555;
    padding: 8px 0;
    border-bottom: 1px solid #eeeef7;
}

.summary-price-row {
    border-bottom: none;
    padding-top: 12px;
    margin-top: 4px;
}

.summary-price-row strong {
    font-size: 18px;
    color: #1ca3ae;
}

.summary-note {
    font-size: 11px;
    color: #999;
    margin-top: 10px;
    margin-bottom: 0;
}

.summary-change {
    display: inline-block;
    margin-top: 14px;
    font-size: 13px;
    color: #3f4079;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.summary-change:hover { opacity: 1; }

/* ─── Main area (right column) ───────────────────────── */
.checkout-main {
    flex: 1;
    background: #fff;
    border-radius: 16px;
    padding: 36px 40px;
    box-shadow: 0 4px 20px rgba(63,64,121,0.08);
}

/* ─── Auth tabs ───────────────────────────────────────── */
.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 28px;
    border-bottom: 2px solid #eeeef7;
}

.auth-tab {
    background: none;
    border: none;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}

.auth-tab.active {
    color: #3f4079;
    border-bottom-color: #3f4079;
}

.auth-panel { display: none; }
.auth-panel.active { display: block; }

/* ─── Form elements ───────────────────────────────────── */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #3f4079;
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px;
    border: 1.5px solid #ddddf0;
    border-radius: 10px;
    font-size: 14px;
    color: #333;
    background: #fafafa;
    transition: border-color 0.2s;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #3f4079;
    background: #fff;
}

.form-group--checkbox label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 400;
    color: #555;
    cursor: pointer;
}

.form-group--checkbox input[type="checkbox"] {
    width: auto;
    margin: 0;
    accent-color: #3f4079;
}

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

/* ─── Buttons ─────────────────────────────────────────── */
.checkout-wrapper .btn-primary,
.otp-modal .btn-primary,
.order-history-wrapper .btn-primary,
.confirmation-wrapper .btn-primary {
    display: inline-block;
    padding: 13px 32px;
    background: #3f4079;
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
    width: 100%;
    text-align: center;
    margin-top: 8px;
}

.checkout-wrapper .btn-primary:hover,
.otp-modal .btn-primary:hover,
.order-history-wrapper .btn-primary:hover,
.confirmation-wrapper .btn-primary:hover {
    background: #2d2e5e;
    transform: translateY(-1px);
}

.checkout-wrapper .btn-primary:disabled,
.otp-modal .btn-primary:disabled,
.order-history-wrapper .btn-primary:disabled,
.confirmation-wrapper .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-order { margin-top: 16px; }

.btn-secondary {
    display: inline-block;
    padding: 13px 32px;
    background: transparent;
    color: #3f4079 !important;
    font-size: 14px;
    font-weight: 700;
    border: 2px solid #3f4079;
    border-radius: 30px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #3f4079;
    color: #fff !important;
}

/* ─── OTP & errors ────────────────────────────────────── */
.otp-info {
    font-size: 14px;
    color: #555;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: #f0f0f9;
    border-radius: 10px;
}

.form-error {
    background: #fff0f0;
    color: #d32f2f;
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 3px solid #d32f2f;
}

/* ─── Optional users section ─────────────────────────── */
.users-section {
    margin-bottom: 20px;
    border: 1.5px dashed #c8c8e8;
    border-radius: 12px;
    overflow: hidden;
}

.users-toggle {
    width: 100%;
    background: #f8f8fc;
    border: none;
    padding: 14px 18px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: #3f4079;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.users-toggle:hover { background: #f0f0f9; }

.users-toggle__icon {
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
    color: #3f4079;
}

.users-toggle__hint {
    font-weight: 400;
    color: #999;
    font-size: 13px;
}

.users-toggle__counter {
    margin-left: auto;
    background: #3f4079;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}

.users-list-wrapper {
    padding: 16px 18px 18px;
    border-top: 1.5px dashed #c8c8e8;
    background: #fff;
}

.users-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.user-entry {
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeSlideIn 0.2s ease;
}

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

.user-entry__num {
    min-width: 26px;
    height: 26px;
    background: #3f4079;
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-entry__input {
    flex: 1;
    padding: 9px 12px !important;
    border: 1.5px solid #ddddf0 !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    background: #fafafa !important;
}

.user-entry__input:focus {
    border-color: #3f4079 !important;
    background: #fff !important;
    outline: none;
}

.user-entry__remove {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 14px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.user-entry__remove:hover { background: #fff0f0; }

.btn-add-user {
    background: none;
    border: 1.5px dashed #3f4079;
    color: #3f4079;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    width: 100%;
}

.btn-add-user:hover:not(:disabled) { background: #f0f0f9; }

/* ─── Register fieldsets ─────────────────────────────── */
.checkout-fieldset {
    margin-bottom: 24px;
    border: 1.5px solid #eeeef7;
    border-radius: 12px;
    padding: 20px 20px 8px;
}

.checkout-fieldset__legend {
    font-size: 12px;
    font-weight: 700;
    color: #3f4079;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

/* ─── Order form heading ──────────────────────────────── */
.checkout-order h3 {
    font-size: 18px;
    font-weight: 700;
    color: #3f4079;
    margin: 0 0 24px;
}

/* ─── Confirmation page ───────────────────────────────── */
.confirmation-wrapper {
    padding: 80px 0;
    background: #f8f8fc;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.confirmation-card {
    max-width: 560px;
    margin: 0 auto;
    background: #fff;
    border-radius: 20px;
    padding: 56px 48px;
    text-align: center;
    box-shadow: 0 8px 40px rgba(63,64,121,0.10);
}

.confirmation-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #22c55e;
    color: #fff;
    font-size: 36px;
    line-height: 72px;
    margin: 0 auto 24px;
}

.confirmation-card h1 {
    font-size: 28px;
    font-weight: 800;
    color: #3f4079;
    margin-bottom: 12px;
}

.confirmation-sub {
    font-size: 16px;
    color: #555;
    margin-bottom: 12px;
}

.confirmation-card p {
    font-size: 14px;
    color: #888;
    line-height: 1.7;
    margin-bottom: 32px;
}

.confirmation-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.confirmation-actions .btn-primary,
.confirmation-actions .btn-secondary {
    width: auto;
    padding: 13px 28px;
    margin-top: 0;
}

.confirmation-actions .btn-secondary {
    display: inline-block;
    background: #fff;
    color: #3f4079 !important;
    border: 2px solid #3f4079;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s;
}

.confirmation-actions .btn-secondary:hover {
    background: #f0f0f9;
}

/* ─── OTP Modal ───────────────────────────────────────── */
.otp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 20, 50, 0.55);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.otp-modal {
    background: #fff;
    border-radius: 20px;
    padding: 48px 40px 36px;
    width: 100%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(63,64,121,0.18);
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.otp-modal__icon {
    font-size: 36px;
    margin-bottom: 16px;
}

.otp-modal h3 {
    font-size: 20px;
    font-weight: 800;
    color: #3f4079;
    margin: 0 0 10px;
}

.otp-modal p {
    font-size: 13px;
    color: #777;
    margin-bottom: 28px;
    line-height: 1.6;
}

.otp-inputs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.otp-digit {
    width: 42px !important;
    height: 52px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #3f4079;
    border: 2px solid #ddddf0 !important;
    border-radius: 10px !important;
    background: #fafafa !important;
    padding: 0 !important;
    transition: border-color 0.2s, background 0.2s;
}

.otp-digit:focus {
    border-color: #3f4079 !important;
    background: #fff !important;
    outline: none;
}

.otp-separator {
    font-size: 20px;
    color: #ccc;
    padding: 0 2px;
    user-select: none;
}

.otp-modal .btn-primary {
    margin-bottom: 12px;
}

.otp-modal__cancel {
    background: none;
    border: none;
    font-size: 13px;
    color: #999;
    cursor: pointer;
    padding: 8px;
    display: block;
    width: 100%;
    transition: color 0.2s;
}

.otp-modal__cancel:hover { color: #3f4079; }

/* ─── Order history ──────────────────────────────────── */
.order-history-wrapper {
    padding: 60px 0 90px;
    background: #fff;
    min-height: 50vh;
}

.orders-loading, .orders-empty {
    text-align: center;
    padding: 60px 0;
    color: #888;
    font-size: 15px;
}

.orders-empty a { margin-top: 20px; }

.order-card {
    background: #fff;
    border: 1.5px solid #eeeef7;
    border-radius: 14px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(63,64,121,0.06);
}

.order-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8f8fc;
    border-bottom: 1px solid #eeeef7;
}

.order-card__ref {
    font-weight: 700;
    font-size: 15px;
    color: #3f4079;
}

.order-card__date {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

.order-card__status {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
}

.status--pending   { background: #fff8e1; color: #f59e0b; }
.status--paid      { background: #f0fdf4; color: #22c55e; }
.status--cancelled { background: #fff0f0; color: #ef4444; }

.order-card__body {
    display: flex;
    gap: 0;
    padding: 16px 20px;
}

.order-card__col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-right: 1px solid #eeeef7;
    padding-right: 20px;
    margin-right: 20px;
}

.order-card__col:last-child {
    border-right: none;
    padding-right: 0;
    margin-right: 0;
}

.order-card__label {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.order-card__col strong {
    font-size: 15px;
    color: #333;
}

.order-card__users {
    padding: 12px 20px 16px;
    border-top: 1px solid #eeeef7;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.order-card__user-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.order-card__user-tag {
    background: #eeeef7;
    color: #3f4079;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
}

/* ─── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
    .checkout-layout {
        flex-direction: column;
    }
    .checkout-summary {
        width: 100%;
    }
    .checkout-main {
        padding: 24px 20px;
    }
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
    .confirmation-card {
        padding: 40px 24px;
    }
}
