/* ===================================================================
   Cape Dashboard — Single CSS file
   =================================================================== */

/* === SHARED RESET & BASE === */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Signika', sans-serif; background: #F5F5F9; color: #2B2C40; font-size: 14px; line-height: 1.5; }
a { color: #6375FF; text-decoration: none; }
a:hover { text-decoration: none; }

/* === SIDEBAR === */
.sidebar { position: fixed; top: 0; left: 0; width: 246px; height: 100vh; background: #2B2C40; display: flex; flex-direction: column; z-index: 100; transition: width 0.3s ease; overflow: hidden; padding: 28px 0; }
.sidebar-logo { padding: 0 20px 40px; display: flex; align-items: center; gap: 8px; }
.sidebar-logo svg { width: 24px; height: 24px; }
.sidebar-logo span { font-size: 20px; font-weight: 700; color: #fff; font-style: italic; letter-spacing: 1px; transition: opacity 0.3s ease; }
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 11px 20px; color: rgba(255,255,255,0.6); font-size: 13px; font-weight: 400; text-decoration: none; cursor: pointer; }
.nav-item:hover { color: #fff; }
.nav-item.active { background: rgba(99,117,255,0.25); color: #fff; border-radius: 0 50px 50px 0; margin-right: 14px; }
.nav-item svg { width: 18px; height: 18px; opacity: 0.8; }
.nav-item span, .nav-badge, .nav-chevron { transition: opacity 0.3s ease; }
.nav-badge { background: #FE575D; color: #fff; font-size: 11px; font-weight: 700; min-width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-left: auto; flex-shrink: 0; }
.nav-chevron { margin-left: 6px; opacity: 0.6; flex-shrink: 0; transition: transform 0.2s ease; }
.nav-group { display: flex; flex-direction: column; }
.nav-group.open .nav-chevron { transform: rotate(180deg); }
.nav-submenu { display: none; flex-direction: column; }
.nav-group.open .nav-submenu { display: flex; flex-direction: column; }
.nav-sub-item { padding: 8px 20px 8px 48px; color: rgba(255,255,255,0.5); font-size: 12px; font-weight: 400; text-decoration: none; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-sub-item:hover { color: #fff; }
.nav-link { color: inherit; text-decoration: none; cursor: pointer; }
.sidebar-expand { display: none; width: 100%; padding: 16px 0; text-align: center; cursor: pointer; color: rgba(255,255,255,0.4); transition: transform 0.3s ease; border: none; background: none; }
.sidebar-expand:hover { color: #fff; }
.sidebar.expanded .sidebar-expand { transform: rotate(180deg); }
.hamburger { display: none; }
.sidebar-overlay { display: none; }

/* === LAYOUT === */
.page { display: flex; min-height: 100vh; }
.main { margin-left: 246px; flex: 1; padding: 24px 89px; min-height: 100vh; }
.main-content { max-width: 1400px; }
.top-bar { display: flex; justify-content: flex-end; margin-bottom: 20px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; position: relative; cursor: pointer; }
.avatar-inner { width: 100%; height: 100%; border-radius: 50%; background: linear-gradient(135deg, #E8D5B7, #C4A882); display: flex; align-items: center; justify-content: center; }
.avatar-dot { position: absolute; bottom: 1px; right: 1px; width: 11px; height: 11px; border-radius: 50%; background: #72E128; border: 2px solid #F5F5F9; }

/* Pages without .main wrapper (addSite, settings, notFound) use .main-content directly */
.sidebar + .main-content { margin-left: 246px; min-height: 100vh; padding: 24px 24px 40px; }

/* === SHARED COMPONENTS === */
.card { background: #fff; border-radius: 12px; padding: 30px; box-shadow: 0 2px 12px rgba(43,44,64,0.06); }
.pill { display: inline-block; padding: 4px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; }
.pill-failing { background: rgba(254,87,93,0.15); color: #FE575D; }
.pill-flagged { background: rgba(253,181,40,0.15); color: #FDB528; }
.pill-healthy { background: rgba(114,225,40,0.15); color: #72E128; }
.pill-escalated { background: rgba(43,44,64,0.1); color: #2B2C40; }
.pill-pending { background: rgba(180,178,169,0.15); color: #B4B2A9; }
.pill-calibrating { background: rgba(0,167,251,0.15); color: #00A7FB; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* === LOGIN === */
.login-wrapper { display: flex; flex-direction: column; align-items: center; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.login-brand svg { width: 40px; height: 40px; }
.login-brand span { font-size: 28px; font-weight: 700; color: #2B2C40; letter-spacing: 0.3px; }
.login-box { background: #FFFFFF; border-radius: 10px; padding: 32px 28px; width: 400px; max-width: 90vw; box-shadow: 0 2px 10px 0 rgba(43, 44, 64, 0.04); }
.login-box h2 { font-size: 22px; font-weight: 500; margin-bottom: 4px; color: rgba(43, 44, 64, 0.9); }
.login-box .subtitle { color: rgba(43, 44, 64, 0.58); font-size: 14px; margin-bottom: 24px; }
.error { color: #FF4D49; font-size: 13px; margin-top: 12px; padding: 8px 12px; background: rgba(255, 77, 73, 0.08); border-radius: 4px; }

/* === FORMS (login, addSite, settings) === */
label { display: block; font-size: 13px; font-weight: 400; color: rgba(43, 44, 64, 0.68); margin-bottom: 6px; margin-top: 18px; }
label:first-child { margin-top: 0; }
input[type="text"], input[type="password"], input[type="number"], textarea {
  width: 100%; padding: 10px 14px; background: #FFFFFF; border: 1px solid rgba(43, 44, 64, 0.22);
  border-radius: 6px; color: rgba(43, 44, 64, 0.9); font-size: 14px; outline: none; font-family: inherit;
}
input:focus, textarea:focus { border-color: #6375FF; box-shadow: 0 0 0 2px rgba(99, 117, 255, 0.12); }
textarea { min-height: 120px; resize: vertical; font-family: 'SF Mono', Monaco, Consolas, monospace; font-size: 12px; }
.btn { padding: 10px 20px; border: none; border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer; font-family: inherit; }
.btn-primary { background: #6375FF; color: #fff; box-shadow: 0 2px 6px rgba(99, 117, 255, 0.4); }
.btn-primary:hover { background: #5464e6; }
.btn-primary:disabled { background: rgba(43, 44, 64, 0.12); color: rgba(43, 44, 64, 0.38); cursor: not-allowed; box-shadow: none; }
.btn-secondary { background: transparent; color: #6D6B77; border: 1px solid rgba(43, 44, 64, 0.22); text-decoration: none; display: inline-flex; align-items: center; }
.btn-secondary:hover { background: rgba(43, 44, 64, 0.04); text-decoration: none; }
.btn-row { display: flex; gap: 12px; margin-top: 24px; }
.form-section { background: #FFFFFF; border-radius: 10px; padding: 24px; margin-bottom: 24px; box-shadow: 0 2px 10px 0 rgba(43, 44, 64, 0.04); }
.form-section h3 { font-size: 15px; font-weight: 600; color: rgba(43, 44, 64, 0.9); margin-bottom: 16px; }
.form-row { display: flex; gap: 12px; }
.form-row > div { flex: 1; }
.form-row .small { flex: 0 0 100px; }
.result { margin-top: 16px; padding: 16px; border-radius: 10px; display: none; }
.result.success { display: block; background: rgba(114, 225, 40, 0.08); border: 1px solid rgba(114, 225, 40, 0.3); color: #56A700; }
.result.error { display: block; background: rgba(255, 77, 73, 0.08); border: 1px solid rgba(255, 77, 73, 0.3); color: #FF4D49; }
.result pre { margin-top: 8px; font-size: 12px; white-space: pre-wrap; color: #6D6B77; }

/* === ADD SITE === */
.content { max-width: 960px; padding: 32px 24px; }
.content h2 { font-size: 22px; font-weight: 500; color: rgba(43, 44, 64, 0.9); margin-bottom: 8px; }
.content .subtitle { color: #6D6B77; font-size: 14px; margin-bottom: 24px; }

/* Login page centering (body override only when .login-wrapper present) */
body:has(.login-wrapper) { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
/* Login button special styling */
.login-box button { width: 100%; padding: 11px; margin-top: 24px; background: #6375FF; color: #fff; border: none; border-radius: 6px; font-size: 15px; font-weight: 500; font-family: inherit; cursor: pointer; transition: background 0.2s, box-shadow 0.2s; letter-spacing: 0.4px; box-shadow: 0 2px 6px rgba(99, 117, 255, 0.4); }
.login-box button:hover { background: #5464e6; box-shadow: 0 4px 10px rgba(99, 117, 255, 0.5); }

/* === DASHBOARD === */
/*
  CRITICAL RULES FOR CLAUDE CODE:
  1. Site cards have FIXED height (170px on desktop). Cards never shrink based on content.
  2. Summary text that overflows gets clipped. Click through shows full detail.
  3. On tablet/phone, height releases to auto with min-height.
  4. Add Site card always renders regardless of filter state.
*/
/* Stats bar */
.stats-bar { display: flex; align-items: center; margin-bottom: 30px; }
.stats-bar .card { display: flex; align-items: center; width: 100%; padding: 20px 30px; gap: 0; }
.stats-total { display: flex; flex-direction: column; padding-right: 24px; border-right: 1px solid #F0F0F4; margin-right: 24px; }
.stats-total-num { font-size: 28px; font-weight: 700; color: #000; line-height: 1; }
.stats-total-label { font-size: 12px; color: #707070; font-weight: 400; margin-top: 2px; }
.stats-filters { display: flex; align-items: center; gap: 6px; flex: 1; }
.filter-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 16px; border-radius: 20px; font-size: 13px; font-weight: 400; font-family: 'Signika', sans-serif; cursor: pointer; border: 1.5px solid #E8E8EC; background: #fff; color: #707070; transition: all 0.2s ease; white-space: nowrap; }
.filter-btn:hover { border-color: #B4B2A9; }
.filter-btn.active { background: #855AF6; color: #fff; border-color: #855AF6; font-weight: 600; }
.filter-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.filter-btn.active .filter-dot { background: #fff !important; }
.filter-count { font-weight: 700; }
/* Site cards grid */
.sites-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
/* SITE CARD: FIXED height 170px. Content that overflows is hidden. */
.site-card { cursor: pointer; transition: box-shadow 0.2s ease; height: 170px; display: flex; flex-direction: column; overflow: hidden; padding: 30px 30px 20px; }
.site-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.30); }
.site-card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-shrink: 0; }
.site-score { font-size: 13px; font-weight: 700; color: #855AF6; margin-left: auto; }
.site-paused-badge { font-size: 10px; font-weight: 600; color: #FF9800; background: rgba(255,152,0,0.12); padding: 2px 8px; border-radius: 10px; flex-shrink: 0; letter-spacing: 0.3px; }
.site-favicon { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid #F0F0F4; object-fit: cover; flex-shrink: 0; }
.site-name { font-size: 14px; font-weight: 700; color: #000; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-summary { font-size: 12px; color: #707070; font-weight: 400; line-height: 18px; flex: 1; }
.site-card-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; }
.site-url { font-size: 11px; color: #B4B2A9; font-weight: 400; }
.site-uptime-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; vertical-align: middle; margin-right: 4px; }
.site-uptime-dot.up { background: #72E128; }
.site-uptime-dot.down { background: #FE575D; }
.site-date { font-size: 11px; color: #B4B2A9; font-weight: 400; }
/* Add Site card */
.add-site-card { border: 2px dashed #D0D0D4; background: transparent; box-shadow: none; display: flex; align-items: center; justify-content: center; }
.add-site-card:hover { border-color: #855AF6; box-shadow: none; }
.add-site-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.add-site-icon { width: 48px; height: 48px; border-radius: 50%; background: rgba(133,90,246,0.1); display: flex; align-items: center; justify-content: center; }
.add-site-text { font-size: 14px; font-weight: 600; color: #855AF6; }

/* === SITE DETAIL === */
/*
  Layout: Three grid sections (top, bottom, third) with responsive breakpoints.
  Cards use flex column layout with pinned headings and scrollable content areas.
*/
.detail-grid-top { display: grid; grid-template-columns: 738fr 587fr; gap: 30px; grid-template-areas: "header plugins" "score plugins"; align-items: start; margin-bottom: 30px; }
.detail-grid-bottom { display: grid; grid-template-columns: 35fr 65fr; gap: 30px; grid-template-areas: "health issues" "health cycles"; align-items: start; }

/* ============ UPTIME CARD ============ */
.uptime-card { margin-bottom: 30px; height: 140px; display: flex; flex-direction: column; }
.uptime-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-shrink: 0; }
.uptime-title { font-size: 18px; font-weight: 700; color: #000; }
.uptime-pct { font-size: 22px; font-weight: 700; color: #72E128; }
.uptime-pct.warn { color: #FDB528; }
.uptime-pct.bad { color: #FE575D; }
.uptime-bars { display: flex; gap: 0; align-items: stretch; flex: 1; justify-content: space-between; }
.uptime-bar { width: 5px; flex-shrink: 0; border-radius: 3px; cursor: default; position: relative; }
.uptime-bar.up { background: #72E128; }
.uptime-bar.partial { background: #FDB528; }
.uptime-bar.down { background: #FE575D; }
.uptime-bar.nodata { background: #E8E8EC; }
.uptime-bar .uptime-tip {
  display: none; position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: #2B2C40; color: #fff; font-size: 11px; font-weight: 400; padding: 6px 10px; border-radius: 6px; white-space: nowrap; z-index: 20;
}
.uptime-bar .uptime-tip::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: #2B2C40; }
.uptime-bar:hover .uptime-tip { display: block; }
.uptime-labels { display: flex; justify-content: space-between; margin-top: 6px; }
.uptime-label { font-size: 10px; color: #B4B2A9; }

/* ============ HEADER CARD ============ */
.header-card { grid-area: header; height: 360px; display: flex; flex-direction: column; overflow: hidden; }
.header-top { display: flex; align-items: center; gap: 16px; margin-bottom: 15px; }
.header-favicon { width: 64px; height: 64px; border-radius: 50%; border: 2px solid #F0F0F4; object-fit: cover; flex-shrink: 0; }
.header-info { flex: 1; }
.header-name-row { display: flex; align-items: center; gap: 16px; }
.header-name { font-size: 18px; font-weight: 700; color: #000; line-height: 24px; }
.header-url { font-size: 13px; color: #26C6F9; text-decoration: none; font-weight: 400; }
.header-url:hover { text-decoration: underline; }
.header-meta { font-size: 12px; color: #707070; font-weight: 400; }
.header-stats { display: flex; gap: 24px; padding: 16px 0; border-top: 1px solid #F0F0F4; border-bottom: 1px solid #F0F0F4; margin-bottom: 15px; }
.stat-label { font-size: 13px; color: #000; font-weight: 700; line-height: 18px; }
.stat-value { font-size: 12px; font-weight: 400; color: #707070; margin-top: 2px; line-height: 18px; }
.header-actions { display: flex; gap: 24px; justify-content: center; flex-shrink: 0; margin-top: auto; }
.btn-action { display: inline-flex; align-items: center; gap: 6px; padding: 8px 18px; height: 32px; border-radius: 6px; font-size: 13px; font-weight: 400; font-family: 'Signika', sans-serif; cursor: pointer; border: none; color: #fff; white-space: nowrap; text-decoration: none; }
.btn-action svg { width: 14px; height: 14px; }
.btn-wpadmin { background: #855AF6; }
.btn-runnow { background: #72E128; }
.btn-pause { background: #00A7FB; }
.btn-pause { background: #FF9800; }
.btn-remove { background: #FE575D; }
.btn-reset { background: #FDB528; }
.btn-remove { background: #FE575D; min-width: 127px; justify-content: center; }
.btn-sm { height: 28px; padding: 4px 12px; font-size: 12px; min-width: auto; }
.ai-summary {
  margin-bottom: 10px;
  padding: 14px 16px;
  background: #F8F7FF;
  border-left: 3px solid #855AF6;
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  color: #2B2C40;
  line-height: 20px;
  flex: 1;
  overflow-y: auto;
}
.ai-summary strong { font-weight: 700; }
.card-summary {
  padding: 10px 14px;
  background: #F8F7FF;
  border-left: 3px solid #855AF6;
  border-radius: 0 8px 8px 0;
  font-size: 12px;
  color: #2B2C40;
  line-height: 18px;
  margin-bottom: 16px;
  flex-shrink: 0;
}
.card-summary strong { font-weight: 700; }

/* ============ PLUGIN CARD ============ */
.plugins-card { grid-area: plugins; padding: 0 0 10px 0; overflow: hidden; height: 770px; display: flex; flex-direction: column; }
.plugins-scroll { flex: 1; overflow-y: auto; }
.plugin-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.plugin-table thead th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: #000; font-weight: 700; padding: 20px 20px 14px; border-bottom: 1px solid #F0F0F4; background: #F5F5F9; }
.plugin-table thead th:first-child { width: 55%; }
.plugin-table thead th:nth-child(2) { width: 25%; }
.plugin-table thead th:last-child { width: 20%; text-align: center; }
.plugin-table tbody td { padding: 12px 20px; border-bottom: 1px solid #F8F8FC; font-size: 13px; font-weight: 700; color: #000; line-height: 18px; }
.plugin-table tbody td:nth-child(2) { color: #707070; font-weight: 400; font-size: 12px; }
.plugin-table tbody td:last-child { text-align: center; }
.plugin-table tbody tr:last-child td { border-bottom: none; }
.status-icon { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; font-size: 14px; font-weight: 700; cursor: default; position: relative; }
.s-ok { background: rgba(114,225,40,0.12); color: #72E128; }
.s-warn { background: rgba(253,181,40,0.12); color: #FDB528; }
.s-fail { background: rgba(254,87,93,0.12); color: #FE575D; }
.status-icon .tooltip {
  display: none; position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: #2B2C40; color: #fff; font-size: 11px; font-weight: 400; padding: 6px 10px; border-radius: 6px; white-space: nowrap; z-index: 20;
}
.status-icon .tooltip::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: #2B2C40; }
.status-icon:hover .tooltip { display: block; }
.plugin-issue-row { cursor: pointer; }
.plugin-issue-row:hover td { background: #FAFAFA; }
.plugin-chevron { font-size: 10px; color: #B4B2A9; margin-left: 6px; display: inline-block; transition: transform 0.15s; }
.plugin-issue-row.open .plugin-chevron { transform: rotate(90deg); }
.plugin-detail-row { display: none; }
.plugin-detail-row td { padding: 0 20px 12px 20px !important; border-bottom: 1px solid #F8F8FC !important; }
.plugin-issue-row.open + .plugin-detail-row { display: table-row; }
.plugin-detail-box {
  padding: 10px 14px;
  background: #FFF8F0;
  border-left: 3px solid #FDB528;
  border-radius: 0 8px 8px 0;
  font-size: 12px;
  color: #2B2C40;
  line-height: 18px;
}
.plugin-detail-box.detail-fail { background: #FFF5F5; border-left-color: #FE575D; }
.plugin-detail-box strong { font-weight: 700; }

/* ============ SCORE CARD ============ */
.score-card { grid-area: score; overflow: visible; height: 380px; display: flex; flex-direction: column; }
.score-card .card-heading { font-size: 18px; font-weight: 700; color: #000; margin-bottom: 20px; flex-shrink: 0; }
.score-inner { display: grid; grid-template-columns: 55% 45%; gap: 20px; min-width: 0; align-items: stretch; }
.bar-chart { display: flex; flex-direction: column; min-width: 0; padding-left: 36px; }
.chart-area { position: relative; height: 220px; display: flex; align-items: flex-end; overflow: visible; }
.chart-gridlines { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; z-index: 1; }
.chart-gridline { border-top: 2px dashed #E8E8EC; position: relative; }
.chart-gridline-label { position: absolute; right: calc(100% + 8px); top: -7px; font-size: 10px; color: #B4B2A9; white-space: nowrap; }
.bars-container { display: flex; align-items: flex-end; position: relative; z-index: 2; width: 100%; height: 100%; padding: 0 5px; }
.bar-col { display: flex; flex-direction: column; align-items: center; flex: 1; }
.bar-stack { display: flex; flex-direction: column-reverse; align-items: center; gap: 3px; }
.bar { width: 9px; border-radius: 5px; }
.b-purple { background: #855AF6; }
.b-green { background: #72E128; }
.b-gray { background: #C4C4C4; }
.bar-dates { display: flex; padding: 0 5px; margin-top: 18px; }
.bar-dates span { flex: 1; text-align: center; font-size: 10px; color: #B4B2A9; }
.chart-legend { display: flex; gap: 20px; justify-content: center; margin-top: 16px; width: 55%; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #707070; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }
.score-right { display: flex; flex-direction: column; align-items: center; position: relative; padding-right: 8px; margin-top: -40px; }
.score-menu { position: absolute; top: 0; right: 8px; cursor: pointer; color: #B4B2A9; font-size: 20px; letter-spacing: 2px; }
.gauge-wrap { position: relative; width: 100px; height: 100px; margin-bottom: 8px; }
.gauge-label { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 22px; font-weight: 700; color: #000; }
.score-delta { font-size: 12px; color: #72E128; font-weight: 700; }
.score-delta span { color: #707070; font-weight: 400; }
.score-spacer { flex: 1; }
.score-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; text-align: center; width: 100%; }
.score-stat-label { font-size: 12px; color: #000; font-weight: 700; }
.score-stat-val { font-size: 12px; font-weight: 400; color: #707070; }
.score-buttons { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.btn-issues { background: none; color: #855AF6; border: 1.5px solid #855AF6; border-radius: 8px; height: 32px; width: 100%; font-size: 14px; font-weight: 400; font-family: 'Signika', sans-serif; cursor: pointer; }
.btn-issues:hover { background: rgba(133,90,246,0.06); }
.btn-report { background: #855AF6; color: #fff; border: none; border-radius: 8px; height: 32px; padding: 0 16px; width: 100%; font-size: 14px; font-weight: 400; font-family: 'Signika', sans-serif; cursor: pointer; text-decoration: none; display: block; text-align: center; line-height: 32px; }
.btn-report:hover { opacity: 0.9; }
.btn-report-mobile { display: none; margin-top: 16px; }

/* Issues modal */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.35); z-index: 100; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal-box { background: #fff; border-radius: 12px; padding: 30px; width: 480px; max-height: 70vh; overflow-y: auto; box-shadow: 0 8px 32px rgba(0,0,0,0.18); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-header h3 { font-size: 18px; font-weight: 700; color: #000; }
.modal-close { background: none; border: none; font-size: 22px; color: #B4B2A9; cursor: pointer; }
.modal-close:hover { color: #000; }
.modal-summary { padding: 10px 14px; background: #F8F7FF; border-left: 3px solid #855AF6; border-radius: 0 8px 8px 0; font-size: 12px; color: #2B2C40; line-height: 18px; margin-bottom: 16px; }
.modal-summary strong { font-weight: 700; }
.modal-issue { padding: 14px 0; border-bottom: 1px solid #F0F0F4; }
.modal-issue:last-child { border-bottom: none; }
.modal-issue-name { font-size: 13px; font-weight: 700; color: #000; margin-bottom: 4px; }
.modal-issue-pts { font-weight: 600; color: #FE575D; font-size: 12px; margin-left: 6px; }
.modal-issue-tier { font-size: 11px; font-weight: 600; color: #855AF6; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.modal-issue-desc { font-size: 12px; color: #707070; line-height: 18px; }
.modal-issue-fix { font-size: 12px; color: #855AF6; line-height: 18px; margin-top: 6px; }
/* Remove confirmation modal */
.modal-content { background: #fff; border-radius: 12px; padding: 32px; max-width: 400px; width: 90%; box-shadow: 0 4px 24px rgba(0,0,0,0.2); }
.modal-content p { font-size: 14px; color: rgba(43,44,64,0.8); margin-bottom: 16px; line-height: 1.5; }
.modal-actions { display: flex; gap: 8px; }
.modal-actions button { padding: 8px 18px; border-radius: 6px; font-size: 13px; font-family: 'Signika', sans-serif; cursor: pointer; border: none; }

/* ============ HEALTH CARD ============ */
.health-card { grid-area: health; align-self: stretch; display: flex; flex-direction: column; overflow: hidden; }
.health-card .card-heading { font-size: 18px; font-weight: 700; color: #000; margin-bottom: 12px; flex-shrink: 0; }
.health-list { display: flex; flex-direction: column; gap: 14px; flex: 1; overflow-y: auto; }
.health-row { display: flex; align-items: flex-start; gap: 14px; }
.health-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.health-text { flex: 1; min-width: 0; }
.health-name-row { display: flex; align-items: center; gap: 8px; }
.health-name { font-size: 13px; font-weight: 700; color: #000; line-height: 18px; }
.health-indicator { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.health-chevron { font-size: 10px; color: #B4B2A9; transition: transform 0.15s; cursor: pointer; }
.health-row-issue { cursor: pointer; }
.health-row-issue.open .health-chevron { transform: rotate(90deg); }
.health-desc { font-size: 12px; color: #707070; font-weight: 400; margin-top: 2px; line-height: 20px; }
.health-accordion {
  display: none; margin-top: 8px; padding: 10px 14px;
  background: #FFF8F0; border-left: 3px solid #FDB528; border-radius: 0 8px 8px 0;
  font-size: 12px; color: #2B2C40; line-height: 18px;
}
.health-accordion.fail-style { background: #FFF5F5; border-left-color: #FE575D; }
.health-accordion strong { font-weight: 700; }
.health-row-issue.open .health-accordion { display: block; }
/* Healthy rows — tooltip on hover */
.health-row-healthy { position: relative; }
.health-row-healthy .tooltip {
  display: none; position: absolute; bottom: calc(100% + 6px); left: 54px;
  background: #2B2C40; color: #fff; font-size: 11px; font-weight: 400; padding: 6px 10px; border-radius: 6px; white-space: nowrap; z-index: 20;
}
.health-row-healthy .tooltip::after { content: ''; position: absolute; top: 100%; left: 20px; border: 5px solid transparent; border-top-color: #2B2C40; }
.health-row-healthy:hover .tooltip { display: block; }

/* ============ ISSUES CARD ============ */
.issues-card { grid-area: issues; height: 280px; display: flex; flex-direction: column; overflow: hidden; }
.issues-header { display: flex; align-items: baseline; gap: 14px; margin-bottom: 12px; flex-shrink: 0; }
.issues-header h3 { font-size: 18px; font-weight: 700; color: #000; white-space: nowrap; }
.issues-header span { font-size: 12px; color: #707070; font-weight: 400; }
.issues-content { flex: 1; overflow-y: auto; }
.issue-row { padding: 12px 0; border-bottom: 1px solid #F8F8FC; cursor: pointer; }
.issue-row:last-child { border-bottom: none; }
.issue-top { display: flex; align-items: center; gap: 14px; }
.issue-icon { width: 32px; height: 32px; flex-shrink: 0; }
.issue-name { font-size: 13px; font-weight: 700; color: #000; min-width: 100px; }
.issue-desc { font-size: 12px; color: #707070; font-weight: 400; flex: 1; }
.issue-chevron { font-size: 10px; color: #B4B2A9; transition: transform 0.15s; flex-shrink: 0; }
.issue-row.open .issue-chevron { transform: rotate(90deg); }
.issue-accordion {
  display: none; margin-top: 10px; margin-left: 46px; padding: 10px 14px;
  background: #FFF5F5; border-left: 3px solid #FE575D; border-radius: 0 8px 8px 0;
  font-size: 12px; color: #2B2C40; line-height: 18px;
}
.issue-accordion strong { font-weight: 700; }
.issue-row.open .issue-accordion { display: block; }
.issue-checkbox { display: flex; align-items: center; flex-shrink: 0; cursor: pointer; }
.issue-checkbox input { width: 16px; height: 16px; cursor: pointer; accent-color: #2563EB; }
.issue-pill { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; margin-left: 8px; vertical-align: middle; }
.pill-escalated { background: #F3F4F6; color: #6B7280; }
.issue-fix-summary { font-size: 12px; color: #374151; line-height: 18px; }
.issues-approve-section { padding: 14px 0 4px; text-align: right; }
.btn-approve { padding: 8px 20px; border: none; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; background: #2563EB; color: #fff; transition: background 0.15s, opacity 0.15s; }
.btn-approve:hover:not(:disabled) { background: #1D4ED8; }
.btn-approve:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============ CYCLES CARD ============ */
.cycles-card { grid-area: cycles; height: 350px; display: flex; flex-direction: column; overflow: hidden; }
.cycles-card .card-heading { font-size: 18px; font-weight: 700; color: #000; margin-bottom: 14px; flex-shrink: 0; }
.cycles-content { flex: 1; overflow-y: auto; }
.cycle-row { border-bottom: 1px solid #F8F8FC; cursor: pointer; }
.cycle-row:last-child { border-bottom: none; }
.cycle-summary { display: flex; align-items: center; padding: 12px 0; gap: 12px; }
.cycle-date { color: #000; font-weight: 700; font-size: 13px; white-space: nowrap; min-width: 130px; }
.cycle-dl { margin-left: auto; flex-shrink: 0; }
.cycle-dl a { color: #B4B2A9; }
.cycle-toggle { color: #B4B2A9; font-size: 18px; font-weight: 300; width: 20px; text-align: center; flex-shrink: 0; user-select: none; }
.cycle-row.open .cycle-toggle-plus { display: none; }
.cycle-toggle-minus { display: none; }
.cycle-row.open .cycle-toggle-minus { display: inline; }
.cycle-detail { display: none; padding: 0 0 12px 32px; font-size: 12px; color: #707070; }
.cycle-row.open .cycle-detail { display: block; }
.cycle-detail-summary, .cycle-ai-summary {
  margin-bottom: 12px; padding: 10px 14px;
  background: #F8F7FF; border-left: 3px solid #855AF6; border-radius: 0 8px 8px 0;
  font-size: 12px; color: #2B2C40; line-height: 18px;
}
.cycle-detail-summary strong, .cycle-ai-summary strong { font-weight: 700; }
.cycle-detail-section { font-size: 12px; color: #707070; margin-bottom: 6px; }
.cycle-detail-label, .cycle-section-label { font-size: 11px; font-weight: 700; color: #000; text-transform: uppercase; letter-spacing: 1px; margin-top: 12px; margin-bottom: 6px; }
.cycle-detail-line { font-size: 12px; color: #707070; margin-bottom: 4px; }
.cycle-update-row { display: flex; align-items: center; gap: 12px; padding: 4px 0 4px 12px; font-size: 12px; }
.cycle-update-name { font-weight: 400; color: #707070; min-width: 120px; }
.cycle-update-ver { color: #B4B2A9; flex: 1; }

/* ============ NETWORK & ERRORS ============ */
.detail-grid-third { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 30px; align-items: stretch; }
.network-card { display: flex; flex-direction: column; height: 330px; overflow: hidden; }
.network-card .card-heading { font-size: 18px; font-weight: 700; color: #000; margin-bottom: 12px; flex-shrink: 0; }
.network-scroll { flex: 1; overflow-y: auto; }
.network-row { display: flex; align-items: flex-start; gap: 14px; padding: 10px 0; border-bottom: 1px solid #F8F8FC; cursor: pointer; }
.network-row:last-child { border-bottom: none; }
.network-row:hover { background: #FAFAFA; }
.network-icon { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 10px; font-weight: 700; flex-shrink: 0; }
.network-info { flex: 1; min-width: 0; }
.network-top-row { display: flex; align-items: center; gap: 8px; }
.network-label { font-size: 13px; font-weight: 700; color: #000; line-height: 18px; }
.network-chevron { font-size: 10px; color: #B4B2A9; transition: transform 0.15s; margin-left: auto; }
.network-row.open .network-chevron { transform: rotate(90deg); }
.network-desc { font-size: 12px; color: #707070; margin-top: 2px; }
.network-time { font-size: 11px; color: #B4B2A9; margin-top: 2px; }
.network-fix {
  display: none; margin-top: 8px; padding: 10px 14px;
  background: #FFF5F5; border-left: 3px solid #FE575D; border-radius: 0 8px 8px 0;
  font-size: 12px; color: #2B2C40; line-height: 18px;
}
.network-fix strong { font-weight: 700; }
.network-row.open .network-fix { display: block; }

/* ============ PAGE HEALTH ============ */
.perf-card { display: flex; flex-direction: column; height: 330px; overflow: hidden; }
.perf-card .card-heading { font-size: 18px; font-weight: 700; color: #000; margin-bottom: 12px; flex-shrink: 0; }
.perf-scroll { flex: 1; overflow-y: auto; }

/* Pending Fixes card */
.pending-fixes-card { margin-top: 30px; padding: 24px; }
.pf-content { display: flex; flex-direction: column; gap: 16px; }
.pf-row { border: 1px solid #E8E8EC; border-radius: 8px; padding: 16px; }
.pf-header { margin-bottom: 8px; }
.pf-type { font-size: 14px; font-weight: 700; color: #2B2C40; }
.pf-files, .pf-error, .pf-proposed { font-size: 12px; color: #707070; line-height: 18px; margin-bottom: 4px; }
.pf-error strong, .pf-proposed strong, .pf-files strong { color: #2B2C40; }
.pf-actions { display: flex; gap: 8px; margin-top: 12px; }
.btn-approve-fix { background: #72E128; font-size: 12px; height: 28px; padding: 4px 14px; }
.btn-dismiss-fix { background: #B4B2A9; font-size: 12px; height: 28px; padding: 4px 14px; }

.page-health-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid #F8F8FC; font-size: 12px; }
.page-health-row:last-child { border-bottom: none; }
.page-health-status { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.page-health-name { flex: 1; font-weight: 700; color: #000; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-health-code { color: #707070; width: 36px; text-align: right; }
.page-health-time { color: #B4B2A9; width: 40px; text-align: right; }
.page-issue-row { cursor: pointer; }
.page-issue-row:hover { background: #FAFAFA; }
.page-chevron { font-size: 10px; color: #B4B2A9; transition: transform 0.15s; width: 16px; text-align: center; }
.page-issue-row.open .page-chevron { transform: rotate(90deg); }
.page-fix {
  display: none; padding: 8px 14px; margin-bottom: 4px;
  background: #FFF5F5; border-left: 3px solid #FE575D; border-radius: 0 8px 8px 0;
  font-size: 12px; color: #2B2C40; line-height: 18px;
}
.page-fix strong { font-weight: 700; }
.page-issue-row.open + .page-fix { display: block; }
/* Healthy page rows — tooltip on hover */
.page-healthy-row { position: relative; }
.page-healthy-row .tooltip {
  display: none; position: absolute; bottom: calc(100% + 6px); left: 20px;
  background: #2B2C40; color: #fff; font-size: 11px; font-weight: 400; padding: 6px 10px; border-radius: 6px; white-space: nowrap; z-index: 20;
}
.page-healthy-row .tooltip::after { content: ''; position: absolute; top: 100%; left: 20px; border: 5px solid transparent; border-top-color: #2B2C40; }
.page-healthy-row:hover .tooltip { display: block; }
/* Healthy plugin rows — tooltip on hover (inherits .status-icon .tooltip) */
.plugin-healthy-row { position: relative; }

/* === SETTINGS === */
.settings-page .content h2 { margin-bottom: 24px; }
.settings-page .btn { margin-top: 16px; }
.settings-page .result { margin-top: 12px; padding: 12px; font-size: 13px; }

/* === NOT FOUND === */
.not-found .content { text-align: center; padding: 80px 24px; }
.not-found .content h2 { margin-bottom: 12px; }
.not-found .content p { color: #6D6B77; margin-bottom: 24px; }

/* === RESPONSIVE: TABLET & PHONE shared (below 1200px) === */
@media (max-width: 1199px) {
  .sidebar { width: 64px; padding: 20px 0; }
  .sidebar-logo { padding: 0 0 30px; justify-content: center; }
  .sidebar-logo svg { width: 28px; height: 28px; }
  .sidebar-logo span { opacity: 0; width: 0; overflow: hidden; }
  .nav-item { justify-content: center; padding: 14px 0; gap: 0; width: 100%; }
  .nav-item svg { width: 28px; height: 28px; opacity: 1; }
  .nav-item span, .nav-badge { opacity: 0; width: 0; overflow: hidden; position: absolute; }
  .nav-chevron { display: none; }
  .nav-submenu { display: none !important; }
  .nav-item.active { margin-right: 0; border-radius: 0 50px 50px 0; justify-content: center; padding-left: 0; background: rgba(133,90,246,0.25); }
  .sidebar-expand { display: block; margin-top: 28px; }
  .sidebar.expanded { width: 246px; }
  .sidebar.expanded .sidebar-expand { margin-top: 16px; }
  .sidebar.expanded .sidebar-logo { padding: 0 20px 30px; justify-content: flex-start; }
  .sidebar.expanded .sidebar-logo svg { width: 24px; height: 24px; }
  .sidebar.expanded .sidebar-logo span { opacity: 1; width: auto; }
  .sidebar.expanded .nav-item { justify-content: flex-start; padding: 11px 20px; gap: 10px; }
  .sidebar.expanded .nav-item svg { width: 18px; height: 18px; }
  .sidebar.expanded .nav-item span, .sidebar.expanded .nav-badge { opacity: 1; width: auto; position: static; }
  .sidebar.expanded .nav-chevron { display: inline; }
  .sidebar.expanded .nav-group.open .nav-submenu { display: flex !important; flex-direction: column; }
  .sidebar.expanded .nav-item.active { margin-right: 14px; padding-left: 20px; justify-content: flex-start; }
  .main { margin-left: 64px; padding: 24px 40px; transition: margin-left 0.3s ease; }
  .sidebar.expanded ~ .main { margin-left: 246px; }
  .sidebar + .main-content { margin-left: 64px; }
  .sidebar.expanded ~ .main-content { margin-left: 246px; }
  .sites-grid { grid-template-columns: repeat(2, 1fr); }
}
/* TABLET: 768px - 1199px */
@media (min-width: 768px) and (max-width: 1199px) {
  .detail-grid-top { grid-template-columns: 1fr; grid-template-areas: "header" "plugins" "score"; gap: 24px; margin-bottom: 24px; }
  .detail-grid-bottom { grid-template-columns: 1fr; grid-template-areas: "health" "issues" "cycles"; gap: 24px; }
  .plugins-card { height: auto; max-height: 400px; align-self: auto; }
  .score-card { height: auto; }
  .header-card { height: auto; }
  .issues-card { height: auto; }
  .cycles-card { height: auto; }
  .network-card { height: auto; }
  .perf-card { height: auto; }
  .uptime-card { height: auto; min-height: 120px; margin-bottom: 24px; }
  .score-inner { grid-template-columns: 55% 45%; }
  .score-right { margin-top: -40px; }
  .score-buttons { margin-top: 12px; }
  .health-card { align-self: auto; }
  .health-list { gap: 18px; }
  .header-actions { flex-wrap: wrap; gap: 12px; }
  .detail-grid-third { grid-template-columns: 1fr; margin-top: 24px; }
  .network-scroll, .perf-scroll { max-height: none; overflow: visible; }
}
/* PHONE: below 768px */
@media (max-width: 767px) {
  .main { margin-left: 64px; padding: 24px 20px; transition: margin-left 0.3s ease; }
  .sidebar.expanded ~ .main { margin-left: 246px; }
  .sidebar + .main-content { margin-left: 64px; padding: 24px 20px; }
  .sidebar.expanded ~ .main-content { margin-left: 246px; }
  .card { padding: 24px; }
  .sites-grid { grid-template-columns: 1fr; gap: 16px; }
  .site-card { height: auto; min-height: 140px; }
  .stats-bar .card { flex-wrap: wrap; gap: 16px; padding: 20px; }
  .stats-total { border-right: none; padding-right: 0; margin-right: 0; }
  .stats-filters { flex-wrap: wrap; }
  .filter-btn { font-size: 12px; padding: 5px 12px; }
  .detail-grid-top { grid-template-columns: 1fr; grid-template-areas: "header" "plugins" "score"; gap: 20px; margin-bottom: 20px; }
  .detail-grid-bottom { grid-template-columns: 1fr; grid-template-areas: "health" "issues" "cycles"; gap: 20px; }
  .header-top { flex-wrap: wrap; gap: 12px; }
  .header-favicon { width: 48px; height: 48px; }
  .header-name { font-size: 16px; }
  .header-stats { flex-wrap: wrap; gap: 20px; }
  .header-actions { flex-direction: column; gap: 12px; }
  .btn-action { width: 100%; justify-content: center; height: 40px; font-size: 14px; }
  .btn-remove { min-width: auto; }
  .score-inner { grid-template-columns: 1fr; gap: 24px; }
  .score-right { margin-top: 0; order: -1; padding-right: 0; }
  .score-right .btn-report { display: none; }
  .btn-report-mobile { display: block; }
  .bar-chart { padding-left: 36px; }
  .chart-legend { width: 100%; }
  .plugins-card { height: auto; max-height: 400px; align-self: auto; }
  .score-card { height: auto; }
  .header-card { height: auto; }
  .issues-card { height: auto; }
  .cycles-card { height: auto; }
  .network-card { height: auto; }
  .perf-card { height: auto; }
  .uptime-card { height: auto; min-height: 100px; margin-bottom: 20px; }
  .uptime-bar { width: 3px; }
  .uptime-pct { font-size: 18px; }
  .score-buttons { margin-top: 16px; }
  .health-card { align-self: auto; }
  .health-list { gap: 18px; }
  .plugin-table thead th, .plugin-table tbody td { padding: 12px 16px; }
  .header-meta { margin-left: 0; display: block; margin-top: 6px; }
  .cycle-date { min-width: auto; }
  .cycle-detail { padding-left: 32px; }
  .issue-name { min-width: auto; }
  .detail-grid-third { grid-template-columns: 1fr; gap: 20px; margin-top: 20px; }
  .network-scroll, .perf-scroll { max-height: none; overflow: visible; }
  .schedule-row { flex-direction: column; align-items: flex-start; }
  .schedule-controls { flex-wrap: wrap; }
  .schedule-actions { margin-left: 0; width: 100%; }
  .schedule-actions .btn-action { flex: 1; }
}

/* -------------------------------------------------------
   Site Schedules
   ------------------------------------------------------- */

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
  cursor: pointer;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(43, 44, 64, 0.18);
  border-radius: 20px;
  transition: background 0.2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  left: 3px; bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.toggle-switch input:checked + .toggle-slider {
  background: #72E128;
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(16px);
}

.schedule-label {
  font-size: 12px;
  color: rgba(43, 44, 64, 0.58);
  margin-right: 6px;
}

/* Select and time inputs in schedule rows */
.schedule-controls select,
.schedule-controls input[type="time"] {
  padding: 6px 10px;
  border: 1px solid rgba(43, 44, 64, 0.22);
  border-radius: 6px;
  font-size: 13px;
  font-family: 'Signika', sans-serif;
  background: #fff;
  color: #2B2C40;
}
.schedule-controls select:focus,
.schedule-controls input[type="time"]:focus {
  border-color: #6375FF;
  box-shadow: 0 0 0 2px rgba(99, 117, 255, 0.12);
  outline: none;
}

/* Grayed / disabled state for Use Default */
.schedule-grayed {
  opacity: 0.4;
  pointer-events: none;
}

.schedule-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.schedule-site-name {
  min-width: 180px;
  font-size: 13px;
  font-weight: 500;
  color: #2B2C40;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Global default section divider */
.schedule-default-section {
  padding-bottom: 20px;
  margin-bottom: 4px;
  border-bottom: 2px solid rgba(43, 44, 64, 0.1);
}

/* Saved / error flash */
.schedule-status {
  font-size: 12px;
  font-weight: 500;
  min-width: 40px;
  transition: opacity 0.3s;
}
.schedule-saved { color: #56A700; }
.schedule-error { color: #FF4D49; }

/* Settings page — wider content area */
.settings-content { max-width: 1200px; }

/* Schedule row grid alignment */
.schedule-row {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(43, 44, 64, 0.08);
}
.schedule-row:last-child { border-bottom: none; }

.schedule-controls {
  display: grid;
  grid-template-columns: 36px 52px 36px 52px 90px 90px 90px auto;
  align-items: center;
  gap: 6px;
}

/* -------------------------------------------------------
   Fix Permissions card
   ------------------------------------------------------- */
.fix-perm-section h4 { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.fix-perm-grid {
  display: grid;
  grid-template-columns: repeat(3, 300px);
  justify-content: space-between;
  gap: 2px 0;
}
.fix-perm-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 0;
}
.fix-perm-label { font-size: 13px; color: #2B2C40; }
.fix-perm-toggle-group { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-shrink: 0; }
.fix-perm-toggle-text { font-size: 11px; color: rgba(43, 44, 64, 0.58); min-width: 32px; text-align: right; }
@media (max-width: 1100px) {
  .fix-perm-grid { grid-template-columns: repeat(2, 1fr); gap: 2px 24px; }
}
@media (max-width: 600px) {
  .fix-perm-grid { grid-template-columns: 1fr; }
}

/* Per-site overrides */
.fix-perm-site { padding: 12px 0; border-bottom: 1px solid rgba(43, 44, 64, 0.08); }
.fix-perm-site:last-child { border-bottom: none; }
.fix-perm-site-header {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.fix-perm-site-header img { flex-shrink: 0; }
.fix-perm-site-info { display: flex; flex-direction: column; }
.fix-perm-site-name { font-size: 13px; font-weight: 500; color: #2B2C40; line-height: 1.2; }
.fix-perm-site-sub { font-size: 11px; color: rgba(43, 44, 64, 0.44); font-weight: 400; line-height: 1.2; margin-top: 1px; }
.fix-perm-expand-btn {
  font-size: 12px;
  color: #6375FF;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Signika', sans-serif;
  margin-left: auto;
  padding: 4px 8px;
}
.fix-perm-expand-btn:hover { text-decoration: underline; }
.fix-perm-site-overrides { padding: 8px 0 0 26px; display: none; }
.fix-perm-site-overrides.open { display: block; }
.fix-perm-site-status { font-size: 12px; font-weight: 500; min-width: 40px; margin-left: 8px; }
.fix-perm-chevron {
  transition: transform 0.2s;
  flex-shrink: 0;
}
.fix-perm-chevron.open { transform: rotate(90deg); }
