@import url('https://fonts.googleapis.com/css2?family=Noto+Kufi+Arabic:wght@400;500;600;700;800&display=swap');

/* Valcom VDesk — Enterprise Remote Desktop & NOC Design System (Light Default) */
:root {
  --bg-canvas: #F5F7FA;
  --bg-surface: #FFFFFF;
  --bg-elevated: #F8FAFC;
  --bg-hover: #F1F5F9;
  --border-subtle: #E2E8F0;
  --border-strong: #CBD5E1;

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;

  --accent: #9E0B2C;
  --accent-hover: #7F0923;
  --accent-soft: rgba(158, 11, 44, 0.10);

  --emerald: #059669;
  --emerald-soft: rgba(5, 150, 105, 0.12);
  --amber: #D97706;
  --amber-soft: rgba(217, 119, 6, 0.12);
  --crimson: #DC2626;
  --crimson-soft: rgba(220, 38, 38, 0.12);

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 26px rgba(15, 23, 42, 0.10);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --font-sans: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;
}

html[lang="ar"],
html[dir="rtl"] {
  --font-sans: 'Noto Kufi Arabic', 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html[lang="ar"] body,
html[lang="ar"] button,
html[lang="ar"] input,
html[lang="ar"] select,
html[lang="ar"] textarea,
html[dir="rtl"] body,
html[dir="rtl"] button,
html[dir="rtl"] input,
html[dir="rtl"] select,
html[dir="rtl"] textarea {
  font-family: var(--font-sans);
}

html[lang="ar"] .landing-h1 {
  line-height: 1.35;
  letter-spacing: 0;
}

html[lang="ar"] .mac-stage {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* Optical calibration for Noto Kufi Arabic in menus & header actions */
html[lang="ar"] .landing-nav-inner {
  gap: 12px;
}
html[lang="ar"] .landing-brand-tagline {
  font-size: 10.5px;
  max-width: 215px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html[lang="ar"] .landing-links {
  gap: 16px;
  font-size: 12px;
  white-space: nowrap;
}
html[lang="ar"] .landing-links a {
  white-space: nowrap;
  line-height: 1.35;
}
html[lang="ar"] .landing-actions-desktop {
  gap: 6px;
  flex-shrink: 0;
}
html[lang="ar"] .landing-actions-desktop .btn-sm {
  font-size: 11.5px;
  padding: 5px 10px;
  white-space: nowrap;
  line-height: 1.35;
}
html[lang="ar"] .landing-mobile-links a {
  font-size: 12.5px;
  min-height: 38px;
  padding: 0 10px;
}
html[lang="ar"] .landing-mobile-actions .btn {
  font-size: 12.5px;
  min-height: 38px;
}
html[lang="ar"] .landing-actions-mobile .btn-sm {
  font-size: 11px;
  padding: 5px 8px;
}
html[lang="ar"] .nav-link {
  font-size: 12.25px;
  padding: 7px 10px;
  line-height: 1.35;
}
html[lang="ar"] .nav-section-label {
  font-size: 10px;
  letter-spacing: 0;
}
@media (max-width: 1180px) {
  html[lang="ar"] .landing-brand-tagline {
    display: none;
  }
}

[data-theme="dark"] {
  --bg-canvas: #0B101B;
  --bg-surface: #111827;
  --bg-elevated: #182234;
  --bg-hover: #1E2B40;
  --border-subtle: #1F2D42;
  --border-strong: #2E415E;

  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  --accent: #C81E45;
  --accent-hover: #9E0B2C;
  --accent-soft: rgba(200, 30, 69, 0.18);

  --emerald: #10B981;
  --emerald-soft: rgba(16, 185, 129, 0.14);
  --amber: #F59E0B;
  --amber-soft: rgba(245, 158, 11, 0.14);
  --crimson: #EF4444;
  --crimson-soft: rgba(239, 68, 68, 0.14);

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
}

body.portal-theme {
  --bg-canvas: #F4F7FB;
  --bg-surface: #FFFFFF;
  --bg-elevated: #F8FAFC;
  --bg-hover: #EFF6FF;
  --border-subtle: #E2E8F0;
  --border-strong: #CBD5E1;

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.07);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.09);

  background: #F4F7FB;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

html:has(body.portal-theme) {
  background: #F4F7FB;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: #FFFFFF;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 4px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
[data-theme="dark"] a { color: #FB7185; }

.mono, .session-code, code, pre {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: isolate;
}
pre {
  text-align: left;
}

.tabular { font-variant-numeric: tabular-nums; }

/* Shell Layout */
.vdesk-shell {
  display: flex;
  min-height: 100vh;
}

.vdesk-sidebar {
  width: 248px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 18px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 14px;
}

.brand-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.brand-logo-lg {
  height: 44px;
  width: auto;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #9E0B2C, #7F0923);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  box-shadow: 0 2px 8px rgba(158, 11, 44, 0.25);
}

.brand-name {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: block;
  line-height: 1.2;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 12px 10px 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 13.5px;
  transition: background 140ms ease, color 140ms ease;
}

.nav-link:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  text-decoration: none;
}

.nav-link.active {
  background: var(--accent-soft);
  color: var(--accent);
}
[data-theme="dark"] .nav-link.active { color: #FB7185; }

.nav-link svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  stroke: currentColor;
}

.sidebar-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.relay-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}
.status-dot.online { background: var(--emerald); box-shadow: 0 0 0 3px var(--emerald-soft); }
.status-dot.warn { background: var(--amber); }
.status-dot.offline { background: var(--crimson); }

.vdesk-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 58px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-content {
  padding: 24px;
  max-width: 1440px;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
}

/* Cards & Panels */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.card-header {
  padding: 15px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-size: 14.5px;
  font-weight: 600;
  margin: 0;
}

.card-body { padding: 18px; }

/* Grid Helpers */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.grid-main-side {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr);
  gap: 18px;
}
.grid-4 > *, .grid-3 > *, .grid-2 > *, .grid-main-side > * {
  min-width: 0;
}

@media (max-width: 1120px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main-side { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* KPI Strip */
.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}
.kpi-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}
.kpi-value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.kpi-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 80ms ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; }

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--bg-hover); }

