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

:root {
  --bg:          #07070f;
  --bg2:         #0d0d1a;
  --surface:     rgba(255,255,255,0.028);
  --surface-hov: rgba(255,255,255,0.05);
  --border:      rgba(255,255,255,0.07);
  --border-hov:  rgba(255,255,255,0.14);
  --orange:      #ff7b2f;
  --orange-dim:  rgba(255,123,47,0.15);
  --purple:      #c061ff;
  --purple-dim:  rgba(192,97,255,0.12);
  --text:        #ddddf0;
  --text-dim:    #7070a0;
  --success:     #3de89e;
  --error:       #ff4f6a;
  --warn:        #ffd166;
  --mono:        'Fira Code', monospace;
  --sans:        'Space Grotesk', system-ui, sans-serif;
  --radius:      14px;
  --radius-sm:   8px;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.hidden { display: none !important; }

/* ── Background ── */
.bg-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bg-canvas::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(192,97,255,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
}
.orb { position: absolute; border-radius: 50%; filter: blur(80px); animation: drift 18s ease-in-out infinite alternate; }
.orb-1 { width: 700px; height: 700px; top: -250px; right: -200px; background: radial-gradient(circle, rgba(192,97,255,0.13), transparent 65%); animation-duration: 22s; }
.orb-2 { width: 500px; height: 500px; bottom: -150px; left: -100px; background: radial-gradient(circle, rgba(255,123,47,0.1), transparent 65%); animation-duration: 16s; animation-direction: alternate-reverse; }
.orb-3 { width: 280px; height: 280px; top: 45%; left: 32%; background: radial-gradient(circle, rgba(192,97,255,0.06), transparent 65%); animation-duration: 26s; }
@keyframes drift {
  0%   { transform: translate(0,0) scale(1); }
  50%  { transform: translate(28px,-18px) scale(1.04); }
  100% { transform: translate(-14px,22px) scale(0.97); }
}

/* ── View base ── */
.view { position: relative; z-index: 1; min-height: 100vh; }

/* ── Animations ── */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.fade-in { animation: fadeIn 0.4s ease; }
.anim-stagger-1 { animation: fadeSlideIn 0.5s ease 0.1s both; }
.anim-stagger-2 { animation: fadeSlideIn 0.5s ease 0.25s both; }
.anim-stagger-3 { animation: fadeSlideIn 0.5s ease 0.4s both; }

/* ════════════════════════════════════════ LOGIN ══ */
.login-wrap {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 24px;
  gap: 28px;
}

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

.login-card {
  width: 100%; max-width: 440px;
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex; flex-direction: column; gap: 18px;
}

.login-card-head {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.login-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.65;
}

.auth-status {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  text-align: center;
  min-height: 18px;
}

.login-footer {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-dim);
}
.login-footer .dot { opacity: 0.3; }

/* ════════════════════════════════════════ APP ══ */
.app {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 28px 60px;
  display: flex; flex-direction: column;
}

/* ── Header ── */
header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}

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

.logo-icon-wrap {
  width: 44px; height: 44px; border-radius: 11px;
  background: linear-gradient(135deg, rgba(255,123,47,0.15), rgba(192,97,255,0.15));
  border: 1px solid rgba(255,123,47,0.25);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  box-shadow: 0 0 20px rgba(255,123,47,0.15);
  flex-shrink: 0;
}
.logo-icon-wrap::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 50%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.07), transparent);
  pointer-events: none;
}

