:root {
  --bg-main: #0c0e14;
  --bg-card: #141721;
  --bg-card-hover: #1b2030;
  --bg-panel: #10131d;
  --bg-input: #1a1e2d;
  --bg-input-focus: #21273a;
  
  --border-subtle: #242b3d;
  --border-medium: #313b52;
  --border-active: #3b82f6;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-faint: #64748b;

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

  --ubuntu-orange: #e95420;
  --ubuntu-orange-hover: #d34311;
  --ubuntu-light: rgba(233, 84, 32, 0.18);

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

  --danger: #ef4444;
  --danger-hover: #dc2626;
  --danger-light: rgba(239, 68, 68, 0.15);

  --warning: #f59e0b;
  --warning-light: rgba(245, 158, 11, 0.15);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'Fira Code', ui-monospace, SFMono-Regular, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  height: 100vh;
  overflow: hidden;
}

/* App Container */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
}

/* HEADER */
.app-header {
  height: 64px;
  background-color: var(--bg-panel);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
  flex-shrink: 0;
}

.header-left, .header-center, .header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

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

.logo-icon {
  width: 34px;
  height: 34px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  transition: background 0.3s, box-shadow 0.3s;
}

body[data-theme-env="ubuntu"] .logo-icon {
  background: var(--ubuntu-orange);
  box-shadow: 0 4px 12px rgba(233, 84, 32, 0.35);
}

.logo-text {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-text h1 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.version-tag {
  font-size: 0.7rem;
  background: var(--border-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* OS TOGGLE GROUP (HYBRID WINDOWS / UBUNTU) */
.os-toggle-group {
  display: inline-flex;
  background-color: var(--bg-input);
  border: 1px solid var(--border-medium);
  border-radius: 24px;
  padding: 3px;
  gap: 2px;
}

.os-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: 20px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.os-toggle-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.os-toggle-btn.active#btnEnvWindows {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.os-toggle-btn.active#btnEnvUbuntu {
  background: var(--ubuntu-orange);
  color: #fff;
  box-shadow: 0 2px 8px rgba(233, 84, 32, 0.4);
}

.os-icon {
  font-size: 1rem;
  line-height: 1;
}

/* PRESET SELECTOR */
.preset-selector-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.select-icon {
  position: absolute;
  left: 10px;
  font-size: 14px;
  pointer-events: none;
}

.select-wrapper select, .shell-select {
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 12px 6px 32px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.select-wrapper select:focus, .shell-select:focus {
  border-color: var(--border-active);
  background-color: var(--bg-input-focus);
}

.shell-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shell-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.shell-select {
  padding-left: 10px;
}

/* CWD BADGE */
.cwd-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  cursor: pointer;
  max-width: 420px;
  transition: all 0.2s ease;
}

.cwd-badge:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-medium);
}

.cwd-path {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.cwd-edit-hint {
  font-size: 0.7rem;
  background: var(--border-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* STATUS BADGE */
.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--warning);
  transition: background-color 0.3s;
}

.status-indicator.online .status-dot {
  background-color: var(--success);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.status-indicator.offline .status-dot {
  background-color: var(--danger);
}

/* QUICK RUNNER SECTION */
.quick-runner-section {
  padding: 14px 24px;
  background-color: var(--bg-panel);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.quick-runner-card {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 4px 6px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.quick-runner-card:focus-within {
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

body[data-theme-env="ubuntu"] .quick-runner-card:focus-within {
  border-color: var(--ubuntu-orange);
  box-shadow: 0 0 0 3px rgba(233, 84, 32, 0.2);
}

.quick-runner-prefix {
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
}

.env-tag-badge {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--primary-light);
  color: #60a5fa;
  font-weight: 700;
  letter-spacing: 0.03em;
}

body[data-theme-env="ubuntu"] .env-tag-badge {
  background: var(--ubuntu-light);
  color: #fb923c;
}

.terminal-prompt-symbol {
  color: var(--text-faint);
}

.quick-runner-input-wrap {
  flex: 1;
}

.quick-runner-input-wrap input {
  width: 100%;
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  padding: 8px 4px;
  outline: none;
}

.quick-runner-input-wrap input::placeholder {
  color: var(--text-faint);
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

.quick-runner-actions {
  display: flex;
  gap: 8px;
}

/* BUTTON STYLES */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.78rem;
}

.btn-primary {
  background-color: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background-color: var(--primary-hover);
}

body[data-theme-env="ubuntu"] .btn-primary {
  background-color: var(--ubuntu-orange);
}
body[data-theme-env="ubuntu"] .btn-primary:hover {
  background-color: var(--ubuntu-orange-hover);
}

.btn-secondary {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}
.btn-secondary:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-medium);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border-medium);
  color: var(--text-main);
}
.btn-outline:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--text-muted);
}

