:root {
  --bg: #080b10;
  --surface: #111720;
  --surface-2: #161e29;
  --surface-3: #1b2532;
  --input: #0c1219;
  --border: #273241;
  --border-strong: #3a485b;
  --text: #f5f7fb;
  --text-2: #b7c0cc;
  --muted: #7f8a99;
  --primary: #6e8bff;
  --primary-hover: #839bff;
  --info: #55c2ff;
  --success: #39d98a;
  --warning: #f5b849;
  --pending: #ad98ff;
  --danger: #ff647c;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

html {
  color-scheme: dark;
  background: var(--bg);
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 90% -10%, rgba(110, 139, 255, .08), transparent 36rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.45;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
summary,
label {
  -webkit-tap-highlight-color: transparent;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #344052;
  border: 2px solid var(--bg);
  border-radius: 999px;
}

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

.nav-rail {
  display: none;
}

.app-stage {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(8, 11, 16, .92);
  backdrop-filter: blur(18px);
}

.topbar-brand {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-overline,
.section-index {
  color: var(--primary-hover);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.topbar-brand strong {
  color: var(--text);
  font-size: 16px;
  letter-spacing: -.02em;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.device-chip,
.live-chip {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, .02);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 600;
}

.live-chip i,
.refresh-note i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(57, 217, 138, .1);
}

.dashboard {
  width: min(1400px, 100%);
  margin: 0 auto;
  padding: 24px 24px 56px;
}

.hero-row {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.hero-copy h1 {
  margin-top: 5px;
  color: var(--text);
  font-size: 28px;
  line-height: 1.18;
  letter-spacing: -.04em;
}

.hero-copy p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}

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

.stat-chip {
  min-width: 0;
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 12px 13px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.stat-chip::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: #526071;
}

.stat-chip span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}

.stat-chip b {
  color: var(--text);
  font-size: 23px;
  line-height: 1;
  letter-spacing: -.04em;
}

.stat-chip i {
  display: none;
}

.stat-ready::after {
  background: var(--info);
}

.stat-wait::after {
  background: var(--warning);
}

.stat-pending::after {
  background: var(--pending);
}

.stat-success::after {
  background: var(--success);
}

.stat-error::after {
  background: var(--danger);
}

.launch-panel {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .2);
}

.launch-panel > summary {
  list-style: none;
}

.launch-panel > summary::-webkit-details-marker {
  display: none;
}

.panel-topline {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
}

.launch-panel[open] .panel-topline {
  border-bottom: 1px solid var(--border);
}

.panel-topline h2 {
  margin-top: 2px;
  color: var(--text);
  font-size: 17px;
  letter-spacing: -.02em;
}

.panel-summary-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.format-help {
  color: var(--muted);
  font-size: 11px;
}

.panel-toggle {
  min-width: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 700;
}

.panel-toggle::after {
  content: "⌃";
}

.launch-panel:not([open]) .panel-toggle {
  font-size: 0;
}

.launch-panel:not([open]) .panel-toggle::before {
  content: "Mở bảng tạo";
  font-size: 11px;
}

.launch-panel:not([open]) .panel-toggle::after {
  content: "⌄";
  font-size: 11px;
}

.launch-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr);
  gap: 18px;
  padding: 16px;
}

.account-composer,
.launch-settings {
  min-width: 0;
}

.field-head,
.pane-heading,
.sessions-heading,
.verify-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field-head label,
.form-group > label {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 700;
}

