/**
 * Accounts CSS - Unified styles for authentication pages
 * Includes: Login, Register, Profile, Password Reset
 */

/* ===== REGISTRATION PAGE STYLES ===== */

/* Background pattern */
.bg-pattern {
  background-color: #f8fafc;
  background-image:
    radial-gradient(at 20% 30%, rgba(47, 132, 255, 0.05) 0%, transparent 50%),
    radial-gradient(at 80% 70%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
}

html.dark .bg-pattern {
  background-color: var(--scb-neutral-900);
  background-image:
    radial-gradient(at 20% 30%, rgba(47, 132, 255, 0.1) 0%, transparent 50%),
    radial-gradient(at 80% 70%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
}

/* Floating animation */
@keyframes floating {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(3deg); }
}

.floating {
  animation: floating 6s ease-in-out infinite;
}

.floating-delay {
  animation: floating 6s ease-in-out infinite;
  animation-delay: -3s;
}

/* Step indicator */
.step-indicator {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

/* Section icon */
.section-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Feature badge */
.feature-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
}

/* Override Tailwind forms plugin - ensure consistent border-radius */
.bg-pattern .scb-input,
.bg-pattern .scb-select,
.bg-pattern .scb-textarea,
.bg-pattern input[type="text"],
.bg-pattern input[type="email"],
.bg-pattern input[type="password"],
.bg-pattern input[type="tel"],
.bg-pattern input[type="number"],
.bg-pattern input[type="url"],
.bg-pattern select {
  border-radius: var(--radius-md, 10px) !important;
  border: 1px solid var(--scb-border-input, #cbd5e1) !important;
  background-color: var(--scb-bg-input, white) !important;
  padding: 0.75rem 1rem !important;
  font-size: 0.875rem !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}

.bg-pattern .scb-input:focus,
.bg-pattern .scb-select:focus,
.bg-pattern input:focus,
.bg-pattern select:focus {
  outline: none !important;
  border-color: var(--scb-blue-500, #2f84ff) !important;
  box-shadow: 0 0 0 3px rgba(47, 132, 255, 0.15) !important;
}

/* Input validation states */
.scb-input.is-valid,
.scb-select.is-valid {
  border-color: #10b981 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2310b981' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 40px;
}

.scb-input.is-invalid,
.scb-select.is-invalid {
  border-color: #ef4444 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ef4444' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M6 18L18 6M6 6l12 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 40px;
}

/* Form status messages */
.form-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  padding: 8px 12px;
  border-radius: 8px;
  margin-top: 8px;
}

.form-status.success {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.form-status.warning {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.form-status.error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.form-status.info {
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

html.dark .form-status.success {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}

html.dark .form-status.warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
}

html.dark .form-status.error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}

html.dark .form-status.info {
  background: rgba(47, 132, 255, 0.1);
  border-color: rgba(47, 132, 255, 0.3);
}

/* Hint text */
.hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 8px;
}

html.dark .hint {
  color: var(--scb-neutral-400);
}

/* Password requirements grid */
.password-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-top: 10px;
}

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

.password-req {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #94a3b8;
  transition: color 0.2s;
}

.password-req .icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.password-req.valid {
  color: #10b981;
}

.password-req.valid .icon {
  color: #10b981;
}

.password-req.invalid {
  color: #ef4444;
}

.password-req.invalid .icon {
  color: #ef4444;
}

html.dark .password-req {
  color: var(--scb-neutral-500);
}

html.dark .password-req.valid {
  color: #10b981;
}

html.dark .password-req.invalid {
  color: #ef4444;
}

/* Spinner animation */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

/* ===== END REGISTRATION PAGE STYLES ===== */

    /* ===== LOADER ANIMATION ===== */
    .loader-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: white;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 9999;
      opacity: 1;
      transition: opacity 0.6s ease-out;
    }

    .loader-overlay.fade-out {
      opacity: 0;
      pointer-events: none;
    }

    .loader-container {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 24px;
    }

    .logo-wrapper {
      position: relative;
      width: 120px;
      height: 120px;
    }

    .logo-scb, .logo-br {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    }

    .logo-scb {
      opacity: 1;
      transform: scale(1);
    }

    .logo-br {
      opacity: 0;
      transform: scale(0.8);
    }

    .logo-wrapper.switch .logo-scb {
      opacity: 0;
      transform: scale(0.8);
    }

    .logo-wrapper.switch .logo-br {
      opacity: 1;
      transform: scale(1);
    }

    .logo-icon {
      width: 80px;
      height: 80px;
      animation: pulse 1.5s ease-in-out infinite;
    }

    .logo-text {
      font-family: 'Inter', sans-serif;
      font-weight: 700;
      font-size: 1rem;
      color: #0c1115;
      margin-top: 12px;
      letter-spacing: -0.02em;
    }

    .logo-text span {
      color: var(--scb-blue-500);
    }

    @keyframes pulse {
      0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(0, 146, 255, 0));
      }
      50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 20px rgba(0, 146, 255, 0.4));
      }
    }

    .loader-progress {
      width: 200px;
      height: 3px;
      background: #e2e8f0;
      border-radius: 3px;
      overflow: hidden;
    }

    .loader-progress-bar {
      height: 100%;
      background: linear-gradient(90deg, var(--scb-blue-500), #00d4ff, var(--scb-blue-500));
      background-size: 200% 100%;
      animation: shimmer 1.5s ease-in-out infinite, progress 3s ease-out forwards;
      border-radius: 3px;
    }

    @keyframes shimmer {
      0% { background-position: 200% 0; }
      100% { background-position: -200% 0; }
    }

    @keyframes progress {
      0% { width: 0%; }
      100% { width: 100%; }
    }
    /* ===== END LOADER ===== */

    /* Auth page specific styles - scoped to prevent conflicts with main app layout */
    body.auth-page {
      font-family: 'Inter', system-ui, sans-serif;
      min-height: 100vh;
      display: flex;
      background: #f8fafc;
      margin: 0;
      padding: 0;
    }

    /* Left Panel - Branding */
    .brand-panel {
      flex: 1;
      background: linear-gradient(135deg, #0c1115 0%, #1a2332 50%, #0d47a1 100%);
      display: flex;
      flex-direction: column;
      justify-content: center;
      padding: 60px;
      position: relative;
      overflow: hidden;
    }

    .brand-panel::before {
      content: '';
      position: absolute;
      top: -50%;
      right: -50%;
      width: 100%;
      height: 100%;
      background: radial-gradient(circle, rgba(0, 146, 255, 0.15) 0%, transparent 60%);
      pointer-events: none;
    }

    .brand-panel::after {
      content: '';
      position: absolute;
      bottom: -30%;
      left: -30%;
      width: 80%;
      height: 80%;
      background: radial-gradient(circle, rgba(245, 153, 38, 0.1) 0%, transparent 50%);
      pointer-events: none;
    }

    .brand-content {
      position: relative;
      z-index: 1;
      max-width: 480px;
    }

    .brand-logo {
      font-size: 1.75rem;
      font-weight: 700;
      color: white;
      margin-bottom: 48px;
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .brand-logo svg {
      width: 40px;
      height: 40px;
    }

    .brand-headline {
      font-size: 2.5rem;
      font-weight: 700;
      color: white;
      line-height: 1.2;
      margin-bottom: 24px;
    }

    .brand-headline span {
      color: var(--scb-blue-500);
    }

    .brand-subtitle {
      font-size: 1.125rem;
      color: rgba(255, 255, 255, 0.7);
      line-height: 1.7;
      margin-bottom: 48px;
    }

    .features {
      display: flex;
      flex-direction: column;
      gap: 20px;
    }

    .feature-item {
      display: flex;
      align-items: flex-start;
      gap: 16px;
    }

    .feature-icon {
      width: 44px;
      height: 44px;
      background: rgba(0, 146, 255, 0.15);
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .feature-icon svg {
      width: 22px;
      height: 22px;
      color: var(--scb-blue-500);
    }

    .feature-text h4 {
      font-size: 1rem;
      font-weight: 600;
      color: white;
      margin-bottom: 4px;
    }

    .feature-text p {
      font-size: 0.875rem;
      color: rgba(255, 255, 255, 0.6);
    }

    /* Right Panel - Form */
    .form-panel {
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      padding: 60px;
      background: white;
    }

    .form-container {
      width: 100%;
      max-width: 400px;
    }

    .form-header {
      text-align: center;
      margin-bottom: 40px;
    }

    .form-header h1 {
      font-size: 1.75rem;
      font-weight: 700;
      color: #0c1115;
      margin-bottom: 8px;
    }

    .form-header p {
      font-size: 0.95rem;
      color: #64748b;
    }

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

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

    .form-group label {
      font-size: 0.875rem;
      font-weight: 500;
      color: #374151;
    }

    .form-group input {
      padding: 14px 16px;
      border: 1px solid #e2e8f0;
      border-radius: 10px;
      font-size: 1rem;
      font-family: inherit;
      transition: all 0.2s;
      background: #f8fafc;
    }

    .form-group input:focus {
      outline: none;
      border-color: var(--scb-blue-500);
      background: white;
      box-shadow: 0 0 0 3px rgba(0, 146, 255, 0.1);
    }

    .form-group input::placeholder {
      color: #94a3b8;
    }

    .error-message {
      background: #fef2f2;
      border: 1px solid #fecaca;
      color: #dc2626;
      padding: 14px 16px;
      border-radius: 10px;
      font-size: 0.875rem;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .error-message svg {
      width: 20px;
      height: 20px;
      flex-shrink: 0;
    }

    .submit-btn {
      padding: 16px 24px;
      background: linear-gradient(135deg, var(--scb-blue-500) 0%, var(--scb-blue-900) 100%);
      color: white;
      border: none;
      border-radius: 10px;
      font-size: 1rem;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      transition: all 0.2s;
      margin-top: 8px;
    }

    .submit-btn:hover {
      transform: translateY(-1px);
      box-shadow: 0 8px 20px rgba(0, 146, 255, 0.3);
    }

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

    .submit-btn:disabled {
      opacity: 0.7;
      cursor: not-allowed;
      transform: none;
    }

    .submit-btn .spinner {
      display: inline-block;
      width: 16px;
      height: 16px;
      border: 2px solid rgba(255, 255, 255, 0.3);
      border-radius: 50%;
      border-top-color: white;
      animation: spin 0.8s linear infinite;
      margin-right: 8px;
      vertical-align: middle;
    }

    @keyframes spin {
      to { transform: rotate(360deg); }
    }

    .form-footer {
      text-align: center;
      margin-top: 32px;
      padding-top: 24px;
      border-top: 1px solid #e2e8f0;
    }

    .form-footer p {
      font-size: 0.9rem;
      color: #64748b;
    }

    .form-footer a {
      color: var(--scb-blue-500);
      text-decoration: none;
      font-weight: 500;
    }

    .form-footer a:hover {
      text-decoration: underline;
    }

    .forgot-password {
      display: block;
      margin-top: 8px;
      font-size: 0.85rem;
      color: #64748b;
      text-decoration: none;
      text-align: right;
    }

    .forgot-password:hover {
      color: var(--scb-blue-500);
      text-decoration: underline;
    }

    /* Forgot Password Modal + Profile Modals (SCB prefixed) */
    .scb-modal-overlay {
      position: fixed;
      inset: 0;
      z-index: 1000;
      display: none;
      align-items: center;
      justify-content: center;
      background: rgba(0, 0, 0, 0.5);
      backdrop-filter: blur(4px);
    }
    .scb-modal-overlay.show {
      display: flex;
    }
    .scb-modal-content {
      background: white;
      border-radius: 16px;
      padding: 24px;
      max-width: 500px;
      width: 90%;
      max-height: 85vh;
      overflow-y: auto;
      box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    }
    .scb-modal-content.wide {
      max-width: 600px;
    }
    .scb-modal-content h3 {
      font-size: 1.25rem;
      font-weight: 700;
      color: #0c1115;
      margin: 0 0 8px;
    }
    .scb-modal-content .subtitle {
      font-size: 0.9rem;
      color: #64748b;
      margin-bottom: 20px;
    }
    html.dark .scb-modal-content {
      background: #1e293b;
    }
    html.dark .scb-modal-content h3 {
      color: #f1f5f9;
    }

    .scb-modal-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0.5);
      backdrop-filter: blur(4px);
    }
    .scb-modal-container {
      position: relative;
      background: white;
      border-radius: 20px;
      padding: 32px;
      max-width: 400px;
      width: 90%;
      text-align: center;
      box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
      animation: scbModalIn 0.3s ease-out;
    }
    @keyframes scbModalIn {
      from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
      }
      to {
        opacity: 1;
        transform: scale(1) translateY(0);
      }
    }
    .scb-modal-icon {
      width: 64px;
      height: 64px;
      background: linear-gradient(135deg, var(--scb-blue-500) 0%, var(--scb-blue-900) 100%);
      border-radius: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto 20px;
    }
    .scb-modal-icon svg {
      width: 32px;
      height: 32px;
      color: white;
    }
    .scb-modal-title {
      font-size: 1.25rem;
      font-weight: 700;
      color: #0c1115;
      margin-bottom: 12px;
    }
    .scb-modal-text {
      font-size: 0.95rem;
      color: #64748b;
      line-height: 1.6;
      margin-bottom: 20px;
    }
    .scb-modal-info {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      background: #f0f9ff;
      border: 1px solid #bae6fd;
      border-radius: 12px;
      padding: 14px 16px;
      margin-bottom: 24px;
      text-align: left;
    }
    .scb-modal-info-icon {
      width: 20px;
      height: 20px;
      color: var(--scb-blue-500);
      flex-shrink: 0;
      margin-top: 2px;
    }
    .scb-modal-info span {
      font-size: 0.875rem;
      color: #0369a1;
    }
    .scb-modal-info a {
      color: var(--scb-blue-500);
      font-weight: 500;
      text-decoration: none;
    }
    .scb-modal-info a:hover {
      text-decoration: underline;
    }
    .scb-modal-btn {
      width: 100%;
      padding: 14px 24px;
      background: linear-gradient(135deg, var(--scb-blue-500) 0%, var(--scb-blue-900) 100%);
      color: white;
      border: none;
      border-radius: 10px;
      font-size: 1rem;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      transition: all 0.2s;
    }
    .scb-modal-btn:hover {
      transform: translateY(-1px);
      box-shadow: 0 8px 20px rgba(0, 146, 255, 0.3);
    }

    .remember-me {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-top: -8px;
    }

    .remember-me input[type="checkbox"] {
      width: 18px;
      height: 18px;
      accent-color: var(--scb-blue-500);
      cursor: pointer;
    }

    .remember-me label {
      font-size: 0.9rem;
      color: #64748b;
      cursor: pointer;
      user-select: none;
    }

    /* Mobile */
    @media (max-width: 1024px) {
      .brand-panel {
        display: none;
      }

      .form-panel {
        padding: 40px 24px;
      }

      .form-container {
        max-width: 100%;
      }
    }

    @media (max-width: 480px) {
      .form-header h1 {
        font-size: 1.5rem;
      }

      .form-group input {
        padding: 12px 14px;
      }

      .submit-btn {
        padding: 14px 20px;
      }
    }

    /* Mobile logo */
    .mobile-logo {
      display: none;
      text-align: center;
      margin-bottom: 32px;
    }

    .mobile-logo span {
      font-size: 1.5rem;
      font-weight: 700;
      color: #0c1115;
    }

    @media (max-width: 1024px) {
      .mobile-logo {
        display: block;
      }
    }

    /* ===== DARK MODE ===== */
    html.dark body.auth-page {
      background: var(--scb-neutral-900);
    }

    html.dark .form-panel {
      background: var(--scb-neutral-800);
    }

    html.dark .form-header h1,
    html.dark .mobile-logo span {
      color: var(--scb-neutral-100);
    }

    html.dark .form-header p,
    html.dark .form-group label {
      color: var(--scb-neutral-400);
    }

    html.dark .form-group input {
      background: var(--scb-neutral-700);
      border-color: var(--scb-neutral-600);
      color: var(--scb-neutral-100);
    }

    html.dark .form-group input:focus {
      background: var(--scb-neutral-700);
      border-color: var(--scb-blue-500);
    }

    html.dark .form-group input::placeholder {
      color: var(--scb-neutral-500);
    }

    html.dark .form-footer {
      border-color: var(--scb-neutral-700);
    }

    html.dark .form-footer p,
    html.dark .forgot-password,
    html.dark .remember-me label {
      color: var(--scb-neutral-400);
    }

    html.dark .lang-btn {
      background: var(--scb-neutral-700);
      border-color: var(--scb-neutral-600);
      color: var(--scb-neutral-300);
    }

    html.dark .lang-btn:hover {
      border-color: var(--scb-blue-500);
      color: var(--scb-blue-500);
    }

    html.dark .lang-btn.active {
      background: var(--scb-blue-500);
      border-color: var(--scb-blue-500);
      color: white;
    }

    html.dark .scb-modal-container {
      background: var(--scb-neutral-800);
    }

    html.dark .scb-modal-title {
      color: var(--scb-neutral-100);
    }

    html.dark .scb-modal-text {
      color: var(--scb-neutral-400);
    }

    html.dark .scb-modal-info {
      background: var(--scb-neutral-700);
      border-color: var(--scb-neutral-600);
    }

    html.dark .scb-modal-info span {
      color: var(--scb-neutral-300);
    }

    html.dark .loader-overlay {
      background: var(--scb-neutral-900);
    }

    html.dark .logo-text {
      color: var(--scb-neutral-100);
    }

    html.dark .loader-progress {
      background: var(--scb-neutral-700);
    }

    /* Language Switcher */
    .language-switcher {
      position: absolute;
      top: 24px;
      right: 24px;
      display: flex;
      gap: 8px;
      z-index: 10;
    }

    .lang-btn {
      padding: 8px 12px;
      border: 1px solid #e2e8f0;
      border-radius: 8px;
      background: white;
      color: #64748b;
      font-size: 0.8rem;
      font-weight: 500;
      font-family: inherit;
      cursor: pointer;
      transition: all 0.2s;
    }

    .lang-btn:hover {
      border-color: var(--scb-blue-500);
      color: var(--scb-blue-500);
    }

    .lang-btn.active {
      background: var(--scb-blue-500);
      border-color: var(--scb-blue-500);
      color: white;
    }

    @media (max-width: 480px) {
      .language-switcher {
        top: 16px;
        right: 16px;
      }
      .lang-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
      }
    }

/* ===== PROFILE PAGE MODAL COMPONENTS ===== */

/* Password input wrapper with toggle button */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

/* Password input inherits from .scb-input, just add extra right padding for toggle button */
.password-input-wrapper input {
  padding-right: 48px;
}

.password-input-wrapper input.valid {
  border-color: #10b981;
}

.password-input-wrapper input.invalid {
  border-color: #ef4444;
}

.password-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--scb-text-muted, #64748b);
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-toggle:hover {
  color: var(--scb-blue-500);
}

/* Password Strength Bar */
.strength-bar-container {
  margin-top: 12px;
}

.strength-bar-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--scb-text-muted, #64748b);
  margin-bottom: 6px;
}

