@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&family=Fira+Code:wght@400;500&display=swap');

:root {
  /* Curated Harmonious Palette */
  --bg: #090c15;
  --bg-gradient: radial-gradient(circle at top right, #0d1321, #060912 60%, #03050b 100%);
  --surface: rgba(13, 19, 33, 0.45);
  --surface-hover: rgba(24, 33, 53, 0.65);
  --surface-soft: rgba(20, 27, 43, 0.35);
  --surface-solid: #0b0f19;
  --line: rgba(255, 255, 255, 0.05);
  --line-strong: rgba(255, 255, 255, 0.1);
  
  /* Luminous Accents */
  --blue: #3b82f6;
  --blue-glow: rgba(59, 130, 246, 0.15);
  --cyan: #0ea5e9;
  --cyan-glow: rgba(14, 165, 233, 0.2);
  --teal: #14b8a6;
  
  /* Brand Gold */
  --gold: #dfb141;
  --gold-glow: rgba(223, 177, 65, 0.15);
  --gold-dark: #b88d2c;
  
  /* Semantic Statuses (Pastel Glows) */
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.08);
  --danger-border: rgba(248, 113, 113, 0.2);
  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, 0.08);
  --ok-border: rgba(52, 211, 153, 0.2);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.08);
  --warn-border: rgba(251, 191, 36, 0.2);
  
  /* Typography & Layout */
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-inverse: #070a13;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Outfit', sans-serif;
  --font-mono: 'Fira Code', monospace;
  
  /* Shadow & Glass */
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px var(--gold-glow);
  --glass-backdrop: blur(20px) saturate(180%);
  --glass-border: 1px solid var(--line);
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 6px;
  
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
}

body {
  min-height: 100vh;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
  z-index: 0;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(223, 177, 65, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(223, 177, 65, 0.015) 1px, transparent 1px);
  background-size: 50px 50px;
  background-position: center;
  pointer-events: none;
  z-index: -1;
}

body::after {
  content: "";
  position: absolute;
  top: 5%;
  left: 15%;
  width: min(500px, 70vw);
  height: min(500px, 70vw);
  background: radial-gradient(circle, rgba(223, 177, 65, 0.04) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: -2;
}

body.app-page {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

body.public-page {
  display: block;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 2000;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: var(--radius-md);
  background: var(--gold);
  color: var(--text-inverse);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-140%);
  transition: transform 0.18s ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

button,
input,
select,
textarea {
  font-family: inherit;
  color: inherit;
}

/* Base Buttons */
button {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
  color: var(--text-main);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.2px;
  cursor: pointer;
  padding: 0 18px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

button i, button svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

button:hover:not(:disabled) {
  border-color: rgba(223, 177, 65, 0.4);
  background: linear-gradient(180deg, rgba(40, 55, 80, 0.7) 0%, rgba(25, 35, 60, 0.9) 100%);
  box-shadow: 0 0 12px rgba(223, 177, 65, 0.1);
  transform: translateY(-1px);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
  box-shadow: none;
}

/* Primary Accent Button Style (Gold luxury theme) */
button.primary,
button[type="submit"] {
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%);
  border-color: rgba(255, 255, 255, 0.1);
  color: #080c15;
}

button.primary:hover,
button[type="submit"]:hover {
  background: linear-gradient(180deg, #f5d06e 0%, var(--gold) 100%);
  box-shadow: 0 0 16px rgba(223, 177, 65, 0.35);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Inputs & Selects */
input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(13, 19, 33, 0.5);
  color: var(--text-main);
  padding: 0 14px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  font-size: 13.5px;
}

input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

input:focus,
select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(223, 177, 65, 0.12);
  background: rgba(13, 19, 33, 0.85);
  outline: 0;
}

select option {
  background: var(--surface-solid);
  color: var(--text-main);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 32px;
  color: var(--text-main);
  background: linear-gradient(135deg, #ffffff 30%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

label {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

label input,
label select {
  margin-top: 8px;
}

/* Sidebar Section */
.sidebar {
  min-height: 100vh;
  padding: 24px 18px;
  background: rgba(8, 11, 19, 0.85);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(24px);
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.brand img {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(223, 177, 65, 0.4);
  border-radius: var(--radius-md);
  object-fit: contain;
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 12px rgba(223, 177, 65, 0.1);
}

.brand div {
  display: flex;
  flex-direction: column;
}

.brand strong {
  color: var(--text-main);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.brand span {
  color: var(--gold);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

nav {
  display: grid;
  gap: 5px;
}

nav a {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0 14px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  border: 1px solid transparent;
}

nav a i, nav a svg {
  width: 17px;
  height: 17px;
  transition: var(--transition);
  stroke-width: 2;
}

nav a:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.05);
  transform: translateX(2px);
}

nav a.active {
  background: linear-gradient(90deg, rgba(223, 177, 65, 0.08) 0%, rgba(223, 177, 65, 0.01) 100%);
  color: var(--gold);
  font-weight: 600;
  border-left: 2px solid var(--gold);
  border-right: 1px solid transparent;
  border-top: 1px solid rgba(223, 177, 65, 0.08);
  border-bottom: 1px solid rgba(223, 177, 65, 0.08);
  box-shadow: inset 0 0 10px rgba(223, 177, 65, 0.03);
}

nav a.active i, nav a.active svg {
  color: var(--gold);
  filter: drop-shadow(0 0 4px var(--gold-glow));
}

/* Main Area Layout */
main {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 40px;
  display: grid;
  gap: 24px;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.topbar p {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 14px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Session Panel */
.session-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--surface);
  border: var(--glass-border);
  backdrop-filter: var(--glass-backdrop);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.session-copy {
  display: flex;
  flex-direction: column;
  min-width: 120px;
}

.session-copy strong {
  color: var(--text-main);
  font-size: 13.5px;
  font-weight: 600;
}

.session-copy span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.session-panel select {
  min-height: 34px;
  height: 34px;
  font-size: 13px;
  background: rgba(15, 23, 42, 0.7);
  padding: 0 8px;
  border-radius: var(--radius-sm);
  width: auto;
  max-width: 200px;
}

.session-panel button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12.5px;
  border-radius: var(--radius-sm);
}

#logoutBtn {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text-muted);
}

#logoutBtn:hover {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: var(--danger-border);
  box-shadow: none;
}

/* Health status dot */
.health {
  padding: 8px 16px;
  border: var(--glass-border);
  background: var(--surface);
  backdrop-filter: var(--glass-backdrop);
  border-radius: var(--radius-lg);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 8px;
  height: 52px;
}

.health::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--danger);
  box-shadow: 0 0 8px var(--danger);
  display: inline-block;
}

.health.ok {
  color: var(--ok);
  border-color: var(--ok-border);
  background: rgba(16, 185, 129, 0.05);
}

.health.ok::before {
  background-color: var(--ok);
  box-shadow: 0 0 10px var(--ok);
}

/* Dashboard Navigation / Display Toggling with :target */
body.app-page main > section {
  display: none !important;
}

/* Default view when no hash matches or #dashboard matches */
main:not(:has(section:target, .grid-two > div:target)) > #dashboard,
#dashboard:target {
  display: grid !important;
}

#workQueue:target,
#commands:target,
#createLead:target,
#profile:target,
#documents:target,
#adminUsers:target,
#platformLogs:target {
  display: grid !important;
}

.grid-two:has(#leads:target),
.grid-two:has(#approvals:target) {
  display: grid !important;
}

/* Highlight elements that are explicitly focused via URL target */
#leads:target,
#approvals:target {
  border-color: var(--gold) !important;
  box-shadow: 0 0 20px rgba(223, 177, 65, 0.15) !important;
}

