/* ==================================================================
   ruangmu — lembar gaya
   Mobile-first, minimalis terang ala Threads.
   ================================================================== */

/* ---------- 1. Token ---------- */

:root {
  color-scheme: light;

  --bg: #ffffff;
  --bg-elevated: #ffffff;
  --bg-soft: #f6f6f6;
  --bg-hover: #f4f4f4;
  --field: #f3f3f3;
  --field-focus: #ffffff;

  --text: #0d0d0d;
  --text-soft: #3f3f3f;
  --muted: #8c8c8c;
  --muted-strong: #6a6a6a;

  --line: #ededed;
  --line-strong: #dcdcdc;

  --like: #f0245a;
  --link: #0f766e;
  --danger: #c81e3c;
  --unread-bg: #f6faf9;

  --shadow: 0 12px 34px rgba(0, 0, 0, 0.07);
  --shadow-soft: 0 2px 10px rgba(0, 0, 0, 0.04);

  --topbar-h: 56px;
  --nav-h: 54px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg: #000000;
  --bg-elevated: #0d0d0d;
  --bg-soft: #0a0a0a;
  --bg-hover: #151515;
  --field: #151515;
  --field-focus: #101010;

  --text: #f4f4f4;
  --text-soft: #d4d4d4;
  --muted: #8a8a8a;
  --muted-strong: #a3a3a3;

  --line: #1e1e1e;
  --line-strong: #2e2e2e;

  --like: #ff4d6d;
  --link: #5eead4;
  --danger: #ff7a8a;
  --unread-bg: #0b1413;

  --shadow: 0 12px 34px rgba(0, 0, 0, 0.55);
  --shadow-soft: 0 2px 10px rgba(0, 0, 0, 0.35);
}

/* ---------- 2. Reset & dasar ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg-soft);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, p, figure, blockquote {
  margin: 0;
}

a {
  color: inherit;
}

img, svg {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
  border-radius: 6px;
}

::selection {
  background: var(--text);
  color: var(--bg);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 0 0 12px 0;
  z-index: 100;
  font-size: 14px;
  text-decoration: none;
}

.skip-link:focus {
  left: 0;
}

/* ---------- 3. Kerangka ---------- */

.app {
  position: relative;
  width: 100%;
  max-width: 640px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
}

.main {
  padding-bottom: calc(var(--nav-h) + 26px + env(safe-area-inset-bottom));
  min-height: 60dvh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 6px;
  height: var(--topbar-h);
  padding: 0 8px 0 16px;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
}

[data-theme="dark"] .topbar {
  background: rgba(0, 0, 0, 0.78);
}

.brand {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.055em;
  color: var(--text);
  text-decoration: none;
  line-height: 1;
  padding: 6px 2px;
}

.brand-dot {
  color: var(--like);
}

.topbar-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-left: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
}

.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s ease, transform 0.12s ease;
}

.icon-btn:hover {
  background: var(--bg-hover);
}

.icon-btn:active {
  transform: scale(0.93);
}

.dot {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--like);
  box-shadow: 0 0 0 2px var(--bg);
}

.theme-sun {
  display: none;
}

[data-theme="dark"] .theme-sun {
  display: grid;
}

[data-theme="dark"] .theme-moon {
  display: none;
}

/* ---------- 4. Navigasi bawah ---------- */

.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 640px;
  z-index: 50;
  display: flex;
  align-items: stretch;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--line);
}

[data-theme="dark"] .tabbar {
  background: rgba(0, 0, 0, 0.82);
}

.tab {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease, transform 0.12s ease;
}

.tab:active {
  transform: scale(0.92);
}

.tab.is-active {
  color: var(--text);
}

.tab.is-active .ic {
  stroke-width: 2.3;
}

.tab-plus {
  color: var(--text);
}

.tab-plus .ic {
  stroke-width: 2.1;
}

.nav-badge {
  position: absolute;
  top: 7px;
  left: calc(50% + 3px);
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--like);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 2px var(--bg);
}

