* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 50%, #1e3a5f 100%);
  color: #1f2937;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(244,185,66,.10) 0%, transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(244,185,66,.08) 0%, transparent 45%);
  pointer-events: none;
}

.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  overflow: hidden;
}

.login-brand {
  text-align: center;
  padding: 36px 32px 24px;
  background: linear-gradient(135deg, #1e3a5f, #152a47);
  color: #fff;
}

.brand-icon {
  width: 64px;
  height: 64px;
  background: rgba(244,185,66,.18);
  border: 2px solid rgba(244,185,66,.35);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.brand-icon i { font-size: 28px; color: #f4b942; }

.login-brand h1 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .3px;
}
.login-brand p {
  margin: 0;
  opacity: .85;
  font-size: 13px;
}

#loginForm {
  padding: 28px 32px 16px;
}

.form-label {
  font-weight: 600;
  font-size: 13px;
  color: #4b5563;
  margin-bottom: 6px;
}

.input-group-text {
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-right: 0;
  color: #6b7280;
}

.form-control {
  border-radius: 8px;
  padding: 11px 14px;
  border: 1.5px solid #e5e7eb;
  font-size: 14.5px;
  transition: all .15s;
}
.input-group .form-control {
  border-left: 0;
  border-radius: 0;
}
.input-group .form-control:not(:last-child) { border-right: 0; }
.input-group .form-control:last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}
.input-group .input-group-text:first-child {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}
.form-control:focus {
  border-color: #1e3a5f;
  box-shadow: 0 0 0 3px rgba(30,58,95,.12);
  z-index: 3;
}
.input-group:focus-within .input-group-text { border-color: #1e3a5f; }
.input-group:focus-within .btn { border-color: #1e3a5f; }

.btn-outline-secondary {
  border: 1.5px solid #e5e7eb;
  border-left: 0;
  color: #6b7280;
  background: #fff;
}
.btn-outline-secondary:hover {
  background: #f9fafb;
  color: #1e3a5f;
  border-color: #e5e7eb;
}

.btn-primary {
  background: #1e3a5f;
  border: 0;
  border-radius: 8px;
  padding: 12px;
  font-weight: 600;
  font-size: 15px;
  width: 100%;
  margin-top: 8px;
  transition: all .15s;
  position: relative;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  background: #152a47 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30,58,95,.30) !important;
}
.btn-primary:disabled { opacity: .65; cursor: not-allowed; transform: none; }

.alert {
  border-radius: 8px;
  font-size: 13.5px;
  padding: 10px 14px;
}

.login-footer {
  text-align: center;
  padding: 16px;
  background: #f7f9fc;
  border-top: 1px solid #e5e7eb;
  font-size: 12.5px;
  color: #6b7280;
}
.login-footer i { color: #f4b942; }

#twofaGroup input {
  letter-spacing: 4px;
  text-align: center;
  font-weight: 600;
}

@media (max-width: 480px) {
  .login-brand { padding: 28px 24px 20px; }
  #loginForm { padding: 22px 22px 12px; }
  .login-brand h1 { font-size: 19px; }
}
