/*
 * style.css — MIMH Abstract Review System
 * Version: 1.11.0 (2026-10-30)
 *   1.11.0 — "1.11.0" block at the END: download bars (.export-bar, .export-stack).
 *   1.10.0 — "1.10.0" block at the END: assignment grid + expertise grid (.grid-scroll, .assign-grid,
 *           .grid-cell--on/--no/--warn, sticky first column), tiny number input, legend keys.
 *           ⚠️ The grids are data-nocards tables: the phone rule ".data-table:not(.js-cards) td {display:block}"
 *           is undone for .assign-grid so they stay grids and scroll inside their own box (stated exception).
 *   1.9.0 — "1.9.0" block at the END: Preview-as amber bar, word-limit warning (.is-over), Review & submit
 *           buttons, conference cards + landing page, copy-link row, email preview frame, plain lists;
 *           button rows wrap on phones.
 *   1.8.0 — Playbook 3.7 §19/§20: phone menu (U-01), Email ▾ / Admin ▾ nav groups, phone card layout
 *           for tables (< 640px), sortable headers + phone "Sort by" bar, 16px form inputs (no iOS
 *           zoom), 44px touch targets on touch screens, Sending & limits page (gauge, kpis).
 *           All new rules are in the "1.8.0" block at the END of this file.
 *   1.7.0 — S-16: every former inline style="" now lives here (components + generated u-*
 *           utilities at the end). The CSP no longer allows inline styles. Reports print
 *           rules moved here, scoped to body.page-reports.
 * Clean, professional UI inspired by minimal academic conference portals.
 * Uses CSS custom properties for easy theming.
 * No external dependencies — all self-contained.
 */

/* ===========================================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   =========================================================== */
:root {
    /* Brand colours */
    --primary:        #1a3a5c;   /* Deep navy — primary actions, header */
    --primary-hover:  #14304d;
    --primary-light:  #e8eef5;   /* Tinted background for highlights */
    --accent:         #2e7bbf;   /* Mid-blue — links */
    --danger:         #c0392b;   /* Red — destructive actions, errors */
    --danger-light:   #fdf0ef;
    --success:        #1e7e34;
    --success-light:  #edf7ee;
    --warning:        #856404;
    --warning-light:  #fff8e1;
    --info:           #0c5460;
    --info-light:     #d1ecf1;

    /* Neutrals */
    --text:           #1a1a1a;
    --text-muted:     #6b7280;
    --border:         #d1d5db;
    --border-light:   #e5e7eb;
    --bg:             #f3f4f6;
    --bg-white:       #ffffff;
    --bg-alt:         #f9fafb;

    /* Typography */
    --font:           -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono:      'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    --text-sm:        0.875rem;
    --text-xs:        0.75rem;
    --line-height:    1.6;

    /* Spacing */
    --space-xs:  4px;
    --space-sm:  8px;
    --space-md:  16px;
    --space-lg:  24px;
    --space-xl:  32px;
    --space-2xl: 48px;

    /* Borders & Shadows */
    --radius:     6px;
    --radius-sm:  4px;
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.08);
    --shadow-md:  0 2px 8px rgba(0,0,0,0.10);
}

/* ===========================================================
   RESET & BASE
   =========================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    font-size: 1rem;
    line-height: var(--line-height);
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.3; color: var(--primary); font-weight: 600; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }

p { margin-bottom: var(--space-md); }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.5rem; }
li { margin-bottom: var(--space-xs); }

/* ===========================================================
   LAYOUT
   =========================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ===========================================================
   SITE HEADER
   =========================================================== */
.site-header {
    background: var(--primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    min-height: 56px;
    flex-wrap: wrap;
}

.site-logo {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    flex-shrink: 0;
    letter-spacing: -0.01em;
}
.site-logo:hover { color: rgba(255,255,255,0.85); text-decoration: none; }

.site-nav {
    display: flex;
    gap: var(--space-xs);
    flex: 1;
    flex-wrap: wrap;
}

.site-nav a {
    color: rgba(255,255,255,0.82);
    font-size: var(--text-sm);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.site-nav a:hover { background: rgba(255,255,255,0.12); color: #fff; }

.header-user {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-shrink: 0;
    margin-left: auto;
}

.user-name {
    color: rgba(255,255,255,0.88);
    font-size: var(--text-sm);
    font-weight: 500;
}

/* ===========================================================
   MAIN CONTENT
   =========================================================== */
.main-content {
    flex: 1;
    padding: var(--space-xl) 0 var(--space-2xl);
}

/* ===========================================================
   SITE FOOTER
   =========================================================== */
.site-footer { background: var(--bg-white); border-top: 1px solid var(--border-light); }
.footer-inner {
    padding: var(--space-md) 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* ===========================================================
   AUTH PAGES (login / register)
   =========================================================== */
.auth-wrapper {
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl) var(--space-md);
}

.auth-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: var(--space-2xl);
    width: 100%;
    max-width: 460px;
}

.auth-brand {
    text-align: center;
    margin-bottom: var(--space-xl);
}
.auth-brand h1 { font-size: 1.25rem; color: var(--primary); }
.auth-brand p  { color: var(--text-muted); font-size: var(--text-sm); margin-top: var(--space-xs); }

.auth-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-light);
    margin-bottom: var(--space-xl);
}
.auth-tab {
    flex: 1;
    text-align: center;
    padding: var(--space-sm) 0;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}
.auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.auth-tab:hover  { color: var(--primary); text-decoration: none; }

.auth-note {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-align: center;
    margin-top: var(--space-md);
}

/* ===========================================================
   PAGE HEADER (title + action button row)
   =========================================================== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}
.page-header h2 { margin: 0; }
.header-actions { display: flex; gap: var(--space-sm); }
.page-count {
    font-size: var(--text-sm);
    color: var(--text-muted);
    align-self: center;
}

/* ===========================================================
   CARD
   =========================================================== */
.card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-alt);
}
.card-header h3 { margin: 0; }

.card-description {
    padding: var(--space-md) var(--space-lg);
    font-size: var(--text-sm);
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-light);
}

.form-section { margin-bottom: var(--space-lg); }
.form-section .form-group,
.form-section .form-row {
    padding: 0 var(--space-lg);
}
.form-section .form-group { padding-bottom: var(--space-md); }
.form-section .card-header + .form-group,
.form-section .card-header + .form-row { padding-top: var(--space-lg); }

/* ===========================================================
   STAT GRID (dashboard)
   =========================================================== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: var(--space-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.stat-card--alert { border-color: #f5c6cb; background: #fff8f8; }
.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: var(--space-xs);
}
.stat-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
}

/* ===========================================================
   DATA TABLE
   =========================================================== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}
.data-table th {
    background: var(--bg-alt);
    padding: var(--space-sm) var(--space-md);
    text-align: left;
    font-weight: 600;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-light);
    white-space: nowrap;
}
.data-table td {
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bg-alt); }
.row-muted { opacity: 0.55; }

/* ===========================================================
   BADGES
   =========================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Abstract status badges */
.badge-submitted      { background: #dbeafe; color: #1e40af; }
.badge-under_review   { background: #fef9c3; color: #854d0e; }
.badge-accepted       { background: var(--success-light); color: var(--success); }
.badge-rejected       { background: var(--danger-light); color: var(--danger); }
.badge-revision_requested { background: #fce7f3; color: #9d174d; }
.badge-withdrawn      { background: var(--bg); color: var(--text-muted); }
.badge-draft          { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }

/* Generic badges */
.badge-success  { background: var(--success-light); color: var(--success); }
.badge-warning  { background: var(--warning-light); color: var(--warning); }
.badge-muted    { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }

/* Role badges */
.role-badge         { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 99px; text-transform: uppercase; }
.role-admin         { background: #ede9fe; color: #5b21b6; }
.role-reviewer      { background: #dbeafe; color: #1e40af; }
.role-submitter     { background: var(--success-light); color: var(--success); }
.badge-role-admin    { background: #ede9fe; color: #5b21b6; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 600; }
.badge-role-reviewer { background: #dbeafe; color: #1e40af;  padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 600; }
.badge-role-submitter{ background: var(--success-light); color: var(--success); padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 600; }

/* ===========================================================
   ALERTS / FLASH MESSAGES
   =========================================================== */
.alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius);
    margin-bottom: var(--space-lg);
    font-size: var(--text-sm);
    border: 1px solid transparent;
}
.alert ul { margin-top: var(--space-xs); }
.alert-success { background: var(--success-light); color: var(--success); border-color: #b7dfbd; }
.alert-error   { background: var(--danger-light); color: var(--danger); border-color: #f5c6cb; }
.alert-warning { background: var(--warning-light); color: var(--warning); border-color: #ffeaa7; }
.alert-info    { background: var(--info-light); color: var(--info); border-color: #b8daff; }

/* ===========================================================
   FILTER BAR
   =========================================================== */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: center;
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
}

.filter-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-light);
    padding: 0 var(--space-lg);
}
.filter-tab {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.filter-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.filter-tab:hover  { color: var(--primary); text-decoration: none; }

/* ===========================================================
   EDITOR TABS (used in conference editor)
   =========================================================== */
.editor-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-light);
    padding: 0 var(--space-lg);
    background: var(--bg-alt);
}
.editor-tab {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.editor-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.editor-tab:hover  { color: var(--primary); text-decoration: none; }

.tab-content { padding: var(--space-lg); }

/* ===========================================================
   FORMS
   =========================================================== */
.form-group { margin-bottom: var(--space-md); }
.form-group--auto { display: flex; align-items: flex-end; }

.form-row {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}
.form-row .form-group { flex: 1; min-width: 180px; }

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text);
    margin-bottom: 5px;
}

.required { color: var(--danger); margin-left: 2px; }

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-family: var(--font);
    color: var(--text);
    background: var(--bg-white);
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
    -webkit-appearance: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(46,123,191,0.15);
}
.form-input--narrow { width: 120px; }
.form-select--sm    { width: auto; }

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.form-textarea { resize: vertical; min-height: 100px; }

.form-hint {
    display: block;
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: 4px;
}

.form-check-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-sm);
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-lg);
    border-top: 1px solid var(--border-light);
    background: var(--bg-alt);
}

/* Radio & checkbox groups */
.radio-group, .checkbox-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}
.radio-label, .checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-sm);
    cursor: pointer;
}

