/* ============================================
   ABOSS AUTH DESIGN SYSTEM
   Deep Tech / Business OS Theme
   ============================================ */

/* ============================================
   COLOR TOKENS (Google Accounts Style)
   ============================================ */
:root {
  /* Backgrounds */
  --color-bg-void: #F1F3F4;
  --color-bg-surface: #FFFFFF;
  --color-bg-muted: #E8EAED;
  
  /* Borders */
  --color-border: #DADCE0;
  --color-border-focus: #1A73E8;
  --color-border-error: #D93025;
  
  /* Text */
  --color-text: #202124;
  --color-text-muted: #5F6368;
  --color-text-error: #D93025;
  
  /* Accents */
  --color-primary: #1A73E8;
  --color-primary-hover: #1557B0;
  --color-violet: #8B5CF6;
  
  /* Glass (if needed) */
  --glass-fill: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(0, 0, 0, 0.1);
  --glass-blur: 16px;
  
  /* Spacing (8pt system) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  
  /* Radius */
  --radius-input: 14px;
  --radius-card: 20px;
  --radius-button: 999px;
  
  /* Typography */
  --font-display: 'Google Sans', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Roboto Mono', 'Courier New', monospace;
  
  /* Motion */
  --motion-fast: 200ms;
  --motion-base: 300ms;
  --motion-slow: 450ms;
  --motion-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   BASE RESET & TYPOGRAPHY
   ============================================ */
* {
  box-sizing: border-box;
}

/* Mobile-friendly viewport: avoid html overflow:hidden + body position:fixed
   (that pattern triggers "Request Desktop Site" on some mobile browsers). */
html {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body.auth-shell {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: none;
  -webkit-overflow-scrolling: touch;
  background: linear-gradient(165deg, #E8ECF1 0%, #F1F3F4 45%, #F5F6F8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Google Sans', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.4286;
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.auth-shell {
  padding: var(--space-4);
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}

@supports (padding: max(1px, env(safe-area-inset-top))) {
  .auth-shell {
    padding-top: max(var(--space-4), env(safe-area-inset-top));
    padding-bottom: max(var(--space-4), env(safe-area-inset-bottom));
    padding-left: max(var(--space-4), env(safe-area-inset-left));
    padding-right: max(var(--space-4), env(safe-area-inset-right));
  }
}

/* ============================================
   AUTH CARD
   ============================================ */
.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  min-width: 0; /* avoid flex item overflow */
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: visible;
  background-color: var(--color-bg-surface);
  border: none;
  border-radius: 0;
  padding: 40px 32px 36px;
  box-shadow: none;
  overflow-wrap: break-word;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .auth-card {
    max-width: 100%;
    padding: 32px 24px 32px;
  }
  
  .auth-title {
    font-size: 24px;
  }
  
  .auth-subtitle {
    font-size: 14px;
    margin-bottom: 32px;
  }
  
  .auth-captcha-group {
    flex-wrap: wrap;
  }
  
  .auth-captcha-input-wrapper {
    width: 100%;
    margin-top: 12px;
  }
  
  .auth-oauth-row {
    gap: 10px;
  }
  
  .auth-btn-oauth-square {
    width: 52px;
    height: 52px;
  }
  
  .auth-google-icon {
    font-size: 18px;
  }
  
  .auth-microsoft-icon {
    width: 16px;
    height: 16px;
  }
  
  .auth-apple-icon {
    font-size: 18px;
  }
}

/* ============================================
   LOGO & HEADINGS
   ============================================ */
.auth-logo {
  display: block;
  margin: 0 auto 32px;
  height: auto;
  max-height: 40px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.auth-logo-left {
  margin: 0 0 32px 0;
  max-height: 28px;
}

.auth-title {
  font-family: 'Google Sans', 'Roboto', sans-serif;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-text);
  text-align: left;
  margin: 0 0 8px 0;
  letter-spacing: -0.01em;
}

.auth-subtitle {
  font-size: 15px;
  font-weight: 400;
  color: var(--color-text-muted);
  text-align: left;
  margin: 0 0 40px 0;
  line-height: 1.5;
}

/* ============================================
   FORM INPUTS
   ============================================ */
.auth-input-group {
  position: relative;
  margin-bottom: 20px;
}

.auth-input {
  width: 100%;
  height: 48px;
  padding: 12px 14px;
  background-color: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  color: var(--color-text);
  transition: border-color 0.2s ease;
  outline: none;
}

.auth-input::placeholder {
  color: var(--color-text-muted);
}

.auth-input:focus {
  border-color: var(--color-border-focus);
  border-width: 2px;
  padding: 11px 13px;
  box-shadow: none;
}

.auth-input:hover:not(:focus) {
  border-color: var(--color-text);
}

.auth-input.is-error,
.auth-input-group.is-error .auth-input {
  border-color: var(--color-border-error);
  background-color: var(--color-bg-surface);
}

.auth-input.is-error:focus,
.auth-input-group.is-error .auth-input:focus {
  border-color: var(--color-border-error);
  border-width: 2px;
  padding: 11px 13px;
  box-shadow: none;
}

/* Password toggle button */
.auth-input-wrapper {
  position: relative;
}

.auth-password-toggle {
  position: absolute;
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: var(--space-2);
  font-size: 16px;
  transition: color var(--motion-fast) var(--motion-ease);
  z-index: 2;
}

.auth-password-toggle:hover {
  color: var(--color-text);
}

.auth-password-toggle:focus {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================================
   ERROR MESSAGES
   ============================================ */
.auth-error-text {
  display: none;
  font-size: 12px;
  color: var(--color-text-error);
  margin-top: 6px;
  line-height: 1.3333;
  font-family: 'Roboto', sans-serif;
}

.auth-input-group.is-error .auth-error-text {
  display: block;
}

/* Inline OAuth / backend error banner */
.auth-error-banner {
  margin-bottom: 20px;
  padding: 12px 16px;
  background-color: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 8px;
  color: #991B1B;
  font-size: 14px;
  line-height: 1.5;
  font-family: 'Roboto', sans-serif;
}

.auth-error-banner:empty {
  display: none !important;
}

/* ============================================
   BUTTONS
   ============================================ */
.auth-btn {
  width: 100%;
  min-width: 88px;
  height: 36px;
  padding: 0 24px;
  border: none;
  border-radius: 4px;
  font-family: 'Google Sans', 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  position: relative;
  overflow: hidden;
  text-transform: none;
  letter-spacing: 0.25px;
}

.auth-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.auth-btn-primary {
  background-color: var(--color-primary);
  color: #FFFFFF;
  box-shadow: none;
  margin-top: 0;
  margin-bottom: 0;
}

.auth-btn-primary:hover:not(:disabled) {
  background-color: var(--color-primary-hover);
  box-shadow: 0 2px 4px rgba(26, 115, 232, 0.2);
}

.auth-btn-primary:active:not(:disabled) {
  box-shadow: 0 1px 2px rgba(26, 115, 232, 0.2);
}

.auth-btn-primary:focus {
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.2);
}

/* Loading spinner */
.auth-btn-loading {
  position: relative;
  color: transparent;
}

.auth-btn-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: auth-spin 0.6s linear infinite;
}

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

.auth-page-loader-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10050;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
}

.auth-page-loader-overlay.is-visible {
  display: flex;
}

.auth-page-loader-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-8) var(--space-10);
  max-width: 320px;
}