.logo-text-wrap { display: flex; flex-direction: column; gap: 3px; }
.logo-title { font-size: 1.22rem; font-weight: 700; letter-spacing: -0.02em; color: #fff; line-height: 1; }
.logo-title .brand {
  background: linear-gradient(100deg, var(--orange), var(--purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.logo-sub { font-size: 0.63rem; letter-spacing: 0.17em; text-transform: uppercase; color: var(--text-dim); font-family: var(--mono); }

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

.header-icon-btn {
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: 1px solid var(--border);
  color: var(--text-dim); background: transparent; transition: all 0.15s;
}
.header-icon-btn:hover { border-color: var(--border-hov); color: var(--text); background: var(--surface-hov); }
.header-icon-btn svg { width: 14px; height: 14px; }

/* Status pill */
.hpill {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 30px;
  font-family: var(--mono); font-size: 0.67rem; color: var(--text-dim);
}
.hpill.live { border-color: rgba(61,232,158,0.3); color: var(--success); }
.hpill.error-s { border-color: rgba(255,79,106,0.3); color: var(--error); }
.live-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--text-dim); }
.hpill.live .live-dot { background: var(--success); box-shadow: 0 0 6px var(--success); animation: blink 1.5s ease-in-out infinite; }
.hpill.error-s .live-dot { background: var(--error); box-shadow: 0 0 6px var(--error); }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* User chip */
.user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 30px;
}
.user-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--border);
  object-fit: cover;
}
.user-name {
  font-family: var(--mono); font-size: 0.72rem; color: var(--text);
  padding-right: 4px;
}
.user-logout {
  width: 22px; height: 22px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: 1px solid var(--border);
  color: var(--text-dim); background: transparent; transition: all 0.15s;
}
.user-logout:hover { border-color: var(--error); color: var(--error); background: rgba(255,79,106,0.08); }
.user-logout svg { width: 11px; height: 11px; }

/* ── Panel ── */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  transition: border-color 0.2s;
  margin-bottom: 14px;
}
.panel:hover { border-color: var(--border-hov); }

.panel-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.ph-icon {
  width: 28px; height: 28px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ph-icon svg { width: 13px; height: 13px; }
.ph-icon.o { background: rgba(255,123,47,0.12); color: var(--orange); }
.ph-icon.p { background: rgba(192,97,255,0.12); color: var(--purple); }
.ph-icon.g { background: rgba(61,232,158,0.12); color: var(--success); }
.ph-title { font-size: 0.82rem; font-weight: 600; color: var(--text); flex: 1; }
.ph-meta { font-family: var(--mono); font-size: 0.63rem; color: var(--text-dim); }

/* ── Repo config ── */
.repo-config {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.repo-config .workflow-row {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.branch-row {
  display: flex; gap: 8px;
}
.branch-row .select-wrap { flex: 1; }

/* ── Fields ── */
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label {
  font-family: var(--mono); font-size: 0.64rem;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-dim);
  display: flex; align-items: center; gap: 5px;
}
.field-label svg { width: 10px; height: 10px; opacity: 0.7; }

.inp-wrap { position: relative; }
.inp-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-dim); pointer-events: none; }
.inp-ico svg { width: 14px; height: 14px; display: block; }

input[type="text"], input[type="password"] {
  width: 100%; background: rgba(0,0,0,0.4);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 14px 11px 38px;
  color: var(--text); font-family: var(--mono); font-size: 0.78rem;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
input::placeholder { color: rgba(112,112,160,0.5); }
input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,123,47,0.1); }

/* Repo search */
.repo-search-wrap { position: relative; }
.repo-search-input { padding-left: 38px !important; width: 100%; }

.repo-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 100;
  background: #0e0e1c;
  border: 1px solid var(--border-hov);
  border-radius: var(--radius-sm);
  max-height: 220px; overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
}
.repo-dropdown::-webkit-scrollbar { width: 3px; }
.repo-dropdown::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); }

.repo-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; cursor: pointer;
  font-family: var(--mono); font-size: 0.73rem; color: var(--text);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s;
}
.repo-item:last-child { border-bottom: none; }
.repo-item:hover { background: rgba(255,123,47,0.06); }
.repo-item.dim { color: var(--text-dim); cursor: default; }
.repo-item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.repo-item-meta { font-size: 0.62rem; color: var(--text-dim); flex-shrink: 0; margin-left: 8px; }

