/* ============================================================
   GeoFrame – Modern Professional Design System
   Supports: Dark Mode (Default) & Light Mode with Theme Toggle
   ============================================================ */

/* ---------- CSS Variables: Dark Theme (Default) ---------- */
:root, [data-theme="dark"] {
  --bg-base:        #0c0f17;
  --bg-panel:       #121722;
  --bg-card:        #171e2c;
  --bg-card-hover:  #1c2536;
  --bg-card-subtle: #141b27;
  --bg-input:       #101520;
  --bg-input-focus: #141b29;
  
  --border:         rgba(255, 255, 255, 0.08);
  --border-hover:   rgba(59, 130, 246, 0.35);
  --border-focus:   #3b82f6;

  --primary:        #3b82f6;
  --primary-hover:  #2563eb;
  --primary-light:  rgba(59, 130, 246, 0.12);
  --primary-glow:   rgba(59, 130, 246, 0.25);

  --accent:         #10b981;
  --accent-hover:   #059669;
  --accent-light:   rgba(16, 185, 129, 0.12);

  --amber:          #f59e0b;
  --amber-hover:    #d97706;
  --amber-light:    rgba(245, 158, 11, 0.12);

  --red:            #ef4444;
  --red-hover:      #dc2626;
  --red-light:      rgba(239, 68, 68, 0.12);

  --green:          #22c55e;
  --yellow:         #eab308;

  --text-primary:   #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;

  --radius-sm:      8px;
  --radius-md:      12px;
  --radius-lg:      16px;
  --radius-xl:      20px;
  --radius-pill:    9999px;

  --shadow-sm:      0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md:      0 4px 12px rgba(0, 0, 0, 0.35), 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-lg:      0 12px 32px rgba(0, 0, 0, 0.45), 0 4px 12px rgba(0, 0, 0, 0.25);

  --header-bg:      rgba(18, 23, 34, 0.88);
  --browser-bar-bg: #141a27;
  --map-filter:     brightness(0.9) contrast(1.1);

  --transition:      0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --header-h:        58px;
  --font:            'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- CSS Variables: Light Theme ---------- */
[data-theme="light"] {
  --bg-base:        #f8fafc;
  --bg-panel:       #ffffff;
  --bg-card:        #ffffff;
  --bg-card-hover:  #f8fafc;
  --bg-card-subtle: #f1f5f9;
  --bg-input:       #f8fafc;
  --bg-input-focus: #ffffff;

  --border:         rgba(15, 23, 42, 0.08);
  --border-hover:   rgba(37, 99, 235, 0.3);
  --border-focus:   #2563eb;

  --primary:        #2563eb;
  --primary-hover:  #1d4ed8;
  --primary-light:  rgba(37, 99, 235, 0.08);
  --primary-glow:   rgba(37, 99, 235, 0.15);

  --accent:         #059669;
  --accent-hover:   #047857;
  --accent-light:   rgba(5, 150, 105, 0.08);

  --amber:          #d97706;
  --amber-hover:    #b45309;
  --amber-light:    rgba(217, 119, 6, 0.08);

  --red:            #dc2626;
  --red-hover:      #b91c1c;
  --red-light:      rgba(220, 38, 38, 0.08);

  --green:          #16a34a;
  --yellow:         #ca8a04;

  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;

  --shadow-sm:      0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md:      0 4px 12px rgba(15, 23, 42, 0.07), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg:      0 12px 32px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.04);

  --header-bg:      rgba(255, 255, 255, 0.9);
  --browser-bar-bg: #f1f5f9;
  --map-filter:     none;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  color-scheme: dark light;
}

body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

button {
  cursor: pointer;
  font-family: var(--font);
  border: none;
  background: none;
}

input, select {
  font-family: var(--font);
  border: none;
  outline: none;
  background: none;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ============================================================
   HEADER
============================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: background-color var(--transition-slow), border-color var(--transition-slow);
}

.header-inner {
  max-width: 1920px;
  margin: 0 auto;
  height: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px var(--primary-glow);
  overflow: hidden;
}

.logo-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.logo-text {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.header-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 600;
  transition: all var(--transition);
}

.theme-toggle-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.theme-toggle-btn svg {
  flex-shrink: 0;
  transition: transform var(--transition);
}

