/* AwardScout app shell
   Loaded after style.css. Tokens, layout, and shared controls. */

:root {
  --sidebar-width: 232px;
  --bg: #0b1120;
  --bg-dark: #0e1628;
  --surface: #152033;
  --surface-2: #1c2b42;
  --surface-3: #243652;
  --border: #314864;
  --border-dark: #4c6285;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-muted: rgba(59, 130, 246, 0.14);
  --accent-border: rgba(147, 197, 253, 0.35);
  --accent-text: #93c5fd;
  --text: #f8fafc;
  --text-secondary: #d5deea;
  --text-muted: #a8b6c9;
  --text-dim: #8fa0b8;
  --sidebar-text: #b7c3d4;
  --sidebar-text-hover: #f8fafc;
  --sidebar-text-active: #ffffff;
  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --text-xs: 13px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 15px;
  --text-lg: 17px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 32px;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 999px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --danger: #f0a8a8;
  --warning: #f3d19a;
  --success: #9dceb6;
}

body {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

/* ── Shell: only the sidebar and the main column share a row ── */
body {
  display: block;
}

.app-shell {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  min-height: 100vh;
}

.app-shell > .main-wrapper {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  max-width: none;
  margin-left: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-shell > .main-wrapper > .main-content {
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  min-width: 0;
}

.app-shell > .main-wrapper > .app-footer,
.app-shell > .main-wrapper > .footer {
  width: 100%;
  max-width: none;
}

@media (min-width: 769px) {
  .app-shell:has(.main-wrapper:not(.no-sidebar)) {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
  }

  .app-shell:has(.main-wrapper:not(.no-sidebar)) > .sidebar {
    position: sticky;
    top: 0;
    left: auto;
    flex: 0 0 var(--sidebar-width);
    width: var(--sidebar-width);
    height: 100vh;
    max-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    transform: none;
  }

  .app-shell:has(.main-wrapper:not(.no-sidebar)) > .main-wrapper {
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
  }
}

@media (max-width: 768px) {
  .app-shell {
    display: block;
    width: 100%;
    min-width: 0;
    overflow-x: clip;
  }

  .app-shell > .main-wrapper {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
  }
}

.app-footer {
  flex-shrink: 0;
  margin-top: auto;
  width: 100%;
  padding: 20px 32px 28px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  background: var(--bg);
}

.app-footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: center;
}

.app-footer a {
  color: var(--text-secondary);
  text-decoration: none;
}

.app-footer a:hover {
  color: var(--text);
}

/* Public agency pages only. Other app footers keep their own spacing. */
.app-footer.is-research {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-muted);
}
.app-footer.is-research .research-links,
.app-footer.is-research .app-footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  column-gap: 0.55rem;
  row-gap: 0.28rem;
  margin: 0;
}
.app-footer.is-research .research-links {
  margin-bottom: 0.2rem;
}
.app-footer.is-research .research-links > a,
.app-footer.is-research .app-footer-inner > span,
.app-footer.is-research .app-footer-inner > a {
  white-space: nowrap;
}
.app-footer.is-research a {
  display: inline;
  min-width: 0;
  min-height: 0;
  padding: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.app-footer.is-research .sep { display: none; }
.app-footer.is-research .research-links .sep { display: inline; }
@media (min-width: 520px) {
  .app-footer.is-research .app-footer-inner .sep { display: inline; }
}

.main-wrapper.no-sidebar .app-footer {
  display: none;
}

.radar-card .radar-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  margin-bottom: 4px;
}
.radar-card .radar-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.radar-card .radar-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--text-secondary);
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.radar-card .radar-title-row .for-you-all {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 44px;
  margin-left: 0;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}