/* Info bar (shown above submission form with conference name + deadline) */
.info-bar {
    background: var(--primary-light);
    border: 1px solid #c5d9ec;
    border-radius: var(--radius);
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--text-sm);
    margin-bottom: var(--space-lg);
    color: var(--primary);
}

/* ===========================================================
   BUTTONS
   =========================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
    border: 1.5px solid transparent;
    line-height: 1;
    white-space: nowrap;
    user-select: none;
}
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }

.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); }

.btn-ghost { background: transparent; color: var(--text-muted); border-color: transparent; }
.btn-ghost:hover { background: var(--bg); color: var(--text); }

.btn-danger-outline  { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger-outline:hover { background: var(--danger-light); }

.btn-success-outline { background: transparent; color: var(--success); border-color: var(--success); }
.btn-success-outline:hover { background: var(--success-light); }

/* Size variants */
.btn-sm  { padding: 5px 12px; font-size: var(--text-xs); }
.btn-lg  { padding: 12px 28px; font-size: 1rem; }
.btn-full { width: 100%; }

/* ===========================================================
   PAGINATION
   =========================================================== */
.pagination {
    display: flex;
    gap: var(--space-xs);
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--border-light);
    justify-content: center;
    flex-wrap: wrap;
}
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text);
    border: 1px solid var(--border);
    background: var(--bg-white);
    text-decoration: none;
    transition: all 0.15s;
}
.page-link:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); text-decoration: none; }
.page-link.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ===========================================================
   EMPTY STATE
   =========================================================== */
.empty-state {
    text-align: center;
    padding: var(--space-2xl) var(--space-xl);
    color: var(--text-muted);
    font-size: var(--text-sm);
}

/* ===========================================================
   CO-AUTHOR ROWS
   =========================================================== */
.coauthor-row {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-light);
}
.coauthor-row:last-child { border-bottom: none; }

/* ===========================================================
   REVIEW FORM ELEMENTS
   =========================================================== */
.review-criterion { padding: var(--space-md) var(--space-lg); border-bottom: 1px solid var(--border-light); }
.review-criterion:last-child { border-bottom: none; }

.review-score-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: var(--space-sm) var(--space-lg);
    border-bottom: 1px solid var(--border-light);
    font-size: var(--text-sm);
}
.review-score-row:last-child { border-bottom: none; }

.criterion-label { font-weight: 600; color: var(--text); flex: 1; }
.criterion-value { color: var(--text-muted); margin-left: var(--space-lg); }

.numeric-input-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}
.numeric-range {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* ===========================================================
   ABSTRACT DISPLAY
   =========================================================== */
.abstract-body {
    padding: var(--space-lg);
    font-size: 0.9375rem;
    line-height: 1.75;
    color: var(--text);
    white-space: pre-wrap;
}
.abstract-keywords {
    padding: var(--space-sm) var(--space-lg) var(--space-md);
    font-size: var(--text-sm);
    color: var(--text-muted);
    border-top: 1px solid var(--border-light);
}

/* ===========================================================
   UTILITY CLASSES
   =========================================================== */
.link-muted {
    font-size: var(--text-sm);
    color: var(--text-muted);
    text-decoration: none;
}
.link-muted:hover { color: var(--accent); }

/* ===========================================================
   RESPONSIVE
   =========================================================== */
@media (max-width: 768px) {
    .container { padding: 0 var(--space-md); }

    .header-inner { gap: var(--space-sm); min-height: 48px; }
    /* 1.8.0 U-01: the nav is no longer hidden outright — see the 1.8.0 block (.nav-js) at the end. */

    .stat-grid { grid-template-columns: repeat(2, 1fr); }

    .form-row { flex-direction: column; }
    .form-row .form-group { min-width: unset; }

    .page-header { flex-direction: column; align-items: flex-start; }

    .data-table { font-size: var(--text-xs); }
    .data-table th, .data-table td { padding: var(--space-xs) var(--space-sm); }

    .auth-card { padding: var(--space-xl) var(--space-md); }
    .coauthor-row .form-row { flex-direction: column; }
}

@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .btn-full-mobile { width: 100%; }
}

/* ===========================================================
   PRINT
   =========================================================== */
