@font-face { font-family: 'Inter'; font-weight: 400; font-style: normal; font-display: swap; src: url('/static/fonts/inter-latin-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-style: normal; font-display: swap; src: url('/static/fonts/inter-latin-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-style: normal; font-display: swap; src: url('/static/fonts/inter-latin-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-style: normal; font-display: swap; src: url('/static/fonts/inter-latin-700.woff2') format('woff2'); }

:root {
  --bg: #0b0b0f;
  --surf-1: #121218;
  --surf-2: #17171f;
  --surf-3: #1d1d27;
  --border: #262634;
  --ink: #f2efe9;
  --muted: #a09d97;
  --dim: #7a7873;
  --rose: #e28191;
  --rose-hover: #ec96a4;
  --green: #6fd19c;
  --amber: #e3bf72;
  --coral: #e87a7a;
  --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 11, 15, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.topbar-left, .topbar-right, .brand-row, .head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 12px rgba(226, 129, 145, 0.65);
}
.brand-name { font-weight: 600; letter-spacing: -0.01em; font-size: 15px; }

.tabs { display: flex; gap: 4px; margin-left: 12px; background: var(--surf-1); padding: 3px; border-radius: 9px; border: 1px solid var(--border); }
.tab-btn {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 500;
}
.tab-btn.active { background: var(--surf-3); color: var(--ink); }
.tab-badge {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(226, 129, 145, 0.18);
  color: var(--rose);
  font-variant-numeric: tabular-nums;
}

.queue-bar {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(227, 191, 114, 0.35);
  background: rgba(227, 191, 114, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.queue-bar-left {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--amber);
  font-weight: 500;
}
.queue-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  animation: pulse-dot 1.2s ease-in-out infinite;
}
.queue-num {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(227, 191, 114, 0.45);
  background: rgba(227, 191, 114, 0.14);
  color: var(--amber);
  font-size: 12px;
  font-weight: 600;
}

.gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.gallery-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.gallery-title-wrap h2 { margin: 0; font-size: 18px; font-weight: 600; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.gal-card {
  position: relative;
  aspect-ratio: 9 / 14;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1.5px solid var(--border);
  background: var(--surf-2);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.gal-card:hover { border-color: rgba(226, 129, 145, 0.55); transform: translateY(-2px); }
.gal-card.selected,
.job-card.selected { border-color: var(--rose); box-shadow: 0 0 0 2px rgba(226, 129, 145, 0.35); }
.gal-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-check {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 3;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 1.5px solid rgba(242, 239, 233, 0.75);
  background: rgba(11, 11, 15, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: transparent;
}
.gal-card.selected .gal-check,
.job-card.selected .gal-check {
  background: var(--rose);
  border-color: var(--rose);
  color: #160c10;
}
.gal-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px 10px 9px;
  background: linear-gradient(transparent, rgba(11, 11, 15, 0.88));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.15s;
}
.gal-card:hover .gal-bar { opacity: 1; }
.gal-label {
  font-size: 11px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}
.gal-bar-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.locked-card {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(20, 20, 28, 0.65);
}
.lock-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--border);
  background: var(--surf-2);
  vertical-align: middle;
}
.readonly-val {
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(11, 11, 15, 0.55);
  color: var(--muted);
  font-size: 13px;
  min-height: 38px;
  display: flex;
  align-items: center;
  user-select: text;
}
.readonly-val.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--ink);
}

.pill {
  font-size: 12px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surf-2);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-variant-numeric: tabular-nums;
}
.pill::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  display: none;
}
.pill-state::before { display: inline-block; }
.pill-warm { color: var(--green); border-color: rgba(111, 209, 156, 0.4); background: rgba(111, 209, 156, 0.08); }
.pill-running { color: var(--rose); border-color: rgba(226, 129, 145, 0.45); background: rgba(226, 129, 145, 0.1); }
.pill-running::before, .pill-booting::before { animation: pulse-dot 1.2s ease-in-out infinite; }
.pill-booting { color: var(--amber); border-color: rgba(227, 191, 114, 0.4); background: rgba(227, 191, 114, 0.08); }
.pill-cold { color: var(--muted); border-color: var(--border); }
.pill-ok { color: var(--green); border-color: rgba(111, 209, 156, 0.35); }
.pill-warn { color: var(--amber); border-color: rgba(227, 191, 114, 0.35); }
.pill-muted { color: var(--muted); }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.container { max-width: 1180px; margin: 0 auto; padding: 24px 20px 64px; }

