/* NÚI TRÚC Motion Studio - Design System */
/* Inspired by NÚI TRÚC Intelligence Platform (Obsidian Navy & Mint Teal / Cyan Theme) */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Obsidian Midnight Navy Backgrounds (Matching NÚI TRÚC Intelligence Platform) */
  --bg-dark: #070b12;
  --bg-sidebar: #080e18;
  --bg-card: #0c1524;
  --bg-card-hover: #121e33;
  --bg-input: #080f1a;
  --bg-pill: #0a1220;
  
  /* Cool Slate/Navy Borders */
  --border-subtle: #162338;
  --border-highlight: #1f3454;
  --border-glow: rgba(45, 212, 191, 0.35);
  
  /* Signature Brand Mint-Teal & Cyan */
  --teal-primary: #14b8a6;
  --teal-mint: #2dd4bf;
  --teal-bright: #00dc94;
  --teal-glow: rgba(20, 184, 166, 0.2);
  --teal-glow-strong: rgba(45, 212, 191, 0.45);
  --teal-hover: #2dd4bf;
  --teal-dark: #042f2e;
  
  /* Backward-compatible emerald aliases */
  --emerald-primary: #14b8a6;
  --emerald-glow: rgba(20, 184, 166, 0.2);
  --emerald-glow-strong: rgba(45, 212, 191, 0.45);
  --emerald-hover: #2dd4bf;
  --emerald-dark: #042f2e;
  
  /* Accent Sky Cyan */
  --accent-cyan: #38bdf8;
  --accent-cyan-glow: rgba(56, 189, 248, 0.25);
  
  /* Typography */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-btn-dark: #022c22;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
  height: 100vh;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--border-highlight);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--teal-mint);
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Layout */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 270px;
  min-width: 270px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  z-index: 20;
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 18px 8px;
}

.brand-logo-img {
  height: 34px;
  width: auto;
  object-fit: contain;
}

.brand-text {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: #ffffff;
}

.brand-badge-ark {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.32);
  color: var(--teal-mint);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
}

.workspace-card {
  background: #0b1320;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 24px;
  transition: all 0.2s ease;
}

.workspace-card:hover {
  border-color: var(--border-highlight);
}

.workspace-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 4px;
}

.workspace-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-main);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--teal-mint);
  box-shadow: 0 0 10px var(--teal-mint);
  display: inline-block;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 7px rgba(45, 212, 191, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(45, 212, 191, 0); }
}

.nav-section-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 700;
  padding: 0 12px 10px 12px;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  border: 1px solid transparent;
}

.nav-item:hover {
  background-color: #0e1828;
  color: var(--text-main);
}

.nav-item.active {
  background-color: rgba(20, 184, 166, 0.12);
  color: var(--teal-mint);
  border: 1px solid rgba(45, 212, 191, 0.32);
  font-weight: 600;
}

.nav-item.active svg {
  color: var(--teal-mint);
  stroke: var(--teal-mint);
}

.nav-item svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.system-status-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--text-dim);
  background: #0b1320;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

/* Main Content Area */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: radial-gradient(circle at 50% 0%, rgba(20, 184, 166, 0.07) 0%, transparent 55%),
              radial-gradient(circle at 85% 85%, rgba(56, 189, 248, 0.04) 0%, transparent 50%),
              var(--bg-dark);
}

/* Header */
.top-header {
  height: 64px;
  min-height: 64px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(7, 11, 18, 0.75);
  backdrop-filter: blur(14px);
  z-index: 10;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.breadcrumb strong {
  color: var(--text-main);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  background: #0a1220;
  border: 1px solid #1a283e;
  color: #cbd5e1;
}

.vram-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(20, 184, 166, 0.1);
  border: 1px solid rgba(20, 184, 166, 0.3);
  color: var(--teal-mint);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.icon-btn:hover {
  border-color: var(--border-highlight);
  color: var(--text-main);
  background: var(--bg-card-hover);
}

.avatar-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  box-shadow: 0 0 14px rgba(20, 184, 166, 0.4);
}

/* Page Scrollable Area */
.content-body {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}

/* Typography & Hero (Matching NÚI TRÚC Intelligence Platform in image copy.png) */
.hero-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 99px;
  background: rgba(20, 184, 166, 0.1);
  border: 1px solid rgba(20, 184, 166, 0.3);
  color: var(--teal-mint);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hero-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 8px;
}

.hero-title {
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 10px;
  line-height: 1.25;
}