@media print {
    .site-header, .site-footer, .btn, .form-actions, .pagination { display: none; }
    .card { box-shadow: none; border: 1px solid #ccc; }
}


/* ===========================================================
   1.7.0 — S-16: STYLES THAT USED TO BE INLINE
   ⚠️ Keep this block LAST in the file: the order below is load-bearing.
   =========================================================== */

/* -- Components (were conditional inline styles) -- */
.info-bar--accepted { background: var(--success-light) !important; border-color: #b7dfbd !important; color: var(--success) !important; }
.info-bar--rejected { background: var(--danger-light) !important; border-color: #f5c6cb !important; color: var(--danger) !important; } /* also the closed review-window banner */
.is-divided-top { border-top: 1px solid var(--border-light) !important; }          /* submitter/view.php: 2nd+ reviewer comment */
.report-abstract--divided { border-top: 2px solid var(--border) !important; }      /* admin/reports.php: 2nd+ abstract in a group */
.opt-conflict { color: var(--danger) !important; }                                  /* abstract_detail: reviewer shares a domain */

/* admin/reports.php reviewer note; --submitted turns the left rule navy. ⚠️ modifier after base. */
.review-note {
    margin-top: var(--space-sm) !important;
    padding: var(--space-sm) var(--space-md) !important;
    border-left: 3px solid var(--border) !important;
    background: var(--bg-alt) !important;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
}
.review-note--submitted { border-left-color: var(--primary) !important; }

/* Progress bars: the track keeps its u-* height; the fill's WIDTH comes from data-pct, set by
   app.js (element.style is CSSOM and allowed by the CSP; a style="" attribute is not).
   ⚠️ No JS = empty bar (the numbers beside it still show). */
.bar-fill { width: 0; height: 100%; border-radius: 99px; }
.bar-fill--success { background: var(--success); }
.bar-fill--accent  { background: var(--accent); }
.bar-fill--warning { background: var(--warning); }

/* -- Utilities -- ⚠️ sorted by name; u-b-* sorts BEFORE u-bt-*, so "border:… + border-top:…"
   on one element resolves exactly as it did inline (the later longhand wins). */
/* u-* utilities: GENERATED by the 1.7.0 S-16 migration from the former inline style="" attributes.
   ⚠️ !important on purpose — inline styles beat every stylesheet rule, so these must too, or
      component rules (e.g. .card-body padding) would silently win and layouts would shift.
   ⚠️ Never add style="" to templates again: the CSP has no style-src 'unsafe-inline' (S-16).
      Add a utility here (same naming: u-<property abbreviation>-<value slug>) or a component class. */
.u-ai-center { align-items: center !important; }
.u-ai-flex-end { align-items: flex-end !important; }
.u-ai-flex-start { align-items: flex-start !important; }
.u-b-1px-solid-border-light { border: 1px solid var(--border-light) !important; }
.u-b-none { border: none !important; }
.u-bb-1px-solid-border-light { border-bottom: 1px solid var(--border-light) !important; }
.u-bcol-collapse { border-collapse: collapse !important; }
.u-bg-bg-alt { background: var(--bg-alt) !important; }
.u-bg-bg-white { background: var(--bg-white) !important; }
.u-bg-border-light { background: var(--border-light) !important; }
.u-bg-none { background: none !important; }
.u-bg-primary { background: var(--primary) !important; }
.u-bg-primary-light { background: var(--primary-light) !important; }
.u-bt-1px-solid-border { border-top: 1px solid var(--border) !important; }
.u-bt-1px-solid-border-light { border-top: 1px solid var(--border-light) !important; }
.u-bt-2px-solid-x333 { border-top: 2px solid #333 !important; }
.u-bt-none { border-top: none !important; }
.u-c-accent { color: var(--accent) !important; }
.u-c-danger { color: var(--danger) !important; }
.u-c-primary { color: var(--primary) !important; }
.u-c-success { color: var(--success) !important; }
.u-c-text { color: var(--text) !important; }
.u-c-text-muted { color: var(--text-muted) !important; }
.u-c-x1a3a5c { color: #1a3a5c !important; }
.u-c-x666 { color: #666 !important; }
.u-c-xfff { color: #fff !important; }
.u-cur-pointer { cursor: pointer !important; }
.u-d-block { display: block !important; }
.u-d-flex { display: flex !important; }
.u-d-inline { display: inline !important; }
.u-ff-font-mono { font-family: var(--font-mono) !important; }
.u-fs-10px { font-size: 10px !important; }
.u-fs-14px { font-size: 14px !important; }
.u-fs-18px { font-size: 18px !important; }
.u-fs-1p5rem { font-size: 1.5rem !important; }
.u-fs-1rem { font-size: 1rem !important; }
.u-fs-48px { font-size: 48px !important; }
.u-fs-9px { font-size: 9px !important; }
.u-fs-text-sm { font-size: var(--text-sm) !important; }
.u-fs-text-xs { font-size: var(--text-xs) !important; }
.u-fw-600 { font-weight: 600 !important; }
.u-fw-700 { font-weight: 700 !important; }
.u-fw-normal { font-weight: normal !important; }
.u-fx-1 { flex: 1 !important; }
.u-fx-2 { flex: 2 !important; }
.u-fxw-wrap { flex-wrap: wrap !important; }
.u-gap-12px { gap: 12px !important; }
.u-gap-16px { gap: 16px !important; }
.u-gap-6px { gap: 6px !important; }
.u-gap-8px { gap: 8px !important; }
.u-gap-space-lg { gap: var(--space-lg) !important; }
.u-gap-space-md { gap: var(--space-md) !important; }
.u-gap-space-sm { gap: var(--space-sm) !important; }
.u-grid-template-columns-repeat-auto-fill-minmax-200px-1fr { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important; }
.u-h-6px { height: 6px !important; }
.u-h-8px { height: 8px !important; }
.u-jc-space-between { justify-content: space-between !important; }
.u-lh-1 { line-height: 1 !important; }
.u-lh-1p7 { line-height: 1.7 !important; }
.u-lsp-p04em { letter-spacing: .04em !important; }
.u-m-0 { margin: 0 !important; }
.u-m-0-0-4px { margin: 0 0 4px !important; }
.u-m-0-0-6px { margin: 0 0 6px !important; }
.u-m-16px-0 { margin: 16px 0 !important; }
.u-m-4px-0-0 { margin: 4px 0 0 !important; }
.u-m-8px-0-4px { margin: 8px 0 4px !important; }
.u-m-space-md-0 { margin: var(--space-md) 0 !important; }
.u-m-space-md-space-lg { margin: var(--space-md) var(--space-lg) !important; }
.u-maxh-48px { max-height: 48px !important; }
.u-maxh-60px { max-height: 60px !important; }
.u-maxh-80px { max-height: 80px !important; }
.u-maxw-160px { max-width: 160px !important; }
.u-maxw-200px { max-width: 200px !important; }
.u-maxw-260px { max-width: 260px !important; }
.u-maxw-300px { max-width: 300px !important; }
.u-maxw-640px { max-width: 640px !important; }
.u-maxw-680px { max-width: 680px !important; }
.u-maxw-760px { max-width: 760px !important; }
.u-mb-12px { margin-bottom: 12px !important; }
.u-mb-16px { margin-bottom: 16px !important; }
.u-mb-4px { margin-bottom: 4px !important; }
.u-mb-8px { margin-bottom: 8px !important; }
.u-mb-space-lg { margin-bottom: var(--space-lg) !important; }
.u-mb-space-md { margin-bottom: var(--space-md) !important; }
.u-mb-space-sm { margin-bottom: var(--space-sm) !important; }
.u-mb-space-xl { margin-bottom: var(--space-xl) !important; }
.u-minw-100px { min-width: 100px !important; }
.u-minw-160px { min-width: 160px !important; }
.u-minw-180px { min-width: 180px !important; }
.u-minw-200px { min-width: 200px !important; }
.u-minw-240px { min-width: 240px !important; }
.u-minw-60px { min-width: 60px !important; }
.u-ml-12px { margin-left: 12px !important; }
.u-ml-6px { margin-left: 6px !important; }
.u-ml-8px { margin-left: 8px !important; }
.u-mt-16px { margin-top: 16px !important; }
.u-mt-24px { margin-top: 24px !important; }
.u-mt-2px { margin-top: 2px !important; }
.u-mt-4px { margin-top: 4px !important; }
.u-mt-6px { margin-top: 6px !important; }
.u-mt-8px { margin-top: 8px !important; }
.u-mt-space-lg { margin-top: var(--space-lg) !important; }
.u-mt-space-md { margin-top: var(--space-md) !important; }
.u-mt-space-sm { margin-top: var(--space-sm) !important; }
.u-object-fit-contain { object-fit: contain !important; }
.u-op-0p8 { opacity: 0.8 !important; }
.u-ov-hidden { overflow: hidden !important; }
.u-p-0 { padding: 0 !important; }
.u-p-0-space-lg { padding: 0 var(--space-lg) !important; }
.u-p-10px-16px { padding: 10px 16px !important; }
.u-p-6px { padding: 6px !important; }
.u-p-6px-0 { padding: 6px 0 !important; }
.u-p-6px-10px { padding: 6px 10px !important; }
.u-p-80px-20px { padding: 80px 20px !important; }
.u-p-8px-0 { padding: 8px 0 !important; }
.u-p-space-lg { padding: var(--space-lg) !important; }
.u-p-space-md { padding: var(--space-md) !important; }
.u-p-space-md-space-lg { padding: var(--space-md) var(--space-lg) !important; }
.u-p-space-sm-space-lg { padding: var(--space-sm) var(--space-lg) !important; }
.u-pt-16px { padding-top: 16px !important; }
.u-rad-0-0-radius-radius { border-radius: 0 0 var(--radius) var(--radius) !important; }
.u-rad-99px { border-radius: 99px !important; }
.u-rad-radius { border-radius: var(--radius) !important; }
.u-rad-radius-radius-0-0 { border-radius: var(--radius) var(--radius) 0 0 !important; }
.u-rad-radius-sm { border-radius: var(--radius-sm) !important; }
.u-ta-center { text-align: center !important; }
.u-ta-left { text-align: left !important; }
.u-ta-right { text-align: right !important; }
.u-tt-uppercase { text-transform: uppercase !important; }
.u-w-100pct { width: 100% !important; }
.u-w-100px { width: 100px !important; }
.u-w-120px { width: 120px !important; }
.u-w-180px { width: 180px !important; }
.u-w-200px { width: 200px !important; }
.u-w-220px { width: 220px !important; }
.u-w-80px { width: 80px !important; }
.u-ws-nowrap { white-space: nowrap !important; }
.u-ws-pre-wrap { white-space: pre-wrap !important; }

/* ⚠️ Must come AFTER the utilities (same specificity, both !important → last one wins). */
[hidden] { display: none !important; }

/* -- Reports page print layout (was a <style> block in admin/reports.php) -- */
.print-only { display: none; }
@media print {
    .page-reports .no-print, .page-reports .site-header, .page-reports .site-footer,
    .page-reports .filter-bar, .page-reports button { display: none !important; }
    .page-reports .print-only { display: block !important; }
    body.page-reports { background: white; font-size: 11px; }
    .page-reports .report-group { page-break-inside: avoid; margin-bottom: 20px; }
    .page-reports .report-abstract { page-break-inside: avoid; }
    .page-reports .badge { border: 1px solid #ccc; }
    .page-reports .container { max-width: 100%; padding: 0; }
    .page-reports .main-content { padding: 0; }
}


/* ===========================================================
   1.8.0 — Playbook 3.7 §19 (mobile-first, minimalist) + §20 (sortable lists)
   ⚠️ Placed AFTER [hidden] on purpose: the phone-card rules must beat the u-* width utilities
      (both !important → last wins). None of these rules set display on an element that can carry
      the hidden attribute, except .nav-toggle, which app.js un-hides before it matters.
   =========================================================== */

/* -- §19.2: form inputs at 16px so iOS Safari does not zoom the page on focus -- */
.form-input, .form-select, .form-textarea { font-size: 1rem; }
.form-select--sm { font-size: 1rem; }

/* -- §19.2: 44×44 px touch targets, on touch screens only (desktop density unchanged) -- */
@media (pointer: coarse) {
    .btn, .btn-sm, .site-nav a, .nav-group > summary, .sort-btn, .nav-toggle,
    .page-link, .filter-tab, .auth-tab { min-height: 44px; }
    .btn-sm { padding-left: 14px; padding-right: 14px; }
    .checkbox-label input, .radio-label input, .form-check-label input { width: 22px; height: 22px; }
}

/* -- Header: Sign Out was INVISIBLE on desktop since ≤1.7.0 (navy outline on the navy header).
      §21.4: shared computers need a visible sign-out. White outline on the header only. -- */
.site-header .btn-outline { color: #fff; border-color: rgba(255,255,255,0.65); background: transparent; }
.site-header .btn-outline:hover { background: rgba(255,255,255,0.14); }
.site-header .btn-outline:focus-visible { outline: 3px solid #9cc7f0; outline-offset: 2px; }

/* -- Header: current page + nav groups (Email ▾ / Admin ▾).
      Desktop link padding 6px 8px (was 10px) so the 7 admin items fit one row at 1280px. -- */
.site-nav a, .nav-group > summary { padding-left: 8px; padding-right: 8px; }
.site-nav a[aria-current="page"] { background: rgba(255,255,255,0.18); color: #fff; }
.site-nav { align-items: center; }
.nav-group { position: relative; }
.nav-group > summary {
    list-style: none; cursor: pointer; color: rgba(255,255,255,0.82); font-size: var(--text-sm);
    padding: 6px 10px; border-radius: var(--radius-sm); display: flex; align-items: center;
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::after { content: " ▾"; white-space: pre; }
.nav-group > summary:hover, .nav-group[open] > summary { background: rgba(255,255,255,0.12); color: #fff; }
.nav-group > summary:focus-visible, .nav-toggle:focus-visible, .site-nav a:focus-visible,
.sort-btn:focus-visible, .sort-link:focus-visible { outline: 3px solid #9cc7f0; outline-offset: 2px; }
.nav-group-menu {
    position: absolute; top: calc(100% + 4px); left: 0; z-index: 120; min-width: 200px;
    background: var(--primary); border-radius: var(--radius); box-shadow: var(--shadow-md);
    padding: var(--space-xs); display: flex; flex-direction: column;
}
.nav-group-menu a { white-space: nowrap; }

/* -- Phone menu button (U-01). Hidden on desktop; shown on phones once app.js adds .nav-js -- */
.nav-toggle {
    display: none; background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.6);
    border-radius: var(--radius-sm); padding: 6px 14px; font: 600 var(--text-sm) var(--font); cursor: pointer;
}
@media (max-width: 768px) {
    .site-header .header-inner { row-gap: var(--space-xs); padding-top: 6px; padding-bottom: 6px; }
    .nav-js .nav-toggle { display: inline-flex; align-items: center; margin-left: auto; }
    .nav-js .site-nav { display: none; }
    .nav-js .site-nav.is-open {
        display: flex; flex-direction: column; align-items: stretch; flex-basis: 100%; order: 10;
        padding: var(--space-xs) 0 var(--space-sm);
    }
    /* no-js fallback: .nav-js absent → the nav simply wraps onto its own row (always reachable) */
    .site-nav { flex-basis: 100%; order: 10; }
    .site-nav a, .nav-group > summary { padding: 10px 12px; font-size: 1rem; }
    .nav-group-menu { position: static; box-shadow: none; padding: 0 0 0 var(--space-md); background: transparent; }
    .header-user { margin-left: 0; flex-wrap: wrap; }
    .nav-js .header-user { order: 5; }
}

/* -- §20: sortable headers (client: <button class="sort-btn">, server: <a class="sort-link">) -- */
.sort-btn, .sort-link {
    background: none; border: 0; padding: 0; margin: 0; cursor: pointer; color: inherit;
    font: inherit; text-transform: inherit; letter-spacing: inherit; text-align: left;
    display: inline-flex; align-items: center; gap: 2px;
}
.sort-link:hover, .sort-btn:hover { color: var(--accent); text-decoration: none; }
.data-table th[aria-sort] { color: var(--primary); }
.sort-arrow { font-size: 0.7em; }

/* Phone "Sort by" control — only on phones (headers are hidden in the card layout) */
.sort-bar { display: none; }

/* -- §19.2: tables become labelled cards below 640px (only tables sortable.js labelled: .js-cards) -- */
@media (max-width: 640px) {
    .sort-bar {
        display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm);
        padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--border-light); background: var(--bg-alt);
    }
    .sort-bar-label { display: flex; align-items: center; gap: var(--space-sm); font-size: var(--text-sm); color: var(--text-muted); }
    .data-table.js-cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .data-table.js-cards, .data-table.js-cards tbody, .data-table.js-cards tr, .data-table.js-cards td { display: block; width: 100% !important; }
    .data-table.js-cards tr { padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--border-light); }
    .data-table.js-cards tbody tr:last-child { border-bottom: none; }
    .data-table.js-cards td {
        border: 0; padding: 4px 0; display: grid; grid-template-columns: 38% 1fr; gap: var(--space-sm);
        font-size: var(--text-sm); word-break: break-word;
    }
    .data-table.js-cards td::before {
        content: attr(data-label); font-size: var(--text-xs); font-weight: 600; color: var(--text-muted);
        text-transform: uppercase; letter-spacing: 0.03em; padding-top: 2px;
    }
    /* action cells (empty header) and full-width messages: no label column */
    .data-table.js-cards td[data-label=""], .data-table.js-cards td[colspan] { grid-template-columns: 1fr; }
    .data-table.js-cards td[data-label=""]::before, .data-table.js-cards td[colspan]::before { content: none; }
    .data-table.js-cards td[data-label=""] { display: flex; flex-wrap: wrap; gap: var(--space-sm); padding-top: var(--space-sm); }
    /* key/value tables without a <thead> (e.g. "Additional information") stack too */
    .data-table:not(.js-cards) td { display: block; width: 100% !important; }
    .card { overflow-x: auto; }            /* last resort: a wide grid scrolls inside its card, never the page */
}

/* -- Sending & limits page (admin/email.php) -- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-md); margin-bottom: var(--space-md); }
.kpi { background: var(--bg-alt); border: 1px solid var(--border-light); border-radius: var(--radius); padding: var(--space-md); }
.kpi-label { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.kpi-value { font-size: 1.25rem; font-weight: 700; color: var(--primary); }
.gauge { height: 10px; background: var(--border-light); border-radius: 99px; overflow: hidden; margin: var(--space-sm) 0 var(--space-md); max-width: 420px; }
.gauge .bar-fill--warning { background: #b7791f; }
.gauge .bar-fill--danger { background: var(--danger); }
.route-pill { display: inline-block; padding: 2px 10px; border-radius: 99px; background: var(--primary-light); color: var(--primary); font-weight: 700; }
.card-body { padding: var(--space-lg); }
.card-body > * + * { margin-top: var(--space-md); }
.inline-form { display: inline; }
.form-inline { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: flex-end; }
.form-inline .form-group { margin: 0; min-width: 180px; }
.text-muted { color: var(--text-muted); }
.text-warn { color: var(--warning); font-weight: 600; }

/* -- 1.8.0: form fields inside a .form-row got the section's 24px side padding TWICE (once from
      .form-section .form-row, again from .form-section .form-group) — on phones the author / co-author
      inputs were ~2/3 width, on desktop indented from Title. Pre-existing since ≤1.7.0. -- */
.form-section .form-row .form-group { padding-left: 0; padding-right: 0; }

/* ===========================================================
   1.9.0 — preview, drafts, conference links, email previews
   ⚠️ Classes only (CSP style-src 'self' — no style="" anywhere). Kept AFTER [hidden] like the 1.8.0 block.
   =========================================================== */

/* -- "Preview as" bar (amber, top of every page while previewing) -- */
.preview-bar { background: #fff3cd; border-bottom: 2px solid #d39e00; color: #533f03; font-size: var(--text-sm); }
.preview-bar-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm); padding-top: 8px; padding-bottom: 8px; }
.preview-exit { background: #533f03; color: #fff; border: 0; }
.preview-exit:hover { background: #3d2e02; color: #fff; }
.preview-exit:focus-visible { outline: 3px solid #d39e00; outline-offset: 2px; }

/* -- Word limit: counter turns red when over (app.js §2 toggles .is-over) -- */
.form-hint.is-over, .is-over { color: var(--danger); font-weight: 600; }

/* -- Review & submit page: buttons wrap on phones -- */
.preview-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: center; }

/* -- Conference chooser cards (submitter) -- */
.conf-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-md); }
.conf-card { padding: var(--space-lg); display: flex; flex-direction: column; gap: var(--space-sm); }
.conf-card h3 { margin: 0; font-size: 1.1rem; color: var(--primary); }
.conf-card-desc { margin: 0; color: var(--text-muted); font-size: var(--text-sm); }
.conf-card-when { margin: 0; font-size: var(--text-sm); }
.conf-card .btn { align-self: flex-start; margin-top: auto; }

/* -- Folded guidelines on the form -- */
.guidelines-box { margin-bottom: var(--space-lg); }
.guidelines-box > summary { cursor: pointer; padding: var(--space-md) var(--space-lg); font-weight: 600; color: var(--primary); }

/* -- Conference landing page (phone-first) -- */
.landing { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--space-lg); }
.landing-head { padding: var(--space-lg); text-align: center; }
.landing-logo { max-height: 90px; max-width: 260px; object-fit: contain; margin: 0 auto var(--space-md); display: block; }
.landing-title { margin: 0; font-size: 1.6rem; color: var(--primary); line-height: 1.25; }
.landing-sub { margin: 4px 0 var(--space-md); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-size: var(--text-xs); }
.landing-dates { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-md) var(--space-xl); margin: 0 0 var(--space-md); }
.landing-dates dt { font-size: var(--text-xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.landing-dates dd { margin: 2px 0 0; font-weight: 600; }
.landing-closes { display: block; font-weight: 400; color: var(--warning); font-size: var(--text-sm); }
.landing-cta { margin-top: var(--space-sm); }
.landing-mine { margin-top: var(--space-lg); text-align: left; border-top: 1px solid var(--border-light); padding-top: var(--space-md); }
.landing-auth .auth-tabs { margin: 0; }

/* -- Plain bullet lists inside cards -- */
.plain-list { margin: var(--space-sm) 0; padding-left: 1.25rem; }
.plain-list li { margin: 4px 0; }

/* -- Conference link + Copy (admin) -- */
.copy-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); }
.copy-prefix { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--text-muted); word-break: break-all; }

/* -- Email previews -- */
.email-frame { width: 100%; height: 560px; border: 1px solid var(--border-light); border-radius: var(--radius); background: #f5f5f5; }
.email-text { white-space: pre-wrap; word-break: break-word; background: var(--bg-alt); border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: var(--space-md); font-size: var(--text-sm); }
.row-current { background: var(--primary-light); }

/* -- Reviewer view: identity check passed -- */
.ok-note { color: var(--success); font-size: var(--text-sm); margin: 0 0 var(--space-md); }

@media (max-width: 640px) {
    .landing-title { font-size: 1.35rem; }
    .email-frame { height: 480px; }
}

/* -- 1.9.0: button rows wrap on phones (3 buttons in a page header / form footer overflowed at 320–390px) -- */
.form-actions { flex-wrap: wrap; }
.page-header > .u-d-flex { flex-wrap: wrap; }

/* =============================================================
   1.10.0 — Reviewer pairing pages (auto-assign, assignment grid, expertise & load)
   ============================================================= */
/* Wide grids scroll inside their own box — never the page (usage profile §5: admin desktop-first). */
.grid-scroll { overflow-x: auto; max-width: 100%; }
.assign-grid { min-width: max-content; }
.assign-grid th, .assign-grid td { white-space: nowrap; }
.assign-grid thead th.grid-col { white-space: normal; min-width: 88px; max-width: 140px; text-align: center; font-size: var(--text-xs); vertical-align: bottom; }
.assign-grid .grid-rowhead { position: sticky; left: 0; z-index: 1; background: var(--bg-white); text-align: left; font-weight: 400;
                             white-space: normal; min-width: 220px; max-width: 320px; box-shadow: 1px 0 0 var(--border-light); }
.assign-grid thead th:first-child { position: sticky; left: 0; z-index: 2; background: var(--bg-alt); }
/* row headers are <th scope="row"> for screen readers — but look like normal cells (no caps, same borders) */
.assign-grid tbody th.grid-rowhead { text-transform: none; letter-spacing: normal; font-size: var(--text-sm); color: var(--text);
                                     border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.grid-cell { text-align: center; }
.grid-cell input[type="checkbox"] { width: 20px; height: 20px; cursor: pointer; }
.grid-cell--on { color: var(--success); font-weight: 700; background: var(--success-light); }
.grid-cell--no { color: var(--danger); background: var(--danger-light); cursor: help; }
.grid-cell--warn { background: var(--warning-light); }
.grid-key { display: inline-block; min-width: 22px; text-align: center; border-radius: var(--radius-sm); padding: 0 4px; font-weight: 700; }
.grid-key--on { color: var(--success); background: var(--success-light); }
.grid-key--no { color: var(--danger); background: var(--danger-light); }
.grid-key--warn { background: var(--warning-light); }
.form-input--tiny { width: 4.5em; min-width: 0; text-align: center; padding-left: 4px; padding-right: 4px; }
.expertise-cats { display: flex; flex-wrap: wrap; gap: var(--space-sm) var(--space-lg); margin: var(--space-sm) 0 var(--space-md); }
@media (max-width: 640px) {
    /* undo the phone "stack every cell" rule for the grids (they are data-nocards on purpose) */
    .data-table.assign-grid td, .data-table.assign-grid th { display: table-cell; width: auto !important; }
    .assign-grid .grid-rowhead { min-width: 160px; }
}

/* =============================================================
   1.11.0 — Download bars (includes/export_bar.php): wrap on phones, never scroll sideways
   ============================================================= */
.export-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-md); margin: var(--space-sm) 0; }
.export-bar-label { font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.export-stack .export-bar + .export-bar, .export-stack .export-bar + .form-hint { border-top: 1px solid var(--border-light); padding-top: var(--space-sm); }
.card > .export-bar { padding: var(--space-sm) var(--space-lg) var(--space-md); margin: 0; border-top: 1px solid var(--border-light); }
@media print { .export-bar { display: none; } }
