:root {
    --primary: #5533ff;
    --primary-dark: #3422c9;
    --primary-light: #f0edff;
    --text: #171a2b;
    --muted: #667085;
    --border: #e4e7ec;
    --background: #f7f8fc;
    --success: #087a4b;
    --success-bg: #e9f8f0;
    --danger: #b42318;
    --danger-bg: #fff0ee;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
    margin: 0;
    background:
        radial-gradient(circle at 10% 48%, rgba(85,51,255,.055), transparent 32%),
        radial-gradient(circle at 92% 50%, rgba(85,51,255,.05), transparent 34%),
        var(--background);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.payment-header {
    color: #fff;
    background: linear-gradient(120deg, var(--primary-dark), var(--primary) 55%, #7c45ef);
    position: relative;
    overflow: hidden;
}
.payment-header::after {
    content: "";
    position: absolute;
    width: 650px;
    height: 230px;
    right: 14%;
    top: -175px;
    border-radius: 50%;
    background: rgba(255,255,255,.07);
}
.payment-header-inner {
    min-height: 110px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}
.brand-block, .secure-block, .summary-item, .detail-item, .group-invoice-box { display: flex; align-items: center; }
.brand-block { gap: 14px; }
.brand-mark {
    width: 52px; height: 52px; border-radius: 16px;
    display: grid; place-items: center;
    font-size: 27px; background: rgba(255,255,255,.15);
}
.brand-name { font-size: 1.65rem; font-weight: 750; line-height: 1.1; }
.brand-subtitle { margin-top: 5px; font-size: .78rem; letter-spacing: .17em; opacity: .9; }
.secure-block { gap: 11px; font-size: .9rem; }
.secure-block > i { font-size: 1.45rem; }
.secure-block span { display: block; opacity: .82; font-size: .8rem; }

.payment-main { padding: 42px 0 54px; min-height: calc(100vh - 182px); }
.payment-container { max-width: 1060px; }
.payment-panel {
    background: rgba(255,255,255,.97);
    border: 1px solid rgba(228,231,236,.9);
    border-radius: 24px;
    padding: 34px 46px 38px;
    box-shadow: 0 20px 55px rgba(30, 28, 65, .11);
}
.booking-summary {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    padding-bottom: 27px;
    border-bottom: 1px solid var(--border);
}
.summary-item { gap: 16px; min-width: 0; }
.summary-date { justify-content: flex-end; }
.summary-icon {
    width: 56px; height: 56px; flex: 0 0 56px;
    border-radius: 50%; display: grid; place-items: center;
    background: var(--primary-light); color: var(--primary);
    font-size: 1.55rem;
}
.summary-item > div:last-child { min-width: 0; }
.summary-label, .summary-meta { display: block; color: var(--muted); }
.summary-label { font-size: .88rem; }
.summary-title { display: block; font-size: 1.25rem; margin: 1px 0; }
.summary-meta { font-size: .9rem; }

.amount-section { text-align: center; padding: 34px 0 29px; }
.amount-label { display: block; color: var(--muted); font-size: .96rem; }
.amount-value { font-size: 3.5rem; font-weight: 760; letter-spacing: -.045em; line-height: 1.12; }
.amount-value span { font-size: .52em; letter-spacing: normal; }
.status-pill {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 14px; border-radius: 999px;
    margin-top: 10px; font-size: .9rem; font-weight: 650;
}
.status-success { background: var(--success-bg); color: var(--success); }
.status-danger { background: var(--danger-bg); color: var(--danger); }
.status-info { background: var(--primary-light); color: var(--primary-dark); }
.partial-payment { color: var(--muted); font-size: .87rem; margin-top: 10px; }

.payment-heading { font-size: 1.1rem; margin: 0 0 14px; font-weight: 700; }
.payment-options { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.payment-option {
    min-height: 150px;
    display: flex; align-items: center; gap: 17px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 17px;
    color: var(--text); text-decoration: none;
    background: #fff;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.payment-option:hover, .payment-option:focus-visible {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 13px 30px rgba(85,51,255,.12);
    color: var(--text);
}
.payment-option-primary { border-color: var(--primary); }
.option-logo {
    width: 168px; height: 68px; flex: 0 0 68px;
}
.option-logo img { max-width: 147px; max-height: 147px; }
.option-icon { font-size: 2rem; color: var(--primary); }
.option-text { flex: 1; min-width: 0; }
.option-text strong, .option-text span, .option-text small { display: block; }
.option-text strong { font-size: 1.05rem; margin-bottom: 4px; }
.option-text span { color: #4b5565; font-size: .92rem; }
.option-text small { color: var(--muted); font-size: .82rem; margin-top: 3px; line-height: 1.4; }
.option-arrow { color: var(--primary); font-size: 1.2rem; }

.group-invoice-box {
    gap: 15px; background: var(--primary-light); border-radius: 16px;
    padding: 20px 22px; color: var(--primary-dark);
}
.group-invoice-box > i { font-size: 1.55rem; }
.group-invoice-box span { display: block; color: #4b5565; }

.details-divider { display: flex; align-items: center; gap: 15px; margin: 30px 0 13px; }
.details-divider::before, .details-divider::after { content: ""; height: 1px; background: var(--border); flex: 1; }
.details-button {
    border: 0; background: transparent; color: var(--primary);
    font-weight: 650; padding: 7px 5px; white-space: nowrap;
}
.details-button i { margin-left: 5px; transition: transform .2s; }
.details-button[aria-expanded="true"] i { transform: rotate(180deg); }
.details-content { padding-top: 11px; }
.details-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 0; margin-bottom: 22px; }
.detail-item { gap: 12px; padding: 8px 18px; border-right: 1px solid var(--border); }
.detail-item:first-child { padding-left: 8px; }
.detail-item:last-child { border-right: 0; }
.detail-item > i { color: var(--primary); font-size: 1.3rem; }
.detail-item span { color: var(--muted); font-size: .82rem; }
.detail-item strong { color: var(--text); display: block; font-size: .91rem; margin-top: 2px; }
.specification-table { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.specification-table thead th { background: #f8f9fc; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.specification-table td, .specification-table th { padding: 12px 15px; }
.total-row td { background: #fafaff; }

.payment-footer {
    min-height: 72px; display: flex; align-items: center; justify-content: center;
    padding: 18px; text-align: center; color: #fff;
    background: linear-gradient(120deg, var(--primary-dark), var(--primary) 55%, #7c45ef);
    font-size: .9rem;
}
.error-panel { text-align: center; max-width: 720px; margin: 0 auto; }
.error-panel .error-icon { margin: 0 auto 16px; background: var(--danger-bg); color: var(--danger); }
.error-panel h1 { font-size: 1.55rem; }
.error-panel a { color: var(--primary); }

@media (max-width: 767.98px) {
    .payment-header-inner { min-height: 88px; }
    .brand-mark { width: 44px; height: 44px; font-size: 22px; }
    .brand-name { font-size: 1.25rem; }
    .secure-block { display: none; }
    .payment-main { padding: 20px 0 30px; }
    .payment-panel { padding: 23px 18px 26px; border-radius: 18px; }
    .booking-summary { display: block; padding-bottom: 22px; }
    .summary-date { justify-content: flex-start; margin-top: 20px; }
    .summary-icon { width: 48px; height: 48px; flex-basis: 48px; font-size: 1.3rem; }
    .summary-title { font-size: 1.05rem; }
    .amount-section { padding: 27px 0 24px; }
    .amount-value { font-size: 3rem; }
    .payment-options { grid-template-columns: 1fr; }
    .payment-option { min-height: 128px; padding: 18px; }
    .option-logo { width: 58px; height: 58px; flex-basis: 58px; }
    .option-logo img { max-width: 40px; }
    .details-grid { grid-template-columns: 1fr 1fr; gap: 12px 0; }
    .detail-item:nth-child(2) { border-right: 0; }
    .detail-item:nth-child(3), .detail-item:nth-child(4) { border-top: 1px solid var(--border); padding-top: 15px; }
    .details-divider { margin-top: 24px; }
}

@media (max-width: 420px) {
    .option-text small { display: none; }
    .payment-option { min-height: 105px; }
    .details-grid { grid-template-columns: 1fr; }
    .detail-item { border-right: 0; border-top: 1px solid var(--border); padding: 13px 8px; }
    .detail-item:first-child { border-top: 0; }
}
/* Swish QR-sida */
.swish-payment-box {
    display: grid;
    grid-template-columns: 185px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    padding: 17px 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
}
.swish-qr-column { text-align: center; }
.swish-qr-frame {
    width: 160px;
    height: 160px;
    margin: 0 auto 6px;
    padding: 8px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(30, 28, 65, .07);
}
.swish-qr-frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.swish-qr-help { color: var(--muted); font-size: .78rem; line-height: 1.25; }
.swish-fields { min-width: 0; }
.copy-group { margin-bottom: 9px; }
.copy-group label {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 650;
}
.copy-group .form-control {
    min-height: 38px;
    border-color: var(--border);
    background: #f8f9fc;
    color: var(--text);
    font-weight: 600;
}
.copy-group .form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(85,51,255,.1); }
.copy-btn {
    min-width: 92px;
    border: 1px solid var(--primary);
    background: var(--primary);
    color: #fff;
    font-weight: 650;
}
.copy-btn:hover, .copy-btn:focus { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.copy-btn { padding-top: 6px; padding-bottom: 6px; font-size: .84rem; }
.copy-btn i { margin-right: 4px; }
.copy-success { border-color: var(--success) !important; }
.copy-btn.copy-success { background: var(--success); color: #fff; }
.swish-recipient { margin-top: 2px; color: #4b5565; font-size: .82rem; }
.swish-recipient i { color: var(--success); margin-right: 5px; }
.payment-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 13px;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: .81rem;
}
.payment-notice-danger { background: var(--danger-bg); color: var(--danger); }
.payment-back-link { margin-top: 15px; text-align: center; }
.payment-back-link a { color: var(--primary); text-decoration: none; font-weight: 650; }
.payment-back-link a:hover { text-decoration: underline; }

@media (max-width: 767.98px) {
    .swish-payment-box { grid-template-columns: 150px minmax(0, 1fr); gap: 14px; padding: 14px; }
    .swish-qr-frame { width: 138px; height: 138px; }
}

@media (max-width: 560px) {
    .swish-payment-box { grid-template-columns: 1fr; }
    .swish-qr-frame { width: 145px; height: 145px; }
}

@media (max-width: 420px) {
    .copy-btn { min-width: 42px; }
    .copy-btn span { display: none; }
    .copy-btn i { margin-right: 0; }
}