/* ==========================================================================
   INALIVE Global Header Design System & Auto-Hide Stylesheet
   All-App Shared Navigation Bar (Portal Hub / inaliveTrade / autodocsAI)
   ========================================================================== */

:root {
  --inalive-gh-height: 56px;
  --inalive-gh-offset: 56px;
  --inalive-gh-bg: rgba(10, 14, 23, 0.88);
  --inalive-gh-border: rgba(255, 255, 255, 0.08);
  --inalive-gh-glow: rgba(99, 102, 241, 0.15);
  --inalive-gh-text-main: #f3f4f6;
  --inalive-gh-text-sub: #9ca3af;
  --inalive-gh-accent: #6366f1;
  --inalive-gh-accent-hover: #818cf8;
}

/* Header Container */
.inalive-gh-wrap {
  position: relative;
  width: 100%;
  z-index: 9999;
  flex-shrink: 0;
  transition: margin-top 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.inalive-gh-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--inalive-gh-height);
  padding: 0 20px;
  background: var(--inalive-gh-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--inalive-gh-border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), inset 0 -1px 0 rgba(255, 255, 255, 0.05);
  box-sizing: border-box;
  user-select: none;
}

/* Auto-Hide Collapsed State */
.inalive-gh-wrap.gh-collapsed {
  margin-top: calc(-1 * var(--inalive-gh-height));
}

/* Handle Tab (Reveals Header when collapsed) */
.inalive-gh-handle {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 12px;
  background: var(--inalive-gh-bg);
  border: 1px solid var(--inalive-gh-border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, background 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.inalive-gh-wrap.gh-collapsed .inalive-gh-handle {
  opacity: 0.85;
  pointer-events: auto;
}

.inalive-gh-handle:hover {
  opacity: 1 !important;
  background: rgba(30, 41, 59, 0.95);
  transform: translateX(-50%) translateY(2px);
}

.inalive-gh-handle-pill {
  width: 28px;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  transition: background 0.2s ease;
}

.inalive-gh-handle:hover .inalive-gh-handle-pill {
  background: var(--inalive-gh-accent-hover);
}

/* Left Brand & App Switcher */
.inalive-gh-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.inalive-gh-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--inalive-gh-text-main);
  font-weight: 700;
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  transition: opacity 0.2s ease;
}

.inalive-gh-brand:hover {
  opacity: 0.9;
}

.inalive-gh-logo {
  height: 28px;
  width: auto;
  object-fit: contain;
}

.inalive-gh-brand-pill {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 2px 8px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(168, 85, 247, 0.25));
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #c084fc;
  border-radius: 12px;
}

.inalive-gh-sep {
  color: rgba(255, 255, 255, 0.2);
  font-size: 14px;
  font-weight: 300;
}

/* App Switcher Dropdown Trigger */
.inalive-gh-switcher-wrap {
  position: relative;
}

.inalive-gh-switcher-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--inalive-gh-text-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.inalive-gh-switcher-btn:hover,
.inalive-gh-switcher-wrap.active .inalive-gh-switcher-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.inalive-gh-app-tag {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.inalive-gh-arrow {
  font-size: 10px;
  color: var(--inalive-gh-text-sub);
  transition: transform 0.2s ease;
}

.inalive-gh-switcher-wrap.active .inalive-gh-arrow {
  transform: rotate(180deg);
}

/* App Launcher Dropdown */
.inalive-gh-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 310px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(99, 102, 241, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10000;
}

.inalive-gh-switcher-wrap.active .inalive-gh-dropdown,
.inalive-gh-user-wrap.active .inalive-gh-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.inalive-gh-dropdown-head {
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11px;
  font-weight: 700;
  color: var(--inalive-gh-text-sub);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.inalive-gh-app-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.inalive-gh-app-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--inalive-gh-text-main);
  transition: background 0.15s ease;
}

.inalive-gh-app-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.inalive-gh-app-item.current {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.inalive-gh-app-icon {
  font-size: 20px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.inalive-gh-app-meta {
  display: flex;
  flex-direction: column;
}

.inalive-gh-app-name {
  font-size: 13px;
  font-weight: 600;
}

.inalive-gh-app-desc {
  font-size: 11px;
  color: var(--inalive-gh-text-sub);
}

/* Right User & Actions */
.inalive-gh-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.inalive-gh-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  transition: all 0.2s ease;
}

.inalive-gh-login-btn:hover {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.inalive-gh-user-wrap {
  position: relative;
}

.inalive-gh-user-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.inalive-gh-user-btn:hover,
.inalive-gh-user-wrap.active .inalive-gh-user-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.inalive-gh-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #1e293b;
}

.inalive-gh-username {
  font-size: 13px;
  font-weight: 600;
  color: var(--inalive-gh-text-main);
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inalive-gh-pro-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border-radius: 4px;
}

/* User Menu Dropdown */
.inalive-gh-user-dropdown,
.inalive-gh-user-wrap .user-dropdown-menu {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  left: auto !important;
  width: 250px !important;
  background: #0f172a !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
  padding: 12px !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(99, 102, 241, 0.1) !important;
  display: flex !important;
  flex-direction: column !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(-8px) !important;
  pointer-events: none !important;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s !important;
  z-index: 100000 !important;
}

.inalive-gh-user-wrap.active .inalive-gh-user-dropdown,
.inalive-gh-user-wrap.active .user-dropdown-menu,
.inalive-gh-user-wrap .user-dropdown-menu.active,
.inalive-gh-user-dropdown.active,
.user-dropdown-menu.active {
  display: flex !important;
  flex-direction: column !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}

.inalive-gh-user-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.inalive-gh-user-avatar-large {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(99, 102, 241, 0.4);
}

.inalive-gh-user-info-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.inalive-gh-user-full-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inalive-gh-user-email {
  font-size: 11px;
  color: var(--inalive-gh-text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inalive-gh-user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--inalive-gh-text-main);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
  box-sizing: border-box;
}

.inalive-gh-user-menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.inalive-gh-user-menu-item.logout {
  color: #ef4444;
}

.inalive-gh-user-menu-item.logout:hover {
  background: rgba(239, 68, 68, 0.12);
}

/* ==========================================================================
   INALIVE Header Actions & Gemini AI Engine Suite
   ========================================================================== */
.inalive-gh-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* AI Status Badge */
.header-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: #34d399;
  white-space: nowrap;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

/* Gemini Model Selector */
.model-select-container {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.select-model {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f3f4f6;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  padding: 5px 10px;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
  max-width: 220px;
}

.select-model:hover,
.select-model:focus {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.select-model optgroup {
  background: #0f172a;
  color: #94a3b8;
  font-weight: 700;
}

.select-model option {
  background: #0f172a;
  color: #f3f4f6;
}

/* Action Buttons (General Header Button) */
.btn-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn-header:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

/* BYOK API Key Button */
.btn-api-key-header {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
  color: #f59e0b;
}

.btn-api-key-header:hover {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.6);
}

.btn-api-key-header.configured {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.08);
  color: #34d399;
}

.btn-api-key-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.btn-api-key-badge.configured {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

/* Metrics Trigger */
.btn-metrics-header {
  border-color: rgba(56, 189, 248, 0.3);
  color: #38bdf8;
}

.metrics-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 6px #38bdf8;
}

/* Language Selector Pill */
.lang-selector-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 2px;
  gap: 2px;
  position: relative;
  z-index: 100;
  pointer-events: auto !important;
}