.auth-page-loader-card .auth-loader {
  margin-bottom: var(--space-4);
}

.auth-page-loader-message {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-text);
  font-family: var(--font-body);
}

body.auth-page-loader-active {
  overflow: hidden;
}

.auth-btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.auth-btn-ghost:hover:not(:disabled) {
  background-color: var(--color-bg-muted);
  color: var(--color-text);
  border-color: var(--color-border-focus);
}

.auth-btn-secondary {
  background-color: var(--color-bg-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  margin-right: 8px;
}

.auth-btn-secondary:hover:not(:disabled) {
  background-color: var(--color-bg-muted);
  border-color: var(--color-text);
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

.auth-btn-secondary:focus {
  box-shadow: 0 0 0 3px rgba(60, 64, 67, 0.1);
}

.auth-btn-oauth {
  background-color: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  height: 40px;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  font-family: 'Roboto', sans-serif;
  border-radius: 4px;
}

.auth-btn-oauth:hover:not(:disabled) {
  background-color: var(--color-bg-muted);
  box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

/* ============================================
   LINKS
   ============================================ */
.auth-link {
  color: var(--color-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s ease;
  padding: 4px 0;
  border-radius: 4px;
  font-family: 'Google Sans', 'Roboto', sans-serif;
}

.auth-link:hover {
  background-color: rgba(26, 115, 232, 0.04);
  text-decoration: none;
}

.auth-link:focus {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

.auth-link-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  margin-bottom: 0;
}

.auth-link-row-right {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
  margin-bottom: 0;
}

/* Email display in step 2 */
.auth-email-display {
  margin-bottom: 20px;
  padding: 12px 16px;
  background-color: var(--color-bg-muted);
  border-radius: 8px;
  font-size: 14px;
  color: var(--color-text);
  font-family: 'Roboto', sans-serif;
}

.auth-email-display span {
  font-weight: 500;
  color: var(--color-text);
}

/* ============================================
   DIVIDER (for OAuth)
   ============================================ */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 24px 0 16px 0;
  gap: 16px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: var(--color-border);
}

.auth-divider-text {
  color: var(--color-text);
  font-size: 14px;
  font-weight: 400;
  text-transform: none;
  font-family: 'Roboto', sans-serif;
}

/* ============================================
   OAUTH BUTTONS
   ============================================ */
.auth-oauth-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 0;
  flex-wrap: wrap;
}

.auth-btn-oauth-square {
  width: 56px;
  height: 56px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 24px;
  background-color: var(--color-bg-surface);
  outline: none;
  position: relative;
  overflow: hidden;
}

.auth-btn-oauth-square:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: transparent;
}

.auth-btn-oauth-square:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.auth-btn-oauth-square:focus {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

/* Google button - white with colorful G */
.auth-btn-google {
  background-color: #FFFFFF;
  border-color: #DADCE0;
}

.auth-btn-google:hover:not(:disabled) {
  background-color: #F8F9FA;
  border-color: #4285F4;
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.25);
}

/* Google icon - colorful G */
.auth-google-icon {
  font-family: 'Google Sans', 'Roboto', sans-serif;
  font-size: 20px;
  font-weight: 500;
  background: linear-gradient(to bottom, #4285F4 0%, #4285F4 25%, #34A853 25%, #34A853 50%, #FBBC05 50%, #FBBC05 75%, #EA4335 75%, #EA4335 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  line-height: 1;
  letter-spacing: 0;
}

/* Microsoft button - white with colorful Windows logo */
.auth-btn-microsoft {
  background-color: #FFFFFF;
  border-color: #DADCE0;
  position: relative;
}

.auth-btn-microsoft:hover:not(:disabled) {
  background-color: #F8F9FA;
  border-color: #00A4EF;
  box-shadow: 0 4px 12px rgba(0, 164, 239, 0.25);
}

/* Microsoft logo using CSS (4 colored squares) */
.auth-microsoft-icon {
  display: block;
  width: 18px;
  height: 18px;
  position: relative;
  background: 
    linear-gradient(to right, #F25022 0%, #F25022 50%, #7FBA00 50%, #7FBA00 100%),
    linear-gradient(to right, #00A4EF 0%, #00A4EF 50%, #FFB900 50%, #FFB900 100%);
  background-size: 100% 50%;
  background-position: top, bottom;
  background-repeat: no-repeat;
  border-radius: 2px;
}

/* Apple button - black with white Apple logo */
.auth-btn-apple {
  background-color: #000000;
  border-color: #000000;
}

.auth-btn-apple:hover:not(:disabled) {
  background-color: #1A1A1A;
  border-color: #000000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Apple icon - white Apple logo using FontAwesome */
.auth-apple-icon {
  color: #FFFFFF;
  font-size: 20px;
  line-height: 1;
  display: inline-block;
}

/* Legacy button style (if still used elsewhere) */
.auth-btn-oauth {
  background-color: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  height: 40px;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  font-family: 'Roboto', sans-serif;
  border-radius: 4px;
}

.auth-btn-oauth:hover:not(:disabled) {
  background-color: var(--color-bg-muted);
  box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

.auth-btn-oauth:focus {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 2px;
}

.auth-btn-oauth i {
  font-size: 18px;
}

/* ============================================
   CAPTCHA
   ============================================ */
.auth-captcha-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}

.auth-captcha-image {
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background-color: var(--color-bg-surface);
  flex-shrink: 0;
  height: 48px;
  width: auto;
}

.auth-captcha-refresh {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 16px;
  padding: 4px;
  transition: color var(--motion-fast) var(--motion-ease);
  flex-shrink: 0;
  margin-top: 2px;
}

.auth-captcha-refresh:hover {
  color: var(--color-primary);
}

.auth-captcha-input-wrapper {
  flex: 1;
  min-width: 0;
}

.auth-captcha-input-wrapper .auth-input {
  margin-bottom: 0;
}

.auth-captcha-input-wrapper .auth-error-text {
  margin-top: 6px;
}

/* ============================================
   FOOTER
   ============================================ */
.auth-footer {
  text-align: center;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  font-size: 12px;
  color: var(--color-text-muted);
  font-family: 'Roboto', sans-serif;
  overflow-wrap: anywhere;
}

/* ============================================
   MOTION-FIRST ANIMATIONS
   ============================================ */
.reveal-up {
  animation: auth-reveal-up var(--motion-slow) var(--motion-ease) backwards;
}

@keyframes auth-reveal-up {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .auth-input:focus,
  .auth-btn-primary:hover:not(:disabled),
  .auth-btn-oauth:hover:not(:disabled) {
    transform: none;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.auth-text-center {
  text-align: center;
}

.auth-mt-1 { margin-top: var(--space-1); }
.auth-mt-2 { margin-top: var(--space-2); }
.auth-mt-3 { margin-top: var(--space-3); }
.auth-mt-4 { margin-top: var(--space-4); }
.auth-mt-6 { margin-top: var(--space-6); }

.auth-mb-1 { margin-bottom: var(--space-1); }
.auth-mb-2 { margin-bottom: var(--space-2); }
.auth-mb-3 { margin-bottom: var(--space-3); }
.auth-mb-4 { margin-bottom: var(--space-4); }
.auth-mb-6 { margin-bottom: var(--space-6); }

/* ============================================
   ORGANIZATION PICKER (if needed)
   ============================================ */
.auth-org-head {
  padding: var(--space-8) var(--space-8) var(--space-5);
}

.auth-org-list {
  padding: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  border-radius: 8px;
  margin: 8px 0;
  border: 1px solid var(--color-border);
  background-color: var(--color-bg-surface);
  outline: none;
}

.auth-org-list:hover,
.auth-org-list:focus {
  background-color: var(--color-bg-muted);
  border-color: var(--color-border-focus);
  outline: 2px solid var(--color-border-focus);
  outline-offset: -2px;
}

.auth-org-list.active {
  background-color: var(--color-bg-muted);
  border-color: var(--color-border-focus);
}

.auth-org-list:active {
  background-color: rgba(26, 115, 232, 0.08);
}

.auth-device-session-checkbox {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

.auth-session-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.45);
}

.auth-session-modal-overlay.is-open {
  display: block;
}

.auth-session-modal-overlay--fullscreen.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.auth-session-modal-panel {
  background: var(--color-bg-surface);
  width: min(920px, 92vw);
  margin: 6vh auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.auth-session-modal-panel--device-limit {
  width: min(720px, 94vw);
  max-width: 94vw;
  height: 90vh;
  max-height: 90vh;
  margin: 5vh auto;
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.auth-session-modal-panel--narrow {
  width: min(560px, 92vw);
  margin: 12vh auto;
}

.auth-session-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.auth-session-modal-header .modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text);
  font-family: var(--font-display);
}

.auth-session-modal-close {
  border: none;
  background: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text-muted);
}

.auth-session-modal-body {
  padding: var(--space-4);
}

.auth-session-modal-body--scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.auth-device-limit-banner {
  margin-bottom: var(--space-4);
  padding: var(--space-4);
  border-radius: 8px;
  border: 1px solid rgba(26, 115, 232, 0.24);
  background: rgba(26, 115, 232, 0.06);
  font-family: var(--font-body);
}

.auth-device-limit-banner-inner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.auth-device-limit-banner-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-bg-surface);
  color: var(--color-primary);
  font-size: 16px;
}

.auth-device-limit-banner-copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

.auth-device-limit-banner-title {
  display: block;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4286;
  color: var(--color-text);
  letter-spacing: 0.1px;
}

.auth-device-limit-banner-text {
  display: block;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.auth-device-limit-selection-hint {
  margin: 0 0 var(--space-3) 0;
  padding: var(--space-2) var(--space-3);
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4286;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  background: var(--color-bg-muted);
}

.auth-device-limit-selection-hint.is-complete {
  color: #137333;
  background: rgba(19, 115, 51, 0.08);
}

.auth-device-session-card .auth-device-session-card-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-device-session-card .auth-device-session-icon {
  background: var(--color-bg-muted);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  height: 48px;
  width: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.auth-device-session-card .auth-device-session-icon i {
  font-size: 20px;
  color: var(--color-text-muted);
}

.auth-device-session-card .auth-device-session-meta {
  flex: 1;
  min-width: 0;
}

.auth-device-session-card .auth-device-session-title {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text);
  font-family: var(--font-display);
}

.auth-device-session-card .auth-device-session-line {
  margin: 0 0 4px 0;
  font-size: 14px;
  color: var(--color-text-muted);
  font-family: var(--font-body);
}

.auth-device-session-card .auth-device-session-line:last-child {
  margin-bottom: 0;
}

.auth-device-session-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2px;
  font-family: var(--font-body);
}

.auth-device-session-badge--within-limit {
  color: var(--color-text-muted);
  background: var(--color-bg-muted);
  border: 1px solid var(--color-border);
}

.auth-device-session-badge--sign-out {
  color: var(--color-text);
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
}

.auth-device-session-card.auth-device-session-card--within-limit {
  border-color: var(--color-border);
  background: var(--color-bg-surface);
}

.auth-device-session-card.auth-device-session-card--sign-out-required {
  border-color: var(--color-border);
  background: var(--color-bg-muted);
}

.auth-device-session-card.is-selected {
  border-color: var(--color-border-focus);
  background: rgba(26, 115, 232, 0.04);
}

.auth-session-modal-panel--device-limit.auth-device-limit-modal--simple {
  width: min(480px, 94vw);
  height: auto;
  max-height: none;
  margin: auto;
}

.auth-session-modal-panel--device-limit.auth-device-limit-modal--simple .auth-session-modal-body {
  flex: none;
  padding: var(--space-6) var(--space-8) var(--space-4);
}

.auth-session-modal-panel--device-limit.auth-device-limit-modal--simple .auth-session-modal-body--scroll {
  overflow: visible;
}

.auth-session-modal-panel--device-limit.auth-device-limit-modal--simple .auth-device-limit-selection-hint,
.auth-session-modal-panel--device-limit.auth-device-limit-modal--simple #device-limit-multi-view,
.auth-session-modal-panel--device-limit.auth-device-limit-modal--simple #device-limit-continue-btn,
.auth-session-modal-panel--device-limit.auth-device-limit-modal--simple #device-limit-logout-all-btn {
  display: none !important;
}

.auth-session-modal-panel--device-limit.auth-device-limit-modal--simple #device-limit-simple-view {
  display: block !important;
}

.auth-session-modal-panel--device-limit.auth-device-limit-modal--simple #device-limit-sign-out-continue-btn {
  display: inline-flex;
}

