* { margin: 0; padding: 0; box-sizing: border-box; }
:root { --bg: #0a0a0a; --card: #141414; --border: #222; --accent: #C8FF00; --text: #fff; --muted: #888; --accent-dim: #3a3f00; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }
.hidden { display: none !important; }
.logo { font-size: 2rem; font-weight: 800; color: var(--accent); letter-spacing: -1px; }
.subtitle { color: var(--muted); font-size: .9rem; }
.error { color: #f44; font-size: .85rem; margin-top: .5rem; }
.muted { color: var(--muted); }
small { font-size: .8rem; }

/* Login */
.login-screen { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box { text-align: center; }
.login-box input { display: block; margin: 1.5rem auto .75rem; padding: .75rem 1rem; width: 260px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 1rem; }
.login-box button { padding: .7rem 2rem; }

/* Buttons */
.btn { background: var(--accent); color: #000; border: none; padding: .5rem 1rem; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: .85rem; }
.btn:hover { opacity: .85; }
.btn-outline { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-outline:hover { background: var(--accent); color: #000; }
.btn:disabled { opacity: .4; cursor: wait; }
.btn-sm { padding: .4rem .75rem; font-size: .8rem; }

/* Header */
header { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 2rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 1rem; }
.header-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Section titles */
.section-title { font-size: 1.1rem; font-weight: 700; padding: 0 2rem; margin: 1.5rem 0 .75rem; }
.section-hint { font-weight: 400; color: var(--muted); font-size: .85rem; }

/* Stats Row */
.stats-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; padding: 1.5rem 2rem; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1rem; }
.stat-card.accent { border-color: var(--accent-dim); background: linear-gradient(135deg, #141400, #1a1a0a); }
.stat-card h4 { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: .4rem; }
.stat-card .value { font-size: 1.6rem; font-weight: 700; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-card .detail { color: var(--muted); font-size: .75rem; margin-top: .2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Priority Cards */
.priority-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: .75rem; padding: 0 2rem 1rem; }
.priority-card { background: var(--card); border: 1px solid var(--accent-dim); border-radius: 12px; padding: 1rem; cursor: pointer; display: flex; gap: .75rem; transition: border-color .2s; }
.priority-card:hover { border-color: var(--accent); }
.priority-rank { font-size: 1.4rem; font-weight: 800; color: var(--accent); min-width: 2rem; }
.priority-info { flex: 1; min-width: 0; }
.priority-info h3 { font-size: .95rem; margin-bottom: .3rem; }
.priority-meta { display: flex; gap: .75rem; font-size: .8rem; color: var(--muted); margin-bottom: .4rem; flex-wrap: wrap; }
.priority-desc { font-size: .8rem; color: #bbb; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.priority-contacts { margin-top: .5rem; display: flex; gap: .75rem; flex-wrap: wrap; font-size: .75rem; }
.priority-contacts a { color: var(--accent); text-decoration: none; }
.priority-contacts a:hover { text-decoration: underline; }
.priority-contacts span { color: var(--muted); }

/* Timeline */
.timeline { padding: 0 2rem 1.5rem; display: flex; flex-direction: column; gap: .25rem; }
.tl-month { display: flex; gap: 1rem; align-items: flex-start; }
.tl-label { font-weight: 700; color: var(--accent); min-width: 3rem; padding-top: .4rem; font-size: .85rem; }
.tl-events { display: flex; flex-wrap: wrap; gap: .4rem; flex: 1; padding: .3rem 0; border-bottom: 1px solid var(--border); }
.tl-event { background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: .3rem .6rem; font-size: .75rem; cursor: pointer; transition: border-color .2s; }
.tl-event:hover { border-color: var(--accent); }
.tl-event strong { display: block; }
.tl-event span { color: var(--muted); font-size: .7rem; }
.tl-event.rel-high { border-left: 3px solid var(--accent); }
.tl-event.rel-medium { border-left: 3px solid #FFD700; }

/* Charts */
.chart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 0 2rem 1.5rem; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem; }
.card h3 { font-size: .8rem; color: var(--muted); margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 1px; }

/* Vertical bar chart */
.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 120px; }
.bar-col { display: flex; flex-direction: column; align-items: center; flex: 1; gap: 4px; }
.bar { background: var(--accent); border-radius: 3px 3px 0 0; width: 100%; min-width: 16px; transition: height .3s; }
.bar-label { font-size: .65rem; color: var(--muted); }
.bar-value { font-size: .7rem; color: var(--text); }

/* Horizontal bar chart */
.bar-chart-h { display: flex; flex-direction: column; gap: .4rem; }
.hbar-row { display: flex; align-items: center; gap: .5rem; }
.hbar-label { font-size: .75rem; color: var(--muted); min-width: 80px; text-align: right; }
.hbar-track { flex: 1; height: 18px; background: #1a1a1a; border-radius: 4px; overflow: hidden; }
.hbar-fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width .3s; }
.hbar-value { font-size: .75rem; color: var(--text); min-width: 20px; }

/* Filters */
.filters { display: flex; gap: .75rem; padding: 0 2rem 1rem; flex-wrap: wrap; }
.filters input, .filters select { padding: .5rem .75rem; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: .85rem; }
.filters input { flex: 1; min-width: 200px; }

/* Table */
.table-wrap { padding: 0 2rem 2rem; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: .6rem .5rem; font-size: .7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); border-bottom: 1px solid var(--border); cursor: pointer; user-select: none; }
th:hover { color: var(--accent); }
td { padding: .6rem .5rem; border-bottom: 1px solid var(--border); font-size: .85rem; vertical-align: top; }
tr:hover td { background: #1a1a1a; }
tr { cursor: pointer; }
.rel-row-high td:first-child { color: var(--accent); }
.type-badge { background: #1a1a1a; padding: .15rem .5rem; border-radius: 4px; font-size: .75rem; }
.contact-cell { white-space: nowrap; }
.contact-cell a { color: var(--accent); text-decoration: none; margin-right: .3rem; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.75); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal-content { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 2rem; max-width: 640px; width: 90%; max-height: 85vh; overflow-y: auto; position: relative; }
.modal-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; color: var(--muted); font-size: 1.2rem; cursor: pointer; }
.modal-content h2 { color: var(--accent); margin-bottom: .25rem; font-size: 1.3rem; }
.modal-relevance { display: inline-block; font-size: .75rem; padding: .2rem .6rem; border-radius: 4px; margin-bottom: 1rem; text-transform: uppercase; font-weight: 600; }
.modal-relevance.rel-high { background: var(--accent-dim); color: var(--accent); }
.modal-relevance.rel-medium { background: #3a3500; color: #FFD700; }
.modal-relevance.rel-low { background: #1a1a1a; color: var(--muted); }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: .75rem; }
.modal-content .field { margin: .5rem 0; }
.modal-content .field label { color: var(--muted); font-size: .7rem; text-transform: uppercase; display: block; margin-bottom: .15rem; }
.modal-content .field p { font-size: .9rem; line-height: 1.5; }
.modal-contacts { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.modal-contacts h3 { font-size: .8rem; text-transform: uppercase; color: var(--muted); margin-bottom: .5rem; }
.contact-link { display: block; color: var(--accent); text-decoration: none; font-size: .85rem; margin-bottom: .3rem; word-break: break-all; }
.contact-link:hover { text-decoration: underline; }

/* Feedback */
.fb-btn { background: none; border: 1px solid var(--border); border-radius: 6px; padding: .2rem .4rem; cursor: pointer; font-size: .85rem; transition: all .2s; }
.fb-btn:hover { border-color: var(--accent); }
.fb-up:hover { background: #1a2a00; }
.fb-down:hover { background: #2a0a0a; }
.fb-cell { white-space: nowrap; }
.fb-inline { display: inline-flex; gap: .3rem; align-items: center; }
.fb-clear { background: none; border: none; color: var(--muted); cursor: pointer; font-size: .7rem; padding: .1rem .3rem; }
.fb-clear:hover { color: var(--text); }
.feedback-badge { font-size: .9rem; }
.feedback-badge.fb-down { opacity: .7; }
.flagged { opacity: .5; }
.flagged:hover { opacity: .8; }
.priority-header { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; }
.priority-opp { font-size: .75rem; color: var(--accent); margin-top: .3rem; font-style: italic; }
.modal-top-row { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.feedback-note { background: #1a1a00; border: 1px solid var(--accent-dim); border-radius: 8px; padding: .5rem .75rem; font-size: .8rem; margin-bottom: 1rem; color: var(--muted); }
.feedback-reasons { display: flex; flex-wrap: wrap; gap: .5rem; }
.feedback-reason-btn { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: .5rem 1rem; color: var(--text); cursor: pointer; font-size: .85rem; transition: all .2s; }
.feedback-reason-btn:hover { border-color: var(--accent); background: #1a1a0a; }

/* Tab Bar */
.tab-bar { display: flex; gap: 0; padding: 0 2rem; border-bottom: 1px solid var(--border); }
.tab-btn { background: none; border: none; color: var(--muted); padding: .75rem 1.25rem; font-size: .9rem; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; transition: all .2s; }
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* GA Reports — Premium Analytics */
.ga-header { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 2rem; flex-wrap: wrap; gap: 1rem; }
.ga-header-left { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.ga-title { font-size: 1.3rem; font-weight: 700; color: var(--text); }
.ga-period { color: var(--accent); font-size: .9rem; font-weight: 600; background: var(--accent-dim); padding: .3rem .8rem; border-radius: 20px; }
.ga-select-wrap { position: relative; }
.ga-select-wrap select { appearance: none; -webkit-appearance: none; padding: .55rem 2.2rem .55rem .9rem; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: .85rem; font-weight: 500; cursor: pointer; transition: border-color .2s; }
.ga-select-wrap select:hover, .ga-select-wrap select:focus { border-color: var(--accent); outline: none; }
.ga-select-wrap::after { content: '▾'; position: absolute; right: .8rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; font-size: .75rem; }

.ga-stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 0 2rem 1.5rem; }
.ga-stat-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem; transition: all .25s; position: relative; overflow: hidden; }
.ga-stat-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(200,255,0,.03), transparent); opacity: 0; transition: opacity .25s; }
.ga-stat-card:hover::before { opacity: 1; }
.ga-stat-card:hover { border-color: #333; }
.ga-stat-label { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: .5rem; }
.ga-stat-value { font-size: 2rem; font-weight: 800; color: var(--text); line-height: 1; margin-bottom: .4rem; }
.ga-stat-change { display: inline-flex; align-items: center; gap: .25rem; font-size: .75rem; font-weight: 600; padding: .15rem .5rem; border-radius: 20px; }
.ga-stat-change.positive { background: rgba(76,175,80,.15); color: #4caf50; }
.ga-stat-change.negative { background: rgba(244,67,54,.15); color: #f44336; }
.ga-stat-change.neutral { background: rgba(136,136,136,.15); color: #888; }
.ga-stat-sub { color: var(--muted); font-size: .7rem; margin-left: .25rem; }

.ga-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 0 2rem 1rem; }
.ga-grid-full { grid-template-columns: 1fr; }
.ga-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem; }
.ga-card-header { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.ga-card-header h3 { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; flex: 1; }
.ga-card-icon { font-size: 1rem; }

.ga-ranked-list { display: flex; flex-direction: column; gap: .5rem; }
.ga-rank-item { display: flex; align-items: center; gap: .65rem; }
.ga-rank-num { font-size: .7rem; font-weight: 700; color: var(--muted); min-width: 1.5rem; text-align: center; }
.ga-rank-num.top { color: var(--accent); font-size: .8rem; }
.ga-rank-info { flex: 1; min-width: 0; }
.ga-rank-label { font-size: .82rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.ga-rank-bar { height: 4px; background: #1a1a1a; border-radius: 2px; margin-top: 3px; overflow: hidden; }
.ga-rank-bar-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width .4s ease; }
.ga-rank-value { font-size: .8rem; font-weight: 600; color: var(--accent); min-width: 2.5rem; text-align: right; }

.ga-devices-wrap { display: flex; flex-direction: column; gap: 1rem; }
.ga-device-item { display: flex; align-items: center; gap: .75rem; }
.ga-device-icon { font-size: 1.3rem; min-width: 2rem; text-align: center; }
.ga-device-info { flex: 1; }
.ga-device-name { font-size: .85rem; color: var(--text); margin-bottom: .25rem; }
.ga-device-bar { height: 6px; background: #1a1a1a; border-radius: 3px; overflow: hidden; }
.ga-device-bar-fill { height: 100%; border-radius: 3px; transition: width .4s ease; }
.ga-device-pct { font-size: .85rem; font-weight: 700; color: var(--text); min-width: 3rem; text-align: right; }

.ga-legend { display: flex; gap: 1rem; margin-left: auto; }
.ga-legend-item { display: flex; align-items: center; gap: .35rem; font-size: .75rem; color: var(--muted); }
.ga-legend-dot { width: 8px; height: 8px; border-radius: 50%; }

.ga-history-chart { display: flex; align-items: flex-end; gap: 2px; height: 160px; padding-top: .5rem; }
.ga-history-group { display: flex; flex-direction: column; align-items: center; flex: 1; gap: 4px; height: 100%; }
.ga-history-bars { display: flex; align-items: flex-end; gap: 2px; flex: 1; width: 100%; }
.ga-history-bar { flex: 1; border-radius: 3px 3px 0 0; transition: height .4s ease; min-height: 2px; position: relative; }
.ga-history-bar:hover { opacity: .85; }
.ga-history-bar .ga-bar-tooltip { display: none; position: absolute; top: -1.5rem; left: 50%; transform: translateX(-50%); background: #333; color: #fff; font-size: .65rem; padding: .15rem .4rem; border-radius: 4px; white-space: nowrap; }
.ga-history-bar:hover .ga-bar-tooltip { display: block; }
.ga-history-label { font-size: .65rem; color: var(--muted); white-space: nowrap; }

/* Modal banner image */
.modal-banner { margin: -1.5rem -1.5rem 1rem -1.5rem; overflow: hidden; border-radius: 12px 12px 0 0; }
.modal-banner img { width: 100%; max-height: 200px; object-fit: cover; display: block; }

/* Register button */
.register-btn { display: inline-block; margin: 1rem 0; padding: .75rem 1.5rem; font-size: 1rem; text-decoration: none; text-align: center; border-radius: 10px; }

/* Places / Local Partners */
.places-stats { grid-template-columns: repeat(4, 1fr); }
.place-status-select { padding: .3rem .5rem; border-radius: 6px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: .75rem; cursor: pointer; }
.place-status-select:focus { border-color: var(--accent); outline: none; }
.status-interested { border-color: #4caf50; color: #4caf50; }
.status-notinterested { border-color: #f44336; color: #f44336; opacity: .6; }
.status-active { border-color: var(--accent); color: var(--accent); }
.status-saved { color: #4caf50; font-size: .75rem; margin-left: .3rem; }

@media (max-width: 768px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .chart-row { grid-template-columns: 1fr; }
  .priority-grid { grid-template-columns: 1fr; }
  .modal-grid { grid-template-columns: 1fr; }
  header { padding: 1rem; }
  .section-title, .stats-row, .priority-grid, .filters, .table-wrap, .chart-row, .timeline { padding-left: 1rem; padding-right: 1rem; }
  .ga-stats-row { grid-template-columns: repeat(2, 1fr); }
  .ga-grid { grid-template-columns: 1fr; }
  .tab-bar { padding: 0 1rem; }
  .ga-header { padding: 1rem; }
  .ga-stats-row { padding: 0 1rem 1rem; }
  .ga-grid { padding: 0 1rem 1rem; }
  .places-stats { grid-template-columns: repeat(2, 1fr); }
}

/* Modal navigation */
.modal-nav { display:flex; justify-content:space-between; align-items:center; padding:1rem 0 0; margin-top:1rem; border-top:1px solid var(--border); }
.modal-nav-btn { cursor:pointer; color:var(--accent); font-size:.85rem; padding:.3rem .8rem; border-radius:6px; transition:background .15s; user-select:none; }
.modal-nav-btn:hover { background:var(--accent-dim); }
.modal-nav-count { color:var(--muted); font-size:.8rem; }

/* Approach strategy */
.approach-strategy { background:rgba(200,255,0,0.06); border:1px solid var(--accent-dim); border-radius:10px; padding:1rem; margin:.5rem 0; }
.approach-strategy label { color:var(--accent); }

/* Status saved indicator */
.status-saved { color:var(--accent); font-size:.8rem; margin-left:.5rem; animation:fadeIn .3s; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

/* ========== Instagram Content Approval ========== */
.ig-stats-row { grid-template-columns: repeat(5, 1fr); }

/* Upload zone */
.ig-upload-section { padding: 0 2rem 1rem; }
.ig-dropzone { border: 2px dashed var(--border); border-radius: 12px; padding: 2rem; text-align: center; cursor: pointer; transition: all .2s; }
.ig-dropzone:hover, .ig-dropzone.ig-dragover { border-color: var(--accent); background: rgba(200,255,0,.03); }
.ig-dropzone-icon { font-size: 2.5rem; display: block; margin-bottom: .5rem; }
.ig-dropzone p { color: var(--muted); font-size: .9rem; }
.ig-progress { width: 100%; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin: 1rem 0; }
.ig-progress-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.3s; width: 0; }
.ig-upload-status { text-align: center; color: var(--muted); font-size: 0.9rem; margin: 0.5rem 0; }
.ig-file-label { color: var(--accent); cursor: pointer; text-decoration: underline; }

.ig-upload-preview { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem; }
.ig-preview-images { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.ig-preview-images img { width: 120px; height: 120px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.ig-upload-form { display: flex; flex-direction: column; gap: .5rem; }
.ig-upload-form select, .ig-upload-form textarea, .ig-upload-form input { padding: .5rem .75rem; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: .85rem; }
.ig-upload-form textarea { resize: vertical; font-family: inherit; }
.ig-upload-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Filter bar */
.ig-filters { display: flex; justify-content: space-between; align-items: center; padding: 0 2rem 1rem; gap: 1rem; flex-wrap: wrap; }
.ig-filter-tabs { display: flex; gap: 0; }
.ig-filter-btn { background: none; border: 1px solid var(--border); color: var(--muted); padding: .4rem .9rem; font-size: .8rem; cursor: pointer; transition: all .2s; }
.ig-filter-btn:first-child { border-radius: 8px 0 0 8px; }
.ig-filter-btn:last-child { border-radius: 0 8px 8px 0; }
.ig-filter-btn:not(:last-child) { border-right: none; }
.ig-filter-btn.active { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 600; }
.ig-filter-btn:hover:not(.active) { color: var(--text); border-color: #444; }
.ig-filters select { padding: .4rem .75rem; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: .8rem; }

/* Card grid */
.ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; padding: 0 2rem 2rem; }
.ig-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; cursor: pointer; transition: all .2s; }
.ig-card:hover { border-color: #444; transform: translateY(-2px); }
.ig-card-selected { border-color: var(--accent) !important; box-shadow: 0 0 0 2px var(--accent-dim); }

.ig-card-media { position: relative; aspect-ratio: 1; background: #111; overflow: hidden; }
.ig-card-media img { width: 100%; height: 100%; object-fit: cover; }
.ig-no-media { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 3rem; color: var(--muted); background: #111; }
.ig-media-count { position: absolute; top: .5rem; right: .5rem; background: rgba(0,0,0,.7); color: #fff; padding: .2rem .5rem; border-radius: 4px; font-size: .7rem; }
.ig-type-badge { position: absolute; top: .5rem; left: .5rem; background: rgba(0,0,0,.7); padding: .2rem .4rem; border-radius: 4px; font-size: .75rem; }

.ig-card-body { padding: .75rem; }
.ig-status { display: inline-block; font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: .15rem .5rem; border-radius: 4px; margin-bottom: .4rem; }
.ig-status-draft { background: #333; color: var(--muted); }
.ig-status-pending { background: rgba(245,158,11,.15); color: #f59e0b; }
.ig-status-approved { background: rgba(34,197,94,.15); color: #22c55e; }
.ig-status-posted { background: rgba(59,130,246,.15); color: #3b82f6; }
.ig-status-rejected { background: rgba(239,68,68,.15); color: #ef4444; }

.ig-caption-preview { font-size: .8rem; color: #ccc; line-height: 1.4; margin: .3rem 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ig-hashtags-preview { font-size: .7rem; color: var(--accent); opacity: .7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-scheduled { font-size: .7rem; color: var(--muted); margin-top: .3rem; }

.ig-card-actions { display: flex; border-top: 1px solid var(--border); }
.ig-action-btn { flex: 1; background: none; border: none; border-right: 1px solid var(--border); padding: .5rem; cursor: pointer; font-size: .85rem; transition: background .15s; color: var(--text); }
.ig-action-btn:last-child { border-right: none; }
.ig-action-btn:hover { background: #1a1a1a; }
.ig-action-btn.ig-approve:hover { background: rgba(34,197,94,.1); }
.ig-action-btn.ig-reject:hover { background: rgba(239,68,68,.1); }
.ig-action-btn.ig-delete:hover { background: rgba(239,68,68,.15); }

.ig-empty { grid-column: 1/-1; text-align: center; padding: 3rem; color: var(--muted); font-size: 1rem; }

/* Upload preview inline */
.ig-upload-preview-inline { text-align: left; }
.ig-preview-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .75rem; }
.ig-type-indicator { background: var(--accent-dim); color: var(--accent); padding: .3rem .8rem; border-radius: 20px; font-size: .85rem; font-weight: 600; }
.ig-preview-thumbs { display: flex; gap: .5rem; flex-wrap: wrap; }
.ig-preview-thumb-wrap { position: relative; }
.ig-preview-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.ig-preview-remove { position: absolute; top: -6px; right: -6px; background: #ef4444; color: #fff; border: none; border-radius: 50%; width: 20px; height: 20px; font-size: .7rem; cursor: pointer; line-height: 1; display: flex; align-items: center; justify-content: center; }
.ig-preview-remove:hover { background: #dc2626; }
.ig-multi-choice { padding: 1rem 0; }

/* Carousel thumbnail strip in cards */
.ig-carousel-strip { display: flex; gap: 3px; padding: 4px 6px; background: #111; overflow-x: auto; }
.ig-carousel-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.ig-carousel-more { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; background: var(--card); border-radius: 4px; font-size: .75rem; color: var(--muted); flex-shrink: 0; }

/* Schedule options */
.ig-schedule-options { margin-top: 1rem; }

/* Edit modal extras */
.ig-edit-media { margin-bottom: 1rem; text-align: center; }
.ig-edit-form label { display: block; color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: 1px; margin: .5rem 0 .2rem; }
.ig-feedback-history { max-height: 150px; overflow-y: auto; }
.ig-feedback-item { font-size: .8rem; padding: .3rem 0; border-bottom: 1px solid var(--border); }

@media (max-width: 1024px) { .ig-grid { grid-template-columns: repeat(2, 1fr); } }
/* n8n status badges */
.ig-n8n-status { font-size:.7rem; padding:2px 8px; border-radius:4px; text-align:center; font-weight:600; margin:0 .5rem .25rem; }
.ig-n8n-queued { background:#3b82f6; color:#fff; }
.ig-n8n-scheduled { background:#8b5cf6; color:#fff; }
.ig-n8n-posting { background:#f59e0b; color:#000; }
.ig-n8n-posted { background:#22c55e; color:#000; }
.ig-n8n-failed { background:#ef4444; color:#fff; }
.ig-n8n-error { font-size:.65rem; color:#ef4444; padding:0 .5rem .25rem; text-align:center; }

@media (max-width: 768px) {
  .ig-grid { grid-template-columns: 1fr; }
  .ig-stats-row { grid-template-columns: repeat(2, 1fr); }
  .ig-upload-section, .ig-filters, .ig-grid { padding-left: 1rem; padding-right: 1rem; }
}

/* ========== Instagram Strategy Panel ========== */
.ig-strategy-section { margin: 0 1.5rem 1rem; }
.ig-strategy-toggle { display: flex; align-items: center; justify-content: space-between; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: .75rem 1.25rem; cursor: pointer; font-size: 1rem; font-weight: 600; transition: background .2s; }
.ig-strategy-toggle:hover { background: #1a1a1a; }
.ig-strategy-arrow { font-size: .8rem; color: var(--muted); transition: transform .2s; }
.ig-strategy-panel { margin-top: .5rem; animation: fadeIn .2s; }
.ig-strategy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 1rem; }

.strat-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.strat-card-wide { grid-column: 1 / -1; }
.strat-card-header { display: flex; align-items: center; justify-content: space-between; padding: .75rem 1rem; cursor: pointer; border-bottom: 1px solid var(--border); }
.strat-card-header h3 { font-size: .95rem; font-weight: 600; }
.strat-toggle { color: var(--muted); font-size: .85rem; }
.strat-collapsed .strat-card-body { display: none; }
.strat-collapsed .strat-toggle { transform: rotate(0); }
.strat-card-body { padding: 1rem; }

.strat-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.strat-table th { text-align: left; padding: .4rem .5rem; color: var(--muted); border-bottom: 1px solid var(--border); font-weight: 500; }
.strat-table td { padding: .4rem .5rem; border-bottom: 1px solid #1a1a1a; }

.strat-pillar { margin-bottom: .75rem; }
.strat-pillar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .25rem; font-size: .85rem; }
.strat-pct { color: var(--accent); font-weight: 700; }
.strat-pillar-bar { height: 6px; background: #222; border-radius: 3px; overflow: hidden; }
.strat-pillar-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width .3s; }
.strat-pillar-desc { font-size: .78rem; color: var(--muted); margin-top: .2rem; }

.strat-hashtag-set { margin-bottom: .75rem; }
.strat-hashtag-set strong { font-size: .82rem; display: block; margin-bottom: .25rem; }
.strat-hashtags { font-size: .78rem; color: #7B93DB; background: #111; border: 1px solid #1a1a1a; border-radius: 8px; padding: .5rem .75rem; cursor: pointer; position: relative; word-break: break-all; transition: border-color .2s; }
.strat-hashtags:hover { border-color: var(--accent); }
.strat-copy-hint { display: none; position: absolute; top: -1.5rem; right: .5rem; font-size: .7rem; color: var(--muted); }
.strat-hashtags:hover .strat-copy-hint { display: block; }
.strat-hashtags.strat-copied { border-color: #22c55e; }
.strat-hashtags.strat-copied::after { content: '✓ Copied!'; position: absolute; top: -1.5rem; right: .5rem; font-size: .7rem; color: #22c55e; }

.strat-times-grid { display: flex; flex-direction: column; gap: .4rem; }
.strat-time-row { display: flex; align-items: center; gap: .75rem; font-size: .82rem; padding: .35rem 0; border-bottom: 1px solid #1a1a1a; }
.strat-time-day { font-weight: 600; min-width: 90px; }
.strat-time-val { color: var(--accent); font-weight: 500; min-width: 120px; }
.strat-time-note { color: var(--muted); font-size: .75rem; }
.strat-note { font-size: .8rem; color: var(--muted); margin-top: .75rem; padding: .5rem; background: #111; border-radius: 8px; }

.strat-weeks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.strat-week h4 { font-size: .85rem; color: var(--accent); margin-bottom: .5rem; }
.strat-checklist { list-style: none; font-size: .8rem; }
.strat-checklist li { padding: .25rem 0; }
.strat-checklist label { display: flex; align-items: flex-start; gap: .4rem; cursor: pointer; }
.strat-checklist input[type="checkbox"] { accent-color: var(--accent); margin-top: 2px; flex-shrink: 0; }
.strat-checklist input[type="checkbox"]:checked + span,
.strat-checklist label:has(input:checked) { text-decoration: line-through; color: var(--muted); }

@media (max-width: 600px) { .ig-strategy-grid { grid-template-columns: 1fr; } .strat-weeks-grid { grid-template-columns: 1fr; } }

/* Instagram Analytics */
.ig-insights-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 1rem; }
.ig-insight-card { background: var(--card-bg, #1e1e2e); border-radius: 12px; padding: 16px; text-align: center; border: 1px solid var(--border, #333); }
.ig-insight-icon { font-size: 1.5rem; margin-bottom: 4px; }
.ig-insight-val { font-size: 1.4rem; font-weight: 700; color: var(--accent, #4ecdc4); }
.ig-insight-label { font-size: 0.75rem; color: var(--muted, #888); margin-top: 2px; }
.ig-insight-change { font-size: 0.85rem; font-weight: 600; margin-top: 4px; }

.ig-chart-container { background: var(--card-bg, #1e1e2e); border-radius: 12px; padding: 16px; border: 1px solid var(--border, #333); }
.ig-chart { display: flex; align-items: flex-end; gap: 2px; height: 150px; overflow-x: auto; }
.ig-chart-bar-group { display: flex; flex-direction: column; align-items: center; flex: 1; min-width: 12px; height: 100%; position: relative; display: flex; flex-direction: row; align-items: flex-end; gap: 1px; }
.ig-chart-bar { width: 6px; border-radius: 2px 2px 0 0; min-height: 1px; transition: height 0.3s; }
.ig-bar-impressions { background: var(--accent, #4ecdc4); }
.ig-bar-reach { background: #ff6b6b; }
.ig-chart-label { position: absolute; bottom: -18px; font-size: 0.55rem; color: var(--muted, #888); white-space: nowrap; }
.ig-chart-legend { display: flex; gap: 16px; justify-content: center; margin-top: 24px; font-size: 0.8rem; color: var(--muted, #888); }
.ig-legend-dot { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }

.ig-top-posts { display: flex; flex-direction: column; gap: 8px; }
.ig-top-post { background: var(--card-bg, #1e1e2e); border-radius: 10px; padding: 12px; border: 1px solid var(--border, #333); cursor: pointer; transition: border-color 0.2s; }
.ig-top-post:hover { border-color: var(--accent, #4ecdc4); }
.ig-top-post-header { display: flex; gap: 12px; align-items: center; }
.ig-top-post-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.ig-top-post-thumb-placeholder { width: 64px; height: 64px; background: var(--border, #333); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; flex-shrink: 0; }
.ig-top-post-caption { font-size: 0.85rem; margin: 0 0 6px; line-height: 1.3; }
.ig-top-post-metrics { display: flex; gap: 10px; font-size: 0.8rem; color: var(--muted, #888); flex-wrap: wrap; }
.ig-post-details { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border, #333); font-size: 0.8rem; color: var(--muted, #888); }
.ig-post-details p { margin: 4px 0; }

/* Weekly Content Calendar */
.cal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.cal-week { font-size: 1.1rem; font-weight: 600; color: var(--accent, #C8FF00); }
.cal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.cal-card { background: var(--card, #1a1a1a); border-radius: 12px; padding: 1rem; transition: transform 0.15s; }
.cal-card:hover { transform: translateY(-2px); }
.cal-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.cal-card-header strong { font-size: 1rem; }
.cal-card-pillar { font-size: 0.85rem; font-weight: 600; margin-bottom: .4rem; }
.cal-card-type { font-size: 0.8rem; color: var(--muted, #888); margin-bottom: .5rem; }
.cal-card-concept { font-size: 0.85rem; line-height: 1.4; margin-bottom: .5rem; }
.cal-card-caption { font-size: 0.8rem; color: var(--muted, #888); font-style: italic; margin-bottom: .4rem; line-height: 1.3; }
.cal-card-hashtags { font-size: 0.75rem; color: #7B61FF; margin-bottom: .3rem; }
.cal-card-notes { font-size: 0.8rem; color: var(--muted, #888); padding-top: .4rem; border-top: 1px solid var(--border, #333); }
