/* DHH · Ocean / editorial interface system. No remote fonts or animation runtime. */
:root {
  --primary: #007e96; --primary-dark: #00677c; --primary-light: #eaf5f6;
  --bg: #f6f8f9; --text: #102b3f; --text-muted: #536a7b; --border: #dce5e9;
  --radius: 12px; --shadow: 0 4px 20px rgba(16,43,63,.035);
  --font-ui: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
html { scroll-padding-top: 96px; }
body { background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.65; }
body::before, body::after { display: none; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:where(a,button,input,select,textarea,summary):focus-visible { outline: 3px solid #007e96; outline-offset: 4px; }
body input:focus, body select:focus, body textarea:focus { border-color: #007e96; box-shadow: 0 0 0 3px #007e9614; }
body .btn { min-height: 42px; padding: 10px 18px; border-radius: 9px; background: #007e96; box-shadow: none; font-size: 14px; font-weight: 650; transition: background .18s, border-color .18s, transform .18s; }
body .btn:hover:not(:disabled) { background: #00677c; box-shadow: none; transform: translateY(-1px); }
body .btn:active:not(:disabled) { transform: translateY(0); }
body .btn.ghost { background: #fff; border: 1px solid #cbdce2; color: #00677c; box-shadow: none; }
body .btn.ghost:hover:not(:disabled) { background: #edf5f6; border-color: #007e96; }
body .btn.danger { color: #b42331; border-color: #efc9cc; }
body .btn:disabled { cursor: not-allowed; transform: none; box-shadow: none; opacity: .55; }
.skip-link { position: fixed; z-index: 500; top: -80px; left: 20px; background: #102b3f; color: #fff; padding: 12px 20px; border-radius: 6px; }
.skip-link:focus { top: 12px; }
body .topbar { min-height: 80px; padding: 16px max(28px, calc((100vw - 1440px)/2)); gap: 32px; background: rgba(255,255,255,.97); border-bottom: 1px solid #dce5e9; box-shadow: none; }
body .brand-logo { width: 42px; height: 42px; filter: none; }
body .brand-copy strong { font-size: 19px; letter-spacing: -.5px; color: #102b3f; }
body .brand-copy small { font-size: 9px; letter-spacing: 1.7px; color: #536a7b; }
body .top-nav { flex: 1; justify-content: center; gap: 26px; }
body .top-nav a { position: relative; font-size: 14px; color: #435967; padding: 12px 0; }
body .top-nav a[aria-current="page"]::after { content: ""; position: absolute; height: 2px; background: #007e96; bottom: 3px; left: 0; right: 0; }
body .top-actions { gap: 10px; margin-left: auto; }
.site-menu-toggle { display: none; }
body .footer { background: #102b3f; color: #c0ced7; border: 0; padding-top: 58px; margin-top: 0; }
body .footer-grid { max-width: 1320px; gap: 44px; }
body .footer-brand p, body .footer a { color: #bdcdd5; }
body .footer-title, body .footer-logo span { color: #fff; }
body .footer a:hover { color: #91e0e6; }
body .footer-bottom { max-width: 1320px; border-top: 1px solid #ffffff20; color: #a9becb; padding-top: 22px; }
body .footer-bottom p { font-size: 12px; }

/* Authentication: a quiet, distinctive onboarding surface. */
body .auth-frame { display: grid; grid-template-columns: minmax(0,1fr) minmax(360px,480px); align-items: stretch; gap: 0; max-width: 1080px; margin: 64px auto 90px; padding: 0; border: 1px solid #dce5e9; border-radius: 20px; overflow: hidden; background: #fff; box-shadow: 0 18px 60px #102b3f09; }
.auth-intro { position: relative; overflow: hidden; background: #102b3f; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; min-height: 540px; }
.auth-intro-kicker { font-size: 11px; letter-spacing: 2px; color: #96d4df; }
.auth-intro h2 { font-size: clamp(28px,3vw,40px); font-weight: 650; line-height: 1.4; letter-spacing: -1px; margin: 20px 0 16px; }
.auth-intro p { max-width: 320px; font-size: 14px; color: #bfd0d9; }
.auth-compass { width: 240px; height: 190px; align-self: center; color: #6bb6c3; margin: 16px 0; }
.auth-intro-foot { display: flex; justify-content: space-between; font-size: 11px; color: #a6becb; border-top: 1px solid #ffffff20; padding-top: 20px; }
body .auth-card { align-self: center; border: 0; border-radius: 0; box-shadow: none; max-width: none; width: 100%; margin: 0; padding: 42px; background: #fff; }
body .auth-frame { min-height: 0; justify-items: stretch; }
body .auth-intro { width: 100%; max-width: none; }
body .auth-heading h1 { font-size: 28px; line-height: 1.4; margin: 0 0 8px; letter-spacing: -.6px; }
body .auth-heading p { color: #536a7b; font-size: 14px; }
body .auth-heading { margin-bottom: 28px; }
body .auth-card input { min-height: 46px; font-size: 15px; background: #fbfcfd; border-color: #cbd9df; border-radius: 8px; }
body .auth-card label { color: #314a5d; font-size: 13px; font-weight: 600; }
body .auth-card .auth-submit { min-height: 46px; margin-top: 22px; }
body .auth-hint { color: #596e7e; }
body .auth-switch { font-size: 13px; line-height: 1.8; }

/* Buyer workspace: contrast comes from typography and structure, not heavy shadows. */
body.portal-mode { --portal-primary: #007e96; --portal-primary-dark: #00677c; --portal-ink: #102b3f; --portal-muted: #536a7b; --portal-line: #dce5e9; background: #f6f8f9; }
body.portal-mode .topbar { min-height: 72px; padding-top: 12px; padding-bottom: 12px; box-shadow: none; }
body.portal-mode .site-menu-toggle { display: none; }
body.portal-mode .btn { box-shadow: none; background: #007e96; }
body.portal-mode .btn.ghost { background: #fff; }
body .user-portal { background: #f6f8f9; }
body .portal-shell { max-width: 1600px; grid-template-columns: 228px minmax(0,1fr); min-height: calc(100vh - 72px); }
body .portal-sidebar { top: 72px; height: calc(100vh - 72px); min-height: 560px; padding: 28px 16px; background: #102b3f; border: 0; color: #d6e3ea; }
body .portal-user-card { background: transparent; border: 0; border-bottom: 1px solid #ffffff20; border-radius: 0; padding: 0 6px 24px; margin-bottom: 22px; }
body .portal-user-card strong { color: #fff; font-size: 14px; }
body .portal-user-card small { color: #aec4d1; font-size: 11px; }
body .portal-avatar { background: #007e96; box-shadow: none; border-radius: 10px; }
body .portal-nav { gap: 6px; }
body .portal-nav-link { color: #c0d2dd; font-size: 14px; min-height: 46px; font-weight: 500; }
body .portal-nav-link:hover { background: #ffffff0c; color: #fff; }
body .portal-nav-link.active { background: #ffffff12; color: #92e0e8; box-shadow: inset 3px 0 #65ced9; }
body .portal-sidebar-footer { border-top-color: #ffffff20; bottom: 26px; }
body .portal-sidebar-footer a, body .portal-sidebar-footer button { color: #b8ccd8; font-size: 13px; min-height: 44px; }
body .portal-sidebar-footer a:hover, body .portal-sidebar-footer button:hover { background: #ffffff0b; color: #fff; }
body .portal-main { padding: 36px clamp(20px,3vw,46px) 64px; }
body .portal-page-head { margin-bottom: 30px; align-items: center; }
body .portal-page-head h1 { font-size: 30px; letter-spacing: -.7px; }
body .portal-page-head p { font-size: 14px; margin-top: 8px; }
body .portal-kicker { color: #007e96; font-size: 10px; letter-spacing: 2px; margin-bottom: 8px; }
body .portal-content { gap: 24px; }
body .portal-panel { padding: 26px; border-radius: 14px; box-shadow: 0 3px 16px #102b3f03; }
body .portal-panel-head { margin-bottom: 22px; }
body .portal-panel-head h2 { font-size: 17px; color: #102b3f; }
body .portal-panel-head p { font-size: 12px; color: #607585; margin-top: 5px; }
body .portal-panel-head > a { font-size: 13px; }
body .portal-welcome { border: 0; border-radius: 14px; background: #e9f2f4; box-shadow: none; padding: 28px; }
body .portal-welcome h2 { font-size: 25px; }
body .portal-welcome p { font-size: 14px; color: #536a7b; }
body .portal-welcome-tag { font-size: 12px; }
body .portal-metric { border-radius: 12px; padding: 22px 18px; box-shadow: none; transition: border-color .2s, transform .2s; }
body .portal-metric strong { font-size: 28px; font-variant-numeric: tabular-nums; letter-spacing: -.6px; }
body .portal-metric small, body .portal-metric em { color: #5c7282; font-size: 12px; }
body .portal-service-card { background: #fff; border-radius: 12px; box-shadow: none; }
body .portal-service-head h3 { font-size: 15px; }
body .portal-service-head p { color: #607585; font-size: 12px; }
body .portal-service-meta small, body .portal-traffic-head { color: #607585; font-size: 12px; }
body .portal-service-meta strong { color: #253f52; font-size: 14px; font-variant-numeric: tabular-nums; }
body .portal-badge { font-size: 11px; padding: 4px 9px; }
body .portal-badge.success { color: #087453; background: #e9f7ef; }
body .portal-badge.warning { color: #8d5d06; }
body .portal-info-grid { border-color: #dce5e9; }
body .portal-sync-note { display: block; margin-top: 10px; color: #667b89; font-size: 12px; }
body .portal-info-grid span, body .portal-info-grid small { color: #5d7282; font-size: 12px; }
body .portal-info-grid strong { font-size: 14px; color: #253f52; }
body .portal-table { font-size: 13px; }
body .portal-table th { font-size: 12px; color: #516879; background: #f7f9fa; padding: 14px 12px; font-weight: 600; }
body .portal-table td { font-size: 13px; padding: 15px 12px; color: #314b5e; }
body .portal-table tbody tr:hover { background: #f5fafb; }
body .portal-table .btn { font-size: 12px; min-height: 34px; padding: 6px 10px; }
body .portal-table-wrap { overscroll-behavior-x: contain; }
body .portal-list-main strong, body .portal-order-name strong, body .portal-notification-head strong { font-size: 14px; }
body .portal-list-main small, body .portal-order-name small, body .portal-list-side strong { font-size: 12px; color: #5c7282; }
body .portal-quick-list strong { font-size: 14px; }
body .portal-quick-list small, body .portal-notice-item small, body .portal-notification p { font-size: 12px; color: #5c7282; }
body .portal-pager { font-size: 12px; flex-wrap: wrap; }
body .portal-pager .btn { min-height: 38px; font-size: 12px; }
body .portal-toolbar { gap: 14px; }
body .portal-filters { flex-wrap: wrap; }
body .portal-filter { font-size: 13px; padding: 9px 14px; min-height: 40px; }
body .portal-credentials, body .portal-credential-value { overflow-wrap: anywhere; }
body .portal-panel input:not([type="checkbox"]), body .portal-panel select { min-height: 42px; font-size: 14px; }
body .portal-panel input[type="checkbox"] { width: 17px; height: 17px; accent-color: #007e96; }
body .portal-renew-box small, body .portal-expand-box small { font-size: 12px; }
body .portal-recharge-card > p, body .portal-account-info span, body .portal-session small, body .portal-security-log small { font-size: 12px; color: #5c7282; }
body .portal-account-info strong { font-size: 13px; overflow-wrap: anywhere; }
body .portal-loading { min-height: 300px; gap: 18px; align-content: center; }
body .portal-loading p { margin: 0; font-size: 14px; }
body .portal-menu-btn { min-width: 44px; min-height: 44px; }
body .portal-menu-btn[aria-expanded="true"] { background: #e5f3f5; }
body .portal-standalone-error { margin: 48px auto; width: min(480px,calc(100% - 32px)); text-align: center; }

/* Purchase retains progressive configuration and a readable, anchored order summary. */
body .purchase-page { --purchase-accent: #007e96; --purchase-accent-dark: #00677c; --purchase-soft: #eaf5f6; background: transparent; }
body .purchase-section, body .purchase-summary { border-color: #dce5e9; border-radius: 14px; box-shadow: 0 3px 16px #102b3f03; }
body .purchase-section { padding: 28px; }
body .purchase-section-title strong { font-size: 20px; letter-spacing: -.3px; }
body .purchase-section-title small { color: #596f80; font-size: 13px; }
body .purchase-section-title > b { background: #102b3f; color: #fff; border-radius: 8px; }
body .purchase-country, body .purchase-mode, body .purchase-line { border-radius: 10px; box-shadow: none; }
body .purchase-country.active, body .purchase-mode.active, body .purchase-line.active { border-color: #007e96; background: #eff8f9; box-shadow: 0 0 0 1px #007e96; }
body .purchase-summary-total strong { font-variant-numeric: tabular-nums; font-size: 30px; }
body .purchase-summary-note { color: #596f80; }
body .purchase-modal-card { max-height: calc(100dvh - 40px); overflow: auto; border-radius: 16px; }
body .purchase-modal-close { min-width: 36px; min-height: 36px; }
body .portal-toast-stack { top: 88px; }

@media (min-width: 981px) {
  body .portal-main { animation: experience-in .28s ease-out both; }
}
@keyframes experience-in { from { opacity: .7; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1200px) {
  body .topbar { gap: 20px; padding-inline: 24px; }
  body .top-nav { gap: 18px; }
  body .portal-shell { grid-template-columns: 204px minmax(0,1fr); }
  body .portal-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body .portal-dashboard-grid { grid-template-columns: minmax(0,1fr); }
  body .portal-span-2 { grid-column: auto; }
}
@media (max-width: 980px) {
  body .topbar { min-height: 72px; flex-wrap: wrap; gap: 12px; padding: 12px 20px; }
  body .top-nav { display: none; order: 5; flex: 0 0 100%; margin: 0; padding: 12px 0 4px; border-top: 1px solid #dce5e9; grid-template-columns: repeat(3,minmax(0,1fr)); }
  body .topbar.navigation-open .top-nav { display: grid; }
  body .top-nav a { text-align: center; padding: 10px 6px; }
  .site-menu-toggle { display: flex; flex-direction: column; justify-content: center; gap: 6px; width: 44px; height: 44px; border: 1px solid #dce5e9; border-radius: 8px; background: #fff; padding: 12px; cursor: pointer; }
  .site-menu-toggle span { height: 2px; width: 18px; background: #102b3f; transition: transform .18s; }
  .site-menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .site-menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  body .auth-frame { margin: 36px 24px 60px; grid-template-columns: minmax(0,1fr) minmax(340px,1fr); }
  .auth-intro { padding: 32px; }
  body .auth-card { padding: 32px; }
  body .portal-shell { display: block; }
  body .portal-sidebar { position: static; display: none; width: 100%; height: auto; min-height: 0; padding: 20px; transform: none; box-shadow: none; }
  body .portal-sidebar.open { display: block; }
  body .portal-nav { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body .portal-sidebar-footer { position: static; margin-top: 16px; padding-top: 12px; display: flex; }
  body .portal-user-card { margin-bottom: 14px; padding-bottom: 14px; }
  body .portal-main { padding: 28px 24px 48px; }
  body .portal-menu-btn { display: grid; }
}
@media (max-width: 640px) {
  html { scroll-padding-top: 80px; }
  body .topbar { padding: 10px 16px; gap: 8px; }
  body .brand-logo { width: 32px; height: 32px; }
  body .brand-copy strong { font-size: 15px; }
  body .brand-copy small { font-size: 7px; letter-spacing: .7px; }
  body .logo { gap: 7px; }
  body .top-actions { gap: 6px; }
  body:not(.portal-mode) .top-user-balance { display: none; }
  body .top-actions .btn { min-height: 40px; padding: 8px 10px; font-size: 12px; }
  body .top-nav { gap: 6px; }
  body .top-nav a { font-size: 13px; }
  body .footer { padding: 36px 20px 24px; }
  body .footer-grid { gap: 28px 20px; grid-template-columns: repeat(2,minmax(0,1fr)); }
  body .footer-brand { grid-column: 1 / -1; }
  body .footer-bottom { display: block; }
  body .footer-bottom p + p { margin-top: 8px; }
  body .auth-frame { display: block; margin: 24px 16px 48px; border-radius: 14px; }
  .auth-intro { min-height: 0; padding: 24px; }
  .auth-intro h2 { font-size: 24px; margin: 10px 0 0; }
  .auth-intro p, .auth-compass, .auth-intro-foot { display: none; }
  .auth-intro h2 br { display: none; }
  body .auth-card { padding: 28px 24px; }
  body .auth-heading h1 { font-size: 25px; }
  body .auth-card input { font-size: 16px; }
  body .portal-main { padding: 24px 16px 40px; }
  body .portal-page-head h1 { font-size: 25px; }
  body .portal-page-head p { font-size: 13px; }
  body .portal-page-head { gap: 12px; margin-bottom: 22px; }
  body .portal-content { gap: 18px; }
  body .portal-panel { padding: 20px 16px; border-radius: 12px; }
  body .portal-panel-head { gap: 12px; }
  body .portal-welcome { align-items: start; flex-direction: column; padding: 24px 20px; gap: 20px; }
  body .portal-welcome-actions { width: 100%; }
  body .portal-welcome-actions > * { flex: 1; }
  body .portal-metric { display: block; padding: 16px; }
  body .portal-metric-icon { width: 32px; height: 32px; margin-bottom: 12px; border-radius: 8px; }
  body .portal-metric strong { font-size: 25px; }
  body .portal-metric em { white-space: normal; }
  body .portal-service-grid, body .portal-account-grid, body .portal-recharge-grid { grid-template-columns: minmax(0,1fr); }
  body .portal-service-hero { display: flex; flex-direction: column; align-items: stretch; gap: 18px; padding: 22px 20px; background: #eff7f8; }
  body .portal-service-identity { display: grid; grid-template-columns: 42px minmax(0,1fr); width: 100%; gap: 12px; }
  body .portal-service-identity h2 { font-size: 20px; line-height: 1.5; overflow-wrap: anywhere; }
  body .portal-service-state { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; text-align: left; }
  body .portal-service-state small { margin: 0; font-size: 12px; }
  body .portal-table-wrap { margin-inline: -8px; padding-bottom: 8px; }
  body .portal-table { min-width: 720px; }
  body .portal-table .btn { min-height: 40px; }
  body .portal-filter, body .portal-pager .btn { min-height: 42px; }
  body .portal-nav-link { font-size: 13px; }
  body .portal-order-detail { padding: 16px; }
  body .portal-order-detail .portal-info-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body .portal-profile-card { grid-template-columns: 48px minmax(0,1fr); }
  body .portal-profile-card > a { grid-column: 1 / -1; }
  body .portal-profile-card small { overflow-wrap: anywhere; }
  body .portal-session { grid-template-columns: 32px minmax(0,1fr); }
  body .portal-session > button { grid-column: 2; justify-self: start; }
  body .purchase-section { padding: 22px 18px; }
  body .purchase-section-title strong { font-size: 18px; }
  body .purchase-section-title small { font-size: 12px; }
  body .purchase-modal { padding: 16px; }
  body .purchase-modal-card { padding: 30px 22px; max-height: calc(100dvh - 32px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
