/* ============================================
   INFIX Banking AI Portal — Design System
   Premium Dark Navy + Gold Glassmorphism Theme
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Backgrounds */
  --bg-darkest: #060d1a;
  --bg-dark: #0a1628;
  --bg-medium: #0f2847;
  --bg-card: rgba(15, 40, 71, 0.45);

  /* Glass borders */
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(255, 255, 255, 0.15);

  /* Accents */
  --accent-gold: #d4a843;
  --accent-gold-light: #e8c56d;
  --accent-gold-glow: rgba(212, 168, 67, 0.35);
  --accent-blue: #4a9eff;
  --accent-blue-glow: rgba(74, 158, 255, 0.25);

  /* Text */
  --text-primary: #e8edf5;
  --text-secondary: #8899b0;
  --text-muted: #556b85;

  /* Status */
  --success: #2ecc71;
  --success-light: #58d68d;
  --error: #e74c3c;
  --error-light: #f1948a;
  --warning: #f39c12;

  /* Spacing */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;
}

/* --- Reset & Global --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-darkest);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-weight: 600;
  line-height: 1.2;
}

a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-gold-light);
}

img {
  max-width: 100%;
  display: block;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-darkest);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-medium);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--bg-medium) var(--bg-darkest);
}

/* ============================================
   ANIMATED BACKGROUND ORBS
   ============================================ */
.bg-orbs {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.bg-orbs .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  will-change: transform;
}

.bg-orbs .orb:nth-child(1) {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-gold) 0%, transparent 70%);
  top: -10%;
  left: -5%;
  animation: float1 20s ease-in-out infinite;
}

.bg-orbs .orb:nth-child(2) {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-blue) 0%, transparent 70%);
  top: 50%;
  right: -10%;
  animation: float2 25s ease-in-out infinite;
}

.bg-orbs .orb:nth-child(3) {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #7c3aed 0%, transparent 70%);
  bottom: -5%;
  left: 30%;
  animation: float3 18s ease-in-out infinite;
}

.bg-orbs .orb:nth-child(4) {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--accent-gold-light) 0%, transparent 70%);
  top: 30%;
  left: 50%;
  animation: float4 22s ease-in-out infinite;
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(80px, 60px) scale(1.1); }
  50% { transform: translate(40px, 120px) scale(0.95); }
  75% { transform: translate(-40px, 60px) scale(1.05); }
}

@keyframes float2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(-60px, -80px) scale(1.05); }
  50% { transform: translate(-100px, 20px) scale(1.1); }
  75% { transform: translate(-30px, 80px) scale(0.95); }
}

@keyframes float3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(70px, -50px) scale(1.08); }
  66% { transform: translate(-40px, -90px) scale(0.97); }
}

@keyframes float4 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  20% { transform: translate(-50px, 40px) scale(1.05); }
  40% { transform: translate(30px, 80px) scale(0.95); }
  60% { transform: translate(70px, -20px) scale(1.1); }
  80% { transform: translate(-20px, -60px) scale(1.02); }
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */
.page-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   GLASSMORPHISM CARD
   ============================================ */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

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

.glass-card.interactive:hover {
  transform: translateY(-4px);
  border-color: var(--border-glass-hover);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.4),
    0 4px 16px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Auth card sizing */
.auth-card {
  width: 100%;
  max-width: 440px;
  position: relative;
  overflow: hidden;
}

/* ============================================
   BRANDING
   ============================================ */
.brand {
  text-align: center;
  margin-bottom: 36px;
}

.brand-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 6px;
  margin-bottom: 6px;
}

.brand-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ============================================
   FORM INPUTS
   ============================================ */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.3s ease;
  z-index: 2;
}

.input-group:focus-within .input-icon {
  color: var(--accent-blue);
}

.form-input {
  width: 100%;
  height: 50px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0 16px 0 44px;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px var(--accent-blue-glow);
  background: rgba(255, 255, 255, 0.07);
}

.form-input:hover:not(:focus) {
  border-color: rgba(255, 255, 255, 0.12);
}

/* Password toggle */
.password-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
  z-index: 2;
}

.password-toggle:hover {
  color: var(--text-secondary);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
}

/* ============================================
   CAPTCHA
   ============================================ */
.captcha-section {
  margin-bottom: 24px;
}

.captcha-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.captcha-image {
  height: 52px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.captcha-refresh {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.captcha-refresh:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-gold);
  border-color: var(--border-glass-hover);
}

.captcha-refresh svg {
  width: 20px;
  height: 20px;
  transition: transform 0.6s ease;
}

.captcha-refresh.spinning svg {
  transform: rotate(360deg);
}

.captcha-input .form-input {
  padding-left: 16px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
  width: 100%;
  height: 50px;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
  color: #0a1628;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.btn-primary:hover:not(:disabled)::before {
  transform: translateX(100%);
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--accent-gold-glow);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
  filter: brightness(0.95);
}

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

.btn-service {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  background: transparent;
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 2;
}

.btn-service:hover {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
  color: #0a1628;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-gold-glow);
}

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

.btn-service svg {
  width: 18px;
  height: 18px;
}