.auth-device-limit-simple {
  text-align: center;
}

.auth-device-limit-simple-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-4);
  border-radius: 50%;
  background: rgba(26, 115, 232, 0.08);
  border: 1px solid rgba(26, 115, 232, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-device-limit-simple-icon i {
  font-size: 24px;
  color: var(--color-primary);
}

.auth-device-limit-simple-lead {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0 0 var(--space-4) 0;
  text-align: center;
  font-family: var(--font-body);
}

.auth-device-limit-simple-lead .auth-device-limit-banner-title {
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
}

.auth-device-limit-simple-lead .auth-device-limit-banner-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.auth-device-limit-simple-note {
  margin: var(--space-4) 0 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--color-text-muted);
  font-family: var(--font-body);
}

.auth-device-limit-simple-session .auth-device-session-card {
  margin: 0;
  cursor: default;
  text-align: left;
  pointer-events: none;
}

.auth-device-limit-simple-session .auth-device-session-card + .auth-device-session-card {
  margin-top: var(--space-2);
}

.auth-device-limit-simple-session .auth-device-session-card:hover,
.auth-device-limit-simple-session .auth-device-session-card:focus {
  outline: none;
  background-color: var(--color-bg-surface);
  border-color: var(--color-border);
}

.auth-session-modal-panel--device-limit .auth-session-modal-footer {
  flex-shrink: 0;
}

