:root {
  --navy: #102a43;
  --blue: #076bbc;
  --blue-light: #eaf4ff;
  --bg: #f3f6fa;
  --ink: #14243a;
  --muted: #617085;
  --line: #dfe6ef;
  --white: #fff;
  --radius: 12px;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.5;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
a {
  color: var(--blue);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #39a1ef;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 1.75rem;
  line-height: 1.25;
  letter-spacing: -0.03em;
}
h2 {
  font-size: 1.15rem;
  line-height: 1.4;
}
h3 {
  font-size: 1rem;
}
small,
.small {
  font-size: 0.8125rem;
}
svg.icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
span[data-icon] {
  display: inline-flex;
  align-items: center;
}
.skip-link {
  position: fixed;
  left: 230px;
  top: -60px;
  background: white;
  padding: 12px;
  z-index: 100;
}
.skip-link:focus {
  top: 5px;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 220px;
  background: var(--navy);
  color: white;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 5px;
  color: white;
  font-size: 1.18rem;
  font-weight: 700;
  margin-bottom: 30px;
  white-space: nowrap;
}
.brand:hover {
  text-decoration: none;
}
.sidebar nav {
  display: grid;
  gap: 7px;
}
.sidebar nav a,
.sidebar-bottom a {
  display: flex;
  align-items: center;
  gap: 13px;
  color: #edf3fa;
  padding: 14px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
}
.sidebar nav a:hover,
.sidebar-bottom a:hover {
  background: #1c3b58;
  text-decoration: none;
}
.sidebar a.active {
  background: var(--blue);
  color: #fff;
}
.sidebar-bottom {
  margin-top: auto;
}
.sidebar-bottom p {
  font-size: 0.75rem;
  color: #b2c4d6;
  padding: 12px;
}
.workspace {
  margin-left: 220px;
  min-width: 0;
}
.topbar {
  height: 74px;
  padding: 0 30px;
  display: flex;
  gap: 12px;
  align-items: center;
  background: white;
  border-bottom: 1px solid var(--line);
}
.global-search {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 610px;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 3px 12px;
  color: var(--muted);
}
.global-search input {
  border: 0;
  min-width: 0;
  width: 100%;
  background: transparent;
  outline: none;
  height: 38px;
  font-size: 0.875rem;
}
.language {
  margin-left: auto;
  font-size: 0.875rem;
  color: var(--muted);
}
.user-avatar,
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #dcf1ed;
  color: #17605b;
  border-radius: 50%;
  font-size: 0.875rem;
  font-weight: 600;
  width: 36px;
  height: 36px;
}
.user-avatar {
  color: #fff;
  background: #088ba0;
}
.user-name {
  font-size: 0.875rem;
}
.menu-toggle {
  display: none !important;
}
main {
  padding: 28px 30px;
  min-height: calc(100vh - 125px);
}
footer {
  padding: 10px 30px 20px;
  color: var(--muted);
  font-size: 0.75rem;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
}
.page-heading .muted {
  margin-top: 6px;
}
.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 7px;
}
.muted {
  color: var(--muted);
}
.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.btn,
.icon-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 7px;
  min-height: 40px;
  padding: 9px 15px;
  font-size: 0.875rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn:hover {
  background: #f6f9fd;
  text-decoration: none;
}
.btn-primary {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}
.btn-primary:hover {
  background: #005b9f;
}
.btn-danger {
  color: #b52939;
}
.icon-button {
  padding: 5px;
  width: 38px;
  font-size: 1.5rem;
}
.text-button {
  border: 0;
  background: none;
  color: var(--blue);
  padding: 5px;
  font-size: 0.875rem;
}
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.filter-bar label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 145px;
  max-width: 280px;
  color: var(--muted);
  font-size: 0.8125rem;
}
.filter-bar input,
.filter-bar select,
.field input,
.field select,
.field textarea,
.search-input {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  background: white;
  color: var(--ink);
  width: 100%;
  min-height: 42px;
  font-size: 0.875rem;
}
.filter-bar .date-field {
  max-width: 165px;
}
.type-filter {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-width: 100%;
}
.type-filter-trigger {
  max-width: 350px;
  text-align: left;
  min-height: 42px;
}
.type-options {
  display: grid;
  gap: 8px;
  max-height: min(52vh, 520px);
  overflow-y: auto;
  padding: 4px;
}
.type-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.9375rem;
  cursor: pointer;
}
.type-option:has(input:checked) {
  background: #edf6ff;
  border-color: #076bbc;
}
.type-option input { width: 18px; height: 18px; flex-shrink: 0; accent-color: #076bbc; }
.type-option span { flex: 1; }
.type-option strong { padding: 4px 9px; border-radius: 16px; background: #edf2f8; font-size: 0.875rem; }
.type-filter-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding-top: 20px; }
.organization-type-badge { display: inline-block; padding: 5px 9px; margin-bottom: 12px; border-radius: 6px; background: #edf6ff; color: #075a9a; font-size: 0.8125rem; }
.type-option[hidden], [data-org-name][hidden] { display: none; }
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}
.metric {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 19px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.metric-icon {
  background: #e4f1ff;
  color: #0671bf;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  flex-shrink: 0;
}
.metric:nth-child(3) .metric-icon {
  background: #e1f3e8;
  color: #227d50;
}
.metric:nth-child(4) .metric-icon {
  background: #eee8fc;
  color: #7951bb;
}
.metric strong {
  display: block;
  font-size: 1.75rem;
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.metric span:not(.metric-icon) {
  font-size: 0.875rem;
  color: var(--muted);
}
.notice {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background: var(--blue-light);
  padding: 13px 17px;
  border-radius: 8px;
  color: #244b71;
  font-size: 0.875rem;
  margin: 18px 0;
}
.notice.warning {
  background: #fff5df;
  color: #785010;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 14px;
  gap: 14px;
}
.tabs {
  display: flex;
  gap: 22px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  margin: 4px 0 18px;
}
.tabs button,
.tabs a {
  padding: 11px 2px;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  background: none;
  font-size: 0.875rem;
}
.tabs .active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.post-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.post-header {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.post-owner {
  min-width: 0;
  flex: 1;
}
.post-owner strong {
  font-size: 0.8125rem;
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.post-owner small {
  display: block;
  line-height: 1.4;
  color: var(--muted);
  margin-top: 3px;
}
.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fafcfe;
  padding: 3px 7px;
  font-size: 0.75rem;
  white-space: nowrap;
  font-weight: 500;
}
.badge.telegram {
  color: #0278aa;
  background: #edf8fd;
}
.badge.youtube {
  color: #ba2727;
  background: #fff3f3;
}
.badge.instagram {
  color: #874589;
  background: #fff3fc;
}
.post-image {
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 7px;
  width: 100%;
  background: #edf2f8;
  display: block;
}
.post-title {
  font-size: 0.95rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.post-text {
  font-size: 0.875rem;
  line-height: 1.6;
  white-space: pre-line;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}
.post-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  font-size: 0.75rem;
  color: var(--muted);
}
.post-metrics b {
  font-weight: 500;
  color: var(--ink);
}
.reaction-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.reaction-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}
.reaction-chip.selected {
  background: var(--blue-light);
  border-color: #74b4e7;
  color: #00558d;
}
.card-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid #edf1f6;
  padding-top: 10px;
  margin-top: auto;
}
.card-actions .btn {
  padding: 6px 9px;
  min-height: 33px;
  font-size: 0.8125rem;
  color: var(--blue);
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0;
  color: var(--muted);
  font-size: 0.875rem;
}
.empty-state {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 42px 24px;
  text-align: center;
  grid-column: 1/-1;
}
.empty-state h2 {
  margin-bottom: 8px;
}
.empty-state p {
  max-width: 540px;
  margin: 0 auto 18px;
  color: var(--muted);
  font-size: 0.875rem;
}
.panel {
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 20px;
}
.table-wrap {
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}
th {
  padding: 15px 17px;
  background: #f9fbfd;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.8125rem;
  white-space: nowrap;
}
td {
  padding: 17px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}
td .person {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 195px;
}
td .person a {
  font-weight: 600;
  color: var(--ink);
}
td small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.status {
  font-size: 0.8125rem;
  color: #276344;
  background: #eaf6ee;
  padding: 4px 8px;
  border-radius: 5px;
  display: inline-block;
}
.status.pending {
  color: #866221;
  background: #fff5dc;
}
.status.unlinked {
  color: #546b83;
  background: #eef3f8;
}
.numeric {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.profile-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 22px;
}
.profile-summary {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  align-self: start;
}
.profile-summary .avatar {
  height: 64px;
  width: 64px;
  font-size: 1.35rem;
  margin-bottom: 14px;
}
.profile-summary h2 {
  font-size: 1.05rem;
}
.profile-summary .badge {
  margin: 12px 3px 0 0;
}
.profile-stats {
  margin: 20px 0;
}
.profile-stats > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #edf1f6;
  font-size: 0.8125rem;
}
.profile-stats strong {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.reaction-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 14px;
}
.reaction-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f9fd;
  text-align: left;
}
.reaction-row .emoji {
  font-size: 1.9rem;
  line-height: 1.2;
  min-width: 36px;
}
.reaction-row strong {
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}
.reaction-row .arrow {
  margin-left: auto;
  color: var(--muted);
}
.reaction-row:hover {
  border-color: #6bb3e3;
  background: var(--blue-light);
}
.profile-content {
  min-width: 0;
}
.profile-content .filter-bar label {
  min-width: 115px;
}
.org-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.org-grid .panel {
  margin: 0;
}
.org-grid h2 {
  margin-bottom: 14px;
}
.org-grid p {
  font-size: 0.875rem;
  margin: 8px 0;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 0.875rem;
}
.field textarea {
  min-height: 100px;
  resize: vertical;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.field.full {
  grid-column: 1/-1;
}
.check-list {
  display: grid;
  gap: 9px;
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
.check-row {
  display: flex;
  gap: 9px;
  font-size: 0.875rem;
  align-items: flex-start;
  padding: 5px;
}
.check-row input {
  margin-top: 5px;
  accent-color: var(--blue);
}
.check-row small {
  display: block;
  color: var(--muted);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0;
  width: min(1260px, 94vw);
  max-width: 94vw;
  max-height: 90vh;
  color: var(--ink);
  box-shadow: 0 25px 100px #102a4333;
}
dialog::backdrop {
  background: #0b1e3aa6;
}
dialog.narrow {
  width: min(700px, 94vw);
}
.modal-heading {
  position: sticky;
  top: 0;
  z-index: 2;
  background: white;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}
.modal-heading h2 {
  font-size: 1.25rem;
}
.modal-heading p {
  font-size: 0.875rem;
  margin-top: 4px;
}
.modal-body {
  padding: 20px 24px;
  background: #f7f9fc;
}
.modal-body .post-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.detail-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.7;
}
.comment {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.comment p {
  white-space: pre-wrap;
  font-size: 0.875rem;
  margin-top: 7px;
}
.loading {
  padding: 40px;
  text-align: center;
  color: var(--muted);
  grid-column: 1/-1;
}
.loading::before {
  content: "";
  display: block;
  width: 23px;
  height: 23px;
  border: 3px solid #dbe9f6;
  border-top-color: var(--blue);
  border-radius: 50%;
  margin: 0 auto 12px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
#toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: var(--navy);
  color: white;
  padding: 12px 18px;
  border-radius: 8px;
  box-shadow: 0 8px 24px #102a4333;
  z-index: 100;
  max-width: 400px;
  font-size: 0.875rem;
}
#toast:empty {
  display: none;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1700px) {
  main {
    padding: 32px 38px;
  }
  .post-card {
    padding: 18px;
  }
  .post-text {
    font-size: 0.95rem;
  }
}
@media (max-width: 1200px) {
  .profile-layout {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 16px;
  }
  .profile-content .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric-grid {
    gap: 10px;
  }
  .metric {
    padding: 14px;
    gap: 9px;
  }
  .metric strong {
    font-size: 1.45rem;
  }
  .metric-icon {
    width: 36px;
    height: 36px;
  }
}
@media (max-width: 960px) {
  .sidebar {
    width: 195px;
    padding: 17px 8px;
  }
  .workspace {
    margin-left: 195px;
  }
  .brand {
    font-size: 1.05rem;
  }
  .sidebar nav a {
    padding: 12px 9px;
    font-size: 0.8125rem;
    gap: 10px;
  }
  .topbar,
  main {
    padding-left: 20px;
    padding-right: 20px;
  }
  .post-grid,
  .org-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .profile-layout {
    grid-template-columns: 1fr;
  }
  .profile-summary {
    display: block;
  }
  .reaction-list {
    max-width: 350px;
  }
  .user-name {
    display: none;
  }
  .modal-body .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .sidebar {
    transform: translateX(-100%);
    width: 220px;
    transition: transform 0.15s;
  }
  .sidebar.open {
    transform: none;
  }
  .workspace {
    margin-left: 0;
  }
  .menu-toggle {
    display: flex !important;
  }
  .topbar {
    height: 66px;
    padding: 0 14px;
    gap: 8px;
  }
  .language {
    display: none;
  }
  .global-search {
    padding: 3px 7px;
    gap: 5px;
  }
  .global-search input {
    font-size: 0.8125rem;
  }
  .global-search .text-button {
    display: none;
  }
  main {
    padding: 22px 16px;
  }
  .page-heading {
    flex-direction: column;
    gap: 15px;
    margin-bottom: 18px;
  }
  h1 {
    font-size: 1.5rem;
  }
  .post-grid,
  .profile-content .post-grid,
  .org-grid,
  .modal-body .post-grid {
    grid-template-columns: 1fr;
  }
  .metric {
    gap: 8px;
    padding: 12px;
  }
  .metric-icon {
    display: none;
  }
  .metric strong {
    font-size: 1.5rem;
  }
  .metric span:not(.metric-icon) {
    font-size: 0.8125rem;
  }
  .filter-bar {
    gap: 9px;
  }
  .filter-bar label {
    min-width: 125px;
    max-width: none;
  }
  .filter-bar .date-field {
    max-width: none;
  }
  .modal-heading {
    padding: 18px;
  }
  .modal-body {
    padding: 16px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .tabs {
    gap: 17px;
    overflow: auto;
  }
  .pagination {
    flex-wrap: wrap;
  }
  .notice {
    align-items: flex-start;
  }
  .user-avatar {
    width: 30px;
    height: 30px;
  }
  .profile-summary {
    padding: 17px;
  }
  .profile-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
  }
  .reaction-list {
    max-width: none;
  }
  footer {
    padding: 12px 16px;
  }
  .card-actions .btn {
    flex: 1;
  }
  #toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
