/* ═══════════════════════════════════
   LOGIN — Google Workspace Style
═══════════════════════════════════ */

.login-wrap {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  min-height: 100vh;
  padding: 20px;
}

/* 배경 장식 */
.login-wrap::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #4285f4 0%, #34a853 33%, #fbbc04 66%, #ea4335 100%);
}

.login-box {
  width: 450px;
  max-width: 100%;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #dadce0;
  box-shadow: 0 2px 4px -1px rgba(0,0,0,.2), 0 4px 5px 0 rgba(0,0,0,.14), 0 1px 10px 0 rgba(0,0,0,.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 상단 헤더 */
.login-header {
  padding: 32px 40px 28px;
  border-bottom: 1px solid #e8eaed;
  text-align: center;
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.login-logo .logo-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #1a73e8;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(26,115,232,0.35);
}

.login-logo .logo-icon img {
  width: 75%;
  height: 75%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.login-logo-name {
  font-size: 22px;
  font-weight: 400;
  color: #202124;
  letter-spacing: -0.3px;
}

.login-box h2 {
  font-size: 24px;
  font-weight: 400;
  color: #202124;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.login-subtitle {
  font-size: 14px;
  color: #5f6368;
  line-height: 1.5;
}

/* 폼 영역 */
.login-form-area {
  padding: 28px 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Google 스타일 Outlined Input */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-wrapper {
  position: relative;
}

.input-wrapper label {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #5f6368;
  pointer-events: none;
  transition: all 0.2s var(--ease);
  background: #fff;
  padding: 0 4px;
  border-radius: 2px;
}

.input-wrapper input:focus ~ label,
.input-wrapper input:not(:placeholder-shown) ~ label {
  top: 0;
  font-size: 11px;
  color: #1a73e8;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.login-box input {
  width: 100%;
  height: 54px;
  padding: 14px 16px;
  border-radius: 4px;
  border: 1px solid #dadce0;
  font-size: 15px;
  background: #fff;
  color: #202124;
  font-family: 'Google Sans', 'Roboto', sans-serif;
  transition: border 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.login-box input::placeholder {
  color: transparent;
}

.login-box input:focus {
  outline: none;
  border-color: #1a73e8;
  border-width: 2px;
  box-shadow: none;
}

.input-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa0a6;
  font-size: 16px;
  pointer-events: none;
  transition: color 0.2s;
}

.login-box input:focus + .input-icon {
  color: #1a73e8;
}

/* 로그인 버튼 */
#login-btn {
  height: 48px;
  border: none;
  border-radius: 4px;
  background: #1a73e8;
  color: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'Google Sans', 'Roboto', sans-serif;
  letter-spacing: 0.25px;
  transition: background 0.2s var(--ease), box-shadow 0.2s var(--ease);
  box-shadow: 0 1px 2px rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
}

#login-btn:hover {
  background: #1557b0;
  box-shadow: 0 1px 3px rgba(60,64,67,.3), 0 4px 8px rgba(60,64,67,.15);
}

#login-btn:active {
  background: #1246a0;
  box-shadow: 0 1px 2px rgba(60,64,67,.3);
  transform: translateY(0);
}

#login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 로딩 */
.loading { position: relative; color: transparent !important; }
.loading::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 에러 */
.error-message {
  color: #c5221f;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #fce8e6;
  border-radius: 4px;
  border: 1px solid rgba(197,34,31,0.2);
  display: none;
}
.error-message.show { display: flex; }
.error-message::before {
  content: '⚠';
  flex-shrink: 0;
}

/* 테스트 계정 */
.test-accounts {
  border-top: 1px solid #e8eaed;
  padding: 20px 40px 28px;
}

.test-accounts-title {
  font-size: 11px;
  font-weight: 500;
  color: #9aa0a6;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
}

.test-account-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.test-account-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e8eaed;
  cursor: pointer;
  transition: all 0.15s;
}

.test-account-item:hover {
  background: #e8f0fe;
  border-color: rgba(26,115,232,0.3);
}

.test-account-item.admin {
  border-color: rgba(26,115,232,0.25);
  background: #e8f0fe;
}

.test-account-creds {
  font-family: 'Roboto Mono', 'SF Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  color: #202124;
  min-width: 110px;
}

.test-account-desc {
  color: #5f6368;
  font-size: 12px;
  line-height: 1.4;
}

.test-account-item.admin .test-account-creds { color: #1967d2; }
.test-account-item.admin .test-account-desc  { color: #1967d2; font-weight: 500; }

/* 반응형 */
@media (max-width: 480px) {
  .login-header { padding: 28px 24px 22px; }
  .login-form-area { padding: 22px 24px 26px; }
  .test-accounts { padding: 16px 24px 24px; }
  .login-box h2 { font-size: 20px; }
}