/* Select */
.select-wrap { position: relative; }
.select-ico {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-dim); pointer-events: none; width: 14px; height: 14px;
}
select {
  width: 100%; background: rgba(0,0,0,0.4);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 14px 11px 38px;
  color: var(--text); font-family: var(--mono); font-size: 0.78rem;
  outline: none; appearance: none; cursor: pointer;
  transition: border-color 0.2s;
}
select:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,123,47,0.1); }
select:disabled { opacity: 0.4; cursor: not-allowed; }
select option { background: #0e0e1c; }

/* Workflow badge */
.workflow-badge {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 0.68rem;
  padding: 4px 10px; border-radius: 20px;
  border: 1px solid transparent;
}
.workflow-badge svg { width: 12px; height: 12px; flex-shrink: 0; }
.workflow-badge.ok { color: var(--success); border-color: rgba(61,232,158,0.25); background: rgba(61,232,158,0.07); }
.workflow-badge.warn { color: var(--warn); border-color: rgba(255,209,102,0.25); background: rgba(255,209,102,0.07); }
.workflow-badge.neutral { color: var(--text-dim); border-color: var(--border); }

/* ── Upload Mode Toggle ── */
.upload-mode-row {
  display: flex; gap: 8px; margin-bottom: 16px;
}
.upload-mode-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: transparent;
  color: var(--text-dim); font-family: var(--mono); font-size: 0.68rem;
  cursor: pointer; transition: all 0.2s;
}
.upload-mode-btn svg { width: 13px; height: 13px; }
.upload-mode-btn:hover { border-color: var(--border-hov); color: var(--text); background: var(--surface-hov); }
.upload-mode-btn.active { border-color: var(--orange); color: var(--orange); background: rgba(255,123,47,0.08); }

/* ── Deploy Options ── */
.deploy-options {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px; margin-top: 16px;
}

/* ── Dropzone ── */
.dropzone {
  border: 1.5px dashed rgba(255,255,255,0.1);
  border-radius: var(--radius); padding: 44px 28px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 13px; cursor: pointer; text-align: center; position: relative;
  overflow: hidden; transition: all 0.25s;
}
.dropzone::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 100%, rgba(192,97,255,0.06), transparent 70%);
  pointer-events: none; opacity: 0; transition: opacity 0.3s;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--purple); background: rgba(192,97,255,0.03); }
.dropzone:hover::before, .dropzone.dragover::before { opacity: 1; }
.dropzone.has-file { border-color: var(--success); border-style: solid; background: rgba(61,232,158,0.025); }
.dropzone.file-err { border-color: var(--error); border-style: solid; background: rgba(255,79,106,0.025); }

.dz-ring {
  width: 72px; height: 72px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.3); transition: all 0.3s; position: relative;
}
.dz-ring::after {
  content: ''; position: absolute; inset: -5px; border-radius: 50%;
  border: 1px dashed rgba(255,255,255,0.05); transition: all 0.3s;
}
.dz-ring svg { width: 28px; height: 28px; color: var(--text-dim); transition: color 0.3s; }

.dropzone:hover .dz-ring, .dropzone.dragover .dz-ring { border-color: rgba(192,97,255,0.4); box-shadow: 0 0 24px rgba(192,97,255,0.2); }
.dropzone:hover .dz-ring svg, .dropzone.dragover .dz-ring svg { color: var(--purple); }
.dropzone:hover .dz-ring::after, .dropzone.dragover .dz-ring::after { border-color: rgba(192,97,255,0.2); }
.dropzone.has-file .dz-ring { border-color: rgba(61,232,158,0.4); box-shadow: 0 0 24px rgba(61,232,158,0.15); }
.dropzone.has-file .dz-ring svg { color: var(--success); }
.dropzone.file-err .dz-ring { border-color: rgba(255,79,106,0.4); }
.dropzone.file-err .dz-ring svg { color: var(--error); }

.dz-title { font-size: 0.95rem; font-weight: 600; color: var(--text); }
.dz-sub { font-family: var(--mono); font-size: 0.68rem; color: var(--text-dim); max-width: 340px; }
.dz-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 13px; background: rgba(0,0,0,0.4);
  border: 1px solid var(--border); border-radius: 20px;
  font-family: var(--mono); font-size: 0.63rem; color: var(--text-dim);
}
.dz-chip svg { width: 10px; height: 10px; }

