/* GAIL's Overview — Admin Layout */

/* ===== Top Bar ===== */

.top-bar {
  background: var(--white);
  border-bottom: 1px solid var(--grey-border);
  padding: 0 32px;
  padding-top: var(--sat, env(safe-area-inset-top, 0px));
  height: calc(56px + var(--sat, env(safe-area-inset-top, 0px)));
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: var(--z-header);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-sub {
  color: var(--text-mid);
  font-size: 13px;
  font-family: var(--font-body);
  font-weight: 500;
  padding-left: 10px;
  border-left: 1px solid var(--grey-border);
  line-height: 1;
}

.top-bar-right { display: flex; align-items: center; gap: 12px; }

/* ===== Nav Bar ===== */

.nav-bar {
  background: var(--white);
  border-bottom: 1px solid var(--grey-border);
  padding: 0 32px;
  position: sticky;
  top: calc(56px + var(--sat, env(safe-area-inset-top, 0px)));
  z-index: calc(var(--z-header) - 1);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nav-bar::-webkit-scrollbar { display: none; }

.nav-tabs { display: flex; gap: 0; flex-wrap: nowrap; }
.nav-tab {
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-mid);
  cursor: pointer;
  transition: color 0.15s ease;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-tab:hover { color: var(--text-dark); }
.nav-tab.active { color: var(--red); border-bottom-color: var(--red); }

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--grey-light);
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--text-mid);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--red);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.btn-logout {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--grey-border);
  background: white;
  font-size: 13px;
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-logout:hover { border-color: var(--red); color: var(--red); }

/* ===== Week Navigation ===== */

.week-bar {
  background: var(--white);
  border-bottom: 1px solid var(--grey-border);
  padding: 12px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.week-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--grey-border);
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-mid);
  transition: all 0.15s ease;
}
.week-btn:hover {
  border-color: var(--red);
  color: var(--red);
  transform: translateY(-1px);
}

.week-label {
  font-size: 15px;
  font-weight: 600;
  min-width: 220px;
  text-align: center;
}
.week-label small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-light);
  margin-top: 2px;
}

.btn-this-week {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--red);
  background: white;
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-this-week:hover { background: var(--red); color: white; }

/* ===== Main Content ===== */

.admin-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 32px;
}