.btn-success {
  background: var(--emerald);
  color: #052E16;
}
.btn-danger {
  background: var(--crimson);
  color: #FFFFFF;
}
.btn-danger:hover { background: #DC2626; }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 11px 18px; font-size: 14px; }

/* Inputs & Forms */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-control, select.form-control, textarea.form-control {
  width: 100%;
  background: #FFFFFF;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 9px 12px;
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
[data-theme="dark"] .form-control,
[data-theme="dark"] select.form-control,
[data-theme="dark"] textarea.form-control {
  background: #0B101B;
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-emerald { background: var(--emerald-soft); color: #047857; }
[data-theme="dark"] .badge-emerald { color: #34D399; }
.badge-amber { background: var(--amber-soft); color: #B45309; }
[data-theme="dark"] .badge-amber { color: #FBBF24; }
.badge-crimson { background: var(--crimson-soft); color: #B91C1C; }
[data-theme="dark"] .badge-crimson { color: #F87171; }
.badge-blue { background: var(--accent-soft); color: #9E0B2C; }
[data-theme="dark"] .badge-blue { color: #FDA4AF; }
.badge-muted { background: rgba(100, 116, 139, 0.14); color: var(--text-secondary); }

/* Tables */
.table-wrap { overflow-x: auto; }
table.vdesk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.vdesk-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}
table.vdesk-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
table.vdesk-table tr:hover td {
  background: rgba(15, 23, 42, 0.025);
}
[data-theme="dark"] table.vdesk-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}
.modal-backdrop.open { display: flex; }
.modal-dialog {
  width: 100%;
  max-width: 560px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.modal-dialog.modal-lg { max-width: 820px; }
.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-body {
  padding: 20px;
  overflow-y: auto;
}
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Toasts */
#vdeskToastContainer {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.vdesk-toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  padding: 10px 15px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  font-size: 13px;
  font-weight: 500;
  min-width: 240px;
  max-width: 380px;
}
.vdesk-toast.success { border-color: var(--emerald); }
.vdesk-toast.error { border-color: var(--crimson); }

/* Remote Viewer Workspace (Light Default) */
.viewer-body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-canvas);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
}
.viewer-toolbar {
  min-height: 52px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}
.viewer-toolbar-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.viewer-toolbar .btn-sm {
  padding: 4px 9px;
  font-size: 11.5px;
}
#telemetryPill {
  white-space: nowrap;
}
.viewer-workspace {
  flex: 1;
  min-height: 0;
  display: flex;
}
.viewer-stage {
  flex: 1;
  min-width: 0;
  position: relative;
  background: #1E293B;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}
.stage-canvas-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
}
#agentCanvas, #webrtcVideo {
  max-width: 100%;
  max-height: calc(100vh - 54px);
  display: none;
  background: #000;
  border-radius: 4px;
}
.stage-1to1 #agentCanvas, .stage-1to1 #webrtcVideo {
  max-width: none;
  max-height: none;
}
#annotCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
#annotCanvas.annot-active {
  pointer-events: auto;
  cursor: crosshair;
}
.viewer-waiting {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at center, #FFFFFF 0%, #EEF2F6 75%);
}
[data-theme="dark"] .viewer-waiting {
  background: radial-gradient(circle at center, #0F172A 0%, #060911 75%);
}
.waiting-card {
  max-width: 520px;
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 28px;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.waiting-code {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 16px 0;
}

.viewer-drawer {
  width: 360px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
}
.viewer-drawer.collapsed { display: none; }
.drawer-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
}
.drawer-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 11px 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.drawer-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}
.drawer-pane {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  padding: 14px;
  overflow-y: auto;
}
.drawer-pane.active { display: flex; }

.chat-feed {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.chat-bubble {
  padding: 8px 11px;
  border-radius: 8px;
  font-size: 12.5px;
  max-width: 92%;
  word-break: break-word;
}
.chat-bubble.technician {
  align-self: flex-end;
  background: var(--accent);
  color: #FFFFFF;
}
.chat-bubble.customer {
  align-self: flex-start;
  background: var(--bg-hover);
  color: var(--text-primary);
}
.chat-bubble.system {
  align-self: center;
  background: rgba(100, 116, 139, 0.14);
  color: var(--text-secondary);
  font-size: 11.5px;
  text-align: center;
}
body.portal-theme .chat-bubble.customer {
  background: var(--accent);
  color: #FFFFFF;
  align-self: flex-end;
}
body.portal-theme .chat-bubble.technician {
  background: #E2E8F0;
  color: #0F172A;
  align-self: flex-start;
}

.terminal-output {
  background: #F8FAFC;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #0F172A;
  white-space: pre-wrap;
  max-height: 220px;
  overflow-y: auto;
}
[data-theme="dark"] .terminal-output {
  background: #05080F;
  border-color: #1E293B;
  color: #A7F3D0;
}

.dropzone {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}
.dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.muted { color: var(--text-muted); }
.text-sm { font-size: 12.5px; }
.text-xs { font-size: 11.5px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.flex-row { display: flex; align-items: center; gap: 8px; }
.mt-1 { margin-top: 6px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 18px; }
.mb-2 { margin-bottom: 12px; }
.mb-3 { margin-bottom: 18px; }


/* SaaS Landing Page, Pricing, Kanban & RTL Support */
.landing-body {
  background: var(--bg-canvas);
  color: var(--text-primary);
}
.landing-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 22px;
}
.landing-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-subtle);
}
.landing-nav-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.landing-brand {
  min-width: 0;
  flex-shrink: 0;
}
.landing-actions-mobile {
  display: none;
}
.landing-menu-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
}
.landing-menu-btn:hover {
  border-color: var(--border-strong);
  background: var(--bg-elevated);
}
.landing-mobile-drawer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  box-shadow: var(--shadow-md);
}
.landing-mobile-drawer-inner {
  padding-top: 12px;
  padding-bottom: 16px;
}
.landing-mobile-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}
.landing-mobile-links a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.landing-mobile-links a:hover {
  background: var(--bg-elevated);
  color: var(--accent);
}
.landing-mobile-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}
.landing-mobile-actions .btn {
  width: 100%;
  min-height: 42px;
}
.landing-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 13.5px;
  font-weight: 500;
}
.landing-links a { color: var(--text-secondary); }
.landing-links a:hover { color: var(--accent); text-decoration: none; }
.landing-hero {
  padding: 58px 0 54px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F5F7FA 100%);
  border-bottom: 1px solid var(--border-subtle);
}
.landing-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: center;
}
.landing-h1 {
  font-size: 38px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
}
.landing-lead {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}
.landing-section {
  padding: 54px 0;
}
.feature-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.feature-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}
.pricing-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-subtle);
}
.pricing-card-head {
  min-height: 98px;
}
.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}
@media (max-width: 960px) {
  .landing-container { padding: 0 16px; }
  .landing-nav-inner { height: 60px; gap: 10px; }
  .landing-brand-tagline { display: none; }
  .landing-links,
  .landing-actions-desktop { display: none; }
  .landing-actions-mobile {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }
  .landing-actions-mobile .btn-sm {
    padding: 6px 10px;
    font-size: 12px;
    white-space: nowrap;
  }
  .landing-hero { padding: 36px 0 40px; }
  .landing-hero-grid { grid-template-columns: 1fr; gap: 26px; }
  .landing-h1 { font-size: 28px; }
}
@media (max-width: 560px) {
  .mac-menubar-item:not(.active) { display: none; }
}

