/* /assets/style.css */
:root {
  --bg: #0f172a;
  --panel: #111c33;
  --card: #0b1226;
  --muted: #a8b3cf;
  --text: #e7ecff;
  --accent: #3aa0ff;
  --accent2: #25d4a6;
  --danger: #ff4d4d;
  --border: rgba(255,255,255,.08);
}

* { box-sizing: border-box; }

html, body { width: 100%; overflow-x: hidden; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(1200px 700px at 20% 0%, #172554 0%, transparent 60%),
    radial-gradient(900px 600px at 90% 10%, #064e3b 0%, transparent 55%),
    var(--bg);
  color: var(--text);
}

/* ===== GLOBAL SAFE ===== */
img, video { max-width: 100%; height: auto; }
pre, code { max-width: 100%; overflow-x: auto; }

/* ===== CONTAINER (legacy pages) ===== */
.container {
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  padding: 18px;
}

/* ===== TOPBAR (legacy pages) ===== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(17,28,51,.75);
  backdrop-filter: blur(8px);
  min-width: 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 240px;
}

.logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #061022;
  flex: 0 0 auto;
}

.brand h1 { margin: 0; font-size: 16px; }
.brand p { margin: 0; font-size: 12px; color: var(--muted); }

/* ===== SEARCH (legacy pages) ===== */
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 280px;
  justify-content: flex-end;
}

.search input {
  width: 280px;
  max-width: 48vw;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(11,18,38,.8);
  color: var(--text);
  outline: none;
  min-width: 0;
}

.search button {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(58,160,255,.18);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}

.search button:hover { background: rgba(58,160,255,.28); }

/* ===== FEED ===== */
.feed {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ===== CARD ===== */
.card {
  border: 1px solid var(--border);
  background: rgba(11,18,38,.85);
  border-radius: 18px;
  padding: 14px;
  overflow: hidden;
  min-width: 0;
}

.card.clickable { cursor: pointer; }

.cardHead {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.metaLeft { display: flex; gap: 10px; min-width: 0; }

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(58,160,255,.18);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--accent);
  flex: 0 0 auto;
}

.metaTitle {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.metaTitle .t {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metaTitle .s { font-size: 12px; color: var(--muted); }

.badges { display: flex; gap: 8px; flex: 0 0 auto; }

.badge {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
}

.badge.pin {
  color: #ffe08a;
  border-color: rgba(255,224,138,.25);
  background: rgba(255,224,138,.08);
}

/* ===== BODY CONTENT ===== */
.cardBody {
  margin-top: 10px;
  line-height: 1.55;
  color: #dfe7ff;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.cardBody a { color: var(--accent); text-decoration: none; }
.cardBody a:hover { text-decoration: underline; }

/* ===== MEDIA ===== */
.media {
  margin-top: 10px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.media img, .media video {
  display: block;
  width: 100%;
  height: auto;
  background: #000;
}

/* ===== BUTTONS ===== */
.btnRow {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btnRow a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(58,160,255,.14);
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
}

.btnRow a:hover { background: rgba(58,160,255,.24); }
.btnRow a.disabled { opacity: .45; pointer-events: none; }

/* ===== FOOT ===== */
.cardFoot {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.eye { display: flex; gap: 6px; align-items: center; }
.eye .dot { width: 6px; height: 6px; border-radius: 999px; background: rgba(168,179,207,.6); }

.smallLink { color: var(--muted); text-decoration: none; }
.smallLink:hover { color: #fff; }

/* ===== EMPTY ===== */
.empty {
  padding: 22px;
  border: 1px dashed rgba(255,255,255,.18);
  border-radius: 18px;
  text-align: center;
  color: var(--muted);
  background: rgba(17,28,51,.35);
}

/* ===== MOBILE (legacy pages) ===== */
@media (max-width: 560px) {
  .container { padding: 12px; }

  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 10px 12px;
    flex-wrap: nowrap;
  }

  .brand, .search { flex: 0 0 auto; }

  .brand { gap: 8px; }

  .brand h1 { font-size: 15px; line-height: 1.2; }
  .brand p { font-size: 11px; line-height: 1.3; }

  .search {
    width: 100%;
    justify-content: flex-start;
    gap: 6px;
    margin-top: 2px;
  }

  .search input {
    flex: 1 1 auto;
    width: auto;
    max-width: 100%;
    min-width: 0;
    height: 38px;
    padding: 8px 12px;
  }

  .search button {
    flex: 0 0 auto;
    height: 38px;
    padding: 8px 12px;
  }

  .feed { margin-top: 8px; }

  .metaTitle .t { white-space: normal; }
}
/* ===== Global Admin Topbar (untuk class lama: topbar/adminMenu) ===== */
.topbar{
  position: sticky;
  top: 0;
  z-index: 999;
  backdrop-filter: blur(10px);
  background: rgba(10,16,32,0.82);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.adminMenu{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.smallLink{
  color: rgba(255,255,255,0.86);
  text-decoration:none;
  padding: 10px 12px;
  border-radius: 10px;
  line-height: 1;
  border: 1px solid transparent;
  user-select:none;
}

.smallLink:hover{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.08);
}

.dd{position: relative;display:inline-flex;}
.ddBtn{display:inline-flex;align-items:center;gap:8px;}
.ddCaret{
  width:0;height:0;
  border-left:5px solid transparent;
  border-right:5px solid transparent;
  border-top:6px solid rgba(255,255,255,0.75);
  transform: translateY(1px);
}

.ddMenu{
  position:absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(12,18,36,0.98);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
  display:none;
  z-index: 9999;
}
.ddMenu.open{display:block;}

.ddItem{
  display:block;
  padding: 10px 10px;
  border-radius: 10px;
  text-decoration:none;
  color: rgba(255,255,255,0.88);
  border: 1px solid transparent;
}

.ddItem:hover{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.08);
}

@media (max-width: 720px){
  .adminMenu{justify-content:flex-start;}
  .ddMenu{left:auto; right:0;}
}