/* Metrics Dashboard grid */
.metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.metrics article {
  background: rgba(13, 19, 33, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  padding: 20px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.metrics article::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
  opacity: 0.7;
}

.metrics article:nth-child(2)::after { background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.metrics article:nth-child(3)::after { background: linear-gradient(90deg, transparent, var(--teal), transparent); }
.metrics article:nth-child(4)::after { background: linear-gradient(90deg, transparent, var(--cyan), transparent); }

.metrics article:hover {
  transform: translateY(-2px);
  border-color: rgba(223, 177, 65, 0.25);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), 0 0 15px rgba(223, 177, 65, 0.05);
}

.metrics span {
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.metrics strong {
  color: var(--text-main);
  font-size: 30px;
  font-weight: 700;
  font-family: var(--font-display);
  line-height: 1.1;
  margin-top: 8px;
  background: linear-gradient(135deg, #ffffff 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Surfaces and cards container */
.surface {
  background: rgba(13, 19, 33, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px) saturate(180%);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.surface:hover {
  border-color: rgba(255, 255, 255, 0.08);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.section-title h2 {
  font-size: 20px;
}

.role-note {
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: rgba(223, 177, 65, 0.1);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(223, 177, 65, 0.2);
}

/* Form layouts */
.lead-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.lead-form .wide {
  grid-column: span 2;
}

.form-actions {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

/* Commands panel */
.command-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  background: rgba(13, 19, 33, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  transition: border-color 0.3s ease;
}

.command-panel:hover {
  border-color: rgba(255, 255, 255, 0.08);
}

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

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.quick-actions button {
  min-height: 32px;
  font-size: 11.5px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.quick-actions button:hover {
  background: rgba(223, 177, 65, 0.05);
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 8px rgba(223, 177, 65, 0.15);
}

/* Output terminal */
pre {
  background: #05070e;
  color: #c8d3f5;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: inset 0 4px 16px rgba(0, 0, 0, 0.5);
}

pre::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

pre::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

/* Leads Filters & Search */
.leads-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
}

.leads-filters .search-box {
  position: relative;
  flex: 1;
}

.leads-filters .search-box input {
  padding-left: 40px;
}

.leads-filters .search-box .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.leads-filters select {
  width: auto;
  min-width: 180px;
}

/* Logs Filters */
.logs-filters {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr 0.8fr;
  gap: 16px;
  align-items: flex-end;
  width: 100%;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: var(--radius-md);
}

.logs-filters .filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.logs-filters select,
.logs-filters input {
  min-height: 38px;
}

.section-subtitle {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 13px;
}

.admin-user-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-active-line {
  align-self: end;
  min-height: 42px;
  display: flex;
  align-items: center;
}

.admin-users-list {
  display: grid;
  gap: 12px;
  max-height: 620px;
  overflow-y: auto;
  padding-right: 4px;
}

.admin-user-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(13, 19, 33, 0.25);
}

.admin-user-card.inactive {
  opacity: 0.72;
  border-left: 4px solid var(--danger);
}

.admin-user-card.active {
  border-left: 4px solid var(--ok);
}

.admin-user-card > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-user-card strong {
  color: var(--text-main);
}

.admin-user-card small {
  color: var(--text-muted);
}

.admin-root-note {
  color: var(--gold) !important;
}

.admin-user-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-user-actions button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

/* Tables styling */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(13, 19, 33, 0.2);
}

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

th, td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

th {
  background: rgba(15, 23, 42, 0.3);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

td {
  font-size: 13.5px;
  color: var(--text-main);
}

tr:last-child td {
  border-bottom: 0;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.015);
}

td strong {
  color: var(--text-main);
}

td button {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Grid Layout Two Panels */
.grid-two {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 24px;
}

/* Lists panels styling */
.approval-list,
.docs-list,
.log-list,
.queue-list,
.profile-body {
  display: grid;
  gap: 12px;
}

/* Cards design within lists */
.approval-item,
.doc-item,
.profile-card,
.log-row,
.queue-item {
  background: rgba(13, 19, 33, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: var(--transition);
}

.approval-item:hover,
.doc-item:hover,
.profile-card:hover,
.log-row:hover,
.queue-item:hover {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(13, 19, 33, 0.4);
}

.approval-item strong,
.doc-item strong,
.profile-card strong,
.log-row strong,
.queue-item strong {
  color: var(--text-main);
  font-size: 14.5px;
}

.approval-item small,
.doc-item small,
.profile-card small,
.log-row small,
.queue-item small {
  color: var(--text-muted);
  font-size: 12.5px;
}

/* Work queue priorities styling */
.queue-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.queue-pill {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--surface);
}

.queue-pill.high,
.queue-item.high {
  border-left: 4px solid var(--danger) !important;
}

.queue-pill.medium,
.queue-item.medium {
  border-left: 4px solid var(--gold) !important;
}

.queue-pill.low,
.queue-item.low {
  border-left: 4px solid var(--teal) !important;
}

.queue-pill.warn {
  color: var(--warn);
  border-color: var(--warn-border);
  background: var(--warn-soft);
}

.queue-item {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 16px;
}

.queue-item button {
  min-height: 32px;
  font-size: 12px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
}

/* Document statuses borders */
.doc-item.missing { border-left: 4px solid var(--warn) !important; }
.doc-item.received { border-left: 4px solid var(--ok) !important; }
.doc-item.invalid { border-left: 4px solid var(--danger) !important; }
.doc-item.under_review { border-left: 4px solid var(--blue) !important; }

.mini-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.mini-actions button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 11px;
  border-radius: var(--radius-sm);
}

/* Profile display grid */
.profile-body {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.profile-card.full {
  grid-column: 1 / -1;
}

.profile-card a {
  color: var(--cyan);
  font-weight: 600;
  text-decoration: none;
}

.profile-card a:hover {
  text-decoration: underline;
}

.profile-card small {
  display: block;
  margin-top: 4px;
}

/* Profile Editing Inputs */
.profile-card input,
.profile-card select {
  margin-top: 4px;
  min-height: 36px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--line-strong);
}

.profile-card.edit-actions-card {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: rgba(223, 177, 65, 0.05);
  border: 1px dashed var(--gold);
}

.profile-card.edit-actions-card button {
  min-height: 36px;
}

/* Workflow Control Panel */
.workflow-panel {
  display: grid;
  grid-template-columns: 1.5fr 1fr auto 1fr auto;
  align-items: flex-end;
  gap: 12px;
  padding: 18px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.workflow-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.workflow-actions button {
  min-height: 36px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.workflow-actions button:hover {
  background: var(--surface-hover);
  border-color: var(--gold);
  color: var(--gold);
}

.workflow-panel > button {
  min-height: 40px;
}

/* Approvals actions */
.approval-buttons {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 8px;
  margin-top: 10px;
}

.approval-buttons button:last-child {
  background: var(--danger-soft);
  border-color: var(--danger-border);
  color: var(--danger);
}

.approval-buttons button:last-child:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: var(--danger);
}

/* Logs and summaries */
.log-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.log-pill {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--surface);
  text-align: center;
}

.log-pill.ok {
  color: var(--ok);
  border-color: var(--ok-border);
  background: var(--ok-soft);
}

.log-pill.warn {
  color: var(--warn);
  border-color: var(--warn-border);
  background: var(--warn-soft);
}

.log-pill.error {
  color: var(--danger);
  border-color: var(--danger-border);
  background: var(--danger-soft);
}

.log-row.warn { border-left: 4px solid var(--gold) !important; }
.log-row.error, .log-row.critical { border-left: 4px solid var(--danger) !important; }

.log-row code {
  display: block;
  font-family: var(--font-mono);
  padding: 10px;
  border-radius: var(--radius-sm);
  background: #070a13;
  border: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 11.5px;
  margin-top: 8px;
  word-break: break-all;
}

/* Public Layout pages */
.public-shell {
  width: min(1000px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 60px;
}

.public-header {
  margin-bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.public-brand {
  border: 0;
  padding: 0;
  justify-content: flex-start;
}

.public-application {
  padding: 32px;
}

/* Premium Language Selector styling */
.lang-selector {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  padding: 3px;
  border-radius: var(--radius-md);
  backdrop-filter: var(--glass-backdrop);
}

.lang-btn {
  min-height: 28px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: none;
}

.lang-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
  transform: none;
}

.lang-btn.active {
  color: var(--text-inverse);
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold-glow);
}

.lang-btn.active:hover {
  background: #f1c752;
  color: var(--text-inverse);
  box-shadow: 0 0 12px var(--gold-glow);
}

/* Enriched Company Layouts */
.company-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.company-image-card {
  position: relative;
  grid-column: span 1;
  background: rgba(13, 19, 33, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 380px;
  box-shadow: var(--shadow);
}

.company-image-card img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.company-image-card .card-content {
  position: relative;
  z-index: 2;
  background: rgba(8, 12, 21, 0.75) !important;
  backdrop-filter: blur(12px);
  padding: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-image-wrap {
  width: 100%;
  aspect-ratio: 16 / 7;
  max-height: 320px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow);
  background: #000000;
  margin-bottom: 20px;
  display: block;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.95;
  transition: var(--transition);
}

.hero-image-wrap:hover .hero-image {
  transform: scale(1.01);
  opacity: 1;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.service-item-card {
  background: rgba(255, 255, 255, 0.02);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition);
}

.service-item-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: var(--shadow);
}

.service-item-card i, .service-item-card svg {
  color: var(--gold);
  width: 28px;
  height: 28px;
}

.service-item-card h3 {
  font-size: 16px;
  color: var(--text-main);
}

.service-item-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.team-grid-expanded {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.team-card-expanded {
  background: var(--surface);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition);
}

.team-card-expanded:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.team-card-expanded .team-member-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.team-card-expanded strong {
  font-size: 16px;
  color: var(--text-main);
}

.team-card-expanded span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.team-card-expanded p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

@media (max-width: 820px) {
  .company-grid, .team-grid-expanded {
    grid-template-columns: 1fr;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
}


.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.consent-line {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  text-transform: none;
  cursor: pointer;
}

.consent-line input {
  width: 18px;
  min-height: 18px;
  margin-top: 0;
  cursor: pointer;
}

.consent-line span {
  user-select: none;
}

/* Responsive layout adjustments */
@media (max-width: 1200px) {
  body.app-page {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
    position: static;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding: 16px;
  }

  nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
  }

  nav a {
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.03);
    background: rgba(255, 255, 255, 0.01);
  }
  
  nav a span {
    display: none;
  }

  main {
    padding: 24px 20px;
  }

  .command-panel,
  .grid-two,
  .workflow-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  nav a {
    min-height: 42px;
    gap: 8px;
    justify-content: flex-start;
  }

  nav a span {
    display: inline;
    font-size: 12px;
    overflow-wrap: anywhere;
  }

  .metrics,
  .lead-form,
  .profile-body,
  .log-summary,
  .queue-summary,
  .logs-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lead-form .wide {
    grid-column: span 2;
  }

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

  .top-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .session-panel {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .queue-item {
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: flex-start;
  }

  .admin-user-card {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .admin-user-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 580px) {
  nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics,
  .lead-form,
  .profile-body,
  .log-summary,
  .queue-summary,
  .logs-filters {
    grid-template-columns: 1fr;
  }

  .lead-form .wide {
    grid-column: auto;
  }

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

  .surface,
  .command-panel,
  .profile-surface {
    padding: 16px !important;
    border-radius: var(--radius-md) !important;
  }

  main {
    padding: 16px 12px;
  }
}

/* Premium Glassmorphic Modal Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  width: auto;
  height: auto;
  background: rgba(3, 5, 10, 0.75);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Modal Container */
.modal-container {
  width: min(650px, calc(100% - 32px));
  background: linear-gradient(135deg, rgba(13, 19, 33, 0.95) 0%, rgba(6, 9, 16, 0.98) 100%);
  border: 1px solid rgba(223, 177, 65, 0.15);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96) translateY(8px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.open .modal-container {
  transform: scale(1) translateY(0);
}

/* Header */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.modal-header h2 {
  font-size: 20px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header h2 i, .modal-header h2 svg {
  color: var(--gold);
}

.modal-header .close-btn {
  background: transparent;
  border: 0;
  min-height: auto;
  padding: 4px;
  color: var(--text-muted);
  box-shadow: none;
  cursor: pointer;
}

.modal-header .close-btn:hover {
  color: var(--text-main);
  background: transparent;
  box-shadow: none;
}

/* Body */
.modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: var(--radius-md);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-item span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.meta-item strong {
  font-size: 14px;
  color: var(--text-main);
}

.meta-item strong.badge.high {
  border-left: 0;
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.meta-item strong.badge.medium {
  border-left: 0;
  background: var(--warn-soft);
  color: var(--warn);
  border: 1px solid var(--warn-border);
}

.meta-item strong.badge.low {
  border-left: 0;
  background: rgba(16, 185, 129, 0.05);
  color: var(--ok);
  border: 1px solid var(--ok-border);
}

.modal-payload-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 12px;
}

.payload-details {
  background: #070a13;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px;
}

.payload-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.payload-field:last-child {
  margin-bottom: 0;
}

.payload-field strong {
  font-size: 12px;
  color: var(--text-muted);
}

.payload-field span {
  font-size: 14px;
  color: var(--text-main);
}

.payload-field span.gold-text {
  color: var(--gold);
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 18px;
}

.message-preview {
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--gold);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-style: italic;
  color: var(--text-main);
  font-size: 13.5px;
  white-space: pre-wrap;
  line-height: 1.5;
}

.json-payload {
  background: transparent;
  border: 0;
  padding: 0;
  box-shadow: none;
}

/* Footer */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
}

.modal-footer button {
  min-height: 42px;
  font-weight: 600;
}

.btn-approve {
  background: linear-gradient(135deg, var(--ok) 0%, #059669 100%);
  border-color: rgba(255, 255, 255, 0.1);
}

.btn-approve:hover:not(:disabled) {
  background: linear-gradient(135deg, #34d399 0%, #059669 100%);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.btn-cancel {
  background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
  border-color: var(--line-strong);
  color: var(--text-muted);
}

.btn-cancel:hover:not(:disabled) {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: var(--danger-border);
  box-shadow: none;
}

/* Command History styles */
.command-history-wrap {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.command-history-wrap h3 {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
  font-weight: 700;
}

.command-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 4px;
}

.command-history-list::-webkit-scrollbar {
  width: 4px;
}

.command-history-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.history-placeholder {
  font-size: 12.5px;
  color: var(--text-muted);
  font-style: italic;
  padding: 8px 0;
}

.history-item {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: var(--transition);
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line-strong);
}

.history-item.success {
  border-left: 3px solid var(--ok) !important;
}

.history-item.error {
  border-left: 3px solid var(--danger) !important;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cmd-text {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-main);
  word-break: break-all;
}

.cmd-time {
  font-size: 10.5px;
  color: var(--text-muted);
}

.history-reply {
  font-size: 12px;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.4;
}

/* Modal Token Row & Copy Button */
.token-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.copy-btn {
  background: transparent;
  border: 0;
  min-height: auto;
  padding: 4px;
  color: var(--text-muted);
  box-shadow: none;
  cursor: pointer;
}

.copy-btn:hover {
  color: var(--gold);
  background: transparent;
  box-shadow: none;
  transform: scale(1.1);
}

.copy-btn i, .copy-btn svg {
  width: 14px;
  height: 14px;
}

/* Document Visualizer Modal overrides */
.doc-viewer-container {
  width: min(1200px, calc(100% - 32px)) !important;
  height: 90vh;
}

.doc-viewer-body {
  flex: 1;
  padding: 0 !important;
  overflow: hidden !important;
}

.doc-viewer-content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #070a13;
}

.doc-viewer-content iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: white;
}

.doc-viewer-content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.doc-viewer-content .error-message {
  color: var(--danger);
  font-size: 16px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Communications Timeline */
.comms-history-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
  padding: 12px;
  background: rgba(6, 9, 19, 0.5);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.chat-bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: fadeIn 0.2s ease-out;
}

.chat-bubble.outbound {
  align-self: flex-end;
  border-top-right-radius: 4px;
}

.chat-bubble.inbound {
  align-self: flex-start;
  border-top-left-radius: 4px;
}

.chat-bubble.draft {
  border-style: dashed;
  border-color: var(--warn-border);
  background: rgba(245, 158, 11, 0.03);
}

.chat-bubble.sent {
  border-color: var(--ok-border);
  background: rgba(16, 185, 129, 0.03);
}

.chat-bubble.send_blocked,
.chat-bubble.cancelled {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.01);
  opacity: 0.7;
}

.bubble-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}

.bubble-header span.channel {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--gold);
}

.bubble-header span.channel.whatsapp {
  color: var(--ok);
}

.bubble-header span.channel.email {
  color: var(--blue);
}

.bubble-body {
  font-size: 13.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.bubble-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
}

.bubble-status {
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.bubble-status.draft {
  background: var(--warn-soft);
  color: var(--warn);
}

.bubble-status.sent {
  background: var(--ok-soft);
  color: var(--ok);
}

.bubble-status.blocked {
  background: var(--danger-soft);
  color: var(--danger);
}

.bubble-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.bubble-actions button {
  min-height: 28px;
  padding: 0 8px;
  font-size: 11px;
  border-radius: var(--radius-sm);
}

.chat-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.chat-quick-actions span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.chat-quick-actions button {
  min-height: 34px;
  font-size: 12px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}

.chat-quick-actions button:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--surface-hover);
}

/* Secure Full-Screen Login Overlay */
body[data-authenticated="false"] {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.95) 0%, rgba(2, 6, 23, 1) 100%);
  overflow: hidden;
}