.card {
  background: var(--surf-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.upload-card { display: flex; flex-direction: column; gap: 14px; }
.dropzone {
  border: 1.5px dashed #343448;
  border-radius: 10px;
  background: var(--surf-2);
  padding: 28px 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--rose);
  background: #1b1721;
}
.dz-title { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.dz-sub { font-size: 12px; }

.queue-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.q-thumb {
  position: relative;
  width: 72px;
  height: 96px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surf-3);
}
.q-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.q-thumb button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 0;
  background: rgba(11, 11, 15, 0.8);
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}

.upload-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.inline-field { display: flex; align-items: center; gap: 10px; }
.upload-actions { display: flex; gap: 8px; }

.btn {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--rose); color: #160c10; font-weight: 600; }
.btn-primary:hover:not(:disabled) { background: var(--rose-hover); }
.btn-ghost { background: var(--surf-2); border-color: var(--border); color: var(--ink); }
.btn-ghost:hover:not(:disabled) { background: var(--surf-3); }
.btn-danger { background: transparent; border-color: rgba(232, 122, 122, 0.35); color: var(--coral); }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-full { width: 100%; }

input[type="text"], input[type="password"], input[type="url"], select, textarea {
  background: var(--surf-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 11px;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--rose); }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 14px;
}
.section-head h2 { margin: 0; font-size: 16px; font-weight: 600; }

.empty-state {
  text-align: center;
  padding: 48px 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.job-card {
  background: var(--surf-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.job-media {
  position: relative;
  aspect-ratio: 9 / 14;
  background: var(--surf-2);
  cursor: pointer;
  overflow: hidden;
}
.job-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.job-media .ref-pip {
  position: absolute;
  bottom: 8px;
  left: 8px;
  width: 48px;
  height: 64px;
  border-radius: 6px;
  border: 1.5px solid rgba(242, 239, 233, 0.75);
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}
.job-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 11, 15, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px;
  text-align: center;
  gap: 8px;
}
.spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--border);
  border-top-color: var(--rose);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.job-foot {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--border);
}
.job-meta { min-width: 0; }
.job-status { font-size: 12px; font-weight: 600; }
.st-done { color: var(--green); }
.st-running, .st-queued { color: var(--amber); }
.st-failed { color: var(--coral); }
.job-sub { font-size: 11px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.settings-stack { display: flex; flex-direction: column; gap: 18px; max-width: 860px; }
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.card-head h3 { margin: 0 0 3px; font-size: 15px; }
.card-head p { margin: 0; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; font-weight: 500; color: var(--muted); }
.key-badge { font-style: normal; font-size: 11px; margin-left: 6px; color: var(--green); }
.prompt-box { width: 100%; resize: vertical; line-height: 1.5; font-size: 13px; }

.err-line { color: var(--coral); font-size: 12px; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 8, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}
.modal-card {
  background: var(--surf-1);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: 100%;
  max-width: 980px;
  max-height: 92vh;
  overflow: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-title { font-weight: 600; }
.modal-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.modal-compare.single {
  grid-template-columns: 1fr;
}
.lora-drop-hint {
  margin-bottom: 14px;
  padding: 9px 13px;
  border-radius: 9px;
  border: 1px dashed var(--border);
  background: var(--surf-1);
  transition: border-color 0.15s, background 0.15s;
}
#view-lora.dragover .lora-drop-hint {
  border-color: var(--rose);
  background: rgba(226, 129, 145, 0.08);
  color: var(--ink);
}
@media (max-width: 720px) { .modal-compare { grid-template-columns: 1fr; } }
.compare-col { display: flex; flex-direction: column; gap: 6px; }
.compare-col img { width: 100%; max-height: 66vh; object-fit: contain; border-radius: 8px; background: var(--bg); }
.modal-prompt {
  background: var(--surf-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
}
.prompt-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.modal-prompt pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--muted);
}

