/* ═══════════════════════════════════════════════════════════
   EHN Operations Platform — Design System
   Eat Happy Now · Food Rescue Nonprofit
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Urbanist:wght@400;500;600;700;800&family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* ── Design Tokens ──────────────────────────────────────── */

:root {
    /* Brand */
    --green: #4a7a18;
    --green-dark: #3b6313;
    --green-hover: #568c1c;
    --med-green: #6ab023;
    --orange: #E8622A;
    --orange-dark: #d05520;
    --orange-hover: #f07035;
    --lt-green: #eef6e0;
    --lt-orange: #fef3ea;

    /* Neutrals — warm-tinted */
    --surface: #f7f7f5;
    --surface-raised: #ffffff;
    --surface-sunken: #f0f0ec;
    --border: #e4e5e0;
    --border-strong: #cdd0c8;
    --text-primary: #1a1d16;
    --text-secondary: #4d5245;
    --text-muted: #878d7e;
    --text-inverse: #ffffff;

    /* Semantic */
    --success-bg: #ecfdf5;
    --success-border: #a7f3d0;
    --success-text: #065f46;
    --error-bg: #fef2f2;
    --error-border: #fecaca;
    --error-text: #991b1b;
    --info-bg: #eff6ff;
    --info-border: #bfdbfe;
    --info-text: #1e40af;
    --warning-bg: #fffbeb;
    --warning-border: #fde68a;
    --warning-text: #92400e;

    /* Typography */
    --font-display: 'Urbanist', -apple-system, sans-serif;
    --font-body: 'DM Sans', -apple-system, sans-serif;

    /* Spacing */
    --space-2xs: 0.125rem;
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 0.75rem;
    --space-lg: 1rem;
    --space-xl: 1.5rem;
    --space-2xl: 2rem;
    --space-3xl: 3rem;

    /* Elevation */
    --shadow-xs: 0 1px 2px rgba(26,29,22,0.04);
    --shadow-sm: 0 1px 3px rgba(26,29,22,0.06), 0 1px 2px rgba(26,29,22,0.04);
    --shadow-md: 0 4px 12px rgba(26,29,22,0.07), 0 1px 3px rgba(26,29,22,0.04);
    --shadow-lg: 0 10px 30px rgba(26,29,22,0.08), 0 2px 8px rgba(26,29,22,0.04);

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
}

/* ── Reset & Base ───────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

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

/* ── Navbar ─────────────────────────────────────────────── */

.navbar {
    background: var(--green);
    color: var(--text-inverse);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 12px rgba(26,29,22,0.15);
}

/* Orange accent strip */
.navbar::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, var(--orange), var(--orange-hover), var(--orange));
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
    height: 56px;
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-inverse);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.nav-logo {
    height: 30px;
    width: 30px;
    object-fit: contain;
    border-radius: 6px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.nav-links a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    transition: all var(--duration-fast) var(--ease-out);
}

.nav-links a:hover {
    color: var(--text-inverse);
    background: rgba(255,255,255,0.12);
}

.nav-links a.active {
    color: var(--text-inverse);
    background: rgba(255,255,255,0.18);
}

.nav-divider {
    width: 1px;
    height: 24px;
    background: rgba(255,255,255,0.2);
    margin: 0 var(--space-sm);
}

.nav-user {
    color: rgba(255,255,255,0.7);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0 var(--space-sm);
}

.nav-logout {
    color: rgba(255,255,255,0.85) !important;
    background: rgba(255,255,255,0.1) !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    font-size: 0.8rem !important;
    padding: var(--space-xs) var(--space-md) !important;
}

.nav-logout:hover {
    background: rgba(255,255,255,0.2) !important;
    border-color: rgba(255,255,255,0.3) !important;
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-inverse);
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
}

.nav-toggle:hover { background: rgba(255,255,255,0.12); }

.nav-toggle svg { display: block; }

/* ── Container ──────────────────────────────────────────── */

.container {
    max-width: 1080px;
    width: 100%;
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-xl);
    flex: 1;
}

.container-narrow {
    max-width: 720px;
}

/* ── Page Header ────────────────────────────────────────── */

.page-header {
    margin-bottom: var(--space-2xl);
}

.page-header h1 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.page-header p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    max-width: 600px;
}