body[data-authenticated="false"] .sidebar,
body[data-authenticated="false"] main {
  display: none !important;
}

body[data-authenticated="true"] #loginOverlay {
  display: none !important;
}

.login-overlay-card {
  width: min(400px, 100%);
  padding: 40px 32px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(223, 177, 65, 0.15);
  background: rgba(13, 19, 33, 0.75);
  backdrop-filter: blur(24px);
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.65), 0 0 80px rgba(223, 177, 65, 0.03);
  display: flex;
  flex-direction: column;
  gap: 28px;
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.login-brand img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(223, 177, 65, 0.4);
  object-fit: contain;
  background: #ffffff;
  padding: 4px;
  box-shadow: 0 0 16px rgba(223, 177, 65, 0.15);
}

.login-logo-link {
  display: inline-flex;
  border-radius: var(--radius-md);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), filter 0.2s ease, box-shadow 0.2s ease;
}

.login-logo-link:hover {
  transform: scale(1.05);
  filter: brightness(1.05);
  box-shadow: 0 0 20px rgba(223, 177, 65, 0.25);
}

.login-brand h1 {
  font-size: 24px;
  font-family: var(--font-display);
  background: linear-gradient(135deg, #ffffff 40%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 2px;
}

.login-brand span {
  font-size: 12.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.login-form-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-input {
  width: 100%;
  margin-top: 6px;
  min-height: 42px !important;
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid var(--line-strong) !important;
  border-radius: var(--radius-md) !important;
  padding: 0 14px !important;
  font-size: 14px !important;
  color: var(--text-main) !important;
  transition: var(--transition) !important;
}

.login-input:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 2px rgba(223, 177, 65, 0.15) !important;
  outline: none;
}

.login-error-msg {
  padding: 12px;
  background: var(--danger-soft);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-md);
  color: var(--danger);
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
}