.dz-file-block { display: none; flex-direction: column; align-items: center; gap: 5px; }
.dz-file-name { font-family: var(--mono); font-size: 0.82rem; color: var(--success); font-weight: 500; }
.dz-file-meta { font-family: var(--mono); font-size: 0.65rem; color: var(--text-dim); }

.dropzone.has-file .dz-default { display: none; }
.dropzone.has-file .dz-file-block { display: flex; }
.dropzone.file-err .dz-file-block { display: none; }
.dz-default { display: contents; }
#fileInput, #filesInput, #folderInput { display: none; }

/* ── Progress ── */
.prog-row { display: none; align-items: center; gap: 12px; margin-top: 14px; }
.prog-row.show { display: flex; }
.prog-track { flex: 1; height: 3px; background: rgba(255,255,255,0.05); border-radius: 3px; overflow: hidden; }
.prog-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--purple), var(--orange)); border-radius: 3px; transition: width 0.45s ease; }
.prog-label { font-family: var(--mono); font-size: 0.64rem; color: var(--text-dim); width: 32px; text-align: right; }

/* ── Pipeline ── */
.pipeline {
  display: flex; align-items: center;
  padding: 14px 16px; margin-top: 18px;
  background: rgba(0,0,0,0.25); border: 1px solid var(--border);
  border-radius: var(--radius-sm); gap: 0; overflow-x: auto;
}
.pipe-step { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; min-width: 64px; }
.pipe-step-icon {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.3); transition: all 0.3s;
}
.pipe-step-icon svg { width: 13px; height: 13px; color: var(--text-dim); transition: color 0.3s; }
.pipe-step-label { font-family: var(--mono); font-size: 0.56rem; color: var(--text-dim); text-align: center; line-height: 1.3; transition: color 0.3s; }
.pipe-conn { flex: 0.4; height: 1px; background: var(--border); margin-bottom: 18px; transition: background 0.3s, box-shadow 0.3s; }

.pipe-step.active .pipe-step-icon { border-color: var(--orange); background: rgba(255,123,47,0.1); box-shadow: 0 0 14px rgba(255,123,47,0.25); }
.pipe-step.active .pipe-step-icon svg { color: var(--orange); }
.pipe-step.active .pipe-step-label { color: var(--orange); }
.pipe-step.done .pipe-step-icon { border-color: var(--success); background: rgba(61,232,158,0.1); }
.pipe-step.done .pipe-step-icon svg { color: var(--success); }
.pipe-step.done .pipe-step-label { color: var(--success); }
.pipe-step.err .pipe-step-icon { border-color: var(--error); background: rgba(255,79,106,0.1); }
.pipe-step.err .pipe-step-icon svg { color: var(--error); }
.pipe-step.err .pipe-step-label { color: var(--error); }
.pipe-conn.done { background: var(--success); box-shadow: 0 0 5px rgba(61,232,158,0.4); }

/* ── Buttons ── */
.btn-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 20px; gap: 10px;
}

.btn-sec {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--sans); font-size: 0.74rem; font-weight: 500;
  color: var(--text-dim); background: transparent;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 16px; cursor: pointer; transition: all 0.18s;
}
.btn-sec svg { width: 13px; height: 13px; }
.btn-sec:hover { border-color: var(--border-hov); color: var(--text); background: var(--surface-hov); }
.btn-sec:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-sec.sm { padding: 7px 12px; font-size: 0.68rem; }
.btn-sec.full { width: 100%; justify-content: center; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--sans); font-size: 0.84rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: #fff; border: none; border-radius: var(--radius-sm);
  padding: 13px 32px; cursor: pointer; position: relative; overflow: hidden;
  background: linear-gradient(130deg, #ff7b2f 0%, #c061ff 100%);
  box-shadow: 0 0 28px rgba(192,97,255,0.35);
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
  text-decoration: none;
}
.btn-primary::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.13), transparent 60%);
  pointer-events: none;
}
.btn-primary::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}
.btn-primary svg { width: 16px; height: 16px; }
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 4px 48px rgba(192,97,255,0.5); }
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.3; cursor: not-allowed; box-shadow: none; }
.btn-primary.full { width: 100%; justify-content: center; }

