/* ---- Instagram tab ---- */
.ig-chart-wrap {
  position: relative;
  height: 200px;
  margin-top: 16px;
}
.ig-chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 768px) {
  .ig-chart-grid { grid-template-columns: 1fr; }
}

/* ---- Schedule (drag-drop) ---- */
.sched-toolbar { display:flex; align-items:center; gap:12px; margin-bottom:14px; }
.sched-toolbar .sched-info { font-size:12px; color:#8A8478; }
.sched-toolbar button {
  background:#E04E24; color:#fff; border:none; border-radius:6px;
  padding:7px 16px; font-size:12px; font-weight:600; cursor:pointer;
  font-family:inherit; transition:background 0.15s;
}
.sched-toolbar button:hover:not(:disabled) { background:#c23d17; }
.sched-toolbar button:disabled { background:#6E695F; cursor:not-allowed; opacity:0.6; }
.sched-toolbar button.secondary { background:transparent; color:#8A8478; border:1px solid rgba(245,239,230,0.1); }
.sched-toolbar button.secondary:hover:not(:disabled) { background:rgba(245,239,230,0.05); color:#B7B0A4; }
.sched-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(180px, 1fr));
  gap:14px;
}
.sched-card {
  background:rgba(245,239,230,0.03);
  border:1px solid rgba(245,239,230,0.08);
  border-radius:10px;
  overflow:hidden;
  cursor:grab;
  transition:transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  position:relative;
  user-select:none;
}
.sched-card:hover { border-color:rgba(224,78,36,0.4); box-shadow:0 4px 12px rgba(0,0,0,0.3); }
.sched-card:active { cursor:grabbing; }
.sched-card.sortable-ghost { opacity:0.3; }
.sched-card.sortable-chosen { transform:scale(1.02); }
.sched-card .pos-badge {
  position:absolute; top:6px; left:6px;
  background:rgba(0,0,0,0.7); color:#fff;
  border-radius:4px; padding:2px 7px;
  font-size:10px; font-weight:700; z-index:2;
}
.sched-card .type-badge {
  position:absolute; top:6px; right:6px;
  background:rgba(197,151,73,0.85); color:#100f0c;
  border-radius:4px; padding:2px 7px;
  font-size:9px; font-weight:700; text-transform:uppercase; z-index:2;
}
.sched-card .type-badge.video { background:rgba(239,68,68,0.85); }
.sched-card .type-badge.carousel { background:rgba(224,78,36,0.85); }
.sched-thumb {
  width:100%; aspect-ratio:1/1;
  background:#0c0b09 center/cover no-repeat;
  display:flex; align-items:center; justify-content:center;
  color:#6E695F; font-size:11px;
  position:relative;
}
.sched-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.sched-body { padding:10px 12px; }
.sched-id { font-size:10px; color:#8A8478; font-weight:600; letter-spacing:0.04em; margin-bottom:4px; }
.sched-date { font-size:10px; color:#8A8478; font-weight:600; margin-bottom:6px; letter-spacing:0.02em; }
.sched-date.today { color:#79B08F; }
.sched-thumb .peek-btn {
  position:absolute; bottom:6px; right:6px; z-index:3;
  width:26px; height:26px; border-radius:50%;
  background:rgba(0,0,0,0.7); color:#fff;
  border:1px solid rgba(245,239,230,0.15);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer; padding:0;
  transition:background 0.15s, transform 0.15s;
}
.sched-thumb .peek-btn:hover { background:#E04E24; transform:scale(1.1); }
.sched-thumb .peek-btn svg { width:14px; height:14px; }
/* Peek modal */
.peek-overlay {
  position:fixed; inset:0; background:rgba(0,0,0,0.75);
  display:none; align-items:center; justify-content:center;
  z-index:9999; padding:20px;
}
.peek-overlay.show { display:flex; }
.peek-modal {
  background:#15120d; border:1px solid rgba(245,239,230,0.1);
  border-radius:12px; max-width:920px; width:100%;
  max-height:92vh; overflow:hidden;
  display:flex; flex-direction:column;
  box-shadow:0 20px 60px rgba(0,0,0,0.6);
}
.peek-modal .peek-head {
  display:flex; justify-content:space-between; align-items:center;
  padding:14px 18px; border-bottom:1px solid rgba(245,239,230,0.08);
  flex-shrink:0;
}
.peek-modal .peek-head h3 { margin:0; font-size:14px; color:#B7B0A4; }
.peek-modal .peek-close {
  background:transparent; border:none; color:#8A8478;
  font-size:22px; cursor:pointer; padding:0 6px; line-height:1;
}
.peek-modal .peek-close:hover { color:#fff; }
.peek-body {
  display:grid; grid-template-columns:1fr 1fr; gap:0;
  overflow:auto; flex:1;
}
.peek-left {
  position:relative;
  background:#0c0b09; display:flex; align-items:center; justify-content:center;
  padding:16px; min-height:300px;
}
.peek-modal .peek-thumb {
  max-width:100%; max-height:60vh; object-fit:contain; display:block;
  border-radius:8px;
}
.peek-nav {
  position:absolute; top:50%; transform:translateY(-50%);
  width:34px; height:34px; border:none; border-radius:50%;
  background:rgba(15,13,10,0.72); color:#F5EFE6; font-size:22px; line-height:1;
  cursor:pointer; display:none; align-items:center; justify-content:center;
  transition:background 0.15s; z-index:2; padding:0;
}
.peek-nav:hover { background:rgba(15,13,10,0.95); color:#fff; }
.peek-nav.prev { left:12px; }
.peek-nav.next { right:12px; }
.peek-left.multi .peek-nav { display:flex; }
.peek-counter {
  position:absolute; top:12px; right:12px;
  background:rgba(15,13,10,0.72); color:#B7B0A4; font-size:11px; font-weight:600;
  padding:3px 9px; border-radius:20px; display:none; z-index:2;
}
.peek-left.multi .peek-counter { display:block; }
.peek-dots {
  position:absolute; bottom:14px; left:0; right:0;
  display:none; gap:6px; justify-content:center; z-index:2;
}
.peek-left.multi .peek-dots { display:flex; }
.peek-dot {
  width:7px; height:7px; border-radius:50%; border:none; padding:0;
  background:rgba(226,232,240,0.35); cursor:pointer; transition:background 0.15s;
}
.peek-dot.active { background:#F5EFE6; }
.peek-right { padding:18px 20px; display:flex; flex-direction:column; gap:14px; overflow:auto; }
.peek-modal .peek-meta { display:grid; gap:10px; }
.peek-modal .peek-row { display:grid; grid-template-columns:80px 1fr; gap:10px; font-size:12px; }
.peek-modal .peek-row .k { color:#8A8478; font-weight:600; text-transform:uppercase; letter-spacing:0.05em; font-size:10px; padding-top:2px; }
.peek-modal .peek-row .v { color:#B7B0A4; line-height:1.5; word-break:break-word; }
.peek-modal .peek-row .v a { color:#E04E24; text-decoration:none; }
.peek-modal .peek-row .v a:hover { text-decoration:underline; }
.peek-caption-block { display:flex; flex-direction:column; gap:8px; }
.peek-caption-label {
  display:flex; justify-content:space-between; align-items:baseline;
  color:#8A8478; font-weight:600; text-transform:uppercase; letter-spacing:0.05em; font-size:10px;
}
.peek-caption-count { color:#6E695F; font-variant-numeric:tabular-nums; }
.peek-caption-count.warn { color:#C99A4B; }
.peek-caption-count.over { color:#C2694F; }
.peek-modal textarea.peek-caption-input {
  width:100%; min-height:140px; resize:vertical;
  background:rgba(245,239,230,0.03); border:1px solid rgba(245,239,230,0.1);
  border-radius:8px; padding:12px 14px; font-size:13px; color:#F5EFE6;
  line-height:1.6; font-family:inherit;
  box-sizing:border-box;
}
.peek-modal textarea.peek-caption-input:focus { outline:none; border-color:#E04E24; }
.peek-actions { display:flex; gap:10px; align-items:center; justify-content:flex-end; }
.peek-actions .peek-status { flex:1; font-size:11px; color:#8A8478; }
.peek-actions .peek-status.ok { color:#79B08F; }
.peek-actions .peek-status.err { color:#C2694F; }
.peek-actions button {
  background:#E04E24; color:#fff; border:none; border-radius:6px;
  padding:8px 18px; font-size:12px; font-weight:600; cursor:pointer;
  font-family:inherit; transition:background 0.15s;
}
.peek-actions button:hover:not(:disabled) { background:#c23d17; }
.peek-actions button:disabled { background:#6E695F; cursor:not-allowed; opacity:0.6; }
.peek-actions button.secondary { background:transparent; color:#8A8478; border:1px solid rgba(245,239,230,0.1); }
.peek-actions button.secondary:hover:not(:disabled) { background:rgba(245,239,230,0.05); color:#B7B0A4; }
.peek-actions button.secondary:disabled { background:transparent; }

.peek-publish {
  display:flex; align-items:center; gap:10px;
  margin-top:16px; padding-top:14px;
  border-top:1px solid rgba(245,239,230,0.08);
}
.peek-publish-note { flex:1; font-size:11px; color:#8A8478; line-height:1.5; }
.peek-publish-note.err { color:#C2694F; }
.peek-publish-note.ok { color:#79B08F; }
.peek-publish-note a { color:#79B08F; }
.peek-publish button {
  background:#E04E24; color:#fff; border:none; border-radius:6px;
  padding:9px 18px; font-size:12px; font-weight:600; cursor:pointer;
  font-family:inherit; transition:background 0.15s; white-space:nowrap;
}
.peek-publish button:hover:not(:disabled) { background:#c23d17; }
.peek-publish button:disabled { background:#6E695F; cursor:not-allowed; opacity:0.6; }
.peek-publish button.confirm { background:#C2694F; }
.peek-publish button.confirm:hover:not(:disabled) { background:#C2694F; filter:brightness(0.88); }
@media (max-width: 760px) {
  .peek-body { grid-template-columns:1fr; }
  .peek-left { min-height:200px; }
}
.sched-caption {
  font-size:12px; color:#B7B0A4; line-height:1.4;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  overflow:hidden;
}
.sched-toast {
  position:fixed; bottom:24px; right:24px;
  background:#79B08F; color:#fff;
  padding:10px 18px; border-radius:8px;
  font-size:13px; font-weight:600;
  box-shadow:0 4px 12px rgba(0,0,0,0.4);
  z-index:1000; opacity:0;
  transform:translateY(10px);
  transition:opacity 0.2s, transform 0.2s;
}
.sched-toast.show { opacity:1; transform:translateY(0); }
.sched-toast.error { background:#C2694F; }