.login-submit-btn {
  width: 100%;
  min-height: 44px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-md);
  background: var(--gold);
  color: #0b0f19;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.login-submit-btn:hover {
  background: #f1c752;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(223, 177, 65, 0.3);
}

.login-submit-btn:active {
  transform: translateY(0);
}

.login-google-btn {
  margin-top: 0;
  background: transparent;
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.15);
  text-decoration: none;
  gap: 10px;
}

.login-google-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: none;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.login-forgot-link {
  display: inline-block;
  margin-top: 4px;
  margin-bottom: 4px;
  font-size: 12.5px;
  color: var(--gold);
  text-decoration: none;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.login-forgot-link:hover {
  opacity: 1;
  text-decoration: underline;
}

.login-hint-msg {
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(223, 177, 65, 0.06);
  border: 1px solid rgba(223, 177, 65, 0.12);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 4px;
  line-height: 1.5;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Public Application Checklist Preview */
.checklist-preview-container {
  background: rgba(223, 177, 65, 0.03);
  border: 1px dashed var(--gold);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 10px 0 20px;
  animation: slideDown 0.3s ease-out;
}

.checklist-preview-container h3 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.checklist-preview-container h3 svg,
.checklist-preview-container h3 i {
  width: 16px;
  height: 16px;
}

.checklist-preview-list {
  list-style: none;
  padding-left: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 580px) {
  .checklist-preview-list {
    grid-template-columns: 1fr;
  }
}

.checklist-preview-list li {
  font-size: 13px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.checklist-preview-list li::before {
  content: "✓";
  color: var(--gold);
  font-weight: bold;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Simulator CSS Styles */
.simulator-section {
  margin-top: 48px;
}

.simulator-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  margin-top: 24px;
}

.sim-controls, .sim-results {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sim-control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sim-control-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
}

.sim-control-val {
  color: var(--gold);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
}

/* Beautiful Custom Sliders */
.sim-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 3px;
  outline: none;
  padding: 0;
  margin: 0;
  transition: var(--transition);
}

.sim-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--bg);
  cursor: pointer;
  box-shadow: 0 0 8px var(--gold-glow);
  transition: var(--transition);
}

.sim-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: #f1c752;
  box-shadow: 0 0 12px var(--gold-glow);
}

/* Simulator Results styling */
.sim-results-card {
  background: rgba(255, 255, 255, 0.01);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.sim-results-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--gold));
}

.sim-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.sim-stat:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.sim-stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

.sim-stat-value {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.sim-stat-value.gold-highlight {
  color: var(--gold);
  text-shadow: 0 0 8px var(--gold-glow);
}

.sim-badge {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sim-badge.personal { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.sim-badge.realestate { background: rgba(14, 165, 233, 0.15); color: #38bdf8; border: 1px solid rgba(14, 165, 233, 0.3); }
.sim-badge.business { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.sim-badge.advanced { background: rgba(223, 177, 65, 0.15); color: var(--gold); border: 1px solid rgba(223, 177, 65, 0.3); }

/* SVG Dynamic Repayment Chart */
.sim-chart-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
}

.sim-chart-svg {
  width: 160px;
  height: 160px;
}

.sim-chart-bg {
  fill: none;
  stroke: var(--surface-soft);
  stroke-width: 12;
}

.sim-chart-bar-principal {
  fill: none;
  stroke: var(--blue);
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dasharray 0.3s ease;
}

.sim-chart-bar-interest {
  fill: none;
  stroke: var(--gold);
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.3s ease, stroke-dasharray 0.3s ease;
}

/* Flow diagram styles */
.flow-diagram-section {
  margin-top: 48px;
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.flow-step-card {
  background: var(--surface);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  position: relative;
  transition: var(--transition);
  cursor: default;
}

.flow-step-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 8px 24px rgba(223, 177, 65, 0.08);
}

.flow-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(223, 177, 65, 0.05);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  transition: var(--transition);
}

.flow-step-card:hover .flow-icon-wrap {
  background: var(--gold);
  color: var(--text-inverse);
  box-shadow: 0 0 15px var(--gold-glow);
}

.flow-step-card h3 {
  font-size: 14px;
  color: var(--text-main);
}

.flow-step-card p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.flow-arrow {
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--line-strong);
  font-size: 18px;
  pointer-events: none;
}

@media (max-width: 820px) {
  .simulator-grid {
    grid-template-columns: 1fr;
  }
  .flow-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .flow-arrow {
    display: none;
  }
}

/* Scroll reveals */
.reveal {
  opacity: 0;
  transform: translateY(24px) scale(0.99);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Services tabbed interface styling */
.services-tabs-container {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.service-tab-btn {
  min-height: 42px;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.02);
  border: var(--glass-border);
  color: var(--text-muted);
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: none;
}

.service-tab-btn:hover {
  color: var(--text-main);
  background: var(--surface-soft);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.service-tab-btn.active {
  color: var(--gold);
  background: rgba(223, 177, 65, 0.05);
  border-color: var(--gold);
  box-shadow: 0 0 15px rgba(223, 177, 65, 0.1);
}

.service-tab-panel {
  display: none;
  background: var(--surface);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-top: 24px;
  animation: fadeIn 0.4s ease-out;
  box-shadow: var(--shadow);
}

.service-tab-panel.active {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
}

.service-tab-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.service-tab-left h3 {
  font-size: 20px;
  color: var(--gold);
  font-family: var(--font-display);
}

.service-tab-left p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.service-tab-bullets {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.service-tab-bullets li {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-main);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.service-tab-bullets li i, .service-tab-bullets li svg {
  color: var(--gold);
  width: 16px;
  height: 16px;
  margin-top: 3px;
  flex-shrink: 0;
}

.service-tab-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  gap: 16px;
}

.service-tab-right i, .service-tab-right svg {
  width: 48px;
  height: 48px;
  color: var(--gold);
}

.service-tab-right strong {
  font-size: 15px;
  color: var(--text-main);
}

.service-tab-right span {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

@media (max-width: 820px) {
  .service-tab-panel.active {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Scenarios section styles */
.scenarios-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.scenario-card {
  background: var(--surface);
  border: var(--glass-border);
  backdrop-filter: var(--glass-backdrop);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: var(--transition);
}

.scenario-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
  border-color: var(--gold);
}

.scenario-card h3 {
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--gold);
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.scenario-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.scenario-problem, .scenario-solution {
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.5;
}

.scenario-problem {
  background: rgba(239, 68, 68, 0.03);
  border: 1px solid rgba(239, 68, 68, 0.1);
}

.scenario-solution {
  background: rgba(16, 185, 129, 0.03);
  border: 1px solid rgba(16, 185, 129, 0.1);
}

.scenario-problem strong {
  color: #f87171;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 13.5px;
}

.scenario-problem strong i, .scenario-problem strong svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
}

.scenario-solution strong {
  color: #34d399;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 13.5px;
}

.scenario-solution strong i, .scenario-solution strong svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
}

.scenario-problem p {
  color: var(--text-muted);
}

.scenario-solution p {
  color: var(--text-main);
}

@media (max-width: 900px) {
  .scenarios-grid {
    grid-template-columns: 1fr;
  }
}
/* Styled application output pre-boxes */
#publicApplicationOutput {
  display: block;
  margin-top: 20px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-all;
  transition: all 0.3s ease;
}

#publicApplicationOutput.state-success {
  background: rgba(16, 185, 129, 0.04);
  border-color: rgba(16, 185, 129, 0.2);
  color: var(--text-main);
  font-family: inherit;
  font-size: 14.5px;
  white-space: normal;
}

#publicApplicationOutput.state-error {
  background: rgba(239, 68, 68, 0.04);
  border-color: rgba(239, 68, 68, 0.2);
  color: var(--danger);
  font-family: var(--font-mono);
  font-size: 13px;
}

/* Company Values Grid & Cards Styling */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.value-card {
  background: rgba(255, 255, 255, 0.02);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  transition: var(--transition);
}

.value-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
  background: rgba(223, 177, 65, 0.02);
}

