:root{font-family:Arial,Helvetica,sans-serif;color:#29242f;background:#f2f0f4;color-scheme:light}*{box-sizing:border-box}body{margin:0;background:linear-gradient(145deg,#f7f5f8,#ece8ef);min-height:100vh}.withdrawal-shell{width:min(920px,100%);margin:0 auto;padding:28px 16px 60px}.withdrawal-back{display:inline-block;color:#684080;margin:0 0 18px;text-decoration:none;font-weight:700}.withdrawal-card{background:#fff;border-radius:16px;box-shadow:0 12px 40px rgba(43,35,50,.1);overflow:hidden;padding:38px}.withdrawal-card:before{content:"";display:block;height:6px;background:#7a4c99;margin:-38px -38px 32px}.withdrawal-eyebrow{font-size:12px;line-height:18px;font-weight:700;letter-spacing:1.4px;text-transform:uppercase;color:#7a4c99}.withdrawal-card h1{font-size:34px;line-height:1.15;margin:8px 0 14px}.withdrawal-card h2{font-size:22px;margin:30px 0 8px}.withdrawal-lead,.withdrawal-card p{color:#5e5863;line-height:1.55}.withdrawal-form{max-width:620px}.withdrawal-form label,#reviewSection label{display:block;font-weight:700;margin:18px 0 7px}.withdrawal-form label span{font-weight:400;color:#77717d}.withdrawal-form input,textarea,.position-quantity{width:100%;border:1px solid #cfc8d3;border-radius:8px;padding:12px;font:inherit;background:#fff}.withdrawal-form input:focus,textarea:focus,.position-quantity:focus{outline:3px solid rgba(122,76,153,.18);border-color:#7a4c99}button{appearance:none;border:0;border-radius:8px;background:#7a4c99;color:#fff;font-weight:700;font-size:15px;padding:12px 18px;cursor:pointer}button:hover{background:#643c80}button:disabled{opacity:.5;cursor:not-allowed}.withdrawal-form button{margin-top:20px}.secondary{background:#eee9f1;color:#3d3343}.secondary:hover{background:#e2d9e7}.danger{color:#8c2637}.withdrawal-status{display:none;border-radius:9px;padding:13px 15px;margin:18px 0;line-height:1.45}.withdrawal-status.visible{display:block}.withdrawal-status.success{background:#e7f5ec;color:#185c32}.withdrawal-status.error{background:#fdebed;color:#842235}.order-card{border:1px solid #e3dee6;border-radius:12px;padding:22px;margin:18px 0;background:#fdfcfd}.order-header{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.order-title{font-weight:700;font-size:18px}.order-meta{font-size:13px;color:#77717d;margin-top:5px}.position-row{display:grid;grid-template-columns:minmax(0,1fr) 130px;gap:16px;align-items:center;border-top:1px solid #ece8ef;padding:14px 0}.position-name{font-weight:700;overflow-wrap:anywhere}.position-meta{font-size:13px;color:#77717d;margin-top:4px}.position-control{display:flex;align-items:center;gap:8px}.position-control input[type=checkbox]{width:19px;height:19px}.position-quantity{width:70px;padding:8px}.order-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-top:16px}.confirmation{display:flex;gap:9px;align-items:flex-start;line-height:1.4}.confirmation input{width:19px;height:19px;flex:0 0 auto}.order-message{margin-top:14px}.withdrawal-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:18px}.withdrawal-actions button{min-height:44px}.review-grid{display:grid;grid-template-columns:180px 1fr;gap:8px 16px;margin:20px 0}.review-grid dt{font-weight:700}.review-grid dd{margin:0}.review-positions{width:100%;border-collapse:collapse;margin:16px 0}.review-positions th,.review-positions td{text-align:left;border-bottom:1px solid #ece8ef;padding:10px}.withdrawal-hint{font-size:13px}.withdrawal-embedded{min-height:0;background:#fff}.withdrawal-embedded .withdrawal-shell{width:100%;min-height:0;padding:0}.withdrawal-embedded .withdrawal-back{display:none}.withdrawal-embedded .withdrawal-card{border-radius:0;box-shadow:none}@media(max-width:650px){.withdrawal-card{padding:24px}.withdrawal-card:before{margin:-24px -24px 24px}.withdrawal-card h1{font-size:29px}.order-header{display:block}.position-row{grid-template-columns:1fr}.review-grid{grid-template-columns:1fr}.review-grid dd{margin-bottom:8px}.withdrawal-embedded .withdrawal-card{padding:22px 18px}.withdrawal-embedded .withdrawal-card:before{margin:-22px -18px 22px}}

:root {
    --withdrawal-accent: var(--portal-accent, #7a4c99);
    --withdrawal-accent-contrast: var(--portal-accent-contrast, #ffffff);
    --withdrawal-canvas: var(--portal-canvas, #f4f6fa);
    --withdrawal-surface: var(--portal-surface, #ffffff);
    --withdrawal-surface-muted: var(--portal-surface-muted, #f7f8fb);
    --withdrawal-border: var(--portal-border, #dfe3ea);
    --withdrawal-text: var(--portal-text, #252b3a);
    --withdrawal-text-muted: var(--portal-text-muted, #6f7686);
    background: var(--withdrawal-canvas);
}

body {
    background: var(--withdrawal-canvas);
    color: var(--withdrawal-text);
}

.withdrawal-back,
.withdrawal-eyebrow {
    color: var(--withdrawal-accent);
}

.withdrawal-card::before,
button {
    background: var(--withdrawal-accent);
    color: var(--withdrawal-accent-contrast);
}

button:hover {
    background: var(--withdrawal-accent);
    filter: brightness(0.9);
}

button:disabled {
    filter: none;
}

.submit-withdrawal,
.submit-withdrawal:hover,
.submit-withdrawal:focus,
.submit-withdrawal:active,
.submit-withdrawal:disabled {
    color: #fff;
    -webkit-text-fill-color: #fff;
}

.withdrawal-form button,
.withdrawal-form button:hover,
.withdrawal-form button:focus,
.withdrawal-form button:active,
.withdrawal-form button:disabled {
    color: #fff;
    -webkit-text-fill-color: #fff;
}

.secondary {
    background: var(--withdrawal-surface-muted);
    color: var(--withdrawal-text);
}

.secondary:hover {
    background: color-mix(in srgb, var(--withdrawal-accent) 9%, var(--withdrawal-surface));
    filter: none;
}

.withdrawal-form input:focus,
textarea:focus,
.position-quantity:focus {
    border-color: var(--withdrawal-accent);
    outline-color: color-mix(in srgb, var(--withdrawal-accent) 24%, transparent);
}

.order-card {
    overflow: hidden;
    padding: 0;
    border-color: var(--withdrawal-border);
    background: var(--withdrawal-surface);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.order-card.is-expanded {
    border-color: color-mix(in srgb, var(--withdrawal-accent) 38%, var(--withdrawal-border));
    box-shadow: 0 7px 20px rgba(18, 27, 43, 0.08);
}

.order-header {
    display: block;
}

.order-toggle {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 68px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 52px 14px 20px;
    border-radius: 11px;
    background: var(--withdrawal-surface-muted);
    color: var(--withdrawal-text);
    text-align: left;
}

.order-toggle:hover,
.order-toggle:focus {
    background: color-mix(in srgb, var(--withdrawal-accent) 8%, var(--withdrawal-surface));
    color: var(--withdrawal-text);
    filter: none;
}

.order-toggle:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--withdrawal-accent) 28%, transparent);
    outline-offset: -3px;
}

.order-toggle > span {
    min-width: 0;
}

.order-summary-text {
    flex: 1 1 auto;
}

.order-toggle .order-title,
.order-toggle .order-meta {
    display: block;
}

.order-state-badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 16px;
    white-space: nowrap;
}

.order-state-badge.pending,
.order-state-badge.partial {
    border-color: #efd18d;
    background: #fff4da;
    color: #73510b;
}

.order-state-badge.withdrawn {
    border-color: #b9dec7;
    background: #e7f5ec;
    color: #185c32;
}

.order-state-badge.rejected {
    border-color: #efc0c7;
    background: #fdebed;
    color: #842235;
}

.order-toggle::after {
    position: absolute;
    top: 50%;
    right: 23px;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--withdrawal-accent);
    border-bottom: 2px solid var(--withdrawal-accent);
    content: "";
    transform: translateY(-65%) rotate(45deg);
    transition: transform 160ms ease;
}

.order-toggle[aria-expanded="true"]::after {
    transform: translateY(-30%) rotate(225deg);
}

.order-details {
    padding: 4px 20px 20px;
}

.order-details[hidden] {
    display: none;
}

.order-validation-status {
    margin: 14px 0 0;
}

.order-validation-status.visible + .order-actions {
    margin-top: 12px;
}

.position-control input[type="checkbox"],
.confirmation input {
    accent-color: var(--withdrawal-accent);
}

.withdrawal-embedded {
    background: var(--withdrawal-canvas);
}

.withdrawal-embedded .withdrawal-card {
    background: var(--withdrawal-surface);
}

@media (max-width: 650px) {
    .order-toggle {
        min-height: 62px;
        flex-wrap: wrap;
        padding: 12px 46px 12px 16px;
    }

    .order-state-badge {
        margin-right: 2px;
    }

    .order-toggle::after {
        right: 19px;
    }

    .order-details {
        padding: 2px 16px 18px;
    }
}
