/* Visa list + customer auth/form experience */
.visa-list {
  display: grid;
  gap: 14px;
  margin-top: 42px;
}

.visa-list-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 22px 24px;
  border: 1px solid #dfe4eb;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 42px rgba(6, 25, 55, 0.055);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.visa-list-item:hover {
  transform: translateY(-2px);
  border-color: rgba(211, 173, 91, .48);
  box-shadow: 0 18px 52px rgba(6, 25, 55, .09);
}

.visa-list-item.available {
  border-color: rgba(211, 173, 91, .52);
  background: linear-gradient(130deg, #fff 0%, #fff 70%, #fff9eb 100%);
}

.flag-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 18px;
  background: #f7f8fb;
  border: 1px solid #e5e9ef;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
  font-size: 31px;
  line-height: 1;
}

.visa-list-content { min-width: 0; }

.visa-list-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 7px;
}

.visa-list-meta h3 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 20px;
  letter-spacing: -.025em;
  color: #0b1d38;
}

.visa-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  color: #6c7788;
  background: #f2f4f7;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.visa-status.live {
  color: #795918;
  background: #f8edcf;
}

.visa-list-content p {
  margin: 0;
  max-width: 720px;
  color: #6c7788;
  font-size: 13px;
  line-height: 1.7;
}

.visa-list-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 220px;
}

.visa-list-actions .button { white-space: nowrap; }

.visa-helper-note {
  margin-top: 22px;
  padding: 18px 20px;
  border-radius: 18px;
  background: #f6f7f9;
  border: 1px solid #e2e6ec;
  color: #6c7788;
  font-size: 11px;
  line-height: 1.65;
}

/* Auth */
.auth-page,
.application-page {
  min-height: 100vh;
  background: #f5f7fa;
  color: #0b1d38;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(420px, .98fr);
}

.auth-brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 42px clamp(34px, 6vw, 82px);
  color: #fff;
  background:
    radial-gradient(circle at 80% 20%, rgba(48, 101, 171, .28), transparent 34%),
    radial-gradient(circle at 12% 86%, rgba(211, 173, 91, .10), transparent 33%),
    linear-gradient(145deg, #04142e 0%, #071b3a 60%, #0a2752 100%);
}

.auth-brand-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .055;
  background-image: linear-gradient(rgba(255,255,255,.8) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.8) 1px, transparent 1px);
  background-size: 74px 74px;
  pointer-events: none;
}

.auth-brand,
.auth-brand-copy,
.auth-brand-footer { position: relative; z-index: 1; }

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  width: fit-content;
}

.auth-brand .brand-mark { width: 56px; height: 56px; }

.auth-brand-copy { max-width: 620px; }

.auth-brand-copy .kicker {
  display: inline-flex;
  color: #e2c57f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.auth-brand-copy h1 {
  margin: 22px 0 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(42px, 5.4vw, 72px);
  line-height: 1.02;
  letter-spacing: -.052em;
}

.auth-brand-copy h1 span { color: #d8b968; }

.auth-brand-copy p {
  max-width: 560px;
  margin: 24px 0 0;
  color: #c7d2e3;
  font-size: 16px;
  line-height: 1.75;
}

.auth-brand-footer {
  color: rgba(255,255,255,.55);
  font-size: 11px;
}

.auth-form-panel {
  display: grid;
  place-items: center;
  padding: 40px 28px;
  background: #fff;
}

.auth-card {
  width: min(100%, 460px);
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 34px;
  color: #6c7788;
  font-size: 12px;
  font-weight: 700;
}

.auth-card h2 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 34px;
  letter-spacing: -.035em;
}

.auth-card > p {
  margin: 10px 0 0;
  color: #7a8493;
  font-size: 13px;
  line-height: 1.65;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 28px 0 24px;
  padding: 4px;
  border-radius: 14px;
  background: #f1f3f6;
}

.auth-tab {
  min-height: 42px;
  border: 0;
  border-radius: 11px;
  color: #687486;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.auth-tab.active {
  color: #0b1d38;
  background: #fff;
  box-shadow: 0 5px 18px rgba(7,27,58,.08);
}

.auth-form { display: grid; gap: 15px; }

.field-group { display: grid; gap: 7px; }

.field-group label {
  color: #36465d;
  font-size: 11px;
  font-weight: 800;
}

.field-group input,
.field-group select,
.field-group textarea {
  width: 100%;
  min-height: 50px;
  border: 1px solid #dfe4eb;
  border-radius: 14px;
  outline: 0;
  padding: 0 14px;
  color: #0b1d38;
  background: #fff;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.field-group textarea {
  min-height: 110px;
  padding-top: 13px;
  resize: vertical;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  border-color: #cfa64d;
  box-shadow: 0 0 0 4px rgba(211,173,91,.12);
}

.field-hint {
  margin-top: -2px;
  color: #8a94a2;
  font-size: 10px;
  line-height: 1.5;
}

.auth-submit { width: 100%; margin-top: 4px; }

.auth-message {
  display: none;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.55;
}