.value-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(223, 177, 65, 0.08);
  border: 1px solid rgba(223, 177, 65, 0.25);
  display: flex;
  justify-content: center;
  align-items: center;
}

.value-icon-wrap i, .value-icon-wrap svg {
  width: 22px;
  height: 22px;
  color: var(--gold);
}

.value-card h3 {
  font-family: var(--font-display);
  font-size: 16.5px;
  color: var(--text-main);
  font-weight: 600;
}

.value-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

@media (max-width: 820px) {
  .values-grid {
    grid-template-columns: 1fr;
  }
}

/* Public website v2 */
.public-site {
  background: #f5f7fb;
  color: #172033;
  overflow-x: hidden;
}

.public-site::before,
.public-site::after {
  display: none;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  min-height: 76px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(245, 247, 251, 0.94);
  border-bottom: 1px solid rgba(23, 32, 51, 0.08);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #172033;
  text-decoration: none;
  min-width: 220px;
}

.site-brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid rgba(184, 141, 44, 0.35);
  background: #ffffff;
}

.site-brand span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-brand strong {
  font-family: var(--font-display);
  font-size: 18px;
  color: #172033;
}

.site-brand small {
  color: #7a6230;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-links a {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  color: #46546a;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.site-links a svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.site-links a:hover {
  background: rgba(23, 32, 51, 0.06);
  color: #172033;
}

.site-links .nav-cta {
  background: #172033;
  color: #ffffff;
}

.site-links .nav-cta:hover {
  background: #26344d;
  color: #ffffff;
}

.site-links .nav-private {
  border: 1px solid rgba(184, 141, 44, 0.34);
  background: rgba(223, 177, 65, 0.12);
  color: #7a6230;
  gap: 7px;
}

.site-links .nav-private:hover {
  background: rgba(223, 177, 65, 0.2);
  color: #172033;
}

.public-site .lang-selector {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.public-site .lang-btn {
  min-height: 34px;
  padding: 0 10px;
  background: #ffffff;
  border: 1px solid rgba(23, 32, 51, 0.12);
  color: #46546a;
  box-shadow: none;
}

.public-site .lang-btn.active,
.public-site .lang-btn[aria-pressed="true"] {
  background: #172033;
  border-color: #172033;
  color: #ffffff;
}

.public-main {
  width: 100%;
  max-width: none;
  padding: 0;
  display: block;
}

.public-hero {
  height: calc(86vh - 20px);
  min-height: 660px;
  max-height: 780px;
  position: relative;
  display: grid;
  align-items: center;
  overflow: hidden;
  background: #172033;
}

.public-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== Animated hero (modern fintech WOW layer) ===== */
.hero-fx {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(120% 120% at 80% 0%, #12244d 0%, #0a142b 55%, #070d1c 100%);
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.5;
  will-change: transform;
}
.hero-orb--blue {
  width: 380px; height: 380px;
  top: -60px; right: 8%;
  background: radial-gradient(circle, rgba(61, 126, 219, 0.8), rgba(61, 126, 219, 0) 70%);
  animation: heroDrift1 18s ease-in-out infinite;
}
.hero-orb--gold {
  width: 420px; height: 420px;
  bottom: -120px; right: 24%;
  background: radial-gradient(circle, rgba(223, 177, 65, 0.65), rgba(223, 177, 65, 0) 70%);
  animation: heroDrift2 22s ease-in-out infinite;
}
.hero-orb--cyan {
  width: 280px; height: 280px;
  top: 30%; right: 40%;
  background: radial-gradient(circle, rgba(70, 200, 220, 0.45), rgba(70, 200, 220, 0) 70%);
  animation: heroDrift3 16s ease-in-out infinite;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(125, 165, 230, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 165, 230, 0.06) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(110% 100% at 75% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(110% 100% at 75% 40%, #000 30%, transparent 75%);
}

.hero-net {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-net .net-line {
  stroke-dasharray: 10 14;
  animation: netFlow 2.4s linear infinite;
}
.hero-net .net-line--2 { animation-duration: 3.1s; }
.hero-net .net-line--3 { animation-duration: 3.8s; }
.hero-net .net-node { animation: nodePulse 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.hero-net .net-node:nth-child(2) { animation-delay: .6s; }
.hero-net .net-node:nth-child(3) { animation-delay: 1.2s; }

.hero-chips {
  position: absolute;
  top: 50%;
  right: clamp(20px, 7vw, 110px);
  transform: translateY(-50%);
  display: grid;
  gap: 14px;
  justify-items: end;
}
.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #eaf1ff;
  letter-spacing: 0.2px;
  background: rgba(18, 30, 58, 0.55);
  border: 1px solid rgba(223, 177, 65, 0.35);
  border-radius: 999px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: chipFloat 6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
  will-change: transform;
}
.hero-chip i { width: 17px; height: 17px; color: #f1c752; }

@keyframes heroDrift1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-40px, 30px); } }
@keyframes heroDrift2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(36px, -28px); } }
@keyframes heroDrift3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(20px, 24px) scale(1.12); } }
@keyframes netFlow { to { stroke-dashoffset: -48; } }
@keyframes nodePulse { 0%,100% { opacity: 0.5; transform: scale(1); } 50% { opacity: 1; transform: scale(1.8); } }
@keyframes chipFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

@media (max-width: 760px) {
  .hero-chips { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-orb, .hero-net .net-line, .hero-net .net-node, .hero-chip { animation: none; }
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 14, 25, 0.92), rgba(8, 14, 25, 0.64) 45%, rgba(8, 14, 25, 0.2));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(860px, calc(100% - 36px));
  padding: clamp(42px, 7vh, 84px) 0;
  margin-left: clamp(18px, 7vw, 96px);
  color: #ffffff;
}

