﻿:root {
  --bg: #f5f0fb;
  --bg-alt: #e8dcf5;
  --panel: #ffffff;
  --text: #2a1f36;
  --muted: #6d6280;
  --main: #9c66c8;
  --main-strong: #8450b2;
  --ghost: #efe4fa;
  --danger: #c4392f;
  --line: #deceed;
  --shadow: 0 15px 45px rgba(71, 43, 108, 0.12);
}

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

body {
  margin: 0;
  color: var(--text);
  font-family: "IBM Plex Sans KR", "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  background: linear-gradient(130deg, var(--bg) 0%, var(--bg-alt) 100%);
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.bg-layer {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 15%, rgba(156, 102, 200, 0.2), transparent 35%),
    radial-gradient(circle at 85% 10%, rgba(128, 84, 178, 0.14), transparent 30%),
    radial-gradient(circle at 70% 90%, rgba(175, 120, 209, 0.16), transparent 30%);
  pointer-events: none;
}

.layout {
  width: min(1080px, calc(100% - 2rem));
  margin: 2rem auto 3rem;
  position: relative;
  z-index: 1;
  isolation: isolate;
}

.hero {
  position: relative;
  z-index: 1;
  background: linear-gradient(145deg, #935fc2, #c296db);
  color: #fff;
  border-radius: 24px;
  padding: 1.75rem;
  box-shadow: var(--shadow);
  animation: rise 0.55s ease-out;
  pointer-events: none;
}


.hero .auth-inline,
.hero .auth-inline * {
  pointer-events: auto !important;
}
.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.hero-badge {
  margin: 0;
  font-weight: 600;
  opacity: 0.92;
}

.auth-inline {
  position: relative;
  z-index: 10;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}


.auth-inline * {
  pointer-events: auto !important;
}
.auth-inline .btn {
  min-height: 42px;
  text-align: center;
  line-height: 1;
  white-space: nowrap;
  pointer-events: auto !important;
  user-select: none;
}

.auth-inline strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  text-align: center;
  line-height: 1;
  white-space: nowrap;
  padding: 0 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.85rem;
}

.notification-wrap {
  position: relative;
  z-index: 40;
}

.notification-btn {
  position: relative;
  padding-right: 2.1rem;
}

.notification-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  padding: 0 0.38rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e04943;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  border: 2px solid #fff;
}

.notifications-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(360px, calc(100vw - 1rem));
  max-height: 360px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid #decaf2;
  background: #fff;
  box-shadow: 0 14px 32px rgba(50, 28, 76, 0.24);
  padding: 0.6rem;
  color: #35274a;
}

.notifications-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}

.notifications-head strong {
  color: #312346;
  font-size: 0.95rem;
}

.notifications-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.notifications-item {
  border: 1px solid #eadcf6;
  border-radius: 10px;
  padding: 0.5rem 0.56rem;
  background: #fcf8ff;
  display: grid;
  gap: 0.24rem;
}

.notifications-item.unread {
  border-color: #d2b4ed;
  background: #f7efff;
}

.notifications-item p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: #3b2d50;
}

.notifications-item time {
  font-size: 0.77rem;
  color: #736489;
}

.hero h1 {
  margin: 0.35rem 0;
  font-family: "IBM Plex Sans KR", "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  letter-spacing: 0.4px;
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.hero-desc {
  margin: 0 0 1.2rem;
  opacity: 0.93;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.hero-stats article {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hero-stats span {
  font-size: 0.9rem;
}

.hero-stats strong {
  font-size: 1.1rem;
}

.panel {
  margin-top: 1.1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 1.1rem;
  animation: rise 0.5s ease-out;
  position: relative;
  z-index: 20;
  pointer-events: auto;
}

#listView {
  position: relative;
  z-index: 30;
  pointer-events: auto !important;
}

#listView * {
  pointer-events: auto;
}

.hidden {
  display: none !important;
}

.show {
  display: block;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 120;
  pointer-events: auto !important;
}

.search-group {
  display: grid;
  grid-template-columns: minmax(88px, 122px) minmax(140px, 1fr) auto auto;
  gap: 0.5rem;
  flex: 1;
  position: relative;
  z-index: 121;
  pointer-events: auto !important;
  align-items: center;
}

.category-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 40;
  pointer-events: auto !important;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 0.1rem;
}