.theme-toggle-btn:hover svg {
  transform: rotate(15deg);
}

[data-theme="dark"] .theme-toggle-btn .moon-icon { display: none; }
[data-theme="dark"] .theme-toggle-btn .sun-icon  { display: block; color: #facc15; }

[data-theme="light"] .theme-toggle-btn .sun-icon  { display: none; }
[data-theme="light"] .theme-toggle-btn .moon-icon { display: block; color: var(--primary); }

/* PWA Install Button */
.pwa-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  border: none;
  color: #ffffff;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 700;
  transition: all var(--transition);
  box-shadow: 0 2px 8px var(--primary-glow);
}

.pwa-install-btn.hidden { display: none !important; }

.pwa-install-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--primary-glow);
}

/* Header Status Badge */
.header-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: var(--transition);
  flex-shrink: 0;
}

.badge-dot.active  { background: var(--green);  box-shadow: 0 0 8px var(--green); }
.badge-dot.loading { background: var(--yellow); box-shadow: 0 0 8px var(--yellow); animation: pulse-dot 1s infinite; }
.badge-dot.error   { background: var(--red);    box-shadow: 0 0 8px var(--red); }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.85); }
}

/* ============================================================
   MAIN LAYOUT
============================================================ */
.main-layout {
  margin-top: var(--header-h);
  display: grid;
  grid-template-columns: 390px 1fr;
  height: calc(100vh - var(--header-h));
  overflow: hidden;
}