.btn-success {
  background-color: var(--success);
  color: #fff;
}
.btn-success:hover {
  background-color: var(--success-hover);
}

.btn-danger {
  background-color: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  background-color: var(--danger-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
}
.btn-ghost:hover {
  background: var(--bg-card);
  color: var(--text-main);
}
.btn-ghost.active {
  background: var(--bg-input);
  color: var(--primary);
  border-color: var(--border-subtle);
}

body[data-theme-env="ubuntu"] .btn-ghost.active {
  color: var(--ubuntu-orange);
}

.full-width {
  width: 100%;
}

/* MAIN WORKSPACE LAYOUT */
.app-main {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  flex: 1;
  overflow: hidden;
}

/* COMMANDS SECTION */
.commands-section {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-subtle);
  background-color: var(--bg-main);
  overflow: hidden;
}

.section-toolbar {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  flex-wrap: wrap;
}

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

.search-box svg {
  position: absolute;
  left: 10px;
  color: var(--text-faint);
}

.search-box input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 12px 6px 32px;
  color: var(--text-main);
  font-size: 0.85rem;
  outline: none;
  transition: all 0.2s ease;
}

.search-box input:focus {
  border-color: var(--border-active);
  background: var(--bg-input-focus);
}

body[data-theme-env="ubuntu"] .search-box input:focus {
  border-color: var(--ubuntu-orange);
}

.category-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.chip {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.chip:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.chip.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: #fff;
}

body[data-theme-env="ubuntu"] .chip.active {
  background: var(--ubuntu-light);
  border-color: var(--ubuntu-orange);
}

/* COMMANDS GRID */
.commands-grid {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  align-content: start;
}