.auth-message.show { display: block; }
.auth-message.error { color: #9f2f2f; background: #fff1f1; border: 1px solid #ffd6d6; }
.auth-message.success { color: #216745; background: #effaf4; border: 1px solid #caeed9; }

/* Visa form */
.application-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(4,20,46,.96);
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(16px);
}

.application-topbar .container {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.application-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}

.application-identity .brand-mark { width: 44px; height: 44px; border-radius: 14px; }
.application-title strong { display:block; font-family:"Manrope", sans-serif; font-size:14px; }
.application-title small { display:block; margin-top:4px; color:#9fb0c8; font-size:10px; }

.application-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-email { color: #b9c7da; font-size: 11px; }
.logout-button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  color: #fff;
  background: rgba(255,255,255,.06);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.application-wrap {
  width: min(980px, calc(100% - 36px));
  margin: 0 auto;
  padding: 42px 0 80px;
}

.application-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.application-heading .kicker {
  color: #9a762d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.application-heading h1 {
  margin: 8px 0 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -.04em;
}

.save-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  color: #6c7788;
  background: #fff;
  border: 1px solid #e0e5eb;
  font-size: 10px;
  font-weight: 700;
}

.save-dot { width:7px; height:7px; border-radius:50%; background:#7a8798; }
.save-indicator.saving .save-dot { background:#d3ad5b; animation:pulseSave 1s infinite; }
.save-indicator.saved .save-dot { background:#3aa879; }
@keyframes pulseSave { 50% { opacity:.35; } }

.application-progress {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 22px;
}

.progress-step {
  position: relative;
  min-height: 70px;
  padding: 13px 14px;
  border: 1px solid #e0e5eb;
  border-radius: 15px;
  color: #8791a0;
  background: #fff;
  cursor: default;
  text-align: left;
}

.progress-step.done { cursor:pointer; }
.progress-step.active { border-color: rgba(211,173,91,.65); background:#fff9eb; color:#0b1d38; }
.progress-step.done { color:#41516a; }
.progress-step b { display:block; font-size:10px; color:#b58b35; }
.progress-step span { display:block; margin-top:5px; font-size:10px; font-weight:700; line-height:1.25; }

.form-panel {
  padding: 30px;
  border: 1px solid #dfe4eb;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 20px 65px rgba(6,25,55,.07);
}

.form-panel-header {
  padding-bottom: 20px;
  margin-bottom: 24px;
  border-bottom: 1px solid #edf0f3;
}

.form-panel-header h2 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 23px;
  letter-spacing: -.03em;
}

.form-panel-header p {
  margin: 7px 0 0;
  color: #7b8695;
  font-size: 11px;
  line-height: 1.6;
}

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

.field-group.full { grid-column: 1 / -1; }

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
}

.button-secondary {
  color: #233752;
  background: #f2f4f7;
  border: 1px solid #e0e5eb;
}

.declaration-box {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid #dfe4eb;
  border-radius: 15px;
  background: #f8f9fb;
}

.declaration-box input { width:18px; height:18px; margin-top:2px; accent-color:#0b2a56; }
.declaration-box span { color:#506079; font-size:11px; line-height:1.65; }

.form-note {
  margin-top: 18px;
  color: #8791a0;
  font-size: 10px;
  line-height: 1.6;
}

.application-loading {
  min-height: 54vh;
  display: grid;
  place-items: center;
  color: #718096;
  font-size: 12px;
  font-weight: 700;
}

.success-panel {
  display: none;
  padding: 52px 34px;
  border: 1px solid #dce5df;
  border-radius: 24px;
  background: #fff;
  text-align: center;
  box-shadow: 0 20px 65px rgba(6,25,55,.07);
}

.success-panel.show { display:block; }
.success-icon { width:62px; height:62px; margin:0 auto 18px; display:grid; place-items:center; border-radius:50%; color:#1f7550; background:#eaf8f0; font-size:25px; }
.success-panel h2 { margin:0; font-family:"Manrope",sans-serif; font-size:28px; }
.success-panel p { max-width:560px; margin:12px auto 24px; color:#6f7c8e; font-size:12px; line-height:1.7; }

@media (max-width: 900px) {
  .visa-list-item { grid-template-columns: auto minmax(0,1fr); }
  .visa-list-actions { grid-column: 2; justify-content:flex-start; min-width:0; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand-panel { min-height: 340px; padding: 30px 28px 42px; }
  .auth-brand-footer { display:none; }
  .auth-form-panel { padding: 36px 22px 56px; }
  .application-progress { grid-template-columns: repeat(5, minmax(96px,1fr)); overflow-x:auto; padding-bottom:5px; }
}

@media (max-width: 640px) {
  .visa-list-item { grid-template-columns: auto 1fr; gap:15px; padding:18px; }
  .flag-icon { width:50px; height:50px; border-radius:15px; font-size:27px; }
  .visa-list-meta h3 { font-size:18px; }
  .visa-list-actions { grid-column:1 / -1; }
  .visa-list-actions .button { width:100%; }
  .auth-brand-panel { min-height: 300px; }
  .auth-brand-copy h1 { font-size:38px; }
  .auth-card h2 { font-size:29px; }
  .application-topbar .container { min-height:68px; }
  .user-email { display:none; }
  .application-wrap { width:min(100% - 24px, 980px); padding-top:28px; }
  .application-heading { align-items:flex-start; flex-direction:column; gap:12px; }
  .form-panel { padding:20px 16px; border-radius:20px; }
  .form-grid { grid-template-columns:1fr; gap:15px; }
  .field-group.full { grid-column:auto; }
  .declaration-box { grid-column:auto; }
  .form-actions { flex-direction:column-reverse; }
  .form-actions .button { width:100%; }
}
