.sync-page { padding-top: 31px; }
.sync-heading { align-items: center; }
.sync-status-badge { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 9px 12px; border: 1px solid #e4dcc6; border-radius: 999px; background: #faf7ef; color: #80672d; font-size: 10px; font-weight: 700; }
.sync-status-badge .status-indicator { width: 7px; height: 7px; border-radius: 50%; background: #a7803e; box-shadow: 0 0 0 3px rgba(167,128,62,.12); }
.sync-status-badge.status-ok { border-color: #d8e8d5; background: #f0f7ee; color: #1b6327; }
.sync-status-badge.status-ok .status-indicator { background: #008a05; box-shadow: 0 0 0 3px rgba(0,138,5,.12); }
.sync-status-badge.status-warning { border-color: #eadfc2; background: #fbf7e9; color: #80672d; }
.sync-status-badge.status-warning .status-indicator { background: #a7803e; }
.sync-status-badge.status-error { border-color: #efd7d7; background: #fbefef; color: #9e3034; }
.sync-status-badge.status-error .status-indicator { background: #b03034; box-shadow: 0 0 0 3px rgba(176,48,52,.12); }
.setup-notice { display: flex; gap: 12px; margin: 0 0 16px; padding: 15px 17px; border: 1px solid #e6dfcc; border-radius: 9px; background: #fcfaf4; color: #635940; }
.setup-notice.notice-error { border-color: #eed6d6; background: #fcf4f4; color: #76373a; }
.setup-notice.notice-ok { border-color: #d9e8d6; background: #f4f8f2; color: #335536; }
.notice-symbol { display: grid; width: 22px; height: 22px; flex: none; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-family: Georgia, serif; font-size: 14px; font-weight: 700; }
.setup-notice strong { display: block; margin: 1px 0 4px; font-size: 11px; }
.setup-notice p { margin: 0; color: inherit; font-size: 10px; line-height: 1.55; opacity: .82; }
.sync-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 15px; }
.sync-metric-card { min-width: 0; min-height: 110px; padding: 15px 16px 13px; border: 1px solid #e7e8e1; border-radius: 9px; background: #fff; box-shadow: var(--shadow); }
.sync-metric-label { color: #73796f; font-size: 9px; font-weight: 680; }
.sync-metric-value { margin: 12px 0 5px; color: #1b3e2a; font-size: clamp(18px, 2vw, 24px); font-weight: 730; letter-spacing: -.045em; line-height: 1; }
.sync-metric-note { color: #83877f; font-size: 9px; line-height: 1.4; }
.sync-metric-alert .sync-metric-value { color: #9a7a37; }
.sync-grid { display: grid; grid-template-columns: .92fr 1.08fr; gap: 14px; margin-bottom: 14px; }
.sync-panel { min-height: 288px; }
.alerts-list { display: grid; gap: 9px; }
.sync-empty-state { display: grid; justify-items: center; padding: 31px 22px 25px; color: #6e766c; text-align: center; }
.empty-icon { display: grid; width: 34px; height: 34px; margin-bottom: 12px; place-items: center; border: 1px solid #e6dfcc; border-radius: 50%; background: #fcfaf4; color: #a7803e; font-size: 17px; font-weight: 700; }
.sync-empty-state strong { color: #374739; font-size: 11px; }
.sync-empty-state p { max-width: 360px; margin: 7px 0 0; color: #82867e; font-size: 9px; line-height: 1.55; }
.alert-item { display: grid; grid-template-columns: 8px 1fr auto; align-items: start; gap: 9px; padding: 11px 10px; border: 1px solid #eee4e2; border-radius: 7px; background: #fffafa; }
.alert-item.severity-warning { border-color: #ece4d1; background: #fdfbf5; }
.alert-item.severity-info { border-color: #e6e9e3; background: #fafbf9; }
.alert-dot { width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: #b03034; }
.severity-warning .alert-dot { background: #a7803e; }
.severity-info .alert-dot { background: #1b3e2a; }
.alert-copy strong { display: block; color: #633639; font-size: 9px; }
.severity-warning .alert-copy strong { color: #67562f; }
.severity-info .alert-copy strong { color: #465a45; }
.alert-copy p { margin: 3px 0 0; color: #7c7771; font-size: 9px; line-height: 1.45; overflow-wrap: anywhere; }
.alert-time { color: #969189; font-size: 8px; white-space: nowrap; }
.sync-table-scroll { max-height: 213px; }
.sync-runs-table { min-width: 420px; }
.sync-runs-table thead th { background: #fafbf8; }
.sync-runs-table tbody td { font-size: 9px; }
.run-status { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 4px; background: #f0f4ed; color: #315b32; font-size: 8px; font-weight: 680; white-space: nowrap; }
.run-status::before { width: 5px; height: 5px; border-radius: 50%; background: #008a05; content: ""; }
.run-status.warning { background: #faf5e9; color: #80672d; }
.run-status.warning::before { background: #a7803e; }
.run-status.error { background: #fbefef; color: #963338; }
.run-status.error::before { background: #b03034; }
.sync-details-panel { margin-bottom: 12px; }
.sync-config-state { flex: none; padding: 5px 8px; border: 1px solid #e7e1d2; border-radius: 5px; background: #fcfaf4; color: #80672d; font-size: 9px; font-weight: 650; }
.sync-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 4px 1px 3px; }
.sync-detail { display: grid; gap: 6px; min-width: 0; }
.sync-detail span { color: #84877f; font-size: 8px; }
.sync-detail strong { color: #364a38; font-size: 9px; line-height: 1.45; }
.sync-footer { padding-bottom: 5px; }
.sync-back-link { text-decoration: none; }
.monitor-dot-error { background: #b03034 !important; }

@media (max-width: 1180px) {
  .sync-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sync-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
  .sync-page { padding-top: 25px; }
  .sync-grid { grid-template-columns: 1fr; }
  .sync-panel { min-height: 0; }
}
@media (max-width: 620px) {
  .sync-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .setup-notice { padding: 12px; }
  .sync-metrics { gap: 8px; }
  .sync-metric-card { min-height: 103px; padding: 12px 11px; }
  .sync-metric-value { font-size: 19px; }
  .sync-detail-grid { grid-template-columns: 1fr 1fr; gap: 14px 10px; }
  .topbar .source-pill { display: none; }
}
@media (max-width: 380px) {
  .sync-metrics { grid-template-columns: 1fr; }
  .sync-metric-card { min-height: 92px; }
}
