:root {
  --primary: #2867f0;
  --primary-dark: #1f54c7;
  --primary-soft: #edf3ff;
  --page: #f6f8fb;
  --surface: #ffffff;
  --surface-muted: #f1f4f8;
  --text: #172033;
  --text-secondary: #526174;
  --muted: #718096;
  --border: #dfe6ef;
  --border-strong: #c9d5e5;
  --success: #147a55;
  --success-bg: #eaf8f2;
  --warning: #966311;
  --warning-bg: #fff6dc;
  --danger: #b83e48;
  --danger-bg: #fff0f1;
  --shadow-soft: 0 12px 32px rgba(38, 58, 89, .07);
  --shadow-raised: 0 18px 40px rgba(34, 57, 94, .12);
  color: var(--text);
  background: var(--page);
  font: 15px/1.6 Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 132px; }
body { margin: 0; min-width: 320px; background: var(--page); color: var(--text); }
#think_page_trace, #think_page_trace_open { display: none !important; }
button, input, select, textarea { font: inherit; }
button, a, select { touch-action: manipulation; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--primary); }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
:focus-visible { outline: 3px solid rgba(40, 103, 240, .34); outline-offset: 2px; }
.skip-link { position: fixed; left: 16px; top: -64px; z-index: 300; padding: 10px 14px; border-radius: 6px; background: var(--text); color: #fff; text-decoration: none; }
.skip-link:focus { top: 12px; }

.brand { min-width: 0; display: flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; }
.brand-mark, .auth-logo { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 8px; background: var(--primary); color: #fff; font-size: 19px; font-weight: 800; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 18px; line-height: 1.2; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 600; }

.primary-button, .secondary-button, .language-trigger, .icon-button, .text-button { min-height: 44px; border-radius: 7px; font-weight: 650; transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease; }
.primary-button { padding: 0 19px; border: 1px solid var(--primary); background: var(--primary); color: #fff; }
.primary-button:hover:not(:disabled) { border-color: var(--primary-dark); background: var(--primary-dark); box-shadow: 0 8px 18px rgba(40, 103, 240, .2); }
.secondary-button { padding: 0 16px; border: 1px solid var(--border); background: var(--surface); color: var(--text-secondary); }
.secondary-button:hover:not(:disabled) { border-color: #9bb5ef; background: #f4f7ff; color: var(--primary-dark); }
.danger-button { border-color: #efc8cc; background: var(--danger-bg); color: var(--danger); }
.text-button { padding: 0; border: 0; background: transparent; color: var(--primary); }
.icon-button { width: 44px; padding: 0; display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface); color: var(--text-secondary); }
.icon-button:hover:not(:disabled) { border-color: #b7c7dd; background: var(--surface-muted); color: var(--text); }
.icon-button svg, .quick-icon svg, .section-icon svg, .current-plan-icon svg, .device-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.full { width: 100%; }

.app-shell { min-height: 100vh; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .98); box-shadow: 0 1px 0 var(--border); }
.header-main { width: min(100% - 40px, 1180px); min-height: 72px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.header-account { min-width: 0; display: flex; align-items: center; gap: 10px; }
.avatar { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 8px; background: var(--primary-soft); color: var(--primary-dark); font-weight: 800; }
.account-identity { min-width: 0; margin-right: 5px; }
.account-identity strong, .account-identity small, .drawer-account strong, .drawer-account small { display: block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-identity strong { font-size: 13px; line-height: 1.25; }
.account-identity small { margin-top: 2px; color: var(--muted); font-size: 11px; }

.language-menu { position: relative; }
.language-trigger { display: inline-flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--border); background: var(--surface); color: var(--text-secondary); }
.language-trigger:hover, .language-menu.open .language-trigger { border-color: #aebfd7; background: var(--surface-muted); color: var(--text); }
.language-trigger svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.language-trigger .chevron { width: 15px; height: 15px; transition: transform .18s ease; }
.language-menu.open .chevron { transform: rotate(180deg); }
.language-popover { position: absolute; top: calc(100% + 8px); right: 0; z-index: 90; width: 176px; padding: 6px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-raised); }
.language-popover[hidden] { display: none; }
.language-popover button { width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 11px; border: 0; border-radius: 6px; background: transparent; color: var(--text-secondary); text-align: left; }
.language-popover button:hover, .language-popover button:focus-visible { background: var(--primary-soft); color: var(--primary-dark); }
.language-popover button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; opacity: 0; }
.language-popover button[aria-checked="true"] { color: var(--primary-dark); font-weight: 700; }
.language-popover button[aria-checked="true"] svg { opacity: 1; }

.account-nav { border-top: 1px solid #edf1f5; }
.nav-inner { width: min(100% - 40px, 1180px); min-height: 52px; margin: 0 auto; display: flex; align-items: stretch; gap: 6px; }
.nav-link { min-height: 52px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border-bottom: 2px solid transparent; color: var(--text-secondary); text-decoration: none; font-size: 14px; font-weight: 650; }
.nav-link svg { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-link:hover { color: var(--text); background: #f8faff; }
.nav-link.active { border-bottom-color: var(--primary); color: var(--primary-dark); }
.drawer-account, .drawer-actions { display: none; }
.mobile-menu { display: none; }

.main-content { width: min(100% - 40px, 1180px); margin: 0 auto; padding: 30px 0 48px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-heading.compact { margin-bottom: 20px; }
.page-heading h1 { margin: 0; font-size: 27px; line-height: 1.25; letter-spacing: 0; }
.page-heading p:not(.eyebrow) { max-width: 720px; margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.eyebrow { margin: 0 0 7px; color: var(--primary-dark); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.back-link { display: inline-flex; align-items: center; min-height: 36px; margin-bottom: 8px; text-decoration: none; font-weight: 650; }
.panel { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-soft); }

.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.summary-card { position: relative; min-width: 0; min-height: 122px; padding: 17px; overflow: hidden; }
.summary-card::after { content: ""; position: absolute; left: 22px; right: 22px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--primary); opacity: .12; }
.summary-card:nth-child(2)::after { background: var(--success); opacity: .28; }
.summary-card .summary-label { color: var(--muted); font-size: 13px; font-weight: 700; }
.summary-card > strong { display: block; margin-top: 11px; overflow-wrap: anywhere; font-size: 19px; line-height: 1.3; }
.summary-card p { margin: 7px 0 0; color: var(--muted); overflow-wrap: anywhere; }
.section-block { margin-top: 26px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.section-heading h2 { margin: 0; font-size: 17px; line-height: 1.35; }
.section-heading p { margin: 5px 0 0; color: var(--muted); }
.text-link { align-self: center; font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.quick-grid a { min-height: 116px; padding: 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease; }
.quick-grid a:hover, .quick-grid a:focus-visible { border-color: #a8bdee; background: #fbfcff; box-shadow: var(--shadow-soft); }
.quick-icon { width: 32px; height: 32px; display: grid; place-items: center; margin-bottom: 10px; border-radius: 8px; background: var(--primary-soft); color: var(--primary-dark); }
.quick-grid strong, .quick-grid > a > span:last-child { display: block; }
.quick-grid > a > span:last-child { margin-top: 6px; color: var(--muted); }

.table-panel { overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 11px 14px; border-bottom: 1px solid #edf1f5; text-align: left; vertical-align: middle; }
.data-table th { background: #fafbfd; color: var(--text-secondary); font-size: 12px; font-weight: 750; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfcfe; }
.data-table a { font-weight: 700; text-decoration: none; }
.badge { display: inline-flex; align-items: center; gap: 6px; min-height: 27px; padding: 3px 10px; border-radius: 14px; font-size: 12px; font-weight: 750; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.success { background: var(--success-bg); color: var(--success); }
.badge.warning { background: var(--warning-bg); color: var(--warning); }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.info { background: var(--primary-soft); color: var(--primary-dark); }
.empty-state { padding: 52px 20px; color: var(--muted); text-align: center; }
.empty-state strong { display: block; margin-bottom: 5px; color: var(--text); }

.account-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.settings-section, .form-section { padding: 19px; }
.settings-section .section-heading { padding-bottom: 18px; border-bottom: 1px solid #edf1f5; }
.settings-section .section-heading > div { position: relative; padding-left: 48px; }
.section-icon { position: absolute; left: 0; top: 0; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; background: var(--primary-soft); color: var(--primary-dark); }
.section-icon.security { background: var(--success-bg); color: var(--success); }
.settings-form { display: grid; grid-template-columns: minmax(130px, 155px) minmax(0, 1fr); align-items: center; gap: 8px 16px; }
.settings-form label { color: var(--text-secondary); font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid #ccd7e5; border-radius: 7px; background: #fff; color: var(--text); }
input, select { min-height: 44px; padding: 0 12px; }
textarea { min-height: 150px; padding: 12px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #9fb4d0; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); outline: 3px solid rgba(40, 103, 240, .14); outline-offset: 0; }
input[readonly] { background: var(--surface-muted); color: var(--muted); }
.field-help, .field-error, .read-only-note { grid-column: 2; display: block; min-height: 18px; }
.field-help, .read-only-note { color: var(--muted); font-size: 12px; }
.field-error { color: var(--danger); font-size: 12px; }
.form-actions { grid-column: 2; display: flex; justify-content: flex-start; gap: 10px; margin-top: 10px; }
.form-alert { display: none !important; }
.password-control { position: relative; }
.password-control input { padding-right: 50px; }
.password-control button { position: absolute; right: 2px; top: 2px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--muted); }
.password-control button:hover { background: var(--surface-muted); color: var(--primary-dark); }
.password-control svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.activity-list { overflow: hidden; box-shadow: none; }
.activity-item, .device-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 15px; border-bottom: 1px solid #edf1f5; }
.activity-item:last-child, .device-item:last-child { border-bottom: 0; }
.activity-item strong, .activity-item span, .device-item strong, .device-item span { display: block; }
.activity-item span, .device-item span { margin-top: 3px; color: var(--muted); }
.activity-meta, .device-meta { flex: 0 0 auto; color: var(--muted); text-align: right; }
.device-section { margin-top: 0; }
.device-list { display: grid; gap: 10px; }
.device-item { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: none; transition: border-color .18s ease, box-shadow .18s ease; }
.device-item:hover { border-color: var(--border-strong); box-shadow: var(--shadow-soft); }
.device-primary { min-width: 0; display: flex; align-items: center; gap: 13px; }
.device-icon { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border-radius: 8px; background: var(--primary-soft); color: var(--primary-dark); }
.device-meta .badge { margin-left: auto; }

.current-plan { min-height: 124px; padding: 18px; border-color: #bfe2d2; background: #f7fcf9; box-shadow: none; }
.current-plan-content { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.current-plan-copy { min-width: 0; display: flex; align-items: center; gap: 13px; }
.current-plan-icon { width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-items: center; border-radius: 8px; background: var(--success-bg); color: var(--success); }
.current-plan-icon svg { width: 25px; height: 25px; }
.plan-kicker, .plan-label { color: var(--muted); font-size: 12px; font-weight: 750; }
.current-plan-content h2 { margin: 2px 0 0; font-size: 21px; }
.current-plan-content p { margin: 5px 0 0; color: var(--success); font-weight: 650; }
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.plan-card { position: relative; display: flex; flex-direction: column; min-height: 286px; padding: 18px; box-shadow: none; transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease; }
.plan-card.is-actionable { cursor: pointer; }
.plan-card.is-actionable:hover, .plan-card.is-actionable:focus-within { border-color: #8eaceb; background: #fbfcff; box-shadow: var(--shadow-raised); }
.plan-card.is-actionable:active { border-color: var(--primary); background: var(--primary-soft); }
.plan-card.current { border-color: #9eb8ef; background: #f8faff; box-shadow: inset 0 3px 0 var(--primary); }
.plan-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.plan-card h3 { margin: 4px 0 0; font-size: 19px; }
.plan-price { margin-top: 13px; font-size: 26px; font-weight: 800; line-height: 1.25; }
.plan-price small { margin-left: 4px; color: var(--muted); font-size: 13px; font-weight: 550; }
.plan-description { min-height: 48px; margin: 12px 0 0; color: var(--muted); }
.feature-list { margin: 12px 0 17px; padding: 0; list-style: none; }
.feature-list li { position: relative; margin-top: 7px; padding-left: 21px; color: var(--text-secondary); }
.feature-list li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 800; }
.plan-card .primary-button, .plan-card .secondary-button { width: 100%; margin-top: auto; }
.redeem-trigger { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 16px; border-radius: 22px; }
.redeem-trigger svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.filter-bar { display: flex; align-items: center; gap: 11px; margin-bottom: 15px; }
.filter-bar label { font-weight: 700; }
.filter-bar select { width: 190px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.row-actions button, .row-actions a { min-height: 38px; display: inline-flex; align-items: center; padding: 0 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text-secondary); text-decoration: none; font-weight: 650; }
.row-actions button:hover, .row-actions a:hover { border-color: #9bb5ef; color: var(--primary-dark); }
.pagination { min-height: 44px; display: flex; justify-content: center; gap: 7px; margin-top: 20px; }
.pagination button { min-width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 7px; background: #fff; color: var(--text-secondary); }
.pagination button.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.order-detail { padding: 26px; }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 21px; border-bottom: 1px solid var(--border); }
.detail-head h2 { margin: 0; font-size: 22px; }
.detail-head p { margin: 5px 0 0; color: var(--muted); }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding: 23px 0; }
.detail-grid span { display: block; color: var(--muted); }
.detail-grid strong { display: block; margin-top: 5px; overflow-wrap: anywhere; }
.detail-actions { display: flex; gap: 10px; padding-top: 19px; border-top: 1px solid var(--border); }

.modal-root:empty { display: none; }
.modal-root { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 20px; background: rgba(23, 32, 51, .5); }
.modal { width: min(520px, 100%); max-height: min(720px, calc(100vh - 40px)); overflow-y: auto; border-radius: 8px; background: #fff; box-shadow: 0 24px 70px rgba(17, 29, 52, .24); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; font-size: 19px; }
.modal-body { padding: 20px; }
.modal-body p { color: var(--text-secondary); white-space: pre-wrap; overflow-wrap: anywhere; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--border); }
.redeem-modal-body { text-align: center; }
.redeem-modal-icon { width: 58px; height: 58px; margin: 2px auto 13px; display: grid; place-items: center; color: var(--primary); }
.redeem-modal-icon svg { width: 54px; height: 54px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.redeem-modal-hint { margin: 0 auto 18px; color: var(--muted); }
.redeem-modal-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; width: 100%; text-align: left; }
.redeem-modal-form > * { grid-column: 1; }
.redeem-modal-form label { color: var(--text-secondary); font-size: 13px; font-weight: 700; }
.redeem-modal-form input { min-height: 52px; font-size: 16px; }
.redeem-modal-form .field-error { min-height: 18px; }
.toast { position: fixed; z-index: 150; left: 50%; top: 18px; display: inline-flex; align-items: center; gap: 9px; max-width: min(520px, calc(100vw - 32px)); min-height: 44px; padding: 10px 15px; border: 1px solid #b9dfcc; border-radius: 7px; background: #fff; color: var(--success); box-shadow: var(--shadow-raised); opacity: 0; pointer-events: none; transform: translate(-50%, -10px); transition: opacity .18s ease, transform .18s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: #efc8cc; color: var(--danger); }
.toast-icon { display: inline-flex; flex: 0 0 auto; width: 20px; height: 20px; }
.toast-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.toast-message { line-height: 1.45; }
.skeleton { min-height: 110px; overflow: hidden; background: linear-gradient(90deg, #f0f3f7 25%, #f8fafc 45%, #f0f3f7 65%); background-size: 300% 100%; animation: skeleton 1.2s infinite linear; }
.skeleton.rows { min-height: 210px; border: 0; box-shadow: none; }
@keyframes skeleton { to { background-position: -150% 0; } }

.auth-body { min-height: 100vh; display: flex; flex-direction: column; background: var(--page); }
.auth-topbar { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 max(24px, calc((100vw - 1120px) / 2)); border-bottom: 1px solid var(--border); background: #fff; }
.auth-main { flex: 1; min-height: 0; display: grid; place-items: center; padding: 40px 20px; }
.auth-panel { width: min(440px, 100%); padding: 30px; border: 1px solid var(--border); border-radius: 8px; background: #fff; box-shadow: var(--shadow-soft); }
.auth-heading { margin-bottom: 24px; text-align: center; }
.auth-logo { margin: 0 auto 15px; }
.auth-heading h1 { margin: 0; font-size: 25px; }
.auth-heading p { margin: 7px 0 0; color: var(--muted); }
.auth-form { display: flex; flex-direction: column; }
.auth-form > label, .label-row { margin: 12px 0 7px; color: var(--text-secondary); font-weight: 650; }
.label-row { display: flex; justify-content: space-between; gap: 15px; }
.label-row label { font-weight: 650; }
.label-row a { font-weight: 500; text-decoration: none; }
.auth-form .field-error, .auth-form .field-help { min-height: 18px; margin-top: 4px; }
.auth-form .primary-button.full { margin-top: 16px; }
.form-switch { margin: 18px 0 0; color: var(--muted); text-align: center; }
.form-switch a { font-weight: 650; text-decoration: none; }
.notice-box { padding: 13px 14px; border: 1px solid #cbd9f5; border-radius: 7px; background: #f4f7ff; }
.notice-box strong, .notice-box span { display: block; }
.notice-box span { margin-top: 4px; color: var(--text-secondary); overflow-wrap: anywhere; }
.button-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.auth-form [data-send-reset-code] { margin-top: 10px; }
.debug-code { margin-top: 14px; padding: 11px 13px; border: 1px dashed #d5b36c; border-radius: 7px; background: var(--warning-bg); color: var(--warning); text-align: center; }
.auth-form > .text-button { margin-top: 16px; }
.sidebar-scrim { display: none; }
.site-footer{width:min(1180px,calc(100% - 40px));margin:0 auto;padding:24px 0 30px;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:18px;color:#66758a;font-size:14px}.footer-contact{display:flex;align-items:center;gap:16px;min-width:0}.footer-contact-link{display:inline-flex;align-items:center;gap:7px;min-height:40px;padding:0 10px;border:1px solid #dce5f0;border-radius:7px;background:#fff;color:#526f9e;text-decoration:none;white-space:nowrap}.footer-contact-link:hover,.footer-contact-link:focus-visible{border-color:#a9c0ee;background:#f5f8ff;color:#1f54c7;text-decoration:none}.footer-contact-link svg{width:18px;height:18px;flex:0 0 18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.footer-links{display:flex;align-items:center;justify-content:flex-end;gap:8px 18px;flex-wrap:wrap;min-width:0}.site-footer a{color:#526f9e;text-decoration:none}.site-footer a:hover{text-decoration:underline}.footer-copy{justify-self:center;color:#526174;font-size:14px;font-weight:600;white-space:nowrap}.auth-footer{width:min(1080px,calc(100% - 48px));grid-template-columns:minmax(320px,1fr) auto minmax(220px,1fr);padding-top:4px}.auth-footer .footer-links{justify-self:end}

@media (max-width: 980px) {
  html { scroll-padding-top: 76px; }
  .header-main { width: min(100% - 32px, 1180px); }
  .account-identity, .header-account > .avatar, .desktop-action { display: none; }
  .mobile-menu { display: grid; flex: 0 0 44px; }
  .account-nav { position: fixed; inset: 0 auto 0 0; z-index: 80; width: min(320px, calc(100vw - 48px)); display: flex; flex-direction: column; border: 0; background: var(--surface); box-shadow: var(--shadow-raised); transform: translateX(-105%); transition: transform .22s ease; }
  body.menu-open { overflow: hidden; }
  body.menu-open .account-nav { transform: translateX(0); }
  .drawer-account { min-height: 84px; display: flex; align-items: center; gap: 12px; padding: 17px 18px; border-bottom: 1px solid var(--border); }
  .drawer-account > span:last-child { min-width: 0; }
  .drawer-account small { color: var(--muted); font-size: 11px; }
  .nav-inner { width: 100%; min-height: 0; flex: 1; display: block; padding: 12px; overflow-y: auto; }
  .nav-link { width: 100%; min-height: 48px; margin-bottom: 3px; padding: 0 13px; border: 0; border-radius: 7px; }
  .nav-link.active { background: var(--primary-soft); color: var(--primary-dark); }
  .drawer-actions { display: block; padding: 14px 18px 20px; border-top: 1px solid var(--border); }
  .drawer-actions .secondary-button { width: 100%; }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 70; background: rgba(23, 32, 51, .42); }
  body.menu-open .sidebar-scrim { display: block; }
  .main-content { width: min(100% - 32px, 1180px); padding: 26px 0 42px; }
  .summary-grid, .quick-grid { grid-template-columns: 1fr; }
  .account-layout { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-footer{grid-template-columns:1fr auto;gap:12px 24px}.auth-footer .footer-contact{grid-column:1/-1;justify-content:center}.auth-footer .footer-copy{justify-self:start}.auth-footer .footer-links{justify-self:end}
}

@media (max-width: 680px) {
  .header-main { width: calc(100% - 24px); min-height: 66px; gap: 10px; }
  .brand strong { font-size: 16px; }
  .brand small { display: none; }
  .language-trigger { width: 44px; padding: 0; justify-content: center; }
  .language-trigger > span, .language-trigger .chevron { display: none; }
  .language-popover { right: -48px; }
  .main-content { width: calc(100% - 28px); padding: 22px 0 36px; }
  .page-heading { margin-bottom: 18px; }
  .page-heading h1 { font-size: 24px; }
  .page-heading p:not(.eyebrow) { font-size: 13px; }
  .section-heading { align-items: flex-start; flex-wrap: wrap; }
  .plan-grid { grid-template-columns: 1fr; }
  .current-plan-content, .detail-head { align-items: flex-start; flex-direction: column; }
  .current-plan-copy { align-items: flex-start; }
  .settings-section, .form-section, .current-plan, .order-detail { padding: 16px; }
  .settings-form { grid-template-columns: 1fr; gap: 6px; }
  .settings-form label { margin-top: 8px; }
  .field-help, .field-error, .read-only-note, .form-actions { grid-column: 1; }
  .form-actions .primary-button { width: 100%; }
  .activity-item, .device-item { align-items: flex-start; flex-direction: column; gap: 11px; }
  .activity-meta, .device-meta { width: 100%; text-align: left; }
  .device-meta .badge { margin-left: 0; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table thead { display: none; }
  .data-table tr { padding: 13px 15px; border-bottom: 1px solid var(--border); }
  .data-table tr:last-child { border-bottom: 0; }
  .data-table td { display: grid; grid-template-columns: minmax(96px, 36%) 1fr; gap: 10px; padding: 6px 0; border: 0; }
  .data-table td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 650; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .detail-actions, .modal-actions { flex-direction: column-reverse; }
  .detail-actions button, .modal-actions button { width: 100%; }
  .auth-topbar { padding: 0 14px; }
  .auth-panel { padding: 23px 18px; }
  .button-row { grid-template-columns: 1fr; }
  .site-footer,.auth-footer{width:calc(100% - 28px);grid-template-columns:1fr;gap:12px;padding:20px 0 26px;text-align:center}.footer-contact{justify-content:center;flex-wrap:wrap}.footer-links{justify-content:center;line-height:1.7}.footer-copy{justify-self:center;order:-1}
}

@media (max-width: 420px) {
  .detail-grid { grid-template-columns: 1fr; }
  .filter-bar { align-items: stretch; flex-direction: column; }
  .filter-bar select { width: 100%; }
  .current-plan-copy { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
/* VideTool brand icon */
.brand-mark,.auth-logo{overflow:hidden;background:transparent!important}.brand-mark img,.auth-logo img{width:100%;height:100%;display:block;object-fit:contain}