/* Kanban Board */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(210px, 1fr));
  gap: 12px;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 6px;
}
.kanban-col {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  min-height: 420px;
}
.kanban-col-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.kanban-dropzone {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.kanban-dropzone.dragover {
  background: var(--accent-soft);
}
.kanban-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  box-shadow: var(--shadow-sm);
  cursor: grab;
}
.kanban-card:active { cursor: grabbing; }

/* RTL Support */
[dir="rtl"] .vdesk-sidebar {
  border-right: none;
  border-left: 1px solid var(--border-subtle);
}
[dir="rtl"] table.vdesk-table th {
  text-align: right;
}
[dir="rtl"] .viewer-drawer {
  border-left: none;
  border-right: 1px solid var(--border-subtle);
}

/* ==========================================================================
   Landing Hero: Animated macOS Remote Support Screen
   ========================================================================== */
.mac-stage {
  position: relative;
  text-align: left;
  user-select: none;
}

.mac-bezel {
  background: linear-gradient(165deg, #1E293B 0%, #0F172A 100%);
  border-radius: 16px;
  padding: 10px 10px 14px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 22px 48px -12px rgba(15, 23, 42, 0.28), 0 4px 12px rgba(15, 23, 42, 0.12);
}

.mac-camera-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 10px;
  margin-bottom: 6px;
}

