:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --bg: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

/* Ensure the HTML `hidden` attribute always wins over element-specific
   display rules (e.g. .field { display: block } was hiding nothing). */
[hidden] { display: none !important; }

/* Reports */
.report-filters {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-top: 1rem;
}
.report-filters label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.report-filters select {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    background: var(--surface);
}
.report-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.kpi-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow);
}
.kpi-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}
.kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
}
.kpi-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.status-bar-row {
    display: flex;
    width: 100%;
    height: 32px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.status-seg {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0 0.5rem;
    white-space: nowrap;
    overflow: hidden;
}
.status-seg.status-pending       { background: #d97706; }
.status-seg.status-acknowledged  { background: #2563eb; }
.status-seg.status-resolved      { background: #16a34a; }
.status-seg.status-cancelled     { background: #64748b; }

.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 160px;
    padding: 1rem 0 0 0;
    border-bottom: 1px solid var(--border);
    margin-top: 0.75rem;
}
.bar-col {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
}
.bar {
    width: 100%;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 3px 3px 0 0;
    min-height: 2px;
    transition: opacity 0.15s;
}
.bar-col:hover .bar {
    opacity: 0.85;
}
.bar-label {
    font-size: 0.65rem;
    color: var(--text);
    margin-top: 2px;
}
.bar-x {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.hbar-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.hbar-row {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) 3fr auto;
    gap: 0.75rem;
    align-items: center;
    font-size: 0.9rem;
}
.hbar-label {
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hbar-track {
    background: var(--bg);
    border-radius: 999px;
    height: 14px;
    overflow: hidden;
    position: relative;
}
.hbar-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 999px;
}
.hbar-value {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    text-align: right;
    min-width: 2.5rem;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background: var(--primary);
    color: white;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    text-decoration: none;
    letter-spacing: 0.05em;
}

.tagline {
    font-size: 0.875rem;
    opacity: 0.85;
}

.nav-actions {
    margin-left: auto;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 6px;
    transition: background 0.15s;
}

.nav-link:hover {
    background: rgba(255,255,255,0.15);
}

.nav-logout-form {
    display: inline;
    margin: 0;
}

.nav-link-plain {
    background: none;
    border: none;
    color: white;
    text-decoration: none;
    font-family: inherit;
    font-size: 0.9rem;
    padding: 0.5rem 0.5rem;
    cursor: pointer;
    opacity: 0.9;
}

.nav-link-plain:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Main content */
main {
    flex: 1;
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
}

/* Hero */
.hero {
    text-align: center;
    margin-bottom: 2.5rem;
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Login page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
}

.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 3rem 2.5rem;
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.login-card h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.login-card p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.google-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    box-shadow: var(--shadow);
    transition: box-shadow 0.15s, border-color 0.15s;
}

.google-btn:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

/* User bar (dashboard) */
.user-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.user-email {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-outline {
    color: var(--text-muted);
    border: 1px solid var(--border);
    background: transparent;
}

.btn-outline:hover {
    background: var(--bg);
    color: var(--text);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: 1px solid var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.inline-form {
    display: inline;
}

/* Role badges */
.role-badges {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.role-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.role-admin {
    background: #fef3c7;
    color: #92400e;
}

.role-reporter {
    background: #dbeafe;
    color: #1e40af;
}

.role-acknowledger {
    background: #dcfce7;
    color: #166534;
}

.role-none {
    background: var(--bg);
    color: var(--text-muted);
    border: 1px dashed var(--border);
}

.badge-warn {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
    margin-left: 0.25rem;
}

.badge-urgent {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-left: 0.25rem;
}

.urgency-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    cursor: pointer;
    font-size: 0.9rem;
}

.urgency-row input[type="checkbox"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.ack-card-urgent {
    border-left: 4px solid #ef4444;
    background: linear-gradient(to right, #fef2f2 0, var(--surface) 40%);
}

.ack-card-completed {
    border-left: 4px solid #10b981;
    background: #f0fdf4;
    transition: opacity 0.6s ease;
}

.ack-card-completed .ack-details {
    font-style: italic;
}

/* Admin page */
.admin-header {
    margin-bottom: 2rem;
}

.admin-header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.admin-header p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.users-table th,
.users-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.users-table th {
    background: var(--bg);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.users-table tr:last-child td {
    border-bottom: none;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-avatar-sm {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.roles-form {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.role-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    cursor: pointer;
}

.empty-state, .empty-state-inline {
    text-align: center;
    padding: 2rem;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
}

.empty-state h2 {
    font-size: 1.25rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.section-hint {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

/* Request form */
.form-page {
    max-width: 640px;
    margin: 0 auto;
}

.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link:hover { color: var(--primary); }

.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
}

.form-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.form-header .category-icon { font-size: 2.5rem; margin: 0; }

.form-header h1 {
    font-size: 1.5rem;
    margin: 0;
}

.form-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0.25rem 0 0 0;
}

.field {
    display: block;
    margin-bottom: 1rem;
}

.field span {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--text);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="url"],
.field input[type="number"],
.field input[type="password"],
.field select,
.field textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    background: var(--surface);
    color: var(--text);
}

.field input[type="text"]:focus,
.field input[type="email"]:focus,
.field input[type="url"]:focus,
.field input[type="number"]:focus,
.field input[type="password"]:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

/* Detail list */
.detail-list {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.5rem 1rem;
    margin: 0;
}

.detail-list dt {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.detail-list dd {
    margin: 0;
}

/* Status pills */
.status-pill {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.status-pending { background: #fef3c7; color: #92400e; }
.status-acknowledged { background: #dbeafe; color: #1e40af; }
.status-resolved { background: #dcfce7; color: #166534; }
.status-cancelled { background: #f1f5f9; color: #64748b; }

/* Recent requests list */
.request-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.request-list li {
    border-bottom: 1px solid var(--border);
}

.request-list li:last-child { border-bottom: none; }

.request-list a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
}

.request-list a:hover { background: var(--bg); }

.req-location { color: var(--text); }

.req-time {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.recent-requests {
    margin-top: 2rem;
}

.recent-requests h2 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

/* Acknowledge list */
.ack-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ack-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem 1.25rem;
}

.ack-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.ack-head .category-icon { font-size: 1.75rem; margin: 0; }

.ack-head > div { flex: 1; }

.ack-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

.ack-details {
    color: var(--text);
    font-size: 0.9rem;
    margin: 0.5rem 0;
    padding: 0.5rem 0.75rem;
    background: var(--bg);
    border-radius: 6px;
}

.ack-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.resolve-form {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    min-width: 260px;
}

.resolve-form input[type="text"] {
    flex: 1;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.85rem;
}

.ack-summary {
    margin-top: 2rem;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 320px;
    background: var(--surface);
    border: 1px solid var(--primary);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    box-shadow: var(--shadow-lg);
    font-size: 0.9rem;
    animation: slidein 0.2s ease-out;
    z-index: 1000;
}

@keyframes slidein {
    from { transform: translateX(120%); }
    to { transform: translateX(0); }
}

.hero-cta {
    text-align: center;
    margin-top: 2rem;
}

/* Preferences */
.prefs-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pref-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0;
}

.pref-row h3 {
    font-size: 1.05rem;
    margin: 0 0 0.25rem 0;
}

.pref-row p {
    margin: 0;
}

.pref-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.pref-header h3 {
    font-size: 1.05rem;
    margin: 0 0 0.25rem 0;
}

/* Toggle switch */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--border);
    border-radius: 26px;
    transition: 0.15s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.15s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.switch input:checked + .slider {
    background: var(--primary);
}

.switch input:checked + .slider:before {
    transform: translateX(22px);
}

/* SMS consent */
.sms-active p {
    margin: 0 0 0.5rem 0;
}

.consent-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 1rem 0;
    cursor: pointer;
}

.consent-row input[type="checkbox"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.consent-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.field input[type="tel"] {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    background: var(--surface);
    color: var(--text);
}

.field input[type="tel"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Category grid */
.categories h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 240px));
    gap: 1rem;
    justify-content: center;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    font-family: inherit;
    font-size: inherit;
    transition: transform 0.15s, box-shadow 0.15s;
    cursor: pointer;
}

button.category-card {
    width: 100%;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.category-card h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.category-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.category-custom {
    border-style: dashed;
}

/* Footer */
footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
}

/* Mobile-friendly */
@media (max-width: 600px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .category-card {
        padding: 1.25rem 0.5rem;
        aspect-ratio: 1 / 1;
        justify-content: center;
    }

    .category-card h3,
    .category-card p {
        display: none;
    }

    .category-card .category-icon {
        font-size: 3rem;
        margin-bottom: 0;
    }

    .tagline { display: none; }

    .hero h1 {
        font-size: 1.5rem;
    }

    .navbar {
        padding: 0.75rem 1rem;
    }

    .user-bar {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .login-card {
        margin: 0 1rem;
    }
}

/* ===== Landing page ===== */

.landing-body {
    background: var(--surface);
}

.landing-body main {
    max-width: none;
    padding: 0;
}

.landing-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--border);
}

.landing-nav-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.landing-logo {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: 0.05em;
}

.landing-nav-links {
    display: flex;
    gap: 1.25rem;
    margin-left: auto;
}

.landing-nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.15s;
}

.landing-nav-links a:hover {
    color: var(--text);
}

.landing-main {
    width: 100%;
}

.landing-hero {
    background: linear-gradient(180deg, #eff6ff 0%, var(--surface) 100%);
    padding: 5rem 1.5rem 4rem;
}

.landing-hero-inner {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    background: #dbeafe;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 1.25rem;
}

.landing-hero h1 {
    font-size: 3rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: #0f172a;
}

.lead {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 620px;
    margin: 0 auto 2rem;
}

.landing-cta {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.btn-lg {
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.microcopy {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.landing-section {
    padding: 5rem 1.5rem;
    max-width: 1120px;
    margin: 0 auto;
}

.landing-section-alt {
    background: #f8fafc;
    max-width: none;
}

.landing-section-alt > * {
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: 2rem;
    letter-spacing: -0.02em;
    text-align: center;
    margin-bottom: 0.75rem;
    color: #0f172a;
}

.section-sub {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 620px;
    margin: 0 auto 2.5rem;
}

/* Features */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin: 2.5rem auto 0;
    max-width: 880px;
}

@media (max-width: 700px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }
}

.feature {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem 1.5rem;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.feature:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.feature h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.feature p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Steps */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.step {
    text-align: center;
    padding: 1.5rem;
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.step h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.step p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Pricing */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
    align-items: stretch;
}

/* Pricing overview (headline + included list) */
.pricing-overview {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2.5rem;
    align-items: center;
    margin-top: 2rem;
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.pricing-headline-amount {
    line-height: 1;
    color: #0f172a;
}

.pricing-headline-amount .price-amount {
    font-size: 3.5rem;
}

.pricing-headline-intro {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.pricing-headline-intro strong {
    color: #0f172a;
}

.pricing-included {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.pricing-included li {
    font-size: 0.95rem;
    color: var(--text);
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.45;
}

.pricing-included li::before {
    content: "✓";
    color: var(--primary);
    font-weight: 700;
    position: absolute;
    left: 0;
}

/* Worksheet */
.pricing-worksheet {
    margin-top: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.worksheet-header {
    padding: 1.5rem 2rem 0.5rem;
}

.worksheet-header h3 {
    font-size: 1.35rem;
    margin: 0 0 0.25rem;
    color: #0f172a;
}

.worksheet-sub {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* Segmented tab control for tier selection */
.ws-tabs {
    display: inline-flex;
    margin-top: 1rem;
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.25rem;
    gap: 0.15rem;
}

.ws-tab {
    appearance: none;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
    letter-spacing: 0.01em;
}

.ws-tab:hover:not(.ws-tab-active) {
    color: #0f172a;
}

.ws-tab:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.ws-tab-active {
    background: white;
    color: var(--primary);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.ws-hint,
.ws-field > small {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.4;
}

.ws-field-note {
    padding: 0.85rem 1rem;
    background: rgba(37, 99, 235, 0.04);
    border: 1px dashed rgba(37, 99, 235, 0.25);
    border-radius: 0.5rem;
}

.ws-note {
    margin: 0.25rem 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

/* "Every tier includes" strip under tier cards */
.pricing-included-strip {
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.pricing-included-strip strong {
    color: #0f172a;
    font-weight: 700;
    margin-right: 0.35rem;
}

.worksheet-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 1.25rem 2rem 2rem;
}

.worksheet-inputs {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.ws-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: var(--text);
}

.ws-field > span {
    font-weight: 600;
    color: #0f172a;
}

.ws-field input[type="text"],
.ws-field input[type="email"],
.ws-field input[type="tel"],
.ws-field input[type="url"],
.ws-field input[type="password"],
.ws-field input[type="number"],
.ws-field input[type="date"],
.ws-field input[type="datetime-local"],
.ws-field select,
.ws-field textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    background: white;
    color: var(--text);
    font-family: inherit;
    box-sizing: border-box;
}

.ws-field input[type="text"]:focus,
.ws-field input[type="email"]:focus,
.ws-field input[type="tel"]:focus,
.ws-field input[type="url"]:focus,
.ws-field input[type="password"]:focus,
.ws-field input[type="number"]:focus,
.ws-field input[type="date"]:focus,
.ws-field input[type="datetime-local"]:focus,
.ws-field select:focus,
.ws-field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

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

.ws-field em {
    font-style: normal;
    color: var(--text-muted);
    font-weight: 400;
}

.ws-fieldset {
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin: 0;
}

.ws-fieldset legend {
    font-size: 0.8rem;
    font-weight: 700;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0 0.4rem;
}

.ws-check {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.9rem;
    line-height: 1.4;
    cursor: pointer;
    color: var(--text);
}

.ws-check input[type="checkbox"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
    accent-color: var(--primary);
}

.ws-check strong {
    color: #0f172a;
}

.worksheet-results {
    background: rgba(37, 99, 235, 0.04);
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 0.5rem;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ws-result-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text);
    padding: 0.4rem 0;
    border-bottom: 1px dashed rgba(37, 99, 235, 0.18);
}

.ws-result-row:last-of-type {
    border-bottom: none;
}

.ws-result-label {
    color: var(--text-muted);
}

.ws-result-value {
    font-weight: 600;
    color: #0f172a;
    text-align: right;
    white-space: nowrap;
}

.ws-result-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-top: 0.5rem;
    padding-top: 0.85rem;
    border-top: 2px solid rgba(37, 99, 235, 0.3);
}

.ws-result-total .ws-result-label {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    text-transform: none;
    letter-spacing: 0;
}

.ws-result-total .ws-result-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.ws-result-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.ws-result-meta strong {
    color: #0f172a;
}

.ws-result-fineprint {
    color: var(--text-muted);
    font-size: 0.78rem;
    margin: 0.5rem 0 0;
    line-height: 1.45;
}

#ws-cta {
    margin-top: 0.75rem;
}

.pricing-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 1.75rem;
    display: flex;
    flex-direction: column;
}

.pricing-card-featured {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.pricing-badge {
    position: absolute;
    top: -0.7rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
}

.pricing-name {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.pricing-price {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin-bottom: 0.25rem;
    color: #0f172a;
}

.price-currency {
    font-size: 1.25rem;
    font-weight: 600;
    vertical-align: top;
    margin-right: 0.15rem;
}

.price-amount {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.price-suffix {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
}

.pricing-period {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.75rem 0;
    flex: 1;
}

.pricing-features li {
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.93rem;
    color: var(--text);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li::before {
    content: "✓ ";
    color: var(--primary);
    font-weight: 700;
    margin-right: 0.35rem;
}

.pricing-footnote {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 2rem;
}

/* Contact */
.contact-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-copy .section-title {
    text-align: left;
}

.contact-copy p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-list li {
    padding: 0.5rem 0;
    font-size: 0.95rem;
    color: var(--text);
}

.contact-list a {
    color: var(--primary);
    text-decoration: none;
}

.contact-list a:hover {
    text-decoration: underline;
}

.contact-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.contact-alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.contact-alert-ok {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.contact-alert-err {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.contact-form .field em {
    color: var(--text-muted);
    font-style: normal;
    font-weight: 400;
}

.contact-form textarea {
    resize: vertical;
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
}

.contact-form input[type="email"] {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    background: var(--surface);
    color: var(--text);
}

.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Landing footer */
.landing-footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 2.5rem 1.5rem;
}

.landing-footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.landing-footer strong {
    color: white;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.landing-footer-links {
    display: flex;
    gap: 1.25rem;
}

.landing-footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.15s;
}

.landing-footer-links a:hover {
    color: white;
}

.landing-footer-meta {
    color: #64748b;
    font-size: 0.85rem;
}

/* Landing responsive */
@media (max-width: 768px) {
    .landing-hero {
        padding: 3.5rem 1.25rem 2.5rem;
    }

    .landing-hero h1 {
        font-size: 2.1rem;
    }

    .lead {
        font-size: 1rem;
    }

    .landing-section {
        padding: 3.5rem 1.25rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .contact-wrap {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .pricing-card-featured {
        transform: none;
    }

    .pricing-overview {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .pricing-headline-amount .price-amount {
        font-size: 2.75rem;
    }

    .worksheet-body {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem 1.25rem 1.5rem;
    }

    .worksheet-header {
        padding: 1.25rem 1.25rem 0.5rem;
    }

    .ws-tabs {
        display: flex;
        width: 100%;
    }

    .ws-tab {
        flex: 1;
        padding: 0.5rem 0.5rem;
    }

    .ws-result-total .ws-result-value {
        font-size: 1.5rem;
    }

    .landing-nav-links {
        display: none;
    }

    .landing-footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* Queue card (dashboard primary for acknowledgers) */
.queue-card {
    margin-top: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
}
.queue-head {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 0.75rem; gap: 0.75rem;
}
.queue-head h2 { font-size: 1.25rem; margin: 0; }
.queue-count {
    background: var(--primary); color: white;
    padding: 0.25rem 0.75rem; border-radius: 999px;
    font-size: 0.85rem; font-weight: 600;
}
.queue-count.clear { background: #10b981; }
.queue-foot { margin-top: 1rem; text-align: center; }

.recent-requests-compact { margin-top: 1rem; }
.recent-requests-compact h2 { font-size: 1rem; color: var(--text-muted); }

/* Floating action button + bottom sheet */
.fab {
    position: fixed;
    bottom: max(1.5rem, env(safe-area-inset-bottom, 0));
    right: 1.5rem;
    z-index: 40;
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.9rem 1.3rem;
    background: var(--primary); color: white;
    border: none; border-radius: 999px;
    box-shadow: 0 10px 25px -5px rgba(37,99,235,0.5), 0 4px 6px -2px rgba(0,0,0,0.1);
    font-size: 1rem; font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.fab:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -5px rgba(37,99,235,0.55); }
.fab:active { transform: translateY(0); }
.fab-icon { font-size: 1.25rem; line-height: 1; }

.sheet-backdrop {
    position: fixed; inset: 0;
    background: rgba(15,23,42,0);
    z-index: 50;
    transition: background 0.2s ease-out;
}
.sheet-backdrop.open { background: rgba(15,23,42,0.45); }

.sheet {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 51;
    background: var(--surface);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.15);
    max-height: 85vh; overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1);
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.sheet.open { transform: translateY(0); }
.sheet-grab {
    width: 36px; height: 4px; background: var(--border);
    border-radius: 2px; margin: 0.6rem auto 0.3rem;
    cursor: grab;
}
.sheet-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.5rem 1.25rem 0.75rem;
    cursor: grab;
    touch-action: none;
}
.sheet-header h2 { font-size: 1.15rem; margin: 0; }
.sheet-close {
    background: none; border: none; color: var(--text-muted);
    font-size: 1.75rem; line-height: 1; cursor: pointer;
    padding: 0 0.25rem;
}
.sheet-body { padding: 0 1.25rem 1.5rem; }
.category-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(140px, 180px));
    justify-content: center;
}

@media (max-width: 600px) {
    .fab-label { display: none; }
    .fab { padding: 1rem; width: 56px; height: 56px; justify-content: center; }
    .fab-icon { font-size: 1.5rem; }
    .category-grid-compact { grid-template-columns: 1fr 1fr; }
    .queue-card { padding: 1rem; border-radius: 10px; }
    .ack-card { padding: 1rem; }
}

/* === Admin page layout: header toolbar, cards, grid === */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.page-header-text h1 {
    font-size: 1.5rem;
    margin: 0.25rem 0 0.25rem 0;
}

.page-header-text p {
    color: var(--text-muted);
    margin: 0;
}

.page-header-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.card-head h2 {
    font-size: 1.05rem;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.card-sub {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: -0.5rem 0 1rem 0;
}

.count-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.5rem;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 760px) {
    .two-col-grid { grid-template-columns: 1fr; }
}

.feature-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    justify-content: space-between;
}

.feature-text {
    flex: 1;
    min-width: 0;
}

.feature-desc {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.feature-status {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.feature-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.pending-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pending-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.pending-meta {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* === Modal === */
.modal {
    position: fixed;
    inset: 0;
    margin: auto;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    background: var(--surface);
    color: var(--text);
    width: min(480px, calc(100vw - 2rem));
    max-width: 480px;
    max-height: calc(100vh - 2rem);
}

.modal::backdrop {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
}

.modal-form {
    display: flex;
    flex-direction: column;
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.modal-head h2 {
    margin: 0;
    font-size: 1.05rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.modal-close:hover {
    background: var(--bg);
    color: var(--text);
}

.modal-body {
    padding: 1.25rem;
}

.modal-body .field:last-child {
    margin-bottom: 0;
}

.modal-hint {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0.5rem 0 0 0;
}

.modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    background: var(--bg);
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
}

/* === Activity feed === */
.activity-feed {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.activity-feed li {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
}

.activity-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
}

.activity-body {
    flex: 1;
    min-width: 0;
}

.activity-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: space-between;
}

.activity-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.15rem;
    word-break: break-word;
}

.activity-time {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 0.15rem;
}

/* === Admin tools tile list === */
.admin-tools {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-tool {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    text-decoration: none;
    transition: background-color 0.15s, border-color 0.15s;
}

.admin-tool:hover {
    background: var(--surface);
    border-color: var(--primary);
}

.admin-tool-icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.admin-tool-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.15rem;
}

/* === Dropdown (native details-based) === */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown > summary {
    list-style: none;
    cursor: pointer;
}

.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown > summary::marker { content: ""; }

.dropdown .caret {
    margin-left: 0.35rem;
    font-size: 0.7em;
    opacity: 0.7;
}

.dropdown[open] > summary {
    background: var(--bg);
    color: var(--text);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.25rem);
    right: 0;
    min-width: 240px;
    max-height: 320px;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 20;
    padding: 0.25rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: var(--bg);
}

.dropdown-scope {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    flex-shrink: 0;
}

/* === Grouped row actions in tables === */
.row-actions {
    display: inline-flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* === Account profile row (on /preferences page) === */
.profile-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.profile-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