/* ===== Ingestion snapshot ===== */
.is-snapshot { --is-green:var(--green); --is-amber:var(--amber); --is-line:var(--grey-border); color:var(--text); font-family:var(--font-body); }
.is-hero { background:var(--white); border:1px solid var(--is-line); border-top:4px solid var(--is-amber); border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow-sm); }
.is-hero--ready { border-top-color:var(--green); }
.is-hero--blocked { border-top-color:var(--red); }
.is-hero-head { padding:20px 24px; display:flex; align-items:center; justify-content:space-between; gap:16px; }
.is-hero-head strong { display:block; font-family:var(--font-heading); font-size:21px; line-height:1.25; }
.is-hero-head small { display:block; color:var(--text-mid); font-size:13px; margin-top:5px; }
.is-summary { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; padding:16px; border-top:1px solid var(--is-line); background:var(--grey-light); }
.is-summary > div { min-height:108px; padding:16px; border:1px solid var(--is-line); border-radius:var(--radius-sm); background:var(--white); }
.is-summary small,.is-summary strong,.is-summary span { display:block; }
.is-summary small { color:var(--text-light); font-size:11px; font-weight:600; letter-spacing:.5px; text-transform:uppercase; }
.is-summary strong { margin-top:10px; font-size:22px; line-height:1.15; }
.is-summary span { color:var(--text-mid); font-size:12px; margin-top:7px; }
.is-section-head { display:flex; align-items:end; justify-content:space-between; gap:16px; margin:30px 0 12px; }
.is-section-head h2 { margin:0; font:700 22px var(--font-heading); color:var(--text); }
.is-section-head p { margin:4px 0 0; color:var(--text-mid); font-size:13px; }
.is-issues { display:grid; grid-template-columns:repeat(2,1fr); gap:12px; }
.is-issue { display:grid; grid-template-columns:34px 1fr auto; gap:12px; align-items:center; background:var(--white); border:1px solid var(--red-border); border-left:3px solid var(--red); border-radius:var(--radius); padding:16px; box-shadow:var(--shadow-sm); }
.is-issue--warning { border-color:var(--amber-border); border-left-color:var(--amber); }
.is-issue-mark { width:32px; height:32px; display:grid; place-items:center; border-radius:50%; background:var(--red-light); color:var(--red); font-size:16px; font-weight:700; }
.is-issue--warning .is-issue-mark { background:var(--amber-light); color:var(--amber); }
.is-issue strong,.is-issue small { display:block; }
.is-issue strong { font-size:14px; line-height:1.35; }
.is-issue small { color:var(--text-mid); font-size:12px; margin-top:3px; }
.is-issue button { border:0; background:none; color:var(--red); font-size:12px; font-weight:600; }
.is-empty { padding:20px; border:1px dashed var(--is-line); border-radius:var(--radius); color:var(--text-mid); font-size:13px; background:var(--white); }
.is-issues > .is-empty { grid-column:1 / -1; }
.is-reports { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.is-report { background:var(--white); border:1px solid var(--is-line); border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow-sm); }
.is-report-main { padding:20px; }
.is-report-head { display:flex; justify-content:space-between; align-items:center; }
.is-report-icon { width:40px; height:40px; display:grid; place-items:center; border-radius:var(--radius-sm); background:var(--grey-light); font-size:17px; }
.is-status { padding:4px 10px; border-radius:var(--radius-pill); background:var(--green-light); color:var(--green); font-size:11px; font-weight:600; text-transform:capitalize; }
.is-report--partial .is-status,.is-report--missing .is-status { background:var(--amber-light); color:var(--amber); }
.is-report--error .is-status { background:var(--red-light); color:var(--red); }
.is-report h3 { font-size:16px; margin:14px 0 3px; }
.is-report p { color:var(--text-mid); font-size:13px; min-height:38px; margin:0; line-height:1.45; }
.is-coverage { display:flex; justify-content:space-between; gap:10px; margin-top:16px; font-size:12px; }
.is-bar { height:6px; overflow:hidden; background:var(--grey-border); border-radius:var(--radius-pill); margin-top:8px; }
.is-bar i { display:block; height:100%; background:var(--green); }
.is-report--partial .is-bar i { background:var(--amber); }
.is-stages { display:grid; grid-template-columns:repeat(4,1fr); gap:5px; margin-top:17px; }
.is-stage { padding-top:14px; position:relative; text-align:center; color:var(--text-mid); font-size:10px; }
.is-stage:before { content:""; position:absolute; top:0; left:calc(50% - 4px); width:8px; height:8px; border-radius:50%; background:#ccc; }
.is-stage--complete:before { background:var(--green); }
.is-stage--warning:before { background:var(--amber); }
.is-report-toggle { width:100%; display:flex; justify-content:space-between; gap:10px; padding:11px 20px; border:0; border-top:1px solid var(--is-line); background:var(--white); color:var(--text-mid); font-size:11px; text-align:left; }
.is-report-toggle:hover { background:var(--grey-light); }
.is-report-toggle b { color:var(--red); }
.is-report-detail { display:none; padding:10px 20px 14px; border-top:1px solid var(--is-line); background:var(--grey-light); }
.is-report--open .is-report-detail { display:block; }
.is-report-detail > div { display:flex; justify-content:space-between; gap:10px; padding:7px 0; border-bottom:1px solid var(--grey-border); font-size:11px; }
.is-sites { border:1px solid var(--is-line); border-radius:var(--radius); background:var(--white); overflow:hidden; box-shadow:var(--shadow-sm); }
.is-site-toolbar { padding:14px 16px; border-bottom:1px solid var(--is-line); }
.is-site-toolbar input { width:min(320px,100%); padding:9px 12px; border:1px solid var(--is-line); border-radius:var(--radius-sm); background:var(--grey-light); font-size:13px; }
.is-site-toolbar input:focus { outline:none; border-color:var(--red); box-shadow:0 0 0 2px var(--red-light); background:var(--white); }
.is-table-wrap { overflow-x:auto; }
.is-sites table { width:100%; border-collapse:collapse; }
.is-sites th { padding:10px 14px; background:var(--grey-light); color:var(--text-light); text-align:left; font-weight:600; text-transform:uppercase; letter-spacing:.5px; font-size:10px; }
.is-sites td { padding:12px 14px; border-top:1px solid var(--is-line); font-size:12px; white-space:nowrap; }
.is-sites tbody tr:hover { background:var(--grey-light); }
.is-sites td:first-child { font-weight:600; color:var(--text); }
.is-dot { display:inline-block; width:7px; height:7px; margin-right:5px; border-radius:50%; background:var(--is-green); }
.is-dot--warning { background:var(--amber); }.is-dot--muted { background:#ccc; }
.is-form-prefilled { color:var(--is-green); font-weight:700; }.is-form-partial { color:var(--red); font-weight:700; }
.is-drawer { position:fixed; inset:0; z-index:calc(var(--z-header) + 10); pointer-events:none; }
.is-drawer-backdrop { position:absolute; inset:0; width:100%; border:0; background:rgba(24,20,17,.28); opacity:0; transition:.2s; }
.is-drawer aside { position:absolute; right:0; top:0; height:100%; width:min(430px,94vw); padding:28px; overflow:auto; background:var(--white); box-shadow:var(--shadow-lg); transform:translateX(100%); transition:.2s; }
.is-drawer--open { pointer-events:auto; }.is-drawer--open .is-drawer-backdrop { opacity:1; }.is-drawer--open aside { transform:none; }
.is-drawer-close { float:right; width:32px; height:32px; border:1px solid var(--grey-border); background:var(--grey-light); border-radius:50%; cursor:pointer; font-size:18px; }
.is-drawer aside > small { text-transform:uppercase; letter-spacing:.5px; color:var(--red); font-size:11px; font-weight:600; }.is-drawer h2 { font-family:var(--font-heading); font-size:24px; margin:6px 0; }.is-drawer aside > p { color:var(--text-mid); font-size:13px; }
.is-activity-row { display:grid; grid-template-columns:12px 1fr; gap:12px; margin-top:20px; }.is-activity-row i { width:8px; height:8px; margin-top:5px; border-radius:50%; background:var(--green); box-shadow:0 0 0 4px var(--green-light); }.is-activity-row strong,.is-activity-row small { display:block; font-size:12px; }.is-activity-row small { color:var(--text-mid); margin-top:3px; }
@media(max-width:850px){.is-summary{grid-template-columns:1fr 1fr}.is-reports{grid-template-columns:1fr}.is-issues{grid-template-columns:1fr}}
@media(max-width:590px){.is-hero-head{align-items:flex-start;flex-direction:column}.is-summary{grid-template-columns:1fr}.is-issue{grid-template-columns:34px 1fr}.is-issue button{grid-column:2;text-align:left;padding:0}.is-sites th:nth-child(3),.is-sites td:nth-child(3),.is-sites th:nth-child(4),.is-sites td:nth-child(4){display:none}}

/* ===== Deadline Banner ===== */

.deadline-banner {
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  animation: fadeInUp 0.4s ease both;
}
.deadline-banner.overdue {
  border-color: var(--red-border);
  background: var(--red-light);
}
.deadline-banner.complete {
  border-color: var(--green-border);
  background: var(--green-light);
}

.deadline-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  margin-bottom: 4px;
}
.deadline-value { font-size: 18px; font-weight: 700; }
.deadline-sub { font-size: 13px; color: var(--text-light); margin-top: 2px; }

.deadline-timer {
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--red);
  padding: 8px 20px;
  background: var(--red-light);
  border-radius: var(--radius-sm);
}
.deadline-banner.overdue .deadline-timer {
  background: var(--red);
  color: white;
}
.deadline-banner.complete .deadline-timer {
  background: var(--green);
  color: white;
}
.deadline-banner.pending-actuals {
  border-color: var(--amber-border);
  background: var(--amber-light);
}
.deadline-banner.pending-actuals .deadline-timer {
  background: var(--amber-light);
  border: 2px solid var(--amber-border);
  color: var(--amber);
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  gap: 2px;
}
.actuals-count { font-size: 26px; font-weight: 700; }
.actuals-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.8; }
.deadline-timer.urgent { color: var(--red); }
.deadline-banner.override-active {
  border-color: #b5860d;
  background: #fef9ec;
}
.deadline-banner.override-active .deadline-timer {
  background: #fef9ec;
  border: 2px solid #b5860d;
  color: #b5860d;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  gap: 2px;
}

/* ===== Summary Cards ===== */

.summary-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.summary-card {
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  animation: fadeInUp 0.4s ease both;
  animation-delay: calc(var(--anim-index, 0) * 50ms);
}
.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.summary-card-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  margin-bottom: 8px;
}
.summary-card-value {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}
.summary-card-sub {
  font-size: 13px;
  color: var(--text-mid);
  margin-top: 6px;
}
.summary-card-bar {
  height: 4px;
  background: var(--grey-light);
  border-radius: 2px;
  margin-top: 12px;
  overflow: hidden;
}
.summary-card-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s ease;
}

/* ===== Highlights ===== */

.highlights {
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  animation: fadeInUp 0.4s ease both;
  animation-delay: 250ms;
}

.highlights-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.highlight-chips { display: flex; flex-wrap: wrap; gap: 10px; }

