/* ========== ADMIN SHELL ACCENT ========== */
.sidebar.admin { background: #2A2F42; }
.sidebar.admin .logo { background: var(--pam-peach); }
.sidebar.admin .tagline { color: var(--pam-peach); }
.sidebar.admin .nav-item.active { background: var(--pam-peach); color: var(--pam-navy); }
.sidebar.admin .user-avatar { background: var(--pam-peach); }
.admin-badge {
  display: inline-block; font-size: 10px; text-transform: uppercase; letter-spacing: 1.2px;
  background: var(--pam-peach); color: var(--pam-navy); padding: 3px 10px; border-radius: 100px;
  font-weight: 700; margin-left: 8px; vertical-align: middle;
}
.topbar-env {
  font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--text-muted); font-weight: 700;
}
.topbar-env::before { content: "●"; color: var(--pam-lime); margin-right: 6px; }

/* ========== KPI GRID ========== */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 28px; }
.kpi-card {
  background: var(--panel); border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow); border-top: 4px solid var(--pam-lavender);
  display: flex; flex-direction: column; gap: 6px; min-height: 120px;
}
.kpi-card.accent-lime { border-top-color: var(--pam-lime); }
.kpi-card.accent-peach { border-top-color: var(--pam-peach); }
.kpi-card.accent-coral { border-top-color: var(--pam-coral); }
.kpi-card.accent-cyan { border-top-color: var(--pam-skyblue); }
.kpi-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--text-muted); font-weight: 700; }
.kpi-value { font-family: 'Unbounded', sans-serif; font-size: 28px; font-weight: 700; color: var(--pam-navy); line-height: 1.1; }
.kpi-delta { font-size: 12px; color: var(--text-muted); margin-top: auto; }
.kpi-delta.up { color: #2F8F55; }
.kpi-delta.down { color: #C2483B; }

.kpi-progress { height: 8px; background: var(--bg); border-radius: 100px; overflow: hidden; margin-top: 6px; }
.kpi-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--pam-lime), var(--pam-skyblue)); border-radius: 100px; }
.kpi-progress.warn span { background: linear-gradient(90deg, var(--pam-yellow), var(--pam-peach)); }
.kpi-progress.danger span { background: linear-gradient(90deg, var(--pam-coral), #C2483B); }

/* ========== DOUBLE-COLUMN PANELS ========== */
.panel-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 28px; }
.panel-grid-3 { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 20px; margin-bottom: 28px; }
.panel {
  background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 22px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel-head h3 { margin: 0; font-family: 'Unbounded', sans-serif; }
.panel-head .btn-sm { margin-left: auto; }
.panel-sub { font-size: 12px; color: var(--text-muted); margin: -8px 0 14px; }

/* ========== BAR CHART (CSS) ========== */
.chart-bars { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding: 12px 0; border-bottom: 1px solid var(--border); overflow-x: clip; }
.chart-bars .bar {
  flex: 1; background: linear-gradient(180deg, var(--pam-lavender) 0%, var(--pam-skyblue) 100%);
  border-radius: 6px 6px 0 0; position: relative; cursor: pointer;
  transition: filter .15s;
  min-height: 4px;
}
.chart-bars .bar:hover { filter: brightness(0.9); }
.chart-bars .bar[data-highlight="true"] { background: linear-gradient(180deg, var(--pam-peach) 0%, var(--pam-coral) 100%); }
.chart-bars .bar-value {
  position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
  font-size: 11px; color: var(--pam-navy); font-weight: 700; opacity: 0;
  transition: opacity .15s;
}
.chart-bars .bar:hover .bar-value { opacity: 1; }
.chart-xlabels { display: flex; gap: 6px; margin-top: 8px; }
.chart-xlabels span { flex: 1; text-align: center; font-size: 11px; color: var(--text-muted); }

/* line chart (sparkline) */
.sparkline { width: 100%; height: 80px; display: block; }
.sparkline path { fill: none; stroke: var(--pam-teal); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sparkline .area { fill: var(--pam-lightblue); stroke: none; opacity: 0.6; }

/* ========== ADMIN TABLE ========== */
.admin-table-wrap { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 28px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table thead th {
  position: sticky; top: 0; background: var(--pam-lavender-10); color: var(--pam-navy);
  text-align: left; padding: 12px 16px; font-weight: 700; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.6px; border-bottom: 1px solid var(--border);
  cursor: pointer; user-select: none;
}
.admin-table thead th:hover { background: var(--pam-lavender); }
.admin-table thead th.sort-asc::after { content: " ▲"; font-size: 10px; color: var(--pam-teal); }
.admin-table thead th.sort-desc::after { content: " ▼"; font-size: 10px; color: var(--pam-teal); }
.admin-table tbody td { padding: 14px 16px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
.admin-table tbody tr { transition: background .15s; }
.admin-table tbody tr:hover { background: var(--pam-lavender-10); cursor: pointer; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table .numeric { text-align: right; font-variant-numeric: tabular-nums; }
.admin-table .row-name { font-weight: 500; color: var(--pam-navy); }
.admin-table .row-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.admin-table .small { font-size: 12px; }
.admin-table .compact td { padding: 10px 14px; }

/* inline progress for quota columns */
.progress-inline {
  display: flex; align-items: center; gap: 8px; min-width: 120px;
}
.progress-inline .track { flex: 1; height: 6px; background: var(--bg); border-radius: 100px; overflow: hidden; }
.progress-inline .track span { display: block; height: 100%; border-radius: 100px; background: var(--pam-lime); }
.progress-inline.warn .track span { background: var(--pam-yellow); }
.progress-inline.danger .track span { background: var(--pam-coral); }
.progress-inline .ratio { font-size: 11px; color: var(--text-muted); min-width: 40px; text-align: right; }

/* ========== BADGES ========== */
.badge {
  display: inline-block; font-size: 11px; padding: 3px 10px; border-radius: 100px;
  background: var(--bg); color: var(--text-muted); font-weight: 500; white-space: nowrap;
}
.stage-badge { background: var(--pam-lavender-10); color: var(--pam-navy); font-weight: 700; }
.stage-badge[data-stage="done"] { background: var(--pam-lime); color: #3D5F0F; }
.stage-badge[data-stage="early"] { background: var(--pam-lightblue); color: var(--pam-teal); }
.stage-badge[data-stage="mid"] { background: var(--pam-yellow); color: #7A5C00; }
.stage-badge[data-stage="late"] { background: var(--pam-peach); color: #7A3500; }

.status-badge.draft { background: var(--pam-yellow); color: #7A5C00; }
.status-badge.ready { background: var(--pam-lime); color: #3D5F0F; }
.status-badge.sent { background: var(--pam-skyblue); color: var(--pam-navy); }
.status-badge.frozen { background: var(--pam-coral); color: #fff; }

.tier-badge.ext { background: var(--pam-teal); color: #fff; }
.tier-badge.int { background: var(--pam-lavender); color: var(--pam-navy); }
.tier-badge.other { background: var(--bg); color: var(--text-muted); }

.hit-yes { color: #2F8F55; font-weight: 700; }
.hit-no { color: var(--text-muted); }

/* ========== TIMELINE ========== */
.timeline-v {
  position: relative; padding-left: 22px; display: flex; flex-direction: column; gap: 14px;
}
.timeline-v::before {
  content: ""; position: absolute; top: 4px; bottom: 4px; left: 6px; width: 2px;
  background: var(--border);
}
.timeline-v .item { position: relative; font-size: 13px; }
.timeline-v .item::before {
  content: ""; position: absolute; left: -20px; top: 4px; width: 10px; height: 10px;
  background: var(--pam-skyblue); border: 2px solid var(--panel); border-radius: 50%;
  box-shadow: 0 0 0 2px var(--pam-skyblue);
}
.timeline-v .item[data-kind="quota"]::before { background: var(--pam-coral); box-shadow: 0 0 0 2px var(--pam-coral); }
.timeline-v .item[data-kind="stage"]::before { background: var(--pam-lime); box-shadow: 0 0 0 2px var(--pam-lime); }
.timeline-v .item[data-kind="signup"]::before { background: var(--pam-lavender); box-shadow: 0 0 0 2px var(--pam-lavender); }
.timeline-v .item-time { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; }
.timeline-v .item-text { color: var(--text); }
.timeline-v .item-text strong { color: var(--pam-navy); }

.timeline-h {
  display: flex; gap: 0; overflow-x: auto; padding: 12px 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.timeline-h .item {
  flex-shrink: 0; min-width: 180px; padding: 6px 16px; border-right: 1px solid var(--border);
  font-size: 12px; position: relative;
}
.timeline-h .item:last-child { border-right: 0; }
.timeline-h .item-time { font-size: 11px; color: var(--text-muted); }
.timeline-h .item-text { color: var(--pam-navy); font-weight: 500; margin-top: 2px; }
.timeline-h .item::before {
  content: ""; position: absolute; top: 50%; left: 0; width: 8px; height: 8px; border-radius: 50%;
  background: var(--pam-skyblue); transform: translate(-50%, -50%);
}

/* ========== PARTNER TABS ========== */
.partner-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.partner-tab {
  padding: 8px 18px; border: 1.5px solid var(--border); border-radius: 100px;
  background: var(--panel); color: var(--text-muted); font-size: 13px;
  font-family: inherit; cursor: pointer; transition: all .15s; font-weight: 500;
}
.partner-tab:hover { border-color: var(--pam-navy); color: var(--pam-navy); }
.partner-tab.active { background: var(--pam-navy); color: #fff; border-color: var(--pam-navy); }

/* Star toggle & partner label */
.star-btn {
  background: none; border: none; cursor: pointer; font-size: 16px;
  padding: 2px 4px; border-radius: 4px; line-height: 1; vertical-align: middle;
  transition: transform .1s;
}
.star-btn:hover { transform: scale(1.25); }
.partner-label { font-size: 12px; vertical-align: middle; margin-left: 3px; }
.partner-label-yes { color: #C8860A; font-weight: 600; }
.partner-label-no { color: var(--text-muted); }

/* ========== INSTITUTIONS FILTERS ========== */
.filters-row {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px;
}
.filters-row .search-input { min-width: 280px; flex: 1; max-width: 360px; }
.select {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--panel); color: var(--text); font-family: inherit; font-size: 13px; cursor: pointer;
}
.select:focus { outline: none; border-color: var(--pam-lavender); }

/* ========== INSTITUTION DETAIL ========== */
.detail-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; }
.detail-grid.compact .profile-card,
.detail-grid.compact .actions-card { padding: 18px 20px; }

.profile-card {
  background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 24px; border-left: 4px solid var(--pam-skyblue);
}
.profile-card h3 { margin: 0 0 10px; font-family: 'Unbounded', sans-serif; }
.profile-card dl { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; margin: 0; font-size: 13px; }
.profile-card dt { color: var(--text-muted); font-size: 12px; }
.profile-card dd { margin: 0; color: var(--pam-navy); font-weight: 500; }

.actions-card {
  background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 24px; border-left: 4px solid var(--pam-peach);
  display: flex; flex-direction: column; gap: 10px;
}
.actions-card h3 { margin: 0 0 8px; font-family: 'Unbounded', sans-serif; }
.actions-card .action-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.actions-card .btn { justify-content: center; text-align: center; }
.actions-card .btn-danger { background: var(--pam-coral); color: #fff; }
.actions-card .btn-danger:hover { background: #D16A5E; }
.action-hint { font-size: 11px; color: var(--text-muted); margin: 0; }

/* stage cards grid on detail page */
.admin-stages {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
.stage-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 6px;
  border-left: 4px solid var(--border); min-height: 100px;
  transition: transform .15s, box-shadow .15s;
}
.stage-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stage-card.done    { border-left-color: var(--pam-lime); background: #F7FDEF; }
.stage-card.current { border-left-color: var(--pam-peach); background: var(--pam-lavender-10); }
.stage-card.pending { opacity: 0.7; }
.stage-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stage-card-num {
  width: 30px; height: 30px; border-radius: 50%; background: var(--pam-navy); color: #fff;
  display: grid; place-items: center; font-family: 'Unbounded', sans-serif; font-weight: 700; font-size: 13px;
}
.stage-card.done .stage-card-num { background: var(--pam-lime); color: #3D5F0F; }
.stage-card.current .stage-card-num { background: var(--pam-peach); color: var(--pam-navy); }
.stage-card-title { font-size: 13px; font-weight: 500; color: var(--pam-navy); line-height: 1.3; }
.stage-card-docs { font-size: 11px; margin-top: auto; }
.stage-card-status.done    { background: var(--pam-lime); color: #3D5F0F; }
.stage-card-status.current { background: var(--pam-peach); color: var(--pam-navy); }
.stage-card-status.pending { background: var(--bg); color: var(--text-muted); }

.timeline-more { margin-top: 14px; text-align: center; padding-top: 12px; border-top: 1px solid var(--border); }

/* two-row statuses inside stage-card (self + verified) */
.stage-card-statuses { display: flex; flex-direction: column; gap: 6px; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--border); }
.stage-card-row { display: grid; grid-template-columns: 56px 1fr; gap: 8px; align-items: center; font-size: 11px; }
.stage-card-row-label { color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 700; }

.stage-card-self.done     { background: var(--pam-lime);        color: #3D5F0F; }
.stage-card-self.current  { background: var(--pam-yellow);      color: #7A5C00; }
.stage-card-self.pending  { background: var(--bg);              color: var(--text-muted); }

.stage-card-verified.approved  { background: var(--pam-lime);        color: #3D5F0F; font-weight: 700; }
.stage-card-verified.submitted { background: var(--pam-peach);       color: var(--pam-navy); }
.stage-card-verified.changes   { background: var(--pam-coral);       color: #fff; }
.stage-card-verified.pending   { background: var(--bg);              color: var(--text-muted); }

/* ========== NAV PILL ========== */
.nav-pill {
  background: var(--pam-peach); color: var(--pam-navy);
  font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 100px;
  margin-left: auto; min-width: 18px; text-align: center;
}
.nav-item { justify-content: flex-start; }
.nav-item.active .nav-pill { background: var(--pam-navy); color: #fff; }

/* ========== SUBMISSIONS (A8) ========== */
.verdict-badge.approved  { background: var(--pam-lime);   color: #3D5F0F; font-weight: 700; }
.verdict-badge.submitted { background: var(--pam-peach);  color: var(--pam-navy); font-weight: 700; }
.verdict-badge.changes   { background: var(--pam-coral);  color: #fff; font-weight: 700; }
.verdict-badge.draft     { background: var(--pam-yellow); color: #7A5C00; font-weight: 700; }
.verdict-badge.pending   { background: var(--bg);         color: var(--text-muted); }

/* detail page */
.submission-header {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
  margin-bottom: 24px;
}
.submission-header h1 { margin: 0 0 6px; }
.submission-header-meta { text-align: right; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }

.submission-self-assessment {
  border-left: 4px solid var(--pam-skyblue);
}
.self-comment {
  margin: 0; font-size: 15px; line-height: 1.55; color: var(--pam-navy);
  white-space: pre-wrap;
}

/* ========== ARTIFACTS ========== */
.artifacts-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px;
  margin-bottom: 8px;
}
.artifact-tile {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px; display: grid; grid-template-columns: 40px 1fr auto; gap: 12px;
  align-items: center; border-left: 4px solid var(--border);
  transition: border-color .15s, box-shadow .15s;
}
.artifact-tile:hover { box-shadow: var(--shadow); }
.artifact-tile[data-kind="file"] { border-left-color: var(--pam-teal); }
.artifact-tile[data-kind="link"] { border-left-color: var(--pam-lavender); }
.artifact-tile[data-kind="doc"]  { border-left-color: var(--pam-peach); }
.artifact-icon {
  font-size: 24px; width: 40px; height: 40px; display: grid; place-items: center;
  background: var(--bg); border-radius: var(--radius-sm);
}
.artifact-body { min-width: 0; }
.artifact-title { font-weight: 500; color: var(--pam-navy); font-size: 14px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.artifact-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ========== REVIEW THREAD ========== */
.review-thread { display: flex; flex-direction: column; gap: 14px; }
.thread-item {
  padding: 14px 16px; border-radius: var(--radius-sm); background: var(--bg);
  border-left: 4px solid var(--pam-skyblue);
}
.thread-item[data-author="pam"] { background: var(--pam-lavender-10); border-left-color: var(--pam-lavender); }
.thread-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 12px;
  flex-wrap: wrap;
}
.thread-author { font-weight: 700; color: var(--pam-navy); }
.thread-text { font-size: 13px; color: var(--text); line-height: 1.5; white-space: pre-wrap; }

/* ========== REVIEW FORM ========== */
.review-form {
  display: flex; flex-direction: column; gap: 12px;
}
.review-textarea {
  width: 100%; min-height: 110px; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-family: inherit; font-size: 14px; color: var(--text);
  line-height: 1.5; resize: vertical;
}
.review-textarea:focus { outline: none; border-color: var(--pam-lavender); box-shadow: 0 0 0 3px var(--pam-lavender-10); }
.review-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn-approve { background: var(--pam-lime); color: #3D5F0F; font-weight: 700; }
.btn-approve:hover { background: #ACDB4E; }
.btn-return { background: var(--pam-coral); color: #fff; font-weight: 500; }
.btn-return:hover { background: #D16A5E; }

/* ========== REVIEW ATTACHMENTS ========== */
.review-attach { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.attach-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border: 1px dashed var(--pam-lavender); border-radius: var(--radius-sm);
  background: var(--pam-lavender-10); color: var(--pam-navy);
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.attach-btn:hover { background: var(--pam-lavender); border-color: var(--pam-lavender); }
.attach-hint { font-size: 11px; }

.review-attachments { display: flex; flex-direction: column; gap: 6px; }
.review-attachments:empty { display: none; }

.attachment-chip {
  display: grid; grid-template-columns: 28px 1fr auto auto; gap: 10px; align-items: center;
  padding: 8px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 13px;
}
.attachment-chip.readonly { grid-template-columns: 28px 1fr auto; }
.attachment-icon { font-size: 18px; text-align: center; }
.attachment-name { color: var(--pam-navy); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-size { color: var(--text-muted); font-size: 11px; }
.attachment-remove {
  border: 0; background: transparent; color: var(--text-muted);
  cursor: pointer; font-size: 14px; padding: 2px 6px; border-radius: 4px;
}
.attachment-remove:hover { background: var(--pam-coral); color: #fff; }

/* thread attachments (read-only, inside комментаря) */
.thread-attachments { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }

/* ========== SETTINGS ========== */
.settings-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.settings-panel {
  background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 26px;
}
.settings-panel h3 { margin: 0 0 4px; font-family: 'Unbounded', sans-serif; }
.settings-panel .sub { font-size: 12px; color: var(--text-muted); margin-bottom: 18px; }
.settings-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.settings-row label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-muted); font-weight: 500; }
.settings-row input { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: inherit; font-size: 14px; color: var(--text); }
.settings-row input:focus { outline: none; border-color: var(--pam-lavender); box-shadow: 0 0 0 3px var(--pam-lavender-10); }

.prompt-tabs { display: flex; gap: 4px; background: var(--bg); padding: 4px; border-radius: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.prompt-tabs .tab { flex: 0 0 auto; padding: 8px 16px; font-size: 12px; }
.prompt-tabs .tab.active { background: var(--panel); color: var(--pam-navy); box-shadow: var(--shadow); }
.prompt-textarea {
  width: 100%; min-height: 180px; padding: 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-family: 'Consolas', 'Monaco', monospace; font-size: 13px;
  color: var(--text); line-height: 1.55; resize: vertical;
}
.prompt-textarea:focus { outline: none; border-color: var(--pam-lavender); box-shadow: 0 0 0 3px var(--pam-lavender-10); }
.prompt-meta { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 12px; color: var(--text-muted); flex-wrap: wrap; }
.prompt-meta .btn-sm { margin-left: auto; }

.keys-list { display: flex; flex-direction: column; gap: 10px; }
.key-row {
  display: grid; grid-template-columns: 160px 1fr auto; gap: 14px; align-items: center;
  padding: 12px 14px; background: var(--bg); border-radius: var(--radius-sm);
  font-family: 'Consolas', 'Monaco', monospace; font-size: 13px;
}
.key-row .key-label { font-family: 'Roboto', sans-serif; color: var(--text-muted); font-size: 12px; }

.per-institution-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.per-institution-table th,
.per-institution-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.per-institution-table th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-muted); }
.per-institution-table input { width: 90px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; font-family: inherit; font-size: 13px; text-align: right; }

/* domain textareas */
.domain-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.domain-grid textarea {
  width: 100%; min-height: 100px; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-family: 'Consolas', 'Monaco', monospace; font-size: 13px; resize: vertical;
}

/* ========== BUTTONS (admin-specific) ========== */
.btn-peach { background: var(--pam-peach); color: var(--pam-navy); }
.btn-peach:hover { background: #FF9748; }
.btn-teal { background: var(--pam-teal); color: #fff; }
.btn-teal:hover { background: #0D6582; }

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* ========== UTILS ========== */
.spacer-24 { height: 24px; }
.row-split { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.row-split h2 { margin: 0; }
.muted { color: var(--text-muted); font-size: 12px; }

/* ========== RESPONSIVE ========== */
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .panel-grid-2, .panel-grid-3 { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .settings-row { grid-template-columns: 1fr; }
  .domain-grid { grid-template-columns: 1fr; }
  .key-row { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .filters-row .search-input { max-width: 100%; }
  .admin-table { font-size: 12px; }
  .admin-table tbody td { padding: 10px 10px; }
}