/* ---------- 5. Tombol & form ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s ease, transform 0.1s ease, background 0.15s ease;
}

.btn:hover {
  opacity: 0.88;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  opacity: 1;
}

.btn-soft {
  background: var(--field);
  color: var(--text);
}

.btn-soft:hover {
  background: var(--bg-hover);
  opacity: 1;
}

.btn-sm {
  height: 32px;
  padding: 0 14px;
  font-size: 13px;
}

.btn-wide {
  width: 100%;
}

.btn-follow.is-following {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}

.btn-follow.is-following:hover {
  background: var(--bg-hover);
  opacity: 1;
}

.field {
  display: block;
  margin-bottom: 14px;
}

.field > label,
.field-label {
  display: block;
  margin: 0 0 6px 2px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted-strong);
  letter-spacing: 0.01em;
}

.input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--field);
  color: var(--text);
  font-size: 15px;
  line-height: 1.4;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.input:focus {
  border-color: var(--line-strong);
  background: var(--field-focus);
}

.input::placeholder {
  color: var(--muted);
}

textarea.input {
  min-height: 92px;
  resize: vertical;
  line-height: 1.5;
}

select.input {
  appearance: none;
}

.hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.alert {
  margin-bottom: 16px;
  padding: 11px 14px;
  border: 1px solid #fecdd3;
  border-radius: 12px;
  background: #fff1f2;
  color: #b42318;
  font-size: 13.5px;
  line-height: 1.45;
}

[data-theme="dark"] .alert {
  border-color: #4c1d24;
  background: #1c0c10;
  color: #ff9aa6;
}

/* ---------- 6. Avatar ---------- */