.edit-modal-card {
  max-width: 1080px;
}
.edit-composer {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 720px) { .edit-composer { grid-template-columns: 1fr; } }
.edit-source-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.edit-source-col img {
  width: 100%;
  aspect-ratio: 9 / 14;
  object-fit: cover;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg);
}
.edit-prompt-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: space-between;
}
.edit-composer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.edit-results-head {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.edit-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.edit-card {
  background: var(--surf-2);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.edit-card.applied {
  border-color: var(--green);
  box-shadow: 0 0 0 1px rgba(111, 209, 156, 0.35);
}
.edit-card-media {
  position: relative;
  aspect-ratio: 9 / 14;
  background: var(--bg);
  overflow: hidden;
}
.edit-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}
.edit-card-body {
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border);
}
.edit-card-prompt {
  font-size: 11.5px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 32px;
}
.edit-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.edit-card-actions .btn-primary,
.edit-card-actions .btn-saved {
  flex: 1;
}
.btn-saved {
  background: rgba(111, 209, 156, 0.14);
  border-color: rgba(111, 209, 156, 0.45);
  color: var(--green);
  font-weight: 600;
}

.job-foot.done-actions {
  justify-content: space-between;
  padding: 9px 10px;
}
.job-foot.done-actions .done-action-row {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}
.job-foot.done-actions .btn-publer {
  flex: 1;
}

/* Publer Modal */
.publer-modal-card {
  max-width: 540px;
}
.publer-preview-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: var(--surf-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 14px;
}
.publer-preview-row img {
  width: 56px;
  height: 84px;
  object-fit: cover;
  border-radius: 7px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.publer-preview-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  word-break: break-word;
}
.publer-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.publer-accounts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  margin-bottom: 14px;
}
.publer-acc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--surf-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
  user-select: none;
}
.publer-acc-row:hover {
  border-color: var(--rose-dim);
}
.publer-acc-row.selected {
  border-color: var(--rose);
  background: rgba(212, 138, 159, 0.1);
}
.publer-acc-check {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--surf-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: transparent;
  flex-shrink: 0;
}
.publer-acc-row.selected .publer-acc-check {
  background: var(--rose);
  border-color: var(--rose);
  color: #160c10;
}
.publer-acc-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surf-3);
  flex-shrink: 0;
}
.publer-acc-info {
  min-width: 0;
  flex: 1;
}
.publer-acc-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.publer-acc-provider {
  font-size: 11px;
  color: var(--muted);
  text-transform: capitalize;
}
.publer-sent-pill {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--green);
  background: rgba(111, 209, 156, 0.12);
  border: 1px solid rgba(111, 209, 156, 0.35);
  border-radius: 999px;
  padding: 2px 8px;
  flex-shrink: 0;
}
.publer-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--surf-3);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 9px;
  font-size: 13px;
  z-index: 60;
}

/* Sent-to-Publer bottom section divider & visual cue */
.publer-sent-divider {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 4px;
  color: rgba(111, 209, 156, 0.85);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.publer-sent-divider::before,
.publer-sent-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(111, 209, 156, 0.22);
}
.job-card.is-publer-sent,
.gal-card.is-publer-sent {
  border-color: rgba(111, 209, 156, 0.28);
  opacity: 0.78;
  transition: opacity 0.16s ease, border-color 0.16s ease;
}
.job-card.is-publer-sent:hover,
.gal-card.is-publer-sent:hover {
  opacity: 1;
  border-color: rgba(111, 209, 156, 0.55);
}


