/* ==============================================================================
   FeedPulse - Modern Glassmorphism Telegram Mini App Stylesheet
   Designed for maximum aesthetic WOW factor, seamless Telegram theming & fluid mobile UX
   ============================================================================== */

:root {
  /* Color Tokens */
  --bg-dark: #080c14;
  --bg-card: rgba(18, 25, 42, 0.75);
  --bg-card-hover: rgba(26, 36, 60, 0.85);
  --bg-input: rgba(11, 16, 28, 0.8);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #00d2ff;
  --border-card: rgba(255, 255, 255, 0.06);

  /* Brand Accents */
  --cyan-primary: #00d2ff;
  --cyan-glow: rgba(0, 210, 255, 0.35);
  --purple-accent: #8b5cf6;
  --purple-glow: rgba(139, 92, 246, 0.3);
  --green-success: #10b981;
  --green-glow: rgba(16, 185, 129, 0.3);
  --amber-warning: #f59e0b;
  --amber-glow: rgba(245, 158, 11, 0.3);
  --rose-danger: #f43f5e;
  --rose-glow: rgba(244, 63, 94, 0.3);

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Elevation & Blur */
  --glass-blur: blur(20px);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--border-card);
  --shadow-glow: 0 0 25px var(--cyan-glow);

  /* Layout */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --safe-bottom: env(safe-area-inset-bottom, 16px);
}

/* Telegram Native Theme Overrides (if present) */
body.tg-theme {
  --bg-dark: var(--tg-theme-bg-color, #080c14);
  --text-main: var(--tg-theme-text-color, #f1f5f9);
  --text-muted: var(--tg-theme-hint-color, #94a3b8);
  --cyan-primary: var(--tg-theme-button-color, #00d2ff);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Background Glow */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

.glow-1 {
  width: 320px;
  height: 320px;
  top: -80px;
  left: -80px;
  background: radial-gradient(circle, var(--cyan-primary), transparent 70%);
}

.glow-2 {
  width: 380px;
  height: 380px;
  bottom: 10%;
  right: -100px;
  background: radial-gradient(circle, var(--purple-accent), transparent 70%);
}

.glow-3 {
  width: 260px;
  height: 260px;
  top: 40%;
  left: 20%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.3), transparent 70%);
  opacity: 0.25;
}

/* App Container */
.app-container {
  position: relative;
  z-index: 1;
  max-width: 820px;
  margin: 0 auto;
  padding: 14px 16px calc(var(--safe-bottom) + 30px);
}

/* Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 16px;
  gap: 12px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  font-size: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.2), rgba(139, 92, 246, 0.25));
  border: 1px solid rgba(0, 210, 255, 0.3);
  box-shadow: 0 4px 16px rgba(0, 210, 255, 0.2);
  animation: floatIcon 4s ease-in-out infinite;
}

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

.brand-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 40%, var(--cyan-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.live-beacon {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--green-success);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background-color: var(--green-success);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--green-success);
  animation: pulseBeacon 2s infinite;
}

@keyframes pulseBeacon {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

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

.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: var(--glass-blur);
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: var(--bg-card-hover);
  border-color: var(--cyan-primary);
  box-shadow: 0 0 14px var(--cyan-glow);
  transform: translateY(-1px);
}

.btn-icon .icon {
  width: 16px;
  height: 16px;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 5px 12px 5px 6px;
  border-radius: var(--radius-full);
  backdrop-filter: var(--glass-blur);
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan-primary), var(--purple-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.user-name {
  font-size: 12px;
  font-weight: 700;
  max-width: 90px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role-badge {
  font-size: 9px;
  color: var(--cyan-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Stats Ribbon */
.stats-ribbon {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, border-color 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
}

.stat-icon {
  font-size: 18px;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
}

.stat-data {
  display: flex;
  flex-direction: column;
}

.stat-val {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
}

.stat-title {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 5px;
  margin-bottom: 20px;
  backdrop-filter: var(--glass-blur);
  gap: 4px;
  position: sticky;
  top: 10px;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 8px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.25), rgba(139, 92, 246, 0.25));
  color: #fff;
  border: 1px solid rgba(0, 210, 255, 0.4);
  box-shadow: 0 4px 16px rgba(0, 210, 255, 0.25);
}

.tab-btn .badge {
  font-size: 10px;
  background: var(--cyan-primary);
  color: #000;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  line-height: 1.2;
}

/* View Panels */
.view-panel {
  display: none;
  animation: fadeInPanel 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.view-panel.active {
  display: block;
}

@keyframes fadeInPanel {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Glassmorphism Card Style */
.card-glass {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-card);
  padding: 20px;
}

/* Toolbar & Filters */
.toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 220px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-box input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 10px 36px 10px 40px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-main);
  transition: all 0.2s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--cyan-primary);
  box-shadow: 0 0 12px var(--cyan-glow);
}

