/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Modern Gradient Background */
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Sign-In Container */
.signin-wrapper {
    width: 100%;
    max-width: 420px;
}

.signin-container {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

/* Logo */
.admin-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: block;
}

/* Title */
h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2d3748;
}

/* Error Message */
.error-message {
    background: #fee;
    color: #c53030;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    font-size: 14px;
    text-align: left;
    border-left: 4px solid #c53030;
}

/* Form */
form {
    margin-top: 30px;
}

/* Input Groups */
.input-group {
    position: relative;
    margin-bottom: 20px;
    text-align: left;
}

.input-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 16px;
    pointer-events: none;
    line-height: 1;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    line-height: 1;
}

.toggle-password i {
    font-size: 16px;
    position: static;
    transform: none;
}

.toggle-password:hover {
    color: #667eea;
}

/* Input Fields */
input {
    width: 100%;
    padding: 14px 48px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s;
    background: #f7fafc;
    line-height: 1.5;
}

input:focus {
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

input::placeholder {
    color: #a0aec0;
}

/* Submit Button */
button[type="submit"] {
    width: 100%;
    padding: 14px;
    margin-top: 10px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Remember Me */
.remember-me {
    display: flex;
    align-items: center;
    margin-top: 16px;
    text-align: left;
}

.remember-me input[type="checkbox"] {
    width: auto;
    margin: 0 8px 0 0;
    padding: 0;
    cursor: pointer;
}

.remember-me label {
    font-size: 14px;
    color: #4a5568;
    cursor: pointer;
    user-select: none;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

button[type="submit"]:active {
    transform: translateY(0);
}

button[type="submit"]:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

button[type="submit"] i {
    margin-right: 8px;
    font-size: 16px;
    line-height: 1;
}

/* Responsive */
@media (max-width: 480px) {
    .signin-container {
        padding: 30px 24px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .admin-logo {
        width: 60px;
        height: 60px;
    }
}

/* ── MFA / multi-step sign-in (Phase 3B) ─────────────────────────────────── */
[hidden] { display: none !important; }

.signin-step .step-hint {
  color: #64748b;
  font-size: 0.9rem;
  margin: 0.5rem 0 1rem;
  line-height: 1.45;
}

/* Method choice cards (Authenticator App / Email OTP) */
.method-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 1rem;
}

.method-option {
  display: grid;
  grid-template-columns: 28px 1fr;
  grid-row-gap: 4px;
  align-items: start;
  text-align: left;
  padding: 14px;
  border: 1px solid #d7dee8;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.method-option:hover,
.method-option:focus-visible {
  border-color: #2563eb;
  background: #f8fbff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
  outline: none;
}
.method-option > i {
  grid-row: 1 / span 2;
  font-size: 1.15rem;
  color: #2563eb;
  margin-top: 2px;
}
.method-title {
  font-weight: 600;
  color: #1f2937;
  font-size: 0.98rem;
}
.method-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  vertical-align: middle;
}
.method-desc {
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.4;
}

.qr-wrapper {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
}
.qr-wrapper img {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.manual-key {
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  letter-spacing: 2px;
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  padding: 10px;
  word-break: break-all;
  text-align: center;
  margin-bottom: 1rem;
}

.recovery-codes {
  list-style: none;
  padding: 12px;
  margin: 0 0 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.recovery-codes li {
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  letter-spacing: 1px;
  text-align: center;
}

.recovery-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 1rem;
}

.secondary-button {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}
.secondary-button:hover { background: #f1f5f9; }

.link-button {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: #2563eb;
  cursor: pointer;
  font-size: 0.88rem;
  margin-top: 0.7rem;
  text-decoration: underline;
}
.link-button:hover:not(:disabled) { color: #1d4ed8; }
.link-button:disabled {
  color: #94a3b8;
  cursor: default;
  text-decoration: none;
}
