:root {
  color-scheme: light;
  --ink: #1d2733;
  --muted: #677385;
  --faint: #8b98a8;
  --line: #dde3ea;
  --paper: #eef2f6;
  --panel: #ffffff;
  --panel-soft: #f7f9fb;
  --terminal: #202633;
  --terminal-2: #2b3342;
  --green: #15915c;
  --red: #d14b5a;
  --blue: #387ed1;
  --orange: #ff8f1f;
  --shadow: 0 10px 30px rgba(24, 35, 50, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
}

.auth-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 430px);
  gap: 0;
  background: #f4f7fa;
}

.brand-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  min-height: 620px;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(34px, 6vw, 76px);
  color: #fff;
  background:
    linear-gradient(rgba(21, 30, 43, 0.48), rgba(21, 30, 43, 0.9)),
    url("https://images.unsplash.com/photo-1642790106117-e829e14a795f?auto=format&fit=crop&w=1600&q=80") center/cover;
}

.brand-panel h1 {
  max-width: 760px;
  margin: 0 0 16px;
  font-size: clamp(44px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: 0;
}

.brand-panel p {
  max-width: 680px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.55;
}

.ticker-strip {
  position: absolute;
  top: 20px;
  left: 24px;
  right: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ticker-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.22);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 760px;
}

.stat-row div {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.stat-row strong,
.stat-row span {
  display: block;
}

.stat-row strong {
  font-size: 22px;
}

.stat-row span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.76);
}