.panel {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.panel-left {
  background: var(--bg-panel);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  padding: 16px 14px;
  gap: 12px;
  display: flex;
  flex-direction: column;
  transition: background-color var(--transition-slow), border-color var(--transition-slow);
}

.panel-right {
  background: var(--bg-base);
  padding: 12px;
  transition: background-color var(--transition-slow);
}

/* ============================================================
   CARDS & SIDEBAR ACCORDIONS
============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 15px;
  transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition-slow);
  box-shadow: var(--shadow-sm);
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.card-collapse-btn {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-inline-start: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition);
}

.card-collapse-btn:hover {
  color: var(--text-primary);
  background: var(--bg-card-subtle);
  border-color: var(--border-hover);
}

.card-collapse-icon {
  transition: transform 0.25s ease;
}

.card.is-collapsed .card-collapse-icon {
  transform: rotate(-90deg);
}

.card.is-collapsed .card-header {
  margin-bottom: 0;
}

.card.is-collapsed > .card-section-content {
  display: none;
}

.card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-icon svg {
  width: 18px;
  height: 18px;
}

.url-icon   { background: var(--primary-light); color: var(--primary); }
.queue-icon { background: var(--amber-light);   color: var(--amber); }
.map-icon   { background: var(--accent-light);  color: var(--accent); }
.fav-icon   { background: var(--amber-light);   color: var(--amber); }

.card-title    { font-size: 0.92rem; font-weight: 700; color: var(--text-primary); }
.card-subtitle { font-size: 0.72rem; color: var(--text-muted); margin-top: 1px; }

/* ============================================================
   URL INPUT & HISTORY
============================================================ */
.url-input-group {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.url-input {
  flex: 1;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  color: var(--text-primary);
  font-size: 0.83rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

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

.url-input:focus {
  border-color: var(--border-focus);
  background: var(--bg-input-focus);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.load-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
  transition: all var(--transition);
  box-shadow: 0 2px 6px var(--primary-glow);
}

.load-btn svg { width: 17px; height: 17px; }

.load-btn:hover {
  background: var(--primary-hover);
  transform: scale(1.04);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.load-btn:active { transform: scale(0.96); }

.url-error {
  margin-bottom: 10px;
  font-size: 0.74rem;
  color: var(--red);
  background: var(--red-light);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
}

.history-section {
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.history-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.history-clear-btn {
  font-size: 0.68rem;
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.history-clear-btn:hover {
  color: var(--red);
  background: var(--red-light);
  border-color: rgba(239, 68, 68, 0.3);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.history-empty {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  padding: 8px 0;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  text-align: right;
  width: 100%;
  transition: all var(--transition);
  cursor: pointer;
}

.history-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.history-favicon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.history-url {
  flex: 1;
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  direction: ltr;
}

.history-close {
  font-size: 0.65rem;
  color: var(--text-muted);
  flex-shrink: 0;
  padding: 2px 5px;
  border-radius: 4px;
  transition: all var(--transition);
}

.history-close:hover {
  color: var(--red);
  background: var(--red-light);
}

/* ============================================================
   QUEUE SECTION
============================================================ */
.queue-store-row {
  margin-bottom: 10px;
}

.queue-store-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 5px;
  font-weight: 600;
}

.queue-store-input {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  color: var(--text-primary);
  font-size: 0.83rem;
  transition: all var(--transition);
}

.queue-store-input:focus {
  border-color: var(--border-focus);
  background: var(--bg-input-focus);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.queue-count-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--amber-light);
  border: 1px solid rgba(245, 158, 11, 0.2);
  margin-bottom: 10px;
}

.queue-count-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.queue-count-val {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}

.queue-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.queue-btn {
  padding: 9px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 700;
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.queue-btn-primary {
  background: var(--primary-light);
  color: var(--primary);
  border-color: rgba(59, 130, 246, 0.25);
}

.queue-btn-primary:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.queue-btn-secondary {
  background: var(--bg-card-subtle);
  color: var(--text-secondary);
}

.queue-btn-secondary:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.queue-btn.loading {
  opacity: 0.6;
  pointer-events: none;
}

.queue-list-panel {
  margin-top: 10px;
  padding: 10px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border);
  max-height: 220px;
  overflow-y: auto;
}

.queue-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.queue-list-count {
  color: var(--amber);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.queue-waiting-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  margin: 0;
}

.queue-waiting-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.8rem;
}

.queue-ticket {
  min-width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--amber-light);
  color: var(--amber);
  font-weight: 800;
  font-size: 0.73rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.queue-name {
  flex: 1;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-empty {
  text-align: center;
  padding: 16px 8px;
  color: var(--text-muted);
  font-size: 0.76rem;
}

.queue-meta {
  margin-top: 6px;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
}

/* ============================================================
   MAP & LOCATION
============================================================ */
.map-wrapper {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}

#map {
  height: 250px;
  width: 100%;
  background: var(--bg-input);
  filter: var(--map-filter);
  transition: filter var(--transition-slow);
}

.map-overlay-hint {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-size: 0.68rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 5px;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.map-overlay-hint.hidden { opacity: 0; }

/* Leaflet Custom Overrides */
.leaflet-container {
  font-family: var(--font) !important;
}

.leaflet-control-zoom a,
.leaflet-control-layers-toggle {
  background-color: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-sm) !important;
}

.leaflet-control-zoom a:hover {
  background-color: var(--bg-card-hover) !important;
}

.leaflet-control-layers {
  background: var(--header-bg) !important;
  backdrop-filter: blur(12px) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
  color: var(--text-primary) !important;
  font-size: 0.74rem !important;
}

/* Map Locate Buttons */
.map-locate-btn {
  position: absolute;
  top: 10px;
  left: 50px;
  z-index: 1000;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.map-locate-btn:hover {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
}

/* Search Group */
.search-group {
  display: flex;
  gap: 7px;
  margin-bottom: 10px;
}

.search-input {
  flex: 1;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-primary);
  font-size: 0.79rem;
  transition: all var(--transition);
}

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

.search-input:focus {
  border-color: var(--accent);
  background: var(--bg-input-focus);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.search-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  border: 1px solid rgba(16, 185, 129, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  transition: all var(--transition);
}

.search-btn:hover {
  background: var(--accent);
  color: #ffffff;
}

.locate-me-btn {
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
}

.locate-me-btn:hover {
  background: var(--accent);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Coords Display */
.coords-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.coord-box {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  transition: all var(--transition);
}

.coord-box.has-value {
  border-color: rgba(16, 185, 129, 0.3);
  background: var(--accent-light);
}

.coord-label {
  display: block;
  font-size: 0.64rem;
  color: var(--text-muted);
  margin-bottom: 3px;
  font-weight: 600;
  text-transform: uppercase;
}

.coord-value {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.2px;
}

.copy-coords-btn {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 10px;
  transition: all var(--transition);
}

.copy-coords-btn:hover {
  background: var(--accent-light);
  color: var(--accent);
  border-color: rgba(16, 185, 129, 0.3);
}

/* Accuracy Slider */
.accuracy-section {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 10px;
}

.accuracy-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.accuracy-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.accuracy-value {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
}

.accuracy-slider {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  border-radius: var(--radius-pill);
  background: var(--border);
  cursor: pointer;
  margin-bottom: 4px;
}

.accuracy-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg-card);
  box-shadow: 0 1px 4px var(--primary-glow);
  cursor: pointer;
  transition: transform var(--transition);
}

.accuracy-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }

.accuracy-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.62rem;
  color: var(--text-muted);
}

/* Manual Coords Input */
.manual-coords {
  margin-bottom: 10px;
}

.manual-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 5px;
  font-weight: 600;
}

.manual-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 6px;
}

