/* EVO TrustGuard — page-profile.css
 *
 * Owned by:    profile.html
 * Category:    portal feature page
 * Cascade:     tokens → base → utilities → components → portal-chrome → shared → shared-themes → page
 * Edit policy: rules unique to this page only. Anything used by 5+
 *              pages should be promoted to /css/components.css or
 *              /css/portal-chrome.css with a /css/AGENTS.md update.
 *
 * Extracted:   1 <style> block(s), 200 lines.
 * Method:      verbatim move — no token substitution applied yet.
 *              See C56 audit Section 10.A for the deferred token
 *              normalization sprint plan.
 */

  body { font-family: var(--font-sans); background: var(--bg); color: var(--dark); line-height: var(--leading-relaxed); min-height: 100vh; display: flex; flex-direction: column; padding-bottom: var(--space-6); }

  /* TOP BAR */
  .top-bar { background: var(--white); border-bottom: 0.5px solid var(--border); padding: calc(12px + env(safe-area-inset-top)) 16px 12px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: var(--z-nav); }
  .top-bar-back { background: none; border: none; padding: var(--space-1-5); cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--dark); min-width: 36px; min-height: 36px; }
  .top-bar-back svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; }
  .top-bar-title { font-family: var(--font-sans); font-size: var(--text-input); font-weight: var(--weight-semibold); color: var(--dark); }
  .nav-avatar { width: 44px; height: 44px; min-width: 44px; min-height: 44px; max-width: 44px; max-height: 44px; flex: 0 0 44px; border-radius: 10px; background: var(--dark); color: var(--white); display: flex; align-items: center; justify-content: center; overflow: hidden; text-decoration: none; font-size: var(--text-input); font-weight: var(--weight-bold); flex-shrink: 0; }
  .nav-avatar img { width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: cover; display: block; }

  /* PAGE WRAP */
  .page { max-width: 640px; margin: 0 auto; width: 100%; padding: var(--space-4) var(--space-4) var(--space-10); display: flex; flex-direction: column; gap: var(--space-3-5); }

  /* CARD */
  .card { background: var(--white); border-radius: var(--radius-lg); padding: 0; box-shadow: 0 1px 4px rgba(0,0,0,0.05); overflow: hidden; }
  .card-head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) var(--space-4-5) 0; }
  .card-head h2 { font-family: var(--font-sans); font-size: var(--text-md); font-weight: var(--weight-bold); text-transform: uppercase; letter-spacing: var(--tracking-wider); color: var(--light); }
  .card-head-btn { background: none; border: none; color: var(--status-pending-hover); font-size: var(--text-md); font-weight: var(--weight-semibold); cursor: pointer; padding: var(--space-1) 0; font-family: var(--font-sans); text-decoration: none; }
  .card-head-btn:hover { text-decoration: underline; }
  .card-body { padding: var(--space-3-5) var(--space-4-5) var(--space-4-5); }
  .services-helper { font-size: var(--text-sm); color: var(--text-faint); padding: var(--space-1-5) var(--space-4-5) 0; }

  /* COMPANY CARD */
  .company-row { display: flex; align-items: center; gap: var(--space-3-5); margin-bottom: var(--space-3-5); }
  .company-logo { width: 84px; height: 84px; border-radius: var(--radius-xl); background: var(--dark); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: var(--weight-bold); flex-shrink: 0; overflow: hidden; }
  .company-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .company-info { flex: 1; min-width: 0; }
  .company-name { font-size: var(--text-input); font-weight: var(--weight-bold); color: var(--dark); line-height: var(--leading-snug); }
  .company-meta { font-size: var(--text-sm); color: var(--light); margin-top: var(--space-0-5); }
  .progress-wrap { margin-top: var(--space-3-5); }
  .progress-label { display: flex; justify-content: space-between; font-size: var(--text-xs); color: var(--light); margin-bottom: 5px; font-weight: var(--weight-medium); }
  .progress-track { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
  .progress-fill { height: 100%; background: var(--status-active); border-radius: 3px; transition: width 0.3s ease; }

  .profile-details { padding-top: var(--space-3-5); border-top: 1px solid var(--border); margin-top: var(--space-3-5); display: flex; flex-direction: column; gap: var(--space-2-5); }
  .profile-detail-row { font-size: var(--text-md); color: var(--mid); }
  .profile-detail-row .label { font-weight: var(--weight-semibold); color: var(--dark); display: block; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--light); margin-bottom: var(--space-0-5); }
  .profile-detail-row a { color: var(--status-pending-hover); text-decoration: none; word-break: break-all; }
  .profile-detail-row a:hover { text-decoration: underline; }

  /* BADGES */
  .badge-row { display: flex; flex-wrap: wrap; gap: var(--space-1-5); margin-bottom: var(--space-3); }
  .badge { display: inline-flex; align-items: center; font-size: var(--text-xs); font-weight: var(--weight-semibold); padding: var(--space-1) var(--space-2-5) var(--space-1) var(--space-2); border-radius: 5px; letter-spacing: 0.1px; background: #2d2d2d; color: var(--white); border-left: 6px solid transparent; }
  .badge-armed       { border-left-color: var(--amber); }
  .badge-unarmed     { border-left-color: var(--status-pending-hover); }
  .badge-uniformed   { border-left-color: var(--status-active); }
  .badge-plain       { border-left-color: var(--purple); }
  .badge-service     { border-left-color: var(--red); }
  .badge-immediate   { border-left-color: var(--status-active); }

  .section-label { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--light); font-weight: var(--weight-semibold); margin-bottom: var(--space-2); }
  .section + .section { margin-top: var(--space-3-5); }

  /* CHIPS */
  .chip-row { display: flex; flex-wrap: wrap; gap: var(--space-1-5); }
  .chip { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: var(--radius-xl); background: var(--surface-light); color: var(--mid); font-size: var(--text-sm); font-weight: var(--weight-medium); border: 1px solid var(--status-inactive-wash); }

  .nationwide-indicator { display: flex; align-items: center; justify-content: space-between; padding: var(--space-2-5) var(--space-3-5); background: var(--surface-light); border: 1px solid var(--border); border-radius: var(--radius-md); margin-top: var(--space-2-5); font-size: var(--text-md); color: var(--dark); font-weight: var(--weight-medium); }
  .nationwide-dot { width: 8px; height: 8px; border-radius: 50%; background: #cbcbcb; }
  .nationwide-dot.on { background: var(--status-active); }

  /* DOCUMENT ROWS */
  .doc-row { display: flex; align-items: center; justify-content: space-between; padding: var(--space-3) 0; border-bottom: 1px solid var(--border); gap: var(--space-2-5); }
  .doc-row:last-child { border-bottom: none; }
  .doc-info { flex: 1; min-width: 0; }
  .doc-name { font-size: var(--text-base); font-weight: var(--weight-semibold); color: var(--dark); }
  .doc-meta { font-size: var(--text-xs); color: var(--light); margin-top: var(--space-0-5); }
  .doc-pill { display: inline-flex; align-items: center; font-size: var(--text-xs); font-weight: var(--weight-semibold); padding: 3px 10px; border-radius: var(--radius-lg); flex-shrink: 0; }
  .doc-pill.current   { background: #e6f5eb; color: var(--status-active-hover); }
  .doc-pill.expiring  { background: #fef3c7; color: #92400e; }
  .doc-pill.missing   { background: var(--surface-light); color: #6b7280; }
  .doc-actions { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }
  .doc-action { background: none; border: 1px solid var(--border); border-radius: 6px; padding: var(--space-1-5) var(--space-3); font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--dark); cursor: pointer; font-family: var(--font-sans); text-decoration: none; display: inline-flex; align-items: center; }
  .doc-action:hover { border-color: var(--border-strong); background: var(--surface-light); }
  .doc-action.primary { color: var(--red); border-color: var(--red); }
  .doc-action.danger { color: var(--red); border-color: var(--red); }
  .doc-action.danger:hover { background: var(--red); color: var(--white); }
  .doc-action:disabled { opacity: 0.5; cursor: not-allowed; }

  /* VAULT — custom document section (below the 4 fixed slots) */
  .vault-section-divider { height: 1px; background: var(--border); margin: 16px -18px 14px; }
  .vault-subhead { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--light); font-weight: var(--weight-bold); margin-bottom: var(--space-2); }
  .vault-custom-empty { font-size: var(--text-md); color: var(--light); padding: var(--space-2-5) 0 var(--space-0-5); }
  .vault-add-btn { display: inline-flex; align-items: center; gap: var(--space-1-5); margin-top: var(--space-3); padding: 9px 14px; border-radius: var(--radius-md); background: transparent; color: var(--red); border: 1.5px dashed var(--red); font-family: var(--font-sans); font-size: var(--text-md); font-weight: var(--weight-semibold); cursor: pointer; transition: background 0.15s; }
  .vault-add-btn:hover { background: rgba(179, 18, 23, 0.08); }
  .vault-add-btn svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
  [data-theme="dark"] .vault-section-divider { background: var(--border); }
  [data-theme="dark"] .vault-subhead { color: var(--text-muted); }
  [data-theme="dark"] .vault-custom-empty { color: var(--text-muted); }

  /* PUSH BANNER */
  .push-banner { background: #1a1a2e; color: var(--white); border-radius: 10px; padding: var(--space-4) var(--space-4-5); display: flex; align-items: center; gap: var(--space-3-5); margin-bottom: var(--space-3-5); }
  .push-banner svg { width: 28px; height: 28px; stroke: var(--white); stroke-width: 1.8; fill: none; flex-shrink: 0; }
  .push-banner-text { flex: 1; min-width: 0; }
  .push-banner-title { font-size: var(--text-base); font-weight: var(--weight-bold); color: var(--white); }
  .push-banner-sub { font-size: var(--text-sm); color: #c0c0d0; margin-top: var(--space-0-5); }
  .push-banner-btn { background: var(--status-active); color: var(--white); border: none; padding: var(--space-2) var(--space-4); border-radius: var(--radius-md); font-weight: var(--weight-bold); font-size: var(--text-md); cursor: pointer; font-family: var(--font-sans); flex-shrink: 0; }
  .push-banner-btn:hover { background: var(--status-active-hover); }
  .push-banner-btn:disabled { opacity: 0.6; cursor: default; }

  .push-enabled { background: #e6f5eb; color: var(--status-active-hover); border-radius: 10px; padding: var(--space-3-5) var(--space-4-5); display: flex; align-items: center; gap: var(--space-2-5); font-size: var(--text-md); font-weight: var(--weight-semibold); margin-bottom: var(--space-3-5); }
  .push-enabled svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; flex-shrink: 0; }
  .push-enabled-text { flex: 1; min-width: 0; }
  .push-disable-btn { background: none; border: 1px solid var(--status-active-hover); color: var(--status-active-hover); padding: var(--space-1-5) var(--space-3); border-radius: 6px; font-weight: var(--weight-bold); font-size: var(--text-sm); cursor: pointer; font-family: var(--font-sans); flex-shrink: 0; }
  .push-disable-btn:hover { background: var(--status-active-hover); color: var(--white); }
  .push-disable-btn:disabled { opacity: 0.6; cursor: default; }

  .notif-group-title { font-size: var(--text-sm); text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--light); font-weight: var(--weight-semibold); margin: var(--space-3-5) 0 var(--space-1-5); }
  .notif-row { display: flex; align-items: center; justify-content: space-between; padding: var(--space-3) 0; border-bottom: 1px solid var(--border); }
  .notif-row:last-child { border-bottom: none; }
  .notif-label { font-size: var(--text-base); color: var(--dark); font-weight: var(--weight-medium); }
  .notif-sub { font-size: var(--text-xs); color: var(--light); margin-top: var(--space-0-5); }

  /* TOGGLE */
  .toggle { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
  .toggle input { opacity: 0; width: 0; height: 0; }
  .toggle-track { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: var(--border); border-radius: var(--radius-lg); cursor: pointer; transition: background 0.2s; }
  .toggle-track::after { content: ''; position: absolute; width: 18px; height: 18px; background: var(--white); border-radius: 50%; top: 3px; left: 3px; transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
  .toggle input:checked + .toggle-track { background: var(--red); }
  .toggle input:checked + .toggle-track::after { transform: translateX(20px); }

  /* QUOTE & CONTRACT CARD */
  .quote-field { margin-bottom: var(--space-3-5); }
  .quote-field:last-of-type { margin-bottom: 0; }
  .quote-field label { display: block; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--light); font-weight: var(--weight-semibold); margin-bottom: var(--space-1-5); }
  .quote-field textarea { width: 100%; min-height: 90px; border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-2-5) var(--space-3); font-family: var(--font-sans); font-size: var(--text-input); color: var(--dark); resize: vertical; box-sizing: border-box; line-height: var(--leading-relaxed); }
  .quote-field textarea:focus { outline: none; border-color: var(--red); }
  .quote-save-btn { display: flex; align-items: center; justify-content: center; width: 100%; padding: var(--space-3-5); border-radius: 100px; font-family: var(--font-sans); font-size: var(--text-lg); font-weight: var(--weight-semibold); cursor: pointer; transition: background 0.15s; border: none; background: var(--red); color: var(--white); margin-top: var(--space-4); }
  .quote-save-btn:hover { background: var(--red-hover); }
  .quote-save-btn:disabled { opacity: 0.6; cursor: not-allowed; }

  /* ACCOUNT CARD */
  .account-row { display: flex; align-items: center; justify-content: space-between; padding: var(--space-3) 0; border-bottom: 1px solid var(--border); gap: var(--space-2-5); }
  .account-row:last-child { border-bottom: none; }
  .account-label { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--light); font-weight: var(--weight-semibold); }
  .account-value { font-size: var(--text-base); color: var(--dark); font-weight: var(--weight-medium); }
  .account-row-link { text-decoration: none; color: inherit; display: flex; align-items: center; justify-content: space-between; gap: var(--space-2-5); padding: var(--space-3) 0; border-bottom: 1px solid var(--border); cursor: pointer; }
  .account-row-link:last-child { border-bottom: none; }
  .account-row-link:hover { background: transparent; }
  .chevron { width: 14px; height: 14px; stroke: var(--light); stroke-width: 2; fill: none; flex-shrink: 0; }
  .signout-btn { display: block; width: 100%; background: none; border: none; color: var(--red); padding: var(--space-4) 0 var(--space-1); font-size: var(--text-base); font-weight: var(--weight-bold); font-family: var(--font-sans); cursor: pointer; text-align: center; }
  .signout-btn:hover { text-decoration: underline; }

  /* LOADING */
  .loading { padding: 60px 20px; text-align: center; color: var(--light); font-size: var(--text-base); }

  /* BOTTOM SHEET — constrained to the portal content column so the sheet
     aligns with the rest of the page instead of hanging off the sides. */
  .sheet-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 200; }
  .sheet-backdrop.open { display: block; }
  .sheet { display: none; position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 640px; background: var(--white); border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding: var(--space-5) var(--space-5) var(--space-7); z-index: 201; max-height: 90vh; overflow-y: auto; }
  .sheet.open { display: block; }
  .sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-4); }
  .sheet-title { font-size: var(--text-input); font-weight: var(--weight-bold); color: var(--dark); }
  .sheet-close { background: none; border: none; font-size: var(--text-3xl); line-height: 1; color: var(--light); cursor: pointer; padding: 0 var(--space-1); }
  .sheet-field { margin-bottom: var(--space-3-5); }
  .sheet-field label { display: block; font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--mid); margin-bottom: 5px; text-transform: uppercase; letter-spacing: var(--tracking-wide); }
  .sheet-field input, .sheet-field select { width: 100%; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-md); font-family: var(--font-sans); font-size: var(--text-lg); color: var(--dark); background: var(--white); outline: none; }
  .sheet-field input:focus, .sheet-field select:focus { border-color: var(--red); }
  .sheet-err { color: var(--red); font-size: var(--text-md); margin-bottom: var(--space-2-5); display: none; }
  .sheet-btn { display: block; width: 100%; background: var(--red); color: var(--white); border: none; padding: 13px 20px; border-radius: 100px; font-family: var(--font-sans); font-size: var(--text-lg); font-weight: var(--weight-bold); cursor: pointer; margin-top: var(--space-1); }
  .sheet-btn:disabled { opacity: 0.6; cursor: default; }
  .sheet-btn.secondary { background: none; color: var(--light); margin-top: var(--space-1-5); font-weight: var(--weight-medium); }

  /* CLIENT INVOICING card — Stripe Connect Standard (SYSTEM A) */
  .inv-card-sub { font-size: var(--text-md); color: var(--mid); margin: var(--space-0-5) 0 var(--space-3-5); line-height: var(--leading-relaxed); }
  .inv-connect-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); padding: 11px 18px; border-radius: var(--radius-md); background: #635BFF; color: var(--white); border: none; font-family: var(--font-sans); font-size: var(--text-base); font-weight: var(--weight-semibold); cursor: pointer; transition: background 0.15s; }
  .inv-connect-btn:hover { background: #5146e6; }
  .inv-connect-btn:disabled { opacity: 0.6; cursor: default; }
  .inv-connect-caption { font-size: var(--text-sm); color: var(--light); margin-top: var(--space-2); }
  .inv-paypal-slot { margin-top: var(--space-2-5); font-size: var(--text-sm); color: var(--light); font-style: italic; }
  .inv-status-row { display: flex; align-items: center; gap: var(--space-2-5); margin-bottom: var(--space-2); }
  .inv-status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--status-active); flex-shrink: 0; }
  .inv-status-dot.error { background: var(--danger); }
  .inv-status-dot.off { background: var(--text-dim); }
  .inv-status-label { font-size: var(--text-base); font-weight: var(--weight-bold); color: var(--dark); }
  .inv-status-meta { font-size: var(--text-sm); color: var(--mid); margin-bottom: var(--space-3-5); line-height: var(--leading-relaxed); }
  .inv-action-row { display: flex; flex-wrap: wrap; gap: var(--space-2-5); }
  .inv-link-btn { display: inline-flex; align-items: center; gap: var(--space-1-5); padding: 9px 14px; border-radius: var(--radius-md); border: 1.5px solid var(--border); background: transparent; color: var(--dark); text-decoration: none; font-family: var(--font-sans); font-size: var(--text-md); font-weight: var(--weight-semibold); cursor: pointer; transition: border-color 0.15s, color 0.15s; }
  .inv-link-btn:hover { border-color: var(--mid); color: var(--dark); }
  .inv-link-btn.danger { color: var(--red); border-color: var(--red); }
  .inv-link-btn.danger:hover { background: var(--red); color: var(--white); }
  [data-theme="dark"] .inv-link-btn { color: var(--text); border-color: var(--border); }
  [data-theme="dark"] .inv-link-btn:hover { color: var(--text); border-color: var(--text-muted); }
  [data-theme="dark"] .inv-link-btn.danger { color: var(--red); border-color: var(--red); }
  [data-theme="dark"] .inv-link-btn.danger:hover { color: var(--white); background: var(--red); }
  .inv-flash { padding: var(--space-2-5) var(--space-3-5); border-radius: var(--radius-md); font-size: var(--text-md); margin-bottom: var(--space-3-5); line-height: var(--leading-normal); }
  .inv-flash.success { background: rgba(34, 197, 94, 0.12); color: var(--status-active-hover); }
  .inv-flash.error { background: rgba(239, 68, 68, 0.1); color: var(--danger-strong); }
  [data-theme="dark"] .inv-flash.success { color: #86efac; }
  [data-theme="dark"] .inv-flash.error { color: #fca5a5; }

  /* SUBSCRIPTION CARD (LOCKED C61 — 1C UI surfaces) */
  .sub-plan-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); flex-wrap: wrap; }
  .sub-plan-name { font-size: var(--text-input); font-weight: var(--weight-bold); color: var(--dark); }
  .sub-plan-meta { font-size: var(--text-sm); color: var(--light); margin-bottom: var(--space-3); line-height: var(--leading-relaxed); }
  .sub-actions-row { display: flex; flex-wrap: wrap; gap: var(--space-2-5); margin-top: var(--space-3-5); padding-top: var(--space-3-5); border-top: 1px solid var(--border); }
  .sub-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1-5); padding: 9px 16px; border-radius: var(--radius-md); border: 1.5px solid var(--border); background: transparent; color: var(--dark); font-family: var(--font-sans); font-size: var(--text-md); font-weight: var(--weight-semibold); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
  .sub-btn:hover { border-color: var(--mid); }
  .sub-btn:disabled { opacity: 0.6; cursor: default; }
  .sub-btn.primary { background: var(--red); color: var(--white); border-color: var(--red); }
  .sub-btn.primary:hover { background: var(--red-hover); border-color: var(--red-hover); }
  .sub-btn.danger { color: var(--red); border-color: var(--red); }
  .sub-btn.danger:hover { background: var(--red); color: var(--white); }
  [data-theme="dark"] .sub-btn { color: var(--text); border-color: var(--border); }
  [data-theme="dark"] .sub-btn:hover { border-color: var(--text-muted); }
  [data-theme="dark"] .sub-btn.danger { color: var(--red); border-color: var(--red); }
  [data-theme="dark"] .sub-btn.danger:hover { color: var(--white); background: var(--red); }
  [data-theme="dark"] .sub-btn.primary { color: var(--white); }

  .sub-section-divider { height: 1px; background: var(--border); margin: var(--space-4) 0; }
  .sub-section-title { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--light); font-weight: var(--weight-semibold); margin-bottom: var(--space-2); }
  .sub-history-loading, .sub-history-empty { font-size: var(--text-sm); color: var(--light); padding: var(--space-2) 0; }
  .sub-history-row { display: flex; align-items: center; justify-content: space-between; padding: var(--space-2-5) 0; border-bottom: 1px solid var(--border); gap: var(--space-2-5); }
  .sub-history-row:last-child { border-bottom: none; }
  .sub-history-date { font-size: var(--text-md); color: var(--dark); font-weight: var(--weight-medium); flex-shrink: 0; min-width: 110px; }
  .sub-history-amount { font-size: var(--text-md); color: var(--mid); flex: 1; text-align: right; font-variant-numeric: tabular-nums; }
  .sub-history-link { font-size: var(--text-sm); color: var(--status-pending-hover); text-decoration: none; font-weight: var(--weight-semibold); flex-shrink: 0; }
  .sub-history-link:hover { text-decoration: underline; }
  [data-theme="dark"] .sub-history-link { color: var(--status-pending); }

  .sub-card-element { width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-md); background: var(--white); transition: border-color 0.15s; min-height: 44px; margin-top: var(--space-2); }
  .sub-card-element.StripeElement--focus { border-color: var(--red); }
  .sub-card-element.StripeElement--invalid { border-color: var(--danger); }
  [data-theme="dark"] .sub-card-element { background: var(--surface); border-color: var(--border); }
  .sub-card-errors { color: var(--red); font-size: var(--text-sm); margin-top: var(--space-1-5); min-height: 1em; }
  .sub-reactivate-form { padding: var(--space-3-5) 0 0; }

  /* CANCEL CONFIRMATION MODAL */
  .sub-modal-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 400; }
  .sub-modal-backdrop.open { display: block; }
  .sub-modal { display: none; position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: calc(100% - 32px); max-width: 480px; background: var(--white); border-radius: var(--radius-lg); padding: var(--space-5) var(--space-5) var(--space-4); z-index: 401; box-shadow: var(--shadow-xl); max-height: 90vh; overflow-y: auto; }
  .sub-modal.open { display: block; }
  [data-theme="dark"] .sub-modal { background: var(--surface); }
  .sub-modal-title { font-family: var(--font-serif); font-size: var(--text-2xl); color: var(--dark); margin-bottom: var(--space-2); }
  .sub-modal-body { font-size: var(--text-md); color: var(--mid); line-height: var(--leading-relaxed); margin-bottom: var(--space-4); }
  .sub-modal-field { margin-bottom: var(--space-3-5); }
  .sub-modal-field label { display: block; font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--mid); margin-bottom: 5px; text-transform: uppercase; letter-spacing: var(--tracking-wide); }
  .sub-modal-field select, .sub-modal-field textarea { width: 100%; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-md); font-family: var(--font-sans); font-size: var(--text-md); color: var(--dark); background: var(--white); outline: none; box-sizing: border-box; }
  .sub-modal-field textarea { min-height: 70px; resize: vertical; line-height: var(--leading-relaxed); }
  .sub-modal-field select:focus, .sub-modal-field textarea:focus { border-color: var(--red); }
  [data-theme="dark"] .sub-modal-field select, [data-theme="dark"] .sub-modal-field textarea { background: var(--surface-elevated); color: var(--text); border-color: var(--border); }
  .sub-modal-actions { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-3-5); }
  .sub-modal-err { color: var(--red); font-size: var(--text-sm); margin-bottom: var(--space-2); display: none; }

  /* TOAST */
  .toast { position: fixed; left: 50%; bottom: var(--space-6); transform: translateX(-50%); background: var(--dark); color: var(--white); padding: var(--space-3) var(--space-5); border-radius: 10px; font-size: var(--text-md); font-weight: var(--weight-medium); z-index: 300; box-shadow: 0 4px 20px rgba(0,0,0,0.25); display: none; }
  .toast.show { display: block; }

  @media (max-width: 380px) {
    .push-banner { flex-wrap: wrap; }
    .push-banner-text { flex-basis: 100%; }
  }
