.box-placeholder { min-height: 360px; align-content: center; }
.box-layout { display: grid; grid-template-columns: minmax(290px,.83fr) minmax(0,1.4fr); gap: 22px; align-items: start; }
.box-panel { padding: 24px; }
.box-panel h2 { margin: 0 0 15px; font-size: 23px; letter-spacing: -.03em; }
.box-panel h3 { margin: 0; font-size: 18px; }
.box-panel p, .box-record p, .source-card p { color: var(--text-soft); line-height: 1.6; overflow-wrap: anywhere; }
.box-panel small, .box-record small, .box-file-list small { display: block; color: var(--muted); font-size: 12px; }
.box-narrow { max-width: 780px; }
.box-note { margin: 0 0 20px; padding: 13px 17px; color: var(--text-soft); background: var(--brand-soft); border: 1px solid var(--line); border-radius: 14px; }
.box-form { display: grid; gap: 14px; }
.box-form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.box-wide { grid-column: 1/-1; }
.box-form label { display: grid; gap: 6px; color: var(--text-soft); font-size: 12px; font-weight: 700; }
.box-form input, .box-form textarea, .box-form select { width: 100%; min-height: 42px; padding: 10px 12px; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 11px; font-size: 14px; font-weight: 450; }
.box-form textarea { resize: vertical; }
.box-form input:focus, .box-form textarea:focus, .box-form select:focus { outline: 3px solid rgba(91,58,104,.15); border-color: var(--brand); }
.box-form .primary { justify-self: start; }
.box-record { margin-bottom: 15px; }
.box-record h3 { overflow-wrap: anywhere; }
.box-record p { margin: 7px 0 14px; }
.box-list { display: grid; gap: 14px; }
.ai-review-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:18px; margin:18px 0; }
.ai-review-grid > section { min-width:0; border:1px solid var(--line,#ddd); border-radius:10px; padding:16px; }
.ai-source-text { white-space:pre-wrap; overflow-wrap:anywhere; max-height:600px; overflow:auto; line-height:1.65; }
.ai-review-form { border-top:1px solid var(--line,#ddd); padding-top:18px; }
@media (max-width:800px) { .ai-review-grid { grid-template-columns:1fr; } }
.box-record-head { display: flex; justify-content: space-between; gap: 12px; }
.box-record-head small { display: inline; }
.box-record-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.box-edit { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.box-edit summary { width: fit-content; color: var(--brand); cursor: pointer; font-size: 13px; font-weight: 700; }
.box-edit .box-form { margin-top: 14px; }
.box-row-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.box-row-actions form { margin: 0; }
.box-row-actions button, .box-danger-form button { padding: 7px 10px; color: var(--brand); background: var(--brand-soft); border: 1px solid var(--line); border-radius: 9px; cursor: pointer; font-size: 12px; font-weight: 650; }
.box-danger-form button { color: var(--red); background: var(--red-soft); }
.box-inline { margin-top: 12px; }
.source-card { min-width: 0; }
.source-filters { display:flex;flex-wrap:wrap;gap:8px;margin:20px 0 8px; }
.source-filters a { padding:8px 13px;border:1px solid var(--line);border-radius:999px;color:var(--text-soft);text-decoration:none;font-weight:700; }
.source-filters a.active { background:var(--brand);border-color:var(--brand);color:#fff; }
.source-card .box-edit { margin-top: 0; }
.source-card > p { margin: 0; font-size: 13px; }
.box-table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); }
.box-table { width: 100%; border-collapse: collapse; text-align: left; }
.box-table th, .box-table td { padding: 13px 17px; border-bottom: 1px solid var(--line); white-space: nowrap; font-size: 12px; }
.box-table th { color: var(--muted); background: var(--surface-soft); }
.box-table tbody tr:last-child td { border-bottom: 0; }
.box-file-list { margin-top: 14px; }
.box-file-list a { color: var(--brand); font-weight: 700; overflow-wrap: anywhere; }
.box-file-list form { margin-top: 8px; }
html[data-theme="dark"] .box-note { border-color: var(--line); }
@media (max-width: 900px) { .box-layout { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .box-form-grid { grid-template-columns: 1fr; } .box-wide { grid-column: auto; } .box-panel { padding: 18px; } }

.monitor-subnav,.monitor-tabs { display:flex; flex-wrap:wrap; gap:9px; margin-bottom:18px; }
.monitor-subnav a,.monitor-tabs a { display:flex; align-items:center; justify-content:space-between; gap:18px; min-height:42px; padding:9px 15px; color:var(--text-soft); background:var(--surface); border:1px solid var(--line); border-radius:11px; text-decoration:none; font-size:13px; font-weight:700; }
.monitor-subnav a.active,.monitor-tabs a.active { color:#fff; background:var(--brand-fill); border-color:var(--brand-fill); }
.monitor-tabs a { flex:1 1 145px; }
.monitor-tabs strong { font-variant-numeric:tabular-nums; }
.monitor-status { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-bottom:18px; }
.monitor-status h2 { margin-bottom:7px; }
.monitor-status p { margin:0 0 5px; }
.monitor-status form { flex:none; }
.monitor-controls { display:grid; gap:9px; flex:none; }
.monitor-controls button { width:100%; }
.monitor-controls button:disabled { opacity:.48; cursor:not-allowed; }
.monitor-filter { display:flex; align-items:end; gap:12px; margin-bottom:26px; }
.monitor-filter label { display:grid; gap:7px; flex:1; min-width:0; color:var(--muted); font-size:12px; font-weight:700; }
.monitor-filter select { min-height:42px; padding:8px 12px; color:var(--text); background:var(--surface); border:1px solid var(--line-strong); border-radius:10px; }
.monitor-posts { display:grid; gap:12px; }
.monitor-post { padding:21px 24px; background:var(--surface); border:1px solid var(--line); border-left:3px solid var(--accent); border-radius:14px; box-shadow:var(--shadow-soft); }
.monitor-post.is-seen { border-left-color:var(--line-strong); }
.monitor-post-meta { display:flex; flex-wrap:wrap; gap:7px; margin-bottom:11px; }
.monitor-post-meta span,.monitor-post-meta time,.monitor-badge { padding:4px 8px; color:var(--text-soft); background:var(--surface-soft); border:1px solid var(--line); border-radius:8px; font-size:11px; font-weight:650; }
.monitor-post h3 { margin:0 0 7px; font-size:17px; line-height:1.35; }
.monitor-post p { margin:0 0 12px; color:var(--text-soft); white-space:normal; overflow-wrap:anywhere; font-size:13px; line-height:1.6; }
.monitor-post-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.monitor-post-actions a,.monitor-post-actions button,.monitor-pages a { color:var(--brand); background:none; border:0; text-decoration:none; font-size:12px; font-weight:700; cursor:pointer; }
.monitor-post-actions form { margin:0; }
.monitor-badge { color:var(--green); background:var(--green-soft); }
.monitor-post.is-seen .monitor-badge { color:var(--muted); background:var(--surface-soft); }
.monitor-pages { display:flex; justify-content:space-between; gap:12px; margin-top:20px; }
.monitor-pages a { padding:9px 14px; background:var(--surface); border:1px solid var(--line); border-radius:10px; }
.monitor-source-grid .source-card { overflow:hidden; }
@media (max-width:700px) { .monitor-status,.monitor-filter { align-items:stretch; flex-direction:column; } .monitor-status form,.monitor-status button,.monitor-filter button { width:100%; } .monitor-post { padding:16px; } }

.social-metrics{display:flex;flex-wrap:wrap;gap:8px 16px;margin:12px 0;font-size:12px;color:var(--muted)}
.social-metrics small{flex-basis:100%}
.day-card-metrics{margin:12px 0}
.day-card-metrics>strong{font-size:12px;width:100%}