.hero-title-gradient {
  background: linear-gradient(135deg, #2dd4bf 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-desc {
  font-size: 0.98rem;
  color: var(--text-muted);
  max-width: 820px;
  line-height: 1.6;
  margin-bottom: 32px;
}

/* Feature Cards Grid */
.feature-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 28px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.12) 0%, transparent 70%);
  opacity: 0.8;
  pointer-events: none;
}

.feature-card:hover {
  border-color: rgba(45, 212, 191, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.6);
}

.feature-icon-wrapper {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal-mint);
  margin-bottom: 20px;
}

.feature-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}

.feature-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 18px;
}

.feature-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.feature-specs span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Primary Pill Button (Matching "Tra cứu & Phân tích ->" in image copy.png) */
.btn-primary-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #10b981 0%, #14b8a6 50%, #2dd4bf 100%);
  color: var(--text-btn-dark);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 12px 24px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  width: fit-content;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(20, 184, 166, 0.35);
}

.btn-primary-pill:hover {
  background: linear-gradient(135deg, #14b8a6 0%, #2dd4bf 100%);
  box-shadow: 0 6px 24px rgba(45, 212, 191, 0.55);
  transform: translateY(-1px) scale(1.01);
  color: #011d17;
}

.btn-secondary-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #0b1424;
  color: var(--text-main);
  border: 1px solid var(--border-highlight);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 12px 22px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary-pill:hover {
  background: #112036;
  border-color: var(--teal-mint);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(45, 212, 191, 0.2);
}

/* Stats Row */
.stats-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.stats-title-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.stats-link {
  font-size: 0.82rem;
  color: var(--teal-mint);
  text-decoration: none;
  cursor: pointer;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 20px 24px;
}

.stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.stat-subtext {
  font-size: 0.8rem;
  color: var(--teal-mint);
}

.stat-subtext.muted {
  color: var(--text-dim);
}

/* Quick Tasks / Inspiration Grid (Exact Style from image copy.png "Tác vụ thường dùng") */
.quick-tasks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.quick-tasks-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
}

.quick-tasks-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.quick-tasks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.quick-task-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 22px 20px;
  cursor: pointer;
  transition: all 0.22s ease;
  display: flex;
  flex-direction: column;
}

.quick-task-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(45, 212, 191, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -8px rgba(0, 0, 0, 0.5);
}

.quick-task-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal-mint);
  margin-bottom: 14px;
}

.quick-task-name {
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.quick-task-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Studio Editor Layout (T2V & I2V) */
.studio-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  height: calc(100% - 10px);
}

.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.panel-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.prompt-textarea {
  width: 100%;
  height: 120px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 14px;
  color: #ffffff;
  font-size: 0.92rem;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: all 0.2s;
}

.prompt-textarea:focus {
  border-color: var(--teal-mint);
  box-shadow: 0 0 12px var(--teal-glow);
}

.enhance-btn {
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.32);
  color: var(--teal-mint);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.enhance-btn:hover {
  background: rgba(20, 184, 166, 0.22);
}

/* Resolution Pills */
.res-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.res-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: all 0.2s;
}

.res-btn.active {
  background: rgba(20, 184, 166, 0.12);
  border-color: var(--teal-mint);
  color: #ffffff;
}

.res-title {
  font-weight: 700;
  font-size: 0.88rem;
}

.res-desc {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Model Parameter Tune Box */
.vram-tune-box {
  background: #0a1220;
  border: 1px solid #16253c;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 22px;
}

.vram-tune-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.badge-8gb {
  background: rgba(20, 184, 166, 0.12);
  color: var(--teal-mint);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(20, 184, 166, 0.32);
}

.settings-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  font-size: 0.8rem;
}

.setting-col label {
  color: var(--text-dim);
  font-size: 0.72rem;
  display: block;
  margin-bottom: 4px;
}

.setting-select, .setting-input {
  width: 100%;
  background: #080f1a;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
  outline: none;
  transition: border-color 0.15s;
}

.setting-select:focus, .setting-input:focus {
  border-color: var(--teal-mint);
}

/* Image Upload Area */
.dropzone {
  border: 2px dashed #1d334e;
  background: var(--bg-input);
  border-radius: 14px;
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.dropzone:hover {
  border-color: var(--teal-mint);
  background: #0b1424;
}

.dropzone-preview {
  max-height: 220px;
  width: 100%;
  object-fit: contain;
  border-radius: 8px;
}

/* Preview / Player Panel */
.preview-panel {
  display: flex;
  flex-direction: column;
}

.video-player-container {
  flex: 1;
  background: #060b13;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
}

.player-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 480px;
}