.auth-session-modal-panel--device-limit .auth-session-modal-header {
  flex-shrink: 0;
}

.auth-session-modal-intro {
  margin: 0 0 var(--space-3) 0;
  font-size: 14px;
  color: var(--color-text-muted);
  font-family: var(--font-body);
}

.auth-device-session-list {
  margin-top: var(--space-3);
}

.auth-session-modal-footer {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: 12px var(--space-4);
  border-top: 1px solid var(--color-border);
}

.auth-session-modal-footer .auth-btn {
  width: auto;
  min-width: 88px;
}

/* ============================================
   SUCCESS/LOADING STATES
   ============================================ */
.auth-status-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 300px;
  padding: 40px 0;
}

.auth-loader {
  width: 48px;
  height: 48px;
  border: 3px solid var(--color-bg-muted);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: auth-spin 0.8s linear infinite;
  margin-bottom: 24px;
}

.auth-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: #34A853;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px auto;
  animation: auth-scale-in 0.3s ease-out;
}

.auth-success-icon i {
  color: #FFFFFF;
  font-size: 32px;
}

@keyframes auth-scale-in {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.auth-status-title {
  font-size: 24px;
  font-weight: 400;
  color: var(--color-text);
  font-family: 'Google Sans', 'Roboto', sans-serif;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.auth-status-message {
  font-size: 16px;
  color: var(--color-text-muted);
  font-family: 'Roboto', sans-serif;
  margin: 0 0 32px 0;
  line-height: 1.5;
  max-width: 400px;
}

.auth-status-link {
  margin-top: 8px;
  font-size: 14px;
  color: var(--color-text-muted);
  font-family: 'Roboto', sans-serif;
}

.auth-status-link a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  font-family: 'Google Sans', 'Roboto', sans-serif;
}

.auth-status-link a:hover {
  text-decoration: underline;
}

/* ============================================
   ACCOUNT LINKING SECTION
   ============================================ */
.auth-account-linking-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 24px;
}

.auth-account-linking-actions .auth-btn {
  width: auto;
  min-width: 88px;
}

#account-linking-content {
  margin-top: 24px;
}

#account-linking-content > div {
  margin-bottom: 20px;
}

#account-linking-content > div:last-child {
  margin-bottom: 0;
}

@media (max-width: 480px) {
  .auth-status-container {
    min-height: 250px;
    padding: 32px 0;
  }
  
  .auth-account-linking-actions {
    flex-direction: column;
  }
  
  .auth-account-linking-actions .auth-btn {
    width: 100%;
  }
  
  .auth-account-linking-actions .auth-btn-secondary {
    margin-right: 0;
    margin-bottom: 8px;
  }
  
  .auth-loader {
    width: 40px;
    height: 40px;
    margin-bottom: 20px;
  }
  
  .auth-success-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px auto;
  }
  
  .auth-success-icon i {
    font-size: 28px;
  }
  
  .auth-status-title {
    font-size: 20px;
  }
  
  .auth-status-message {
    font-size: 14px;
    margin-bottom: 24px;
  }
}