.strength-text {
  font-weight: 600;
}

.strength-bar {
  height: 4px;
  background: var(--scb-bg-hover, #f1f5f9);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.strength-bar-fill {
  height: 100%;
  width: 0;
  transition: width 0.3s, background-color 0.3s;
  border-radius: var(--radius-full);
}

.strength-bar-fill.weak {
  width: 25%;
  background: #ef4444;
}

.strength-bar-fill.fair {
  width: 50%;
  background: #f59e0b;
}

.strength-bar-fill.good {
  width: 75%;
  background: var(--scb-blue-500);
}

.strength-bar-fill.strong {
  width: 100%;
  background: #10b981;
}

/* Requirements Grid */
.requirements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.requirement-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--scb-text-muted, #64748b);
  transition: color 0.2s;
}

.requirement-item.valid {
  color: #10b981;
}

.req-icon {
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--scb-bg-hover, #f1f5f9);
  transition: background-color 0.2s;
}

.requirement-item.valid .req-icon {
  background: #10b981;
  color: white;
}

.req-icon svg {
  width: 10px;
  height: 10px;
}

/* Password Match Status */
.password-match-status {
  font-size: 0.8rem;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.password-match-status.match {
  color: #10b981;
}

.password-match-status.no-match {
  color: #ef4444;
}

/* Modal Alert (SCB prefixed) */
.scb-modal-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  margin-bottom: 16px;
}