.btn-spinner {
  width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #fff; border-radius: 50%;
  animation: spin 0.65s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.spin-icon { animation: spin 1s linear infinite; }

/* ── Terminal ── */
.terminal-outer { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #03030a; margin-bottom: 14px; }

.term-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.018);
}
.mac-dots { display: flex; gap: 6px; }
.mac-dot { width: 11px; height: 11px; border-radius: 50%; }
.mac-dot:nth-child(1) { background: #ff5f57; }
.mac-dot:nth-child(2) { background: #febc2e; }
.mac-dot:nth-child(3) { background: #28c840; }

.term-title { font-family: var(--mono); font-size: 0.67rem; color: var(--text-dim); flex: 1; text-align: center; }
.term-acts { display: flex; gap: 6px; }
.term-act {
  width: 22px; height: 22px; border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: 1px solid var(--border);
  color: var(--text-dim); background: transparent; transition: all 0.15s;
}
.term-act:hover { border-color: var(--border-hov); color: var(--text); background: var(--surface-hov); }
.term-act svg { width: 11px; height: 11px; }

.term-body {
  padding: 18px 22px; min-height: 200px; max-height: 320px;
  overflow-y: auto; font-family: var(--mono); font-size: 0.75rem; line-height: 1.95;
}
.term-body::-webkit-scrollbar { width: 3px; }
.term-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 2px; }

.log { display: flex; align-items: flex-start; gap: 10px; animation: li 0.18s ease; }
@keyframes li { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.log-ts { color: rgba(112,112,160,0.45); font-size: 0.63rem; flex-shrink: 0; padding-top: 1px; }
.log-sym { flex-shrink: 0; color: var(--purple); user-select: none; }
.log-txt { flex: 1; word-break: break-all; }
.log.info .log-txt    { color: var(--text); }
.log.success .log-txt { color: var(--success); }
.log.error .log-txt   { color: var(--error); }
.log.warn .log-txt    { color: var(--warn); }
.log.dim .log-txt     { color: var(--text-dim); }
.log.sys .log-txt     { color: rgba(192,97,255,0.8); }

.log-tag {
  display: inline-block; font-size: 0.57rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 1px 6px; border-radius: 3px; margin-right: 7px; vertical-align: middle;
}
.log-tag.ok  { background: rgba(61,232,158,0.15);  color: var(--success); }
.log-tag.er  { background: rgba(255,79,106,0.15);  color: var(--error); }
.log-tag.in  { background: rgba(192,97,255,0.15);  color: var(--purple); }
.log-tag.wn  { background: rgba(255,209,102,0.15); color: var(--warn); }

.term-cursor {
  display: inline-block; width: 7px; height: 12px;
  background: var(--purple); vertical-align: middle;
  margin-left: 3px; animation: blink 1s step-end infinite; border-radius: 1px;
}

/* ════════════════════════════════════════ DASHBOARD ══ */
.dash-stats {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px;
}
.dash-stat {
  flex: 1; min-width: 80px; padding: 14px 10px; text-align: center;
  background: rgba(0,0,0,0.2); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.dash-stat-value { font-size: 1.1rem; font-weight: 700; color: var(--text); font-family: var(--mono); }
.dash-stat-label { font-size: 0.6rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 4px; font-family: var(--mono); }

.dash-links {
  display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap;
}
.dash-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 20px;
  border: 1px solid var(--border); background: transparent;
  font-family: var(--mono); font-size: 0.64rem; color: var(--text-dim);
  text-decoration: none; transition: all 0.15s;
}
.dash-link:hover { border-color: var(--orange); color: var(--orange); background: rgba(255,123,47,0.06); }
.dash-link svg { width: 11px; height: 11px; }

.dash-commits-label {
  font-family: var(--mono); font-size: 0.62rem; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.1em; margin-top: 16px; margin-bottom: 8px;
}
.dash-commits { display: flex; flex-direction: column; gap: 4px; }
.dash-commit {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.15); border: 1px solid transparent;
  text-decoration: none; transition: all 0.15s;
}
.dash-commit:hover { border-color: var(--border); background: var(--surface-hov); }
.dash-commit-sha { font-family: var(--mono); font-size: 0.65rem; color: var(--purple); flex-shrink: 0; }
.dash-commit-msg { font-size: 0.72rem; color: var(--text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-commit-meta { font-family: var(--mono); font-size: 0.58rem; color: var(--text-dim); flex-shrink: 0; }
.dash-error { font-family: var(--mono); font-size: 0.72rem; color: var(--text-dim); text-align: center; padding: 16px; }

/* ════════════════════════════════════════ INSPECTOR ══ */
.inspector-stats {
  display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px;
}
.inspector-stat {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 0.65rem; color: var(--text-dim);
}
.inspector-stat.wf { color: var(--warn); }
.inspector-stat-icon { width: 11px; height: 11px; }

.inspector-tree {
  max-height: 260px; overflow-y: auto; padding: 4px 0;
}
.inspector-tree::-webkit-scrollbar { width: 3px; }
.inspector-tree::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); }

.inspector-folder { margin-left: 0; }
.inspector-folder .inspector-folder { margin-left: 14px; }
.inspector-folder-toggle {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 6px; cursor: pointer; border-radius: 4px;
  transition: background 0.15s;
}
.inspector-folder-toggle:hover { background: var(--surface-hov); }
.inspector-chevron { width: 10px; height: 10px; color: var(--text-dim); transition: transform 0.2s; }
.inspector-folder.collapsed .inspector-chevron { transform: rotate(-90deg); }
.inspector-folder.collapsed .inspector-folder-children { display: none; }
.inspector-folder-icon { width: 12px; height: 12px; color: var(--warn); }
.inspector-folder-name { font-family: var(--mono); font-size: 0.7rem; color: var(--text); }
.inspector-folder-count { font-family: var(--mono); font-size: 0.58rem; color: var(--text-dim); margin-left: auto; }

.inspector-file {
  display: flex; align-items: center; gap: 5px;
  padding: 3px 6px 3px 20px; border-radius: 4px;
}
.inspector-file-icon { width: 11px; height: 11px; color: var(--text-dim); flex-shrink: 0; }
.inspector-file-name { font-family: var(--mono); font-size: 0.68rem; color: var(--text-dim); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inspector-file-size { font-family: var(--mono); font-size: 0.58rem; color: var(--text-dim); flex-shrink: 0; }
.inspector-file-size.size-warn { color: var(--warn); }
.inspector-file-size.size-danger { color: var(--error); }
.inspector-wf-badge {
  font-family: var(--mono); font-size: 0.52rem; color: var(--warn);
  padding: 1px 5px; border-radius: 3px; background: rgba(255,209,102,0.1);
  border: 1px solid rgba(255,209,102,0.2); flex-shrink: 0;
}
.inspector-empty { font-family: var(--mono); font-size: 0.72rem; color: var(--text-dim); text-align: center; padding: 16px; }

/* ════════════════════════════════════════ HISTORY ══ */
.history-empty {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 24px; font-family: var(--mono); font-size: 0.72rem; color: var(--text-dim);
}
.history-empty-icon { width: 16px; height: 16px; }

.history-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.15); border: 1px solid transparent;
  cursor: pointer; transition: all 0.15s; margin-bottom: 6px;
}
.history-item:hover { border-color: var(--border); background: var(--surface-hov); }
.history-item:last-child { margin-bottom: 0; }
.history-item-left { display: flex; align-items: center; gap: 10px; overflow: hidden; }
.history-item-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.history-status-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.history-status-dot.ok { background: var(--success); box-shadow: 0 0 6px rgba(61,232,158,0.4); }
.history-status-dot.er { background: var(--error); box-shadow: 0 0 6px rgba(255,79,106,0.4); }
.history-status-dot.pending { background: var(--warn); box-shadow: 0 0 6px rgba(255,209,102,0.4); animation: blink 1.5s ease-in-out infinite; }
.history-item-info { overflow: hidden; }
.history-item-repo { font-family: var(--mono); font-size: 0.72rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-item-meta { display: flex; align-items: center; gap: 0; font-family: var(--mono); font-size: 0.58rem; color: var(--text-dim); flex-wrap: wrap; }
.history-sep { margin: 0 5px; opacity: 0.3; }
.history-chevron { width: 12px; height: 12px; color: var(--text-dim); }

.history-actions-badge {
  font-family: var(--mono); font-size: 0.56rem; padding: 2px 7px;
  border-radius: 3px; border: 1px solid transparent;
}
.history-actions-badge.ok { color: var(--success); background: rgba(61,232,158,0.1); border-color: rgba(61,232,158,0.2); }
.history-actions-badge.er { color: var(--error); background: rgba(255,79,106,0.1); border-color: rgba(255,79,106,0.2); }
.history-actions-badge.active { color: var(--orange); background: rgba(255,123,47,0.1); border-color: rgba(255,123,47,0.2); }
.history-actions-badge.pending { color: var(--warn); background: rgba(255,209,102,0.1); border-color: rgba(255,209,102,0.2); }

/* ════════════════════════════════════════ TOAST ══ */
.toast-container {
  position: fixed; top: 20px; right: 20px; z-index: 500;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none; max-width: 360px;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-sm);
  background: rgba(13,13,26,0.95); backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  font-family: var(--mono); font-size: 0.72rem; color: var(--text);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  pointer-events: auto;
  transform: translateX(120%); opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast.hide { animation: toastOut 0.3s ease forwards; }
@keyframes toastOut {
  to { transform: translateX(120%); opacity: 0; }
}
.toast-icon { width: 14px; height: 14px; flex-shrink: 0; }
.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--error); }
.toast-warn .toast-icon { color: var(--warn); }
.toast-info .toast-icon { color: var(--purple); }
.toast-msg { flex: 1; }
.toast-close {
  width: 18px; height: 18px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-dim); cursor: pointer; transition: all 0.15s;
}
.toast-close:hover { border-color: var(--error); color: var(--error); }
.toast-close svg { width: 10px; height: 10px; }