.category-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  color: #2f2340;
  position: relative;
  z-index: 41;
  pointer-events: auto !important;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 40px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.top-tab-select-wrap,
.admin-tab-select-wrap {
  display: none;
}

.top-tab-select,
.admin-tab-select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 0.75rem;
  background: #fff;
  color: var(--text);
  font: inherit;
  text-align: center;
  text-align-last: center;
  -moz-text-align-last: center;
}

.report-status-tabs {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 0.1rem;
}

.report-status-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  color: #312545;
  min-height: 38px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.report-status-tab.active {
  background: #f1e7fb;
  border-color: #d8c1ef;
  color: #6d3d95;
  font-weight: 600;
}

.report-status-tab.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

#searchBtn,
#resetBtn,
#createBtn {
  position: relative;
  z-index: 122;
  pointer-events: auto !important;
}

.category-tab.active {
  background: var(--main);
  color: #fff;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.14);
  border-color: transparent;
}

.category-title {
  margin: 0;
  color: #36284a;
  font-size: 1.12rem;
}

.helper-text {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.login-log-meta {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
  word-break: break-all;
}

.activity-log-meta {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
  word-break: break-all;
}

.admin-meta-line {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
  word-break: break-all;
}

.activity-detail-line {
  line-height: 1.42;
  color: #3a2d4f;
}

.activity-detail-line + .activity-detail-line {
  margin-top: 0.2rem;
}

.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.admin-summary article {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fcf8ff;
}

.admin-section-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.admin-section-tab {
  border: 1px solid var(--line);
  background: #fff;
  color: #3e3053;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.admin-section-tab.active {
  background: var(--main);
  color: #fff;
  border-color: transparent;
}

@media (max-width: 900px) {
  .category-tabs,
  .admin-section-tabs {
    display: none;
  }

  .top-tab-select-wrap,
  .admin-tab-select-wrap {
    display: block;
    margin-bottom: 0.8rem;
  }
}

.admin-block {
  margin-top: 0.9rem;
}

.admin-block h3 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
  color: #322444;
}

.admin-block h3:not(:first-child) {
  margin-top: 1rem;
}

.admin-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.admin-dashboard-grid article {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fcf8ff;
}

.admin-dashboard-grid span {
  color: #5f4f73;
  font-size: 0.9rem;
}

.admin-dashboard-grid strong {
  color: #322444;
  font-size: 1.2rem;
}

.admin-post-filters,
.admin-users-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.7rem;
}

#adminCategoryFilter,
#adminReportStatusFilter {
  text-align: center;
  text-align-last: center;
  -moz-text-align-last: center;
  line-height: 1.1;
  padding-top: 0;
  padding-bottom: 0;
}

#adminCategoryFilter option,
#adminReportStatusFilter option {
  text-align: center;
}

#adminPostSearchInput,
#adminCommentSearchInput {
  flex: 1 1 220px;
  min-width: 0;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--line);
  color: #47395e;
  background: #f8f2fd;
}

.role-pill.admin {
  background: #efe5fb;
  border-color: #d8c0ef;
  color: #6c3e95;
}

.role-pill.super {
  background: #fff4e5;
  border-color: #f0d5a4;
  color: #7a4b11;
}

.role-stack {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  align-items: center;
}

.category-block-summary {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: #5c4b74;
  line-height: 1.35;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid #dcc8ef;
  color: #6d3d95;
  background: #f4ecfc;
}

.status-pill.blocked {
  border-color: #f0c0bc;
  color: #902e27;
  background: #fff0ee;
}

.action-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  justify-content: flex-start;
}

.admin-user-actions {
  display: grid;
  gap: 0.4rem;
  width: min(320px, 100%);
}

.admin-user-action-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 0.35rem;
  align-items: center;
}