.field-head a {
  color: var(--primary-hover);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.field-head a:hover {
  text-decoration: underline;
}

.field-head span {
  color: var(--muted);
  font-size: 10px;
}

.field-head small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.input-caption {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}

.settings-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.proxy-field {
  margin-top: 12px;
}

textarea,
input[type="text"],
input[type="date"],
select {
  width: 100%;
  min-height: 40px;
  outline: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input);
  color: var(--text);
  padding: 9px 11px;
  font-size: 13px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

textarea {
  resize: vertical;
  line-height: 1.55;
}

textarea::placeholder,
input::placeholder {
  color: #657181;
}

textarea:hover,
input:hover,
select:hover {
  border-color: var(--border-strong);
}

textarea:focus,
input:focus,
select:focus {
  border-color: var(--primary);
  background: #0e151e;
  box-shadow: 0 0 0 3px rgba(110, 139, 255, .14);
}

select {
  color-scheme: dark;
}

.account-composer textarea {
  min-height: 146px;
  margin-top: 7px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12px;
}

.proxy-field textarea {
  min-height: 64px;
}

.launch-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 14px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-accent,
.btn-amber {
  background: var(--warning);
  color: #201605;
}

.btn-accent:hover,
.btn-amber:hover {
  background: #ffca65;
}

.btn-ghost,
.btn-outline,
.btn-success,
.btn-purple,
.btn-cyan {
  border-color: var(--border);
  background: var(--surface-2);
  color: var(--text-2);
}

.btn-ghost:hover,
.btn-outline:hover,
.btn-success:hover,
.btn-purple:hover,
.btn-cyan:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-danger {
  border-color: rgba(255, 100, 124, .32);
  background: rgba(255, 100, 124, .09);
  color: #ff9bad;
}

.btn-sm {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 12px;
}

.btn-xs {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 11px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 17px;
  text-decoration: none;
  cursor: pointer;
}

.icon-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.icon-btn.danger {
  border-color: rgba(255, 100, 124, .26);
  background: rgba(255, 100, 124, .08);
  color: #ff8da0;
}

.sessions-section {
  margin-top: 24px;
  container-type: inline-size;
}

.sessions-heading {
  align-items: flex-end;
  margin-bottom: 12px;
}

.sessions-heading h2 {
  margin-top: 2px;
  font-size: 21px;
  letter-spacing: -.03em;
}

.session-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.refresh-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 4px;
  color: var(--muted);
  font-size: 11px;
}

.session-toolbar {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
}

.search-box {
  min-width: 260px;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input);
  color: var(--muted);
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(110, 139, 255, .12);
}

.search-box input {
  min-height: 36px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.search-box input:focus {
  background: transparent;
  box-shadow: none;
}

#card-status-filter {
  width: 210px;
  min-height: 38px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  background: var(--surface);
  text-align: center;
}

.empty-orbit {
  width: 64px;
  height: 64px;
  position: relative;
  margin-bottom: 16px;
}

.empty-orbit span {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(110, 139, 255, .5);
  border-radius: 50%;
}

.empty-orbit span:nth-child(2) {
  inset: 0 18px;
  transform: rotate(55deg);
}

.empty-orbit i {
  position: absolute;
  width: 9px;
  height: 9px;
  left: 28px;
  top: 28px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 18px rgba(110, 139, 255, .5);
}

.empty-kicker {
  color: var(--primary-hover);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
}

.empty-state h3 {
  margin-top: 6px;
  font-size: 20px;
}

.empty-state p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.empty-shortcut {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 11px;
}

kbd {
  padding: 3px 7px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--text-2);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
}

.acc-card {
  --card-accent: #617085;
  min-width: 0;
  overflow: visible;
  position: relative;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .3);
  transition: border-color .16s ease;
}

.acc-card:hover {
  border-color: var(--border-strong);
}

.acc-card::before {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0 0 auto;
  height: 3px;
  background: var(--card-accent);
}

.acc-card.status-LOGGING_IN,
.acc-card.status-INIT_SHEERID,
.acc-card.status-SUBMITTING_INFO {
  --card-accent: var(--info);
}

.acc-card.status-READY_FOR_EMAIL {
  --card-accent: var(--info);
}

.acc-card.status-WAITING_EMAIL_LINK {
  --card-accent: var(--warning);
}

.acc-card.status-UPLOADING_DOC,
.acc-card.status-PENDING_REVIEW {
  --card-accent: var(--pending);
}

.acc-card.status-VERIFIED {
  --card-accent: var(--success);
}

.acc-card.status-ERROR {
  --card-accent: var(--danger);
}

.session-card-head {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--border);
  border-radius: 13px 13px 0 0;
  background: #131a24;
}

.session-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.session-number {
  color: var(--muted);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
}

.session-avatar {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--card-accent) 45%, var(--border));
  border-radius: 10px;
  background: color-mix(in srgb, var(--card-accent) 12%, var(--surface-2));
  color: var(--card-accent);
  font-size: 15px;
  font-weight: 800;
}