.mac-camera-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #334155;
  box-shadow: inset 0 0 2px #020617;
}

.mac-screen {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 20%, rgba(158, 11, 44, 0.34), transparent 52%),
    radial-gradient(circle at 82% 24%, rgba(37, 99, 235, 0.35), transparent 55%),
    radial-gradient(circle at 55% 88%, rgba(16, 185, 129, 0.22), transparent 50%),
    linear-gradient(135deg, #0F172A 0%, #1E1B4B 48%, #0F172A 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.mac-menubar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 12px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #E2E8F0;
  font-size: 11px;
  line-height: 1;
}

.mac-menubar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mac-apple-mark {
  font-weight: 800;
  color: #FFFFFF;
}

.mac-menubar-item {
  color: #CBD5E1;
  font-weight: 500;
}

.mac-menubar-item.active {
  color: #FFFFFF;
  font-weight: 700;
}

.mac-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #6EE7B7;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
}

.mac-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34D399;
  box-shadow: 0 0 8px #34D399;
}

.mac-desktop {
  position: relative;
  height: 332px;
  padding: 14px;
  overflow: hidden;
}

/* Desktop Folder Icon */
.mac-folder {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 6px 4px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  z-index: 2;
}

.mac-folder.is-active {
  background: rgba(59, 130, 246, 0.28);
  border-color: rgba(96, 165, 250, 0.65);
  transform: scale(0.97);
}