.radar-card .radar-kicker {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.4;
  text-transform: none;
  white-space: nowrap;
}
.radar-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.radar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: inherit;
  text-decoration: none;
}
.radar-row:hover { border-color: var(--accent-border, rgba(37, 99, 235, 0.25)); }
.radar-name {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.radar-hold {
  color: var(--success, #10b981);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}
.radar-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  flex-basis: 100%;
  column-gap: 0.55rem;
  row-gap: 0.15rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.45;
}
.radar-meta > span { white-space: nowrap; }
.radar-meta .radar-sep { display: none; }
@media (min-width: 1100px) {
  .radar-meta .radar-sep { display: inline; }
}
.radar-empty {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.recompete-filters input,
.recompete-filters select,
.recompete-filters .btn {
  min-height: 44px;
}

.sidebar-logo-text,
.auth-logo-text {
  white-space: nowrap;
  letter-spacing: -0.03em;
}

.sidebar-logo-text {
  color: #f8fafc;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.sidebar-group-header {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin: 14px 0 4px;
  padding: 4px 10px;
  border: 0;
  background: transparent;
  color: #8fa0b8;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
}

.sidebar-group-links {
  overflow: hidden;
}

.sidebar-group-chevron {
  font-size: 10px;
  line-height: 1;
}

.sidebar-link {
  font-size: 14px;
  color: var(--sidebar-text);
}

.sidebar-link-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-upsell {
  margin: 8px 10px 12px;
  padding: 10px 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(59, 130, 246, 0.06);
}

.sidebar-upsell summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.sidebar-upsell summary::-webkit-details-marker {
  display: none;
}

.sidebar-upsell-title {
  flex: 1;
}

.sidebar-upsell-count {
  font-size: 12px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 0 7px;
  line-height: 18px;
}

.sidebar-upsell p {
  margin: 8px 0 6px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}

.sidebar-upsell-links .sidebar-link {
  padding-left: 8px;
}

.sidebar-upsell-cta {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  margin: 8px 8px 2px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-text);
}

.plan-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}

a.plan-chip {
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
}
a.plan-chip:hover {
  color: var(--text);
  border-color: var(--accent-border);
}

.plan-chip--pro {
  color: #c4b5fd;
  border-color: rgba(167, 139, 250, 0.35);
  background: rgba(139, 92, 246, 0.12);
}

.plan-chip--trial {
  color: #bfdbfe;
  border-color: rgba(147, 197, 253, 0.35);
  background: rgba(59, 130, 246, 0.12);
}

.sidebar-footer {
  display: flex;
  align-items: center;
}

/* ── Controls ── */
input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
select,
textarea,
.settings-field input,
.settings-section input,
.settings-section select,
.settings-section textarea,
.topbar-search-input {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  font-size: 14px;
  min-height: 38px;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-dim);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  box-shadow: 0 0 0 1000px var(--bg) inset;
  transition: background-color 9999s ease-out;
}

.btn,
.btn-primary,
.btn-secondary,
.btn-outline {
  font-size: 14px;
  border-radius: var(--radius);
}

.btn-sm,
.btn-xs {
  font-size: 13px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
}

.page-title {
  font-size: 24px;
  letter-spacing: -0.03em;
}

.page-subtitle,
.results-count,
.text-muted,
.text-secondary {
  color: var(--text-muted);
  font-size: 14px;
}

/* ── Compact filters and the results line ── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 12px;
}

.filter-bar .form-group {
  margin: 0;
  min-width: 0;
}

.filter-bar .filter-grow {
  flex: 2 1 220px;
  min-width: 180px;
}

.filter-bar .filter-field {
  flex: 1 1 112px;
  max-width: 168px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.filter-bar .filter-action {
  flex: 0 0 auto;
}

.filter-bar label,
.filter-bar .form-group label {
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  font-weight: 600;
}

.results-bar,
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.results-bar {
  margin: 4px 0 12px;
}

.results-bar p {
  margin: 0;
}

/* ── Tables: title takes the leftover width ── */
.table-scroll-container,
.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  min-width: 0;
  -webkit-overflow-scrolling: touch;
}