/* ════════════════════════════════════════ COMMAND PALETTE ══ */
.palette-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: min(20vh, 160px);
  opacity: 0; transition: opacity 0.2s ease;
}
.palette-overlay.open { opacity: 1; }

.palette-modal {
  width: 100%; max-width: 520px;
  background: #0d0d1a; border: 1px solid var(--border-hov);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.8);
  transform: translateY(-10px) scale(0.98);
  transition: transform 0.2s ease;
}
.palette-overlay.open .palette-modal { transform: none; }

.palette-input-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.palette-search-icon { width: 16px; height: 16px; color: var(--text-dim); flex-shrink: 0; }
.palette-input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); font-family: var(--sans); font-size: 0.92rem;
  padding: 0;
}
.palette-input::placeholder { color: rgba(112,112,160,0.5); }
.palette-shortcut-hint {
  font-family: var(--mono); font-size: 0.6rem; color: var(--text-dim);
  padding: 2px 6px; border: 1px solid var(--border); border-radius: 4px;
}

.palette-list {
  max-height: 300px; overflow-y: auto; padding: 6px 0;
}
.palette-list::-webkit-scrollbar { width: 3px; }
.palette-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); }

.palette-category {
  font-family: var(--mono); font-size: 0.58rem; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.12em;
  padding: 8px 18px 4px;
}
.palette-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 18px; cursor: pointer; transition: background 0.1s;
}
.palette-item:hover, .palette-item.active { background: rgba(255,123,47,0.06); }
.palette-item.active { border-left: 2px solid var(--orange); }
.palette-item-icon { width: 14px; height: 14px; color: var(--text-dim); flex-shrink: 0; }
.palette-item.active .palette-item-icon { color: var(--orange); }
.palette-item-label { font-size: 0.8rem; color: var(--text); flex: 1; }
.palette-item.active .palette-item-label { color: var(--orange); }
.palette-item-shortcut {
  font-family: var(--mono); font-size: 0.58rem; color: var(--text-dim);
  padding: 2px 6px; border: 1px solid var(--border); border-radius: 4px;
}
.palette-empty {
  padding: 20px; text-align: center;
  font-family: var(--mono); font-size: 0.72rem; color: var(--text-dim);
}

