/* MODERN GLASSMORPHISM DESIGN SYSTEM */

:root {
  /* Color Palette - Premium Space Dark */
  --bg-base: #080b11;
  --bg-gradient: linear-gradient(135deg, #070a13 0%, #0d1222 100%);
  --panel-bg: rgba(13, 18, 34, 0.45);
  --glass-bg: rgba(255, 255, 255, 0.02);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-border-hover: rgba(255, 255, 255, 0.12);
  --glass-border-focus: rgba(99, 102, 241, 0.5);
  
  --fg-main: #f9fafb;
  --fg-muted: #9ca3af;
  --fg-dim: #6b7280;
  
  /* Primary Brand - Neon Indigo & Violet */
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.25);
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --primary-gradient-hover: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  
  /* System States */
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.15);
  --error: #f43f5e;
  --error-glow: rgba(244, 63, 94, 0.15);
  
  /* Border Radius */
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

body {
  background: var(--bg-gradient);
  background-color: var(--bg-base);
  color: var(--fg-main);
  font-family: var(--font-sans);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* App Grid Layout */
.uplink-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* Panel Containers */
.console-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--panel-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--glass-border);
  overflow-y: auto;
}

.preview-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: rgba(7, 10, 19, 0.3);
  overflow-y: auto;
}

/* Headers */
.panel-header {
  height: 70px;
  min-height: 70px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--glass-border);
  background-color: rgba(13, 18, 34, 0.2);
  z-index: 10;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 16px;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
  box-shadow: 0 0 10px var(--success);
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 5px var(--success)); }
  50% { opacity: .4; filter: drop-shadow(0 0 1px var(--success)); }
}

.node-ver, .preview-mode {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--fg-dim);
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
}

/* User Session HUD */
.user-hud {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-main);
}

.sign-out-link, .admin-link {
  font-size: 10px;
  color: var(--fg-muted);
  text-decoration: none;
  font-weight: 500;
}

.sign-out-link:hover {
  color: var(--error);
  text-decoration: underline;
}

.admin-link {
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background-color: rgba(99, 102, 241, 0.06);
  font-weight: 600;
  transition: all 0.2s;
}

.admin-link:hover {
  background-color: rgba(99, 102, 241, 0.12);
  border-color: var(--glass-border-focus);
  transform: translateY(-1px);
}

/* Console Form */
.console-form {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 32px;
  gap: 32px;
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.flex-grow {
  flex-grow: 1;
}

.section-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-main);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0.95;
}

.section-title i, .section-title svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.word-count {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--fg-dim);
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Inputs & Form Controls */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.input-group label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-muted);
}

.label-hint {
  font-size: 10px;
  color: var(--fg-dim);
  font-family: var(--font-sans);
}

.input-group input {
  width: 100%;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-main);
  background-color: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.input-group input:hover {
  border-color: var(--glass-border-hover);
}

.input-group input:focus {
  border-color: var(--primary);
  background-color: rgba(255, 255, 255, 0.03);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.textarea-wrapper {
  flex-grow: 1;
  display: flex;
  min-height: 320px;
}

textarea#content {
  width: 100%;
  height: 100%;
  flex-grow: 1;
  padding: 24px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--fg-main);
  background-color: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  outline: none;
  resize: none;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
}

textarea#content:hover {
  border-color: var(--glass-border-hover);
}

textarea#content:focus {
  border-color: var(--primary);
  background-color: rgba(255, 255, 255, 0.03);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

/* Terms Checkbox Row */
.terms-checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}

.terms-checkbox-wrapper input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.terms-label {
  font-size: 13px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--fg-muted);
}

.terms-label a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.terms-label a:hover {
  text-decoration: underline;
}

/* Honeypot Security Field */
.honeypot-container {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  height: 0;
  width: 0;
  z-index: -1;
  overflow: hidden;
}

/* CAPTCHA Styles */
.security-challenge {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.challenge-fallback {
  display: none;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-muted);
}