.btn-lang-choice {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer !important;
  pointer-events: auto !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.btn-lang-choice:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f3f4f6;
}

.btn-lang-choice.active {
  background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   INALIVE Authentic Modal Design System (Shared Across All Apps)
   ========================================================================== */
.modal-backdrop,
.inalive-gh-modal-backdrop {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  box-sizing: border-box;
}

.modal-backdrop.active,
.inalive-gh-modal-backdrop.active {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.modal-box,
.modal-card,
.inalive-gh-modal-card {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  padding: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  color: #f1f5f9;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header,
.inalive-gh-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.modal-title,
.inalive-gh-modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-close,
.modal-close-btn,
.inalive-gh-modal-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: all 0.15s ease;
}
.btn-close:hover,
.modal-close-btn:hover,
.inalive-gh-modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-tip-box {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-size: 0.825rem;
  color: #c7d2fe;
  line-height: 1.5;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.825rem;
  font-weight: 600;
  color: #94a3b8;
}

.input-text,
.inalive-gh-modal-input {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  color: #f1f5f9;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}
.input-text:focus,
.inalive-gh-modal-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.api-key-input-row {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
}

.api-key-input-row .input-text,
.api-key-input-row .inalive-gh-modal-input {
  padding-right: 42px;
}

.btn-toggle-visibility {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
  opacity: 0.65;
  transition: all 0.2s ease;
}

.btn-toggle-visibility:hover {
  opacity: 1;
}

.api-key-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.85rem;
  padding: 0.65rem 0.85rem;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.key-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  background: #334155;
  color: #cbd5e1;
}

.status-badge.valid {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.status-badge.invalid {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.status-detail {
  font-size: 0.8rem;
  color: #94a3b8;
}

.btn-test-connection {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-test-connection:hover {
  background: rgba(99, 102, 241, 0.3);
  color: #fff;
  border-color: rgba(99, 102, 241, 0.7);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #fff;
  border-color: rgba(239, 68, 68, 0.7);
}

.btn-send {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-send:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

/* Status Dot States */
.status-dot.generating {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
  animation: inalive-pulse 1.2s infinite ease-in-out;
}

.status-dot.error {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}

@keyframes inalive-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

/* Auth Protected Helper */
.auth-protected.hidden,
.inalive-gh-bar .auth-protected.hidden,
.inalive-gh-sep.auth-protected.hidden,
.inalive-gh-switcher-wrap.auth-protected.hidden,
.header-status-badge.auth-protected.hidden,
.model-select-container.auth-protected.hidden,
.btn-api-key-header.auth-protected.hidden,
#btnOpenApiKeyModal.hidden,
button#btnOpenApiKeyModal.hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

.inalive-gh-sep.auth-protected {
  display: inline;
}

.inalive-gh-switcher-wrap.auth-protected {
  display: flex;
}

.header-status-badge.auth-protected {
  display: inline-flex;
}

.model-select-container.auth-protected {
  display: inline-flex;
}

.btn-api-key-header.auth-protected {
  display: inline-flex;
}

/* ==========================================================================
   INALIVE Global Common Footer (全ページ共通コンポーネント)
   ========================================================================== */
.portal-footer-section {
  text-align: center;
  padding: 36px 20px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: #64748b;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  background: rgba(10, 14, 23, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: relative;
  z-index: 10;
  width: 100%;
  box-sizing: border-box;
}

.portal-footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.portal-footer-links a {
  color: #94a3b8;
  text-decoration: none;
  font-weight: 500;
  font-size: 12px;
  transition: color 0.18s ease, transform 0.18s ease;
  padding: 2px 4px;
  border-radius: 4px;
}

.portal-footer-links a:hover {
  color: #f8fafc;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 現在のアクティブページハイライト */
.portal-footer-links a.current,
.portal-footer-links a.active {
  color: #818cf8 !important;
  font-weight: 600;
  border-bottom: 2px solid #6366f1;
}

.portal-footer-copy {
  color: #475569;
  font-size: 11px;
  letter-spacing: 0.02em;
}