.command-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.command-card:hover {
  border-color: var(--border-medium);
  background: var(--bg-card-hover);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

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

.command-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.command-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.command-category-tag {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tag-emerald { background: var(--success-light); color: #34d399; }
.tag-blue    { background: var(--primary-light); color: #60a5fa; }
.tag-purple  { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.tag-amber   { background: var(--warning-light); color: #fbbf24; }
.tag-cyan    { background: rgba(6, 182, 212, 0.15); color: #22d3ee; }
.tag-rose    { background: var(--danger-light); color: #f87171; }

.command-actions-menu {
  display: flex;
  gap: 4px;
  opacity: 0.4;
  transition: opacity 0.2s;
}

.command-card:hover .command-actions-menu {
  opacity: 1;
}

.btn-card-action {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-card-action:hover {
  background: var(--bg-input);
  color: #fff;
}

.command-code-box {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.command-description {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.command-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

.btn-run-command {
  flex: 1;
  background: var(--bg-panel);
  border: 1px solid var(--border-medium);
  color: #fff;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-run-command:hover {
  background: var(--primary);
  border-color: var(--primary);
}

body[data-theme-env="ubuntu"] .btn-run-command:hover {
  background: var(--ubuntu-orange);
  border-color: var(--ubuntu-orange);
}

.btn-run-command:active {
  transform: scale(0.98);
}

/* EMPTY STATE */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
  gap: 12px;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 8px;
}

.empty-state h3 {
  color: #fff;
  font-size: 1.1rem;
}

/* TERMINAL SECTION */
.terminal-section {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-panel);
  overflow: hidden;
}

.terminal-header {
  height: 48px;
  background-color: #0b0d12;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
}

.terminal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.process-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: #60a5fa;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

body[data-theme-env="ubuntu"] .process-badge {
  background: var(--ubuntu-light);
  color: #fb923c;
  border-color: rgba(233, 84, 32, 0.4);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #60a5fa;
  animation: pulse 1.2s infinite ease-in-out;
}

body[data-theme-env="ubuntu"] .pulse-dot {
  background-color: #fb923c;
}

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

.terminal-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.terminal-body {
  flex: 1;
  background-color: #090a0f;
  padding: 14px 18px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.55;
  color: #e2e8f0;
}

.terminal-welcome {
  margin-bottom: 12px;
}

.terminal-output {
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0;
  font-family: inherit;
}

.terminal-stdin-bar {
  background-color: #0d1017;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  padding: 6px 12px;
  gap: 8px;
  flex-shrink: 0;
}

.stdin-label {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--primary);
}

body[data-theme-env="ubuntu"] .stdin-label {
  color: var(--ubuntu-orange);
}

.terminal-stdin-bar input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  outline: none;
}

/* TERMINAL LOG HIGHLIGHTS */
.log-cmd-header {
  color: #38bdf8;
  font-weight: 600;
  border-bottom: 1px dashed #1e293b;
  padding: 6px 0;
  margin: 8px 0;
  display: block;
}

.log-cmd-header-ubuntu {
  color: #fb923c;
}

.log-exit-success {
  color: #34d399;
  font-weight: 600;
  margin: 4px 0 10px 0;
  display: block;
}

.log-exit-error {
  color: #f87171;
  font-weight: 600;
  margin: 4px 0 10px 0;
  display: block;
}

.log-stderr {
  color: #fca5a5;
}

/* MODALS */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
}

.modal-lg {
  max-width: 720px;
}

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

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

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

.modal-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background-color: var(--bg-card);
}

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

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input, .form-group textarea, .form-group select {
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-group textarea {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  resize: vertical;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--border-active);
  background-color: var(--bg-input-focus);
}

body[data-theme-env="ubuntu"] .form-group input:focus,
body[data-theme-env="ubuntu"] .form-group textarea:focus,
body[data-theme-env="ubuntu"] .form-group select:focus {
  border-color: var(--ubuntu-orange);
}

.form-row {
  display: flex;
  gap: 12px;
}

.flex-1 { flex: 1; }

.form-hint {
  font-size: 0.72rem;
  color: var(--text-faint);
}

.form-hint code {
  background: var(--bg-input);
  padding: 1px 4px;
  border-radius: 3px;
  font-family: var(--font-mono);
  color: #38bdf8;
}

/* PRESETS MANAGER */
.presets-manager-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.presets-list-section h4, .presets-actions-section h4 {
  font-size: 0.9rem;
  margin-bottom: 10px;
  color: var(--text-muted);
}

.presets-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
}

.preset-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.preset-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.preset-item-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: #fff;
}

.preset-item-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.preset-item-actions {
  display: flex;
  gap: 6px;
}

.preset-action-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.preset-action-box label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

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

.input-with-btn input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  color: #fff;
}

.file-input {
  display: none;
}

/* PARAMS MODAL */
.params-command-preview {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.params-command-preview label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.params-command-preview code {
  font-family: var(--font-mono);
  color: #38bdf8;
}

/* TOAST */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2000;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  font-size: 0.85rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideIn 0.2s ease-out;
}

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

.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-info { border-left: 4px solid var(--primary); }

.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

/* ===== TOUCH-FRIENDLY BASES (mobile-first enhancement) ===== */
.btn,
select,
input[type="text"],
input[type="file"],
textarea,
.chip,
.btn-card-action,
.cwd-badge,
.preset-item {
  min-height: 44px;
}

.btn-card-action {
  min-width: 40px;
  min-height: 40px;
}

/* ===== RESPONSIVE BREAKPOINTS & MOBILE FIRST UX ===== */

/* Desktop / Mobile Visibility Helpers */
.mobile-only {
  display: none !important;
}

.desktop-only {
  display: flex !important;
}

/* --- Large Tablet / Small Desktop (<= 1100px) --- */
@media (max-width: 1100px) {
  .app-header {
    padding: 8px 16px;
    height: auto;
    min-height: 60px;
    gap: 12px;
  }

  .header-center {
    order: 3;
    flex: 1 1 100%;
    justify-content: flex-start;
    padding-top: 4px;
  }

  .cwd-badge {
    max-width: 100%;
  }

  .header-right {
    margin-left: auto;
  }

  .quick-runner-section {
    padding: 10px 16px;
  }
}

/* --- Mobile & Tablet Architecture (<= 900px) --- */
@media (max-width: 900px) {
  .mobile-only {
    display: flex !important;
  }

  .desktop-only {
    display: none !important;
  }

  html, body {
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    position: fixed;
    width: 100%;
  }

  .app-container {
    height: 100%;
    height: 100dvh;
    max-height: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }

  /* Compact Header in Mobile */
  .app-header {
    padding: 8px 12px;
    height: auto;
    min-height: 54px;
    flex-wrap: nowrap;
    gap: 10px;
    border-bottom: 1px solid var(--border-subtle);
  }

  .header-left {
    flex: 1;
    gap: 10px;
    flex-wrap: nowrap;
  }

  .logo {
    gap: 6px;
  }

  .logo-icon {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .logo-text h1 {
    font-size: 0.95rem;
  }

  .version-tag {
    display: none;
  }

  .os-toggle-group {
    padding: 2px;
    gap: 2px;
  }

  .os-toggle-btn {
    padding: 5px 8px;
    font-size: 0.76rem;
    gap: 4px;
  }

  .header-right {
    gap: 8px;
  }

  /* Mobile Tabs Navigation Bar */
  .mobile-tabs-bar {
    display: flex !important;
    background: var(--bg-surface, #141b2d);
    border-bottom: 1px solid var(--border-subtle);
    padding: 6px 12px;
    gap: 8px;
    flex-shrink: 0;
  }

  .mobile-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 42px;
  }

  .mobile-tab-btn.active {
    background: var(--bg-input);
    color: var(--text-primary);
    border-color: var(--border-medium);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  }

  body[data-theme-env="windows"] .mobile-tab-btn.active {
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.4);
  }

  body[data-theme-env="ubuntu"] .mobile-tab-btn.active {
    color: var(--ubuntu-orange);
    border-color: rgba(233, 84, 32, 0.4);
  }

  .tab-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 7px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
  }

  .tab-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: pulseDot 1.4s infinite;
  }

  /* Main Workspace: Tabbed View in Mobile */
  .app-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    position: relative;
    grid-template-columns: none;
    grid-template-rows: none;
  }

  .app-main[data-mobile-view="commands"] .commands-section {
    display: flex;
    flex: 1;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-right: none;
  }

  .app-main[data-mobile-view="commands"] .terminal-section {
    display: none !important;
  }

  .app-main[data-mobile-view="terminal"] .commands-section {
    display: none !important;
  }

  .app-main[data-mobile-view="terminal"] .terminal-section {
    display: flex !important;
    flex: 1;
    height: 100%;
    overflow: hidden;
  }

  /* Quick Runner Bar in Mobile */
  .quick-runner-section {
    padding: 8px 12px;
    flex-shrink: 0;
  }

  .quick-runner-card {
    flex-direction: column;
    gap: 6px;
    padding: 8px 10px;
  }

  .quick-runner-prefix {
    width: 100%;
    justify-content: space-between;
    padding: 0;
  }

  .quick-runner-input-wrap {
    width: 100%;
  }

  .quick-runner-input-wrap input {
    font-size: 16px; /* Prevents auto-zoom in iOS Safari */
    padding: 8px 4px;
  }

  .quick-runner-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 8px;
  }

  .quick-runner-actions .btn {
    min-height: 42px;
    justify-content: center;
  }

  /* Commands Section Mobile Polish */
  .section-toolbar {
    padding: 10px 12px;
    gap: 10px;
    flex-direction: column;
    align-items: stretch;
    flex-shrink: 0;
  }

  .toolbar-left {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }

  .search-box {
    width: 100%;
  }

  .search-box input {
    font-size: 16px; /* Prevents auto-zoom in iOS */
    padding: 8px 12px 8px 34px;
    width: 100%;
  }

  .category-chips {
    width: 100%;
    padding-bottom: 4px;
    gap: 6px;
  }

  .chip {
    padding: 6px 12px;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
  }

  .toolbar-right {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }

  .toolbar-right .btn {
    flex: 1;
    min-height: 42px;
    justify-content: center;
  }

  .toolbar-right .cloud-sync-badge {
    padding: 8px 12px;
  }

  .commands-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
  }

  .command-card {
    padding: 14px;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  }

  .command-card:active {
    transform: scale(0.985);
  }

  .btn-run-command {
    min-height: 44px;
    font-size: 0.92rem;
    font-weight: 700;
  }

  .btn-card-action {
    width: 38px;
    height: 38px;
  }

  /* Terminal Section Mobile Polish */
  .terminal-section {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
  }

  .terminal-header {
    height: auto;
    min-height: 48px;
    padding: 8px 12px;
    gap: 8px;
    flex-shrink: 0;
  }

  .terminal-controls {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    gap: 6px;
    padding-bottom: 2px;
  }

  .terminal-controls .btn {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 6px 10px;
    font-size: 0.78rem;
  }

  .terminal-body {
    flex: 1;
    padding: 10px 12px;
    font-size: 0.8rem;
    -webkit-overflow-scrolling: touch;
  }

  .terminal-stdin-bar {
    padding: 8px 12px;
    gap: 8px;
    flex-shrink: 0;
  }

  .terminal-stdin-bar input {
    font-size: 16px;
    padding: 10px 12px;
  }

  .terminal-stdin-bar .btn {
    min-height: 40px;
    padding: 8px 14px;
  }

  /* Modal Mobile Responsiveness */
  .modal-overlay {
    padding: 10px;
    align-items: flex-end;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .modal-card {
    width: 100%;
    max-height: 88vh;
    border-radius: 16px 16px 10px 10px;
    animation: slideUpMobile 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes slideUpMobile {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

  .modal-header {
    padding: 14px 16px;
  }

  .modal-body {
    padding: 14px 16px;
    overflow-y: auto;
  }

  .modal-footer {
    padding: 12px 16px;
    flex-direction: column-reverse;
    gap: 8px;
  }

  .modal-footer .btn {
    width: 100%;
    min-height: 44px;
    font-size: 0.9rem;
  }

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

  /* Presets Manager in Mobile */
  .presets-manager-tabs {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .preset-item {
    flex-wrap: wrap;
    gap: 8px;
  }

  .preset-item-actions {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-subtle);
  }

  .preset-item-actions .btn {
    min-height: 36px;
    flex: 1;
  }

  /* Toast Mobile Position */
  .toast-container {
    bottom: max(16px, env(safe-area-inset-bottom));
    left: 12px;
    right: 12px;
  }

  .toast {
    width: 100%;
    font-size: 0.85rem;
  }
}

/* --- Mobile Menu Button & Drawer Styles --- */
.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.mobile-menu-btn:hover, .mobile-menu-btn:active {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
}

.mobile-menu-avatar-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #3b82f6;
  color: white;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-surface, #141b2d);
}

.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: rgba(8, 12, 22, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.25s ease;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 86%;
  max-width: 350px;
  background: var(--bg-surface, #141b2d);
  border-left: 1px solid var(--border-default, rgba(255, 255, 255, 0.1));
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.6);
  z-index: 9991;
  animation: slideDrawer 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  overflow-y: auto;
}

@keyframes slideDrawer {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.mobile-drawer-header {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-title-wrap h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.drawer-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: var(--radius-sm);
  -webkit-tap-highlight-color: transparent;
}

.drawer-close-btn:hover {
  color: var(--text-primary);
}

.mobile-drawer-body {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}

.drawer-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-section-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint, #64748b);
}

.drawer-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.drawer-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.drawer-user-email {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-auth-badge {
  font-size: 0.68rem;
  color: #10b981;
  font-weight: 600;
}

.drawer-cwd-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.drawer-cwd-box:hover, .drawer-cwd-box:active {
  border-color: var(--border-medium);
}

.drawer-cwd-path {
  flex: 1;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-cwd-action {
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-input);
  color: var(--primary);
  font-weight: 600;
}

.mobile-select {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.88rem;
}

.drawer-status-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.84rem;
}

.mt-2 {
  margin-top: 8px;
}

/* Password Toggle in Login Screen */
.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrap input {
  width: 100%;
  padding-right: 44px;
  font-size: 16px; /* Prevents auto-zoom in iOS Safari */
}

.btn-toggle-password {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.btn-toggle-password:hover, .btn-toggle-password:active {
  color: var(--text-primary);
}

/* Quick Copy Code Button in Cards */
.btn-copy-code {
  padding: 3px 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.btn-copy-code:hover, .btn-copy-code:active {
  color: var(--text-primary);
  border-color: var(--border-medium);
}

/* ==========================================================================
   SUPABASE AUTH & LOGIN SCREEN STYLES
   ========================================================================== */

/* User Profile Badge in Header */
.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-full, 9999px);
  font-size: 0.82rem;
  transition: border-color var(--transition-normal);
}

.user-profile-badge:hover {
  border-color: var(--border-default);
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary, #3b82f6), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: white;
}

.user-info-text {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-email {
  font-weight: 500;
  color: var(--text-primary);
}

.btn-logout {
  padding: 3px 7px;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-fast);
}

.btn-logout:hover {
  color: #f43f5e;
  background: rgba(244, 63, 94, 0.12);
}

/* Login Overlay (Full Screen) */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeInOverlay 0.25s ease-out;
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-surface, #141b2d);
  border: 1px solid var(--border-default, rgba(255, 255, 255, 0.1));
  border-radius: var(--radius-lg, 16px);
  padding: 32px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6), 0 0 30px rgba(59, 130, 246, 0.15);
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: slideUpCard 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.login-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.login-logo-icon {
  font-size: 2.2rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(16, 185, 129, 0.2));
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary, #ffffff);
}