.manual-input {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  color: var(--text-primary);
  font-size: 0.78rem;
  transition: all var(--transition);
}

.manual-input::placeholder { color: var(--text-muted); font-size: 0.68rem; }
.manual-input:focus { border-color: var(--border-focus); background: var(--bg-input-focus); }

.apply-manual-btn {
  width: 100%;
  padding: 7px 12px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition);
}

.apply-manual-btn:hover {
  background: var(--primary-light);
  border-color: rgba(59, 130, 246, 0.3);
}

/* Device Identity Simulator */
.device-section {
  padding: 11px;
  border-radius: var(--radius-md);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

.device-header { margin-bottom: 8px; }

.device-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.device-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 8px;
}

.device-row {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.device-key {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.device-val {
  font-size: 0.76rem;
  color: var(--text-primary);
}

.device-val.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--primary);
}

.device-val.small { font-size: 0.66rem; line-height: 1.3; }

.reset-device-btn {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  transition: all var(--transition);
}

.reset-device-btn:hover {
  background: var(--primary-light);
  border-color: rgba(59, 130, 246, 0.3);
}

.device-hint {
  margin-top: 6px;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.4;
}

/* Inject Button */
.inject-section { text-align: center; }

.inject-btn {
  width: 100%;
  padding: 13px 18px;
  background: var(--primary);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition);
  box-shadow: 0 4px 14px var(--primary-glow);
  margin-bottom: 6px;
}

.inject-btn:disabled {
  background: var(--bg-card-subtle);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
}

.inject-btn:not(:disabled):hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.inject-btn:not(:disabled):active { transform: translateY(0); }

.inject-icon { font-size: 1.05rem; }

.inject-hint {
  font-size: 0.67rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================================
   FAVORITES
============================================================ */
.save-fav-btn {
  width: 100%;
  padding: 9px 12px;
  background: var(--amber-light);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-sm);
  color: var(--amber);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 10px;
}

.save-fav-btn:hover {
  background: var(--amber);
  color: #ffffff;
  transform: translateY(-1px);
}

.fav-form {
  background: var(--bg-card-subtle);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-bottom: 10px;
  animation: fadeIn 0.2s ease;
}

.fav-form.hidden { display: none; }

.fav-form-title {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--amber);
  margin-bottom: 6px;
}

.fav-input {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  color: var(--text-primary);
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.fav-input:focus {
  border-color: var(--amber);
  outline: none;
  box-shadow: 0 0 0 3px var(--amber-light);
}

.fav-form-coords {
  font-size: 0.66rem;
  color: var(--text-muted);
  direction: ltr;
  text-align: right;
  margin-bottom: 8px;
}

.fav-form-btns {
  display: flex;
  gap: 6px;
}

.fav-confirm-btn {
  flex: 1;
  background: var(--amber);
  color: #ffffff;
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  transition: all var(--transition);
}

.fav-confirm-btn:hover {
  background: var(--amber-hover);
}

.fav-cancel-btn {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 0.76rem;
  transition: all var(--transition);
}

.fav-cancel-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.fav-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 220px;
  overflow-y: auto;
}

.fav-item {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition);
}

.fav-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(245, 158, 11, 0.3);
  transform: translateX(-2px);
}

.fav-item-icon { font-size: 0.95rem; flex-shrink: 0; }
.fav-item-content { flex: 1; min-width: 0; }

.fav-item-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fav-item-coords {
  font-size: 0.65rem;
  color: var(--text-muted);
  direction: ltr;
  text-align: right;
  font-family: monospace;
}

