/* ============================================================
   Suportec - Auth Pages (Login)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0d1f35;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* Background pattern */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(45,90,142,0.25) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(201,151,44,0.12) 0%, transparent 50%),
    linear-gradient(135deg, #0d1f35 0%, #1a3a5c 50%, #0f2240 100%);
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: 0;
  opacity: 0.6;
}

/* ============================================================
   Auth Container
   ============================================================ */
.auth-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
}

/* ============================================================
   Auth Card
   ============================================================ */
.auth-card {
  background: rgba(255,255,255,0.98);
  border-radius: 16px;
  padding: 40px 40px 36px;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.4),
    0 0 0 1px rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
}

/* ============================================================
   Auth Header / Logo
   ============================================================ */
.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 12px;
  padding-bottom: 0;
}

/* When showing the real logo image */
.auth-logo-img {
  max-width: 220px;
  max-height: 70px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Product name + subtitle row below the logo */
.auth-logo-product-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e8edf5;
  gap: 4px;
  text-align: center;
}

.auth-logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #1a3a5c, #2d5a8e);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(26,58,92,0.3);
}

.auth-logo-icon svg {
  width: 26px;
  height: 26px;
  color: #fff;
}

.auth-logo-text {
  display: flex;
  flex-direction: column;
}

.auth-logo-company {
  font-size: 0.75rem;
  font-weight: 600;
  color: #c9972c;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.auth-logo-product {
  font-size: 1.0625rem;
  font-weight: 800;
  color: #1a3a5c;
  line-height: 1.2;
}

.auth-subtitle {
  font-size: 0.8125rem;
  color: #64748b;
  margin-top: 1px;
}

/* ============================================================
   Auth Form
   ============================================================ */
.auth-form-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}

.auth-form-subtitle {
  font-size: 0.8125rem;
  color: #64748b;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #1e293b;
  font-size: 0.9375rem;
  font-family: inherit;
  transition: all 0.2s ease;
  line-height: 1.5;
}

.form-control:focus {
  outline: none;
  border-color: #2d5a8e;
  box-shadow: 0 0 0 3px rgba(45,90,142,0.12);
}

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

.input-with-icon {
  position: relative;
}

.input-with-icon .form-control {
  padding-left: 42px;
}

.input-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #94a3b8;
  pointer-events: none;
}

.input-password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  padding: 0;
  transition: color 0.2s;
}

.input-password-toggle:hover {
  color: #64748b;
}

.input-password-toggle svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* ============================================================
   Remember me & Links
   ============================================================ */
.auth-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 7px;
}

.form-check input[type="checkbox"] {
  width: 15px;
  height: 15px;
  border-radius: 4px;
  cursor: pointer;
  accent-color: #1a3a5c;
}

.form-check label {
  font-size: 0.8125rem;
  color: #475569;
  cursor: pointer;
  font-weight: 500;
}

/* ============================================================
   Submit Button
   ============================================================ */
.btn-auth {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #1a3a5c, #2d5a8e);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 14px rgba(26,58,92,0.25);
}

.btn-auth:hover {
  background: linear-gradient(135deg, #0f2240, #1a3a5c);
  box-shadow: 0 6px 20px rgba(26,58,92,0.35);
  transform: translateY(-1px);
}

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

.btn-auth:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

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

/* ============================================================
   Alert
   ============================================================ */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.875rem;
  margin-bottom: 18px;
  border: 1px solid;
}

.auth-alert svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.auth-alert-error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.auth-alert-success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}

.auth-alert-warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

/* ============================================================
   Turnstile
   ============================================================ */
.turnstile-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

/* ============================================================
   Auth Footer
   ============================================================ */
.auth-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 0.75rem;
  color: #94a3b8;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
}

.auth-footer strong {
  color: #64748b;
}

/* ============================================================
   Password Strength Indicator (for profile)
   ============================================================ */
.password-strength {
  margin-top: 6px;
}

.password-strength-bar {
  height: 4px;
  border-radius: 2px;
  background: #e2e8f0;
  overflow: hidden;
  margin-bottom: 4px;
}

.password-strength-fill {
  height: 100%;
  border-radius: 2px;
  transition: all 0.3s ease;
  width: 0;
}

.strength-weak   .password-strength-fill { width: 25%; background: #ef4444; }
.strength-fair   .password-strength-fill { width: 50%; background: #f59e0b; }
.strength-good   .password-strength-fill { width: 75%; background: #3b82f6; }
.strength-strong .password-strength-fill { width: 100%; background: #10b981; }

.password-strength-text {
  font-size: 0.6875rem;
  font-weight: 600;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 480px) {
  .auth-card {
    padding: 28px 24px 24px;
    border-radius: 12px;
  }

  .auth-logo-product {
    font-size: 0.9375rem;
  }
}
