/* ===== SkinnyFATS Content Engine Dashboard ===== */
/* Retro neon command center aesthetic */

:root {
  --bg-primary: #0a0a0f;
  --bg-card: #12121a;
  --bg-card-hover: #1a1a26;
  --bg-input: #0d0d14;
  --border: #1e1e2e;
  --border-active: #2a2a3e;
  --cyan: #00e5ff;
  --pink: #ff2d7b;
  --yellow: #ffd600;
  --green: #00e676;
  --red: #ff1744;
  --orange: #ff9100;
  --text: #e0e0e8;
  --text-dim: #6e6e82;
  --text-bright: #ffffff;
  --font-display: 'Archivo Black', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --font-body: 'DM Sans', sans-serif;
  --radius: 8px;
  --radius-lg: 12px;
}

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

body {
  background: var(--bg-primary);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle noise overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

.app {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

/* ===== Header ===== */
.header {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--pink), var(--cyan));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--bg-primary);
  letter-spacing: -1px;
  flex-shrink: 0;
}

.header-title {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 3px;
  color: var(--text-bright);
  line-height: 1;
}

.header-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ===== Stats Bar ===== */
.stats-bar {
  display: flex;
  gap: 2px;
  flex: 1;
  justify-content: center;
}

.stat {
  background: var(--bg-card);
  padding: 10px 20px;
  text-align: center;
  min-width: 80px;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.stat:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.stat:last-child { border-radius: 0 var(--radius) var(--radius) 0; }

.stat-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: var(--text-bright);
}

.stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  margin-top: 4px;
  display: block;
}

.stat[data-type="pending"] .stat-num { color: var(--yellow); }
.stat[data-type="approved"] .stat-num { color: var(--cyan); }
.stat[data-type="published"] .stat-num { color: var(--green); }
.stat[data-type="rejected"] .stat-num { color: var(--red); }

/* ===== Header Actions ===== */
.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.filter-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  outline: none;
}

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

/* ===== Buttons ===== */
.btn {
  padding: 8px 18px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--cyan);
  color: var(--bg-primary);
}

.btn-primary:hover:not(:disabled) {
  background: #33ebff;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
}

.btn-approve {
  background: var(--green);
  color: var(--bg-primary);
}

.btn-approve:hover:not(:disabled) {
  box-shadow: 0 0 16px rgba(0, 230, 118, 0.3);
}

.btn-reject {
  background: transparent;
  color: var(--red);
  border: 1px solid var(--red);
}

.btn-reject:hover:not(:disabled) {
  background: var(--red);
  color: white;
}

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

.btn-secondary:hover:not(:disabled) {
  border-color: var(--text-dim);
}

.btn-bulk {
  background: var(--pink);
  color: white;
}

.btn-bulk:hover:not(:disabled) {
  box-shadow: 0 0 20px rgba(255, 45, 123, 0.3);
}

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

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid transparent;
}

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

/* ===== Content Grid ===== */
.content-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-dim);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h2 {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text);
  margin-bottom: 8px;
}

/* ===== Content Card ===== */
.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s;
  animation: fadeIn 0.3s ease;
}

.content-card:hover {
  border-color: var(--border-active);
}

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

/* Card Header */
.card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.card-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  background: var(--bg-input);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-info {
  flex: 1;
  min-width: 0;
}

.card-filename {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta {
  display: flex;
  gap: 16px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-dim);
}

.card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}

.brand-tag.skinnyfats {
  background: rgba(255, 45, 123, 0.15);
  color: var(--pink);
  border: 1px solid rgba(255, 45, 123, 0.3);
}

.brand-tag.hallpass {
  background: rgba(0, 229, 255, 0.15);
  color: var(--cyan);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.status-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}

.status-badge.pending_review {
  background: rgba(255, 214, 0, 0.12);
  color: var(--yellow);
  border: 1px solid rgba(255, 214, 0, 0.25);
}

.status-badge.approved {
  background: rgba(0, 229, 255, 0.12);
  color: var(--cyan);
  border: 1px solid rgba(0, 229, 255, 0.25);
}

.status-badge.published {
  background: rgba(0, 230, 118, 0.12);
  color: var(--green);
  border: 1px solid rgba(0, 230, 118, 0.25);
}

.status-badge.rejected {
  background: rgba(255, 23, 68, 0.12);
  color: var(--red);
  border: 1px solid rgba(255, 23, 68, 0.25);
}

.card-select {
  width: 20px;
  height: 20px;
  accent-color: var(--pink);
  cursor: pointer;
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

/* Platform Previews */
.platforms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
}

.platform-preview {
  background: var(--bg-card);
  padding: 16px;
  position: relative;
}

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

.platform-name {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}

.platform-name .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.platform-name .dot.edited {
  background: var(--orange);
}

.platform-name .dot.skipped {
  background: var(--red);
}

.platform-actions {
  display: flex;
  gap: 4px;
}

.platform-copy {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  word-break: break-word;
  max-height: 120px;
  overflow-y: auto;
  padding-right: 4px;
}

.platform-copy::-webkit-scrollbar {
  width: 4px;
}

.platform-copy::-webkit-scrollbar-thumb {
  background: var(--border-active);
  border-radius: 2px;
}

.char-count {
  font-family: var(--font-mono);
  font-size: 10px;
  margin-top: 8px;
  display: flex;
  gap: 12px;
}

.char-count .ok { color: var(--green); }
.char-count .warn { color: var(--yellow); }
.char-count .over { color: var(--red); }

.platform-skipped {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 15, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
}

.platform-skipped:hover {
  background: rgba(10, 10, 15, 0.7);
  color: var(--text);
}

/* Card Footer */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-input);
}

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 1px;
}

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

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

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

.edit-field {
  margin-bottom: 16px;
}

.edit-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.edit-field textarea,
.edit-field input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
  outline: none;
}

.edit-field textarea:focus,
.edit-field input:focus {
  border-color: var(--cyan);
}

.edit-field textarea { min-height: 80px; }

.edit-char-count {
  font-family: var(--font-mono);
  font-size: 10px;
  text-align: right;
  margin-top: 4px;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .header { flex-direction: column; align-items: flex-start; }
  .stats-bar { width: 100%; justify-content: flex-start; }
  .platforms-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .app { padding: 0 12px 24px; }
  .card-header { flex-wrap: wrap; }
  .stat { padding: 8px 12px; min-width: 60px; }
  .stat-num { font-size: 18px; }
}
