:root {
  --brand: #20AEEF;
  --brand-dark: #1491cc;
  --brand-light: #4bcffa;
  --brand-soft: rgba(32, 174, 239, .12);
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --card-border: #e2e8f0;
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.22s ease;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  margin: 0;
  min-height: 100vh;
  background: #f1f5f9;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
}

/* ── Split Layout ─────────────────────────────── */
.auth-wrapper {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* ── Left Panel (Image) ───────────────────────── */
.auth-visual {
  flex: 0 0 55%;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px 52px;
  background-color: #0c1a2e;
}

.auth-visual-bg {
  position: absolute;
  inset: 0;
  background-color: #0c1a2e;
  background-image: url('../assets/img/login-wave.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}

.auth-visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 20, 50, 0.75) 0%,
    rgba(20, 80, 160, 0.60) 50%,
    rgba(32, 174, 239, 0.45) 100%
  );
  z-index: 1;
}

.auth-visual > * {
  position: relative;
  z-index: 2;
}

/* Brand */
.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.auth-brand-icon {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, .2);
  backdrop-filter: blur(8px);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .25);
}

.auth-brand-name {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.4px;
}

.auth-brand-name span {
  color: rgba(255, 255, 255, .55);
}

/* Visual Content */
.auth-visual-content {
  margin-bottom: 12px;
}

.auth-visual-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, .15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .25);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 99px;
  margin-bottom: 24px;
  letter-spacing: 0.3px;
}

.auth-visual-tag i {
  font-size: 11px;
  color: #4bcffa;
}

.auth-visual-headline {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.8px;
  margin: 0 0 16px;
}

.auth-visual-headline em {
  font-style: normal;
  color: #4bcffa;
}

.auth-visual-sub {
  font-size: 15px;
  color: rgba(255, 255, 255, .72);
  line-height: 1.65;
  margin: 0 0 36px;
  max-width: 420px;
}

/* Feature Pills */
.auth-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.auth-feature-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, .1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 99px;
  padding: 7px 14px;
  color: rgba(255, 255, 255, .9);
  font-size: 12.5px;
  font-weight: 500;
}

.auth-feature-pill i {
  font-size: 13px;
  color: #4bcffa;
}

/* Stats Row */
.auth-stats {
  display: flex;
  gap: 32px;
}

.auth-stat-value {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
}

.auth-stat-label {
  font-size: 12px;
  color: rgba(255, 255, 255, .6);
  margin-top: 2px;
}

.auth-stat-divider {
  width: 1px;
  background: rgba(255, 255, 255, .2);
}

/* Testimonial */
.auth-testimonial {
  background: rgba(255, 255, 255, .1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: var(--radius);
  padding: 20px 24px;
}

.auth-testimonial-text {
  font-size: 13.5px;
  color: rgba(255, 255, 255, .9);
  line-height: 1.6;
  margin: 0 0 14px;
  font-style: italic;
}

.auth-testimonial-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-testimonial-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4bcffa, #20AEEF);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.auth-testimonial-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.auth-testimonial-role {
  font-size: 11.5px;
  color: rgba(255, 255, 255, .6);
}

/* ── Right Panel (Form) ───────────────────────── */
.auth-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  background: #fff;
  position: relative;
  overflow-y: auto;
}

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

/* Form Header */
.auth-form-header {
  margin-bottom: 32px;
}

.auth-form-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 10px;
}

.auth-form-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  margin: 0 0 8px;
}

.auth-form-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

.auth-form-desc a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}

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

/* Social Buttons */
.auth-social {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.btn-social {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text-primary);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.btn-social:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
  box-shadow: 0 2px 8px rgba(32, 174, 239, .12);
}

.btn-social i { font-size: 16px; }
.btn-social .fab.fa-google { color: #EA4335; }
.btn-social:hover .fab.fa-google { color: inherit; }
.btn-social .fab.fa-github { color: #24292e; }
.btn-social:hover .fab.fa-github { color: inherit; }

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--card-border);
}

/* Form Fields */
.form-group { margin-bottom: 18px; }

.form-label-custom {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.input-wrap { position: relative; }

.input-wrap .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 15px;
  pointer-events: none;
  transition: color var(--transition);
}

.input-wrap .input-field {
  width: 100%;
  padding: 11px 14px 11px 40px;
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  background: #fff;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.input-wrap .input-field:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(32, 174, 239, .12);
}

.input-wrap .input-field:focus + .input-icon,
.input-wrap:focus-within .input-icon {
  color: var(--brand);
}

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

.toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 15px;
  transition: color var(--transition);
}

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

/* Options Row */
.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.auth-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.auth-remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--card-border);
  border-radius: 4px;
  cursor: pointer;
  accent-color: var(--brand);
}

.auth-remember-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.auth-forgot {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
}

.auth-forgot:hover { text-decoration: underline; }

/* Submit Button */
.btn-signin {
  width: 100%;
  padding: 12.5px 24px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.1px;
}

.btn-signin::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, .18) 0%, transparent 50%);
}

.btn-signin:hover {
  background: var(--brand-dark);
  box-shadow: 0 4px 20px rgba(32, 174, 239, .38);
  transform: translateY(-1px);
}

.btn-signin:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(32, 174, 239, .25);
}

/* Register Link */
.auth-register {
  text-align: center;
  margin-top: 24px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.auth-register a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

.auth-register a:hover { text-decoration: underline; }

/* Footer */
.auth-form-footer {
  margin-top: 40px;
  text-align: center;
  font-size: 11.5px;
  color: var(--text-muted);
}

.auth-form-footer a { color: var(--text-muted); text-decoration: none; }
.auth-form-footer a:hover { color: var(--brand); }

/* Alert */
.auth-alert {
  display: none;
  align-items: flex-start;
  gap: 10px;
  background: #fff5f5;
  border: 1.5px solid #fecdd3;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 13px;
  color: #e11d48;
}

.auth-alert.show { display: flex; }
.auth-alert i { font-size: 15px; margin-top: 1px; flex-shrink: 0; }

/* Loading state */
.btn-signin .spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.btn-signin.loading .spinner { display: block; }
.btn-signin.loading .btn-label { display: none; }

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

/* Input validation states */
.input-field.is-valid  { border-color: #10b981 !important; }
.input-field.is-invalid {
  border-color: #f43f5e !important;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, .1) !important;
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 900px) {
  .auth-visual { flex: 0 0 45%; padding: 36px; }
  .auth-stats { gap: 20px; }
  .auth-visual-headline { font-size: 26px; }
}

@media (max-width: 680px) {
  .auth-visual { display: none; }
  .auth-form-panel { padding: 32px 20px; background: #f1f5f9; }
  .auth-form-inner {
    background: #fff;
    border-radius: 20px;
    padding: 32px 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .08);
  }
}