/* ── Login ──────────────────────────────────────────────── */

.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(74,122,24,0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(232,98,42,0.04) 0%, transparent 50%),
        var(--surface);
    padding: var(--space-xl);
}

.login-card {
    background: var(--surface-raised);
    padding: var(--space-3xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    width: 100%;
    max-width: 420px;
    text-align: center;
    position: relative;
}

/* Accent bar on login card */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: var(--space-2xl);
    right: var(--space-2xl);
    height: 3px;
    background: linear-gradient(90deg, var(--green), var(--med-green));
    border-radius: 0 0 2px 2px;
}

.login-brand {
    margin-bottom: var(--space-2xl);
}

.login-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    margin-bottom: var(--space-lg);
}

.login-card h1 {
    font-family: var(--font-display);
    color: var(--green);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: var(--space-2xs);
}

.login-card h2 {
    font-family: var(--font-display);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.login-form {
    margin-top: var(--space-2xl);
    text-align: left;
}

.login-note {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: var(--space-xl);
}

/* ── Forms ──────────────────────────────────────────────── */

.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: var(--surface-raised);
    transition: all var(--duration-fast) var(--ease-out);
}

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

input:hover, select:hover, textarea:hover {
    border-color: var(--border-strong);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(74, 122, 24, 0.12);
}

/* ── Buttons ────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.625rem 1.25rem;
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--duration-fast) var(--ease-out);
    line-height: 1.4;
}

.btn-primary {
    background: var(--green);
    color: var(--text-inverse);
    border-color: var(--green);
}

.btn-primary:hover {
    background: var(--green-hover);
    border-color: var(--green-hover);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
    color: var(--text-inverse);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-secondary {
    background: var(--surface-raised);
    color: var(--text-secondary);
    border-color: var(--border);
}

.btn-secondary:hover {
    background: var(--surface-sunken);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.btn-danger {
    background: #ef4444;
    color: var(--text-inverse);
    border-color: #ef4444;
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
    color: var(--text-inverse);
}

.btn-danger:active { transform: translateY(0); }

.btn-small {
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
}

.btn-full { width: 100%; }

.btn-icon {
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
}

/* ── Card Grid (Dashboard) ──────────────────────────────── */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin: var(--space-xl) 0;
}

.card {
    background: var(--surface-raised);
    padding: var(--space-xl);
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border);
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    gap: var(--space-lg);
    align-items: flex-start;
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--green);
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out);
}

.card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card:hover::before {
    opacity: 1;
}

.card-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: var(--lt-green);
    color: var(--green);
}

.card-icon.orange {
    background: var(--lt-orange);
    color: var(--orange);
}

.card-body h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
    color: var(--text-primary);
}

.card-body p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

.card-badge {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    background: var(--orange);
    color: white;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 99px;
    letter-spacing: 0.02em;
}

.card-disabled {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

.card-disabled::before { display: none; }

.card-disabled .card-icon {
    background: var(--surface-sunken);
    color: var(--text-muted);
}

.card-coming-soon {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-top: var(--space-sm);
}

/* ── Alerts ─────────────────────────────────────────────── */

.alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    font-size: 0.9rem;
    line-height: 1.5;
    border: 1.5px solid;
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
}

.alert strong { font-weight: 600; }

.alert-error {
    background: var(--error-bg);
    color: var(--error-text);
    border-color: var(--error-border);
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
    border-color: var(--success-border);
}

.alert-info {
    background: var(--info-bg);
    color: var(--info-text);
    border-color: var(--info-border);
}

.alert-warning {
    background: var(--warning-bg);
    color: var(--warning-text);
    border-color: var(--warning-border);
}

.alert-orange {
    background: var(--lt-orange);
    color: #7c2d12;
    border-color: #fed7aa;
}

.alert a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.alert a:hover { opacity: 0.8; }

/* ── Tables ─────────────────────────────────────────────── */

.table-wrap {
    background: var(--surface-raised);
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface-raised);
}

thead { border-bottom: 1.5px solid var(--border); }

th {
    background: var(--surface-sunken);
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.775rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: left;
    padding: var(--space-md) var(--space-lg);
}

td {
    padding: var(--space-md) var(--space-lg);
    font-size: 0.9rem;
    border-top: 1px solid var(--surface-sunken);
}