.highlight-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
}
.highlight-chip.red { background: var(--red-light); color: var(--red); border: 1px solid var(--red-border); }
.highlight-chip.amber { background: var(--amber-light); color: var(--amber); border: 1px solid var(--amber-border); }
.highlight-chip.green { background: var(--green-light); color: var(--green); border: 1px solid var(--green-border); }

.chip-count { font-weight: 700; font-size: 16px; }

/* ===== Section Header ===== */

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  animation: fadeInUp 0.4s ease both;
  animation-delay: 300ms;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-chips { display: flex; gap: 8px; }

.filter-chip {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--grey-border);
  background: white;
  font-size: 12px;
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-chip:hover,
.filter-chip.active {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-light);
}

/* ===== Site Grid ===== */

.site-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
  animation: fadeInUp 0.4s ease both;
  animation-delay: 350ms;
}

.site-card {
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}
.site-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: #ccc;
}

.site-card-left { display: flex; align-items: center; gap: 12px; }

.site-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}
.site-icon.submitted { background: var(--green-light); color: var(--green); }
.site-icon.in-progress { background: var(--amber-light); color: var(--amber); }
.site-icon.not-started { background: var(--grey-light); color: var(--grey); }
.site-icon.late { background: var(--red-light); color: var(--red); }
.site-icon.disabled { background: var(--grey-light); color: var(--text-light); }

/* Not-live-yet sites: muted, not interactive (no submission to open). */
.site-card[data-status="disabled"] {
  opacity: 0.6;
  cursor: default;
  background: var(--grey-light);
}
.site-card[data-status="disabled"]:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
  border-color: var(--grey-border);
}

.site-name { font-size: 15px; font-weight: 600; }
.sub-queue-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sub-queue-nav-top { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--grey-border); }
.sub-queue-nav-bottom { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--grey-border); }
.sub-queue-pos { font-size: 12px; color: var(--text-light); font-variant-numeric: tabular-nums; }
@media print { .sub-queue-nav { display: none !important; } }
.site-meta { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.site-progress { display: flex; align-items: center; gap: 8px; margin-top: 6px; max-width: 180px; }
.site-progress-track { flex: 1; height: 5px; border-radius: 3px; background: var(--grey-light, #eee); overflow: hidden; }
.site-progress-fill { height: 100%; background: #F2B705; }
.site-progress span { font-size: 11px; font-weight: 600; color: var(--text-mid); }

.site-card-right { display: flex; align-items: center; gap: 10px; }

.btn-chase {
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid var(--red-border);
  background: var(--red-light);
  color: var(--red);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-chase:hover { background: var(--red); color: white; }

.chevron { color: var(--grey); font-size: 18px; }

/* ===== Submission Viewer ===== */

.sub-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 24px;
}

.sub-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
}

.sub-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.sub-meta {
  font-size: 14px;
  color: var(--text-mid);
}

.sub-badges {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.sub-summary {
  display: flex;
  gap: 20px;
  padding: 14px 18px;
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.sub-ai-summary {
  padding: 14px 18px;
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-left: 3px solid var(--red, #C8102E);
  border-radius: var(--radius);
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.sub-ai-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.sub-ai-summary-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mid);
}
.sub-ai-summary-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sub-ai-summary-model {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--grey-light);
  color: var(--text-mid);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.sub-ai-regen-btn {
  background: transparent;
  border: 1px solid var(--grey-border);
  color: var(--text-mid);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.sub-ai-regen-btn:hover:not(:disabled) {
  background: var(--grey-light);
  color: var(--text-dark);
}
.sub-ai-regen-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.sub-ai-summary-body {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-dark);
}
.sub-ai-summary-loading {
  color: var(--text-mid);
  font-style: italic;
}
.sub-ai-summary-error {
  color: var(--text-mid);
  font-size: 13px;
}
.sub-ai-rating-line {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--grey-border);
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.5;
}
.sub-ai-rating-line:empty { display: none; }

.sub-ai-rating-block {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--grey-border);
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.5;
}
.sub-ai-rating-headline { margin-bottom: 8px; }
.sub-ai-rating-group { margin-top: 6px; }
.sub-ai-rating-group-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-light);
  margin-bottom: 2px;
}
.sub-ai-rating-group ul {
  margin: 0;
  padding-left: 18px;
}
.sub-ai-rating-group li { margin: 2px 0; }

/* Rubric breakdown: six dimensions each shown with 0-2 filled pips. */
.sub-ai-rating-dims {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 18px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--grey-border);
}
.sub-ai-dim {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-mid);
}
.sub-ai-dim-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Mini traffic light: three dots; the achieved level is lit, others faded. */
.sub-ai-dim-lights { display: inline-flex; gap: 4px; flex: 0 0 auto; }
.sub-ai-dim-lights i,
.sub-ai-dim-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  opacity: 0.18;
}
.sub-ai-dim-lights i.red,    .sub-ai-dim-legend i.red    { background: var(--red); }
.sub-ai-dim-lights i.amber,  .sub-ai-dim-legend i.amber  { background: var(--amber); }
.sub-ai-dim-lights i.green,  .sub-ai-dim-legend i.green  { background: var(--green); }
.sub-ai-dim-lights i.on { opacity: 1; }

.sub-ai-dim-legend {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--grey-border);
  font-size: 11px;
  color: var(--text-light);
}
.sub-ai-dim-legend span { display: inline-flex; align-items: center; gap: 5px; }
.sub-ai-dim-legend i.on { opacity: 1; }

@media (max-width: 520px) {
  .sub-ai-rating-dims { grid-template-columns: 1fr; }
}

.sub-ai-rating-toggle {
  margin-left: 8px;
  background: none;
  border: none;
  color: var(--red);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.sub-ai-rating-block.collapsed .sub-ai-rating-details { display: none; }

.followup-modal {
  background: var(--white);
  border-radius: 14px;
  padding: 20px 22px;
  width: min(640px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.followup-head { font-family: var(--font-heading, inherit); font-size: 20px; font-weight: 700; margin-bottom: 14px; }
.followup-label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-light); margin: 10px 0 4px; }
.followup-subject, .followup-body {
  width: 100%; border: 1px solid var(--grey-border); border-radius: 8px;
  padding: 9px 11px; font: inherit; color: var(--text); background: var(--cream, #fafaf8);
}
.followup-body { resize: vertical; line-height: 1.5; }
.followup-actions { display: flex; gap: 8px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.followup-status { font-size: 12px; color: var(--text-mid); min-height: 16px; margin-top: 8px; }

.sub-summary-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sub-summary-count {
  font-size: 20px;
  font-weight: 700;
}

.sub-summary-label {
  font-size: 12px;
  color: var(--text-light);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.sub-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
}

.sub-toggle-btn {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--grey-border);
  background: white;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.15s;
}
.sub-toggle-btn:hover { border-color: var(--red); color: var(--red); }
.sub-toggle-btn.active { background: var(--red); color: white; border-color: var(--red); }

.sub-toggle-hint {
  font-size: 12px;
  color: var(--text-light);
  margin-left: 8px;
}

.sub-section {
  margin-bottom: 24px;
}

.sub-section--collapsed {
  margin-bottom: 8px;
}

.sub-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--grey-border);
  margin-bottom: 12px;
}