.admin-user-action-row .status-select {
  min-width: 0;
  width: 100%;
}

.admin-user-action-row .btn,
.admin-user-actions > .btn {
  white-space: nowrap;
}

.admin-user-actions > .btn {
  width: 100%;
}

.quick-block-results {
  display: grid;
  gap: 0.55rem;
}

.quick-block-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fcf8ff;
  padding: 0.75rem 0.8rem;
  display: grid;
  gap: 0.3rem;
}

.quick-block-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.quick-block-item-head strong {
  color: #322444;
}

.quick-block-item-meta {
  color: #5f4f73;
  font-size: 0.84rem;
  line-height: 1.35;
  word-break: break-word;
}

.status-select {
  min-width: 104px;
  height: 34px;
  border-radius: 10px;
  padding: 0 0.45rem;
  font-size: 0.84rem;
}

#searchInput {
  min-width: 0;
}

.title-with-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.post-title-clamp,
.post-preview-clamp {
  min-width: 0;
  word-break: break-word;
}

.report-status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.16rem 0.56rem;
  font-size: 0.76rem;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
}

.report-status-pill.unprocessed {
  background: #fff1f0;
  border-color: #f2c5c2;
  color: #8c2f27;
}

.report-status-pill.pending {
  background: #fff8e9;
  border-color: #f1ddb2;
  color: #775513;
}

.report-status-pill.resolved {
  background: #ecf9f1;
  border-color: #c5e8d4;
  color: #205f44;
}

select,
input,
textarea,
.btn {
  font: inherit;
}

select,
input,
textarea {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.6rem 0.75rem;
  background: #fff;
  color: var(--text);
}

input,
select {
  height: 42px;
}

#searchField {
  text-align: center;
  text-align-last: center;
  -moz-text-align-last: center;
  font-weight: 700;
  line-height: 1.1;
  padding-top: 0;
  padding-bottom: 0;
  position: relative;
  top: -1px;
}

#searchField option {
  text-align: center;
}

textarea {
  min-height: 220px;
  resize: vertical;
  line-height: 1.5;
}

.content-editor {
  border-radius: 12px;
  overflow: visible;
  background: #fff;
}

.content-editor .tox.tox-tinymce {
  border: 1px solid #e8dcf5;
  border-radius: 12px;
  min-height: 220px;
}

.content-editor .tox .tox-editor-header {
  background: #faf6ff;
}

.content-editor .tox .tox-toolbar-overlord,
.content-editor .tox .tox-toolbar,
.content-editor .tox .tox-toolbar__primary {
  background: #faf6ff;
}

.content-editor .tox.tox-tinymce.tox-focus {
  border-color: #caa8e7;
  box-shadow: none;
}

.tox.tox-tinymce-aux,
.tox-dialog-wrap {
  z-index: 1300 !important;
}

.editor-fallback {
  min-height: 220px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(156, 102, 200, 0.35);
  border-color: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: none;
  border-radius: 12px;
  height: 42px;
  padding: 0 0.9rem;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.disabled {
  opacity: 0.72;
}

.btn-small {
  height: 34px;
  border-radius: 10px;
  font-size: 0.84rem;
  padding: 0 0.7rem;
}

.btn-main {
  background: var(--main);
  color: #fff;
}

.btn-main:hover {
  background: var(--main-strong);
}

.btn-soft {
  background: #f3ebfb;
  color: #3b2d52;
}

.btn-ghost {
  background: var(--ghost);
  color: #5d3a84;
}

.btn-danger {
  background: #fce8e6;
  color: var(--danger);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  text-align: left;
  font-weight: 600;
  color: #44365a;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--line);
  padding: 0.75rem 0.45rem;
}

tbody td {
  border-bottom: 1px solid #edf4f0;
  padding: 0.75rem 0.45rem;
  font-size: 0.95rem;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover {
  background: #fbf7ff;
}

#adminUserTableBody tr,
#adminPostTableBody tr {
  cursor: default;
}

#postTableBody td:nth-child(1),
#postTableBody td:nth-child(5) {
  width: 72px;
  color: var(--muted);
}