.auth-card {
  align-self: center;
  width: calc(100% - 48px);
  margin: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.form-header {
  margin-bottom: 22px;
}

.eyebrow {
  display: block;
  margin-top: 3px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1,
h2 {
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}

label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: #344256;
  font-size: 12px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(56, 126, 209, 0.14);
}

.primary-btn,
.ghost-btn,
.icon-btn,
.segment,
.tab {
  min-height: 34px;
  border-radius: 4px;
  border: 1px solid transparent;
  font-weight: 800;
}

.primary-btn {
  width: 100%;
  color: #fff;
  background: var(--blue);
}

.primary-btn:hover {
  background: #2f6fb9;
}

.ghost-btn {
  padding: 0 11px;
  border-color: rgba(255, 255, 255, 0.18);
  color: #e7ebf0;
  background: rgba(255, 255, 255, 0.05);
}

.icon-btn {
  width: 34px;
  flex: 0 0 34px;
  border-color: var(--line);
  color: var(--ink);
  background: #fff;
}

.desk-header .icon-btn {
  border-color: rgba(255, 255, 255, 0.18);
  color: #e7ebf0;
  background: rgba(255, 255, 255, 0.05);
}

.fine-print,
.message {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.mode-warning {
  padding: 8px 10px;
  border: 1px solid #e3e8ef;
  border-radius: 4px;
  background: #f8fafc;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 14px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.admin-login-btn {
  width: 100%;
  border-color: var(--line);
  color: var(--ink);
  background: #fff;
}

.desk-view {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 10px;
  padding: 0 12px 12px;
}

.desk-header {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  min-height: 58px;
  margin: 0 -12px;
  padding: 8px 14px;
  background: var(--terminal);
  box-shadow: 0 4px 18px rgba(12, 18, 26, 0.18);
}

.terminal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  color: #fff;
}

.brand-logo {
  display: block;
  width: 34px;
  height: 34px;
  padding: 3px;
  border-radius: 4px;
  background: #fff;
  object-fit: contain;
}

.terminal-brand strong,
.terminal-brand span {
  display: block;
}

.terminal-brand span {
  margin-top: 2px;
  color: #aab4c2;
  font-size: 11px;
}

.terminal-nav {
  display: flex;
  gap: 2px;
  align-items: stretch;
  min-width: 0;
}

.terminal-nav button {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 13px;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #bdc7d5;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
}

.terminal-nav .active {
  color: #fff;
  border-bottom-color: var(--orange);
  background: rgba(255, 255, 255, 0.04);
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.index-ticker,
.market-status,
.user-badge,
.price-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
}

.index-ticker {
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #dfe5ed;
  background: var(--terminal-2);
}

.market-status {
  border: 1px solid rgba(21, 145, 92, 0.35);
  color: #d8f7e8;
  background: rgba(21, 145, 92, 0.16);
}

.user-badge {
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-height: 36px;
  max-width: 210px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e7ebf0;
  background: rgba(255, 255, 255, 0.06);
}

.user-badge span,
.user-badge small {
  overflow: hidden;
  max-width: 100%;
  color: #9facbc;
  font-size: 10px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-badge strong {
  overflow: hidden;
  max-width: 100%;
  font-size: 12px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.site-footer {
  padding: 12px 16px 18px;
  color: var(--muted);
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.summary-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.summary-card {
  display: grid;
  gap: 3px;
  padding: 11px 13px;
}

.summary-card span,
.summary-card small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.summary-card strong {
  display: block;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.12;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(250px, 310px) minmax(430px, 1fr) minmax(330px, 390px);
  gap: 10px;
  align-items: stretch;
  min-height: 0;
}

.panel {
  min-width: 0;
  padding: 0;
  overflow: hidden;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
}

.search-input {
  max-width: 145px;
  min-height: 32px;
  font-size: 12px;
}

.stock-list {
  display: grid;
  max-height: calc(100vh - 188px);
  overflow: auto;
  background: #fff;
}

.stock-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #eef2f6;
  border-left: 3px solid transparent;
  border-radius: 0;
  background: #fff;
  text-align: left;
}

.stock-row:hover {
  background: #f7fbff;
}

.stock-row.active {
  border-left-color: var(--orange);
  background: #fff8f0;
}

.stock-symbol {
  display: block;
  overflow: hidden;
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-name {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-price {
  text-align: right;
  font-size: 13px;
  font-weight: 900;
}

.stock-change {
  display: block;
  margin-top: 2px;
  font-size: 11px;
}

.positive {
  color: var(--green);
}

.negative {
  color: var(--red);
}

.trade-panel {
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr) auto;
}

.price-pill {
  border: 1px solid rgba(56, 126, 209, 0.18);
  color: var(--blue);
  background: #eef6ff;
}

.chart-wrap {
  height: clamp(220px, 26vh, 280px);
  margin: 0;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(#f7f9fc 1px, transparent 1px),
    linear-gradient(90deg, #f7f9fc 1px, transparent 1px),
    #fff;
  background-size: 52px 42px;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.order-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px;
  background: #fbfcfe;
}

.segmented {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.segment {
  border-color: var(--line);
  background: #fff;
  color: var(--muted);
}

.segment.active[data-side="BUY"] {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}

.segment.active[data-side="SELL"] {
  border-color: var(--red);
  color: #fff;
  background: var(--red);
}

.portfolio-tools {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.order-preview {
  grid-column: 1 / -1;
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid #e4e9f0;
  border-radius: 4px;
  color: #334155;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
}

.order-form .primary-btn,
.message {
  grid-column: 1 / -1;
}

.portfolio-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 520px;
}

.tabs {
  display: flex;
  gap: 0;
  margin: 0;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
}

.tab {
  min-width: 92px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
}

.tab.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
  background: #fff;
}

.tab-body {
  min-height: 0;
  overflow: auto;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f6;
  text-align: right;
  white-space: nowrap;
}

th:first-child,
td:first-child {
  text-align: left;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  background: #fbfcfe;
  font-size: 11px;
  text-transform: uppercase;
}

td {
  font-size: 13px;
}

.empty-state {
  padding: 26px 14px;
  color: var(--muted);
  text-align: center;
}

.timeline,
.leaderboard,
.admin-user-list {
  display: grid;
  gap: 0;
}

.trade-item,
.leader-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border-bottom: 1px solid #eef2f6;
  background: #fff;
}

.side-badge {
  min-width: 44px;
  padding: 5px 8px;
  border-radius: 4px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.side-badge.buy {
  background: var(--green);
}

.side-badge.sell {
  background: var(--red);
}

.leader-rank {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  background: #eef6ff;
  color: var(--blue);
  font-weight: 900;
}

.reports-panel,
.admin-panel,
.news-panel,
.assignments-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid #eef2f6;
  border-radius: 4px;
  overflow: hidden;
}

.report-summary div,
.report-section,
.admin-user-row {
  background: #fff;
}

.report-summary div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-right: 1px solid #eef2f6;
  border-bottom: 1px solid #eef2f6;
}

.report-summary span,
.report-split span,
.admin-header span,
.admin-user-row span,
.allocation-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.report-summary span {
  text-transform: uppercase;
}

.report-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #eef2f6;
  border-radius: 4px;
}

.report-section h3 {
  margin: 0;
  font-size: 13px;
}

.report-split {
  display: grid;
  gap: 8px;
}

.report-split span {
  display: flex;
  justify-content: space-between;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge-row span {
  padding: 6px 8px;
  border-radius: 999px;
  color: var(--blue);
  background: #eef6ff;
  font-size: 11px;
  font-weight: 900;
}

.export-btn {
  width: max-content;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.allocation-row {
  display: grid;
  grid-template-columns: minmax(76px, 0.8fr) 1fr auto;
  gap: 10px;
  align-items: center;
}

.allocation-row > span,
.allocation-value {
  display: grid;
  gap: 2px;
}

.allocation-row > div {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f6;
}

.allocation-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--orange);
}

.allocation-value {
  min-width: 98px;
  text-align: right;
  font-size: 12px;
  font-weight: 900;
}

.admin-header,
.admin-user-row {
  display: grid;
  gap: 10px;
}

.admin-header {
  grid-template-columns: 1fr;
  padding: 12px;
  border: 1px solid #eef2f6;
  border-radius: 4px;
  background: #fbfcfe;
}

.admin-header strong {
  display: block;
  font-size: 16px;
}

.admin-filters {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(130px, 180px);
  gap: 8px;
}

.admin-user-list {
  overflow-x: auto;
  border: 1px solid #eef2f6;
  border-radius: 4px;
  background: #fff;
}

.admin-table-head,
.admin-user-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.5fr) minmax(120px, 0.9fr) 90px minmax(105px, 0.85fr) minmax(105px, 0.85fr) 64px minmax(168px, 1fr) minmax(178px, 1.2fr);
  gap: 10px;
  align-items: center;
  min-width: 1160px;
}

.admin-table-head {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 9px 10px;
  border-bottom: 1px solid #eef2f6;
  color: var(--muted);
  background: #fbfcfe;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-user-row {
  padding: 9px 10px;
  border-bottom: 1px solid #eef2f6;
}

.admin-user-row:nth-child(even) {
  background: #fbfcfe;
}

.admin-student-cell {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.admin-student-cell strong,
.admin-student-cell span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pill {
  display: inline-flex;
  justify-content: center;
  width: max-content;
  min-width: 68px;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.status-pill.active {
  color: var(--green);
  background: rgba(21, 145, 92, 0.11);
}

.status-pill.paused {
  color: var(--red);
  background: rgba(209, 75, 90, 0.11);
}

.admin-user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-fund-cell {
  display: grid;
  grid-template-columns: minmax(88px, 1fr) auto;
  gap: 6px;
}

.admin-fund-cell input {
  min-height: 28px;
  padding: 5px 7px;
  font-size: 12px;
}

.admin-user-actions button,
.admin-fund-cell button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
}

.admin-user-actions .danger-confirm {
  border-color: rgba(209, 75, 90, 0.45);
  color: #fff;
  background: var(--red);
}

.research-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.research-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.research-header strong,
.research-header span {
  display: block;
}

.research-header > div > strong {
  font-size: 17px;
}

.research-header > div > span,
.research-note {
  color: var(--muted);
  font-size: 12px;
}

.research-note {
  margin: 0;
  line-height: 1.45;
}

.news-strip {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #eef2f6;
  border-radius: 4px;
  background: #fffaf2;
}

.news-strip strong {
  font-size: 12px;
}

.news-strip span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.panel-list-header,
.announcement-item,
.assignment-item {
  padding: 12px;
  border: 1px solid #eef2f6;
  border-radius: 4px;
  background: #fff;
}

.announcement-composer {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dce7f5;
  border-radius: 4px;
  background: #f8fbff;
}

.announcement-composer textarea {
  width: 100%;
  resize: vertical;
}

.announcement-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.tiny-action {
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  background: #fff;
  font-size: 11px;
  font-weight: 900;
}

.panel-list-header strong,
.panel-list-header span,
.announcement-item strong,
.announcement-item p {
  display: block;
}

.panel-list-header span,
.announcement-item p,
.assignment-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.assignment-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
}

.assignment-item > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  color: var(--blue);
  background: #eef6ff;
  font-weight: 900;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid #eef2f6;
  border-radius: 4px;
  overflow: hidden;
}

