/* Admin Login Page Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Nanum Gothic", sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  min-height: 100vh;
}

#login-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.login-header {
  background: #1a1a2e;
  padding: 40px 30px;
  text-align: center;
}

.login-header .logo {
  margin-bottom: 15px;
}

.login-header .logo svg {
  height: 24px;
  fill: white;
}

.login-header h1 {
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  margin: 0;
  letter-spacing: 1px;
}

.login-header p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  margin-top: 8px;
}

.login-body {
  padding: 40px 30px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  font-size: 14px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: #fafafa;
}

.form-group input:focus {
  outline: none;
  border-color: #1a1a2e;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(26, 26, 46, 0.1);
}

.form-group input::placeholder {
  color: #999;
}

.btn-login {
  width: 100%;
  height: 52px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 1px;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(26, 26, 46, 0.4);
}

.btn-login:active {
  transform: translateY(0);
}

.login-footer {
  padding: 20px 30px 30px;
  text-align: center;
  border-top: 1px solid #f0f0f0;
}

.login-footer p {
  color: #888;
  font-size: 12px;
}

/* Error message */
.error-message {
  background: #fff5f5;
  border: 1px solid #feb2b2;
  color: #c53030;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 13px;
  display: none;
}

.error-message.show {
  display: block;
}

/* Success message */
.success-message {
  background: #f0fff4;
  border: 1px solid #9ae6b4;
  color: #276749;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 13px;
  display: none;
}

.success-message.show {
  display: block;
}

/* Password change modal */
.pw-change-notice {
  background: #fffaf0;
  border: 1px solid #fbd38d;
  color: #c05621;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 13px;
}

.pw-change-notice strong {
  display: block;
  margin-bottom: 8px;
}

/* Password validation list */
.password-rules {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.password-rules h4 {
  font-size: 13px;
  color: #333;
  margin-bottom: 12px;
}

.password-rules ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.password-rules li {
  font-size: 12px;
  color: #666;
  padding: 4px 0 4px 20px;
  position: relative;
}

.password-rules li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border: 2px solid #ccc;
  border-radius: 50%;
}

.password-rules li.valid::before {
  background: #48bb78;
  border-color: #48bb78;
}

.password-rules li.valid::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-60%) rotate(45deg);
  width: 4px;
  height: 7px;
  border: solid white;
  border-width: 0 2px 2px 0;
}

/* Loading state */
.btn-login.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn-login.loading::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 10px;
  border: 2px solid transparent;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Back link */
.back-link {
  display: inline-block;
  color: #666;
  font-size: 13px;
  text-decoration: none;
  margin-top: 20px;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: #1a1a2e;
}

.back-link i {
  margin-right: 5px;
}

/* OTP Verification Page */
.otp-info {
  margin-bottom: 25px;
  text-align: center;
}

.otp-info p {
  margin: 0;
  font-size: 15px;
  color: #666;
}

.otp-input {
  width: 100%;
  padding: 15px;
  font-size: 28px;
  text-align: center;
  letter-spacing: 10px;
  border: 2px solid #ddd;
  border-radius: 8px;
  box-sizing: border-box;
}

.otp-input:focus {
  outline: none;
  border-color: #1a1a2e;
  box-shadow: 0 0 0 4px rgba(26, 26, 46, 0.1);
}

.otp-actions {
  margin-top: 25px;
  text-align: center;
}

.otp-actions a {
  color: #666;
  font-size: 13px;
  text-decoration: none;
  transition: color 0.3s ease;
}

.otp-actions a:hover {
  color: #1a1a2e;
}

.otp-timer {
  margin-top: 20px;
  text-align: center;
}

.otp-timer p {
  margin: 0;
  font-size: 12px;
  color: #999;
}

.otp-timer #countdown {
  font-weight: bold;
  color: #666;
}

/* OTP Setup Page */
.login-container.wide {
  max-width: 500px;
}

.otp-setup-info {
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.otp-setup-info p {
  margin: 0;
  font-size: 14px;
  color: #333;
}

.qr-section {
  text-align: center;
  margin-bottom: 20px;
}

.qr-code-box {
  background: white;
  padding: 20px;
  border-radius: 8px;
  display: inline-block;
  border: 1px solid #ddd;
}

.qr-code-box canvas {
  width: 200px;
  height: 200px;
}

.qr-section .hint {
  margin: 15px 0 5px 0;
  font-size: 12px;
  color: #666;
}

.secret-key-box {
  background: #f0f0f0;
  padding: 10px 15px;
  border-radius: 4px;
  display: inline-block;
}

.secret-key-box code {
  font-size: 14px;
  letter-spacing: 2px;
  font-weight: bold;
  color: #333;
}

.secret-key-box .btn-copy {
  margin-left: 10px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.secret-key-box .btn-copy:hover {
  background: #f0f0f0;
}

.verification-section {
  margin-top: 25px;
}

.verification-progress {
  margin-bottom: 20px;
}

.verification-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.verification-steps .step {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 14px;
}

.verification-steps .step.completed {
  background: #28a745;
}

.verification-steps .step-line {
  width: 50px;
  height: 3px;
  background: #e0e0e0;
}

.verification-steps .step-line.completed {
  background: #28a745;
}

.verification-progress .status {
  text-align: center;
  margin: 10px 0 0 0;
  font-size: 13px;
  color: #666;
}

.verification-progress .status .success {
  color: #28a745;
}