.mini-input {
  width: 70px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background-color: rgba(255, 255, 255, 0.02);
  color: var(--fg-main);
  text-align: center;
  outline: none;
}

.mini-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Footer Control Bar */
.console-footer {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  background-color: rgba(13, 18, 34, 0.25);
  border-top: 1px solid var(--glass-border);
}

.submit-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.draft-indicator {
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}

.draft-indicator i, .draft-indicator svg {
  width: 14px;
  height: 14px;
}

.draft-indicator.saving {
  color: var(--primary);
}

.draft-indicator.saving i, .draft-indicator.saving svg {
  animation: spin 1s linear infinite;
}

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

/* Buttons (Modern Gradient Glow) */
.brutal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--fg-main);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  text-decoration: none;
}

.brutal-btn.primary {
  background: var(--primary-gradient);
  border: none;
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.brutal-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: var(--glass-border-hover);
  transform: translateY(-2px);
}

.brutal-btn.primary:hover {
  background: var(--primary-gradient-hover);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.brutal-btn:active {
  transform: translateY(0);
}

.brutal-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Preview Viewport */
.preview-viewport {
  flex-grow: 1;
  padding: 48px 56px;
  overflow-y: auto;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.preview-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  word-wrap: break-word;
  background: linear-gradient(to right, #ffffff, #d1d5db);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-muted);
  margin-bottom: 32px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-item i, .meta-item svg {
  width: 14px;
  height: 14px;
  color: var(--primary);
}

.preview-divider {
  border: 0;
  border-top: 1px solid var(--glass-border);
  margin-bottom: 40px;
}

/* Markdown Reading Area */
.markdown-body {
  font-size: 16px;
  line-height: 1.8;
  color: rgba(243, 244, 246, 0.9);
}

.markdown-body p {
  margin-bottom: 24px;
}

.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: #ffffff;
  margin-top: 40px;
  margin-bottom: 20px;
  line-height: 1.3;
}

.markdown-body h1 { font-size: 26px; }
.markdown-body h2 { font-size: 22px; border-bottom: 1px solid var(--glass-border); padding-bottom: 8px; }
.markdown-body h3 { font-size: 18px; }

.markdown-body blockquote {
  margin: 32px 0;
  padding: 20px 24px;
  background-color: rgba(255, 255, 255, 0.015);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  border-top: 1px solid var(--glass-border);
  border-right: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

.markdown-body ul, .markdown-body ol {
  margin-bottom: 24px;
  padding-left: 28px;
}

.markdown-body li {
  margin-bottom: 8px;
}

.markdown-body code {
  font-family: var(--font-mono);
  font-size: 13px;
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  color: #e2e8f0;
}

.markdown-body pre {
  margin: 32px 0;
  padding: 24px;
  background-color: rgba(3, 7, 18, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--shadow-md);
}

.markdown-body pre code {
  background-color: transparent;
  border: 0;
  padding: 0;
  border-radius: 0;
  color: inherit;
}

.markdown-body a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px dotted var(--primary);
}

.markdown-body a:hover {
  color: #8b5cf6;
  border-bottom-style: solid;
}

.preview-placeholder {
  opacity: 0.3;
  font-size: 13px;
  text-align: center;
  padding: 120px 0;
  letter-spacing: 0.05em;
}

/* Auth Gate Panels */
.auth-gate-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100vw;
  padding: 24px;
}

.auth-gate-card {
  width: 100%;
  max-width: 500px;
  background-color: var(--panel-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.gate-header {
  padding: 20px 32px;
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: rgba(255, 255, 255, 0.01);
  border-bottom: 1px solid var(--glass-border);
}

.gate-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

.gate-body {
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;
}

.gate-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background-color: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.gate-icon i, .gate-icon svg {
  width: 32px;
  height: 32px;
  color: var(--primary);
}

.gate-body h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
}

.gate-body p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg-muted);
}

.terms-summary {
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.terms-summary h3 {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-muted);
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 6px;
}

.terms-summary p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--fg-dim);
}