.fav-item-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.fav-btn-action {
  background: transparent;
  color: var(--text-muted);
  border-radius: 4px;
  padding: 3px 5px;
  transition: all var(--transition);
}

.fav-btn-action:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.fav-btn-del:hover {
  color: var(--red);
  background: var(--red-light);
}

.fav-empty {
  text-align: center;
  padding: 14px 8px;
  background: var(--bg-card-subtle);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.74rem;
}

/* ============================================================
   RIGHT PANEL / BROWSER VIEWER
============================================================ */
.viewer-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

/* Browser Bar */
.browser-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  background: var(--browser-bar-bg);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  transition: background-color var(--transition-slow);
}

.browser-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition);
}

.dot:hover { transform: scale(1.15); filter: brightness(1.1); }
.dot-red    { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green  { background: #10b981; }

.browser-url-display {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 5px 16px;
  font-size: 0.73rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  direction: ltr;
  text-align: center;
}

.browser-url-display.loaded {
  color: var(--text-secondary);
}

.browser-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.ghost-dock-side-select {
  height: 30px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 0.72rem;
  max-width: 115px;
  cursor: pointer;
}

.action-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition);
}

.action-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: rgba(59, 130, 246, 0.3);
}

.action-btn-danger:hover {
  background: var(--red-light);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--red);
}

/* Location Badge Bar */
.location-badge-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  background: var(--bg-card-subtle);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.location-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.location-badge.active svg { color: var(--accent); }
.location-badge.active     { color: var(--accent); font-weight: 600; }

.badge-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
  transition: var(--transition);
}

.badge-pulse.active {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse-active 2s infinite;
}

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

.injection-status {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.injection-status.active {
  color: var(--green);
  font-weight: 600;
}

/* Iframe Container */
.iframe-container {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.site-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: #ffffff;
}

/* Loading Overlay */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 10;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
}

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

/* Empty State */
.empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.empty-icon {
  margin-bottom: 20px;
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.empty-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 440px;
}

.empty-steps {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.77rem;
  color: var(--text-secondary);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}

.step-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  color: #ffffff;
}

