/* Shared Apple-style surfaces, controls and in-page feedback. */
:root{font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","PingFang SC","Microsoft YaHei",sans-serif;--blue:#007aff;--muted:#6e6e73;--line:rgba(60,60,67,.12);color-scheme:light;background:#f5f5f7}
body,.app-view{background:#f5f5f7;color:#1d1d1f;-webkit-font-smoothing:antialiased}
.sidebar{background:rgba(250,250,252,.94)}.topbar{background:rgba(255,255,255,.85);backdrop-filter:blur(20px)}
.nav-item,.primary,.secondary,.icon-button,.delete-button,.row-delete,.logout-button{transition:background .15s,box-shadow .15s,opacity .15s;transform:none!important}
.nav-item:hover{background:#eaeaef}.nav-item.active{background:#e1edff}.stat-card{box-shadow:0 2px 10px #1d1d1f04}.stat-card.active{border-color:#6daeff;box-shadow:0 0 0 3px #007aff12}
.orders-panel,.account-settings{box-shadow:0 4px 20px #1d1d1f04}.stage-label,.order-sub,.browser-ip,.table-footer{color:#6e6e73}.order-sub,.stage-label{font-size:.875rem}
.primary{background:#007aff;color:#fff;box-shadow:none}.primary:hover{background:#006be0}.secondary{background:#eeeef2;color:#45454a;border:0}.secondary:hover{background:#e3e3e9}
.row-actions{display:flex;justify-content:flex-end;gap:7px;align-items:center}.row-retry{color:#007aff;background:#e7f2ff;min-height:32px;padding:6px 10px;border-radius:10px;font-size:.875rem;font-weight:600;white-space:nowrap}.row-retry:hover{background:#d9eaff}
.delete-button,.row-delete,.logout-button{color:#d83229;background:#fff0ef}.delete-button:hover,.row-delete:hover,.logout-button:hover{background:#ffe2df}
button:focus-visible,a:focus-visible{outline:3px solid #007aff66;outline-offset:3px}input[aria-invalid="true"],textarea[aria-invalid="true"]{border-color:#e54840;box-shadow:0 0 0 3px #ff3b3010}
.form-error,.inline-error{color:#c9342d;font-size:.875rem}.inline-error{background:#fff2f0;border-radius:10px;margin:10px 12px 0}.form-error:empty{min-height:0;margin:0}.form-error:not(:empty){margin:12px 0 4px;line-height:1.6}
[data-help]{position:relative}[data-help]:hover::after,[data-help]:focus-visible::after{content:attr(data-help);position:absolute;top:calc(100% + 8px);left:50%;transform:translateX(-50%);padding:7px 10px;border:1px solid #e5e5ea;border-radius:8px;background:#fff;color:#45454a;box-shadow:0 4px 14px #0001;font-size:.875rem;font-weight:400;white-space:nowrap;z-index:5}
dialog{border:1px solid #ffffffc0;background:#fff;color:#1d1d1f;border-radius:22px;box-shadow:0 24px 90px #0003,0 2px 12px #0000000a;max-height:calc(100dvh - 32px)}
dialog::backdrop{background:#1d1d1f38;backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px)}.modal-heading{border-bottom-color:var(--line)}.modal-footer{background:#fff}.modal-footer .secondary{color:#45454a}.modal-heading .icon-button{background:#f0f0f3;color:#6e6e73;border-radius:50%;width:28px;height:28px}.modal-heading .icon-button svg{width:16px;height:16px}
.confirm-modal{width:360px;border-radius:22px;background:rgba(253,253,255,.97);padding:0;overflow:hidden}.confirm-content{padding:26px 26px 21px;text-align:center}.confirm-symbol{display:grid;place-items:center;width:44px;height:44px;margin:0 auto 15px;border-radius:14px;background:#e8f2ff;color:#007aff}.confirm-symbol svg{width:25px;height:25px;stroke-width:1.6}.destructive .confirm-symbol{background:#fff0ee;color:#df382f}.confirm-content h2{font-size:1.125rem;letter-spacing:-.02em;font-weight:650;line-height:1.45}.confirm-content p{font-size:.875rem;line-height:1.65;color:#6e6e73;margin-top:9px;white-space:pre-line;overflow-wrap:anywhere}.confirm-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:0 22px 22px}.confirm-actions button{min-height:40px;border-radius:11px;font-size:.9375rem;font-weight:600}.confirm-actions .danger{background:#ff3b30;color:#fff}.confirm-actions .danger:hover{background:#e92e24}
#toast{bottom:24px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:10px;max-width:min(520px,calc(100vw - 32px));width:max-content;padding:13px 13px 13px 16px;border:1px solid #ffffffd9;border-radius:16px;background:rgba(252,252,254,.96);backdrop-filter:blur(20px);color:#1d1d1f;box-shadow:0 8px 36px #0000001f;font-size:.875rem;line-height:1.6;z-index:1000}#toast>span:first-child{color:#007aff;flex-shrink:0}#toast-message{overflow-wrap:anywhere}#dismiss-toast{border:0;background:transparent;color:#86868b;display:grid;place-items:center;width:28px;height:28px;border-radius:50%;padding:5px;flex-shrink:0}#dismiss-toast:hover{background:#e8e8ed}#dismiss-toast svg{width:15px;height:15px}
.login-view{min-height:100dvh;display:flex;align-items:center;justify-content:center;background:radial-gradient(ellipse at 50% 0,#e8f0ff80,transparent 58%),#f5f5f7;padding:28px 18px}.login-story{display:none}.login-form-wrap{min-height:0;display:block;padding:32px;max-width:410px;width:100%;background:#fff;border:1px solid #e5e5ea;border-radius:24px;box-shadow:0 12px 50px #1d1d1f08}.login-form-inner{width:100%}.mobile-brand{display:block;position:static;text-align:center;color:#1d1d1f;font-size:1.6rem;font-weight:700;letter-spacing:-.05em;margin:3px 0 26px}.section-kicker,.login-form-inner>.muted,.login-note,.login-footer{display:none}.login-form-inner h2{text-align:center;font-size:1.125rem;font-weight:600;margin:0 0 25px;letter-spacing:0}.login-form-inner label{font-size:.875rem;color:#45454a;margin-top:18px}.input-with-icon input{background:#f9f9fb;border-color:#dedee3;border-radius:12px;height:46px;font-size:.9375rem}.login-submit{margin-top:22px;height:44px;border-radius:12px;font-size:.9375rem}.login-form-inner .form-error{margin-top:12px}.account-field input{background:#f9f9fb}.account-actions{gap:12px}
@media(max-width:760px){.login-form-wrap{padding:27px 24px}.confirm-modal{max-width:calc(100vw - 36px)}#toast{bottom:18px}.order-sub,.stage-label{font-size:.875rem}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

#esim-export-modal{width:720px;max-width:calc(100vw - 32px);padding:0}#esim-export-text{width:100%;min-height:240px;resize:vertical;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:13px;line-height:1.65;overflow-wrap:anywhere;white-space:pre-wrap;background:#f5f5f7;border:1px solid #dedee3;border-radius:12px;padding:14px}.esim-message{font-size:12px;color:#6e6e73;margin-top:5px}.esim-message.ready{color:#169b70}.esim-message.error{color:#c9342d}.row-actions button:disabled{opacity:.55;cursor:default}

#order-plan{width:100%;height:42px;padding:0 12px;border:1px solid #dedee3;border-radius:11px;background:#f5f5f7;font:inherit;color:#1d1d1f;margin:8px 0}.plan-details{font-size:12px;line-height:1.8;color:#6e6e73;margin:3px 0 18px;padding:10px 12px;border-radius:11px;background:#f5f5f7}.plan-price-note{margin-top:5px;color:#86868b}.order-plan-name{font-size:12px;color:#6e6e73;margin-top:5px}

.plan-picker{position:relative;margin:8px 0}#plan-toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:44px;padding:11px 13px;border:1px solid #dedee3;border-radius:12px;background:#f5f5f7;color:#1d1d1f;text-align:left;font:inherit;font-size:14px}#plan-options{position:absolute;top:calc(100% + 6px);left:0;right:0;max-height:340px;overflow:auto;z-index:6;border:1px solid #dedee3;border-radius:14px;background:#fff;box-shadow:0 12px 35px #0002;padding:5px;scrollbar-width:thin}.plan-option{display:block;width:100%;text-align:left;background:#fff;color:#1d1d1f;border:0;border-radius:10px;padding:12px;cursor:pointer}.plan-option:hover,.plan-option:focus-visible{background:#f5f5f7;outline-offset:-3px}.plan-option[aria-selected="true"]{background:#edf4ff}.plan-option-heading{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;font-size:13px;line-height:1.55}.plan-option-price{white-space:nowrap;color:#007aff}.plan-option-details{display:block;color:#6e6e73;font-size:12px;line-height:1.8;margin-top:6px}.plan-option-details>span{display:block}.plan-option-details>span:before{content:"✓";color:#20a77b;margin-right:7px}#order-modal label[for="order-plan"]{margin-bottom:0}@media(max-width:480px){.plan-option-heading{font-size:12px;gap:8px}#plan-options{max-height:300px}}

.is-loading::before{content:"";display:inline-block;width:11px;height:11px;border:1.5px solid currentColor;border-right-color:transparent;border-radius:50%;margin-right:6px;vertical-align:-1px;animation:busy-spin .8s linear infinite}.refresh-busy svg{animation:busy-spin .8s linear infinite}@keyframes busy-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.is-loading::before,.refresh-busy svg{animation:none}}