.sub-section--collapsed .sub-section-header {
  border-bottom: none;
  margin-bottom: 0;
  padding: 12px 16px;
  background: var(--green-light);
  border-radius: var(--radius-sm);
  border: 1px solid var(--green-border, #c3e6cb);
}

.sub-section-num {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--red);
  color: white;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sub-section-label {
  font-size: 15px;
  font-weight: 600;
}

.sub-question {
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: border-color 0.15s;
}
.sub-question--green { border-left: 3px solid var(--green); }
.sub-question--amber { border-left: 3px solid var(--amber); }
.sub-question--red { border-left: 3px solid var(--red); }

/* ── Actions list (submission viewer) ──────────────────────────────── */
.sub-action {
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-left: 3px solid var(--grey-border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.sub-action--red   { border-left-color: var(--red); }
.sub-action--amber { border-left-color: var(--amber); }
.sub-action--green { border-left-color: var(--green); }

.sub-action-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.sub-action-metric {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mid);
}
.sub-action-verdict {
  margin-left: auto;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  white-space: nowrap;
}
.sub-action-what {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}
.sub-action-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--text-mid);
}
.sub-action-foot-label {
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-light);
  margin-right: 5px;
}
.sub-action-foot-sep { color: var(--grey-border); }

.sub-question-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}

.sub-question-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  flex: 1;
}

.sub-answer {
  padding-top: 8px;
  border-top: 1px solid var(--grey-border);
}

.sub-answer-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.sub-answer-text {
  font-size: 15px;
  color: var(--text);
  white-space: pre-wrap;
  line-height: 1.6;
}

.sub-answer-empty {
  font-size: 14px;
  color: var(--text-light);
  font-style: italic;
}

/* Uploaded rota PDF on the submission page */
.sub-rota {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.sub-rota-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  background: #f7f5f2;
  border-bottom: 1px solid var(--border);
}
.sub-rota-bar a { color: var(--text); font-weight: 500; }
.sub-rota-frame {
  display: block;
  width: 100%;
  height: 70vh;
  min-height: 420px;
  border: 0;
  background: #fff;
}

/* ===== Reports ===== */

.reports-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px;
}

.rpt-filter-bar {
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.rpt-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rpt-preset {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--grey-border);
  background: white;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.15s;
}
.rpt-preset:hover { border-color: var(--red); color: var(--red); }
.rpt-preset.active { background: var(--red); color: white; border-color: var(--red); }

.rpt-date-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--grey-border);
}

.rpt-date-field { display: flex; flex-direction: column; gap: 4px; }
.rpt-date-label { font-size: 11px; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.3px; }

.rpt-active-range {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 16px;
}

.rpt-summary {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.rpt-summary-card {
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.rpt-summary-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-light);
  margin-bottom: 4px;
}

.rpt-summary-value {
  font-size: 24px;
  font-weight: 700;
}

.pct-bar-wrap {
  flex: 1;
  height: 6px;
  background: var(--grey-light);
  border-radius: 3px;
  overflow: hidden;
}
.pct-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.reports-summary {
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.reports-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 14px;
}
.reports-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  background: var(--grey-light);
  border-bottom: 1px solid var(--grey-border);
}
.reports-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--grey-border);
  vertical-align: middle;
}
.reports-table tr:last-child td { border-bottom: none; }
.reports-table tr:hover td { background: var(--grey-light); }

/* ===== Settings ===== */

.settings-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px;
}

.settings-subtabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--grey-border);
  padding-bottom: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.settings-subtabs::-webkit-scrollbar {
  display: none;
}

.settings-subtab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-mid);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: -1px;
  flex-shrink: 0;
  white-space: nowrap;
}

.settings-subtab:hover { color: var(--text); }

.settings-subtab.active {
  color: var(--red);
  border-bottom-color: var(--red);
  font-weight: 600;
}

.settings-card {
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.settings-card-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
}

.settings-field { margin-bottom: 20px; }

/* ── Settings → AI (compact controls + feature accordion) ─────────────────── */
.ai-intro { font-size: 14px; color: var(--text-mid); line-height: 1.55; margin-bottom: 18px; }

.ai-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
  padding: 14px 16px;
  border: 1px solid var(--grey-border);
  border-radius: var(--radius);
  background: var(--grey-light);
  margin-bottom: 16px;
}
.ai-toggle { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.ai-toggle input { width: 17px; height: 17px; margin-top: 1px; cursor: pointer; flex-shrink: 0; accent-color: var(--red); }
.ai-toggle-txt { display: flex; flex-direction: column; line-height: 1.3; }
.ai-toggle-txt b { font-size: 13.5px; font-weight: 600; }
.ai-toggle-txt small { font-size: 11.5px; color: var(--text-mid); margin-top: 1px; }
.ai-coach-style { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; font-size: 13px; padding-top: 10px; margin-top: 2px; border-top: 1px dashed var(--grey-border); }
.ai-coach-style-lbl { font-weight: 600; }
.ai-coach-style label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--text-mid); }
.ai-coach-style input { accent-color: var(--red); cursor: pointer; }