.step-arrow {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Status Bar */
.status-bar {
  padding: 5px 16px;
  background: var(--browser-bar-bg);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ============================================================
   FULLSCREEN & STEALTH MODE
============================================================ */
.viewer-card.is-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 999999 !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  margin: 0 !important;
  background: #000000 !important;
}

.viewer-card.is-fullscreen .browser-bar,
.viewer-card.is-fullscreen .location-badge-bar,
.viewer-card.is-fullscreen .status-bar {
  display: none !important;
}

.viewer-card.is-fullscreen .iframe-container {
  height: 100vh !important;
  width: 100vw !important;
  border-radius: 0 !important;
  background: #000000 !important;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y;
}

.viewer-card.is-fullscreen .site-frame {
  width: 100vw !important;
  height: 100vh !important;
  border: none !important;
  border-radius: 0 !important;
}

html.gf-fullscreen-lock,
html.gf-fullscreen-lock body {
  overflow: hidden !important;
  height: 100% !important;
  overscroll-behavior: none !important;
}

html.gf-fullscreen-lock body {
  position: fixed;
  width: 100%;
  left: 0;
  right: 0;
}

/* Fullscreen Ghost Dock */
.fullscreen-ghost-dock {
  position: fixed;
  top: 10px;
  right: 10px;
  left: auto;
  z-index: 1000002;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: rgba(10, 15, 25, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  opacity: 0.25;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

.fullscreen-ghost-dock:hover {
  opacity: 0.95;
  background: rgba(10, 15, 25, 0.88);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

.viewer-card.is-fullscreen .fullscreen-ghost-dock {
  display: flex;
}

.fullscreen-ghost-dock.dock-left  { left: 10px; right: auto; }
.fullscreen-ghost-dock.dock-right { right: 10px; left: auto; }

.fullscreen-ghost-dock.is-collapsed {
  gap: 0;
  opacity: 0.45;
}

.ghost-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.ghost-btn-queue {
  width: auto;
  min-width: 32px;
  gap: 4px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 700;
}

.ghost-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.1);
}

.ghost-btn-fp:hover {
  background: rgba(16, 185, 129, 0.4);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.45);
}

.ghost-btn-fp.rotating svg {
  animation: spin-fp 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes spin-fp {
  0%   { transform: rotate(0deg) scale(0.9); }
  50%  { transform: rotate(180deg) scale(1.2); }
  100% { transform: rotate(360deg) scale(1); }
}

.ghost-btn-exit:hover {
  background: var(--red);
  border-color: var(--red);
}

.fullscreen-dock-toggle-icon {
  transition: transform 0.3s ease;
}

.fullscreen-ghost-dock.is-collapsed .fullscreen-dock-toggle-icon {
  transform: rotate(180deg);
}

.fullscreen-ghost-dock.is-collapsed > .ghost-btn:not(.ghost-btn-dock-toggle) {
  flex: 0 0 0;
  width: 0;
  min-width: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

/* Fullscreen Queue Drawer */
.fullscreen-queue-window {
  display: none;
  position: fixed;
  top: 54px;
  right: 10px;
  z-index: 1000003;
  width: min(320px, calc(100vw - 20px));
  max-height: min(60vh, 480px);
  flex-direction: column;
  padding: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  background: rgba(14, 20, 32, 0.9);
  color: #ffffff;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.viewer-card.is-fullscreen .fullscreen-queue-window:not(.hidden) {
  display: flex;
}

.fullscreen-queue-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.7);
}

.fullscreen-queue-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* Pull to Refresh Zone */
.fullscreen-ptr-zone {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  z-index: 1000000;
  pointer-events: none;
}

.viewer-card.is-fullscreen .fullscreen-ptr-zone { display: block; }

.fullscreen-ptr-handle {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: min(140px, 36vw);
  height: 24px;
  border-radius: var(--radius-pill);
  pointer-events: auto;
  touch-action: none;
}

.fullscreen-ptr-indicator {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%) scale(0.6);
  opacity: 0;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(10, 15, 25, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: opacity 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}

.fullscreen-ptr-zone.is-pulling .fullscreen-ptr-indicator { opacity: 1; }
.fullscreen-ptr-zone.is-ready .fullscreen-ptr-indicator {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* Fullscreen Fingerprint Indicator Pill */
.fullscreen-fp-indicator {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%) translateY(-24px) scale(0.9);
  z-index: 1000005;
  background: rgba(16, 185, 129, 0.95);
  color: #ffffff;
  padding: 6px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 700;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.fullscreen-fp-indicator.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

/* Stealth Mode */
html.gf-stealth-mode .header,
html.gf-stealth-mode .panel-left {
  display: none !important;
}

html.gf-stealth-mode .main-layout {
  margin-top: 0 !important;
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: hidden !important;
}

html.gf-stealth-mode .panel-right {
  padding: 0 !important;
  height: 100vh !important;
}

html.gf-stealth-mode .viewer-card {
  border-radius: 0 !important;
}

html.gf-stealth-mode .loading-overlay {
  background: #000000 !important;
  backdrop-filter: none !important;
}

html.gf-stealth-mode .loading-spinner,
html.gf-stealth-mode .loading-text,
html.gf-stealth-mode .loading-sub {
  display: none !important;
}

html.gf-boot-pending .toast-container,
html.gf-stealth-mode .toast-container {
  display: none !important;
}

/* ============================================================
   TOAST NOTIFICATIONS
============================================================ */
.toast-container {
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  z-index: 9999;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 0.79rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: slide-up 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 220px;
  max-width: 340px;
}

.toast.success { border-color: rgba(16, 185, 129, 0.35); background: var(--bg-card); }
.toast.error   { border-color: rgba(239, 68, 68, 0.35); background: var(--bg-card); }
.toast.info    { border-color: rgba(59, 130, 246, 0.35); background: var(--bg-card); }

@keyframes slide-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   UTILITY & RESPONSIVE
============================================================ */
.hidden { display: none !important; }

@media (max-width: 960px) {
  .main-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    overflow-y: auto;
    height: auto;
  }
  .panel-left {
    height: auto;
    overflow-y: visible;
    border-left: none;
    border-bottom: 1px solid var(--border);
  }
  .panel-right {
    height: 65vh;
    padding: 8px;
  }
  .tagline { display: none; }
}