/* Modals & Dialogs (Glassmorphic Glow Alerts) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(4, 7, 17, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.active {
  display: flex;
}

.brutal-modal {
  background-color: rgba(13, 18, 34, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: popIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.policy-modal {
  max-width: 650px;
}

@keyframes popIn {
  0% { transform: scale(0.95); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 20px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--glass-border);
}

.modal-title-text {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--fg-muted);
}

.modal-close {
  background: none;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-muted);
}

.modal-close:hover {
  color: #ffffff;
}

.modal-body {
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
  background-color: transparent;
}

.policy-text {
  max-height: 400px;
  overflow-y: auto;
  align-items: flex-start !important;
  text-align: left !important;
  gap: 20px !important;
  padding: 32px;
}

.policy-text h3 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.policy-text p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--fg-muted);
}

.modal-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--glass-border);
  background-color: rgba(255, 255, 255, 0.01);
}

.modal-icon-wrapper.success {
  background-color: rgba(16, 185, 129, 0.06);
  border-color: var(--success);
  color: var(--success);
  box-shadow: 0 0 16px var(--success-glow);
}

.modal-icon-wrapper.error {
  background-color: rgba(244, 63, 94, 0.06);
  border-color: var(--error);
  color: var(--error);
  box-shadow: 0 0 16px var(--error-glow);
}

.modal-icon {
  width: 28px;
  height: 28px;
}

.modal-message {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--fg-main);
}

.modal-footer {
  padding: 20px 28px;
  border-top: 1px solid var(--glass-border);
  background-color: rgba(255, 255, 255, 0.01);
}

.w-full {
  width: 100%;
}

.text-center {
  text-align: center;
}

/* Micro-animations */
.icon-spin-hover:hover {
  animation: spin 2.5s linear infinite;
}

/* Admin Dashboard layout styles */
.admin-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100vw;
  background: var(--bg-gradient);
}

.admin-main {
  flex-grow: 1;
  overflow-y: auto;
  padding: 48px 32px;
}

.admin-container {
  max-width: 950px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.admin-intro {
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 24px;
}

.admin-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(to right, #ffffff, #e5e7eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.admin-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg-muted);
}

.admin-stats-bar {
  border-bottom: 1px solid var(--glass-border);
  padding: 32px 0;
  margin-bottom: 40px;
}

.stat-card {
  background-color: var(--panel-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}

.stat-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
}

.logs-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.log-item-card {
  background-color: var(--panel-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  padding: 32px;
  gap: 20px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.log-item-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-lg);
}

.log-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.log-item-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 8px;
}

.log-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 11px;
  font-weight: 500;
  color: var(--fg-muted);
}

.log-item-meta a {
  color: var(--primary);
  text-decoration: none;
}

.log-item-meta a:hover {
  text-decoration: underline;
}

.log-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  letter-spacing: 0.02em;
}

.log-badge.staged {
  background-color: rgba(99, 102, 241, 0.08);
  border-color: var(--glass-border-focus);
  color: var(--primary);
}

.log-badge.live {
  background-color: rgba(16, 185, 129, 0.08);
  border-color: var(--success);
  color: var(--success);
}

.log-item-body {
  border-top: 1px solid var(--glass-border);
  padding-top: 20px;
}

.log-item-excerpt {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(243, 244, 246, 0.85);
}

.log-item-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  border-top: 1px solid var(--glass-border);
  padding-top: 20px;
}

.loading-state, .no-logs-state {
  padding: 64px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-muted);
  border-radius: var(--radius-lg);
  background-color: var(--panel-bg);
  border: 1px solid var(--glass-border);
}

.loading-state i, .loading-state svg {
  vertical-align: middle;
  margin-right: 10px;
  color: var(--primary);
}

.no-logs-state {
  background-color: rgba(255, 255, 255, 0.005);
}

.pb-6 { padding-bottom: 24px; }
.py-6 { padding-top: 24px; padding-bottom: 24px; }
.my-6 { margin-top: 24px; margin-bottom: 24px; }
.mb-6 { margin-bottom: 24px; }