tr:first-child td { border-top: none; }

tbody tr { transition: background var(--duration-fast); }

tbody tr:hover { background: rgba(74, 122, 24, 0.03); }

/* ── Search Bar ─────────────────────────────────────────── */

.search-bar {
    background: var(--surface-raised);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    border: 1.5px solid var(--border);
}

.search-fields {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
    align-items: flex-end;
}

.search-fields .form-group {
    flex: 1;
    min-width: 150px;
    margin-bottom: 0;
}

.search-hint {
    color: var(--text-muted);
    text-align: center;
    padding: var(--space-3xl);
    font-size: 0.9375rem;
}

/* ── Buddy Tags ─────────────────────────────────────────── */

.buddy-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    background: var(--lt-green);
    color: var(--green);
    padding: 0.15rem 0.5rem;
    border-radius: 99px;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    margin: 2px;
}

.buddy-remove {
    background: none;
    border: none;
    color: var(--error-text);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0 0.15rem;
    line-height: 1;
    opacity: 0.6;
    transition: opacity var(--duration-fast);
}

.buddy-remove:hover { opacity: 1; }

.buddies-cell { max-width: 220px; }

.buddy-input {
    width: 130px !important;
    padding: 0.3rem 0.5rem !important;
    font-size: 0.85rem !important;
}

/* ── Autocomplete Dropdown ──────────────────────────────── */

.autocomplete-wrapper, .ac-wrap { position: relative; }

.autocomplete-dropdown, .ac-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 240px;
    background: var(--surface-raised);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    max-height: 220px;
    overflow-y: auto;
}

.ac-item {
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    font-size: 0.875rem;
    transition: background var(--duration-fast);
}

.ac-item:first-child { border-radius: var(--radius-md) var(--radius-md) 0 0; }
.ac-item:last-child { border-radius: 0 0 var(--radius-md) var(--radius-md); }

.ac-item:hover { background: var(--lt-green); }
.ac-empty { color: var(--text-muted); cursor: default; }
.ac-empty:hover { background: transparent; }

/* ── Inline Edit ────────────────────────────────────────── */

.inline-edit {
    padding: 0.3rem 0.5rem !important;
    font-size: 0.9rem !important;
    text-align: right;
    width: 80px !important;
    border: 1.5px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    transition: border-color var(--duration-fast) !important;
}

.inline-edit:focus {
    border-color: var(--green) !important;
    box-shadow: 0 0 0 3px rgba(74,122,24,0.12) !important;
}

/* ── Pending Requests Box ───────────────────────────────── */