.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1;
  user-select: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .avatar {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.avatar-pixel {
  display: inline-block;
  padding: 0;
  overflow: hidden;
  border-radius: 50%;
  background: var(--field);
  line-height: 0;
}

.avatar-pixel svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- Lencana bintang ---------- */

.star-wrap {
  display: inline-flex;
  flex: none;
  line-height: 0;
  vertical-align: -2px;
}

.star {
  display: block;
}

.star--1 { fill: #8f9aa6; }
.star--2 { fill: #d9a62e; }
.star--3 { fill: #5fc9ea; }
.star--4 { fill: #b0123f; }
.star--5 { fill: #0f0f13; stroke: #e8c15a; stroke-width: 1.1; }

[data-theme="dark"] .star--1 { fill: #c2cbd5; }
[data-theme="dark"] .star--2 { fill: #edbb4b; }
[data-theme="dark"] .star--3 { fill: #7bd8f2; }
[data-theme="dark"] .star--4 { fill: #e24668; }
[data-theme="dark"] .star--5 { fill: #17171f; stroke: #f0cf72; }

.profile-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.user-row-name .star-wrap {
  margin-left: 4px;
  vertical-align: -1px;
}

.level-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.level-row:last-of-type {
  border-bottom: 0;
  padding-bottom: 2px;
}

.level-row-text {
  flex: 1;
  min-width: 0;
}

.level-row-name {
  font-size: 13.5px;
  font-weight: 600;
}

.level-row-note {
  margin-top: 1px;
  color: var(--muted);
  font-size: 12px;
}

.level-row.is-reached .level-row-name {
  color: var(--text);
}

.level-check {
  color: #12a150;
  font-size: 14px;
  font-weight: 700;
}

/* ---------- 7. Postingan ---------- */

.post {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 14px 16px 11px;
  border-bottom: 1px solid var(--line);
}

@media (hover: hover) {
  .post[data-open] {
    cursor: pointer;
  }

  .post[data-open]:hover {
    background: var(--bg-hover);
  }
}

.post-avatar {
  flex: none;
  line-height: 0;
  border-radius: 50%;
}

.post-main {
  flex: 1;
  min-width: 0;
}

.post-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.post-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-name:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-time {
  flex: none;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}

.post-time::before {
  content: "·";
  margin-right: 5px;
  color: var(--line-strong);
}

.post-text {
  margin-top: 3px;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.006em;
  color: var(--text);
  overflow-wrap: anywhere;
}

.post--detail .post-text {
  font-size: 16px;
  line-height: 1.55;
  margin-top: 8px;
}

.link-tag,
.link-mention {
  color: var(--link);
  text-decoration: none;
  font-weight: 500;
}

.link-tag:hover,
.link-mention:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-actions {
  display: flex;
  align-items: center;
  gap: 1px;
  margin: 7px 0 0 -8px;
}

.act-form {
  display: inline-flex;
  margin: 0;
}

.act {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 31px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.act:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.act:active {
  transform: scale(0.94);
}

.act .ic {
  flex: none;
}

.act-count {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.act-count:empty {
  display: none;
}

.act-like .ic-heart-fill,
.act-save .ic-bookmark-fill {
  display: none;
}

.act-like.is-on {
  color: var(--like);
}

.act-like.is-on .ic-heart,
.act-save.is-on .ic-bookmark {
  display: none;
}

.act-like.is-on .ic-heart-fill,
.act-save.is-on .ic-bookmark-fill {
  display: block;
}

.act-save.is-on {
  color: var(--text);
}

@keyframes heart-pop {
  0% { transform: scale(0.7); }
  55% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

.act-like.is-on .ic-heart-fill {
  animation: heart-pop 0.26s ease;
}

/* Menu "..." */

.menu {
  position: relative;
  margin-left: auto;
  flex: none;
}

.menu-toggle {
  width: 30px;
  height: 30px;
  color: var(--muted);
  list-style: none;
}

.menu-toggle::-webkit-details-marker {
  display: none;
}

.menu-toggle:hover {
  color: var(--text);
}

.menu-pop {
  position: absolute;
  top: 34px;
  right: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  min-width: 196px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
}

.menu-pop a,
.menu-pop button {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--text);
  font-size: 14px;
  text-align: left;
  text-decoration: none;
}

.menu-pop a:hover,
.menu-pop button:hover {
  background: var(--bg-hover);
}

.menu-pop form {
  margin: 0;
}

.menu-danger {
  color: var(--danger) !important;
}

/* Utas komentar */

.thread {
  position: relative;
}

.thread::before {
  content: "";
  position: absolute;
  left: 35px;
  top: 46px;
  bottom: 26px;
  width: 2px;
  border-radius: 2px;
  background: var(--line);
  pointer-events: none;
}

.post--comment {
  padding: 12px 16px 10px;
  border-bottom: 0;
}

.post--comment .post-text {
  font-size: 14.5px;
}

.post--comment .post-head {
  gap: 5px;
}

/* ---------- 8. Tab & header bagian ---------- */

.tabs {
  position: sticky;
  top: var(--topbar-h);
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 8px 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.tablink {
  position: relative;
  flex: 1;
  padding: 11px 6px 12px;
  border-radius: 10px 10px 0 0;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  transition: color 0.15s ease;
}

.tablink:hover {
  color: var(--text-soft);
}

.tablink.is-active {
  color: var(--text);
  font-weight: 600;
}

.tablink.is-active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
}

.section-title {
  padding: 20px 16px 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-note {
  padding: 0 16px 10px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- 9. Komposer ---------- */

.composer {
  display: flex;
  gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line);
}

.composer-main {
  flex: 1;
  min-width: 0;
}

.composer textarea {
  display: block;
  width: 100%;
  min-height: 30px;
  max-height: 220px;
  padding: 4px 0 2px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.5;
  letter-spacing: -0.006em;
  resize: none;
  outline: none;
  overflow-y: auto;
}

.composer textarea::placeholder {
  color: var(--muted);
}

.composer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  min-height: 32px;
}

.counter {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.counter.is-warn {
  color: #b45309;
}

.counter.is-over {
  color: var(--danger);
  font-weight: 600;
}

/* Halaman tulis penuh */

.compose-page {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--topbar-h));
  min-height: calc(100dvh - var(--topbar-h));
}

.compose-page .compose-body {
  flex: 1;
  padding: 18px 16px 8px;
}

.compose-page textarea {
  width: 100%;
  min-height: 190px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 17.5px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  resize: none;
  outline: none;
}

.compose-page textarea::placeholder {
  color: var(--muted);
}

.compose-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--line);
}

/* ---------- 10. Auth ---------- */

.auth {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 420px;
  margin: 0 auto;
  padding: 40px 24px 48px;
}

.auth-logo {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 26px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
  color: var(--text);
  text-decoration: none;
}

.auth h1 {
  margin-bottom: 8px;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.auth .lead {
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.auth-switch {
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.auth-switch a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.error-page {
  text-align: center;
}

.error-code {
  color: #888;
  font-size: 64px;
  font-weight: 800;
  letter-spacing: -.08em;
  line-height: 1;
  margin-bottom: 18px;
}

.error-page h1 {
  margin-bottom: 10px;
}

.demo-note {
  margin-top: 26px;
  padding: 12px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.demo-note code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--field);
  color: var(--text-soft);
  font-size: 12px;
}

/* ---------- 11. Profil ---------- */

.profile {
  padding: 18px 16px 12px;
  border-bottom: 1px solid var(--line);
}

.profile-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.profile-name {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.032em;
  line-height: 1.15;
}

.profile-handle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.profile-bio {
  margin-top: 12px;
  color: var(--text-soft);
  font-size: 14.5px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13.5px;
}

.profile-stats a {
  color: inherit;
  text-decoration: none;
}

.profile-stats a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.profile-stats b {
  color: var(--text);
  font-weight: 600;
}

.profile-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.profile-avatar {
  flex: none;
  line-height: 0;
}

/* ---------- 12. Pencarian & jelajah ---------- */

.searchbar {
  position: sticky;
  top: var(--topbar-h);
  z-index: 25;
  padding: 10px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.search-input {
  position: relative;
}

.search-input .ic {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search-input input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 42px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--field);
  color: var(--text);
  font-size: 14.5px;
  outline: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.search-input input:focus {
  background: var(--field-focus);
  border-color: var(--muted);
}

.search-input input::placeholder {
  color: var(--muted);
}

.trend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.trend:hover {
  background: var(--bg-hover);
}

.trend-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.trend-count {
  color: var(--muted);
  font-size: 12.5px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 16px 16px;
}

.chip {
  padding: 7px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 13px;
  text-decoration: none;
  background: transparent;
}

.chip:hover {
  background: var(--bg-hover);
  color: var(--text);
}

/* ---------- 13. Baris pengguna ---------- */

.user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.user-row-main {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.user-row-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.user-row-name {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-row-meta {
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-row-extra {
  color: var(--muted);
  font-size: 12.5px;
}

/* ---------- 14. Notifikasi ---------- */

.notif {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.notif:hover {
  background: var(--bg-hover);
}

.notif.is-unread {
  background: var(--unread-bg);
}

.notif-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.notif-text {
  font-size: 14px;
  line-height: 1.4;
}

.notif-text b {
  font-weight: 600;
}

.notif-snippet {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 13.5px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.notif-time {
  color: var(--muted);
  font-size: 12.5px;
}

.notif-dot {
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--like);
}

.activity-kind {
  flex: none;
  margin-top: 2px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--field);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.activity-quote {
  color: var(--text-soft);
  font-size: 13.5px;
  line-height: 1.45;
}

/* ---------- 15. Pesan ---------- */

.conv {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.conv:hover {
  background: var(--bg-hover);
}

.conv-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.conv-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.conv-name {
  flex: 1;
  overflow: hidden;
  font-size: 14.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conv-time {
  flex: none;
  color: var(--muted);
  font-size: 12.5px;
}

.conv-preview {
  overflow: hidden;
  color: var(--muted);
  font-size: 13.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conv-preview.is-unread {
  color: var(--text);
  font-weight: 500;
}

.conv-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--like);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.chat {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--topbar-h));
  min-height: calc(100dvh - var(--topbar-h));
}

.chat-page .main {
  padding-bottom: 0;
}

.chat-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 7px;
  padding: 16px 14px 12px;
}

.chat-day {
  align-self: center;
  padding: 6px 4px;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 19px;
  font-size: 14.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.bubble.them {
  align-self: flex-start;
  background: var(--field);
  color: var(--text);
  border-bottom-left-radius: 6px;
}

.bubble.me {
  align-self: flex-end;
  background: var(--text);
  color: var(--bg);
  border-bottom-right-radius: 6px;
}

.bubble-time {
  display: block;
  margin-top: 4px;
  font-size: 10.5px;
  opacity: 0.6;
  text-align: right;
}

.chat-form {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--line);
}

.chat-form textarea {
  flex: 1;
  max-height: 120px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--field);
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.45;
  resize: none;
  outline: none;
  overflow-y: hidden;
}

.chat-form textarea:focus {
  background: var(--field-focus);
}

.chat-form .btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
}

.chat-empty {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 40px 24px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/* ---------- 16. Pengaturan ---------- */

.settings {
  padding: 6px 16px 36px;
}

.settings-group {
  margin-top: 20px;
}

.settings-group > h2 {
  margin: 0 0 10px 2px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
}

.card + .card {
  margin-top: 10px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.settings-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.settings-row:first-child {
  padding-top: 0;
}

.settings-row-label {
  font-size: 14px;
  font-weight: 500;
}

.settings-row-note {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12.5px;
}

.settings-foot {
  margin-top: 22px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

/* ---------- Editor avatar ---------- */

.avatar-top {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.avatar-preview-big {
  flex: none;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--field);
  image-rendering: pixelated;
}

.avatar-top-text {
  flex: 1;
  min-width: 0;
}

.avatar-top-sizes {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  margin-top: 10px;
}

.avatar-size-demo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.avatar-size-demo em {
  font-style: normal;
  font-size: 10.5px;
  color: var(--muted);
}

.avatar-mini {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--field);
  image-rendering: pixelated;
}

.avatar-mini[data-preview="68"] {
  width: 68px;
  height: 68px;
}

.avatar-canvas-wrap {
  max-width: 320px;
  margin: 18px auto 12px;
  padding: 6px;
  border-radius: 14px;
  background: var(--field);
}

#avatar-canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 10px;
  background: #fff;
  cursor: crosshair;
  image-rendering: pixelated;
  touch-action: none;
}

.avatar-palette {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
}

.avatar-swatch {
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 7px;
  cursor: pointer;
}

.avatar-swatch.is-active {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--bg);
}

.avatar-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 12px 0 4px;
}

.avatar-tool {
  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}

.avatar-tool.is-active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.avatar-tool[aria-pressed="true"] {
  background: var(--field);
  color: var(--text);
}

.avatar-color {
  width: 30px;
  height: 30px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.avatar-color input {
  width: 48px;
  height: 48px;
  margin: -9px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.avatar-templates {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.avatar-template {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 7px 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10.5px;
  cursor: pointer;
}

.avatar-template:hover {
  background: var(--bg-hover);
}

.avatar-template.is-active {
  border-color: var(--text);
  color: var(--text);
}

.avatar-template svg {
  border-radius: 8px;
}

.avatar-code-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.avatar-hue {
  margin: 16px 0 4px;
}

.avatar-hue-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.avatar-hue-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

#avatar-hue {
  flex: 1;
  accent-color: var(--text);
}

#avatar-code-msg.is-error {
  color: var(--danger);
}

@media (max-width: 380px) {
  .avatar-templates {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- 17. Kosong, toast, util ---------- */

.empty {
  padding: 60px 32px;
  color: var(--muted);
  text-align: center;
}

.empty-icon {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--field);
  color: var(--muted);
}

.empty h2 {
  margin-bottom: 6px;
  color: var(--text);
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.empty p {
  font-size: 14px;
  line-height: 1.5;
}

.more-wrap {
  display: flex;
  justify-content: center;
  padding: 20px 16px 10px;
}

.toasts {
  position: fixed;
  bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 40px);
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  max-width: 100%;
  padding: 11px 18px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  animation: toast-in 0.26s ease;
}

[data-theme="dark"] .toast {
  background: #f4f4f4;
  color: #111;
}

.toast-error {
  background: #b42318;
  color: #fff;
}

.toast.is-gone {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.nowrap {
  white-space: nowrap;
}

/* ---------- 18. Layar lebih lebar ---------- */

@media (min-width: 641px) {
  .app {
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
  }

  .topbar {
    border-bottom-color: var(--line);
  }

  .post {
    padding-left: 18px;
    padding-right: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 19. Halaman tulis (gaya komposer beranda) ---------- */

.composer--page {
  align-items: flex-start;
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--line);
}

.composer--page textarea {
  min-height: 132px;
  max-height: 320px;
  padding-top: 10px;
  font-size: 16.5px;
}

.composer--page .composer-foot {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

/* ---------- 20. Balasan komentar bertingkat ---------- */

.comment-thread {
  border-bottom: 1px solid var(--line);
}

.comment-thread .post--comment {
  border-bottom: 0;
}

.comment-thread.is-reply {
  border-bottom: 0;
}

.replies {
  margin-left: 46px;
  padding-left: 10px;
  border-left: 2px solid var(--line);
}

.reply-thread {
  display: block;
}

.replies-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 2px 0 6px 46px;
  padding: 4px 8px 4px 0;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}

.replies-toggle::-webkit-details-marker {
  display: none;
}

.replies-toggle:hover,
.reply-thread[open] .replies-toggle {
  color: var(--text);
}

.replies-toggle .ic {
  transition: transform 0.15s ease;
}

.reply-thread[open] .replies-toggle .ic {
  transform: rotate(90deg);
}

.reply-thread .replies {
  margin-top: 2px;
}

.post--reply {
  padding: 8px 16px 8px 2px;
}

.post--reply .post-text {
  font-size: 14px;
}

.post--reply .post-name {
  font-size: 13.5px;
}

.comment-actions {
  margin-top: 2px;
}

.reply-details {
  display: inline-block;
}

.reply-details > summary {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}

.reply-details > summary::-webkit-details-marker {
  display: none;
}

.reply-details > summary:hover,
.reply-details[open] > summary {
  background: var(--bg-hover);
  color: var(--text);
}

.reply-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 6px;
}

.reply-form textarea {
  flex: 1;
  min-height: 36px;
  max-height: 120px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--field);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  resize: none;
  outline: none;
}

.reply-form textarea:focus {
  background: var(--field-focus);
}

.reply-form .btn {
  flex: none;
}

/* ---------- 21. Lencana & banner penangguhan ---------- */

.star--banned .star-fill {
  fill: #6b6b6b;
}

.star--banned .star-crack {
  stroke: var(--bg);
}

.star--banned .star-dot {
  fill: #c0392b;
}

[data-theme="dark"] .star--banned .star-fill {
  fill: #b9b9b9;
}

[data-theme="dark"] .star--banned .star-crack {
  stroke: var(--bg);
}

[data-theme="dark"] .star--banned .star-dot {
  fill: #e05a4f;
}

.star-wrap--banned {
  display: inline-flex;
  margin-left: 4px;
  vertical-align: -2px;
}

.ban-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 12px 16px 4px;
  padding: 12px 14px;
  border: 1px solid #f1d4d4;
  border-radius: 16px;
  background: #fdf5f5;
  color: #6d2b2b;
}

[data-theme="dark"] .ban-banner {
  border-color: #3a2222;
  background: #1a0f0f;
  color: #f0c9c9;
}

.ban-banner-icon {
  flex: none;
  display: inline-flex;
  margin-top: 2px;
}

.ban-banner b {
  display: block;
  font-size: 13.5px;
}

.ban-banner span {
  display: block;
  margin-top: 3px;
  color: #8a5a5a;
  font-size: 12.5px;
  line-height: 1.45;
}

[data-theme="dark"] .ban-banner span {
  color: #c79a9a;
}

.ban-banner--global {
  margin: 0;
  border-width: 0 0 1px;
  border-radius: 0;
  padding: 10px 16px;
}

.ban-banner-text {
  flex: 1;
  min-width: 0;
}

.ban-banner--global .btn {
  flex: none;
  align-self: center;
}

.is-banned .act-like,
.is-banned .act-form[data-ajax="follow"],
.is-banned .btn-follow,
.is-banned .reply-details,
.is-banned .composer,
.is-banned .chat-composer,
.is-banned .tab-plus {
  display: none !important;
}

/* ---------- 22. Laporan ---------- */

.tabs--four .tablink {
  font-size: 13px;
}

.report-page {
  padding: 16px;
}

.report-target {
  margin-bottom: 12px;
}

.report-target-label {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.report-target-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.report-target-row b {
  display: block;
  font-size: 14.5px;
}

.report-target-row span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.report-target-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 12.5px;
  font-weight: 600;
}

.report-reasons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.report-reason {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13.5px;
  cursor: pointer;
}

.report-reason:has(input:checked) {
  border-color: var(--text);
}

.report-reason input {
  accent-color: var(--text);
}

.report-form .btn-wide {
  margin-top: 14px;
}

.report-note-box p {
  margin: 6px 0 12px;
}

.report-row {
  align-items: flex-start;
}

.report-row-avatar {
  flex: none;
  display: inline-flex;
}

.report-status {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--field);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  vertical-align: 1px;
}

.report-status--resolved {
  background: #e7f6ec;
  color: #1f7a3f;
}

[data-theme="dark"] .report-status--resolved {
  background: #12251a;
  color: #7fd39a;
}

.report-status--dismissed {
  background: #f3f3f3;
  color: #777;
}

[data-theme="dark"] .report-status--dismissed {
  background: #1a1a1a;
  color: #999;
}

/* ---------- 23. Dashboard admin ---------- */

.admin-body {
  margin: 0;
  background: #f4f4f1;
  color: #111;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.admin-shell {
  display: flex;
  min-height: 100vh;
}

.admin-side {
  position: sticky;
  top: 0;
  flex: none;
  width: 228px;
  height: 100vh;
  padding: 22px 14px;
  border-right: 1px solid #e6e6e2;
  background: #fff;
}

.admin-brand {
  display: inline-block;
  padding: 0 8px;
  color: #111;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.admin-brand span {
  color: #e11d48;
}

.admin-brand em {
  margin-left: 7px;
  color: #999;
  font-size: 9.5px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  vertical-align: 3px;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 26px;
}

.admin-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
  border-radius: 9px;
  color: #444;
  font-size: 13.5px;
  font-weight: 500;
}

.admin-nav a:hover {
  background: #f4f4f1;
}

.admin-nav a.is-active {
  background: #111;
  color: #fff;
}

.admin-badge {
  padding: 1px 7px;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
}

.admin-back {
  display: block;
  margin: 30px 8px 0;
  color: #888;
  font-size: 12.5px;
}

.admin-main {
  flex: 1;
  min-width: 0;
  padding: 26px 30px 60px;
}

.admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.admin-top h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.035em;
}

.admin-user {
  color: #888;
  font-size: 12.5px;
}

.admin-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.admin-card {
  padding: 15px 16px;
  border: 1px solid #e6e6e2;
  border-radius: 14px;
  background: #fff;
}

.admin-card b {
  display: block;
  font-size: 27px;
  letter-spacing: -0.04em;
}

.admin-card span {
  display: block;
  margin-top: 2px;
  color: #888;
  font-size: 12px;
}

.admin-cards--second {
  margin-top: 12px;
}

.admin-cards--second .admin-card b {
  font-size: 19px;
}

.admin-section {
  margin-top: 26px;
}

.admin-section h2 {
  margin: 0 0 10px;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.admin-table {
  width: 100%;
  overflow: hidden;
  border: 1px solid #e6e6e2;
  border-radius: 14px;
  border-collapse: collapse;
  background: #fff;
}

.admin-table th {
  padding: 9px 12px;
  border-bottom: 1px solid #eee;
  color: #888;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-align: left;
  text-transform: uppercase;
}

.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f2f2f0;
  font-size: 13px;
  vertical-align: middle;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-user-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}

.admin-user-cell b {
  display: block;
  font-size: 13px;
}

.admin-user-cell span {
  color: #888;
  font-size: 12px;
}

.admin-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f1ee;
  color: #666;
  font-size: 10.5px;
  font-weight: 600;
}

.admin-pill--banned {
  background: #fdecec;
  color: #a12b2b;
}

.admin-pill--admin {
  background: #111;
  color: #fff;
}

.admin-pill--open {
  background: #fff4e5;
  color: #9a5b00;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-btn {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  color: #333;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.admin-btn:hover {
  background: #f4f4f1;
}

.admin-btn--danger {
  border-color: #e6b3b3;
  color: #a12b2b;
}

.admin-btn--primary {
  border-color: #111;
  background: #111;
  color: #fff;
}

.admin-form {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #e6e6e2;
  border-radius: 14px;
  background: #fff;
}

.admin-form label {
  display: block;
  margin-bottom: 5px;
  color: #777;
  font-size: 11.5px;
  font-weight: 600;
}

.admin-input,
.admin-select,
.admin-textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #ddd;
  border-radius: 9px;
  background: #fff;
  color: #111;
  font: inherit;
  font-size: 13.5px;
}

.admin-textarea {
  min-height: 70px;
  resize: vertical;
}

.admin-grid2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 10px;
}

.admin-report {
  margin-bottom: 12px;
  padding: 15px 16px;
  border: 1px solid #e6e6e2;
  border-radius: 14px;
  background: #fff;
}

.admin-report-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.admin-report-head b {
  font-size: 13.5px;
}

.admin-report-time {
  color: #999;
  font-size: 11.5px;
}

.admin-report-target {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;
  background: #faf9f7;
}

.admin-report-target b {
  display: block;
  font-size: 13px;
}

.admin-report-target p {
  margin: 3px 0 0;
  color: #666;
  font-size: 12.5px;
  line-height: 1.45;
}

.admin-report-note {
  margin-top: 9px;
  color: #555;
  font-size: 13px;
  line-height: 1.5;
}

.admin-report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f0efec;
}

.admin-empty {
  padding: 44px 20px;
  border: 1px solid #e6e6e2;
  border-radius: 14px;
  background: #fff;
  color: #888;
  font-size: 13.5px;
  text-align: center;
}

.admin-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.admin-filter a {
  padding: 6px 11px;
  border: 1px solid #ddd;
  border-radius: 999px;
  background: #fff;
  color: #555;
  font-size: 12px;
}

.admin-filter a.is-active {
  border-color: #111;
  background: #111;
  color: #fff;
}

.admin-search {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.admin-search input {
  max-width: 320px;
}

.admin-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

[data-theme="dark"] .admin-body {
  background: var(--bg-soft);
  color: var(--text);
}

[data-theme="dark"] .admin-side,
[data-theme="dark"] .admin-card,
[data-theme="dark"] .admin-table,
[data-theme="dark"] .admin-form,
[data-theme="dark"] .admin-report,
[data-theme="dark"] .admin-empty {
  background: var(--bg-elevated);
  border-color: var(--line-strong);
}

[data-theme="dark"] .admin-side {
  border-right-color: var(--line-strong);
}

[data-theme="dark"] .admin-brand,
[data-theme="dark"] .admin-top h1,
[data-theme="dark"] .admin-card b,
[data-theme="dark"] .admin-section h2,
[data-theme="dark"] .admin-user-cell b,
[data-theme="dark"] .admin-report-head b {
  color: var(--text);
}

[data-theme="dark"] .admin-nav a,
[data-theme="dark"] .admin-btn,
[data-theme="dark"] .admin-filter a {
  color: var(--text-soft);
}

[data-theme="dark"] .admin-nav a:hover,
[data-theme="dark"] .admin-btn:hover {
  background: var(--bg-hover);
}

[data-theme="dark"] .admin-nav a.is-active,
[data-theme="dark"] .admin-filter a.is-active,
[data-theme="dark"] .admin-btn--primary {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

[data-theme="dark"] .admin-table th,
[data-theme="dark"] .admin-table td,
[data-theme="dark"] .admin-report-actions {
  border-color: var(--line);
}

[data-theme="dark"] .admin-input,
[data-theme="dark"] .admin-select,
[data-theme="dark"] .admin-textarea {
  border-color: var(--line-strong);
  background: var(--field);
  color: var(--text);
}

[data-theme="dark"] .admin-report-target {
  background: var(--bg-soft);
}

[data-theme="dark"] .admin-report-target p,
[data-theme="dark"] .admin-report-note {
  color: var(--text-soft);
}

[data-theme="dark"] .admin-user,
[data-theme="dark"] .admin-back,
[data-theme="dark"] .admin-card span,
[data-theme="dark"] .admin-user-cell span,
[data-theme="dark"] .admin-report-time,
[data-theme="dark"] .admin-table th,
[data-theme="dark"] .admin-form label {
  color: var(--muted);
}

[data-theme="dark"] .admin-pill {
  background: var(--bg-hover);
  color: var(--text-soft);
}

[data-theme="dark"] .admin-pill--banned {
  background: #30171c;
  color: #ff9aa6;
}

[data-theme="dark"] .admin-pill--admin {
  background: var(--text);
  color: var(--bg);
}

[data-theme="dark"] .admin-pill--open {
  background: #30230e;
  color: #f5c76b;
}

[data-theme="dark"] .admin-btn {
  border-color: var(--line-strong);
  background: var(--bg-elevated);
}

[data-theme="dark"] .admin-btn--danger {
  border-color: #63323a;
  color: #ff9aa6;
}

[data-theme="dark"] .admin-filter a {
  border-color: var(--line-strong);
  background: var(--bg-elevated);
}

@media (max-width: 900px) {
  .admin-shell {
    display: block;
  }

  .admin-side {
    position: static;
    width: auto;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid #e6e6e2;
  }

  .admin-nav {
    flex-direction: row;
    overflow-x: auto;
  }

  .admin-nav a {
    flex: none;
  }

  .admin-main {
    padding: 18px 14px 40px;
  }

  .admin-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-detail-grid {
    grid-template-columns: 1fr;
  }

  .admin-table th:nth-child(4),
  .admin-table td:nth-child(4) {
    display: none;
  }
}