.palette-footer {
  display: flex; align-items: center; gap: 16px;
  padding: 8px 18px; border-top: 1px solid var(--border);
  font-family: var(--mono); font-size: 0.58rem; color: var(--text-dim);
}
.palette-footer kbd {
  display: inline-block; padding: 1px 5px; border-radius: 3px;
  border: 1px solid var(--border); background: rgba(0,0,0,0.3);
  font-family: var(--mono); font-size: 0.55rem;
}

/* ── Modal ── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; transition: opacity 0.2s ease;
}
.modal-backdrop.open { opacity: 1; }

.modal {
  background: #0d0d1a;
  border: 1px solid var(--border-hov);
  border-radius: var(--radius);
  padding: 26px;
  width: 100%; max-width: 420px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.8);
  transform: translateY(-10px) scale(0.98);
  transition: transform 0.2s ease;
}
.modal-backdrop.open .modal { transform: none; }

.modal-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.modal-close {
  margin-left: auto; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 6px;
  background: transparent; color: var(--text-dim); cursor: pointer;
  transition: all 0.15s;
}
.modal-close:hover { border-color: var(--error); color: var(--error); }
.modal-close svg { width: 12px; height: 12px; }
.modal-actions {
  display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px;
}

.branch-source-info {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 0.7rem; color: var(--text-dim);
  padding: 8px 12px; background: rgba(0,0,0,0.2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.branch-source-info strong { color: var(--purple); }

/* Toggle */
.toggle-row {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 10px 12px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.toggle-row input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--orange); }
.toggle-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.78rem; color: var(--text-dim); font-family: var(--mono);
}