.pending-box {
    background: var(--warning-bg);
    border: 1.5px solid var(--warning-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.pending-box h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    margin-bottom: var(--space-xs);
    color: var(--warning-text);
}

.awaiting-box {
    background: var(--info-bg);
    border: 1.5px solid var(--info-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.awaiting-box h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    margin-bottom: var(--space-xs);
    color: var(--info-text);
}

.awaiting-badge {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: var(--info-bg);
    color: var(--info-text);
    border: 1px solid var(--info-border);
}

/* ── Dashboard Stats ────────────────────────────────────── */

.dashboard-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.dashboard-welcome h1 {
    font-size: 1.75rem;
}

.dashboard-welcome .subtitle {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-top: var(--space-2xs);
}

.section-label {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.dashboard-links {
    margin-top: var(--space-2xl);
    text-align: center;
}

/* ── Footer ─────────────────────────────────────────────── */

.footer {
    text-align: center;
    padding: var(--space-xl) var(--space-lg);
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.footer a {
    color: var(--green);
    text-decoration: none;
    font-weight: 500;
}

.footer a:hover { text-decoration: underline; }

/* ── Utility ────────────────────────────────────────────── */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.875rem; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

/* ── Animations ─────────────────────────────────────────── */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: fadeInUp 0.4s var(--ease-out) forwards;
    opacity: 0;
}

.animate-in:nth-child(1) { animation-delay: 0ms; }
.animate-in:nth-child(2) { animation-delay: 60ms; }
.animate-in:nth-child(3) { animation-delay: 120ms; }
.animate-in:nth-child(4) { animation-delay: 180ms; }
.animate-in:nth-child(5) { animation-delay: 240ms; }
.animate-in:nth-child(6) { animation-delay: 300ms; }

@media (prefers-reduced-motion: reduce) {
    .animate-in { animation: none; opacity: 1; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ── Mobile ─────────────────────────────────────────────── */

@media (max-width: 768px) {
    .container {
        padding: var(--space-lg);
    }

    .navbar-inner {
        padding: 0 var(--space-lg);
        flex-wrap: wrap;
    }

    .nav-toggle { display: block; }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding: var(--space-sm) 0 var(--space-md);
        gap: var(--space-xs);
    }

    .nav-links.open { display: flex; }

    .nav-links a {
        padding: var(--space-sm) var(--space-md);
    }

    .nav-divider { display: none; }

    .nav-user {
        padding: var(--space-sm) var(--space-md);
        border-top: 1px solid rgba(255,255,255,0.1);
        margin-top: var(--space-sm);
        padding-top: var(--space-md);
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .login-card {
        padding: var(--space-2xl);
    }

    .login-page {
        padding: var(--space-lg);
    }

    .page-header h1 {
        font-size: 1.4rem;
    }

    .search-fields {
        flex-direction: column;
    }

    .dashboard-welcome {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .card {
        flex-direction: column;
        gap: var(--space-md);
    }

    .card-badge {
        position: static;
        align-self: flex-start;
    }
}

/* ── Partner Updates (staff) ────────────────────────────── */

.pu-state-filter { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-bottom: var(--space-md); }
.pu-state-filter a {
    padding: var(--space-xs) var(--space-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
}
.pu-state-filter a[aria-current] { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }

.pu-review {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-left: 4px solid var(--orange);
    border-radius: var(--radius-md);
    padding: var(--space-lg) var(--space-xl);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-xs);
}
.pu-review h3 { margin: 0; font-family: var(--font-display); }
.pu-review-head { margin-bottom: var(--space-md); }
.pu-flag-list { margin: 0; padding-left: 1.2rem; }

.pu-compare th[scope], .pu-compare tbody th { text-align: left; font-weight: 600; white-space: nowrap; }

.pu-dl {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: var(--space-xs) var(--space-lg);
    margin: var(--space-md) 0;
}
.pu-dl dt { font-weight: 600; color: var(--text-secondary); }
.pu-dl dd { margin: 0; }
.pu-pre { white-space: pre-wrap; }
.pu-bad { color: var(--error-text); font-weight: 600; }
.pu-note { color: var(--warning-text); }

.pu-actions { display: flex; flex-wrap: wrap; gap: var(--space-lg); margin-top: var(--space-md); }
.pu-actions form { display: flex; gap: var(--space-sm); align-items: center; }
.pu-actions input[type=text] { min-width: 220px; }

.pu-correct { margin-top: var(--space-md); }
.pu-correct summary { cursor: pointer; font-weight: 600; color: var(--green); }
.pu-correct form { margin-top: var(--space-md); }

.pu-staff-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-md); }
.pu-staff-fieldset { border: 0; padding: 0; margin: 0 0 var(--space-md); }
.pu-staff-fieldset legend { font-weight: 600; margin-bottom: var(--space-xs); }
.pu-staff-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2px var(--space-md); }
.pu-staff-checks label { font-weight: 400; display: flex; gap: var(--space-xs); align-items: center; text-transform: none; letter-spacing: 0; }
.pu-staff-closure { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: var(--space-sm); margin-bottom: var(--space-xs); }

.pu-table td.num, .pu-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pu-status-rejected td { color: var(--text-muted); }
.pu-status-pending td { background: var(--lt-orange); }

.pu-link-row { display: flex; gap: var(--space-sm); }
.pu-link-row input { flex: 1; font-family: monospace; }

.pu-alerts { display: flex; flex-direction: column; gap: var(--space-sm); max-width: 520px; }
.pu-alerts button { align-self: flex-start; }

@media (max-width: 640px) {
    .pu-dl { grid-template-columns: 1fr; }
    .pu-staff-closure { grid-template-columns: 1fr 1fr; }
    .pu-actions form { flex-wrap: wrap; }
    .pu-actions input[type=text] { min-width: 0; width: 100%; }
}
