/* ==========================================================================
   Khargoosh2Zabane Web Management Cockpit - Stylesheet
   Architecture: RTL Persian-first, Enterprise Dark Mode, Pure CSS3
   ========================================================================== */

:root {
  --font-sans: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, Monaco, monospace;

  /* Color Palette */
  --bg-darkest: #06090e;
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-surface: #1e293b;
  --bg-surface-hover: #283548;

  --border-color: #27354a;
  --border-color-light: #334460;

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

  --color-accent: #0ea5e9;
  --color-accent-hover: #38bdf8;
  --color-emerald: #10b981;
  --color-emerald-bg: rgba(16, 185, 129, 0.12);
  --color-amber: #f59e0b;
  --color-amber-bg: rgba(245, 158, 11, 0.12);
  --color-rose: #f43f5e;
  --color-rose-bg: rgba(244, 63, 94, 0.12);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-darkest);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
  line-height: 1.6;
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Modal & Authentication
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(6, 9, 14, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.hidden {
  display: none !important;
}

.modal-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.brand-avatar {
  font-size: 42px;
  margin-bottom: 12px;
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

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

.modal-form {
  text-align: right;
}

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

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.form-group input {
  width: 100%;
  padding: 10px 14px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  direction: ltr;
}

.form-group input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.login-error {
  background-color: var(--color-rose-bg);
  border: 1px solid var(--color-rose);
  color: #fca5a5;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  text-align: center;
}

.login-error.hidden {
  display: none !important;
}

/* ==========================================================================
   Cockpit Shell & Navigation Bar
   ========================================================================== */
.cockpit-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.cockpit-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  min-height: 56px;
  z-index: 100;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  font-size: 26px;
}

.brand-text h1 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  direction: ltr;
  display: inline-block;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid transparent;
}

.badge-offline {
  background-color: var(--color-rose-bg);
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.3);
}

.badge-online {
  background-color: var(--color-emerald-bg);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.3);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: currentColor;
}

.badge-info {
  background-color: var(--bg-surface);
  color: var(--text-muted);
  border-color: var(--border-color);
  font-family: var(--font-mono);
  direction: ltr;
}

.badge-turn {
  background-color: rgba(14, 165, 233, 0.12);
  color: #7dd3fc;
  border-color: rgba(14, 165, 233, 0.25);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   Buttons & Controls
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  outline: none;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed !important;
}

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

.btn-primary:hover:not(:disabled) {
  background-color: var(--color-accent-hover);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--bg-surface-hover);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-outline:hover:not(:disabled) {
  background-color: var(--bg-surface);
}

.btn-danger {
  background-color: var(--color-rose-bg);
  color: #f87171;
  border-color: rgba(244, 63, 94, 0.3);
}

.btn-danger:hover:not(:disabled) {
  background-color: #e11d48;
  color: #ffffff;
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover:not(:disabled) {
  color: var(--text-main);
}

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

.btn-block {
  width: 100%;
}

.btn-inline-link {
  background: none;
  border: none;
  color: var(--color-accent);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.btn-inline-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Split-Screen Layout
   ========================================================================== */
.cockpit-split-view {
  display: flex;
  flex: 1;
  height: calc(100vh - 56px);
  overflow: hidden;
}

.pane {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pane-left {
  border-left: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  max-width: 50%;
  min-width: 420px;
}

.pane-right {
  background-color: var(--bg-darkest);
  flex: 1;
}

/* ==========================================================================
   Left Pane Components
   ========================================================================== */
.accordion-box {
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.accordion-header:hover {
  background-color: var(--bg-surface);
}

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

.count-badge {
  background-color: var(--bg-surface);
  color: var(--text-muted);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
}

.mini-status-pill {
  background-color: var(--color-amber-bg);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.3);
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
}

.chevron {
  font-size: 10px;
  color: var(--text-dim);
  transition: transform 0.2s ease;
}

.accordion-content {
  display: none;
  padding: 12px 16px;
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border-color);
}

.accordion-content.open {
  display: block;
}

/* Asset Basket & Dropzone */
.dropzone {
  border: 2px dashed var(--border-color-light);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  background-color: var(--bg-secondary);
  transition: all 0.2s ease;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--color-accent);
  background-color: rgba(14, 165, 233, 0.05);
}

.drop-icon {
  font-size: 24px;
  display: block;
  margin-bottom: 4px;
}

.dropzone-prompt p {
  font-size: 13px;
  color: var(--text-main);
}

.dropzone-prompt small {
  font-size: 11px;
  color: var(--text-dim);
}

.file-input-hidden {
  display: none;
}

.staged-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.staged-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-main);
  direction: ltr;
  font-family: var(--font-mono);
}