#opps-table,
.pipeline-desktop table,
.search-desktop-table table {
  width: 100%;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

#opps-table col.col-title,
.pipeline-desktop col.col-title,
.search-desktop-table col.col-title { width: 100%; }
#opps-table col.col-match { width: 132px; }
.pipeline-desktop col.col-match { width: 72px; }
/* Opportunities only. Search and pipeline keep the short 112px label column. */
#opps-table col.col-agency { width: 192px; }
.pipeline-desktop col.col-agency,
.search-desktop-table col.col-agency { width: 112px; }
#opps-table col.col-naics,
.pipeline-desktop col.col-naics,
.search-desktop-table col.col-naics { width: 88px; }
#opps-table col.col-posted,
.pipeline-desktop col.col-posted,
.search-desktop-table col.col-posted { width: 92px; }
#opps-table col.col-deadline { width: 124px; }
#opps-table col.col-amount,
.pipeline-desktop col.col-amount,
.search-desktop-table col.col-amount { width: 108px; }
.pipeline-desktop col.col-status { width: 128px; }
#opps-table col.col-actions { width: 56px; }
.pipeline-desktop col.col-actions,
.search-desktop-table col.col-actions { width: 52px; }

#opps-table th,
#opps-table td,
.pipeline-desktop th,
.pipeline-desktop td,
.search-desktop-table th,
.search-desktop-table td {
  vertical-align: middle;
  overflow: hidden;
  padding: 10px 12px;
}

/* One alignment for the whole opportunities row. Title and Agency already
   sat at the top; NAICS, Posted, Deadline, and the menu sat in the middle.
   The Match pill and the empty-score dash sit on that same top edge. */
#opps-table tbody td {
  vertical-align: top;
}

#opps-table td.cell-match {
  overflow: visible;
  padding-left: 8px;
  padding-right: 8px;
}
#opps-table td.cell-match .score-badge,
#opps-table td.cell-match .match-none {
  vertical-align: top;
}

#opps-table thead th,
.pipeline-desktop thead th,
.search-desktop-table thead th {
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  color: var(--text-secondary);
}

.cell-fit {
  white-space: nowrap;
}

.cell-agency,
.agency-short {
  white-space: nowrap;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Full agency names wrap inside the opportunities table. Width is taken
   from the title column; NAICS, Posted, and Deadline stay fixed. */
#opps-table td.cell-agency {
  min-width: 180px;
  overflow: visible;
  white-space: normal;
  overflow-wrap: break-word;
  vertical-align: top;
}

#opps-table .cell-agency-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: break-word;
  line-height: 1.35;
}

#opps-table tbody .cell-title,
.pipeline-desktop tbody .cell-title,
.search-desktop-table tbody .cell-title {
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-align: left;
  white-space: normal;
  vertical-align: top;
  overflow: hidden;
}

a.cell-title-link,
td a.cell-title-link {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.35;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
}

a.cell-title-link:hover,
td a.cell-title-link:hover {
  color: var(--accent-text);
  text-decoration: none;
}

/* Laptop widths were clamping titles after two lines. Three lines, and the
   Posted column steps aside below 1100px so the title can use that width. */
#opps-table .cell-title-link {
  -webkit-line-clamp: 3;
  hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
}

@media (max-width: 1099px) {
  #opps-table col.col-posted,
  #opps-table .col-posted {
    display: none;
  }
}

.cell-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.cell-meta span {
  max-width: 100%;
  padding: 1px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

td.cell-title .cell-sub {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.award-row[data-has-desc]::after,
.award-row[data-has-desc]:hover::after,
.award-row.desc-expanded::after {
  content: none;
}

.is-sticky {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface);
  box-shadow: 1px 0 0 var(--border);
}

thead .is-sticky {
  z-index: 3;
  background: var(--surface-2);
}

.deadline-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

td.opp-deadline,
td.opp-urgency-urgent,
td.opp-urgency-warm,
td.opp-urgency-ok,
td.opp-urgency-closed,
td.opp-urgency-hot,
td.opp-urgency-today {
  background: transparent;
  border: none;
  color: inherit;
}

.deadline-chip--urgent {
  color: #f0b4b4;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.22);
}

.deadline-chip--soon {
  color: #f3d19a;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.22);
}

.deadline-chip--ok {
  color: #9dceb6;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.22);
}

.deadline-chip--closed {
  color: var(--text-muted);
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.2);
}