.search-icon {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  color: var(--text-dim);
  pointer-events: none;
}

.search-clear {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
}

.filter-controls {
  display: flex;
  gap: 8px;
}

.dropdown-filter {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
}

.dropdown-filter:focus {
  border-color: var(--cyan-primary);
}

.btn-refresh {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-refresh:hover {
  border-color: var(--cyan-primary);
  color: var(--cyan-primary);
  transform: rotate(30deg);
}

.btn-refresh .icon {
  width: 16px;
  height: 16px;
}

/* Feeds Grid & Feed Card */
.feeds-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feed-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-card);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.feed-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--green-success);
  transition: background-color 0.2s;
}

.feed-card.paused::before {
  background: var(--amber-warning);
}

.feed-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
}

.feed-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.feed-title-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feed-id-badge {
  font-size: 11px;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--cyan-primary);
}

.feed-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
}

.feed-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.feed-status-badge.active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.feed-status-badge.paused {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber-warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.feed-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.meta-chip.chip-inc {
  color: var(--cyan-primary);
  border-color: rgba(0, 210, 255, 0.25);
  background: rgba(0, 210, 255, 0.08);
}

.meta-chip.chip-exc {
  color: var(--rose-danger);
  border-color: rgba(244, 63, 94, 0.25);
  background: rgba(244, 63, 94, 0.08);
}

.feed-url-row {
  font-size: 12px;
  color: var(--text-dim);
  font-family: monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(0, 0, 0, 0.25);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.feed-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  font-family: var(--font-body);
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan-primary), #0099ff);
  color: #000;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 210, 255, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(0, 210, 255, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-subtle);
  color: var(--text-main);
}

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

.btn-danger-ghost {
  background: transparent;
  color: var(--rose-danger);
  border: 1px solid rgba(244, 63, 94, 0.2);
}

.btn-danger-ghost:hover {
  background: rgba(244, 63, 94, 0.15);
  border-color: var(--rose-danger);
}

.btn-lg {
  padding: 12px 24px;
  font-size: 15px;
  border-radius: var(--radius-md);
  width: 100%;
  justify-content: center;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  backdrop-filter: var(--glass-blur);
}

.empty-icon {
  font-size: 42px;
  margin-bottom: 6px;
}

.empty-state h3 {
  font-family: var(--font-heading);
  font-size: 18px;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 13px;
  max-width: 320px;
}

/* Forms & Inputs */
.form-header {
  margin-bottom: 20px;
}

.form-header h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  margin-bottom: 4px;
}

.form-header p {
  font-size: 13px;
  color: var(--text-muted);
}

.feed-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.form-group label .required {
  color: var(--cyan-primary);
}

.form-group label .optional {
  color: var(--text-dim);
  font-weight: 400;
  font-size: 11px;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group select {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 14px;
  transition: all 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--cyan-primary);
  box-shadow: 0 0 12px var(--cyan-glow);
}

.input-with-action {
  display: flex;
  gap: 8px;
}

.input-with-action input {
  flex: 1;
}

.field-hint {
  font-size: 11px;
  color: var(--text-dim);
}

.field-hint code {
  color: var(--cyan-primary);
}