/* ── Skeleton Loading ── */
.skeleton-group { display: flex; flex-direction: column; gap: 8px; padding: 4px 0; }
.skeleton {
  height: 14px; border-radius: 4px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}
.skeleton-line { width: 100%; }
.skeleton-line.short { width: 60%; }
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Footer ── */
footer {
  margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.foot-brand { display: flex; align-items: center; gap: 8px; font-size: 0.7rem; color: var(--text-dim); }
.foot-brand svg { width: 13px; height: 13px; color: var(--orange); }
.foot-brand strong { color: var(--text); }
.foot-links { display: flex; align-items: center; gap: 16px; }
.foot-link {
  display: flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 0.67rem; color: var(--text-dim);
  text-decoration: none; transition: color 0.15s;
}
.foot-link svg { width: 11px; height: 11px; }
.foot-link:hover { color: var(--orange); }

.foot-shortcut {
  display: inline-flex; align-items: center; gap: 3px;
  font-family: var(--mono); font-size: 0.6rem; color: var(--text-dim);
}
.foot-shortcut kbd {
  display: inline-block; padding: 1px 5px; border-radius: 3px;
  border: 1px solid var(--border); background: rgba(0,0,0,0.3);
  font-family: var(--mono); font-size: 0.55rem;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .app { padding: 0 16px 40px; }
  header { padding: 20px 0; flex-wrap: wrap; gap: 10px; }
  .repo-config { grid-template-columns: 1fr; }
  .deploy-options { grid-template-columns: 1fr; }
  .logo-sub { display: none; }
  .user-name { display: none; }
  .btn-primary { padding: 12px 20px; font-size: 0.78rem; }
  .dash-stats { gap: 6px; }
  .dash-stat { min-width: 65px; padding: 10px 6px; }
  .palette-modal { margin: 0 12px; }
  .toast-container { right: 12px; left: 12px; max-width: none; }
  .upload-mode-row { gap: 4px; }
  .upload-mode-btn span { display: none; }
  .history-item-meta { display: none; }
}