#postTableBody td:nth-child(4) {
  width: 132px;
  color: var(--muted);
}

#adminUserTableBody td {
  vertical-align: top;
}

#adminUserTableBody td:nth-child(1) {
  width: 120px;
}

#adminUserTableBody td:nth-child(4) {
  width: 126px;
  color: var(--muted);
}

#adminUserTableBody td:nth-child(5) {
  width: 300px;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 1.8rem 0;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.9rem;
  flex-wrap: wrap;
}

.admin-pagination {
  margin-top: 0.75rem;
}

.page-btn {
  min-width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}

.page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.page-nav-btn {
  min-width: 54px;
}

.page-btn.active {
  background: var(--main);
  color: #fff;
  border-color: transparent;
}

h2 {
  margin: 0 0 0.85rem;
  font-family: "IBM Plex Sans KR", "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
}

.auth-tabs {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
}

.tab-btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.45rem 0.8rem;
  background: #fff;
  cursor: pointer;
}

.tab-btn.active {
  background: var(--ghost);
  color: #5d3a84;
  border-color: transparent;
}

.auth-layout {
  width: min(620px, calc(100% - 1.2rem));
}

.auth-hero {
  padding: 1.25rem;
}

.auth-panel {
  margin-top: 0.9rem;
}

.auth-link-row {
  margin: 0.9rem 0 0;
  color: var(--muted);
  text-align: center;
}

.auth-link-row a {
  color: var(--main-strong);
  text-decoration: none;
  font-weight: 600;
}

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

.form-grid {
  display: grid;
  gap: 0.8rem;
}

label {
  display: grid;
  gap: 0.45rem;
  font-weight: 500;
}

.full {
  grid-column: 1 / -1;
}

.form-field {
  display: grid;
  gap: 0.45rem;
  font-weight: 500;
}

.form-field .field-label {
  font-weight: 500;
}

.attachment-preview {
  display: grid;
  gap: 0.55rem;
}

.attachment-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.attachment-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.attachment-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #eadcf6;
  background: #f7f2fd;
}

.attachment-meta {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.attachment-meta strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
}

.attachment-meta span {
  color: var(--muted);
  font-size: 0.8rem;
}

.attachment-remove {
  justify-self: end;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 123;
  pointer-events: auto !important;
}

.actions .btn {
  position: relative;
  z-index: 124;
  pointer-events: auto !important;
}

.detail {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 0.9rem;
}

.detail-user-admin {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.5rem;
  background: #fcf8ff;
  margin-bottom: 0.9rem;
}

.detail-user-trigger {
  width: 100%;
  border: none;
  background: transparent;
  padding: 0.2rem 0.25rem;
  display: grid;
  gap: 0.18rem;
  text-align: left;
  cursor: pointer;
}

.detail-user-trigger strong {
  font-size: 0.98rem;
  color: #322444;
}

.detail-user-trigger-meta {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.detail-user-info {
  display: grid;
  gap: 0.32rem;
}

.detail-user-info p {
  margin: 0;
  line-height: 1.45;
  color: #3a2d4f;
  font-size: 0.92rem;
}

.detail-user-actions {
  margin-top: 0.65rem;
  display: flex;
  justify-content: flex-end;
}

.detail-external {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.8rem;
  background: #fcf8ff;
  margin-bottom: 0.9rem;
}

.detail-external h3 {
  margin: 0 0 0.55rem;
  font-size: 0.98rem;
}

.detail-external-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.5rem;
}

.detail-external iframe {
  display: block;
  width: 100%;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.detail-attachments {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.8rem;
  background: #fcf8ff;
  margin-top: 0.9rem;
}

.detail-attachments h3 {
  margin: 0 0 0.6rem;
  font-size: 0.98rem;
}

.detail-attachment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
}

.detail-attachment-card {
  display: grid;
  gap: 0.4rem;
  color: inherit;
  text-decoration: none;
}

.detail-attachment-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #eadcf6;
  background: #fff;
}