.mac-folder-icon {
  width: 44px;
  height: 34px;
  background: linear-gradient(180deg, #60A5FA 0%, #2563EB 100%);
  border-radius: 5px;
  position: relative;
  box-shadow: 0 6px 14px rgba(2, 6, 23, 0.45);
}

.mac-folder-icon::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 0;
  width: 18px;
  height: 7px;
  background: #93C5FD;
  border-radius: 3px 3px 0 0;
}

.mac-folder-label {
  font-size: 10.5px;
  font-weight: 600;
  color: #F8FAFC;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
  text-align: center;
  line-height: 1.2;
}

/* Shared macOS Window Chrome */
.mac-win {
  position: absolute;
  border-radius: 9px;
  overflow: hidden;
  box-shadow: 0 18px 34px -8px rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1), transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.mac-win-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
}

.mac-lights {
  display: inline-flex;
  gap: 5px;
}

.mac-lights span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.mac-lights .tl-red { background: #FF5F56; }
.mac-lights .tl-amber { background: #FFBD2E; }
.mac-lights .tl-green { background: #27C93F; }

/* Finder Window */
.mac-finder {
  top: 16px;
  left: 16px;
  width: 248px;
  background: rgba(248, 250, 252, 0.96);
  color: #0F172A;
  z-index: 3;
  opacity: 0;
  transform: scale(0.92) translateY(8px);
}

.mac-finder.is-open {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.mac-finder .mac-win-bar {
  background: #E2E8F0;
  color: #334155;
  border-bottom: 1px solid #CBD5E1;
}

.mac-finder-body {
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mac-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  padding: 5px 8px;
  border-radius: 6px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  color: #1E293B;
}

.mac-file-row.is-selected {
  background: #EFF6FF;
  border-color: #93C5FD;
  color: #1D4ED8;
  font-weight: 600;
}

/* Terminal Window */
.mac-terminal {
  bottom: 52px;
  left: 14px;
  width: 274px;
  background: rgba(15, 23, 42, 0.96);
  color: #E2E8F0;
  z-index: 4;
  opacity: 0.96;
}

.mac-terminal.is-focused {
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow: 0 20px 38px -8px rgba(2, 6, 23, 0.72), 0 0 0 1px rgba(96, 165, 250, 0.25);
}

.mac-terminal .mac-win-bar {
  background: #1E293B;
  color: #94A3B8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mac-term-body {
  padding: 8px 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10.3px;
  line-height: 1.5;
  min-height: 74px;
}

.mac-term-prompt {
  color: #38BDF8;
}

.mac-term-caret {
  display: inline-block;
  width: 6px;
  height: 12px;
  background: #E2E8F0;
  vertical-align: middle;
  margin-left: 2px;
  animation: macCaretBlink 1s steps(2, start) infinite;
}

.mac-term-out {
  margin-top: 4px;
  color: #34D399;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.mac-term-out.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Floating Ticket Toast */
.mac-ticket-toast {
  position: absolute;
  right: 12px;
  bottom: 54px;
  width: 196px;
  background: rgba(255, 255, 255, 0.97);
  color: #0F172A;
  border-radius: 10px;
  padding: 10px 11px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 16px 32px -6px rgba(2, 6, 23, 0.55);
  z-index: 5;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.mac-ticket-toast.is-resolved {
  border-color: #10B981;
  box-shadow: 0 16px 32px -6px rgba(16, 185, 129, 0.28);
}

.mac-ticket-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 5px;
}

.mac-ticket-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.3;
  margin-bottom: 8px;
}

.mac-resolve-btn {
  width: 100%;
  border: none;
  border-radius: 6px;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 700;
  cursor: default;
  color: #FFFFFF;
  background: #9E0B2C;
  transition: background-color 0.22s ease, transform 0.15s ease;
}

.mac-resolve-btn.is-clicking {
  transform: scale(0.96);
}

.mac-resolve-btn.is-done {
  background: #059669;
}

/* macOS Dock */
.mac-dock {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  z-index: 6;
}

.mac-dock-app {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #FFFFFF;
}

.mac-dock-finder { background: linear-gradient(135deg, #60A5FA, #2563EB); }
.mac-dock-term { background: linear-gradient(135deg, #334155, #0F172A); border: 1px solid rgba(255,255,255,0.2); }
.mac-dock-vdesk { background: linear-gradient(135deg, #BE123C, #9E0B2C); }
.mac-dock-ticket { background: linear-gradient(135deg, #10B981, #059669); }

/* Animated Remote Support Cursor & Click Ripple */
.mac-cursor {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 20;
  pointer-events: none;
  display: flex;
  align-items: flex-start;
  gap: 2px;
  transition: transform 0.78s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  filter: drop-shadow(0 3px 6px rgba(2, 6, 23, 0.55));
}

.mac-cursor-tag {
  margin-top: 13px;
  background: #9E0B2C;
  color: #FFFFFF;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  letter-spacing: 0.02em;
}

.mac-click-ripple {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  margin-top: -11px;
  border-radius: 50%;
  border: 2px solid #FBBF24;
  background: rgba(251, 191, 36, 0.22);
  pointer-events: none;
  opacity: 0;
  z-index: 19;
}

.mac-click-ripple.is-popping {
  animation: macClickRipple 0.55s ease-out forwards;
}

/* Aluminum Monitor Stand Footer */
.mac-stand {
  width: 116px;
  height: 16px;
  margin: 0 auto;
  background: linear-gradient(180deg, #CBD5E1 0%, #94A3B8 100%);
  clip-path: polygon(14% 0%, 86% 0%, 100% 100%, 0% 100%);
}

.mac-stand-base {
  width: 184px;
  height: 5px;
  margin: 0 auto;
  background: linear-gradient(90deg, #94A3B8, #E2E8F0, #94A3B8);
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.18);
}

@keyframes macCaretBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes macClickRipple {
  0% { opacity: 0.95; transform: scale(0.35); }
  100% { opacity: 0; transform: scale(1.95); }
}

@media (max-width: 640px) {
  .mac-desktop { height: 340px; }
  .mac-finder { width: 205px; }
  .mac-terminal { width: 235px; bottom: 54px; }
  .mac-ticket-toast { width: 175px; right: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .mac-cursor,
  .mac-win,
  .mac-term-out,
  .mac-folder {
    transition: none !important;
  }
  .mac-term-caret,
  .mac-click-ripple.is-popping {
    animation: none !important;
  }
}

/* ==========================================================================
   Promotional Pricing Banner & Market Comparison
   ========================================================================== */
.promo-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 13px 18px;
  margin: 0 auto 24px;
  border-radius: 12px;
  background: linear-gradient(135deg, #FFF1F4 0%, #FFFFFF 55%, #ECFDF5 100%);
  border: 1px solid rgba(158, 11, 44, 0.24);
  box-shadow: var(--shadow-sm);
}

.promo-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.promo-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  background: var(--accent);
  color: #FFFFFF;
}

.promo-pill.emerald {
  background: #059669;
}

.promo-code-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px dashed var(--accent);
  background: #FFFFFF;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 700;
}

.price-row-promo {
  margin: 16px 0 12px;
}

.price-values {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.price-market-strike {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: #DC2626;
}

.price-savings-line {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #059669;
}

.market-compare-card {
  margin-top: 34px;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.market-compare-head {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.market-compare-highlight {
  background: rgba(158, 11, 44, 0.045);
  font-weight: 700;
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .promo-banner { padding: 12px 14px; }
}

/* ==========================================================================
   Full Mobile Responsiveness (Auth, App Shell Off-Canvas, Portals, Viewer)
   ========================================================================== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg-canvas);
}

.auth-card {
  width: 100%;
  max-width: 920px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.auth-card-register {
  max-width: 940px;
  grid-template-columns: 1fr 1.25fr;
}

.auth-brand-pane {
  padding: 36px 32px;
  background: linear-gradient(155deg, #FFFFFF 0%, #FFF1F4 100%);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

[dir="rtl"] .auth-brand-pane {
  border-right: none;
  border-left: 1px solid var(--border-subtle);
}

.auth-brand-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.auth-brand-links {
  padding-top: 22px;
  border-top: 1px solid #E2E8F0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #64748B;
}

.auth-form-pane {
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.auth-plan-row {
  display: grid;
  grid-template-columns: 1.55fr 0.85fr;
  gap: 16px;
}

.auth-mobile-links {
  display: none;
}

/* App Shell Topbar & Mobile Sidebar Controls */
.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar-menu-btn,
.sidebar-close-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
  font-size: 20px;
  line-height: 1;
}

.vdesk-sidebar-backdrop {
  display: none;
}

/* Public / Customer Portal Header & Main */
.portal-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 24px;
}

.portal-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.portal-main {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 28px auto;
  padding: 0 20px;
}

@media (max-width: 960px) {
  .vdesk-shell {
    overflow-x: clip;
  }

  .topbar-menu-btn,
  .sidebar-close-btn {
    display: inline-flex;
  }

  .vdesk-sidebar {
    display: flex;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(276px, 84vw);
    z-index: 60;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: var(--shadow-lg);
  }

  [dir="rtl"] .vdesk-sidebar {
    left: auto;
    right: 0;
    transform: translateX(105%);
  }

  .vdesk-shell.sidebar-open .vdesk-sidebar {
    transform: translateX(0);
  }

  .vdesk-shell.sidebar-open .vdesk-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 55;
  }

  .topbar {
    padding: 0 14px;
    gap: 10px;
  }

  .topbar-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14.5px;
  }

  .page-content {
    padding: 14px;
  }

  .card-header {
    flex-wrap: wrap;
  }
}

@media (max-width: 900px) {
  .viewer-workspace {
    flex-direction: column;
  }

  .viewer-drawer {
    width: 100%;
    max-height: 44vh;
    border-left: none;
    border-right: none;
    border-top: 1px solid var(--border-subtle);
  }
}

@media (max-width: 820px) {
  .auth-page {
    padding: 14px;
    align-items: flex-start;
  }

  .auth-card,
  .auth-card-register {
    grid-template-columns: 1fr;
    border-radius: 14px;
  }

  .auth-brand-pane {
    padding: 18px;
    border-right: none !important;
    border-left: none !important;
    border-bottom: 1px solid var(--border-subtle);
  }

  .auth-brand-head {
    margin-bottom: 0;
  }

  .auth-brand-details,
  .auth-brand-links {
    display: none;
  }

  .auth-form-pane {
    padding: 22px 18px;
  }

  .auth-plan-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .auth-mobile-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
    font-size: 12.5px;
  }
}

@media (max-width: 640px) {
  .topbar-hide-mobile {
    display: none;
  }

  .form-control {
    font-size: 16px;
  }

  .modal {
    max-height: 92vh;
    overflow-y: auto;
  }

  .portal-header {
    padding: 12px 14px;
  }

  .portal-main {
    margin: 18px auto;
    padding: 0 14px;
  }
}

@media (max-width: 560px) {
  .portal-consent-badge {
    display: none;
  }
}

@media (max-width: 520px) {
  .waiting-code {
    font-size: 26px;
    padding: 10px 12px;
  }
}