.ai-cost-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 11px 16px; background: var(--grey-light); border: 1px solid var(--grey-border); border-radius: var(--radius); font-size: 12.5px; color: var(--text-mid); line-height: 1.45; margin-bottom: 18px; }
.ai-cost-total { font-weight: 700; font-size: 17px; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ai-cost-total small { font-size: 11px; color: var(--text-mid); font-weight: 500; margin-left: 5px; }

.ai-accordion { display: flex; flex-direction: column; gap: 8px; }
.ai-feat { border: 1px solid var(--grey-border); border-radius: var(--radius); background: var(--white); overflow: hidden; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.ai-feat.open { border-color: var(--red); box-shadow: 0 0 0 1px var(--red) inset; }
.ai-feat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 13px 16px; background: none; border: none; cursor: pointer; font: inherit; text-align: left; color: inherit; }
.ai-feat-head:hover { background: var(--grey-light); }
.ai-feat-head-l { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.ai-feat-chev { color: var(--text-mid); font-size: 18px; line-height: 1; transition: transform 0.15s ease; flex-shrink: 0; align-self: center; }
.ai-feat.open .ai-feat-chev { transform: rotate(90deg); color: var(--red); }
.ai-feat-name { font-weight: 600; font-size: 14px; white-space: nowrap; }
.ai-feat-vol { font-size: 10.5px; color: var(--text-mid); text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-feat-head-r { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.ai-feat-model { font-size: 12.5px; font-weight: 600; color: var(--text); padding: 3px 10px; background: var(--grey-light); border: 1px solid var(--grey-border); border-radius: var(--radius-pill); white-space: nowrap; }
.ai-feat.open .ai-feat-model { background: var(--red); color: #fff; border-color: var(--red); }
.ai-feat-cost { font-size: 13px; font-weight: 700; color: var(--text-mid); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ai-feat-cost i { font-style: normal; font-weight: 500; font-size: 10px; }
.ai-feat-body { padding: 2px 16px 16px; border-top: 1px solid var(--grey-border); }
.ai-feat-desc { font-size: 12.5px; color: var(--text-mid); line-height: 1.5; margin: 12px 0; }

.ai-model-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.ai-model-option { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--grey-border); border-radius: var(--radius-sm); cursor: pointer; background: var(--white); transition: border-color 0.12s ease, box-shadow 0.12s ease; }
.ai-model-option:hover { border-color: var(--text-mid); }
.ai-model-option.sel { border-color: var(--red); box-shadow: 0 0 0 1px var(--red) inset; }
.ai-model-option-top { display: flex; align-items: center; gap: 8px; }
.ai-model-option-top input { cursor: pointer; margin: 0; accent-color: var(--red); }
.ai-model-option-name { font-weight: 600; font-size: 13.5px; }
.ai-model-option-q { font-size: 11.5px; color: var(--text-mid); line-height: 1.35; }
.ai-model-option-cost { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 2px; }
.ai-model-option-price { font-size: 11px; color: var(--text-mid); }
.ai-model-option-price i { font-style: normal; opacity: 0.7; }
.ai-model-option-mo { font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.ai-model-option-mo i { font-style: normal; font-size: 10px; color: var(--text-mid); font-weight: 500; margin-left: 3px; }

.ai-actions { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.ai-actions .settings-saved { color: var(--green); }

.ai-usage { margin-top: 24px; border-top: 1px solid var(--grey-border); padding-top: 16px; }
.ai-usage > summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.ai-usage-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 14px 0 10px; }
.ai-usage-sub { font-size: 13px; color: var(--text-mid); }

@media (max-width: 640px) {
  .ai-controls { grid-template-columns: 1fr; }
  .ai-feat-vol { display: none; }
}

.settings-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.settings-hint {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}

/* ===== User & Reset Rows ===== */

.user-row, .reset-week-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  background: white;
}

/* ===== Login ===== */

.login-error {
  background: var(--red-light);
  border: 1px solid var(--red-border);
  color: var(--red);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

/* ===== Question Editor ===== */

.qe-section {
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}

.qe-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  cursor: pointer;
  transition: background 0.1s;
}
.qe-section-header:hover { background: var(--grey-light); }

.qe-section-left { display: flex; align-items: center; gap: 10px; }
.qe-expand { font-size: 11px; color: var(--text-light); width: 14px; }
.qe-section-label { font-size: 15px; font-weight: 600; }

.qe-badge {
  font-size: 11px;
  color: var(--text-light);
  background: var(--grey-light);
  padding: 2px 8px;
  border-radius: 10px;
}

.qe-section-actions { display: flex; align-items: center; gap: 6px; }

.qe-arrow {
  width: 28px; height: 28px;
  border-radius: 6px;
  border: 1px solid var(--grey-border);
  background: white;
  font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.1s;
}
.qe-arrow:hover:not(:disabled) { border-color: var(--red); color: var(--red); }
.qe-arrow:disabled { opacity: 0.3; cursor: default; }

.qe-btn-del, .qe-btn-edit {
  width: 28px; height: 28px;
  border-radius: 6px;
  border: 1px solid var(--grey-border);
  background: white;
  font-size: 13px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-light);
  transition: all 0.1s;
}
.qe-btn-del:hover:not(:disabled) { border-color: var(--red); color: var(--red); background: var(--red-light); }
.qe-btn-del:disabled { opacity: 0.3; cursor: default; }
.qe-btn-edit:hover { border-color: var(--text-mid); color: var(--text); }

.qe-questions {
  border-top: 1px solid var(--grey-border);
  padding: 12px 18px;
}

.qe-q-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  background: white;
  gap: 12px;
}
.qe-q-row.qe-disabled { opacity: 0.5; }

.qe-q-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }

.qe-q-text {
  font-size: 13px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; min-width: 0;
}

.qe-q-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

.qe-sys-badge {
  display: inline-block; padding: 1px 6px; border-radius: 4px;
  font-size: 10px; font-weight: 600;
  background: var(--grey-light); color: var(--text-light);
  text-transform: uppercase; letter-spacing: 0.3px; margin-right: 4px;
}

.qe-type-badge {
  display: inline-block; padding: 1px 6px; border-radius: 4px;
  font-size: 10px; font-weight: 500;
  background: var(--grey-light); color: var(--text-light);
  flex-shrink: 0;
}

/* Per-site targeting + label badges */
.qe-tag-badge {
  display: inline-block; padding: 1px 7px; border-radius: 4px;
  font-size: 10px; font-weight: 700;
  background: var(--red); color: #fff;
  text-transform: uppercase; letter-spacing: 0.3px; flex-shrink: 0;
}
.qe-site-badge {
  display: inline-block; padding: 1px 6px; border-radius: 4px;
  font-size: 10px; font-weight: 600; cursor: default;
  background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; flex-shrink: 0;
}

/* Question detail panel */
.qe-detail {
  background: var(--grey-light);
  border: 1px solid var(--grey-border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  padding: 10px 14px;
  margin: -6px 0 6px 0;
  font-size: 12px;
}
.qe-detail-condition {
  color: var(--text-light);
  font-style: italic;
  margin-bottom: 8px;
}
.qe-detail-variants { display: flex; flex-direction: column; gap: 6px; }
.qe-detail-variant { color: var(--text-mid); line-height: 1.4; }
.qe-detail-status {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  margin-right: 4px;
}
.qe-detail-status--green { background: var(--green-light); color: var(--green); }
.qe-detail-status--amber { background: var(--amber-light); color: var(--amber); }
.qe-detail-status--red { background: var(--red-light); color: var(--red); }
.qe-detail-status--neutral { background: var(--grey-light); color: var(--text-light); border: 1px solid var(--grey-border); }

.qe-move-select {
  font-size: 11px; padding: 4px 6px;
  border: 1px solid var(--grey-border); border-radius: 4px;
  background: white; color: var(--text-mid); max-width: 100px;
}

.qe-toggle {
  position: relative; display: inline-block;
  width: 36px; height: 20px; flex-shrink: 0;
}
.qe-toggle input { opacity: 0; width: 0; height: 0; }
.qe-toggle-slider {
  position: absolute; inset: 0;
  background: var(--grey-border); border-radius: 10px;
  cursor: pointer; transition: background 0.2s;
}
.qe-toggle-slider::before {
  content: ''; position: absolute; left: 2px; top: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: white; transition: transform 0.2s;
}
.qe-toggle input:checked + .qe-toggle-slider { background: var(--green); }
.qe-toggle input:checked + .qe-toggle-slider::before { transform: translateX(16px); }
.qe-gate-toggle { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.qe-toggle-cap { font-size: 11px; color: var(--text-mid); white-space: nowrap; }

/* ===== Responsive ===== */

@media (max-width: 768px) {
  .top-bar { padding: 0 16px; padding-top: var(--sat, env(safe-area-inset-top, 0px)); height: calc(48px + var(--sat, env(safe-area-inset-top, 0px))); }
  .nav-bar { padding: 0 12px; top: calc(48px + var(--sat, env(safe-area-inset-top, 0px))); }
  .logo-sub { display: none; }
  .nav-tab { padding: 10px 12px; font-size: 13px; }
  .user-pill span { display: none; }
  .week-bar { padding: 10px 16px; gap: 10px; }
  .week-label { font-size: 14px; min-width: auto; }
  .week-label small { font-size: 11px; }
  .admin-main { padding: 20px 16px; }
  .summary-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .site-grid { grid-template-columns: 1fr; }
  .deadline-banner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .deadline-timer { font-size: 22px; }
  .highlight-chips { gap: 8px; }
  .reports-wrap { padding: 20px 16px; }
  .rpt-summary { grid-template-columns: repeat(3, 1fr); }
  .rpt-date-row { flex-wrap: wrap; }
  .settings-wrap { padding: 20px 16px; }
  .sub-wrap { padding: 16px 12px; }
  .sub-header { flex-direction: column; }
  .sub-summary { flex-wrap: wrap; gap: 12px; }
  .sub-toggle { flex-wrap: wrap; }
  .sub-toggle-hint { width: 100%; margin-left: 0; margin-top: 4px; }
  .qe-q-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .qe-q-actions { align-self: flex-end; }
  .qe-move-select { max-width: 80px; }
}

@media (max-width: 480px) {
  .summary-row { grid-template-columns: 1fr; }
  .filter-chips { flex-wrap: wrap; }
}

/* ===== In-app Confirm Modal ===== */

.app-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  z-index: var(--z-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: background 0.15s ease;
}
.app-confirm-overlay.app-confirm-visible {
  background: rgba(0, 0, 0, 0.4);
}
.app-confirm {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  max-width: 380px;
  width: 100%;
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.app-confirm-overlay.app-confirm-visible .app-confirm {
  transform: scale(1);
  opacity: 1;
}
.app-confirm-msg {
  font-size: 15px;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 20px;
}
.app-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.app-confirm-cancel {
  background: none;
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-mid);
  transition: background 0.1s;
}
.app-confirm-cancel:hover { background: var(--grey-light); }
.app-confirm-ok {
  background: var(--red);
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  color: white;
  transition: background 0.1s;
}
.app-confirm-ok:hover { background: var(--red-dark); }
.app-confirm-ok:not(.danger) {
  background: var(--text);
}
.app-confirm-ok:not(.danger):hover { background: #333; }

/* ── Form Status Bar ── */
.form-status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 8px;
  margin: 0 24px 16px;
  font-size: 13px;
}
.form-status-label {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 10px;
  color: white;
  flex-shrink: 0;
}
.form-status-text { font-weight: 500; }
.form-status-bar.locked { background: #e3f2fd; color: #1565c0; }
.form-status-bar.locked .form-status-label { background: #1565c0; }
.form-status-bar.open { background: #e8f4e8; color: #2e7d32; }
.form-status-bar.open .form-status-label { background: #2e7d32; }
.form-status-bar.grace { background: #fff3e0; color: #e65100; }
.form-status-bar.grace .form-status-label { background: #e65100; }
.form-status-bar.closed { background: #fce4ec; color: #c62828; }
.form-status-bar.closed .form-status-label { background: #c62828; }

/* ── Three-phase deadline banner ── */
.deadline-banner.phase-locked {
  background: var(--white);
  border-color: var(--grey-border);
}
.deadline-banner.phase-locked .deadline-timer {
  background: var(--grey-light);
  color: var(--text-mid);
}
.deadline-banner.phase-open {
  background: var(--white);
  border-color: var(--grey-border);
}
.deadline-banner.phase-open .deadline-timer {
  background: #fef2f2;
  color: var(--red);
  border: 1px solid #fecaca;
}
.deadline-banner.phase-grace {
  background: #fffbeb;
  border-color: #f59e0b;
}
.deadline-banner.phase-grace .deadline-timer {
  background: #fff3e0;
  color: #e65100;
  border: 1px solid #ffcc80;
}
.deadline-banner.phase-grace .deadline-label { color: #e65100; }
.deadline-banner.phase-closed {
  background: var(--grey-light);
  border-color: var(--grey-border);
}
.deadline-banner.phase-closed .deadline-timer {
  background: transparent;
  color: var(--text-mid);
  font-size: 14px;
  padding: 0;
}
.deadline-summary { font-size: 14px; font-weight: 600; }

/* ===== Logs list ===== */

.logs-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.logs-subtitle {
  font-size: 12px;
  color: var(--text-mid);
  margin-top: 4px;
}
.log-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.log-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-mid);
  border: 1px dashed var(--grey-border);
  border-radius: var(--radius);
  background: var(--white);
}
.log-row {
  background: var(--white);
  border: 1px solid var(--grey-border);
  border-left: 3px solid var(--grey-border);
  border-radius: var(--radius);
  padding: 12px 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.log-row:hover { box-shadow: var(--shadow-sm); }
.log-row--good { border-left-color: #1f7a2e; }
.log-row--warn { border-left-color: #d89a00; }
.log-row--bad  { border-left-color: var(--red); }
.log-row-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.log-row-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}
.log-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-mid);
}

/* ============ Print (Save as PDF) ============
   Only applies when the user triggers window.print(). Hides app chrome
   (header, nav, buttons, toggles) and lays the submission out as a document:
   AI briefing at the top, then each section with its questions + answers.
   Keeps the rating badge and status pill but drops all interactive UI. */
@media print {
  @page { margin: 18mm 14mm 18mm 14mm; }

  body { background: #fff !important; color: #000 !important; }

  /* Kill the app's global chrome and any interactive controls. */
  .app-header, .main-nav, .site-header, .btn, button,
  #btn-print, #btn-back, #sub-ai-regen,
  .sub-toggle, .sub-toggle button,
  .sub-section-header .sub-section-toggle { display: none !important; }

  /* Expand content area, drop shadows / cards */
  .sub-wrap, .container, main, .page-wrap {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
  }

  /* Header block */
  .sub-header {
    display: block !important;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
    margin-bottom: 16px;
  }
  .sub-title { font-size: 22pt !important; margin: 0 0 4px !important; color: #000 !important; }
  .sub-meta { font-size: 10pt !important; color: #222 !important; }
  .sub-badges { margin-top: 8px !important; }
  .sub-badges .badge {
    display: inline-block;
    border: 1px solid #000;
    background: #fff !important;
    color: #000 !important;
    padding: 2px 8px;
    margin-right: 6px;
    font-size: 9pt;
    border-radius: 3px;
  }
  .sub-badges .badge-red { border-color: #8a1a1a !important; color: #8a1a1a !important; }
  .sub-badges .badge-green { border-color: #1f5f2a !important; color: #1f5f2a !important; }

  /* AI briefing */
  .sub-ai-summary {
    border: 1px solid #000 !important;
    background: #fafafa !important;
    padding: 12px 14px !important;
    margin-bottom: 18px !important;
    page-break-inside: avoid;
  }
  .sub-ai-summary-label { font-weight: 700; font-size: 10pt; letter-spacing: 0.04em; text-transform: uppercase; }
  .sub-ai-summary-body { font-size: 11pt !important; line-height: 1.5 !important; color: #000 !important; }
  .sub-ai-rating-line {
    font-size: 9.5pt !important;
    color: #000 !important;
    border-top: 1px solid #000 !important;
    margin-top: 8px !important;
    padding-top: 6px !important;
  }
  .sub-ai-summary-model, .sub-ai-summary-meta { display: none !important; }

  /* Totals row */
  .sub-summary {
    border: 1px solid #000 !important;
    padding: 8px 12px !important;
    margin-bottom: 18px !important;
    display: flex !important;
    gap: 24px !important;
  }
  .sub-summary-count { color: #000 !important; font-weight: 700; }

  /* Sections always expanded for print, regardless of on-screen collapse state */
  .sub-section,
  .sub-section--collapsed { display: block !important; page-break-inside: auto; }
  .sub-section--collapsed .sub-question { display: block !important; }
  .sub-section-header {
    background: #000 !important;
    color: #fff !important;
    padding: 6px 10px !important;
    margin: 14px 0 8px !important;
    font-size: 11pt !important;
    page-break-after: avoid;
  }
  .sub-section-header * { color: #fff !important; }
  .sub-section-num, .sub-section-label { color: #fff !important; }

  .sub-question {
    border-left: 3px solid #000 !important;
    padding: 6px 10px !important;
    margin: 6px 0 !important;
    page-break-inside: avoid;
    background: #fff !important;
  }
  .sub-question--green { border-left-color: #1f5f2a !important; }
  .sub-question--amber { border-left-color: #8a5a00 !important; }
  .sub-question--red { border-left-color: #8a1a1a !important; }

  .sub-question-text { font-weight: 600 !important; font-size: 10.5pt !important; color: #000 !important; margin-bottom: 4px !important; }
  .sub-answer-text, .sub-answer-num {
    font-size: 10.5pt !important;
    color: #000 !important;
    background: #f2f2f2 !important;
    border: none !important;
    padding: 4px 8px !important;
    white-space: pre-wrap;
  }

  /* Avoid link URLs bleeding into print output */
  a[href]:after { content: '' !important; }
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* Data Health redesign — strip + popover                                     */
/* ─────────────────────────────────────────────────────────────────────────── */

.dh-strip {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  background: #f7f7f7;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-bottom: 14px;
  font-size: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.dh-pill {
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 11px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.dh-pill--green   { background: #E1F5EE; color: #0F6E56; border-color: #B7E0CE; }
.dh-pill--amber   { background: #FAEEDA; color: #854F0B; border-color: #EBCEA0; }
.dh-pill--red     { background: #FCEBEB; color: #A32D2D; border-color: #ECC4C4; }
.dh-pill--neutral { background: #ececec; color: #555;    border-color: #d0d0d0; }
.dh-popover {
  position: absolute;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  max-width: 360px;
  z-index: 1000;
}

/* Data Health redesign — table */
.dh-table-wrap { overflow-x: auto; border: 1px solid #ddd; border-radius: 6px; background: #fff; }
.dh-table {
  width: 100%;
  min-width: 900px;            /* fall back to horizontal scroll on narrow screens */
  border-collapse: collapse;
  font-size: 12px;
  table-layout: fixed;         /* respect explicit column widths so header & data align */
}
.dh-th {
  background: #fafafa;
  padding: 8px 8px;
  text-align: left;
  font-weight: normal;
  color: #777;
  border-bottom: 1px solid #ddd;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Numeric column headers right-align so they sit over their data */
.dh-table thead th:not(:first-child) { text-align: right; }
.dh-th .dh-src-btn {
  background: none; border: none; cursor: pointer;
  padding: 1px 3px; border-radius: 3px;
  opacity: 0.6; font-size: 11px; vertical-align: middle;
}
.dh-th .dh-src-btn:hover { opacity: 1; background: #ececec; }
.dh-th .dh-src-btn--active { opacity: 1; background: #fff4d6; }
.dh-row { cursor: pointer; }
.dh-row:hover { background: #f9f9f9; }
.dh-row--error td { color: #A32D2D; background: #FCEBEB; cursor: default; }
.dh-site {
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
  font-weight: 600;
  white-space: nowrap;
}
.dh-num {
  padding: 8px 8px;
  border-bottom: 1px solid #eee;
  text-align: right;
  white-space: nowrap;
}
.dh-missing { color: #bbb; font-style: italic; }
.dh-green { background: #E1F5EE; color: #0F6E56; font-weight: 600; }
.dh-amber { background: #FAEEDA; color: #854F0B; font-weight: 600; }
.dh-red   { background: #FCEBEB; color: #A32D2D; font-weight: 600; }
.dh-chevron { color: #999; font-size: 10px; margin-right: 4px; transition: transform 0.15s; display: inline-block; }
.dh-row.dh-row--expanded .dh-chevron { transform: rotate(90deg); color: #555; }
.dh-warn { color: #A32D2D; font-weight: bold; }

/* Data Health redesign — expanded detail panel */
.dh-detail-panel { background: #fafafa; padding: 16px; border-bottom: 1px solid #eee; }
.dh-detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 12px; }
.dh-detail-col { background: #fff; border: 1px solid #e0e0e0; border-radius: 6px; padding: 12px; }
.dh-detail-col h5 { margin: 0 0 10px 0; font-size: 11px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }
.dh-detail-row { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; padding: 4px 0; border-bottom: 1px solid #f5f5f5; }
.dh-detail-row:last-child { border-bottom: none; }
.dh-detail-label { color: #555; }
.dh-detail-value { font-weight: 600; text-align: right; }
.dh-detail-meta { font-size: 10px; color: #888; margin-top: 8px; padding-top: 8px; border-top: 1px solid #f0f0f0; }
.dh-detail-warn {
  background: #FAEEDA; border: 1px solid #EBCEA0; color: #854F0B;
  padding: 8px 10px; border-radius: 4px; font-size: 11px; margin-bottom: 10px;
}
.dh-detail-status { font-size: 12px; color: #555; padding: 8px 12px; background: #fff; border: 1px solid #e0e0e0; border-radius: 4px; }
.dh-detail-status--green { background: #E1F5EE; border-color: #B7E0CE; color: #0F6E56; }
.dh-cmp-green { color: #0F6E56; font-size: 11px; }
.dh-cmp-amber { color: #854F0B; font-size: 11px; }
.dh-cmp-red   { color: #A32D2D; font-size: 11px; }

/* Monday Dash theme/tone pickers */
.md-picker-btn {
  padding: 6px 14px;
  margin-right: 6px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 18px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
}
.md-picker-btn.active {
  background: #C8102E;
  color: #fff;
  border-color: #C8102E;
}
.md-picker-btn:hover:not(.active) {
  background: #f5f5f5;
}

/* ---- Actions board ------------------------------------------------------ */
.actions-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.action-stat { background: #fff; border: 1px solid #e5ded9; border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.action-stat--alert .action-stat-num { color: #C8102E; }
.action-stat-num { font-size: 24px; font-weight: 700; font-family: 'Playfair Display', serif; }
.action-stat-label { font-size: 12px; color: #777; }
.actions-filters { display: flex; gap: 10px; margin-bottom: 14px; }
.actions-filters .input { max-width: 220px; }
.actions-filters #af-q { flex: 1; max-width: 320px; }
.actions-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e5ded9; border-radius: 10px; overflow: hidden; }
.actions-table th { text-align: left; font-size: 12px; color: #777; font-weight: 600; padding: 10px 12px; border-bottom: 1px solid #e5ded9; }
.actions-table td { padding: 10px 12px; font-size: 13px; border-bottom: 1px solid #f0ebe6; vertical-align: top; }
.actions-table tbody tr { cursor: pointer; }
.actions-table tbody tr:hover { background: #faf7f4; }
.actions-table-what { max-width: 380px; }
.actions-table-reason { display: block; margin-top: 4px; font-size: 12px; color: #8a7f76; line-height: 1.35; }
.action-chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.action-chip--open { background: #f0ebe6; color: #555; }
.action-chip--overdue { background: #C8102E; color: #fff; }
.action-chip--carried { background: #e9b949; color: #4a3b00; }
.action-chip--done { background: #5cad6a; color: #fff; }
.action-chip--dropped { background: #9a8f88; color: #fff; }

/* Search */
.actions-search { width: 100%; max-width: 420px; margin-bottom: 18px; }

/* Site tiles (overview) */
.actions-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.action-tile { text-align: left; background: #fff; border: 1px solid #e5ded9; border-radius: 12px; padding: 16px; cursor: pointer; display: flex; flex-direction: column; gap: 10px; font: inherit; transition: border-color .15s, box-shadow .15s, transform .05s; }
.action-tile:hover { border-color: #C8102E; box-shadow: 0 2px 10px rgba(200,16,46,.08); }
.action-tile:active { transform: translateY(1px); }
.action-tile.is-clear { background: #fbfaf8; }
.action-tile-name { font-size: 15px; font-weight: 700; }
.action-tile-open { display: flex; align-items: baseline; gap: 7px; }
.action-tile-num { font-size: 32px; font-weight: 700; font-family: 'Playfair Display', serif; line-height: 1; }
.action-tile.is-clear .action-tile-num { color: #8a7f76; }
.action-tile-lbl { font-size: 12px; color: #777; }
.action-tile-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.atile-chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.atile-chip.overdue { background: #C8102E; color: #fff; }
.atile-chip.carried { background: #fdf3d6; color: #7a5c00; }
.atile-chip.rate { background: #f0ebe6; color: #555; }
.atile-chip.done { background: #e7f3e9; color: #2f7a3d; }

/* Site drill-in */
.actions-back { background: none; border: none; color: #777; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px 0; margin-bottom: 6px; }
.actions-back:hover { color: #C8102E; }
.actions-site-name { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 700; margin: 0 0 14px; }
.actions-state-tabs { display: inline-flex; gap: 4px; background: #f0ebe6; border-radius: 10px; padding: 4px; margin-bottom: 16px; }
.actions-state-tab { background: none; border: none; font: inherit; font-size: 13px; font-weight: 600; color: #777; padding: 7px 16px; border-radius: 7px; cursor: pointer; }
.actions-state-tab:hover { color: #333; }
.actions-state-tab.on { background: #fff; color: #1a1a1a; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.actions-state-tab .cnt { font-weight: 700; margin-left: 2px; }

/* Action rows (search results + site list) */
.actions-list { display: flex; flex-direction: column; gap: 8px; }
.action-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; background: #fff; border: 1px solid #e5ded9; border-radius: 10px; padding: 13px 15px; cursor: pointer; transition: border-color .12s, background .12s; }
.action-row:hover { border-color: #c9bfb6; background: #faf7f4; }
.action-row-main { min-width: 0; }
.action-row-meta { font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.action-row-what { font-size: 14px; line-height: 1.4; }
.action-row-reason { margin-top: 5px; font-size: 12px; color: #8a7f76; line-height: 1.4; }
.action-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.action-row-age { font-size: 11px; color: #aaa; }

@media (max-width: 640px) {
  .actions-stats { grid-template-columns: repeat(2, 1fr); }
  .actions-tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
/* Drawer */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 90; }
.actions-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 92vw); background: #fff; z-index: 91; box-shadow: -8px 0 30px rgba(0,0,0,.15); display: flex; flex-direction: column; animation: drawer-in .18s ease-out; }
@keyframes drawer-in { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.actions-drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 18px 20px; border-bottom: 1px solid #e5ded9; }
.actions-drawer-site { font-size: 12px; color: #777; margin-bottom: 2px; }
.actions-drawer-title { font-weight: 600; font-size: 15px; }
.actions-drawer-meta { font-size: 12px; color: #777; margin-top: 6px; }
.actions-drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.actions-drawer-h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #777; }
.chain-hop { border-left: 2px solid #e5ded9; padding: 0 0 14px 14px; position: relative; }
.chain-hop::before { content: ''; position: absolute; left: -5px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: #C8102E; }
.chain-hop-week { font-size: 11px; color: #777; margin-bottom: 2px; }
.chain-hop-what { font-size: 13px; }
.chain-hop-res { font-size: 12px; margin-top: 3px; font-weight: 600; }
.chain-hop-res--done { color: #3c7d49; }
.chain-hop-res--dropped { color: #9a8f88; }
.chain-hop-res--carried { color: #a07c1c; }
.chain-hop-res--open { color: #C8102E; }
.chain-hop-coach { font-size: 12px; color: #777; margin-top: 2px; font-style: italic; }
.drawer-resolve { border-top: 1px solid #e5ded9; padding: 14px 20px; }
.drawer-resolve-btns { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