/* Content review tab & Mark Ready styling */
.content-actions {
  flex-wrap: wrap;
}
.compact-field {
  gap: 6px;
}
.compact-field select {
  padding: 5px 10px;
  font-size: 12px;
  min-height: 30px;
}
.btn-ready {
  background: rgba(111, 209, 156, 0.16);
  color: #8ee5b6;
  border: 1px solid rgba(111, 209, 156, 0.42);
}
.btn-ready:hover:not(:disabled) {
  background: rgba(111, 209, 156, 0.28);
  border-color: rgba(111, 209, 156, 0.72);
  color: #c8f7dc;
}
.btn-ready.is-done {
  background: rgba(111, 209, 156, 0.1);
  color: rgba(111, 209, 156, 0.9);
  border-color: rgba(111, 209, 156, 0.35);
}

/* Unsaved / pending Seedream edit indicators */
.edit-tag {
  position: absolute;
  top: 9px;
  right: 9px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.72);
  background: rgba(24, 18, 9, 0.86);
  color: #fde68a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
  cursor: pointer;
  backdrop-filter: blur(6px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.edit-tag:hover {
  transform: scale(1.04);
  background: rgba(245, 158, 11, 0.95);
  color: #161006;
  border-color: #fbbf24;
}
.edit-tag .edit-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fbbf24;
  flex-shrink: 0;
}
.edit-tag:hover .edit-dot {
  background: #161006;
}
.edit-tag.is-pending {
  border-color: rgba(192, 132, 252, 0.72);
  background: rgba(21, 13, 30, 0.88);
  color: #e9d5ff;
}
.edit-tag.is-pending .edit-dot {
  background: #c084fc;
  animation: editPulse 1.1s ease-in-out infinite;
}
.edit-tag.is-pending:hover {
  background: rgba(168, 85, 247, 0.95);
  color: #14081f;
  border-color: #c084fc;
}
@keyframes editPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.75); }
}
.gal-card.has-unsaved-edits,
.job-card.has-unsaved-edits {
  border-color: rgba(251, 191, 36, 0.65);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.22);
}
.gal-card.has-pending-edits,
.job-card.has-pending-edits {
  border-color: rgba(192, 132, 252, 0.65);
}
.btn-edit-attn {
  background: rgba(245, 158, 11, 0.2) !important;
  border-color: rgba(251, 191, 36, 0.65) !important;
  color: #fde68a !important;
  font-weight: 600;
}
.btn-edit-attn:hover:not(:disabled) {
  background: rgba(245, 158, 11, 0.34) !important;
}
.btn-edit-filter {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(251, 191, 36, 0.45);
  color: #fde68a;
  font-weight: 600;
}
.btn-edit-filter:hover:not(:disabled) {
  background: rgba(245, 158, 11, 0.25);
}
.btn-edit-filter.active {
  background: #f59e0b;
  border-color: #fbbf24;
  color: #161006;
}

/* Content Pics / Avatars sub-tab switcher & 1:1 square avatar cards */
.content-subtabs {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border-radius: 9px;
  background: var(--surf-2);
  border: 1px solid var(--border);
}
.content-subtabs .subtab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.14s, color 0.14s;
}
.content-subtabs .subtab:hover {
  color: var(--ink);
}
.content-subtabs .subtab.active {
  background: var(--surf-3);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.content-subtabs .subtab-count {
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
}
.content-subtabs .subtab.has-pending .subtab-count {
  background: rgba(226, 129, 145, 0.22);
  color: var(--rose);
}
.gallery-grid.is-avatars {
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
}
.gallery-grid.is-avatars .gal-card {
  aspect-ratio: 1 / 1;
}