.login-badge {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-weight: 600;
}

.login-subtitle {
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted, #94a3b8);
  margin: -10px 0 0 0;
}

/* Notice for missing .env keys */
.login-notice {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md, 8px);
  padding: 12px 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.82rem;
  color: #fbbf24;
}

.login-notice .notice-icon {
  font-size: 1.1rem;
}

.login-notice code {
  background: rgba(0, 0, 0, 0.3);
  padding: 1px 4px;
  border-radius: 4px;
  font-family: var(--font-mono);
  color: #fde68a;
}

/* Login Form */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-error-alert {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fb7185;
  padding: 10px 12px;
  border-radius: var(--radius-sm, 6px);
  font-size: 0.84rem;
  line-height: 1.4;
}

.btn-block {
  width: 100%;
}

.btn-login {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 42px;
  font-weight: 600;
  gap: 8px;
}

.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
}

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

.login-footer {
  text-align: center;
  color: var(--text-faint, #64748b);
  font-size: 0.75rem;
  border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
  padding-top: 14px;
}

/* ========================================================
   SUPABASE CLOUD SYNC & SQL MODAL STYLES
   ======================================================== */

.cloud-sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-size: 0.78rem;
  font-weight: 600;
  color: #34d399;
  cursor: default;
  transition: all 0.2s ease;
}

.cloud-sync-badge.pending {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  cursor: pointer;
}

.cloud-sync-badge.pending:hover {
  background: rgba(245, 158, 11, 0.2);
}

.cloud-sync-badge.local {
  background: rgba(100, 116, 139, 0.15);
  border-color: rgba(100, 116, 139, 0.3);
  color: #94a3b8;
}

.modal-card-lg {
  max-width: 680px;
  width: 95%;
}

.modal-header-with-icon {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-title-icon {
  font-size: 1.25rem;
}

.sql-intro-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #e2e8f0;
}

.sql-intro-box a {
  color: #38bdf8;
  text-decoration: underline;
}

.sql-steps-list {
  margin: 10px 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sql-code-container {
  display: flex;
  flex-direction: column;
  background: #0b0f19;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.sql-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #94a3b8;
}

.sql-code-pre {
  margin: 0;
  padding: 14px;
  max-height: 240px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.5;
  color: #f1f5f9;
  background: transparent;
}