.session-title {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.session-title > span:first-child {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.session-title-line {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.session-title-line strong {
  min-width: 0;
  max-width: 245px;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-tags {
  display: flex;
  gap: 5px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 19px;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.tag-2fa {
  border-color: rgba(173, 152, 255, .32);
  background: rgba(173, 152, 255, .09);
  color: #c8bbff;
}

.tag-proxy {
  border-color: rgba(245, 184, 73, .3);
  background: rgba(245, 184, 73, .08);
  color: #f5c66f;
}

.session-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  color: var(--text-2);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.status-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-LOGGING_IN,
.badge-INIT_SHEERID,
.badge-SUBMITTING_INFO,
.badge-READY_FOR_EMAIL {
  border-color: rgba(85, 194, 255, .28);
  background: rgba(85, 194, 255, .09);
  color: var(--info);
}

.badge-WAITING_EMAIL_LINK {
  border-color: rgba(245, 184, 73, .3);
  background: rgba(245, 184, 73, .09);
  color: var(--warning);
}

.badge-UPLOADING_DOC,
.badge-PENDING_REVIEW {
  border-color: rgba(173, 152, 255, .3);
  background: rgba(173, 152, 255, .09);
  color: var(--pending);
}

.badge-VERIFIED {
  border-color: rgba(57, 217, 138, .3);
  background: rgba(57, 217, 138, .09);
  color: var(--success);
}

.badge-ERROR {
  border-color: rgba(255, 100, 124, .3);
  background: rgba(255, 100, 124, .09);
  color: var(--danger);
}

.start-session-btn {
  display: none;
}

.status-IDLE .start-session-btn,
.status-ERROR .start-session-btn {
  display: inline-flex;
}

.recover-session-btn {
  opacity: .72;
}

.status-ERROR .recover-session-btn {
  border-color: rgba(255, 100, 124, .36);
  color: var(--danger);
  opacity: 1;
}

.session-status {
  padding: 11px 14px 12px;
  border-bottom: 1px solid var(--border);
  background: #0f151d;
}

.status-main {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.status-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.status-detail {
  min-width: 0;
  overflow: hidden;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 600;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.step-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
}

.step-pill {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 30px;
  padding: 4px 5px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.step-pill i {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  font-size: 9px;
  font-style: normal;
}

.step-pill.done {
  border-color: rgba(57, 217, 138, .24);
  background: rgba(57, 217, 138, .06);
  color: #7be6ae;
}

.step-pill.active {
  border-color: var(--primary);
  background: rgba(110, 139, 255, .16);
  color: #c5d0ff;
}

.session-alerts:empty {
  display: none;
}

.status-banner,
.error-box {
  margin: 10px 14px 0;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.45;
}

.banner-pending {
  border-color: rgba(173, 152, 255, .28);
  background: rgba(173, 152, 255, .08);
  color: #d4caff;
}

.banner-uploading {
  border-color: rgba(85, 194, 255, .28);
  background: rgba(85, 194, 255, .08);
  color: #aadeff;
}

.banner-verified {
  border-color: rgba(57, 217, 138, .28);
  background: rgba(57, 217, 138, .08);
  color: #94efbd;
}

.error-box {
  border-color: rgba(255, 100, 124, .3);
  background: rgba(255, 100, 124, .08);
  color: #ffacba;
}

.verification-pane {
  display: none;
  padding: 13px 14px 14px;
  border-bottom: 1px solid var(--border);
}

.status-READY_FOR_EMAIL .verification-pane,
.status-WAITING_EMAIL_LINK .verification-pane {
  display: block;
}

.verify-heading {
  margin-bottom: 10px;
}

.verify-heading > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.verify-heading > div:first-child span {
  color: var(--primary-hover);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
}

.verify-heading > div:first-child strong {
  color: var(--text);
  font-size: 13px;
}

.compact-actions {
  display: flex;
  gap: 12px;
}

.text-action {
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.text-action:hover {
  color: var(--primary-hover);
}

.verify-row {
  display: none;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}

.status-READY_FOR_EMAIL [data-action="email"],
.status-WAITING_EMAIL_LINK [data-action="link"] {
  display: grid;
}

.verify-number {
  width: 30px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 800;
}

.hl-email .verify-number {
  border-color: rgba(85, 194, 255, .4);
  background: rgba(85, 194, 255, .1);
  color: var(--info);
}

.hl-link .verify-number {
  border-color: rgba(245, 184, 73, .4);
  background: rgba(245, 184, 73, .1);
  color: var(--warning);
}

.verify-field {
  min-width: 0;
}

.verify-field > label {
  display: block;
  margin-bottom: 5px;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 700;
}

.input-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.input-row input {
  min-width: 0;
  flex: 1;
  min-height: 40px;
}

.card-details {
  position: relative;
  border-bottom: 1px solid var(--border);
  background: #101720;
}

.card-details > summary,
.session-console > summary {
  list-style: none;
  cursor: pointer;
}

.card-details > summary::-webkit-details-marker,
.session-console > summary::-webkit-details-marker {
  display: none;
}

.profile-summary {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
}

.profile-summary:hover {
  background: rgba(255, 255, 255, .02);
}

.profile-person,
.profile-document {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.summary-icon,
.document-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--primary-hover);
  font-size: 10px;
  font-weight: 800;
}

.document-icon {
  border-color: rgba(255, 100, 124, .28);
  background: rgba(255, 100, 124, .08);
  color: #ff9bad;
}

.profile-person > div,
.profile-document > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-person small,
.profile-document small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.profile-person strong,
.profile-document strong {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-person > div > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.details-hint {
  min-width: 94px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 700;
}

.details-hint::after {
  content: "+";
  color: var(--primary-hover);
  font-size: 16px;
  line-height: 1;
}

.card-details[open] .details-hint {
  font-size: 0;
}

.card-details[open] .details-hint::before {
  content: "Thu gọn";
  font-size: 11px;
}

.card-details[open] .details-hint::after {
  content: "−";
}

.profile-details-body {
  position: fixed;
  z-index: 101;
  top: 64px;
  right: 0;
  bottom: 0;
  width: min(580px, 94vw);
  overflow-y: auto;
  padding: 0 20px 24px;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: -24px 0 70px rgba(0, 0, 0, .48);
  animation: drawer-in .18s ease-out;
}

.card-details[open]::before {
  content: "";
  position: fixed;
  z-index: 100;
  inset: 64px 0 0;
  background: rgba(4, 7, 11, .58);
  backdrop-filter: blur(3px);
}

@keyframes drawer-in {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.profile-drawer-head {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 -20px 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(17, 23, 32, .96);
  backdrop-filter: blur(14px);
}

.profile-drawer-head > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.profile-drawer-head span {
  color: var(--primary-hover);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
}

.profile-drawer-head strong {
  color: var(--text);
  font-size: 17px;
}

.profile-fields {
  display: grid;
  grid-template-columns: 1fr 1fr 132px;
  gap: 9px;
  padding-top: 13px;
}

.profile-fields label {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.profile-fields label span {
  color: var(--text-2);
  font-size: 11px;
  font-weight: 700;
}

.profile-fields .span-2 {
  grid-column: span 2;
}

.mini-input {
  min-height: 38px !important;
  padding: 8px 10px !important;
  font-size: 12px !important;
}

.profile-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.session-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 11px;
}

.session-meta > span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input);
}

.session-meta small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.session-meta b {
  overflow: hidden;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-console {
  position: relative;
  border-radius: 0 0 13px 13px;
  background: #0b1016;
}

.console-head {
  min-height: 40px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
}

.console-head:hover {
  background: rgba(255, 255, 255, .02);
}

.console-head > span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 700;
}

.console-head > span i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
}

.console-head code {
  color: var(--muted);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
}

.console-head b {
  color: var(--primary-hover);
  font-size: 11px;
  font-weight: 700;
}

.console-head b::after {
  content: " +";
}

.session-console[open] .console-head b {
  font-size: 0;
}

.session-console[open] .console-head b::before {
  content: "Thu gọn";
  font-size: 11px;
}

.session-console[open] .console-head b::after {
  content: " −";
  font-size: 13px;
}

.card-logs {
  height: 120px;
  overflow-y: auto;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: #080c11;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  line-height: 1.55;
}

.console-popover {
  position: fixed;
  z-index: 102;
  right: 24px;
  bottom: 24px;
  width: min(660px, calc(100vw - 48px));
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: #080c11;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .58);
  animation: popover-in .16s ease-out;
}

@keyframes popover-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.console-popover-head {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 10px 8px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.console-popover-head > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.console-popover-head span {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--success);
}

.console-popover-head strong {
  font-size: 13px;
}

.console-popover-head code {
  overflow: hidden;
  color: var(--muted);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.console-popover .card-logs {
  height: 230px;
  border-top: 0;
  font-size: 11.5px;
}

.log-line {
  word-break: break-word;
}

.log-ts {
  margin-right: 7px;
  color: #596576;
}

.log-info {
  color: #a5afbd;
}

.log-ok {
  color: #64dda0;
}

.log-warn {
  color: #efbd61;
}

.log-error {
  color: #ff879b;
  font-weight: 700;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 7, 11, .82);
  backdrop-filter: blur(8px);
}

.modal-backdrop.open {
  display: flex;
}

.modal-box {
  width: min(1040px, 94vw);
  height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .58);
}

.modal-header {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 15px;
  border-bottom: 1px solid var(--border);
}

.modal-header > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal-header strong {
  font-size: 14px;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.modal-body {
  flex: 1;
  background: #1a2029;
}

.modal-body iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

@container (max-width: 1120px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }
}

@container (max-width: 610px) {
  .session-card-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .session-head-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .session-title-line strong {
    max-width: 250px;
  }

  .step-pill span {
    display: none;
  }

  .profile-summary {
    grid-template-columns: 1fr auto;
  }

  .profile-document {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 1120px) {
  .hero-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .stats-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .launch-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar {
    padding: 0 14px;
  }

  .device-chip {
    display: none;
  }

  .dashboard {
    padding: 18px 12px 44px;
  }

  .hero-copy h1 {
    font-size: 24px;
  }

  .stats-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-topline,
  .sessions-heading {
    align-items: flex-start;
  }

  .format-help,
  .refresh-note {
    display: none;
  }

  .launch-grid {
    padding: 13px;
  }

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

  .session-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .session-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box,
  #card-status-filter {
    width: 100%;
    min-width: 0;
  }

  .profile-fields {
    grid-template-columns: 1fr 1fr;
  }

  .profile-fields .span-2 {
    grid-column: 1 / -1;
  }
}

/* ─────────────────────────────────────────────────────────────
   GIAO DIỆN V5 · MIDNIGHT CONTROL DESK
   Card luôn hiển thị email và mã/liên kết, ưu tiên khả năng đọc.
   ───────────────────────────────────────────────────────────── */

:root {
  --bg: #080d16;
  --surface: #111a28;
  --surface-2: #162233;
  --surface-3: #1b2a3e;
  --input: #0b1421;
  --border: #293a51;
  --border-strong: #3c516d;
  --text: #f4f7fb;
  --text-2: #c5cfdd;
  --muted: #8b99ac;
  --primary: #6d7cff;
  --primary-hover: #8491ff;
  --info: #4db9f3;
  --success: #42d39a;
  --warning: #f2b84b;
  --pending: #a78bfa;
  --danger: #f16d82;
}

html {
  min-width: 1024px;
  background: var(--bg);
}

body {
  background:
    radial-gradient(circle at 14% -18%, rgba(77, 185, 243, .08), transparent 31rem),
    radial-gradient(circle at 100% 0, rgba(109, 124, 255, .09), transparent 35rem),
    var(--bg);
  font-family: "Segoe UI Variable", "Segoe UI", Inter, system-ui, sans-serif;
  font-size: 13px;
}

button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary-hover);
  outline-offset: 2px;
}

.topbar {
  height: 60px;
  padding: 0 24px;
  border-bottom-color: rgba(60, 81, 109, .72);
  background: rgba(11, 18, 30, .94);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .22);
}

.brand-overline,
.section-index {
  color: #99a5ff;
  font-weight: 800;
  letter-spacing: .09em;
}

.topbar-brand strong {
  font-size: 16px;
  font-weight: 750;
}

.live-chip {
  min-height: 32px;
  padding: 0 12px;
  border-color: var(--border);
  background: rgba(255, 255, 255, .025);
  color: var(--text-2);
}

.dashboard {
  width: min(1400px, 100%);
  padding: 20px 24px 52px;
}

.hero-row {
  grid-template-columns: minmax(300px, .8fr) minmax(0, 1.7fr);
  gap: 18px;
  min-height: 70px;
  align-items: center;
}

.hero-copy h1 {
  margin-top: 3px;
  font-size: 24px;
}

.hero-copy p {
  margin-top: 5px;
  font-size: 12.5px;
}

.stats-bar {
  gap: 7px;
}

.stat-chip {
  min-height: 52px;
  padding: 9px 11px;
  border-color: var(--border);
  border-radius: 11px;
  background: rgba(17, 26, 40, .84);
  box-shadow: inset 0 1px rgba(255, 255, 255, .02);
}

.stat-chip::after {
  height: 2px;
}

.stat-chip span {
  font-size: 10.5px;
  font-weight: 650;
}

.stat-chip b {
  font-size: 21px;
}

.launch-panel {
  margin-top: 2px;
  border-color: var(--border);
  border-radius: 13px;
  background: rgba(17, 26, 40, .91);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .2);
}

.panel-topline {
  min-height: 58px;
  padding: 10px 14px;
}

.panel-topline h2 {
  font-size: 16px;
}

.launch-grid {
  padding: 15px;
}

textarea,
input[type="text"],
input[type="date"],
select {
  min-height: 40px;
  border-color: var(--border);
  border-radius: 9px;
  background: var(--input);
  color: var(--text);
  font-size: 13px;
}

textarea::placeholder,
input::placeholder {
  color: #65758a;
}

textarea:hover,
input:hover,
select:hover {
  border-color: var(--border-strong);
}

textarea:focus,
input:focus,
select:focus {
  border-color: var(--primary);
  background: #0d1827;
  box-shadow: 0 0 0 3px rgba(109, 124, 255, .14);
}

.btn {
  min-height: 38px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 750;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.btn:not(:disabled):active {
  transform: translateY(1px);
}

.btn-primary {
  border-color: #7886ff;
  background: var(--primary);
  box-shadow: inset 0 1px rgba(255, 255, 255, .14);
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-ghost,
.btn-outline,
.btn-success,
.btn-purple,
.btn-cyan {
  border-color: var(--border);
  background: var(--surface-2);
  color: var(--text-2);
}

.btn-ghost:hover,
.btn-outline:hover,
.btn-success:hover,
.btn-purple:hover,
.btn-cyan:hover {
  border-color: var(--border-strong);
  background: var(--surface-3);
  color: var(--text);
}

.btn-sm {
  min-height: 38px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-color: var(--border);
  border-radius: 9px;
  background: var(--surface-2);
}

.icon-btn:hover {
  border-color: var(--border-strong);
  background: var(--surface-3);
}

.sessions-section {
  margin-top: 20px;
  container-type: normal;
  contain: none;
}

.sessions-heading {
  margin-bottom: 11px;
}

.sessions-heading h2 {
  font-size: 20px;
}

.session-toolbar {
  min-height: 52px;
  margin-bottom: 14px;
  padding: 7px;
  border-color: var(--border);
  background: rgba(17, 26, 40, .88);
}

.search-box {
  border-color: var(--border);
  background: var(--input);
}

#card-status-filter {
  width: 218px;
}

.cards-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.acc-card {
  --card-accent: #63758d;
  overflow: visible;
  border-color: var(--border);
  border-radius: 15px;
  background: #121d2c;
  box-shadow:
    0 14px 32px rgba(0, 0, 0, .28),
    inset 0 1px rgba(255, 255, 255, .02);
  transform: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.acc-card:hover {
  border-color: var(--border-strong);
  box-shadow:
    0 18px 38px rgba(0, 0, 0, .32),
    inset 0 1px rgba(255, 255, 255, .025);
  transform: none;
}

.acc-card::before {
  inset: -1px 14px auto;
  height: 3px;
  border-radius: 0 0 999px 999px;
}

.session-card-head {
  min-height: 66px;
  padding: 12px 13px;
  border-color: var(--border);
  border-radius: 14px 14px 0 0;
  background: #172334;
}

.session-identity {
  gap: 9px;
}

.session-number {
  min-width: 25px;
  font-size: 10.5px;
  text-align: center;
}

.session-avatar {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  font-size: 14px;
}

.session-title {
  gap: 3px;
}

.session-title > span:first-child {
  font-size: 10.5px;
}

.session-title-line {
  gap: 7px;
}

.session-title-line strong {
  max-width: 230px;
  font-size: 14px;
  font-weight: 750;
}

.tag-pill {
  min-height: 19px;
  font-size: 9.5px;
}

.status-badge {
  min-height: 24px;
  font-size: 10px;
}

.session-status {
  padding: 10px 13px 11px;
  border-color: var(--border);
  background: #0e1724;
}

.status-main {
  margin-bottom: 8px;
}

.status-label {
  font-size: 10.5px;
}

.status-detail {
  max-width: 72%;
  font-size: 10.8px;
}

.step-track {
  gap: 5px;
}

.step-pill {
  min-height: 26px;
  padding: 3px 4px;
  border-color: var(--border);
  border-radius: 7px;
  background: rgba(17, 26, 40, .72);
  font-size: 9.4px;
}

.step-pill i {
  width: 16px;
  height: 16px;
  font-size: 8px;
}

.status-banner,
.error-box {
  margin: 9px 13px 0;
  padding: 9px 11px;
  font-size: 11.5px;
}

.banner-link {
  float: right;
  margin-left: 10px;
  color: #aaf2cf;
  font-weight: 800;
  text-decoration: none;
}

.banner-link:hover {
  text-decoration: underline;
}

.verification-pane,
.status-READY_FOR_EMAIL .verification-pane,
.status-WAITING_EMAIL_LINK .verification-pane {
  display: block;
  padding: 11px 13px 12px;
  border-color: var(--border);
  background: #121d2c;
}

.verify-heading {
  margin-bottom: 7px;
}

.verify-heading > div:first-child {
  min-width: 0;
  display: flex;
  align-items: baseline;
  flex-direction: row;
  gap: 8px;
}

.verify-heading > div:first-child strong {
  color: var(--text);
  font-size: 12.5px;
}

.verify-heading > div:first-child span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.verify-availability {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #8fe8bb;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.verify-availability::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.verify-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.resend-doc-btn {
  display: none;
  min-height: 30px;
  padding: 6px 10px;
  border-color: rgba(167, 139, 250, .42);
  background: rgba(167, 139, 250, .11);
  color: #d9ceff;
  font-size: 10.5px;
}

.resend-doc-btn:hover {
  border-color: rgba(167, 139, 250, .7);
  background: rgba(167, 139, 250, .2);
  color: #f2eeff;
}

.acc-card[data-can-resend-doc="true"] .resend-doc-btn {
  display: inline-flex;
}

.resend-doc-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.verify-row,
.status-READY_FOR_EMAIL [data-action="email"],
.status-WAITING_EMAIL_LINK [data-action="link"] {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  gap: 9px;
  align-items: end;
  position: relative;
  padding: 7px;
  border: 1px solid transparent;
  border-radius: 10px;
  transition: border-color .16s ease, background .16s ease;
}

.verify-row + .verify-row {
  margin-top: 3px;
}

.verify-number {
  width: 31px;
  height: 40px;
  border-color: var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-2);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
}

.verify-field > label {
  margin-bottom: 4px;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 750;
}

.input-row {
  gap: 7px;
}

.input-row input {
  min-height: 40px;
}

.input-row .btn {
  min-width: 100px;
}

.hl-email {
  border-color: rgba(77, 185, 243, .4);
  background: rgba(77, 185, 243, .055);
}

.hl-email .verify-number {
  border-color: rgba(77, 185, 243, .55);
  background: rgba(77, 185, 243, .12);
  color: #8cd5fb;
}

.hl-link {
  border-color: rgba(242, 184, 75, .42);
  background: rgba(242, 184, 75, .055);
}

.hl-link .verify-number {
  border-color: rgba(242, 184, 75, .55);
  background: rgba(242, 184, 75, .12);
  color: #ffd37f;
}

.card-details {
  border-color: var(--border);
  background: #101a28;
}

.profile-summary {
  min-height: 58px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr) auto;
  gap: 10px;
  padding: 8px 13px;
}

.summary-icon,
.document-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.profile-person small,
.profile-document small {
  font-size: 9.5px;
  text-transform: none;
}

.profile-person strong,
.profile-document strong {
  font-size: 11.5px;
}

.profile-person > div > span {
  font-size: 10.5px;
}

.details-hint {
  min-width: 88px;
  min-height: 34px;
  padding: 6px 8px;
  border-color: var(--border);
  border-radius: 8px;
  font-size: 10.5px;
}

.profile-details-body {
  top: 60px;
  background: var(--surface);
}

.card-details[open]::before {
  inset: 60px 0 0;
}

.session-console {
  border-radius: 0 0 14px 14px;
  background: #0b131e;
}

/* Popup phải bám theo viewport, không được lấy card làm hệ tọa độ. */
.acc-card,
.acc-card:hover,
.card-details,
.session-console {
  transform: none !important;
  filter: none !important;
  perspective: none !important;
}

.card-details[open]::before {
  position: fixed !important;
  z-index: 1200;
  inset: 60px 0 0;
}

.profile-details-body {
  position: fixed !important;
  z-index: 1201;
  top: 60px;
  right: 0;
  bottom: 0;
  transform: none !important;
  animation: fixed-popup-fade .14s ease-out;
}

.console-popover {
  position: fixed !important;
  z-index: 1300;
  right: 24px;
  bottom: 24px;
  transform: none !important;
  animation: fixed-popup-fade .14s ease-out;
}

.modal-backdrop {
  position: fixed !important;
  z-index: 2000;
}

.modal-box {
  transform: none !important;
  animation: fixed-popup-fade .14s ease-out;
}

body:has(details.card-details[open]),
body:has(details.session-console[open]),
body:has(#pdf-modal.open) {
  overflow: hidden;
}

@keyframes fixed-popup-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.console-head {
  min-height: 37px;
  padding: 7px 13px;
}

.console-head > span,
.console-head b {
  font-size: 10.5px;
}

.console-head code {
  font-size: 9.5px;
}

.empty-state {
  min-height: 250px;
  border-color: var(--border-strong);
  background: rgba(17, 26, 40, .82);
}

@media (max-width: 1180px) {
  .hero-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .stats-bar {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .launch-grid {
    grid-template-columns: 1fr;
  }

  .step-pill span {
    display: none;
  }
}

@media (max-width: 900px) {
  html {
    min-width: 0;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .stats-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .dashboard {
    padding: 16px 12px 42px;
  }

  .verify-heading > div:first-child span,
  .verify-availability {
    display: none;
  }

  .verify-heading-actions {
    gap: 6px;
  }
}

/* Card desktop gọn: hai biểu mẫu nằm ngang theo từng dòng. */
@media (min-width: 901px) {
  .session-card-head {
    min-height: 62px;
    padding: 10px 12px;
  }

  .session-avatar {
    width: 34px;
    height: 34px;
  }

  .session-status {
    padding: 8px 12px 9px;
  }

  .status-main {
    margin-bottom: 6px;
  }

  .step-pill {
    min-height: 24px;
  }

  .verification-pane,
  .status-READY_FOR_EMAIL .verification-pane,
  .status-WAITING_EMAIL_LINK .verification-pane {
    padding: 9px 12px 10px;
  }

  .verify-heading {
    margin-bottom: 5px;
  }

  .verify-row,
  .status-READY_FOR_EMAIL [data-action="email"],
  .status-WAITING_EMAIL_LINK [data-action="link"] {
    align-items: center;
    padding: 5px 7px;
  }

  .verify-field {
    display: grid;
    grid-template-columns: 126px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
  }

  .verify-field > label {
    margin-bottom: 0;
    line-height: 1.25;
  }

  .profile-summary {
    min-height: 54px;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .console-head {
    min-height: 35px;
    padding-top: 6px;
    padding-bottom: 6px;
  }
}

@media (min-width: 901px) and (max-width: 1180px) {
  .verify-heading > div:first-child span {
    display: none;
  }

  .verify-field {
    grid-template-columns: 104px minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .stats-bar {
    grid-template-columns: 1fr 1fr;
  }

  .launch-actions,
  .input-row {
    align-items: stretch;
    flex-direction: column;
  }

  .launch-actions .btn,
  .input-row .btn {
    width: 100%;
  }

  .session-title-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .session-title-line strong {
    max-width: 220px;
  }

  .status-main {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .status-detail {
    text-align: left;
    white-space: normal;
  }

  .compact-actions {
    display: none;
  }

  .profile-fields,
  .session-meta {
    grid-template-columns: 1fr;
  }

  .profile-fields .span-2 {
    grid-column: auto;
  }

  .console-head code {
    display: none;
  }
}
