:root {
  --integro-primary: #1E5BD6;
  --integro-primary-hover: #1747B0;
  --integro-navy: #1B2A4E;
  --integro-text-body: #475569;
  --integro-text-muted: #94A3B8;
  --integro-border: #E2E8F0;
  --integro-border-focus: #1E5BD6;
  --integro-card-shadow: rgba(15, 23, 42, 0.06);
  --integro-radius-card: 24px;
  --integro-radius-input: 10px;
  --integro-radius-button: 10px;
  --integro-error-bg: #FEF2F2;
  --integro-error-border: #FCA5A5;
  --integro-error-text: #B91C1C;
  --integro-success-bg: #ECFDF5;
  --integro-success-border: #6EE7B7;
  --integro-success-text: #047857;
  --integro-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

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

html, body {
  height: 100%;
  font-family: var(--integro-font-sans);
  color: var(--integro-text-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  min-height: 100vh;
}

.auth-card {
  width: 100%;
  background: #FFFFFF;
  border-radius: var(--integro-radius-card);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 12px 40px var(--integro-card-shadow);
  overflow: hidden;
  border: 1px solid #F1F5F9;
}

.auth-card--single {
  max-width: 480px;
}

.auth-form-panel {
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  min-height: 560px;
}

.form-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  padding: 16px 0;
}

.form-logo {
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-logo img {
  height: 72px;
  width: auto;
  display: block;
}

.form-heading {
  font-size: 26px;
  font-weight: 700;
  color: var(--integro-navy);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  text-align: center;
}

.form-subtitle {
  font-size: 14px;
  color: var(--integro-text-body);
  margin-bottom: 32px;
  line-height: 1.5;
  text-align: center;
}

.field { margin-bottom: 18px; }

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--integro-navy);
  margin-bottom: 6px;
}

.field-input-wrap { position: relative; }

.field-input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 42px;
  border: 1px solid var(--integro-border);
  border-radius: var(--integro-radius-input);
  font-family: inherit;
  font-size: 14px;
  color: var(--integro-navy);
  background: #FFFFFF;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

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

.field-input:focus {
  outline: none;
  border-color: var(--integro-border-focus);
  box-shadow: 0 0 0 4px rgba(30, 91, 214, 0.10);
}

.field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--integro-text-muted);
  pointer-events: none;
}

.field-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--integro-text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.field-toggle:hover { color: var(--integro-text-body); }

.login-error {
  background: var(--integro-error-bg);
  border: 1px solid var(--integro-error-border);
  color: var(--integro-error-text);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
  margin-top: 4px;
  line-height: 1.45;
}

.login-success {
  background: var(--integro-success-bg);
  border: 1px solid var(--integro-success-border);
  color: var(--integro-success-text);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
  margin-top: 4px;
  line-height: 1.45;
}

.btn-primary {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: var(--integro-radius-button);
  background: var(--integro-primary);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
  box-shadow: 0 4px 12px rgba(30, 91, 214, 0.25);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}

.btn-primary:hover:not(:disabled) { background: var(--integro-primary-hover); }
.btn-primary:active:not(:disabled) { transform: translateY(1px); }

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

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: integro-spin 0.7s linear infinite;
  display: none;
}

.btn-primary.is-loading .btn-spinner { display: inline-block; }
.btn-primary.is-loading .btn-label   { opacity: 0.85; }

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

.form-aux-link {
  text-align: center;
  margin-top: 18px;
}

.forgot-link {
  font-size: 13px;
  color: var(--integro-primary);
  text-decoration: none;
  font-weight: 500;
}

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

.form-footer {
  text-align: center;
  font-size: 13px;
  color: var(--integro-text-muted);
  margin-top: 24px;
}

@media (max-width: 520px) {
  .auth-form-panel { padding: 32px 28px 36px; min-height: auto; }
  .form-logo img { height: 60px; }
  .form-heading { font-size: 22px; }
}