/* ============================================
   PASSWORD STRENGTH
   ============================================ */
.strength-section {
  margin-top: 8px;
  margin-bottom: 16px;
}

.strength-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
}

.strength-bar .segment {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  transition: background 0.3s ease;
}

.strength-bar.level-1 .segment:nth-child(1) { background: var(--error); }

.strength-bar.level-2 .segment:nth-child(1),
.strength-bar.level-2 .segment:nth-child(2) { background: #e67e22; }

.strength-bar.level-3 .segment:nth-child(1),
.strength-bar.level-3 .segment:nth-child(2),
.strength-bar.level-3 .segment:nth-child(3) { background: var(--warning); }

.strength-bar.level-4 .segment:nth-child(1),
.strength-bar.level-4 .segment:nth-child(2),
.strength-bar.level-4 .segment:nth-child(3),
.strength-bar.level-4 .segment:nth-child(4) { background: #82e052; }

.strength-bar.level-5 .segment:nth-child(1),
.strength-bar.level-5 .segment:nth-child(2),
.strength-bar.level-5 .segment:nth-child(3),
.strength-bar.level-5 .segment:nth-child(4),
.strength-bar.level-5 .segment:nth-child(5) { background: var(--success); }

.strength-rules {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
}

.strength-rules .rule {
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.3s ease;
  color: var(--text-muted);
}

.strength-rules .rule .rule-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.strength-rules .rule.passed {
  color: var(--success);
}

.strength-rules .rule.failed {
  color: var(--error-light);
}

/* Confirm password match indicator */
.match-indicator {
  position: absolute;
  right: 14px;
  font-size: 0.75rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
  transition: opacity 0.3s ease;
}

.match-indicator.match {
  color: var(--success);
}

.match-indicator.no-match {
  color: var(--error);
}

.match-indicator svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   MESSAGES
   ============================================ */
.message {
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 0.875rem;
  margin-bottom: 20px;
  display: none;
  animation: slideDown 0.3s ease-out forwards;
  line-height: 1.5;
}

.message.visible {
  display: block;
}

.message.error {
  background: rgba(231, 76, 60, 0.12);
  border-left: 3px solid var(--error);
  color: var(--error-light);
}

.message.success {
  background: rgba(46, 204, 113, 0.12);
  border-left: 3px solid var(--success);
  color: var(--success-light);
}

/* ============================================
   LOADING OVERLAY
   ============================================ */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 13, 26, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ============================================
   NAVIGATION BAR
   ============================================ */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: rgba(10, 22, 40, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 4px;
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
  color: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  flex-shrink: 0;
}

.user-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-logout:hover {
  background: rgba(231, 76, 60, 0.15);
  border-color: var(--error);
  color: var(--error-light);
}

.btn-logout svg {
  width: 18px;
  height: 18px;
}

/* ============================================
   DASHBOARD CONTENT
   ============================================ */
.dashboard-content {
  flex: 1;
  padding: 48px 32px;
}

.welcome-section {
  text-align: center;
  margin-bottom: 48px;
}

.welcome-heading {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.welcome-heading .user-greeting {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* ============================================
   SERVICE CARDS GRID
   ============================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.service-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 40px;
  text-align: center;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-xl);
  padding: 1px;
  background: linear-gradient(135deg, transparent 30%, var(--accent-gold-glow), transparent 70%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glass-hover);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(212, 168, 67, 0.08);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-icon svg {
  width: 100%;
  height: 100%;
}

.service-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.service-description {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
}

/* ============================================
   AUTH LINKS
   ============================================ */
.auth-link {
  text-align: center;
  margin-top: 24px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.auth-link a {
  color: var(--accent-gold);
  font-weight: 500;
  margin-left: 4px;
}

.auth-link a:hover {
  color: var(--accent-gold-light);
  text-decoration: underline;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  text-align: center;
  color: var(--text-muted);
  padding: 24px 32px;
  font-size: 0.8rem;
  margin-top: auto;
  border-top: 1px solid var(--border-glass);
  letter-spacing: 0.5px;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideDown {
  from {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
  }
  to {
    max-height: 100px;
    opacity: 1;
    padding-top: 14px;
    padding-bottom: 14px;
    margin-bottom: 20px;
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px rgba(212, 168, 67, 0.1); }
  50% { box-shadow: 0 0 40px rgba(212, 168, 67, 0.25); }
}

@keyframes borderGlow {
  0%, 100% { border-color: var(--border-glass); }
  50% { border-color: rgba(212, 168, 67, 0.3); }
}

.animate-in {
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-in-delay-1 {
  opacity: 0;
  animation: fadeInUp 0.6s ease-out 0.1s forwards;
}

.animate-in-delay-2 {
  opacity: 0;
  animation: fadeInUp 0.6s ease-out 0.2s forwards;
}

.animate-in-delay-3 {
  opacity: 0;
  animation: fadeInUp 0.6s ease-out 0.3s forwards;
}

.animate-in-delay-4 {
  opacity: 0;
  animation: fadeInUp 0.6s ease-out 0.4s forwards;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .navbar {
    padding: 14px 20px;
  }

  .navbar-brand {
    font-size: 1.3rem;
    letter-spacing: 3px;
  }

  .user-name {
    display: none;
  }

  .dashboard-content {
    padding: 32px 20px;
  }

  .welcome-heading {
    font-size: 1.7rem;
  }

  .welcome-subtitle {
    font-size: 0.95rem;
  }

  .glass-card {
    padding: 32px 24px;
  }

  .service-card {
    padding: 32px 24px;
  }

  .brand-logo {
    font-size: 2rem;
  }

  .strength-rules {
    grid-template-columns: 1fr;
  }

  .footer {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .auth-page {
    padding: 16px;
  }

  .glass-card {
    padding: 28px 20px;
    border-radius: var(--radius-md);
  }

  .brand-logo {
    font-size: 1.8rem;
    letter-spacing: 4px;
  }

  .brand-subtitle {
    font-size: 0.75rem;
  }

  .form-input {
    height: 46px;
    font-size: 0.9rem;
  }

  .btn-primary {
    height: 46px;
    font-size: 0.95rem;
  }

  .captcha-container {
    flex-wrap: wrap;
  }

  .captcha-image {
    height: 46px;
  }

  .navbar-user {
    gap: 10px;
  }

  .btn-logout span {
    display: none;
  }

  .welcome-heading {
    font-size: 1.4rem;
  }

  .service-icon {
    width: 48px;
    height: 48px;
  }

  .service-title {
    font-size: 1.25rem;
  }
}

/* ============================================
   FOCUS ACCESSIBILITY
   ============================================ */
.form-input:focus-visible,
.btn-primary:focus-visible,
.btn-service:focus-visible,
.btn-logout:focus-visible,
.captcha-refresh:focus-visible,
.password-toggle:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* ============================================
   SELECTION STYLING
   ============================================ */
::selection {
  background: var(--accent-gold);
  color: var(--bg-darkest);
}

::-moz-selection {
  background: var(--accent-gold);
  color: var(--bg-darkest);
}

/* ============================================================
   App Selector Modal
   ============================================================ */

/* --- Overlay / backdrop --- */
.app-selector-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 13, 26, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.app-selector-overlay.is-visible {
  opacity: 1;
}

.app-selector-overlay[hidden] {
  display: none;
}

/* --- Modal box --- */
.app-selector-modal {
  position: relative;
  background: rgba(10, 22, 40, 0.95);
  border: 1px solid var(--border-glass-hover);
  border-radius: 20px;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(212, 168, 67, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  max-width: 560px;
  width: 100%;
  padding: 2.5rem 2rem 2rem;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.app-selector-overlay.is-visible .app-selector-modal {
  transform: translateY(0);
}

/* --- Close button --- */
.app-selector-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.app-selector-close svg {
  width: 16px;
  height: 16px;
}

.app-selector-close:hover {
  background: rgba(212, 168, 67, 0.12);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

/* --- Header --- */
.app-selector-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.app-selector-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(212, 168, 67, 0.15), rgba(212, 168, 67, 0.05));
  border: 1px solid rgba(212, 168, 67, 0.25);
  border-radius: 14px;
  color: var(--accent-gold);
}

.app-selector-icon svg {
  width: 26px;
  height: 26px;
}

.app-selector-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
}

.app-selector-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

/* --- App cards grid --- */
.app-selector-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* --- Individual app option card --- */
.app-option-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1rem 1.1rem;
  background: rgba(15, 40, 71, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  color: var(--text-primary);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
}

.app-option-card:hover {
  background: rgba(212, 168, 67, 0.08);
  border-color: rgba(212, 168, 67, 0.35);
  box-shadow: 0 4px 20px rgba(212, 168, 67, 0.12);
  transform: translateY(-1px);
}

.app-option-card:active {
  transform: translateY(0);
  box-shadow: none;
}

.app-option-card:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

/* App icon */
.app-option-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.15), rgba(74, 158, 255, 0.05));
  border: 1px solid rgba(74, 158, 255, 0.2);
  border-radius: 12px;
  color: var(--accent-blue);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.app-option-card:hover .app-option-icon {
  background: linear-gradient(135deg, rgba(212, 168, 67, 0.2), rgba(212, 168, 67, 0.08));
  border-color: rgba(212, 168, 67, 0.3);
  color: var(--accent-gold);
}

.app-option-icon svg {
  width: 22px;
  height: 22px;
}

/* App info */
.app-option-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.app-option-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-option-path {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'Courier New', Courier, monospace;
  letter-spacing: 0.02em;
}

/* Arrow chevron */
.app-option-arrow {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color 0.2s, transform 0.2s;
}

.app-option-card:hover .app-option-arrow {
  color: var(--accent-gold);
  transform: translateX(3px);
}

.app-option-arrow svg {
  width: 18px;
  height: 18px;
}

/* --- Responsive --- */
@media (max-width: 480px) {
  .app-selector-modal {
    padding: 2rem 1.25rem 1.5rem;
    border-radius: 16px;
  }

  .app-selector-title {
    font-size: 1.15rem;
  }

  .app-option-card {
    padding: 0.85rem 0.9rem;
  }
}
