/* Shared presentation for the 12 refreshed views; intentionally isolated from the editor and other dashboard pages. */
.module-refresh, .refresh-dialog {
  --refresh-gap: 20px;
  --refresh-pad: clamp(16px, 2.4vw, 24px);
  --refresh-danger: #ff8588;
  --refresh-success: #65dc91;
  --refresh-warning: #f6ca78;
}
html[data-theme="light"] :is(.module-refresh, .refresh-dialog) {
  --refresh-danger: #b4232a;
  --refresh-success: #16743c;
  --refresh-warning: #8d5700;
}
.dashboard-main.module-refresh {
  display: flex;
  flex-direction: column;
  gap: var(--refresh-gap);
  min-width: 0;
  container-type: inline-size;
}
.module-refresh > :is(.notice, .state-empty, .card-grid),
.module-refresh .refresh-results > :is(.state-empty, .twitter-grid, .suggest-grid, .case-filters),
.module-refresh .refresh-notification-forms,
.module-refresh .dash-form { margin: 0; }
.module-refresh .refresh-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 4px 0 8px;
}
.module-refresh .refresh-page-icon,
.module-refresh .refresh-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--accent-soft-border);
  border-radius: 13px;
  background: var(--accent-soft-bg);
  color: var(--accent-soft-text);
  flex: 0 0 auto;
}
.module-refresh .refresh-page-icon svg,
.module-refresh .refresh-card-icon svg { width: 23px; height: 23px; }
.module-refresh .refresh-heading { min-width: 0; }
.module-refresh .refresh-heading h1 {
  margin: 0;
  font-size: clamp(23px, 2.4vw, 30px);
  line-height: 1.2;
  color: var(--text-heading);
  overflow-wrap: anywhere;
}
.module-refresh .refresh-heading .meta { margin: 6px 0 0; line-height: 1.55; color: var(--text-muted); }
.module-refresh .refresh-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  padding: var(--refresh-pad);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin: 0;
}
.module-refresh .refresh-panel > h2,
.module-refresh .refresh-panel > h3 {
  font-size: 19px;
  line-height: 1.35;
  color: var(--text-heading);
  border: 0;
  padding: 0 0 12px;
  margin: 0;
  border-bottom: 1px solid var(--border);
  overflow-wrap: anywhere;
}
.module-refresh .refresh-form-stack { display: flex; flex-direction: column; gap: var(--refresh-gap); }
.module-refresh .refresh-panel > .hint { margin: 0 !important; line-height: 1.55; }
.module-refresh .dash-field, .refresh-dialog .dash-field { gap: 7px; min-width: 0; }
.module-refresh .dash-field > label:not(.toggle-switch), .refresh-dialog .dash-field > label:not(.toggle-switch) { font-size: .9rem; line-height: 1.4; }
.module-refresh .dash-field .hint, .refresh-dialog .dash-field .hint { font-size: .83rem; line-height: 1.5; overflow-wrap: anywhere; }
.module-refresh .dash-field :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea),
.refresh-dialog .dash-field :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea),
.module-refresh .case-filters :is(input,select) {
  min-width: 0;
  min-height: 44px;
  padding-block: 10px;
  color: var(--text-normal);
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 9px;
  font: inherit;
  font-size: .9rem;
}
.module-refresh .dash-field textarea, .refresh-dialog .dash-field textarea { min-height: 140px; }
.module-refresh :is(input, select, textarea):focus-visible,
.refresh-dialog :is(input, select, textarea):focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.module-refresh .dash-checkbox, .refresh-dialog .dash-checkbox {
  padding: 13px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.module-refresh .toggle-switch, .refresh-dialog .toggle-switch { position: relative; min-width: 0; width: 100%; align-items: center; }
/* Keep the actual checkbox accessible to keyboard users rather than display:none. */
.module-refresh .toggle-switch input[type="checkbox"], .refresh-dialog .toggle-switch input[type="checkbox"] {
  display: block; position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; overflow: hidden;
}
.module-refresh .toggle-switch input:focus-visible + .slider,
.refresh-dialog .toggle-switch input:focus-visible + .slider { outline: 2px solid var(--accent); outline-offset: 3px; }
.module-refresh .toggle-label, .refresh-dialog .toggle-label { min-width: 0; line-height: 1.4; overflow-wrap: anywhere; }
.module-refresh .dash-actions, .refresh-dialog .dash-actions { margin: auto 0 0; padding: 14px 0 0; border-top: 1px solid var(--border); gap: 10px; justify-content: flex-end; }
.module-refresh .refresh-form-footer { margin: 0; padding: 12px var(--refresh-pad); background: var(--bg-primary); border: 1px solid var(--border); border-radius: 12px; }
.module-refresh .back-button, .refresh-dialog .back-button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; }
.module-refresh :is(button, a):focus-visible, .refresh-dialog :is(button,a):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.module-refresh .refresh-general-form > .dash-field + .dash-field { border-top: 1px solid var(--border); padding-top: 16px; }
.module-refresh.refresh-general .refresh-general-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 14px var(--refresh-pad);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.module-refresh.refresh-general .refresh-general-notice-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--accent-soft-border);
  border-radius: 9px;
  background: var(--accent-soft-bg);
  color: var(--accent-soft-text);
}
.module-refresh.refresh-general .refresh-general-notice-icon svg { width: 20px; height: 20px; }
.module-refresh.refresh-general .refresh-general-notice-content { flex: 1; min-width: 0; }
.module-refresh.refresh-general .refresh-general-notice-content strong {
  display: block;
  margin: 0 0 4px;
  color: var(--text-heading);
  font-size: .9rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.module-refresh.refresh-general .refresh-general-notice-content p {
  margin: 0;
  color: var(--text-muted);
  font-size: .85rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.module-refresh .roles-selected:empty { display: none; }
.module-refresh .refresh-notification-forms { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--refresh-gap); }
@container (min-width: 780px) {
  .module-refresh .refresh-notification-forms { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
}
.module-refresh .twitter-grid, .module-refresh .suggest-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.module-refresh :is(.twitter-card,.suggest-card) { min-width: 0; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.module-refresh .twitter-card-header { align-items: center; gap: 12px; flex-wrap: wrap; }
.module-refresh .twitter-card-info { flex: 1 1 150px; min-width: 0; }
.module-refresh .twitter-card-info strong { overflow-wrap: anywhere; }
.module-refresh .twitter-card-channel { max-width: 100%; font-family: inherit; padding: 5px 8px; border-radius: 6px; overflow-wrap: anywhere; }
.module-refresh .twitter-card-actions { gap: 8px; margin-left: auto; }
.module-refresh .twitter-card-actions form { display: flex; }
.module-refresh .btn-icon, .refresh-dialog .btn-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; background: var(--bg-modifier); border: 1px solid var(--border); color: var(--text-normal); }
.module-refresh .btn-icon svg { width: 18px; height: 18px; }
.module-refresh .btn-icon:hover, .refresh-dialog .btn-icon:hover { background: var(--bg-hover); border-color: var(--accent); }
.module-refresh .btn-icon.danger, .module-refresh .message-delete-button { color: var(--refresh-danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.module-refresh .btn-icon.danger:hover, .module-refresh .message-delete-button:hover { background: color-mix(in srgb, var(--danger) 12%, var(--bg-secondary)); border-color: var(--danger); }
.module-refresh .suggest-header { gap: 8px; flex-wrap: wrap; }
.module-refresh .suggest-status { border-radius: 999px; padding: 5px 9px; white-space: normal; }
.module-refresh .status-approved { color: var(--refresh-success); }
.module-refresh .status-rejected { color: var(--refresh-danger); }
.module-refresh .status-closed { color: var(--refresh-warning); }
.module-refresh .status-reviewing { color: var(--text-link); }
.module-refresh .status-implemented { color: var(--accent-soft-text); background: var(--accent-soft-bg); }
.module-refresh .suggest-votes { align-items: center; flex-wrap: wrap; gap: 8px; }
.module-refresh .vote-stat { padding: 5px 8px; border-radius: 7px; background: var(--bg-modifier); }
.module-refresh .pagination { margin: 0; padding-top: 12px; gap: 10px; flex-wrap: wrap; }
.module-refresh .state-empty { background: var(--bg-secondary); margin: 0; padding: 24px 16px; line-height: 1.5; }
.refresh-dialog { width: min(480px, calc(100% - 28px)); max-width: none; max-height: calc(100dvh - 28px); overflow: auto; border-radius: 14px; padding: var(--refresh-pad); }
.refresh-dialog .dash-form { gap: 16px; }
.refresh-dialog .dialog-header { margin: 0; padding: 0 0 12px; gap: 12px; }
/* Messages list (not the message editor). */
.module-refresh .messages-header { align-items: center; gap: 16px; margin: 0; flex-wrap: wrap; }
.module-refresh .messages-header .refresh-hero { padding: 4px 0; }
.module-refresh .messages-toolbar { margin: 0; padding: 12px 16px; background: var(--bg-primary); border: 1px solid var(--border); border-radius: 10px; }
.module-refresh .messages-toolbar .meta { margin: 0; }
.module-refresh .messages-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.module-refresh .message-list-card { background: var(--bg-primary); padding: 18px; border-radius: 14px; min-height: 0; }
.module-refresh .message-card-title-row { flex-wrap: wrap; gap: 10px; }
.module-refresh .message-card-title-content { flex: 1 1 160px; }
.module-refresh .message-card-title-content .card-title { font-size: 1.05rem; font-weight: 700; text-transform: none; letter-spacing: 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }
.module-refresh .message-type-badge.v2 { color: var(--accent-soft-text); background: var(--accent-soft-bg); border-color: var(--accent-soft-border); }
.module-refresh .message-publication-badge { color: var(--refresh-success); background: color-mix(in srgb, var(--success) 9%, var(--bg-primary)); }
.module-refresh .message-card-preview { display: block; text-align: left; margin: 14px 0; padding: 14px; min-height: 84px; max-height: 160px; overflow: auto; background: var(--bg-secondary); color: var(--text-normal); border: 1px solid var(--border); border-radius: 9px; }
.module-refresh .message-card-preview-empty { opacity: 1; color: var(--text-muted); font-style: italic; }
.module-refresh .message-card-footer { gap: 12px; padding-top: 14px; }
.module-refresh .message-card-actions { flex-wrap: wrap; gap: 8px; }
.module-refresh .message-card-actions > :is(a,form) { flex: 1 1 105px; }
.module-refresh .messages-empty { background: var(--bg-primary); border: 1px dashed var(--border); border-radius: 14px; min-height: 260px; padding: 24px 16px; }
/* Moderation summary and case table stay usable on narrow viewports. */
.module-refresh.refresh-moderation .card-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; }
.module-refresh.refresh-moderation .card-grid .card { background: var(--bg-primary); padding: 16px; gap: 8px; min-width: 0; }
.module-refresh.refresh-moderation .card-grid .card-title { margin: 0; }
.module-refresh.refresh-moderation .card-value { font-size: 26px; font-variant-numeric: tabular-nums; }
.module-refresh.refresh-moderation .card-hint { margin: 0; }
.module-refresh .case-filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.module-refresh .case-filters input { flex: 1 1 200px; }
.module-refresh .case-filters select { flex: 1 1 135px; max-width: 100%; }
.module-refresh #moderation-results { min-width: 0; }
.module-refresh .case-table-wrap { width: 100%; max-width: 100%; }
.module-refresh .case-table { min-width: 660px; }
.module-refresh .case-table tbody tr:hover { background: var(--bg-modifier); }
.module-refresh .case-code { overflow-wrap: anywhere; }
/* Public support and live status. */
.public-refresh { display: flex; flex-direction: column; gap: var(--refresh-gap); max-width: 1040px; padding: clamp(16px,4vw,40px) 16px; }
.public-refresh .status-header { text-align: left; margin: 0; padding: var(--refresh-pad); border: 1px solid var(--border); border-radius: 14px; background: var(--bg-secondary); }
.public-refresh .status-header h1 { margin: 0 0 8px; font-size: clamp(25px,3vw,34px); }
.public-refresh .status-header p { color: var(--text-muted); line-height: 1.55; margin: 0; }
.public-refresh .status-header .landing-eyebrow { color: var(--accent-soft-text); margin-bottom: 8px; }
.public-refresh .status-grid, .public-refresh .status-system-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px),1fr)); gap: 16px; margin: 0; }
/* Support: compact action cards and a separate checklist; other public pages are unchanged. */
.public-refresh.refresh-support { max-width: 1240px; container-type: inline-size; }
.public-refresh.refresh-support .support-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.public-refresh.refresh-support .support-grid .status-card { padding: 16px; gap: 10px; }
.public-refresh.refresh-support .support-grid .refresh-card-icon { width: 40px; height: 40px; border-radius: 10px; }
.public-refresh.refresh-support .support-grid .refresh-card-icon svg { width: 20px; height: 20px; }
.public-refresh.refresh-support .support-grid h2 { font-size: 1rem; line-height: 1.35; }
.public-refresh.refresh-support .support-grid p { font-size: .86rem; line-height: 1.5; overflow-wrap: anywhere; }
.public-refresh.refresh-support .support-card-actions { padding-top: 6px; }
.public-refresh.refresh-support .support-card-actions .back-button { min-height: 42px; padding: 8px 10px; font-size: .83rem; white-space: normal; line-height: 1.3; }
.public-refresh.refresh-support .support-report-tips { padding: 16px; gap: 10px; }
.public-refresh.refresh-support .support-report-tips h2 { font-size: .95rem; }
.public-refresh.refresh-support .support-report-tips .refresh-support-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 18px; padding: 0; margin: 0; list-style: none; font-size: .85rem; line-height: 1.5; }
.public-refresh.refresh-support .support-report-tips li { position: relative; padding-left: 16px; margin: 0; overflow-wrap: anywhere; }
.public-refresh.refresh-support .support-report-tips li::before { content: ''; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
@container (min-width: 980px) {
  .public-refresh.refresh-support .support-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@container (max-width: 560px) {
  .public-refresh.refresh-support .support-grid,
  .public-refresh.refresh-support .support-report-tips .refresh-support-list { grid-template-columns: minmax(0, 1fr); }
}
.public-refresh .status-card { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: var(--refresh-pad); box-shadow: none; border-radius: 14px; }
.public-refresh .status-card h2 { margin: 0; padding: 0; border: 0; font-size: 19px; line-height: 1.35; }
.public-refresh .status-card p { color: var(--text-muted); font-size: .93rem; line-height: 1.6; margin: 0; }
.public-refresh .refresh-support-list { padding-left: 20px; color: var(--text-muted); line-height: 1.65; }
.public-refresh .support-card-actions { padding-top: 4px; margin-top: auto; }
.public-refresh .status-card-header { gap: 10px; flex-wrap: wrap; }
.public-refresh .refresh-service-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.public-refresh .status-name { overflow-wrap: anywhere; }
.public-refresh .status-badge { white-space: normal; }
.public-refresh .status-badge.operational { color: var(--refresh-success); }
.public-refresh .status-badge.down { color: var(--refresh-danger); }
.public-refresh .status-badge .status-dot { flex-shrink: 0; }
.public-refresh .status-card-body { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--border); }
.public-refresh .status-card-body strong { font-size: 1.25rem; color: var(--text-heading); font-variant-numeric: tabular-nums; }
.public-refresh .refresh-metrics { background: var(--bg-secondary); }
.public-refresh .status-system-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px),1fr)); gap: 12px; }
.public-refresh .sys-metric { min-width: 0; background: var(--bg-primary); border: 1px solid var(--border); box-shadow: none; padding: 16px; border-radius: 10px; }
.public-refresh .sys-value { overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
  .module-refresh { --refresh-gap: 14px; --refresh-pad: 14px; }
  .dashboard-main.module-refresh { padding: 14px; }
  .module-refresh .refresh-hero { gap: 10px; align-items: flex-start; }
  .module-refresh .refresh-page-icon, .module-refresh .refresh-card-icon { width: 40px; height: 40px; border-radius: 10px; }
  .module-refresh .refresh-page-icon svg, .module-refresh .refresh-card-icon svg { width: 20px; height: 20px; }
  .module-refresh .dash-actions > .back-button, .refresh-dialog .dash-actions > .back-button { flex: 1 1 100%; }
  .module-refresh .messages-header .messages-create-form, .module-refresh .messages-header .messages-create-button { width: 100%; }
  .module-refresh .case-filters :is(input,select) { flex: 1 1 100%; width: 100%; }
  .module-refresh .case-filters .back-button { flex: 1; }
  .module-refresh .pagination .back-button { min-height: 40px; }
  .public-refresh .status-header { padding: 16px; }
  .public-refresh.refresh-support .support-grid, .public-refresh.refresh-support .support-report-tips .refresh-support-list { grid-template-columns: minmax(0, 1fr); }
}

.module-refresh.refresh-suggestions .suggestion-web-link a.suggestion-web-open { cursor: pointer; text-decoration: none; }
.module-refresh.refresh-suggestions .suggestion-web-link a.suggestion-web-open:hover { border-color: var(--accent); background: var(--bg-hover); }
@container (min-width: 800px) {
  .module-refresh.refresh-suggestions .suggest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (max-width: 799px) {
  .module-refresh.refresh-suggestions .suggest-grid { grid-template-columns: minmax(0, 1fr); }
}