.eyebrow,
.section-kicker {
  color: #b88d2c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin-top: 12px;
  color: #ffffff;
  background: none;
  -webkit-text-fill-color: initial;
  font-size: clamp(58px, 8vw, 110px);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-copy {
  width: min(690px, 100%);
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.55;
}

.hero-actions,
.hero-assurance {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button-link {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.button-link svg {
  width: 18px;
  height: 18px;
}

.primary-link {
  background: #dfb141;
  color: #101827;
}

.secondary-link {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.hero-assurance {
  margin-top: 22px;
}

.hero-assurance span {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.11);
  color: rgba(255, 255, 255, 0.9);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
}

.hero-assurance svg {
  width: 15px;
  height: 15px;
  color: #dfb141;
}

.public-band {
  padding: clamp(54px, 7vw, 88px) clamp(18px, 6vw, 84px);
}

.intro-band,
.process-band,
.consultation-band {
  background: #ffffff;
}

.services-band,
.tech-band {
  background: #eef2f7;
}

.split-copy {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1.15fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  margin-top: 16px;
}

.split-copy h2,
.section-heading h2,
.tech-copy h2,
.consult-copy h2,
.form-hero h1 {
  color: #172033;
  background: none;
  -webkit-text-fill-color: initial;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.04;
  letter-spacing: 0;
}

.split-copy p,
.tech-copy p,
.consult-copy p,
.form-hero p,
.program-card p,
.process-steps p {
  color: #516074;
  font-size: 15px;
  line-height: 1.7;
}

.section-heading {
  max-width: 760px;
  display: grid;
  gap: 10px;
}

.program-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.program-card,
.process-steps article {
  background: #ffffff;
  border: 1px solid rgba(23, 32, 51, 0.08);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 12px 30px rgba(23, 32, 51, 0.06);
}

.program-card svg {
  width: 28px;
  height: 28px;
  color: #b88d2c;
}

.program-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.program-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, #3d7edb, #46c8dc, #f1c752, #c8941f);
  background-size: 300% 100%;
  animation: cardSheen 6s linear infinite;
  opacity: 0.9;
}
.program-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 48px rgba(23, 32, 51, 0.16);
  border-color: rgba(223, 177, 65, 0.5);
}
.program-card .card-illustration {
  display: block;
  width: 56px;
  height: 56px;
  margin: 6px 0 14px;
  object-fit: contain;
  border: none;
  border-radius: 0;
}

/* Glassy glowing icon badge replacing flat clipart */
.program-card .card-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: linear-gradient(150deg, #16264c, #0e1b38);
  border: 1px solid rgba(223, 177, 65, 0.4);
  box-shadow: 0 10px 26px rgba(10, 18, 40, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.program-card .card-badge::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  background: radial-gradient(circle at 50% 0%, rgba(223, 177, 65, 0.45), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}
.program-card:hover .card-badge::after { opacity: 1; }
.program-card .card-badge i {
  width: 26px;
  height: 26px;
  color: #f1c752;
}

@keyframes cardSheen { to { background-position: 300% 0; } }

.program-card h3,
.process-steps h3 {
  margin-top: 14px;
  color: #172033;
  font-size: 18px;
  letter-spacing: 0;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.process-steps span {
  color: #b88d2c;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
}

.tech-band {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(340px, 1.1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.tech-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(23, 32, 51, 0.16);
}

/* ===== Animated secure-technology panel ===== */
.tech-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  background: radial-gradient(120% 120% at 75% 10%, #14274f 0%, #0b1530 55%, #070d1c 100%);
  box-shadow: 0 22px 50px rgba(10, 18, 40, 0.4);
  border: 1px solid rgba(125, 165, 230, 0.12);
}
.tech-stage .tech-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(38px);
  opacity: 0.5;
  will-change: transform;
}
.tech-stage .tech-orb--blue {
  width: 220px; height: 220px; top: -50px; left: -40px;
  background: radial-gradient(circle, rgba(61,126,219,0.8), rgba(61,126,219,0) 70%);
  animation: heroDrift1 19s ease-in-out infinite;
}
.tech-stage .tech-orb--gold {
  width: 240px; height: 240px; bottom: -70px; right: -40px;
  background: radial-gradient(circle, rgba(223,177,65,0.6), rgba(223,177,65,0) 70%);
  animation: heroDrift2 23s ease-in-out infinite;
}
.tech-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(125,165,230,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125,165,230,0.07) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(100% 90% at 40% 50%, #000 35%, transparent 78%);
  -webkit-mask-image: radial-gradient(100% 90% at 40% 50%, #000 35%, transparent 78%);
}

/* console card */
.tech-console {
  position: absolute;
  left: 7%;
  top: 18%;
  width: 62%;
  padding: 14px;
  border-radius: 14px;
  background: rgba(16, 28, 56, 0.7);
  border: 1px solid rgba(125, 165, 230, 0.22);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: hidden;
}
.tc-head { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.tc-dot { width: 8px; height: 8px; border-radius: 50%; background: #34507f; }
.tc-dot:nth-child(1){ background:#e0644f; } .tc-dot:nth-child(2){ background:#e8b54a; } .tc-dot:nth-child(3){ background:#4caf72; }
.tc-live {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #8fd0a6;
}
.tc-live i { width: 7px; height: 7px; border-radius: 50%; background: #4caf72; box-shadow: 0 0 8px #4caf72; animation: nodePulse 1.8s ease-in-out infinite; }
.tc-rows { display: grid; gap: 10px; }
.tc-row { display: flex; align-items: center; gap: 9px; }
.tc-ico { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 7px; background: rgba(61,126,219,0.18); color: #9db8dd; flex: none; }
.tc-ico i { width: 13px; height: 13px; }
.tc-bar { height: 8px; border-radius: 4px; background: linear-gradient(90deg, rgba(157,184,221,0.5), rgba(157,184,221,0.12)); }
.tc-bar--a { width: 58%; } .tc-bar--b { width: 72%; } .tc-bar--c { width: 46%; } .tc-bar--d { width: 64%; }
.tc-tag { margin-left: auto; font-size: 9px; font-weight: 700; letter-spacing: .4px; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.tc-tag--ok { color: #8fd0a6; background: rgba(76,175,114,0.16); }
.tc-tag--rev { color: #f1c752; background: rgba(223,177,65,0.16); }
.tc-tag--pend { color: #9db8dd; background: rgba(157,184,221,0.14); }
.tc-scan {
  position: absolute; left: 0; right: 0; top: 0; height: 40%;
  background: linear-gradient(180deg, rgba(70,200,220,0) 0%, rgba(70,200,220,0.14) 80%, rgba(70,200,220,0.5) 100%);
  border-bottom: 1px solid rgba(110, 215, 235, 0.7);
  animation: techScan 3.4s ease-in-out infinite;
}

/* shield emblem */
.tech-shield {
  position: absolute; right: 8%; bottom: 12%;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,0.45));
  animation: chipFloat 6s ease-in-out infinite;
}
.tech-shield svg { display: block; }
.tech-shield .sh-ring { transform-box: fill-box; transform-origin: center; animation: techSpin 14s linear infinite; }
.tech-shield .sh-check { stroke-dasharray: 60; stroke-dashoffset: 0; animation: techDraw 3.4s ease-in-out infinite; }

/* floating chips */
.tech-chip {
  position: absolute;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 13px; font-size: 12px; font-weight: 700; color: #eaf1ff;
  background: rgba(18, 30, 58, 0.62);
  border: 1px solid rgba(223, 177, 65, 0.4);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  animation: chipFloat 6.5s ease-in-out infinite;
}
.tech-chip i { width: 14px; height: 14px; color: #f1c752; }
.tech-chip--enc { right: 6%; top: 12%; }
.tech-chip--aud { left: 12%; bottom: 9%; animation-delay: 1.4s; }

@keyframes techScan { 0% { transform: translateY(-110%); } 55%,100% { transform: translateY(290%); } }
@keyframes techSpin { to { transform: rotate(360deg); } }
@keyframes techDraw { 0% { stroke-dashoffset: 60; opacity: .3; } 45%,100% { stroke-dashoffset: 0; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .tech-stage .tech-orb, .tc-live i, .tc-scan, .tech-shield, .sh-ring, .sh-check, .tech-chip { animation: none; }
  .tech-shield .sh-check { stroke-dashoffset: 0; }
}

.tech-copy {
  display: grid;
  gap: 16px;
}

.tech-list {
  display: grid;
  gap: 10px;
}

.tech-list div {
  padding: 14px 0;
  border-top: 1px solid rgba(23, 32, 51, 0.1);
}

.tech-list dt {
  color: #172033;
  font-weight: 800;
}

.tech-list dd {
  margin-top: 4px;
  color: #516074;
  line-height: 1.55;
}
/* About Band — Stats + Team Section */
.about-band .section-heading {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 32px;
}

.about-lead {
  color: #516074;
  max-width: 640px;
  margin: 12px auto 0;
  text-align: center;
  line-height: 1.6;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.about-stat {
  text-align: center;
  padding: 28px 20px;
  background: #ffffff;
  border: 1px solid rgba(23, 32, 51, 0.08);
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(23, 32, 51, 0.05);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.about-stat:hover {
  border-color: rgba(223, 177, 65, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(23, 32, 51, 0.08);
}

.about-stat strong {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 800;
  background: linear-gradient(135deg, #f6d87a 0%, #dfb141 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.about-stat span {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: #516074;
  font-weight: 500;
}

/* Team Section */
.team-heading {
  text-align: center;
  margin-top: 64px;
  margin-bottom: 32px;
}

.team-heading .section-kicker {
  display: block;
  margin-bottom: 8px;
}

.team-heading h3 {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 700;
  color: #172033;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 820px;
  margin: 0 auto;
}

.team-card {
  background: rgba(13, 19, 33, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  backdrop-filter: blur(8px);
}

.team-card:hover {
  border-color: rgba(223, 177, 65, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* Professional Headshot Photo */
.team-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(223, 177, 65, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.team-card:hover .team-photo {
  border-color: rgba(223, 177, 65, 0.5);
  box-shadow: 0 4px 24px rgba(223, 177, 65, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Team Member Meta */
.team-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.team-meta strong {
  font-size: 17px;
  font-weight: 700;
  color: #e7eaf0;
  letter-spacing: -0.01em;
}

.team-role {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #dfb141;
}

.team-role--tech {
  color: #5d9bee;
}

.team-meta p {
  font-size: 13px;
  color: rgba(231, 234, 240, 0.78);
  line-height: 1.55;
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 12px;
}

@media (max-width: 820px) {
  .about-stats {
    grid-template-columns: 1fr;
  }
  .team-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }
}

@media (max-width: 580px) {
  .team-heading {
    margin-top: 40px;
  }
}

/* FAQ band */
.faq-list {
  max-width: 820px;
  margin: 24px auto 0;
  display: grid;
  gap: 12px;
}

.faq-item {
  background: #ffffff;
  border: 1px solid rgba(23, 32, 51, 0.08);
  border-radius: 14px;
  padding: 0 20px;
  box-shadow: 0 4px 18px rgba(23, 32, 51, 0.04);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 30px 16px 0;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: clamp(15px, 1.6vw, 17px);
  color: #172033;
  position: relative;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  line-height: 1;
  color: #b88d2c;
}

.faq-item[open] summary::after { content: "\2212"; }

.faq-item p {
  margin: 0 0 18px;
  color: #516074;
  line-height: 1.6;
  font-size: 14.5px;
}

.consultation-band {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(340px, 1.2fr);
  gap: clamp(28px, 5vw, 72px);
}

.public-consult-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.public-consult-form button,
.public-form-output {
  grid-column: 1 / -1;
}

.public-site label {
  color: #46546a;
  letter-spacing: 0.04em;
}

.public-site input,
.public-site select {
  min-height: 46px;
  background: #ffffff;
  color: #172033;
  border: 1px solid rgba(23, 32, 51, 0.14);
}

.public-site input:focus,
.public-site select:focus {
  border-color: #b88d2c;
  box-shadow: 0 0 0 3px rgba(184, 141, 44, 0.14);
  background: #ffffff;
}

.public-site button.primary,
.public-site button[type="submit"] {
  min-height: 46px;
  border-radius: 8px;
  background: #172033;
  color: #ffffff;
  box-shadow: none;
}

.public-site button.primary:hover,
.public-site button[type="submit"]:hover {
  background: #26344d;
  color: #ffffff;
  box-shadow: none;
}

.public-form-output {
  max-height: none;
  background: #f5f7fb;
  color: #46546a;
  border: 1px solid rgba(23, 32, 51, 0.1);
}

.public-form-output.success {
  background: #eefaf4;
  color: #16603d;
  border-color: rgba(22, 96, 61, 0.18);
}

.public-form-output.error {
  background: #fff1f1;
  color: #9d2525;
  border-color: rgba(157, 37, 37, 0.18);
}

.public-disclaimer {
  padding: 22px clamp(18px, 6vw, 84px);
  background: #172033;
  color: rgba(255, 255, 255, 0.78);
  display: flex;
  gap: 10px;
  line-height: 1.6;
  font-size: 13px;
}

.public-disclaimer strong {
  color: #dfb141;
  white-space: nowrap;
}

.public-footer {
  padding: 28px clamp(18px, 6vw, 84px);
  background: #101827;
  color: rgba(255, 255, 255, 0.72);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  font-size: 13px;
}

.public-footer div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.public-footer strong,
.public-footer a {
  color: #ffffff;
}

.form-main {
  padding: clamp(26px, 5vw, 64px) clamp(18px, 6vw, 84px);
  display: grid;
  gap: 24px;
}

.form-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 24px;
  align-items: end;
}

.form-hero aside {
  background: #ffffff;
  border: 1px solid rgba(23, 32, 51, 0.08);
  border-radius: 8px;
  padding: 20px;
  display: grid;
  gap: 8px;
  box-shadow: 0 12px 30px rgba(23, 32, 51, 0.06);
}

.form-hero aside svg {
  color: #b88d2c;
  width: 28px;
  height: 28px;
}

.form-hero aside strong {
  color: #172033;
}

.form-hero aside span {
  color: #516074;
  font-size: 13px;
  line-height: 1.55;
}

.apply-trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(23, 32, 51, 0.08);
  border-radius: 8px;
  background: rgba(23, 32, 51, 0.08);
  box-shadow: 0 12px 30px rgba(23, 32, 51, 0.05);
}

.apply-trust-strip > div {
  min-width: 0;
  background: #ffffff;
  padding: 18px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 3px;
  align-items: start;
}

.apply-trust-strip svg,
.apply-trust-strip i {
  width: 20px;
  height: 20px;
  color: #b88d2c;
  grid-row: span 2;
  margin-top: 2px;
}

.apply-trust-strip strong {
  color: #172033;
  font-size: 13px;
}

.apply-trust-strip span {
  color: #5f6d80;
  font-size: 12px;
  line-height: 1.45;
}

.elevated-form {
  background: #ffffff;
  border-color: rgba(23, 32, 51, 0.08);
  border-radius: 8px;
  box-shadow: 0 16px 42px rgba(23, 32, 51, 0.08);
}

.public-form-page .lead-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.public-form-page .guided-application-form {
  grid-template-columns: 1fr;
  gap: 0;
}

.public-form-page .section-title h2 {
  color: #172033;
}

.apply-form-intro {
  color: #5f6d80;
  font-size: 13px;
  line-height: 1.6;
  margin-top: 6px;
  max-width: 760px;
}

.form-stage {
  min-width: 0;
  border: 0;
  border-top: 1px solid rgba(23, 32, 51, 0.08);
  margin: 0;
  padding: 22px 0 24px;
}

.form-stage:first-of-type {
  border-top: 0;
  padding-top: 4px;
}

.form-stage legend {
  width: 100%;
  padding: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #172033;
}

.form-stage legend span {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #172033;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

.form-stage legend strong {
  font-size: 16px;
  line-height: 1.25;
}

.form-stage > p,
.checklist-preview-copy {
  color: #5f6d80;
  font-size: 13px;
  line-height: 1.55;
  margin: 0 0 16px;
}

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

.stage-grid .stage-wide {
  grid-column: span 2;
}

.final-stage {
  display: grid;
  gap: 14px;
}

.final-stage .form-actions {
  align-items: center;
}

.public-form-page input[aria-invalid="true"],
.public-form-page select[aria-invalid="true"],
.public-form-page textarea[aria-invalid="true"] {
  border-color: rgba(185, 28, 28, 0.55);
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.08);
}

.public-form-page .role-note {
  color: #7a6230;
  background: rgba(223, 177, 65, 0.15);
  border-color: rgba(184, 141, 44, 0.24);
}

.public-form-page .checklist-preview-container {
  background: #f7f3e7;
  border-color: rgba(184, 141, 44, 0.35);
  border-style: solid;
  margin: 0;
}

.public-form-page .checklist-preview-container h3,
.public-form-page .checklist-preview-list li::before {
  color: #7a6230;
}

.public-form-page .checklist-preview-list li {
  color: #172033;
}

.public-form-page #publicApplicationOutput,
.public-form-page #documentUploadOutput {
  background: #f5f7fb;
  border-color: rgba(23, 32, 51, 0.1);
  color: #46546a;
  box-shadow: none;
}

.public-form-page #publicApplicationOutput.state-success {
  background: #eefaf4;
  border-color: rgba(22, 96, 61, 0.18);
  color: #172033;
}

.public-form-page #documentUploadOutput.state-success,
.public-form-page #documentUploadOutput.state-loading,
.public-form-page #publicApplicationOutput.state-loading {
  background: #eef4ff;
  border-color: rgba(29, 78, 216, 0.18);
  color: #172033;
}

.public-form-page #documentUploadOutput.state-error,
.public-form-page #publicApplicationOutput.state-error {
  background: #fff1f1;
  border-color: rgba(157, 37, 37, 0.18);
  color: #9d2525;
}

.upload-profile-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.upload-profile-card span,
.upload-score span {
  color: #7a6230;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.upload-score {
  min-width: 112px;
  padding: 12px 14px;
  border: 1px solid rgba(184, 141, 44, 0.24);
  border-radius: 8px;
  background: rgba(223, 177, 65, 0.12);
  display: grid;
  gap: 2px;
  text-align: right;
}

.upload-score strong {
  font-size: 28px;
  line-height: 1;
}

.upload-progress-panel {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(23, 32, 51, 0.08);
  border-radius: 8px;
  background: #f8fafc;
  margin: 16px 0;
}

.upload-progress-copy,
.upload-progress-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.upload-progress-copy span,
.upload-progress-stats span {
  color: #5f6d80;
  font-size: 12px;
  font-weight: 700;
}

.upload-progress-copy strong {
  color: #172033;
  font-size: 20px;
}

.upload-progress-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(23, 32, 51, 0.08);
  overflow: hidden;
}

.upload-progress-track div {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #b88d2c, #16603d);
  transition: width 0.25s ease;
}

.upload-next-step {
  min-height: 70px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(184, 141, 44, 0.26);
  border-radius: 8px;
  background: #fffaf0;
  margin-bottom: 16px;
}

.upload-next-step svg,
.upload-next-step i {
  width: 24px;
  height: 24px;
  color: #b88d2c;
}

.upload-next-step strong {
  display: block;
  color: #172033;
  font-size: 14px;
}

.upload-next-step span {
  display: block;
  color: #5f6d80;
  font-size: 13px;
  margin-top: 2px;
}

.public-form-page .docs-list {
  gap: 10px;
}

.public-form-page .doc-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.doc-status-pill {
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  color: #46546a;
  background: #edf1f7;
}

.doc-status-pill.received {
  color: #16603d;
  background: #e9f7ef;
}

.doc-status-pill.under_review {
  color: #1d4ed8;
  background: #e8f1ff;
}

.doc-status-pill.invalid {
  color: #991b1b;
  background: #fee2e2;
}

.guided-upload-form {
  grid-template-columns: 1fr;
  margin-top: 18px;
}

.upload-actions {
  margin-top: 0;
}

.compact-disclaimer {
  border-radius: 8px;
  padding: 18px 20px;
}

.inline-footer {
  background: transparent;
  color: #516074;
  padding: 10px 0 0;
  border-top: 1px solid rgba(23, 32, 51, 0.1);
  grid-template-columns: 1fr auto;
}

.public-form-page .doc-item,
.public-form-page .profile-card {
  background: #f8fafc;
  border-color: rgba(23, 32, 51, 0.08);
}

.public-form-page .doc-item strong,
.public-form-page .profile-card strong {
  color: #172033;
}

.public-form-page .doc-item small,
.public-form-page .profile-card small {
  color: #516074;
}

@media (max-width: 1000px) {
  .program-grid,
  .process-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-copy,
  .tech-band,
  .consultation-band,
  .form-hero {
    grid-template-columns: 1fr;
  }

  .apply-trust-strip,
  .stage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-nav {
    position: sticky;
    top: 0;
    flex-wrap: nowrap;
    gap: 8px;
    min-height: 54px;
    padding: 8px 14px;
  }

  .site-brand {
    min-width: 0;
    flex: 1;
  }

  .site-brand img {
    width: 34px;
    height: 34px;
  }

  .site-brand strong {
    font-size: 15px;
  }

  .site-brand small {
    font-size: 9px;
  }

  .nav-toggle {
    display: flex;
  }

  .lang-selector {
    order: 2;
    gap: 2px;
  }

  .lang-btn {
    min-height: 30px;
    min-width: 30px;
    font-size: 10px;
  }

  .site-links {
    order: 4;
    width: 100%;
    display: none;
    flex-direction: column;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px solid rgba(23, 32, 51, 0.08);
  }

  .site-links.open {
    display: flex;
  }

  .site-links a {
    width: 100%;
    justify-content: center;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 6px;
  }

  .site-links .nav-cta {
    order: 10;
  }

  .site-links .nav-private {
    order: 11;
  }

  .public-hero {
    height: auto;
    min-height: 640px;
    align-items: center;
  }

  .hero-content {
    width: calc(100% - 36px);
    margin: 0 auto;
  }

  .hero-copy,
  .form-hero,
  .form-hero > *,
  .form-hero p,
  .form-hero aside,
  .elevated-form,
  .split-copy,
  .tech-band,
  .consultation-band {
    max-width: 100%;
    min-width: 0;
  }

  .form-hero > *,
  .form-hero p,
  .form-hero aside,
  .elevated-form,
  .public-disclaimer.compact-disclaimer {
    width: min(100%, calc(100vw - 36px));
  }

  .hero-copy {
    max-width: 320px;
    overflow-wrap: anywhere;
  }

  .hero-content h1 {
    font-size: 58px;
  }

  .hero-actions,
  .public-consult-form,
  .public-footer,
  .inline-footer {
    grid-template-columns: 1fr;
  }

  .button-link {
    width: 100%;
    justify-content: center;
  }

  .hero-assurance span {
    flex: 1 1 100%;
    justify-content: center;
  }

  .program-grid,
  .process-steps,
  .public-form-page .lead-form,
  .apply-trust-strip,
  .stage-grid {
    grid-template-columns: 1fr;
  }

  .public-form-page .lead-form .wide,
  .lead-form .wide,
  .stage-grid .stage-wide {
    grid-column: auto;
  }

  .apply-trust-strip > div {
    padding: 16px;
  }

  .public-disclaimer {
    flex-direction: column;
  }

  .public-form-page .section-title {
    flex-direction: column;
    align-items: flex-start;
  }

  .public-form-page .role-note {
    max-width: 100%;
    white-space: normal;
  }

  .upload-profile-card,
  .public-form-page .doc-item,
  .upload-progress-copy,
  .upload-progress-stats {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .upload-progress-copy,
  .upload-progress-stats {
    flex-direction: column;
    align-items: flex-start;
  }

  .upload-score {
    width: 100%;
    text-align: left;
  }

  .doc-status-pill {
    width: fit-content;
  }

  .form-hero p,
  .form-hero aside span,
  .split-copy p,
  .tech-copy p,
  .consult-copy p {
    max-width: 320px;
    overflow-wrap: anywhere;
  }

  .form-main {
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
  }
}

/* Accessibility Focus States - Focus Visible for Keyboard Navigation */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--gold) !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 4px rgba(223, 177, 65, 0.25) !important;
}

/* ── Hamburger Toggle ── */
.nav-toggle {
  display: none;
  order: 3;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: none;
  border: 1px solid rgba(23, 32, 51, 0.1);
  border-radius: 6px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: #172033;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Chat Widget ── */
.chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  font-family: var(--font-body);
}

.chat-bubble {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #172033, #26344d);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25), 0 0 0 0 rgba(223, 177, 65, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  animation: chatPulse 3s ease-in-out infinite;
}

.chat-bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.35);
}

@keyframes chatPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(0,0,0,0.25), 0 0 0 0 rgba(223,177,65,0.4); }
  50% { box-shadow: 0 4px 20px rgba(0,0,0,0.25), 0 0 0 8px rgba(223,177,65,0); }
}

.chat-window {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 360px;
  max-height: 480px;
  background: #0e1526;
  border: 1px solid rgba(223, 177, 65, 0.15);
  border-radius: 16px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
  animation: chatSlideUp 0.3s ease-out;
}

.chat-window.open {
  display: flex;
}

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

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(135deg, #172033, #1e2a42);
  border-bottom: 1px solid rgba(223, 177, 65, 0.12);
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-header-info strong {
  font-size: 14px;
  color: #ffffff;
  font-family: var(--font-display);
}

.chat-header-info small {
  font-size: 11px;
  color: #4ade80;
}

.chat-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c8941f, #dfb141);
  color: #172033;
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
}

.chat-minimize {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
}

.chat-minimize:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 240px;
  max-height: 320px;
}

.chat-msg {
  max-width: 85%;
}

.chat-msg p {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.5;
  margin: 0;
}

.chat-msg--bot {
  align-self: flex-start;
}

.chat-msg--bot p {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.88);
  border-bottom-left-radius: 4px;
}

.chat-msg--user {
  align-self: flex-end;
}

.chat-msg--user p {
  background: linear-gradient(135deg, #c8941f, #dfb141);
  color: #172033;
  font-weight: 500;
  border-bottom-right-radius: 4px;
}

.chat-time {
  display: block;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 4px;
}

.chat-msg--user .chat-time {
  text-align: right;
}

.chat-input-bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.15);
}

.chat-input-bar input {
  flex: 1;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  font-size: 13px;
  outline: none;
}

.chat-input-bar input:focus {
  border-color: rgba(223, 177, 65, 0.3);
}

.chat-input-bar input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.chat-input-bar button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c8941f, #dfb141);
  color: #172033;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}

.chat-input-bar button:hover {
  transform: scale(1.05);
}

@media (max-width: 760px) {
  .chat-widget {
    bottom: 16px;
    right: 16px;
  }
  .chat-bubble {
    width: 48px;
    height: 48px;
  }
  .chat-window {
    width: calc(100vw - 32px);
    bottom: 64px;
    right: 0;
    max-height: 70vh;
  }
}
