/* =====================================================
   LOGIN PAGE STYLES - Enterprise Monochrome Design
   ===================================================== */

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: #F5F5F5;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 420px;
}

.signin-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 48px 40px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 8px 24px rgba(0, 0, 0, 0.08);
  border: 1px solid #E5E5E5;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}

.logo-icon {
  font-size: 36px;
  color: #404040;
}

.logo-text {
  font-size: 24px;
  font-weight: 600;
  color: #171717;
  letter-spacing: -0.5px;
}

h1 {
  text-align: center;
  color: #171717;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
}

.subtitle {
  text-align: center;
  color: #737373;
  font-size: 14px;
  margin-bottom: 32px;
}

.providers {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.provider-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 20px;
  border: 1px solid #E5E5E5;
  border-radius: 8px;
  background: #ffffff;
  font-size: 15px;
  font-weight: 500;
  color: #404040;
  cursor: pointer;
  transition: all 0.15s ease;
}

.provider-btn:hover {
  background: #FAFAFA;
  border-color: #D4D4D4;
}

.provider-btn:active {
  background: #F5F5F5;
}

.provider-btn .material-icons-outlined {
  font-size: 20px;
}

.provider-btn.email {
  background: #262626;
  color: #ffffff;
  border-color: #262626;
}

.provider-btn.email:hover {
  background: #404040;
  border-color: #404040;
}

.provider-btn.email:active {
  background: #171717;
}

/* Email input form styles */
#email-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.email-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.email-input-group .input-icon {
  position: absolute;
  left: 14px;
  color: #737373;
  font-size: 20px;
  pointer-events: none;
}

.email-input-group input {
  width: 100%;
  padding: 14px 14px 14px 48px;
  border: 1px solid #E5E5E5;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  color: #171717;
  background: #ffffff;
  transition: all 0.15s ease;
}

.email-input-group input::placeholder {
  color: #A3A3A3;
}

.email-input-group input:focus {
  outline: none;
  border-color: #404040;
  box-shadow: 0 0 0 3px rgba(64, 64, 64, 0.1);
}

.email-input-group input:invalid:not(:placeholder-shown) {
  border-color: #EF4444;
}

.otp-hint {
  text-align: center;
  color: #737373;
  font-size: 13px;
  margin-top: 8px;
}

.provider-btn.loading {
  pointer-events: none;
  opacity: 0.7;
}

.provider-btn.loading span:first-child::after {
  content: '...';
  animation: dots 1.5s infinite;
}

@keyframes dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}

.divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #E5E5E5;
}

.divider span {
  padding: 0 16px;
  color: #A3A3A3;
  font-size: 13px;
}

.footer-text {
  text-align: center;
  color: #A3A3A3;
  font-size: 12px;
  margin-top: 32px;
}

.footer-text a {
  color: #525252;
  text-decoration: none;
  font-weight: 500;
}

.footer-text a:hover {
  text-decoration: underline;
}

/* Authenticated state styles */
.hidden {
  display: none !important;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: #FAFAFA;
  border-radius: 8px;
  margin-bottom: 24px;
  border: 1px solid #E5E5E5;
}

.avatar {
  width: 48px;
  height: 48px;
  background: #404040;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  font-weight: 600;
}

.user-details {
  flex: 1;
}

.user-name {
  font-size: 15px;
  font-weight: 600;
  color: #171717;
  margin-bottom: 2px;
}

.user-email {
  font-size: 13px;
  color: #737373;
}

.token-section {
  margin-bottom: 24px;
}

.token-section label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #525252;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.token-display {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F5F5F5;
  border-radius: 6px;
  padding: 12px;
  border: 1px solid #E5E5E5;
}

.token-display code {
  flex: 1;
  font-family: 'SF Mono', Monaco, Menlo, monospace;
  font-size: 11px;
  color: #525252;
  word-break: break-all;
  max-height: 80px;
  overflow-y: auto;
}

.copy-btn {
  background: #ffffff;
  border: 1px solid #D4D4D4;
  border-radius: 4px;
  padding: 6px;
  cursor: pointer;
  color: #737373;
  transition: all 0.15s ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.copy-btn:hover {
  background: #FAFAFA;
  color: #404040;
  border-color: #A3A3A3;
}

.copy-btn .material-icons-outlined {
  font-size: 18px;
}

.signout-btn {
  width: 100%;
  padding: 12px 20px;
  background: #ffffff;
  border: 1px solid #D4D4D4;
  border-radius: 8px;
  color: #525252;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.signout-btn:hover {
  background: #FAFAFA;
  color: #404040;
}

.signout-btn .material-icons-outlined {
  font-size: 18px;
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #262626;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Loading state */
.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Responsive adjustments */
@media (max-width: 480px) {
  .signin-card {
    padding: 32px 24px;
  }

  h1 {
    font-size: 22px;
  }

  .provider-btn {
    padding: 12px 16px;
    font-size: 14px;
  }

  .logo-text {
    font-size: 20px;
  }

  .logo-icon {
    font-size: 28px;
  }
}