.metric-grid div {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 10px;
  border-right: 1px solid #eef2f6;
  border-bottom: 1px solid #eef2f6;
  background: #fff;
}

.metric-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-grid strong {
  font-size: 13px;
}

.mini-bars {
  display: grid;
  gap: 8px;
}

.mini-bars h3 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
}

.bar-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.bar-row div {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f6;
}

.bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

@media (max-width: 1180px) {
  .desk-header {
    grid-template-columns: 1fr;
    position: static;
  }

  .terminal-nav {
    overflow-x: auto;
  }

  .header-actions {
    justify-content: flex-start;
  }

  .workspace-grid {
    grid-template-columns: minmax(250px, 330px) minmax(380px, 1fr);
  }

  .portfolio-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .auth-view,
  .workspace-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .desk-view {
    padding: 0 8px 8px;
  }

  .desk-header {
    margin: 0 -8px;
  }

  .brand-panel {
    min-height: 540px;
  }

  .stat-row {
    grid-template-columns: 1fr;
  }

  .stock-list {
    max-height: 380px;
  }

  .trade-panel {
    grid-template-rows: auto auto auto;
  }

  .order-form {
    grid-template-columns: 1fr;
  }

  .portfolio-panel {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .brand-panel {
    padding: 28px 20px;
  }

  .auth-card {
    width: auto;
    margin: 14px;
    padding: 18px;
  }

  .terminal-brand {
    min-width: 0;
  }

  .terminal-nav button {
    padding: 0 10px;
  }

  .tab {
    min-width: 0;
    flex: 1;
  }
}