.scb-modal-alert.success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #16a34a;
}

.scb-modal-alert.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}

/* Input with validation icon */
.input-with-icon {
  position: relative;
}

.input-with-icon .input-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-with-icon .input-icon.show {
  opacity: 1;
}

.input-with-icon .input-icon.valid {
  color: #10b981;
}

.input-with-icon .input-icon.invalid {
  color: #ef4444;
}

/* Animated input states */
.scb-input-animated {
  transition: border-color 0.2s, box-shadow 0.2s;
}

.scb-input-animated.valid {
  border-color: #10b981;
}

.scb-input-animated.invalid {
  border-color: #ef4444;
}

/* Validation status message */
.validation-status {
  font-size: 0.75rem;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.validation-status.valid {
  color: #10b981;
}

.validation-status.invalid {
  color: #ef4444;
}

/* Validation Summary */
.validation-summary {
  display: none;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: #fef2f2;
  border: 1px solid #fecaca;
  margin-bottom: 16px;
}

.validation-summary.show {
  display: block;
}

.validation-summary.valid {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.validation-summary p {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: #dc2626;
  margin: 0;
}

.validation-summary.valid p {
  color: #16a34a;
}

/* Phone Strength Bar */
.phone-strength-container {
  margin-top: 8px;
}

.phone-strength-bar {
  height: 3px;
  background: var(--scb-bg-hover, #f1f5f9);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 4px;
}

.phone-strength-fill {
  height: 100%;
  width: 0;
  background: #f59e0b;
  transition: width 0.3s, background-color 0.3s;
  border-radius: var(--radius-full);
}

.phone-strength-fill.partial {
  background: #f59e0b;
}

.phone-strength-fill.valid {
  background: #10b981;
}

/* Email Requirements */
.email-requirements {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.email-req-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: var(--scb-text-muted, #64748b);
  transition: color 0.2s;
}

.email-req-item.valid {
  color: #10b981;
}

.req-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--scb-bg-hover, #e2e8f0);
  transition: background-color 0.2s;
}

.email-req-item.valid .req-dot {
  background: #10b981;
}

/* Dark mode for profile modal components */
html.dark .password-input-wrapper input {
  background: var(--scb-neutral-700);
  border-color: var(--scb-neutral-600);
  color: var(--scb-neutral-100);
}

html.dark .password-input-wrapper input:focus {
  border-color: var(--scb-blue-500);
}

html.dark .password-toggle {
  color: var(--scb-neutral-400);
}

html.dark .strength-bar,
html.dark .phone-strength-bar {
  background: var(--scb-neutral-700);
}

html.dark .req-icon {
  background: var(--scb-neutral-700);
}

html.dark .requirement-item {
  color: var(--scb-neutral-400);
}

html.dark .email-req-item {
  color: var(--scb-neutral-400);
}

html.dark .req-dot {
  background: var(--scb-neutral-600);
}

html.dark .validation-summary {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
}

html.dark .validation-summary.valid {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.2);
}

html.dark .scb-modal-alert.success {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.2);
}

html.dark .scb-modal-alert.error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
}