/* Preset Chips */
.presets-container {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.preset-chip {
  background: rgba(0, 210, 255, 0.08);
  border: 1px solid rgba(0, 210, 255, 0.25);
  color: var(--cyan-primary);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s;
}

.preset-chip:hover {
  background: rgba(0, 210, 255, 0.2);
  transform: translateY(-1px);
}

.preset-chip.chip-danger {
  background: rgba(244, 63, 94, 0.08);
  border-color: rgba(244, 63, 94, 0.25);
  color: var(--rose-danger);
}

.preset-chip.chip-danger:hover {
  background: rgba(244, 63, 94, 0.2);
}

/* Tag Inputs */
.tag-input-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  min-height: 42px;
}

.tag-input-container:focus-within {
  border-color: var(--cyan-primary);
  box-shadow: 0 0 12px var(--cyan-glow);
}

.tag-input-container.tag-input-danger:focus-within {
  border-color: var(--rose-danger);
  box-shadow: 0 0 12px var(--rose-glow);
}

.tag-input-container input {
  border: none !important;
  background: transparent !important;
  padding: 4px 0 !important;
  box-shadow: none !important;
  outline: none !important;
  flex: 1;
  min-width: 140px;
  font-size: 13px;
  color: var(--text-main);
}

.tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 210, 255, 0.15);
  border: 1px solid rgba(0, 210, 255, 0.3);
  color: var(--cyan-primary);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.tag-badge-danger {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.3);
  color: var(--rose-danger);
}

.tag-remove {
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  opacity: 0.7;
}

.tag-remove:hover {
  opacity: 1;
}

/* Form Rows & Multi-Columns */
.form-row {
  display: flex;
  gap: 12px;
}

.col-half {
  flex: 1;
}

.size-input-group {
  display: flex;
  gap: 6px;
}

.size-input-group input {
  flex: 1;
}

.size-input-group select {
  width: 75px;
}

.toggle-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Switch Component */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider::before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider.round {
  border-radius: 24px;
}

.slider.round::before {
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--cyan-primary);
  border-color: var(--cyan-primary);
}

input:checked + .slider::before {
  transform: translateX(20px);
  background-color: #000;
}

/* Live Inspector Styles */
.inspect-header-card {
  margin-bottom: 16px;
}

.inspect-header-card h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  margin-bottom: 4px;
}

.inspect-header-card p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.inspect-search-bar {
  display: flex;
  gap: 8px;
}

.inspect-search-bar input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-main);
  outline: none;
  font-size: 13px;
}

.inspect-search-bar input:focus {
  border-color: var(--cyan-primary);
}

.inspect-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inspect-item-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s;
}

.inspect-item-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}

.item-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.item-meta-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11px;
}

.item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Settings View */
.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title-row h3 {
  font-family: var(--font-heading);
  font-size: 17px;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.setting-text strong {
  display: block;
  font-size: 14px;
}

.setting-text span {
  font-size: 12px;
  color: var(--text-muted);
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.info-key {
  color: var(--text-muted);
}

.info-val {
  font-weight: 600;
}

.info-val.code {
  font-family: monospace;
  color: var(--cyan-primary);
}

.badge-success {
  color: var(--green-success);
  font-weight: 700;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  width: 100%;
  max-width: 520px;
  animation: scaleModal 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes scaleModal {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

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

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

/* Toast Notification System */
.toast-container {
  position: fixed;
  bottom: calc(var(--safe-bottom) + 20px);
  right: 20px;
  left: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  margin: 0 auto;
  max-width: 440px;
  width: 100%;
  background: rgba(18, 25, 42, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(16px);
  animation: slideToast 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.toast.toast-success {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 20px var(--green-glow);
}

.toast.toast-error {
  border-color: rgba(244, 63, 94, 0.4);
  box-shadow: 0 0 20px var(--rose-glow);
}

.toast-msg {
  font-size: 13px;
  font-weight: 500;
  flex: 1;
}

/* Loading Spinner */
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--cyan-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 10px;
}

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

.loading-state {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

/* Responsive Tweaks */
@media (max-width: 580px) {
  .stats-ribbon {
    grid-template-columns: repeat(2, 1fr);
  }

  .btn-label-desktop {
    display: none;
  }

  .form-row {
    flex-direction: column;
    gap: 16px;
  }
}
