:root {
  --bg: #0e0f13;
  --panel: #16181f;
  --panel-2: #1d2029;
  --line: #2a2e3a;
  --text: #e7e9ee;
  --muted: #9aa0ad;
  --accent: #16d39a;
  --accent-2: #2b8cff;
  --fb: #1877f2; --tiktok: #ff0050; --ig: #e1306c; --yt: #ff0000; --reddit: #ff4500;
  --pos: #16d39a; --neg: #ff5c5c; --neu: #8a90a0;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.brand { font-weight: 800; letter-spacing: .5px; }
.brand span { color: var(--accent); }
.brand em { font-style: normal; color: var(--muted); font-weight: 500; margin-left: 8px; }

/* login */
.login-body { display: flex; align-items: center; justify-content: center; height: 100vh; }
.login-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 32px; width: 320px; display: flex; flex-direction: column; gap: 12px;
}
.login-card .brand { font-size: 22px; text-align: center; }
.login-sub { text-align: center; color: var(--muted); margin-bottom: 8px; }
.login-card input, .login-card button {
  padding: 11px 12px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font-size: 14px;
}
.login-card button { background: var(--accent); color: #06231a; font-weight: 700; cursor: pointer; border: none; }
.login-err { color: var(--neg); font-size: 13px; min-height: 16px; text-align: center; }

/* topbar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--bg); z-index: 5;
}
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.tab, .ghost {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  padding: 7px 13px; border-radius: 8px; cursor: pointer; font-size: 13px;
}
.tab.active { background: var(--accent); color: #06231a; border-color: var(--accent); font-weight: 700; }
.lark-warn { color: #ffcf5c; font-size: 12px; }
.who { color: var(--muted); font-size: 13px; margin-right: 4px; }

/* filters */
.filters {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  padding: 14px 20px; border-bottom: 1px solid var(--line);
}
.filters select, .filters input {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  padding: 8px 10px; border-radius: 8px; font-size: 13px;
}
.filters input#fSearch { min-width: 220px; }
.chk { color: var(--muted); display: flex; align-items: center; gap: 6px; font-size: 13px; }
.count { margin-left: auto; color: var(--muted); }

/* grid */
.grid {
  display: grid; gap: 16px; padding: 20px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; cursor: pointer; transition: border-color .15s, transform .15s;
  display: flex; flex-direction: column;
}
.card:hover { border-color: var(--accent-2); transform: translateY(-2px); }
.thumb { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: var(--panel-2); }
.thumb.placeholder { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 32px; }
.card-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.badge { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 20px; color: #fff; }
.b-Facebook { background: var(--fb); } .b-TikTok { background: var(--tiktok); }
.b-Instagram { background: var(--ig); } .b-YouTube { background: var(--yt); }
.b-Reddit { background: var(--reddit); }
.sent { font-size: 11px; padding: 3px 8px; border-radius: 20px; font-weight: 700; }
.s-Positive { background: rgba(22,211,154,.15); color: var(--pos); }
.s-Negative { background: rgba(255,92,92,.15); color: var(--neg); }
.s-Neutral { background: rgba(138,144,160,.15); color: var(--neu); }
.tag { font-size: 11px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); padding: 2px 7px; border-radius: 6px; }
.author { font-weight: 600; }
.caption { color: var(--muted); font-size: 13px; max-height: 56px; overflow: hidden; }
.meta { display: flex; gap: 12px; color: var(--muted); font-size: 12px; }
.status-pill { font-size: 11px; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line); }
.st-New { color: var(--accent-2); border-color: var(--accent-2); }
.st-Reviewed { color: var(--muted); }
.st-Flagged { color: #ffcf5c; border-color: #ffcf5c; }
.st-Approved { color: var(--accent); border-color: var(--accent); }
.card-actions { display: flex; gap: 6px; padding: 10px 12px; border-top: 1px solid var(--line); }
.card-actions button, .btn {
  flex: 1; font-size: 12px; padding: 7px; border-radius: 7px; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
}
.btn-dl { background: var(--accent-2); border: none; color: #fff; }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; z-index: 20; padding: 20px; }
.modal[hidden] { display: none; }
.modal-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; max-width: 720px; width: 100%; max-height: 90vh; overflow: auto; padding: 20px; }
.modal-card img { width: 100%; border-radius: 10px; margin-bottom: 14px; }
.modal-card h2 { margin: 0 0 6px; font-size: 18px; }
.modal-card .full-cap { white-space: pre-wrap; color: var(--text); margin: 12px 0; }
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.modal-actions button { padding: 9px 14px; }
.notes { width: 100%; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 8px; margin-top: 10px; resize: vertical; }
.close-x { float: right; cursor: pointer; color: var(--muted); font-size: 22px; }
.empty { text-align: center; color: var(--muted); padding: 60px; }
.rank { font-weight: 800; color: var(--accent); margin-right: 6px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--accent); color: var(--text); padding: 10px 18px; border-radius: 10px; z-index: 50; }
.muted { color: var(--muted); }
.comments-wrap { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.comments-head { font-weight: 700; margin-bottom: 10px; }
.cap-note { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 6px; }
.comment { background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; padding: 10px; margin-bottom: 10px; }
.c-head { font-size: 13px; margin-bottom: 4px; }
.c-status { color: var(--accent); font-size: 12px; margin-left: 6px; }
.c-text { font-size: 13px; color: var(--text); margin-bottom: 8px; white-space: pre-wrap; }
.c-reply { display: flex; gap: 6px; }
.c-input { flex: 1; background: var(--bg); border: 1px solid var(--line); color: var(--text); border-radius: 7px; padding: 7px 9px; font-size: 13px; }
.c-reply .btn { flex: 0 0 auto; text-decoration: none; text-align: center; }

/* change-password modal */
.pw-card { max-width: 380px; }
.pw-input {
  width: 100%; background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 10px 12px; font-size: 14px; margin-top: 10px;
}
.pw-error { color: var(--neg); font-size: 13px; margin-top: 10px; }