.placeholder-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  text-align: center;
  padding: 20px;
}

/* Progress / Rendering State */
.rendering-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 11, 19, 0.94);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  z-index: 15;
}

.progress-bar-wrapper {
  width: 100%;
  max-width: 420px;
  height: 8px;
  background: #111d2e;
  border-radius: 99px;
  overflow: hidden;
  margin-top: 18px;
  margin-bottom: 12px;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10b981 0%, #14b8a6 50%, #2dd4bf 100%);
  box-shadow: 0 0 14px var(--teal-mint);
  transition: width 0.3s ease;
}

.vram-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(20, 184, 166, 0.12);
  color: var(--teal-mint);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 12px;
  border: 1px solid rgba(20, 184, 166, 0.28);
}

/* Tab Panels */
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

/* Command Snippet Box */
.terminal-box {
  background: #080f1a;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 14px 18px;
  color: #38bdf8;
  font-size: 0.82rem;
  overflow-x: auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.gallery-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s;
}

.gallery-card:hover {
  border-color: rgba(45, 212, 191, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -8px rgba(0, 0, 0, 0.5);
}

.gallery-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: #000000;
  cursor: pointer;
}

.gallery-info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #0b1524;
  border: 1px solid var(--teal-mint);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 0.88rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.25s ease forwards;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Access Key Authentication Overlay & Modal */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 14, 0.96);
  backdrop-filter: blur(16px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-modal {
  background: radial-gradient(circle at 50% 0%, rgba(20, 184, 166, 0.12) 0%, transparent 70%), #0a1220;
  border: 1px solid var(--border-highlight);
  border-radius: 22px;
  width: 100%;
  max-width: 440px;
  padding: 36px 32px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 40px rgba(20, 184, 166, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.auth-icon-badge {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal-mint);
  margin-bottom: 20px;
}

.auth-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.auth-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 24px;
}

.auth-input-wrapper {
  width: 100%;
  margin-bottom: 16px;
  position: relative;
}

.auth-input {
  width: 100%;
  background: #080f1a;
  border: 1px solid var(--border-highlight);
  border-radius: 12px;
  padding: 14px 16px;
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  text-align: center;
  letter-spacing: 0.08em;
  outline: none;
  transition: all 0.2s;
}

.auth-input:focus {
  border-color: var(--teal-mint);
  box-shadow: 0 0 15px var(--teal-glow);
}

.auth-error {
  color: #f87171;
  font-size: 0.8rem;
  margin-bottom: 16px;
  display: none;
}

.auth-footer-note {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 18px;
  line-height: 1.4;
}

/* Key Pill in Header */
.key-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(20, 184, 166, 0.1);
  border: 1px solid rgba(20, 184, 166, 0.28);
  color: var(--teal-mint);
  cursor: pointer;
  transition: all 0.2s;
}

.key-pill:hover {
  background: rgba(20, 184, 166, 0.18);
}

/* Compact Corner Key Widget in Header */
.corner-key-widget {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #080f1a;
  border: 1px solid var(--border-highlight);
  border-radius: 20px;
  padding: 4px 10px;
  transition: all 0.25s ease;
  position: relative;
}

.corner-key-widget:hover, .corner-key-widget:focus-within {
  border-color: var(--teal-mint);
  box-shadow: 0 0 12px var(--teal-glow);
}

.corner-key-widget.shake {
  animation: keyShake 0.4s ease-in-out;
  border-color: #ef4444 !important;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.4) !important;
}

@keyframes keyShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.corner-key-icon {
  color: var(--teal-mint);
  display: flex;
  align-items: center;
  justify-content: center;
}

.corner-key-input {
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  width: 145px;
  letter-spacing: 0.05em;
  transition: width 0.2s ease;
}

.corner-key-input:focus {
  width: 175px;
}

.corner-key-input::placeholder {
  color: #64748b;
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: normal;
}

.corner-key-action {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border-radius: 4px;
  transition: color 0.15s;
}

.corner-key-action:hover {
  color: var(--text-main);
}

.corner-key-save-btn {
  color: var(--teal-mint);
}

.corner-key-save-btn:hover {
  color: #ffffff;
}

.corner-key-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
  display: inline-block;
  margin-left: 2px;
  transition: all 0.3s ease;
}

.corner-key-dot.verified {
  background: var(--teal-mint);
  box-shadow: 0 0 8px var(--teal-mint);
}

.corner-key-dot.invalid {
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
}
