* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f6f8;
  color: #222;
}

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

.sidebar {
  width: 240px;
  background: #111827;
  color: white;
  padding: 24px 18px;
}

.sidebar h1 {
  font-size: 20px;
  margin: 0 0 28px;
}

.sidebar a {
  display: block;
  color: #d1d5db;
  text-decoration: none;
  padding: 12px 10px;
  border-radius: 8px;
  margin-bottom: 6px;
}

.sidebar a:hover {
  background: #1f2937;
  color: white;
}

.content {
  flex: 1;
  padding: 32px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.card {
  background: white;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

.card strong {
  display: block;
  font-size: 18px;
  margin-bottom: 8px;
}

.card span {
  color: #6b7280;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  margin-top: 24px;
  border-radius: 12px;
  overflow: hidden;
}

th, td {
  padding: 14px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
  text-align: left;
}

th {
  background: #f9fafb;
  font-weight: 700;
}

.empty {
  text-align: center;
  color: #6b7280;
  padding: 30px;
}

.title-cell {
  max-width: 360px;
  font-weight: 600;
}

.badge {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge.ok {
  background: #dcfce7;
  color: #166534;
}

.badge.no {
  background: #fee2e2;
  color: #991b1b;
}

.priority {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.priority.high {
  background: #fee2e2;
  color: #991b1b;
}

.priority.medium {
  background: #fef3c7;
  color: #92400e;
}

.priority.low {
  background: #dcfce7;
  color: #166534;
}

.error {
  background: #fee2e2;
  color: #991b1b;
  padding: 14px;
  border-radius: 10px;
  margin: 16px 0;
}

.success {
  background: #dcfce7;
  color: #166534;
  padding: 14px;
  border-radius: 10px;
  margin: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #2563eb;
  color: white;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.brand h1 {
  margin: 0;
  font-size: 19px;
}

.brand span {
  display: block;
  color: #9ca3af;
  font-size: 12px;
  margin-top: 3px;
}

.nav a {
  font-size: 15px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}

.topbar h2 {
  margin: 0 0 6px;
  font-size: 28px;
}

.topbar p {
  margin: 0;
  color: #6b7280;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  padding: 10px 14px;
  border-radius: 999px;
  color: #374151;
  box-shadow: 0 6px 16px rgba(0,0,0,0.04);
  font-size: 13px;
}

.status-dot {
  width: 9px;
  height: 9px;
  background: #22c55e;
  border-radius: 50%;
}

.page-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.panel {
  background: white;
  margin-top: 24px;
  padding: 22px;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

.panel h3 {
  margin-top: 0;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.stat-card span {
  display: block;
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 8px;
}

.stat-card strong {
  font-size: 34px;
  color: #111827;
}

.log-row {
  display: grid;
  grid-template-columns: 100px 1fr 180px;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid #e5e7eb;
  align-items: center;
}

.log-row:last-child {
  border-bottom: none;
}

.log-status {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 8px;
  border-radius: 999px;
  text-align: center;
}

.posts-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 16px;
}

.posts-count {
  color: #4b5563;
}

.posts-count strong {
  color: #111827;
}

.posts-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.limit-form select {
  height: 40px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 0 12px;
  background: white;
  font-weight: 600;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
}

.pagination a,
.pagination .disabled,
.page-info {
  padding: 9px 13px;
  border-radius: 10px;
  background: white;
  text-decoration: none;
  color: #111827;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.pagination .disabled {
  color: #9ca3af;
  background: #f3f4f6;
}

.page-info {
  color: #4b5563;
}

.pagination-top {
  margin-top: 0;
  margin-bottom: 16px;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  border: none;
  background: #111827;
  color: white;
  padding: 12px 15px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0,0,0,0.22);
  z-index: 50;
}

.back-to-top:hover {
  background: #2563eb;
}

.filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  background: white;
  padding: 14px;
  border-radius: 14px;
  margin-bottom: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.04);
}

.filter-bar input,
.filter-bar select {
  height: 40px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 0 12px;
  background: white;
  font-weight: 600;
}

.filter-bar input {
  min-width: 320px;
  flex: 1;
}

.btn.secondary {
  background: #6b7280;
  color: white;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.btn.secondary:hover {
  background: #4b5563;
}

.table-wrap {
  max-height: calc(100vh - 260px);
  overflow: auto;
  border-radius: 12px;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 5;
}

th a {
  color: #111827;
  text-decoration: none;
}

th a:hover {
  color: #2563eb;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.back-link {
  color: #2563eb;
  font-weight: 800;
  text-decoration: none;
}

.detail-title-card {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  background: white;
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
  margin-bottom: 20px;
}

.detail-title-card h1 {
  margin: 8px 0;
  font-size: 28px;
}

.muted {
  color: #6b7280;
}

.small {
  font-size: 13px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.metric-card {
  background: white;
  padding: 18px;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.04);
}

.metric-card span {
  display: block;
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 8px;
}

.metric-card strong {
  font-size: 26px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}

.issue-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e5e7eb;
}

.issue-row:last-child {
  border-bottom: none;
}

.issue-row p {
  margin: 0;
  font-weight: 600;
}

.quick-actions {
  position: sticky;
  top: 20px;
}

.action-btn {
  width: 100%;
  display: block;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #374151;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 10px;
  font-weight: 800;
  text-align: left;
}

.content-preview {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  padding: 20px;
  border-radius: 12px;
  max-height: 620px;
  overflow: auto;
}

.content-preview img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.content-preview h2,
.content-preview h3 {
  margin-top: 28px;
}

.link-row {
  padding: 12px 0;
  border-bottom: 1px solid #e5e7eb;
}

.link-row:last-child {
  border-bottom: none;
}

.link-row strong {
  display: block;
  margin-bottom: 6px;
}

.link-row a,
.image-row a {
  color: #2563eb;
  word-break: break-all;
  font-size: 13px;
}

.image-row {
  padding: 14px 0;
  border-bottom: 1px solid #e5e7eb;
}

.image-row:last-child {
  border-bottom: none;
}

.image-row p {
  margin: 8px 0;
}

.seo-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 6px 9px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 13px;
}

.seo-score.good {
  background: #dcfce7;
  color: #166534;
}

.seo-score.mid {
  background: #fef3c7;
  color: #92400e;
}

.seo-score.bad {
  background: #fee2e2;
  color: #991b1b;
}

.score-card {
  border: 2px solid #2563eb;
}

.score-card strong {
  color: #2563eb;
}

.deduction-row {
  display: grid;
  grid-template-columns: 90px 60px 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #e5e7eb;
}

.deduction-row:last-child {
  border-bottom: none;
}

.deduction-row p {
  margin: 0;
  font-weight: 600;
}

.deduction-row strong {
  color: #991b1b;
}

.deduction-group {
  display: inline-block;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 14px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.filter-reset {
  display: inline-flex;
  align-items: center;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.page-number {
  min-width: 38px;
  text-align: center;
}

.page-number.active {
  background: #2563eb;
  color: white;
}

.doc-panel pre {
  white-space: pre-wrap;
  word-break: keep-all;
  line-height: 1.7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  color: #111827;
}

.queue-status {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.queue-status.pending {
  background: #fef3c7;
  color: #92400e;
}

.queue-status.running {
  background: #dbeafe;
  color: #1d4ed8;
}

.queue-status.success {
  background: #dcfce7;
  color: #166534;
}

.queue-status.failed {
  background: #fee2e2;
  color: #991b1b;
}

.result-box {
  white-space: pre-wrap;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  padding: 18px;
  border-radius: 12px;
  line-height: 1.7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.small-text {
  font-size: 15px !important;
  word-break: break-word;
}

.detail-title-card {
  align-items: flex-start;
}

.detail-title-card .queue-status {
  min-width: 96px;
  text-align: center;
  white-space: nowrap;
}

.metric-card {
  min-width: 0;
  overflow: hidden;
}

.metric-card strong {
  display: block;
  max-width: 100%;
  font-size: 24px;
  line-height: 1.2;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.detail-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.detail-header .btn,
.detail-header .btn.secondary {
  text-decoration: none;
}

.recommend-card {
  position: relative;
  padding: 20px 22px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
}

.recommend-card + .recommend-card {
  margin-top: 14px;
}

.recommend-card strong {
  display: block;
  font-size: 17px;
  margin-bottom: 10px;
}

.recommend-card p {
  margin: 0 0 14px;
  color: #4b5563;
  line-height: 1.65;
}

.recommend-card a {
  display: inline-flex;
  float: right;
  padding: 8px 12px;
  border-radius: 10px;
  background: #f3f4f6;
  color: #111827;
  font-weight: 800;
  text-decoration: none;
}

.recommend-card a:hover {
  background: #e5e7eb;
}

.recommend-card::after {
  content: "";
  display: block;
  clear: both;
}

.company-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.company-form input {
  padding: 11px 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 14px;
}

.company-form button {
  width: fit-content;
}
/* ==========================
   Tooltip
========================== */

.tooltip {
  position: relative;
  cursor: pointer;
}

.tooltip::after {
  content: attr(data-tip);

  position: absolute;

  left: 105%;
  top: 50%;

  transform: translateY(-50%);

  width: 220px;

  background: #2d3748;
  color: #fff;

  padding: 10px 12px;

  border-radius: 8px;

  font-size: 13px;
  line-height: 1.5;

  box-shadow: 0 8px 20px rgba(0,0,0,.18);

  opacity: 0;
  visibility: hidden;

  transition: .18s;

  z-index: 9999;
}

.tooltip:hover::after{
  opacity:1;
  visibility:visible;
}

.brand-title {
  display: block;
  font-size: 20px;
  font-weight: 900;
  color: inherit;
  text-decoration: none;
}

.brand-title:hover {
  text-decoration: underline;
}

/* ==========================
   Sidebar Navigation
========================== */

.nav a{
    display:block;
    padding:12px 16px;
    margin:4px 0;
    border-radius:10px;

    color:#4b5563;
    text-decoration:none;

    font-weight:600;

    transition:.18s;
}

.nav a:hover{
    background:#eef5ff;
    color:#2563eb;
}

.nav a.active{
    background:#2563eb;
    color:#fff;

    box-shadow:0 8px 18px rgba(37,99,235,.25);
}


/* Breadcrumb */

.breadcrumb{
    margin-bottom:20px;
    font-size:13px;
    color:#6b7280;
}

.breadcrumb a{
    color:#2563eb;
    text-decoration:none;
}

.breadcrumb span{
    margin:0 8px;
}

.breadcrumb strong{
    color:#111827;
}


.nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nav-count {
  min-width: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.nav a.active .nav-count {
  background: rgba(255,255,255,.2);
  color: #fff;
}

.mini-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.mini-badge.ok {
  background: #dcfce7;
  color: #166534;
}

.mini-badge.wait {
  background: #f3f4f6;
  color: #6b7280;
}

/* ==========================
   Sticky Table Header
========================== */

.table-wrap {
  position: relative;
  overflow: auto;
}

.table-wrap table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f9fafb;
  box-shadow: 0 1px 0 #e5e7eb;
}


/* Sticky table header - stronger */
.table-wrap {
  max-height: calc(100vh - 220px);
  overflow: auto;
}

.table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #ffffff;
  border-bottom: 2px solid #d1d5db;
}

.table-wrap thead th::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: #d1d5db;
}

/* ==========================
   Posts Table v0.2
========================== */

.posts-table-wrap {
  max-height: calc(100vh - 330px);
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
}

.posts-table-wrap table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1500px;
}

.posts-table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #f8fafc;
  border-bottom: 2px solid #d1d5db;
}

/* Post ID 고정 */
.posts-table-wrap th:nth-child(1),
.posts-table-wrap td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 20;
  background: #fff;
}

/* 제목 고정 */
.posts-table-wrap th:nth-child(2),
.posts-table-wrap td:nth-child(2) {
  position: sticky;
  left: 90px;
  z-index: 20;
  background: #fff;
  box-shadow: 2px 0 0 #e5e7eb;
}

/* 헤더가 왼쪽 고정 컬럼보다 위에 오도록 */
.posts-table-wrap thead th:nth-child(1),
.posts-table-wrap thead th:nth-child(2) {
  z-index: 40;
  background: #f8fafc;
}

.posts-table-wrap th:nth-child(1),
.posts-table-wrap td:nth-child(1) {
  min-width: 90px;
}

.posts-table-wrap th:nth-child(2),
.posts-table-wrap td:nth-child(2) {
  min-width: 360px;
  max-width: 420px;
}


/* ==========================
   Posts v2 Table Compact
========================== */

.posts-v2-table {
  max-height: calc(100vh - 330px);
  overflow: auto;
}

.posts-v2-table table {
  min-width: 1050px;
}

.post-title-ellipsis {
  max-width: 430px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.issue-cell {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.issue-dot {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.issue-dot.ok {
  background: #dcfce7;
  color: #166534;
}

.issue-dot.warn {
  background: #fef3c7;
  color: #92400e;
}

.issue-dot.bad {
  background: #fee2e2;
  color: #991b1b;
}

/* Posts row click */
.clickable-row {
  cursor: pointer;
}

.clickable-row:hover td {
  background: #f8fafc;
}

.sync-inline-form {
  display: inline-flex;
  margin-left: auto;
}

.filter-bar {
  align-items: center;
}

/* Bulk Actions */
.bulk-action-bar {
  display: none;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  padding: 12px 14px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  color: #1e40af;
}

.post-checkbox {
  transform: scale(1.15);
  cursor: pointer;
}

/* ==========================
   Posts v2 Table Fix
========================== */

.posts-v2-table table {
  table-layout: fixed;
  width: 100%;
  min-width: 1180px;
}

/* 기존 sticky/freeze 컬럼 영향 제거 */
.posts-v2-table th,
.posts-v2-table td {
  position: static !important;
  left: auto !important;
  z-index: auto !important;
}

/* 헤더만 고정 */
.posts-v2-table thead th {
  position: sticky !important;
  top: 0;
  z-index: 10 !important;
  background: #f8fafc;
}

/* 컬럼 폭 재설정 */
.posts-v2-table th:nth-child(1),
.posts-v2-table td:nth-child(1) {
  width: 44px;
  text-align: center;
}

.posts-v2-table th:nth-child(2),
.posts-v2-table td:nth-child(2) {
  width: 76px;
}

.posts-v2-table th:nth-child(3),
.posts-v2-table td:nth-child(3) {
  width: 430px;
}

.posts-v2-table th:nth-child(4),
.posts-v2-table td:nth-child(4) {
  width: 130px;
}

.posts-v2-table th:nth-child(5),
.posts-v2-table td:nth-child(5) {
  width: 100px;
}

.posts-v2-table th:nth-child(6),
.posts-v2-table td:nth-child(6) {
  width: 80px;
  text-align: center;
}

.posts-v2-table th:nth-child(7),
.posts-v2-table td:nth-child(7) {
  width: 140px;
}

.posts-v2-table th:nth-child(8),
.posts-v2-table td:nth-child(8) {
  width: 110px;
}

.posts-v2-table .post-title-ellipsis {
  max-width: 410px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.posts-v2-table .issue-cell {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
}

/* Posts v2 column alignment fix */
.posts-v2-table table {
  table-layout: fixed !important;
  width: 100%;
  min-width: 1134px;
  border-collapse: collapse;
}

.posts-v2-table th,
.posts-v2-table td {
  box-sizing: border-box;
  vertical-align: middle;
  overflow: hidden;
}

.posts-v2-table th {
  white-space: nowrap;
}

.posts-v2-table td {
  white-space: normal;
}

.posts-v2-table td:nth-child(3) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.posts-v2-table th:nth-child(1),
.posts-v2-table td:nth-child(1),
.posts-v2-table th:nth-child(2),
.posts-v2-table td:nth-child(2),
.posts-v2-table th:nth-child(6),
.posts-v2-table td:nth-child(6),
.posts-v2-table th:nth-child(8),
.posts-v2-table td:nth-child(8) {
  text-align: center;
}

/* Posts v2 issue alignment final fix */
.posts-v2-table td.issue-cell {
  display: table-cell !important;
  white-space: nowrap !important;
  vertical-align: middle !important;
}

.posts-v2-table .issue-dot {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
  vertical-align: middle;
}

/* Row click visual */
.posts-v2-table .clickable-row {
  cursor: pointer;
}

.posts-v2-table .clickable-row:hover td {
  background: #f8fafc !important;
}

/* Recommendation Bundle Work Queue */
.bundle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.bundle-card {
  display: block;
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: .18s;
}

.bundle-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
}

.bundle-top,
.bundle-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.bundle-card h4 {
  margin: 14px 0;
  font-size: 16px;
  line-height: 1.45;
}

.bundle-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  font-size: 13px;
  color: #6b7280;
}

.bundle-stats b {
  color: #111827;
}

.progress-bar {
  height: 9px;
  margin: 14px 0 10px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.progress-bar div {
  height: 100%;
  background: #2563eb;
}

.bundle-footer {
  color: #6b7280;
  font-size: 12px;
}

.bundle-task-list {
  display: grid;
  gap: 12px;
}

.bundle-task-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
}

.bundle-task-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bulk-textarea {
  width: 100%;
  min-height: 180px;
  padding: 14px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  margin-bottom: 12px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.info-grid > div {
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}

.info-grid .wide {
  grid-column: 1 / -1;
}

.info-grid span {
  display: block;
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 6px;
}

.info-grid strong {
  word-break: break-all;
}

.btn.danger {
  background: #dc2626;
  color: #fff;
}

.btn.danger:hover {
  background: #b91c1c;
}

.sync-status-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-wrap: wrap;
}

.last-sync-text {
  font-size: 13px;
  color: #64748b;
}

.last-sync-text strong {
  color: #111827;
}

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

.quick-actions .quick-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}

.quick-actions .action-btn {
  width: 100%;
  border: 1px solid #d7dce5;
  background: #ffffff;
  color: #1f2937;
  border-radius: 10px;
  padding: 11px 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}

.quick-actions .action-btn:hover {
  background: #f3f7ff;
  border-color: #3b82f6;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .16);
  transform: translateY(-1px);
}

.quick-actions .action-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(37, 99, 235, .12);
}

.quick-actions .action-btn.done,
.quick-actions .action-btn:disabled {
  cursor: not-allowed;
  background: #ecfdf3;
  border-color: #86efac;
  color: #166534;
  box-shadow: none;
  transform: none;
}

.quick-actions .mini-link {
  white-space: nowrap;
  font-size: 13px;
  color: #2563eb;
  text-decoration: none;
  font-weight: 700;
}

.quick-actions .mini-link:hover {
  text-decoration: underline;
}


/* ===========================
   BLOG OS SEO 3.0 UI
=========================== */

.filters{
    display:flex;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
}

.filters input{
    flex:1;
    min-width:340px;
}

.filters select{
    min-width:170px;
}

.post-table th,
.post-table td{
    padding:15px 14px;
    vertical-align:middle;
}

.post-table td:nth-child(3){
    font-weight:600;
}

.post-table td:nth-child(4){
    color:#666;
    font-size:14px;
}

.post-table td:nth-child(5){
    white-space:nowrap;
}

.score-badge{
    font-weight:700;
    min-width:44px;
    text-align:center;
}

.metric-card{
    min-height:96px;
}

.detail-grid{
    grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
}

.detail-layout{
    grid-template-columns:2.2fr 0.8fr;
}

.panel{
    border-radius:18px;
}

.quick-actions{
    position:sticky;
    top:20px;
}


/* SEO 3.0 - 글관리 테이블 컬럼 정리 */
.post-table,
.posts-table{
  table-layout: fixed;
  width: 100%;
}

.post-table th:nth-child(1),
.post-table td:nth-child(1){
  width: 44px;
}

.post-table th:nth-child(2),
.post-table td:nth-child(2){
  width: 70px;
}

.post-table th:nth-child(3),
.post-table td:nth-child(3){
  width: auto;
}

.post-table th:nth-child(4),
.post-table td:nth-child(4){
  width: 120px;
}

.post-table th:nth-child(5),
.post-table td:nth-child(5){
  width: 120px;
}

.post-table th:nth-child(6),
.post-table td:nth-child(6){
  width: 70px;
  text-align: center;
}

.post-table th:nth-child(7),
.post-table td:nth-child(7){
  width: 150px;
}

.post-table td:nth-child(3){
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* SEO 3.0 - 글관리 목록 컬럼 폭 최종 정리 */
.posts-v2-table table{
  width:100%;
  table-layout:fixed;
}

.posts-v2-table th:nth-child(1),
.posts-v2-table td:nth-child(1){
  width:42px;
}

.posts-v2-table th:nth-child(2),
.posts-v2-table td:nth-child(2){
  width:74px;
}

.posts-v2-table th:nth-child(3),
.posts-v2-table td:nth-child(3){
  width:auto;
}

.posts-v2-table th:nth-child(4),
.posts-v2-table td:nth-child(4){
  width:130px;
}

.posts-v2-table th:nth-child(5),
.posts-v2-table td:nth-child(5){
  width:120px;
}

.posts-v2-table th:nth-child(6),
.posts-v2-table td:nth-child(6){
  width:78px;
  text-align:center;
}

.posts-v2-table th:nth-child(7),
.posts-v2-table td:nth-child(7){
  width:170px;
}

.posts-v2-table .post-title-ellipsis{
  max-width:none;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* ===== SEO Grade ===== */

.seo-cell{
    text-align:center;
}

.seo-grade{
    display:inline-block;
    min-width:40px;
    padding:3px 8px;
    border-radius:999px;
    color:#fff;
    font-size:12px;
    font-weight:700;
    margin-bottom:6px;
}

.seo-score{
    display:block;
    font-size:18px;
}

.seo-grade-large{
    display:inline-block;
    margin:8px auto;
    padding:6px 14px;
    border-radius:999px;
    color:#fff;
    font-weight:700;
    font-size:18px;
}

.purple{background:#6d28d9;}
.green-dark{background:#15803d;}
.green{background:#16a34a;}
.lime{background:#65a30d;}
.yellow{background:#ca8a04;}
.orange{background:#ea580c;}
.red{background:#dc2626;}



/* BLOG OS v2 compact SEO */

.posts-v2-table .seo-cell{
  text-align:center;
}

.posts-v2-table .seo-score{
  min-width:44px;
  padding:6px 10px;
  border-radius:999px;
  display:inline-block;
  font-weight:700;
}

.posts-v2-table .issue-cell{
  white-space:nowrap;
}

.posts-v2-table .issue-dot{
  margin-right:4px;
}


/* ---------- SEO Potential ---------- */

.seo-potential-panel{
    margin:24px 0;
}

.potential-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:10px 0;
    border-bottom:1px solid #ececec;
}

.potential-row strong{
    color:#16a34a;
    font-size:15px;
}

.potential-summary{
    margin-top:18px;
    display:flex;
    justify-content:center;
    align-items:center;
    gap:26px;
    padding:18px;
    border-radius:12px;
    background:#f8fafc;
}

.potential-summary strong{
    display:block;
    margin-top:6px;
    font-size:30px;
}

.potential-summary .arrow{
    font-size:26px;
    color:#9ca3af;
}


.gain-badge{
    margin-left:8px;
    padding:2px 8px;
    border-radius:999px;
    background:#dcfce7;
    color:#15803d;
    font-size:12px;
    font-weight:700;
}

.action-btn{
    display:flex;
    justify-content:space-between;
    align-items:center;
    width:100%;
}


/* LOG PAGINATION */

.page-btn{
display:inline-flex;
align-items:center;
justify-content:center;
min-width:38px;
height:38px;
padding:0 14px;
border:1px solid #d6dbe3;
border-radius:10px;
background:#fff;
text-decoration:none;
color:#374151;
font-weight:600;
transition:.15s;
}

.page-btn:hover{
background:#f3f4f6;
}

.page-btn.active{
background:#2563eb;
border-color:#2563eb;
color:#fff;
}

/* compact SEO potential inside side panel */
.potential-row.compact{
  padding:8px 0;
}

.potential-summary.compact{
  gap:16px;
  padding:14px;
}

.potential-summary.compact strong{
  font-size:24px;
}


/* Post Detail compact summary panels */
.summary-number{
  display:flex;
  align-items:baseline;
  gap:6px;
  margin:14px 0 12px;
}

.summary-number strong{
  font-size:38px;
  line-height:1;
}

.summary-number span{
  color:#6b7280;
  font-size:14px;
}

.detail-toggle{
  margin-top:12px;
}

.detail-toggle summary{
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  padding:8px 12px;
  border-radius:10px;
  background:#f3f4f6;
  font-weight:700;
  color:#374151;
}

.detail-toggle[open] summary{
  margin-bottom:12px;
}

.alt-summary{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  margin:14px 0;
}

.alt-summary div{
  border:1px solid #e5e7eb;
  border-radius:12px;
  padding:12px;
  background:#f9fafb;
}

.alt-summary strong{
  display:block;
  font-size:24px;
  line-height:1;
  margin-bottom:6px;
}

.alt-summary span{
  color:#6b7280;
  font-size:13px;
}


/* Content preview collapsed layout */
.content-toggle{
  margin-top:12px;
}

.content-toggle .content-preview{
  margin-top:16px;
}


/* Post Detail layout polish */
.detail-layout{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:22px;
  align-items:start;
  margin-top:22px;
}

.detail-title-card,
.detail-grid,
.seo-potential-panel,
.panel{
  margin-bottom:22px;
}

.seo-potential-panel{
  padding:22px 26px;
}

.potential-summary.compact{
  max-width:420px;
  margin-top:18px;
}

.quick-actions form{
  margin-bottom:10px;
}

.quick-actions .action-btn{
  min-height:44px;
}

@media(max-width:900px){
  .detail-layout{
    grid-template-columns:1fr;
  }
}

/* Posts toolbar button polish */
.posts-action-btn,
.posts-search-btn,
.posts-reset-btn{
  height:42px;
  padding:0 15px;
  border-radius:12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-weight:800;
  font-size:14px;
  text-decoration:none;
  cursor:pointer;
  transition:.18s ease;
  border:1px solid #2563eb;
  background:#fff;
  color:#1d4ed8;
  box-shadow:0 6px 16px rgba(37,99,235,.08);
}

.posts-action-btn{
  min-width:170px;
}

.posts-action-btn.primary{
  background:#eff6ff;
}

.posts-search-btn{
  min-width:78px;
  background:#2563eb;
  color:#fff;
}

.posts-reset-btn{
  min-width:86px;
  border-color:#d1d5db;
  color:#374151;
  background:#fff;
}

.posts-action-btn:hover,
.posts-search-btn:hover{
  background:#1d4ed8;
  color:#fff;
  transform:translateY(-1px);
  box-shadow:0 10px 22px rgba(37,99,235,.16);
}

.posts-reset-btn:hover{
  background:#f3f4f6;
  color:#111827;
}

.posts-action-btn span,
.posts-search-btn span,
.posts-reset-btn span{
  font-size:16px;
  line-height:1;
}

.posts-action-btn strong,
.posts-search-btn strong,
.posts-reset-btn strong{
  font-size:13px;
  line-height:1;
}

/* ===== Posts Toolbar Button Tune ===== */

.posts-action-btn,
.posts-search-btn,
.posts-reset-btn{
    height:36px !important;
    padding:0 12px !important;
    border-radius:8px !important;
    gap:6px !important;
    font-size:12px !important;
    box-shadow:0 3px 10px rgba(37,99,235,.08) !important;
}

.posts-action-btn{
    min-width:145px !important;
}

.posts-search-btn{
    min-width:66px !important;
    background:#2563eb !important;
    color:#fff !important;
}

.posts-reset-btn{
    min-width:72px !important;
    border:1px solid #d6d9df !important;
    background:#fff !important;
    color:#4b5563 !important;
}

.posts-action-btn span,
.posts-search-btn span,
.posts-reset-btn span{
    font-size:13px !important;
}

.posts-action-btn strong,
.posts-search-btn strong,
.posts-reset-btn strong{
    font-size:12px !important;
    font-weight:700 !important;
}

.posts-action-btn:hover,
.posts-search-btn:hover{
    transform:translateY(-1px);
    box-shadow:0 6px 16px rgba(37,99,235,.14) !important;
}

.posts-reset-btn:hover{
    background:#f8fafc !important;
    border-color:#cfd5dd !important;
    color:#111827 !important;
}


/* ===== Posts Toolbar Layout Tune ===== */

.posts-toolbar{
  display:flex !important;
  justify-content:space-between !important;
  align-items:flex-start !important;
  gap:20px !important;
  margin:18px 0 16px !important;
}

.posts-count{
  padding-top:8px !important;
  font-size:15px !important;
}

.sync-status-box{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:12px !important;
  flex-wrap:wrap !important;
  text-align:right !important;
}

.sync-inline-form{
  margin:0 !important;
}

.last-sync-text{
  font-size:12px !important;
  color:#6b7280 !important;
  line-height:1.4 !important;
  max-width:460px !important;
}

.last-sync-text strong{
  color:#111827 !important;
  font-weight:800 !important;
}

#wpSyncStatus{
  width:100% !important;
  margin-top:0 !important;
  text-align:right !important;
}

@media(max-width:900px){
  .posts-toolbar{
    flex-direction:column !important;
    align-items:stretch !important;
  }

  .sync-status-box{
    justify-content:flex-start !important;
    text-align:left !important;
  }
}


/* ===== Posts Toolbar Compact Fix ===== */

.posts-toolbar{
  display:flex !important;
  justify-content:space-between !important;
  align-items:center !important;
  margin:18px 0 14px !important;
}

.sync-status-box{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:10px !important;
  flex:0 0 auto !important;
  max-width:620px !important;
  margin-left:auto !important;
}

.posts-action-btn{
  height:34px !important;
  min-width:136px !important;
  padding:0 10px !important;
  border-radius:7px !important;
}

.last-sync-text{
  white-space:nowrap !important;
  max-width:420px !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  font-size:12px !important;
}

.posts-count{
  flex:0 0 auto !important;
  padding-top:0 !important;
}


/* ===== Posts Search Layout ===== */

.posts-filter-form{
    display:flex;
    align-items:center;
    gap:10px;
}

.posts-filter-form input[type="text"]{
    flex:0 0 420px !important;
    max-width:420px !important;
}

.posts-filter-form select{
    flex:0 0 auto !important;
}


/* ===== Posts Filter Bar Width Fix ===== */

.filter-bar{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
}

.filter-bar input[type="text"]{
  flex:0 0 420px !important;
  width:420px !important;
  max-width:420px !important;
}

.filter-bar select{
    flex:0 0 auto;
    min-width:120px;
}

/* ===== Posts Filter Compact ===== */

.filter-bar input[type="text"]{
    width:360px !important;
    max-width:360px !important;
    flex:0 0 360px !important;
}

.filter-bar select[name="category"]{
    width:145px !important;
    min-width:145px !important;
}

.filter-bar select[name="issue"]{
    width:110px !important;
    min-width:110px !important;
}

.filter-bar select[name="limit"]{
    width:96px !important;
    min-width:96px !important;
}

.posts-search-btn{
    min-width:58px !important;
    padding:0 10px !important;
}

.posts-reset-btn{
    min-width:64px !important;
    padding:0 10px !important;
}


/* ===== Posts Filter Sync Button Layout ===== */

.filter-bar{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  flex-wrap:nowrap !important;
}

.filter-bar .posts-action-btn{
  height:34px !important;
  min-width:138px !important;
  padding:0 10px !important;
  border-radius:7px !important;
  margin-left:4px !important;
}

.posts-toolbar{
  margin:16px 0 12px !important;
}

.sync-status-box{
  max-width:520px !important;
}

.last-sync-text{
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}


/* ===== Last Sync Text Position Fix ===== */

.posts-toolbar{
  margin:8px 0 10px !important;
  align-items:center !important;
}

.sync-status-box{
  width:auto !important;
  max-width:none !important;
  margin-left:auto !important;
  align-items:center !important;
}

.last-sync-text{
  max-width:none !important;
  width:auto !important;
  white-space:nowrap !important;
  overflow:visible !important;
  text-overflow:clip !important;
  font-size:12px !important;
  transform:translateY(-6px);
}

.posts-count{
  transform:translateY(-6px);
}


/* ===== iPad / Narrow Desktop Adaptive Fix ===== */

html,
body{
  max-width:100%;
  overflow-x:hidden;
}

.app{
  max-width:100vw;
  overflow-x:hidden;
}

.content{
  min-width:0 !important;
  max-width:calc(100vw - 240px) !important;
  overflow-x:hidden;
}

@media(max-width:1280px){
  .sidebar{
    width:190px !important;
    flex:0 0 190px !important;
  }

  .content{
    max-width:calc(100vw - 190px) !important;
    padding-left:22px !important;
    padding-right:22px !important;
  }

  .filter-bar{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
  }
  .filter-bar input[type="text"]{
    flex:0 0 240px;
    width:240px;
    min-width:180px;
    max-width:240px;
  }
  .filter-bar select[name="category"]{
    width:125px !important;
    min-width:125px !important;
  }

  .filter-bar select[name="issue"]{
    width:100px !important;
    min-width:100px !important;
  }

  .filter-bar select[name="limit"]{
    width:88px !important;
    min-width:88px !important;
  }

  .posts-action-btn{
    min-width:126px !important;
  }

  table{
    min-width:980px !important;
  }

  .posts-table,
  .table-wrap,
  .table-card,
  .panel{
    max-width:100%;
    overflow-x:auto;
  }
}


/* ===== Recommendations V2 Dashboard ===== */

.rec-v2 .panel{
  border-radius:18px;
}

.rec-summary-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px;
  margin-bottom:16px;
}

.rec-summary-card{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:16px;
  padding:16px;
  box-shadow:0 10px 24px rgba(15,23,42,.04);
}

.rec-summary-card span{
  display:block;
  color:#64748b;
  font-size:12px;
  font-weight:800;
  margin-bottom:8px;
}

.rec-summary-card strong{
  color:#111827;
  font-size:30px;
  line-height:1;
}

.rec-summary-card.danger strong{
  color:#dc2626;
}

.rec-section-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  margin-bottom:14px;
}

.rec-section-head h3{
  margin:0 0 6px;
}

.rec-small-btn{
  height:34px;
  padding:0 12px;
  border-radius:9px;
  background:#eff6ff;
  color:#1d4ed8;
  display:inline-flex;
  align-items:center;
  text-decoration:none;
  font-weight:900;
  font-size:12px;
}

.rec-bundle-grid{
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr)) !important;
  gap:12px !important;
}

.rec-bundle-card{
  padding:14px !important;
  min-height:150px !important;
}

.rec-bundle-card h4{
  min-height:38px !important;
  margin:10px 0 12px !important;
  font-size:14px !important;
  line-height:1.35 !important;
}

.rec-bundle-meta{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
  margin-bottom:10px;
}

.rec-bundle-meta span{
  color:#64748b;
  font-size:12px;
  font-weight:700;
}

.rec-bundle-meta b{
  color:#111827;
}

.rec-filter-bar{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:14px;
}

.rec-filter-bar input[type="text"]{
  width:320px;
  max-width:320px;
}

.rec-filter-bar select{
  height:36px;
}

.rec-table-wrap table{
  min-width:1050px;
}

.rec-pagination{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:10px;
  margin-top:16px;
}

.rec-pagination a,
.rec-pagination span{
  min-width:42px;
  height:34px;
  padding:0 12px;
  border-radius:9px;
  background:#fff;
  border:1px solid #e5e7eb;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  font-weight:900;
  color:#111827;
}

@media(max-width:1280px){
  .rec-summary-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .rec-filter-bar{
    overflow-x:auto;
  }
}

/* ===== Recommendation bundle scroll frame ===== */

.bundle-scroll{
  max-height:720px;
  overflow-y:auto;
  overflow-x:hidden;
  padding-right:8px;
}

.bundle-scroll::-webkit-scrollbar{
  width:8px;
}

.bundle-scroll::-webkit-scrollbar-track{
  background:#f1f5f9;
  border-radius:999px;
}

.bundle-scroll::-webkit-scrollbar-thumb{
  background:#cbd5e1;
  border-radius:999px;
}

.bundle-scroll::-webkit-scrollbar-thumb:hover{
  background:#94a3b8;
}

.rec-bundle-grid{
  padding-bottom:4px;
}


/* ===== Recommendation summary filter cards ===== */

.rec-summary-card{
  text-decoration:none;
  transition:.18s ease;
  cursor:pointer;
}

.rec-summary-card:hover{
  transform:translateY(-1px);
  border-color:#2563eb;
  box-shadow:0 12px 28px rgba(37,99,235,.10);
}

.rec-summary-card.active{
  border-color:#2563eb;
  background:#eff6ff;
  box-shadow:0 12px 28px rgba(37,99,235,.12);
}

.rec-summary-card.active span{
  color:#1d4ed8;
}

.rec-summary-card.active strong{
  color:#1d4ed8;
}

.rec-summary-card.danger.active{
  border-color:#dc2626;
  background:#fef2f2;
}

.rec-summary-card.danger.active span,
.rec-summary-card.danger.active strong{
  color:#dc2626;
}


.back-link{
  display:inline-flex;
  align-items:center;
  margin-bottom:16px;
  color:#2563eb;
  font-size:13px;
  font-weight:900;
  text-decoration:none;
}

.back-link:hover{
  text-decoration:underline;
}


.platform-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:38px;
  padding:4px 8px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  letter-spacing:.3px;
}
.platform-badge.wp{
  background:#e8f1ff;
  color:#1d5fbf;
}
.platform-badge.ts{
  background:#fff1e6;
  color:#d85b00;
}

.platform-tabs{
  display:flex;
  align-items:center;
  gap:0;
  margin:18px 0 18px;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:10px;
  overflow:hidden;
  max-width:760px;
  box-shadow:0 2px 8px rgba(15,23,42,.04);
}
.platform-tabs a{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  padding:15px 22px;
  color:#111827;
  text-decoration:none;
  font-weight:800;
  border-right:1px solid #e5e7eb;
}
.platform-tabs a:last-child{
  border-right:none;
}
.platform-tabs a span{
  min-width:34px;
  padding:4px 10px;
  border-radius:999px;
  background:#eef2f7;
  color:#334155;
  font-size:13px;
  text-align:center;
}
.platform-tabs a.active{
  background:#2563eb;
  color:#fff;
}
.platform-tabs a.active span{
  background:#fff;
  color:#2563eb;
}

.sync-dropdown{
  position:relative;
  display:inline-block;
}
.sync-main-btn{
  height:38px;
  padding:0 14px;
  border:1px solid #d5dce8;
  border-radius:8px;
  background:#fff;
  color:#1f2937;
  font-weight:800;
  cursor:pointer;
}
.sync-menu{
  display:none;
  position:absolute;
  right:0;
  top:44px;
  min-width:180px;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:10px;
  box-shadow:0 12px 30px rgba(15,23,42,.12);
  z-index:30;
  overflow:hidden;
}
.sync-menu.open{
  display:block;
}
.sync-menu a,
.sync-menu button{
  display:block;
  width:100%;
  padding:12px 14px;
  border:0;
  background:#fff;
  color:#111827;
  text-align:left;
  font-size:14px;
  font-weight:700;
  text-decoration:none;
  cursor:pointer;
}
.sync-menu a:hover,
.sync-menu button:hover{
  background:#f3f6fb;
}

.content-actions{
  white-space:nowrap;
}
.content-actions a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-right:6px;
  padding:5px 9px;
  border-radius:7px;
  background:#f3f6fb;
  color:#1f2937;
  font-size:12px;
  font-weight:800;
  text-decoration:none;
}
.content-actions a:hover{
  background:#2563eb;
  color:#fff;
}

.content-actions{
    display:flex;
    gap:6px;
    white-space:nowrap;
}

.content-actions a{
    display:inline-flex;
    align-items:center;
    gap:5px;
    padding:6px 10px;
    border-radius:8px;
    background:#f5f7fb;
    color:#334155;
    font-size:12px;
    font-weight:700;
    text-decoration:none;
    transition:.15s;
}

.content-actions a:hover{
    background:#2563eb;
    color:#fff;
    transform:translateY(-1px);
}

.content-hero{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;
}
.content-hero h2{
  margin:0 0 10px;
  font-size:26px;
  line-height:1.35;
}
.content-detail-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
  margin-top:18px;
}
.detail-table{
  width:100%;
  border-collapse:collapse;
}
.detail-table th{
  width:130px;
  text-align:left;
  color:#64748b;
  padding:10px 8px;
  border-bottom:1px solid #edf1f7;
}
.detail-table td{
  padding:10px 8px;
  border-bottom:1px solid #edf1f7;
  word-break:break-all;
}
.detail-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.detail-actions button{
  padding:9px 12px;
  border:1px solid #d9e1ee;
  border-radius:8px;
  background:#f8fafc;
  color:#64748b;
  font-weight:800;
}
.mini-metrics{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:10px;
}
.mini-metrics div{
  background:#f8fafc;
  border:1px solid #e5eaf2;
  border-radius:10px;
  padding:14px;
}
.mini-metrics span{
  display:block;
  color:#64748b;
  font-size:13px;
  margin-bottom:6px;
}
.mini-metrics strong{
  font-size:22px;
}
.content-preview{
  max-height:520px;
  overflow:auto;
  background:#fff;
  border:1px solid #edf1f7;
  border-radius:10px;
  padding:18px;
}
@media(max-width:900px){
  .content-hero,
  .content-detail-grid{
    display:block;
  }
  .content-detail-grid .panel{
    margin-top:18px;
  }
}

.session-guide{
  margin-top:14px;
  padding:14px;
  border:1px solid #e5eaf2;
  border-radius:10px;
  background:#f8fafc;
  color:#334155;
}
.session-guide ol{
  margin:10px 0 12px 20px;
  padding:0;
}
.session-guide li{
  margin:5px 0;
}
.session-guide code{
  font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size:12px;
}
.session-guide pre{
  margin:10px 0 0;
  padding:12px;
  border-radius:8px;
  background:#0f172a;
  color:#e5e7eb;
  overflow:auto;
}

.session-guide{
  margin-top:14px;
  padding:14px;
  border:1px solid #e5eaf2;
  border-radius:10px;
  background:#f8fafc;
  color:#334155;
}
.session-guide ol{
  margin:10px 0 12px 20px;
  padding:0;
}
.session-guide li{
  margin:5px 0;
}
.session-guide code{
  font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size:12px;
}
.session-guide pre{
  margin:10px 0 0;
  padding:12px;
  border-radius:8px;
  background:#0f172a;
  color:#e5e7eb;
  overflow:auto;
}
/* ===== Quick Sync ===== */

.quick-sync-box{
    margin:14px 10px;
    padding:10px;
    background:#1f2937;
    border-radius:10px;
}

.quick-sync-title{
    color:#cbd5e1;
    font-size:12px;
    font-weight:700;
    margin-bottom:8px;
    text-transform:uppercase;
}

.quick-sync-btn{
    display:block;
    margin-bottom:6px;
    padding:8px 10px;
    border-radius:8px;
    background:#374151;
    color:#fff;
    text-decoration:none;
    text-align:center;
    transition:.2s;
}

.quick-sync-btn:hover{
    background:#4b5563;
}
.quick-nav{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid rgba(255,255,255,.08);
}

.quick-nav-btn{
  display:flex;
  align-items:center;
  justify-content:center;
  height:36px;
  border-radius:8px;
  background:rgba(255,255,255,.06);
  color:#fff;
  text-decoration:none;
  font-size:13px;
  font-weight:600;
  transition:.2s;
}

.quick-nav-btn:hover{
  background:#2563eb;
}

/* ===== Posts Search Width Final Override ===== */
form.filter-bar{
  display:flex !important;
  align-items:center !important;
  flex-wrap:wrap !important;
  gap:10px !important;
}

form.filter-bar input[type="text"][name="q"]{
  flex:0 0 220px !important;
  width:220px !important;
  min-width:180px !important;
  max-width:220px !important;
}

form.filter-bar select{
  flex:0 0 auto !important;
  width:auto !important;
  min-width:110px !important;
  max-width:180px !important;
}

@media (max-width: 900px){
  form.filter-bar input[type="text"][name="q"]{
    flex:0 0 190px !important;
    width:190px !important;
    min-width:160px !important;
    max-width:190px !important;
  }
}

@media (max-width: 640px){
  form.filter-bar{
    align-items:stretch !important;
  }

  form.filter-bar input[type="text"][name="q"]{
    flex:1 1 100% !important;
    width:100% !important;
    max-width:none !important;
  }
}

