/* ==========================================================================
   TRI-LUTIONS SOVEREIGN IDENTITY & SSO SDK — 2026 GLASSMORPHIC STYLES
   Authority: trilutions.com · Universal Web Component & SSO Modal
   ========================================================================== */
:root {
  --tl-bg-base: #09090b;
  --tl-card-bg: #11131a;
  --tl-card-border: rgba(255, 255, 255, 0.12);
  --tl-cyan: #06b6d4;
  --tl-cyan-glow: rgba(6, 182, 212, 0.45);
  --tl-teal: #0d9488;
  --tl-gold: #f59e0b;
  --tl-emerald: #10b981;
  --tl-rose: #f43f5e;
  --tl-text-primary: #f8fafc;
  --tl-text-muted: #94a3b8;
  --tl-font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --tl-font-heading: 'Outfit', 'Inter', system-ui, sans-serif;
  --tl-font-mono: 'JetBrains Mono', monospace;
}

/* User Pill Widget in Header / Nav */
.tl-auth-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--tl-card-border);
  padding: 6px 14px;
  border-radius: 9999px;
  color: var(--tl-text-primary);
  font-family: var(--tl-font-body);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  user-select: none;
  z-index: 1000;
}

.tl-auth-pill:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 0 0 20px var(--tl-cyan-glow);
  transform: translateY(-1px);
}

.tl-status-indicator {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--tl-emerald);
  box-shadow: 0 0 10px var(--tl-emerald);
  flex-shrink: 0;
  animation: tlPulse 2.4s infinite;
}

.tl-auth-pill-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.tl-auth-pill-name {
  font-weight: 700;
  color: #fff;
  font-size: 13px;
}

.tl-auth-pill-role {
  font-size: 10px;
  color: var(--tl-cyan);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.tl-auth-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(13, 148, 136, 0.3));
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: #fff;
  font-family: var(--tl-font-heading);
  font-weight: 700;
  font-size: 13px;
  padding: 7px 16px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(12px);
}

.tl-auth-login-btn:hover {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.4), rgba(13, 148, 136, 0.5));
  border-color: var(--tl-cyan);
  box-shadow: 0 0 20px var(--tl-cyan-glow);
}

/* Modal Overlay & Card */
.tl-auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.tl-auth-overlay.tl-active {
  opacity: 1;
  pointer-events: auto;
}

.tl-auth-modal {
  background: var(--tl-card-bg);
  border: 1px solid var(--tl-card-border);
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 35px rgba(6, 182, 212, 0.15);
  overflow: hidden;
  transform: scale(0.95) translateY(15px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.tl-auth-overlay.tl-active .tl-auth-modal {
  transform: scale(1) translateY(0);
}

.tl-modal-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  height: 200px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.25) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

.tl-modal-header {
  padding: 1.75rem 1.75rem 1rem;
  text-align: center;
  position: relative;
}

.tl-modal-logo {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.75rem;
  background: linear-gradient(135deg, #0d9488, #06b6d4);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.4);
}

.tl-modal-logo svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}

.tl-modal-title {
  font-family: var(--tl-font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.3rem;
  letter-spacing: -0.02em;
}

.tl-modal-subtitle {
  font-size: 0.85rem;
  color: var(--tl-text-muted);
  margin: 0;
  line-height: 1.4;
}

.tl-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--tl-text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
  font-size: 1rem;
}

.tl-modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.tl-modal-body {
  padding: 1.25rem 1.75rem 1.75rem;
}

.tl-form-group {
  margin-bottom: 1.1rem;
}

.tl-form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.45rem;
}

.tl-form-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 10px 14px;
  color: #fff;
  font-family: var(--tl-font-body);
  font-size: 0.92rem;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.tl-form-input:focus {
  outline: none;
  border-color: var(--tl-cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.25);
  background: rgba(15, 23, 42, 0.85);
}

.tl-btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #0284c7, #06b6d4);
  color: #fff;
  font-family: var(--tl-font-heading);
  font-weight: 700;
  font-size: 0.98rem;
  padding: 12px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.35);
  transition: all 0.2s ease;
  margin-top: 0.4rem;
}

.tl-btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.55);
  transform: translateY(-1px);
}

.tl-quick-switch-section {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tl-quick-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--tl-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  text-align: center;
}

.tl-account-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tl-account-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.tl-account-card:hover {
  background: rgba(6, 182, 212, 0.08);
  border-color: rgba(6, 182, 212, 0.4);
}

.tl-acc-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff;
}

.tl-acc-org {
  font-size: 0.74rem;
  color: var(--tl-text-muted);
}

.tl-acc-badge {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 9999px;
  background: rgba(6, 182, 212, 0.15);
  color: var(--tl-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.tl-acc-badge.owner {
  background: rgba(245, 158, 11, 0.15);
  color: var(--tl-gold);
  border-color: rgba(245, 158, 11, 0.3);
}

/* Waffle App Launcher in Drawer */
.tl-apps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 1rem;
}

.tl-app-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.18s ease;
}

.tl-app-tile:hover {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.4);
  transform: translateY(-1px);
}

.tl-app-icon {
  font-size: 1.25rem;
}

@keyframes tlPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