.cell-actions,
.col-actions {
  width: 52px;
  min-width: 52px;
  text-align: right;
  overflow: visible;
}

/* The menu button is 32px. Cell padding is 12px on each side, so the
   opportunities actions column has to be 56px or the button spills out. */
#opps-table col.col-actions,
#opps-table td.cell-actions,
#opps-table th:last-child {
  width: 56px;
  min-width: 56px;
}

.row-menu {
  position: relative;
  display: inline-flex;
  justify-content: flex-end;
}

.row-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-secondary);
  cursor: pointer;
}

.row-menu-btn:hover,
.row-menu-btn[aria-expanded="true"] {
  color: var(--text);
  border-color: var(--border-dark);
}

.row-menu-panel {
  z-index: 40;
  min-width: 200px;
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.row-menu-panel[hidden] {
  display: none;
}

.row-menu-panel a,
.row-menu-panel button {
  display: flex;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}

.row-menu-panel a:hover,
.row-menu-panel button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.row-menu-panel form + form {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.row-menu-label {
  display: block;
  padding: 4px 10px 2px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.row-menu-panel select {
  width: calc(100% - 8px);
  margin: 0 4px 6px;
  min-height: 34px;
}

.row-menu-danger {
  color: #f0b4b4;
}

.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  padding: 2px 8px;
  border-radius: var(--radius-xl);
  font-size: 13px;
  font-weight: 650;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-secondary);
}

.score-badge.strong-match {
  color: #9dceb6;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.28);
}

.score-badge.good-match {
  color: #f3d19a;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.24);
}

.score-badge.low-match {
  color: var(--text-muted);
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.2);
}

.match-none {
  color: var(--text-muted);
  font-weight: 500;
}

.match-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(59, 130, 246, 0.06);
  color: var(--text-secondary);
  font-size: 14px;
}

.match-prompt a {
  flex-shrink: 0;
  font-weight: 600;
}

/* ── Empty, skeleton, 404 ── */
.empty-state-title {
  font-size: 18px;
  color: var(--text);
}

.empty-state-sub {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 46ch;
}

.not-found {
  max-width: 440px;
  margin: 48px auto;
  text-align: center;
}

.not-found-code {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.not-found h1 {
  margin: 8px 0;
  font-size: 32px;
  letter-spacing: -0.03em;
}

.not-found p {
  margin: 0 0 20px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.skel {
  display: none;
}

html.as-loading .skel {
  display: block;
}

html.as-loading .page-ready {
  display: none;
}

.skel-line,
.skel-block,
.skel-row {
  border-radius: 8px;
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: skel-shimmer 1.2s ease-in-out infinite;
}

.skel-line {
  height: 14px;
  margin-bottom: 10px;
}

.skel-line.w-40 { width: 40%; height: 28px; }
.skel-line.w-60 { width: 60%; }
.skel-block {
  height: 112px;
  margin: 16px 0;
}
.skel-row {
  height: 42px;
  margin-bottom: 8px;
}

.skel-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 20px;
}

.skel-stat {
  height: 92px;
  border-radius: 12px;
}

@keyframes skel-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.icon {
  display: block;
  flex-shrink: 0;
}

.password-toggle .icon-eye-off { display: none; }
.password-toggle.is-revealed .icon-eye { display: none; }
.password-toggle.is-revealed .icon-eye-off { display: block; }
.password-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.with-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  bottom: 20px;
}

@media (max-width: 900px) {
  .skel-stats { grid-template-columns: 1fr 1fr; }
  .match-prompt { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%) !important;
  }

  body.sidebar-open .sidebar,
  .sidebar-open .sidebar {
    transform: translateX(0) !important;
  }
}

/* Short notice types stay one line. Long set-aside tags may wrap. */
.cell-meta span.notice-type {
  white-space: nowrap;
  overflow: visible;
  text-overflow: unset;
  hyphens: none;
}
.cell-meta span.set-aside-tag {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  hyphens: none;
  overflow-wrap: break-word;
}