/* Responsive styles */
@media (max-width: 900px) {
  body {
    overflow: auto;
    height: auto;
  }
  .uplink-grid {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }
  .console-panel {
    border-right: 0;
    border-bottom: 1px solid var(--glass-border);
    height: auto;
    overflow: visible;
  }
  .preview-panel {
    height: auto;
    overflow: visible;
  }
  .preview-viewport {
    padding: 40px 24px;
  }
  .textarea-wrapper {
    min-height: 400px;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* GLOBAL SCROLLABLE OVERRIDE */
body.scrollable {
  overflow: auto;
  height: auto;
}

/* GLOBAL HEADER & FOOTER LAYOUTS */
.global-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background-color: rgba(13, 18, 34, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 100;
  display: flex;
  justify-content: center;
  width: 100%;
}

.header-container {
  max-width: 1200px;
  width: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.desktop-nav a {
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.desktop-nav a:hover {
  color: var(--fg-main);
  background-color: rgba(255, 255, 255, 0.04);
}

.desktop-nav a.active {
  color: #ffffff;
  background-color: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--glass-border);
  background-color: rgba(255, 255, 255, 0.02);
  color: var(--fg-main);
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
}

.mobile-menu-toggle svg {
  width: 18px;
  height: 18px;
}

.mobile-menu-toggle:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Mobile Nav Drawer */
.mobile-nav {
  display: none;
  position: absolute;
  top: 70px;
  left: 0;
  right: 0;
  background-color: rgba(13, 18, 34, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 16px 24px;
  flex-direction: column;
  gap: 12px;
  z-index: 99;
}

.mobile-nav.active {
  display: flex;
}

.mobile-nav a {
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  display: block;
}

.mobile-nav a:hover, .mobile-nav a.active {
  color: #ffffff;
  background-color: rgba(99, 102, 241, 0.1);
}

/* Global Footer Styles */
.global-footer {
  background-color: rgba(7, 10, 19, 0.45);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
  padding: 64px 24px 48px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-container {
  max-width: 1200px;
  width: 100%;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  text-transform: lowercase;
  color: var(--fg-main);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.footer-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg-muted);
  max-width: 420px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: 10px;
}

.footer-links a {
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-muted);
  transition: color 0.2s;
}

.footer-links a:hover, .footer-links a.active {
  color: var(--primary);
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.policy-links {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.policy-links a {
  text-decoration: none;
  color: var(--fg-muted);
  font-weight: 500;
}

.policy-links a:hover {
  color: var(--fg-main);
  text-decoration: underline;
}

.policy-links .separator {
  color: var(--fg-dim);
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background-color: rgba(255, 255, 255, 0.01);
  color: var(--fg-muted);
  transition: all 0.2s;
}

.footer-socials a:hover {
  color: var(--fg-main);
  border-color: var(--primary);
  background-color: rgba(99, 102, 241, 0.05);
  transform: translateY(-2px);
}

.footer-bottom {
  max-width: 1200px;
  width: 100%;
  border-top: 1px solid var(--glass-border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-dim);
}

/* Readable Content Layout (Terms & Privacy) */
.page-wrapper {
  flex-grow: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 70px);
}

.container-readable {
  max-width: 750px;
  width: 100%;
  margin: 64px auto 96px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.article-header {
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.article-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(to right, #ffffff, #d1d5db);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.article-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.article-body {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(243, 244, 246, 0.85);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin-top: 24px;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 8px;
}

.article-body p strong {
  color: #ffffff;
}

.article-body ul {
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* User actions hud formatting in header */
.user-hud .user-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 10px;
  font-family: var(--font-mono);
  margin-top: 2px;
}

.user-hud .admin-link {
  padding: 2px 6px;
  font-size: 9px;
}

@media (max-width: 900px) {
  .desktop-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
  .footer-container {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-right {
    align-items: flex-start;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
}

