/* Market Makers Vip — responsive visual system, 2026.
   UI only: no endpoint names, DOM IDs or business logic are changed. */
:root {
  --vip-navy: #0b1729;
  --vip-navy-2: #10243b;
  --vip-teal: #087f80;
  --vip-teal-dark: #076869;
  --vip-mint: #dcf8f0;
  --vip-ink: #172b41;
  --vip-muted: #667b90;
  --vip-line: #e3eaf0;
  --vip-surface: #fff;
  --vip-page: #f4f7fa;
  --vip-radius: 16px;
  --vip-soft-shadow: 0 6px 25px rgba(13, 29, 51, .055);
}
html { min-width: 0; scroll-behavior: smooth; }
body.vip-dashboard, body.vip-admin, body.vip-login, body.vip-module, body.vip-chart {
  font-family: 'Tajawal', system-ui, Tahoma, sans-serif;
  font-size: 13px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.vip-dashboard, body.vip-admin, body.vip-module, body.vip-chart { background: var(--vip-page); color: var(--vip-ink); }
body.vip-dashboard, body.vip-admin, body.vip-login, body.vip-module { min-width: 0; overflow-x: clip; }
button, input, select { font: inherit; }
button { touch-action: manipulation; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible,
[tabindex="0"]:focus-visible { outline: 3px solid #20b8ab; outline-offset: 2px; }

/* Reusable wordmark */
.site-brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; text-decoration: none; color: inherit; }
.site-mark { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px; display: inline-grid; place-items: center;
  position: relative; background: linear-gradient(150deg,#2ccfb0,#087d89); color: #fff; box-shadow: 0 6px 18px rgba(2,162,151,.22);
  font: 800 13px/1 'Tajawal',sans-serif; letter-spacing: -.8px; }
.mark-dot { width: 5px; height: 5px; border-radius: 50%; background: #d8fff3; position: absolute; top: 9px; left: 7px; }
.brand-copy { min-width: 0; display: flex; flex-direction: column; align-items: start; }
.brand-copy .brand-title { display: block; font-size: 16px; font-weight: 800; color: #f5f9ff; line-height: 1.15; letter-spacing: -.3px; }
.brand-copy em, .vip-login h1 em { font-style: normal; color: #40d4ba; }
.brand-copy .brand-subtitle { color: #b3c6d5; display: block; font-size: 10.5px; line-height: 1.5; margin-top: 4px; }

/* Dashboard: navigation and identity */
.vip-dashboard .site-header { background: var(--vip-navy); border-bottom: 1px solid #243950; box-shadow: 0 4px 25px rgba(0,0,0,.1); }
.vip-dashboard .header-content { max-width: none; width: 100%; padding: 13px clamp(14px,2.15vw,40px); gap: 12px; flex-wrap: nowrap; }
.vip-dashboard .header-brand { gap: 11px; flex-direction: row; text-align: start; }
.vip-dashboard .account-actions { display: flex; align-items: center; justify-content: end; flex-wrap: wrap; gap: 9px; min-width: 0; }
.vip-dashboard .account-chip { display: flex; align-items: center; gap: 9px; min-width: 0; color: #f6fbff; background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.095); border-radius: 11px; padding: 6px 10px; }
.vip-dashboard .account-avatar { flex: 0 0 29px; height: 29px; width: 29px; display: grid; place-items: center; border-radius: 9px;
  color: #0b2531; font-size: 12px; font-weight: 800; background: #a8ead7; }
.vip-dashboard .account-copy { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; max-width: 220px; }
.vip-dashboard .account-copy strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vip-dashboard .account-copy small { color: #aabfd1; font-size: 10px; overflow-wrap: anywhere; }
.vip-dashboard .logout-form { margin: 0; }
.vip-dashboard .header-link { font-size: 11.5px; color: #e3eff9; background: rgba(255,255,255,.04); border: 1px solid #3c5067;
  border-radius: 9px; padding: 8px 11px; text-decoration: none; box-shadow: none; min-height: 35px; }
.vip-dashboard .header-link:hover { border-color: #60bdb5; background: rgba(255,255,255,.09); color: #fff; }

.vip-dashboard .container.vip-dashboard-main { max-width: none; width: 100%; padding: clamp(14px,2vw,32px) clamp(12px,2.15vw,40px) 30px; margin: 0 auto; }
.vip-dashboard .workspace-intro { position: relative; padding: clamp(18px,2.4vw,32px); background: linear-gradient(115deg,#102b3d 5%,#10243c 60%,#122743 100%);
  border: 1px solid #233d51; border-radius: 20px; color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  margin-bottom: 18px; overflow: hidden; box-shadow: 0 12px 28px rgba(8,34,57,.08); }
.vip-dashboard .workspace-intro::after { content: ''; pointer-events: none; position: absolute; width: 360px; height: 360px; border-radius: 50%;
  left: -140px; top: -225px; background: radial-gradient(circle,rgba(47,225,184,.18),transparent 70%); }
.vip-dashboard .eyebrow { font-size: 10px; letter-spacing: .5px; color: #b1decf; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.vip-dashboard .pulse-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: #54d9bc; box-shadow: 0 0 0 4px rgba(72,217,181,.12); }
.vip-dashboard .workspace-intro h1 { font-size: clamp(19px,2.2vw,27px); color: #fff; line-height: 1.28; margin: 8px 0 5px; letter-spacing: -.4px; }
.vip-dashboard .workspace-intro p { margin: 0; color: #b4c9d7; font-size: 12px; }
.vip-dashboard .workspace-caption { display: flex; align-items: center; gap: 9px; padding: 10px 13px; color: #c8e9de; font-size: 11px;
  border: 1px solid rgba(133,233,202,.2); background: rgba(30,193,165,.075); border-radius: 10px; flex: 0 0 auto; }
.vip-dashboard .workspace-caption > span:first-child { font-size: 16px; color: #49d6b5; }

/* Dashboard: command center */
.vip-dashboard .command-center { padding: 18px; background: var(--vip-surface); border: 1px solid var(--vip-line); border-radius: 18px;
  box-shadow: var(--vip-soft-shadow); margin-bottom: 19px; }
.vip-dashboard .section-heading { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-bottom: 13px; }
.section-kicker { color: var(--vip-teal); font-size: 10.5px; font-weight: 800; letter-spacing: .4px; }
.vip-dashboard .section-heading h2 { font-size: 15px; color: var(--vip-ink); margin: 3px 0 0; }
.vip-dashboard .section-note { color: var(--vip-muted); font-size: 11px; }
.vip-dashboard .primary-actions { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.vip-dashboard .btn { font-weight: 700; font-size: 12px; line-height: 1.3; padding: 10px 12px; border-radius: 11px;
  white-space: normal; transition: background .17s,border-color .17s,transform .17s,box-shadow .17s; }
.vip-dashboard .btn-primary { background: linear-gradient(120deg,#0e8684,#096d76); color: #fff; border: 1px solid #0b7d7c; box-shadow: none; }
.vip-dashboard .btn-primary:hover { background: linear-gradient(120deg,#097877,#075966); box-shadow: 0 5px 15px rgba(3,114,105,.17); }
.vip-dashboard .btn-outline { background: #fff; color: #28415a; border: 1px solid #dce5ec; box-shadow: none; }
.vip-dashboard .btn-outline:hover { background: #f2f8f9; border-color: #85c9c2; color: #0a686b; }
.vip-dashboard .btn:hover { transform: translateY(-1px); }
.vip-dashboard .action-primary { min-height: 65px; display: flex; gap: 7px; justify-content: start; align-items: center; text-align: right;
  flex-wrap: wrap; overflow-wrap: anywhere; }
.vip-dashboard .action-primary small { display: block; width: 100%; padding-right: 35px; margin-top: -7px; font-size: 10px; font-weight: 500; opacity: .72; }
.vip-dashboard .action-symbol { display: inline-grid; place-items: center; flex: 0 0 27px; height: 27px; width: 27px; border-radius: 8px; font-size: 18px;
  background: rgba(24,120,121,.08); color: var(--vip-teal); }
.vip-dashboard .btn-primary .action-symbol { background: rgba(255,255,255,.16); color: #fff; }
.vip-dashboard .toolkit-details { margin-top: 13px; border: 1px solid #e4ebf0; background: #fbfcfe; border-radius: 12px; }
.vip-dashboard .toolkit-details summary { cursor: pointer; list-style: none; padding: 11px 12px; min-height: 44px; display: flex; align-items: center; gap: 8px;
  color: #2e465b; font-size: 12px; font-weight: 700; }
.vip-dashboard .toolkit-details summary::-webkit-details-marker { display: none; }
.vip-dashboard .toolkit-details .summary-icon { border-radius: 7px; background: #edf6f5; color: #0a807c; padding: 1px 7px; font-size: 15px; }
.vip-dashboard .tools-hint { font-size: 10.5px; font-weight: 500; color: var(--vip-muted); margin-right: auto; }
.vip-dashboard .summary-chevron { color: #667a8e; font-size: 18px; transition: transform .2s; }
.vip-dashboard .toolkit-details[open] .summary-chevron { transform: rotate(180deg); }
.vip-dashboard .secondary-actions { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,185px),1fr)); gap: 8px;
  border-top: 1px solid #e4ebf0; padding: 12px; }
.vip-dashboard .secondary-actions .btn { text-align: right; justify-content: flex-start; min-height: 41px; }
.vip-dashboard .secondary-actions .btn span { font-size: 15px; color: #0a8985; width: 22px; text-align: center; }

/* Dynamic content, including legacy JavaScript HTML classes */
.vip-dashboard .loading-bar { margin: 10px 0 15px; height: 4px; }
.vip-dashboard .stats-row { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 11px; margin-bottom: 17px; }
.vip-dashboard .stat-box { min-width: 0; border-radius: 13px; padding: 13px 15px; box-shadow: var(--vip-soft-shadow); gap: 11px; }
.vip-dashboard .stat-icon { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px; background: #eff7f6; display: grid; place-items: center;
  color: #0a8781; font-size: 17px; }
.vip-dashboard .stat-value { font-size: 21px; line-height: 1.3; }
.vip-dashboard .stat-label { font-size: 10.5px; color: #6e8193; letter-spacing: 0; text-transform: none; }
.vip-dashboard .results-section { min-width: 0; }
.vip-dashboard #results-area { min-width: 0; }
.vip-dashboard .welcome-screen { border: 1px solid var(--vip-line); box-shadow: var(--vip-soft-shadow); border-radius: 18px; padding: clamp(28px,4vw,58px) 20px; }
.vip-dashboard .welcome-icon { width: 51px; height: 51px; line-height: 51px; margin: 0 auto 15px; border-radius: 15px;
  background: #e9f7f4; color: #008b82; font-size: 30px; }
.vip-dashboard .welcome-screen h2 { font-size: clamp(17px,2vw,21px); line-height: 1.4; }
.vip-dashboard .welcome-screen p { font-size: 12px; color: #677c90; margin: 0 auto 20px; max-width: 590px; }
.vip-dashboard .welcome-features { gap: 9px; }
.vip-dashboard .feature-item { font-size: 11px; padding: 7px 11px; border-radius: 9px; background: #f5f8fa; border: 1px solid #e9eff3; }
.vip-dashboard .feature-icon { font-size: 15px; color: #0c8a83; }
.vip-dashboard .stock-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,335px),1fr)); gap: 13px; }
.vip-dashboard .stock-card { min-width: 0; border-radius: 15px; box-shadow: var(--vip-soft-shadow); }
.vip-dashboard .card-header { padding: 11px 14px; }
.vip-dashboard .card-body { padding: 14px; }
.vip-dashboard .card-symbol { font-size: 16px; }
.vip-dashboard .card-name { font-size: 10.5px; }
.vip-dashboard .card-badges { min-width: 0; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.vip-dashboard .badge { font-size: 10px; padding: 4px 8px; }
.vip-dashboard .current-price { font-size: 21px; }
.vip-dashboard .price-change { font-size: 11px; }
.vip-dashboard .info-grid { gap: 7px; }
.vip-dashboard .info-item { padding: 9px 11px; }
.vip-dashboard .info-label { font-size: 10px; }
.vip-dashboard .info-value { font-size: 12px; overflow-wrap: anywhere; }
.vip-dashboard .tp-item { font-size: 11px; }
.vip-dashboard .trade-plan-box { padding: 12px; }
.vip-dashboard .reasons-title, .vip-dashboard .reasons-list li { font-size: 11px; }
.vip-dashboard .opportunity-board { gap: 17px; }
.vip-dashboard .opportunity-section h2 { font-size: 15px; margin: 6px 0 12px; }
.vip-dashboard .mini-summary span { font-size: 11px; padding: 5px 8px; }
.vip-dashboard .explain-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,190px),1fr)); }
.vip-dashboard .card-actions { flex-wrap: wrap; }
.vip-dashboard .card-actions .btn { flex: 1 1 140px; justify-content: center; }
.vip-dashboard .table-wrap { width: 100%; max-width: 100%; overflow: auto; -webkit-overflow-scrolling: touch; border-radius: 13px; }
.vip-dashboard .data-table { width: 100%; font-size: 11px; }
.vip-dashboard .data-table td, .vip-dashboard .data-table th { font-size: 11px; padding: 10px; }
.vip-dashboard .stock-card, .vip-dashboard .alert, .vip-dashboard .empty-state, .vip-dashboard .stocks-panel { max-width: 100%; }
.vip-dashboard .stocks-panel { border-radius: 15px; margin-top: 17px; }
.vip-dashboard .footer { margin-top: auto; border-color: #e4ebef; padding: 16px; }
.vip-dashboard .footer p { font-size: 11px; color: #7a8a98; }
.vip-dashboard .footer span { padding-inline: 4px; }

/* VIP Admin: retain existing input names, CSRF and form destinations */
.vip-admin .admin-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--vip-navy); border-bottom: 1px solid #243950; padding: 12px clamp(14px,2.3vw,40px); }
.vip-admin .admin-header-actions { display: flex; align-items: center; gap: 10px; }
.vip-admin .admin-header-actions form { margin: 0; }
.vip-admin .admin-back { color: #e2f0f5; text-decoration: none; font-size: 12px; padding: 9px 10px; border: 1px solid #3b526b; border-radius: 9px; }
.vip-admin .admin-header-actions button { margin: 0; background: #274058; border: 1px solid #3b526b; color: #eef8ff; border-radius: 9px; font-size: 12px; }
.vip-admin .admin-main { max-width: none; margin: 0; width: 100%; padding: 23px clamp(12px,2.3vw,40px); }
.vip-admin .admin-intro { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.vip-admin .admin-intro h1 { font-size: 23px; color: #182d42; margin: 3px 0 0; }
.vip-admin .admin-intro p { font-size: 12px; margin: 0; color: var(--vip-muted); }
.vip-admin .admin-privilege { background: #e3f5ee; color: #0a7468; border: 1px solid #c9e9dc; border-radius: 999px;
  font-size: 11px; font-weight: 700; padding: 7px 11px; white-space: nowrap; }
.vip-admin .vip-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.vip-admin .vip-panel { min-width: 0; background: #fff; color: var(--vip-ink); border: 1px solid var(--vip-line); border-radius: 16px;
  padding: clamp(15px,1.9vw,23px); box-shadow: var(--vip-soft-shadow); margin: 0 0 16px; }
.vip-admin .panel-title-row { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }
.vip-admin .panel-symbol { background: #e9f7f4; color: #098d86; border-radius: 10px; width: 36px; height: 36px; flex: 0 0 36px;
  display: grid; place-items: center; font-size: 23px; font-weight: 700; }
.vip-admin .vip-panel h2 { font-size: 15px; margin: 0; color: var(--vip-ink); }
.vip-admin .panel-title-row p { color: #6e8193; margin: 0; font-size: 11px; }
.vip-admin .vip-panel label { color: #344c60; font-size: 11.5px; font-weight: 700; margin: 0; }
.vip-admin .admin-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.vip-admin .vip-panel input, .vip-admin .vip-panel select { min-height: 39px; border-radius: 9px; background: #fbfdff; color: #19334b;
  border: 1px solid #dce5ec; padding: 8px 10px; font-size: 12px; margin: 5px 0 0; }
.vip-admin input::placeholder { color: #9aabb7; }
.vip-admin .vip-panel input[type=file] { padding: 9px; width: 100%; font-size: 11px; }
.vip-admin .vip-panel button { font-size: 11.5px; padding: 9px 12px; margin: 0; min-height: 35px; border-radius: 9px;
  background: #0b8382; color: #fff; border: 1px solid #0b8382; }
.vip-admin .vip-panel button:hover { background: #086d70; filter: none; }
.vip-admin .vip-panel button.secondary { background: #f0f5f7; color: #28445a; border-color: #d9e4e9; }
.vip-admin .vip-panel button.secondary:hover { background: #e6f2f1; }
.vip-admin .admin-form > button { margin-top: 16px; }
.vip-admin .hint { color: #6e8193; font-size: 11px; margin: 9px 0 14px; }
.vip-admin .column-guide { color: #2c566c; background: #f4f8fa; border: 1px solid #e5edf1; font: 11px/1.9 ui-monospace,monospace;
  padding: 9px 11px; border-radius: 9px; overflow-wrap: anywhere; }
.vip-admin .column-guide span { color: #7c8f9f; }
.vip-admin .import-form { margin-top: 12px; }
.vip-admin .import-form button { margin-top: 10px; }
.vip-admin .admin-inline-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 14px 0 8px; }
.vip-admin .admin-inline-actions form { margin: 0; }
.vip-admin .subscribers-panel { margin-top: 3px; }
.vip-admin .table-scroller { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.vip-admin table { min-width: 780px; border-collapse: collapse; color: #283d51; }
.vip-admin th { position: sticky; top: 0; background: #f1f6f8; border-bottom: 1px solid #dbe4e9; font-size: 11px;
  font-weight: 800; white-space: nowrap; padding: 11px; }
.vip-admin td { font-size: 11.5px; border-bottom: 1px solid #e7edf1; padding: 11px; line-height: 1.6; }
.vip-admin td small { color: #8796a3; font-size: 10px; }
.vip-admin .device-cell { white-space: normal; overflow-wrap: anywhere; max-width: 200px; }
.vip-admin .status-tag { display: inline-block; padding: 4px 9px; border-radius: 20px; white-space: nowrap; font-size: 10.5px; }
.vip-admin .status-active { background: #e4f8ed; color: #067344; }
.vip-admin .status-paused { background: #fff1ef; color: #a33232; }
.vip-admin .admin-action-cell { min-width: 320px; }
.vip-admin .actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.vip-admin .actions form { margin: 0; display: flex; align-items: center; gap: 5px; }
.vip-admin .actions form input { margin: 0; }
.vip-admin .actions input[type=number] { width: 65px; }
.vip-admin .actions input[type=password] { width: 125px; }
.vip-admin .notice { background: #e8f8f3; border-color: #b9e6d6; color: #0c675f; font-size: 12px; }
.vip-admin .vip-footer, .vip-login .vip-footer { color: #8698a9; text-align: center; font-size: 11px; padding: 18px; }

/* Login: centered, legible, mobile friendly */
body.vip-login { background: radial-gradient(circle at 80% 0%,#1e4560 0%,#0b1729 54%); color: #eaf3f9; min-height: 100dvh;
  padding: clamp(15px,3vw,28px); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.vip-login .login-card { width: min(100%,420px); background: #fff; color: var(--vip-ink); box-shadow: 0 24px 70px rgba(0,0,0,.23);
  border: 1px solid #dce5ec; border-radius: 20px; padding: clamp(20px,3.2vw,34px); margin: auto 0; text-align: center; }
.vip-login .login-brand { display: flex; flex-direction: column; align-items: center; gap: 9px; margin-bottom: 10px; }
.vip-login .site-mark { width: 54px; height: 54px; font-size: 16px; border-radius: 16px; }
.vip-login .login-edition { color: #0b817a; font-size: 10px; font-weight: 800; letter-spacing: 1.3px; }
.vip-login h1 { font-size: 21px; color: var(--vip-ink); margin: 5px 0; }
.vip-login h1 em { color: var(--vip-teal); }
.vip-login .login-intro { font-size: 12px; color: #718396; line-height: 1.7; margin: 7px 0 19px; }
.vip-login .login-form label { color: #344e62; font-size: 12px; font-weight: 700; margin: 11px 0; text-align: start; }
.vip-login .login-form input { background: #fafcfd; color: #132d46; border: 1px solid #d9e4eb; border-radius: 10px; font-size: 13px;
  margin: 5px 0 0; min-height: 43px; padding: 10px 12px; }
.vip-login .login-form input::placeholder { color: #a1afbc; }
.vip-login .login-form button { width: 100%; background: linear-gradient(120deg,#0f8882,#066b76); color: #fff; padding: 11px;
  margin: 17px 0 8px; border-radius: 10px; font-size: 13px; }
.vip-login .login-form button span { margin-inline-start: 8px; }
.vip-login .disclaimer { border-top: 1px solid #e6ebef; padding-top: 14px; margin: 12px 0 0;
  font-size: 10.5px; line-height: 1.7; color: #8394a2; }
.vip-login .notice.error { background: #fff1f0; color: #9b3134; border-color: #f3d2cf; font-size: 11.5px; }
.vip-login .vip-footer { color: #a7bdcf; }

/* Reports/market tools: unified look with genuinely responsive tables */
.vip-module .module-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px clamp(12px,2vw,35px); background: var(--vip-navy); color: white; }
.vip-module .module-topbar .module-home { color: #cde9e4; text-decoration: none; font-weight: 700; border: 1px solid #39546a;
  border-radius: 9px; padding: 6px 11px; font-size: 11px; }
.vip-module .module-topbar strong { font-size: 13px; }
.vip-module .page { width: 100%; max-width: none; padding: clamp(12px,2.25vw,32px); margin: 0; }
.vip-module .card { border-color: var(--vip-line); border-radius: 15px; box-shadow: var(--vip-soft-shadow); padding: 16px; }
.vip-module .card h1 { font-size: 19px; margin: 0 0 4px; }
.vip-module .card h2 { font-size: 15px; }
.vip-module .muted { font-size: 11px; color: var(--vip-muted); }
.vip-module .toolbar { display: flex; flex-wrap: wrap; gap: 10px; }
.vip-module button, .vip-module .btn { border-radius: 9px; background: #0b8382; color: #fff; padding: 9px 12px; font-size: 11.5px; }
.vip-module input, .vip-module select { font-size: 12px; border-radius: 9px; }
.vip-module .grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,200px),1fr)); gap: 11px; }
.vip-module .metric { font-size: 19px; color: #087a7a; }
.vip-module .table-wrap { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.vip-module .table-wrap table { width: 100%; min-width: 650px; }
.vip-module table th { position: sticky; top: 0; z-index: 1; background: #15314a; padding: 10px; white-space: nowrap; font-size: 11px; }
.vip-module table td { font-size: 11px; padding: 9px 10px; }
.vip-module .notice { font-size: 12px; }
.vip-module #raw { max-width: 100%; overflow-x: auto; }

/* Chart page: full available width without squashing chart controls */
.vip-chart .nav { background: var(--vip-navy); color: #fff; border-color: #273e56; box-shadow: none; padding: 12px clamp(12px,2vw,32px); }
.vip-chart .nav-link { color: #9de3d6; }
.vip-chart #chart-title { font-size: 14px; color: #f2f8fc; }
.vip-chart .nav-buttons { flex-wrap: wrap; gap: 6px; }
.vip-chart .nav-buttons .btn { border-color: #3b5772; color: #e9f2fc; background: #203954; font-size: 11px; }
.vip-chart .nav-buttons .btn-active { color: white; background: #0a8880; border-color: #0a8880; }
.vip-chart .stock-header { margin: 15px clamp(10px,2vw,32px); padding: 15px; border: 1px solid var(--vip-line); box-shadow: var(--vip-soft-shadow); }
.vip-chart #stock-symbol { font-size: 18px; }
.vip-chart .current-price { font-size: 21px; }
.vip-chart .score-badge { font-size: 15px; border-width: 1px; padding: 6px 12px; }
.vip-chart .chart-container { height: clamp(310px,55vh,570px); margin: 0 clamp(10px,2vw,32px) 10px; border: 1px solid var(--vip-line); box-shadow: var(--vip-soft-shadow); }
.vip-chart .volume-container { margin: 0 clamp(10px,2vw,32px) 15px; border: 1px solid var(--vip-line); box-shadow: var(--vip-soft-shadow); }
.vip-chart .info-panels { margin: 0 clamp(10px,2vw,32px) 28px; grid-template-columns: repeat(auto-fit,minmax(min(100%,265px),1fr)); gap: 11px; }
.vip-chart .info-panels .panel { border: 1px solid var(--vip-line); box-shadow: var(--vip-soft-shadow); padding: 15px; }

/* Tablets */
@media (max-width: 980px) {
  .vip-dashboard .primary-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .vip-dashboard .stats-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .vip-admin .vip-grid { grid-template-columns: 1fr; }
}
/* Phones */
@media (max-width: 640px) {
  body.vip-dashboard, body.vip-admin, body.vip-login, body.vip-module, body.vip-chart { font-size: 12px; }
  .vip-dashboard .site-header { position: static; }
  .vip-dashboard .header-content { display: flex; flex-direction: column; align-items: stretch; gap: 11px; padding: 12px; }
  .vip-dashboard .header-brand { text-align: right; }
  .vip-dashboard .brand-copy .brand-title { font-size: 15px; }
  .vip-dashboard .account-actions { justify-content: space-between; flex-wrap: wrap; gap: 6px; }
  .vip-dashboard .account-chip { flex: 1 1 135px; padding: 5px 7px; }
  .vip-dashboard .account-copy { max-width: min(100%,230px); }
  .vip-dashboard .account-copy small { font-size: 9px; }
  .vip-dashboard .header-link { font-size: 10.5px; padding: 7px 9px; }
  .vip-dashboard .workspace-intro { flex-direction: column; align-items: start; gap: 12px; padding: 18px; border-radius: 15px; }
  .vip-dashboard .workspace-caption { font-size: 10px; padding: 7px 9px; }
  .vip-dashboard .workspace-intro h1 { font-size: 21px; }
  .vip-dashboard .workspace-intro p { font-size: 11px; }
  .vip-dashboard .command-center { padding: 12px; border-radius: 15px; }
  .vip-dashboard .section-heading { align-items: start; }
  .vip-dashboard .section-heading h2 { font-size: 14px; }
  .vip-dashboard .section-note { display: none; }
  .vip-dashboard .primary-actions { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .vip-dashboard .action-primary { min-height: 76px; padding: 9px; gap: 5px; font-size: 11px; align-content: center; }
  .vip-dashboard .action-primary small { padding-right: 0; margin: 0; font-size: 9px; }
  .vip-dashboard .action-symbol { width: 25px; height: 25px; flex-basis: 25px; font-size: 16px; }
  .vip-dashboard .tools-hint { display: none; }
  .vip-dashboard .summary-chevron { margin-right: auto; }
  .vip-dashboard .secondary-actions { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .vip-dashboard .secondary-actions .btn { min-height: 42px; padding: 8px 9px; font-size: 11px; }
  .vip-dashboard .stat-box { padding: 9px; gap: 8px; }
  .vip-dashboard .stat-icon { flex-basis: 30px; width: 30px; height: 30px; font-size: 14px; }
  .vip-dashboard .stat-value { font-size: 17px; }
  .vip-dashboard .stat-label { font-size: 9.5px; }
  .vip-dashboard .welcome-screen { padding: 32px 13px; }
  .vip-dashboard .welcome-features { flex-direction: column; align-items: stretch; width: min(100%,265px); margin: auto; }
  .vip-dashboard .feature-item { justify-content: center; }
  .vip-dashboard .stock-grid { grid-template-columns: minmax(0,1fr); gap: 11px; }
  .vip-dashboard .card-header { flex-wrap: wrap; }
  .vip-dashboard .price-score-row { flex-wrap: wrap; gap: 8px; }
  .vip-dashboard .info-grid, .vip-dashboard .tp-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .vip-dashboard .card-actions .btn { flex-basis: 100%; }
  .vip-dashboard .stocks-panel { padding: 12px; }
  .vip-admin .admin-header { padding: 12px; }
  .vip-admin .brand-copy .brand-title { font-size: 15px; }
  .vip-admin .admin-header-actions { width: 100%; justify-content: space-between; }
  .vip-admin .admin-main { padding: 15px 12px; }
  .vip-admin .admin-intro h1 { font-size: 20px; }
  .vip-admin .admin-privilege { font-size: 10px; }
  .vip-admin .admin-form-grid { grid-template-columns: 1fr; gap: 10px; }
  .vip-admin .panel-title-row { align-items: flex-start; }
  .vip-admin .admin-inline-actions { flex-direction: column; align-items: stretch; }
  .vip-admin .admin-inline-actions form, .vip-admin .admin-inline-actions button { width: 100%; }
  .vip-admin .vip-panel { padding: 13px; }
  .vip-admin .import-form > button { width: 100%; }
  .vip-module .module-topbar { padding: 10px 12px; }
  .vip-module .page { padding: 12px; }
  .vip-module .card { padding: 13px; }
  .vip-module .toolbar > * { min-height: 39px; }
  .vip-chart .nav { align-items: stretch; padding: 12px; gap: 8px; }
  .vip-chart #chart-title { text-align: center; }
  .vip-chart .nav-buttons { width: 100%; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
  .vip-chart .nav-buttons .btn { min-width: 0; padding: 8px 3px; font-size: 10px; }
  .vip-chart .stock-header { margin: 10px 8px; gap: 11px; padding: 13px; }
  .vip-chart .stock-info-right { justify-content: center; }
  .vip-chart .ohlc-data { gap: 9px; font-size: 10.5px; }
  .vip-chart .chart-container { height: clamp(300px,52vh,460px); margin: 0 8px 8px; }
  .vip-chart .volume-container { height: 100px; margin: 0 8px 12px; }
  .vip-chart .info-panels { margin: 0 8px 20px; }
}
@media (max-width: 365px) {
  .vip-dashboard .secondary-actions { grid-template-columns: 1fr; }
  .vip-dashboard .action-primary { font-size: 10px; }
  .vip-dashboard .account-copy small { max-width: 118px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
/* Header buttons must remain legible on the dark surface despite shared .btn-outline. */
.vip-dashboard .site-header .header-link,
.vip-dashboard .site-header .header-link:visited { color: #e3eff9; background: rgba(255,255,255,.04); border-color: #3c5067; }
.vip-dashboard .site-header .header-link:hover { color: #fff; border-color: #60bdb5; background: rgba(255,255,255,.09); }
/* Small-screen portfolio calculations keep a usable swipeable table. */
.vip-portfolio .card { max-width: 100%; overflow-x: auto; }
.vip-portfolio table { min-width: 680px; }
.vip-portfolio input { max-width: 100%; width: min(100%,175px); }
.vip-login .error-home { display: inline-block; background: #0b8382; color: #fff; padding: 9px 16px; border-radius: 9px;
  text-decoration: none; font-size: 12px; font-weight: 700; }
.vip-login .error-home:hover { background: #096d70; }