.staged-chip .remove-chip-btn {
  background: none;
  border: none;
  color: var(--color-rose);
  cursor: pointer;
  font-size: 14px;
}

/* Terminal Stream Viewer */
.terminal-screen {
  background-color: #030712;
  border: 1px solid #1e293b;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.45;
  color: #e2e8f0;
  max-height: 220px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
  direction: ltr;
  text-align: left;
}

/* ANSI Colors */
.ansi-bold { font-weight: bold; }
.ansi-dim { opacity: 0.6; }
.ansi-italic { font-style: italic; }
.ansi-underline { text-decoration: underline; }
.ansi-black { color: #475569; }
.ansi-red { color: #f87171; }
.ansi-green { color: #4ade80; }
.ansi-yellow { color: #fde047; }
.ansi-blue { color: #60a5fa; }
.ansi-magenta { color: #f472b6; }
.ansi-cyan { color: #22d3ee; }
.ansi-white { color: #f8fafc; }

/* Chat & Executive Cards Feed */
.feed-header-bar {
  padding: 8px 16px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 0;
}

.feed-header-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.feed-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.welcome-card {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(16, 185, 129, 0.05));
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: var(--radius-md);
  padding: 16px;
}

.welcome-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.welcome-icon {
  font-size: 20px;
}

.welcome-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

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

/* User Message Bubble */
.user-msg-bubble {
  align-self: flex-start;
  max-width: 85%;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.msg-header {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
}

/* Persian Executive Response Card */
.executive-card {
  align-self: stretch;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color-light);
  border-right: 4px solid var(--color-emerald);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-md);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #34d399;
  margin-bottom: 12px;
}

.card-section {
  margin-bottom: 12px;
}

.card-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.card-section ul {
  list-style: none;
  padding-right: 14px;
}

.card-section li {
  font-size: 13px;
  color: var(--text-main);
  position: relative;
  margin-bottom: 4px;
}

.card-section li::before {
  content: "•";
  color: var(--color-accent);
  position: absolute;
  right: -12px;
  font-weight: bold;
}

.card-link-box {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
}

.card-link-box a {
  color: var(--color-accent);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.card-link-box a:hover {
  text-decoration: underline;
}

/* Senior WordPress Developer Technical Report Styling */
.executive-card.tech-card {
  border-right: 4px solid var(--color-accent);
  background: linear-gradient(180deg, rgba(14, 165, 233, 0.05) 0%, rgba(17, 24, 39, 0.95) 100%);
}

.tech-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.tech-title {
  font-size: 14px;
  font-weight: 700;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color-light);
  font-family: var(--font-mono);
  font-size: 12px;
  color: #38bdf8;
  direction: ltr;
}

.tech-row {
  margin-bottom: 10px;
}

.tech-row-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tech-row-content {
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.5;
}

.tech-code {
  font-family: var(--font-mono);
  background-color: #030712;
  border: 1px solid #1e293b;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 12px;
  color: #38bdf8;
  direction: ltr;
  display: inline-block;
  word-break: break-all;
  margin: 2px 0;
}

.tech-pre {
  background-color: #030712;
  border: 1px solid #1e293b;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin: 6px 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #a5f3fc;
  direction: ltr;
  text-align: left;
}

.tech-val-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background-color: var(--color-emerald-bg);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
  font-size: 12px;
  font-weight: 500;
}

/* Prompt Input Footer */
.prompt-footer {
  padding: 12px 16px;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

/* Senior Developer Quick-Actions Toolbelt */
.dev-toolbelt {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  padding: 8px 12px;
  background-color: rgba(14, 165, 233, 0.04);
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: var(--radius-sm);
}

.dev-toolbelt-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-accent-hover);
}

.dev-toolbelt-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-dev-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-dev-action:hover {
  background-color: var(--bg-surface-hover);
  border-color: var(--color-accent);
  color: #38bdf8;
  transform: translateY(-1px);
}

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

.btn-dev-action:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Developer Logs Modal */
.dev-logs-modal-card {
  max-width: 720px !important;
  width: 90% !important;
  text-align: right !important;
}

.dev-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.dev-modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-avatar-mini {
  font-size: 24px;
}

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

.btn-close-modal:hover {
  color: var(--color-rose);
}

.dev-modal-body {
  margin-bottom: 16px;
}

.dev-logs-screen {
  background-color: #030712;
  border: 1px solid #1e293b;
  border-radius: var(--radius-sm);
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  color: #fca5a5;
  max-height: 380px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
  direction: ltr;
  text-align: left;
}

.dev-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.prompt-chips {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.chip {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

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

.prompt-form {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.textarea-wrapper {
  position: relative;
  flex: 1;
}

#promptInput {
  width: 100%;
  padding: 10px 14px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 13px;
  resize: vertical;
  min-height: 48px;
  max-height: 140px;
  outline: none;
  transition: border-color 0.15s ease;
}

#promptInput:focus {
  border-color: var(--color-accent);
}

.input-spinner {
  position: absolute;
  left: 10px;
  bottom: 14px;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn-send {
  height: 48px;
  padding: 0 18px;
}

.prompt-hints {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-dim);
}

.prompt-hints code {
  font-family: var(--font-mono);
  background-color: var(--bg-surface);
  padding: 1px 4px;
  border-radius: 3px;
  color: var(--text-muted);
}

/* ==========================================================================
   Right Pane: Live Preview Subsystem
   ========================================================================== */
.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  gap: 12px;
}

.toolbar-url {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 320px;
}

.url-icon {
  font-size: 14px;
}

#previewUrlInput {
  width: 100%;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  direction: ltr;
  outline: none;
}

.toolbar-viewport-switches {
  display: flex;
  gap: 4px;
  background-color: var(--bg-surface);
  padding: 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.btn-vp {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-vp.active {
  background-color: var(--color-accent);
  color: #ffffff;
  font-weight: 600;
}

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

.iframe-stage {
  flex: 1;
  height: 100%;
  position: relative;
  overflow: hidden;
  background-color: #030712;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.iframe-stage.desktop {
  align-items: flex-start;
  justify-content: flex-end; /* Aligned right for RTL layout */
  overflow: hidden;
}

.iframe-stage.desktop iframe {
  position: absolute;
  top: 0;
  right: 0;
  border: none;
}

.iframe-stage.tablet iframe {
  width: 768px;
  height: 94%;
  border: 8px solid #1e293b;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  transform: none !important;
}

.iframe-stage.mobile iframe {
  width: 375px;
  height: 94%;
  border: 8px solid #1e293b;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  transform: none !important;
}

/* ==========================================================================
   Pending Execution State Card
   ========================================================================== */
.pending-card {
  border-right-color: var(--color-accent) !important;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(30, 41, 59, 0.7));
  animation: pulseCard 2s infinite ease-in-out;
}

@keyframes pulseCard {
  0%, 100% { border-color: rgba(14, 165, 233, 0.4); box-shadow: 0 0 10px rgba(14, 165, 233, 0.1); }
  50% { border-color: rgba(14, 165, 233, 0.8); box-shadow: 0 0 20px rgba(14, 165, 233, 0.25); }
}

.pulse-text {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #38bdf8 !important;
  font-weight: 600;
}

.pending-progress-bar {
  width: 100%;
  height: 4px;
  background-color: var(--bg-surface);
  border-radius: 2px;
  overflow: hidden;
  margin: 12px 0 8px 0;
}

.progress-bar-fill {
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, #0ea5e9, #10b981, #0ea5e9);
  border-radius: 2px;
  animation: indeterminateBar 1.5s infinite linear;
}

@keyframes indeterminateBar {
  0% { transform: translateX(250%); }
  100% { transform: translateX(-150%); }
}

.pending-sub {
  font-size: 12px;
  color: var(--text-dim);
}

/* ==========================================================================
   Animations & Utilities
   ========================================================================== */
@keyframes spin {
  to { transform: rotate(360deg); }
}

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

.hidden {
  display: none !important;
}

/* Slim Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-color-light);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

/* Responsive collapse for small screens */
@media (max-width: 900px) {
  .cockpit-split-view {
    flex-direction: column;
  }
  .pane-left {
    max-width: 100%;
    min-width: 100%;
    height: 55%;
  }
  .pane-right {
    height: 45%;
  }
}