.detail-attachment-label {
  color: #4b3964;
  font-size: 0.82rem;
  line-height: 1.35;
  word-break: break-word;
}

.detail-report-status {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.8rem;
  background: #fcf8ff;
  margin-bottom: 0.9rem;
}

.detail-report-status h3 {
  margin: 0 0 0.55rem;
  font-size: 0.98rem;
}

.toast-container {
  position: fixed;
  right: 14px;
  bottom: 14px;
  display: grid;
  gap: 0.45rem;
  z-index: 520;
  width: min(320px, calc(100% - 1.2rem));
}

.toast {
  border: 1px solid #d9c2ef;
  border-radius: 12px;
  background: #fff;
  color: #36284a;
  padding: 0.65rem 0.75rem;
  box-shadow: 0 12px 30px rgba(56, 32, 84, 0.16);
  font-size: 0.9rem;
  line-height: 1.45;
}

.toast-info {
  border-color: #d9c2ef;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 540;
  background: rgba(20, 10, 35, 0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
}

.modal-card {
  width: min(420px, 100%);
  border-radius: 14px;
  border: 1px solid #decaf2;
  background: #fff;
  box-shadow: 0 18px 42px rgba(35, 20, 56, 0.25);
  padding: 0.85rem;
  display: grid;
  gap: 0.7rem;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.55rem;
}

.modal-head h3 {
  margin: 0;
  color: #322444;
  font-size: 1.02rem;
}

.modal-body {
  border: 1px solid #eadcf6;
  border-radius: 12px;
  background: #fcf8ff;
  padding: 0.65rem 0.7rem;
  display: grid;
  gap: 0.35rem;
}

.modal-body p {
  margin: 0;
  line-height: 1.42;
  color: #3a2c4f;
  font-size: 0.9rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.detail-report-status-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.detail-comments {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem;
  background: #fdfaff;
  margin-bottom: 0.9rem;
}

.detail-comments h3 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
  color: #322444;
}

.comment-form {
  display: grid;
  gap: 0.5rem;
}

.comment-form textarea {
  min-height: 110px;
}

.comment-form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.comment-author-hint {
  color: var(--muted);
  font-size: 0.88rem;
}

.comment-list {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.comment-item {
  border: 1px solid #eadcf6;
  border-radius: 12px;
  background: #fff;
  padding: 0.65rem;
}

.comment-item-reply {
  margin-top: 0.5rem;
  margin-left: calc(var(--comment-depth, 1) * 14px);
  border-left: 3px solid #d9c2f0;
}

.comment-children {
  list-style: none;
  margin: 0.55rem 0 0;
  padding: 0;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.35rem;
}

.comment-header strong {
  font-size: 0.9rem;
  color: #332649;
}

.comment-author-trigger {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: #332649;
  cursor: pointer;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: #d2bbea;
  text-underline-offset: 2px;
}

.comment-author-trigger:hover {
  color: #6c3e95;
  text-decoration-color: #6c3e95;
}

.comment-header span {
  font-size: 0.8rem;
  color: var(--muted);
}

.comment-content {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
  color: #392c4d;
}

.content-link {
  color: var(--main-strong);
  text-decoration: underline;
  word-break: break-all;
  font-weight: 600;
}

.content-link:hover {
  opacity: 0.85;
}

.comment-actions {
  margin-top: 0.45rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.comment-reply-editor {
  margin-top: 0.5rem;
  border: 1px solid #ebdef8;
  border-radius: 10px;
  padding: 0.55rem;
  background: #fcf8ff;
  display: grid;
  gap: 0.45rem;
}

.comment-reply-editor textarea {
  min-height: 84px;
}

.comment-reply-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.detail header {
  border-bottom: 1px solid #ecf4f0;
  margin-bottom: 0.8rem;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.7rem;
  font-size: 0.92rem;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  line-height: 1.55;
  font-family: inherit;
}

.detail-content {
  word-break: break-word;
  line-height: 1.6;
  color: #392c4d;
}

.detail-content p,
.detail-content ul,
.detail-content ol,
.detail-content blockquote,
.detail-content pre,
.detail-content h1,
.detail-content h2,
.detail-content h3,
.detail-content h4 {
  margin: 0 0 0.75rem;
}

.detail-content p:last-child,
.detail-content ul:last-child,
.detail-content ol:last-child,
.detail-content blockquote:last-child,
.detail-content pre:last-child,
.detail-content h1:last-child,
.detail-content h2:last-child,
.detail-content h3:last-child,
.detail-content h4:last-child {
  margin-bottom: 0;
}

.detail-content a {
  color: var(--main-strong);
  text-decoration: underline;
  word-break: break-all;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  .layout {
    width: calc(100% - 0.85rem);
    margin-top: 0.75rem;
    margin-bottom: 1.25rem;
  }

  .auth-layout {
    width: calc(100% - 1rem);
  }

  .hero {
    position: relative;
    z-index: 2;
    padding: 1rem;
    border-radius: 18px;
  }

  .panel {
    padding: 0.72rem;
    border-radius: 14px;
  }

  .hero-top {
    align-items: stretch;
  }

  .auth-inline {
    width: 100%;
    gap: 0.45rem;
  }

  .auth-inline > * {
    flex: 1 1 calc(50% - 0.45rem);
  }

  .auth-inline strong {
    flex: 1 1 100%;
    justify-content: center;
    min-height: 42px;
  }

  .notification-wrap {
    flex: 1 1 100%;
  }

  .notification-btn {
    width: 100%;
    padding-right: 0.9rem;
  }

  .notification-badge {
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
  }

  .notifications-panel {
    position: static;
    width: 100%;
    max-height: 300px;
    margin-top: 0.4rem;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .category-tabs {
    margin-bottom: 0.7rem;
    padding-bottom: 0.15rem;
  }

  .report-status-tabs {
    margin-bottom: 0.7rem;
    padding-bottom: 0.15rem;
  }

  .toolbar {
    align-items: stretch;
  }

  .category-title {
    width: 100%;
    margin-bottom: 0.1rem;
  }

  .search-group {
    width: 100%;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
  }

  #searchField {
    grid-column: 1 / 2;
  }

  #searchInput {
    grid-column: 1 / -1;
    width: 100%;
  }

  #searchBtn,
  #resetBtn {
    width: 100%;
    min-height: 42px;
  }

  #createBtn {
    width: 100%;
    min-height: 44px;
  }

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

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

  .admin-post-filters,
  .admin-users-filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .admin-post-filters select,
  .admin-post-filters input,
  .admin-post-filters .btn,
  .admin-users-filters select,
  .admin-users-filters input,
  .admin-users-filters .btn {
    width: 100%;
  }

  .table-wrap {
    overflow: visible;
  }

  table thead {
    display: none;
  }

  table,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }

  tbody tr {
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 0.42rem;
    padding: 0.38rem 0.5rem;
    background: #fff;
  }

  tbody td {
    border-bottom: none;
    display: grid;
    grid-template-columns: 3.2rem minmax(0, 1fr);
    align-items: start;
    column-gap: 0.35rem;
    padding: 0.12rem 0;
    font-size: 0.88rem;
    line-height: 1.28;
    word-break: break-word;
  }

  tbody td::before {
    content: attr(data-label);
    display: block;
    width: auto;
    color: var(--muted);
    margin: 0;
    font-size: 0.74rem;
    line-height: 1.28;
    font-weight: 600;
  }

  .title-with-tag {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.18rem;
    flex-wrap: wrap;
    min-width: 0;
  }

  .post-title-clamp,
  .post-preview-clamp {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    line-height: 1.35;
  }

  .report-status-pill {
    padding: 0.03rem 0.34rem;
    font-size: 0.64rem;
  }

  .pagination {
    gap: 0.22rem;
  }

  .page-btn {
    min-width: 36px;
    height: 34px;
  }

  #listView .table-wrap {
    border-top: 1px solid #ece2f6;
    border-bottom: 1px solid #ece2f6;
  }

  #postTableBody tr {
    display: grid;
    grid-template-columns: 3.25rem minmax(0, 1fr) 4.8rem 3.2rem;
    align-items: center;
    gap: 0.35rem;
    border: none;
    border-radius: 0;
    margin-bottom: 0;
    padding: 0.5rem 0.12rem;
    background: transparent;
    border-bottom: 1px solid #f0e7f8;
  }

  #postTableBody tr:last-child {
    border-bottom: none;
  }

  #postTableBody td {
    display: block;
    width: auto;
    min-width: 0;
    padding: 0;
    font-size: 0.82rem;
    line-height: 1.25;
  }

  #postTableBody td::before {
    content: none;
    display: none;
  }

  #postTableBody td:nth-child(1),
  #postTableBody td:nth-child(3),
  #postTableBody td:nth-child(4) {
    color: var(--muted);
    font-size: 0.76rem;
    white-space: nowrap;
  }

  #postTableBody td:nth-child(1) {
    text-align: center;
  }

  #postTableBody td:nth-child(3),
  #postTableBody td:nth-child(4) {
    text-align: right;
  }

  #postTableBody td:nth-child(5) {
    display: none;
  }

  #postTableBody .title-with-tag {
    display: flex;
    align-items: center;
    gap: 0.22rem;
    flex-wrap: nowrap;
    min-width: 0;
  }

  #postTableBody .post-title-clamp {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.25;
  }

  #postTableBody .report-status-pill {
    flex: 0 0 auto;
  }

  tbody td:not([data-label])::before {
    content: none;
    display: none;
  }

  .action-inline {
    width: 100%;
    gap: 0.4rem;
  }

  .action-inline .btn,
  .action-inline .status-select {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }

  .admin-user-actions {
    width: 100%;
    max-width: none;
  }

  .admin-user-action-row {
    grid-template-columns: 1fr;
  }

  .admin-user-action-row .status-select,
  .admin-user-action-row .btn,
  .admin-user-actions > .btn {
    width: 100%;
    min-width: 0;
  }

  .actions {
    justify-content: stretch;
  }

  .actions .btn {
    flex: 1 1 100%;
    min-height: 42px;
  }

  .attachment-card {
    grid-template-columns: 64px minmax(0, 1fr);
    padding: 0.52rem;
  }

  .attachment-thumb {
    width: 64px;
    height: 64px;
  }

  .attachment-remove {
    grid-column: 1 / -1;
    width: 100%;
    justify-self: stretch;
  }

  .detail-report-status-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .detail-report-status-controls .btn,
  .detail-report-status-controls select {
    width: 100%;
  }

  .detail-user-actions {
    justify-content: stretch;
  }

  .detail-user-actions .btn {
    width: 100%;
  }

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

  .detail-external-actions {
    justify-content: stretch;
  }

  .detail-external-actions .btn {
    width: 100%;
  }

  .detail-external iframe {
    min-height: 260px;
  }

  .toast-container {
    right: 8px;
    left: 8px;
    width: auto;
  }

  .modal-overlay {
    padding: 0.55rem;
  }

  .modal-card {
    width: 100%;
    padding: 0.75rem;
  }

  .modal-actions {
    justify-content: stretch;
  }

  .modal-actions .btn {
    width: 100%;
  }

  .comment-form textarea {
    min-height: 100px;
  }

  .comment-form-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem;
    align-items: stretch;
  }

  .comment-form-actions .btn {
    width: 100%;
  }

  .comment-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .comment-actions {
    justify-content: stretch;
  }

  .comment-actions .btn {
    width: 100%;
  }

  .comment-item-reply {
    margin-left: 8px;
  }

  .comment-reply-actions {
    justify-content: stretch;
  }

  .comment-reply-actions .btn {
    width: 100%;
  }

  textarea {
    min-height: 180px;
  }

  .content-editor .tox.tox-tinymce {
    min-height: 180px;
  }

  .meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.3rem;
    margin-bottom: 0.6rem;
  }
}



.btn:link,
.btn:visited {
  text-decoration: none !important;
}





