:root {
    --ink: #1b2f47;
    --ink-soft: #50657e;
    --ink-deep: #102235;
    --sky: #eef2f6;
    --sky-strong: #e3ebf2;
    --panel: rgba(255, 255, 255, 0.96);
    --panel-strong: rgba(255, 255, 255, 1);
    --line: rgba(27, 47, 71, 0.1);
    --line-strong: rgba(27, 47, 71, 0.16);
    --accent: #d24b4b;
    --green: #4b9d73;
    --shadow: 0 12px 28px rgba(41, 72, 104, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Manrope", system-ui, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(167, 206, 229, 0.34), transparent 30%),
        radial-gradient(circle at bottom right, rgba(210, 75, 75, 0.12), transparent 28%),
        linear-gradient(180deg, #f5fbff 0%, #edf5fb 52%, #e9f1f7 100%);
    min-height: 100vh;
}

body.staff-shell {
    background: linear-gradient(180deg, #f4f7fa 0%, #edf2f6 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.site-shell {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.site-bg {
    position: fixed;
    border-radius: 999px;
    filter: blur(24px);
    opacity: 0.6;
}

.staff-shell .site-bg {
    display: none;
}

.site-bg-a {
    width: 24rem;
    height: 24rem;
    background: rgba(160, 201, 227, 0.38);
    top: -7rem;
    right: -6rem;
}

.site-bg-b {
    width: 28rem;
    height: 28rem;
    background: rgba(210, 75, 75, 0.14);
    bottom: -10rem;
    left: -7rem;
}

.topbar,
.page-wrap {
    position: relative;
    z-index: 1;
}

.topbar {
    max-width: 1180px;
    margin: 0 auto;
    padding: 1.25rem 1.25rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.staff-shell .topbar {
    padding-top: 1.5rem;
}

.staff-shell .topbar {
    align-items: center;
}

.topnav {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.topnav-link {
    padding: 0.55rem 0.95rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(27, 47, 71, 0.08);
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 700;
}

.topnav-link.is-active {
    background: linear-gradient(135deg, var(--ink) 0%, #31567f 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 12px 24px rgba(49, 86, 127, 0.16);
}

.brand-mark,
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.24em;
    color: var(--ink-soft);
    font-size: 0.72rem;
    font-weight: 700;
}

.brand-mark {
    color: var(--ink);
}

.page-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
    display: grid;
    gap: 1.5rem;
}

.hero-card,
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.hero-card {
    padding: 2.25rem;
}

.panel {
    padding: 1.75rem;
}

.page-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.5rem;
}

.page-hero h1 {
    margin-bottom: 0.5rem;
}

.page-hero-compact {
    padding: 1.15rem 1.35rem;
    align-items: center;
}

.page-hero-compact h1 {
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    line-height: 1.04;
    margin: 0.25rem 0 0.35rem;
}

.page-hero-compact .muted-copy {
    max-width: 32rem;
    font-size: 0.96rem;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.operational-hero {
    background: rgba(255, 255, 255, 0.98);
}

.grid-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.narrow-panel {
    max-width: 760px;
    margin: 0 auto;
}

.center-text {
    text-align: center;
}

h1,
h2,
h3,
strong {
    font-family: "Montserrat", system-ui, sans-serif;
}

h1 {
    font-size: clamp(2.7rem, 6vw, 4.9rem);
    line-height: 0.94;
    margin: 0.45rem 0 0.8rem;
    letter-spacing: -0.04em;
}

h2 {
    font-size: 1.9rem;
    margin: 0 0 0.75rem;
    letter-spacing: -0.03em;
}

h3 {
    font-size: 1.12rem;
    margin: 0.2rem 0;
    letter-spacing: -0.02em;
}

p {
    margin: 0.25rem 0;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--ink-soft);
}

.hero-years,
.hero-meta,
.muted-copy {
    color: var(--ink-soft);
}

.hero-years {
    font-size: 0.98rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.hero-intro {
    font-size: 1.02rem;
}

.hero-name {
    font-family: "Montserrat", system-ui, sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
    font-weight: 300;
    margin: 0.25rem 0 0.65rem;
}

.hero-note {
    max-width: 40rem;
}

.memorial-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 1.75rem;
    align-items: stretch;
}

.hero-copy {
    display: grid;
    align-content: center;
    padding: 1rem 0.5rem 1rem 0.75rem;
}

.hero-portrait {
    min-height: 460px;
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(240, 248, 252, 0.1), rgba(16, 34, 53, 0.04)),
        url('/memorial-invite-reference.jpeg');
    background-size: cover;
    background-position: 74% center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.public-panel {
    align-items: start;
}

.login-layout,
.operations-grid,
.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.panel-span-full {
    grid-column: 1 / -1;
}

.panel-narrow-form {
    max-width: 980px;
}

.login-story {
    min-height: 100%;
    display: grid;
    align-content: start;
    gap: 1rem;
}

.login-panel {
    max-width: 38rem;
}

.mini-card {
    padding: 1rem 1.05rem;
}

.stack-lg {
    display: grid;
    gap: 1rem;
}

.field {
    display: grid;
    gap: 0.45rem;
}

.field label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--ink-soft);
    font-weight: 700;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 0.95rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    color: var(--ink);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: rgba(27, 47, 71, 0.28);
    box-shadow: 0 0 0 3px rgba(160, 201, 227, 0.16);
    background: rgba(255, 255, 255, 1);
}

.iti {
    width: 100%;
    display: block;
}

.iti__tel-input,
.iti input[type="tel"] {
    width: 100%;
}

.field .iti__country-container {
    left: 0.35rem;
    top: 0.35rem;
    bottom: 0.35rem;
    padding: 0;
}

.field .iti__selected-country {
    border-radius: 10px 0 0 10px;
}

.field .iti__selected-country-primary {
    padding: 0 0.8rem 0 0.9rem;
    border-right: 1px solid rgba(27, 47, 71, 0.12);
}

.field .iti__selected-dial-code {
    color: var(--ink-soft);
}

.field .iti__arrow {
    border-color: var(--ink-soft);
}

.field .iti input[type="tel"] {
    padding-left: 6.25rem;
}

.phone-help-copy {
    margin: 0;
    font-size: 0.82rem;
}

.primary-button,
.secondary-button,
.link-button {
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-button,
.secondary-button {
    padding: 0.95rem 1.2rem;
}

.primary-button {
    background: #24476c;
    color: white;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(49, 86, 127, 0.14);
}

.secondary-button {
    background: rgba(255, 255, 255, 0.98);
    color: var(--ink);
    border: 1px solid var(--line);
}

.secondary-button.is-disabled,
.secondary-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

.link-button {
    background: transparent;
    color: var(--ink-soft);
    padding: 0;
}

.primary-button:hover,
.secondary-button:hover,
.link-button:hover {
    transform: translateY(-1px);
}

.info-card,
.info-note,
.stat-card,
.ticket-card,
.scanner-box,
.guest-row,
.log-row {
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
}

.info-card,
.ticket-content,
.stat-card,
.log-row {
    padding: 1.25rem;
}

.number-list {
    margin: 1rem 0;
    padding-left: 1.2rem;
    color: var(--ink-soft);
}

.info-note {
    padding: 1rem 1.1rem;
    margin-top: 1rem;
    background: var(--panel-strong);
}

.compact-info-card {
    margin-top: 0;
    padding: 1rem 1.1rem;
}

.success-note {
    border-color: rgba(75, 157, 115, 0.28);
    background: rgba(104, 196, 153, 0.12);
}

.error-note {
    border-color: rgba(210, 75, 75, 0.28);
    background: rgba(229, 109, 109, 0.12);
}

.ticket-card {
    max-width: 430px;
    margin: 1.5rem auto 0;
    overflow: hidden;
}

.ticket-band {
    height: 10px;
    background: linear-gradient(90deg, #90bdd8, #d9eaf4, #90bdd8);
}

.qr-box {
    width: 200px;
    height: 200px;
    margin: 1.25rem auto;
    padding: 0.75rem;
    border-radius: 18px;
    background: white;
    box-shadow: inset 0 0 0 1px rgba(27, 47, 71, 0.08);
}

.ticket-meta {
    display: grid;
    gap: 0.35rem;
}

.ticket-meta span {
    color: var(--ink-soft);
    font-size: 0.92rem;
}

.ticket-actions {
    margin-top: 1.5rem;
}

.pass-action-button {
    width: auto;
    min-width: 0;
    padding: 0.72rem 1.1rem;
    font-size: 0.95rem;
    box-shadow: 0 10px 20px rgba(49, 86, 127, 0.16);
}

.memorial-ticket {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(235, 244, 250, 0.95));
}

.schedule-stack {
    display: grid;
    gap: 0.9rem;
    margin-top: 1rem;
}

.schedule-item {
    padding: 1rem 1.05rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid var(--line);
}

.schedule-day,
.schedule-time {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--accent);
    font-weight: 700;
}

.memorial-note {
    border-color: rgba(27, 47, 71, 0.08);
}

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

.staff-shell .panel,
.staff-shell .action-card,
.staff-shell .record-card,
.staff-shell .danger-panel,
.staff-shell .registry-table-wrap,
.staff-shell .summary-table-wrap {
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.stats-grid,
.filters-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
}

.kpi-card {
    padding: 1rem 1.05rem;
    border-radius: 16px;
    border: 1px solid rgba(27, 47, 71, 0.08);
    background: rgba(248, 251, 253, 0.98);
    display: grid;
    gap: 0.35rem;
}

.kpi-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.kpi-head span:first-child {
    color: var(--ink-soft);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 800;
}

.kpi-card strong {
    font-size: 1.9rem;
    line-height: 1;
    margin-top: 0.15rem;
}

.kpi-badge {
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
}

.kpi-badge-success {
    color: var(--green);
    background: rgba(104, 196, 153, 0.14);
}

.kpi-badge-warning {
    color: var(--accent);
    background: rgba(210, 75, 75, 0.12);
}

.kpi-badge-neutral {
    color: #24476c;
    background: rgba(36, 71, 108, 0.1);
}

.kpi-trend,
.kpi-meta {
    margin: 0;
}

.kpi-trend {
    font-size: 0.9rem;
    color: var(--ink);
    font-weight: 700;
}

.kpi-meta {
    font-size: 0.86rem;
    color: var(--ink-soft);
}

.dashboard-filters {
    align-items: end;
    row-gap: 1.25rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
    align-items: end;
}

.guest-management-stack {
    display: grid;
    gap: 1.75rem;
}

.guest-intake-panel,
.bulk-upload-panel,
.registry-panel {
    min-width: 0;
}

.guest-management-stack > .panel {
    padding: clamp(1.5rem, 2.8vw, 2.15rem);
}

.guest-intake-panel .muted-copy,
.bulk-upload-panel .muted-copy {
    max-width: 42rem;
}

.guest-intake-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem 1.4rem;
    margin-top: 1.5rem;
    align-items: start;
}

.guest-intake-form .field,
.upload-form .field,
.registry-filters-form .field {
    min-width: 0;
}

.guest-intake-notes {
    grid-column: span 2;
}

.field-span-full {
    grid-column: 1 / -1;
}

.seating-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.upload-help-card {
    margin-top: 1.15rem;
    padding: 1.35rem 1.4rem;
}

.csv-header-copy {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.92rem;
    padding: 0.75rem 0.85rem;
    border-radius: 14px;
    background: rgba(27, 47, 71, 0.06);
    margin: 0.75rem 0;
    overflow-wrap: anywhere;
}

.upload-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.2rem;
    align-items: start;
    margin-top: 1.5rem;
    max-width: 48rem;
}

.upload-form .field input[type="file"] {
    padding: 0.9rem 1rem;
    min-width: 0;
}

.upload-file-field {
    max-width: 100%;
}

.upload-form-actions {
    align-self: start;
}

.registry-filters-form {
    display: grid;
    gap: 1.1rem;
    margin-top: 1.5rem;
}

.compact-filter-form {
    margin-top: 1rem;
}

.registry-bulk-form {
    display: grid;
    gap: 1.35rem;
    margin-top: 1.5rem;
}

.registry-filter-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.3fr) auto;
    gap: 1.1rem 1.25rem;
    align-items: end;
}

.review-filter-grid {
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1fr) auto;
}

.compact-registry-grid {
    grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr) minmax(0, 1fr) auto;
}

.bulk-category-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(22rem, 0.8fr);
    gap: 1.25rem 1.5rem;
    padding: 1.25rem 1.3rem;
    border-radius: 24px;
    border: 1px solid rgba(27, 47, 71, 0.08);
    background: rgba(246, 250, 253, 0.9);
    align-items: end;
}

.compact-toolbar {
    padding: 1rem 1.1rem;
    border-radius: 18px;
}

.bulk-category-toolbar .muted-copy {
    margin-top: 0.35rem;
}

.bulk-category-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: end;
}

.bulk-category-actions {
    margin: 0;
}

.bulk-selection-error {
    margin-top: -0.5rem;
}

.registry-filter-search input {
    max-width: 100%;
}

.scanner-panel,
.manual-panel {
    min-height: 100%;
    height: min(78vh, 52rem);
}

.scanner-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}

.manual-panel {
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
}

.scanner-stage {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.lookup-toolbar {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.manual-results {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 1rem;
    min-height: 0;
}

.search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
}

.filter-actions {
    display: flex;
    justify-content: end;
}

.settings-actions {
    display: flex;
    justify-content: end;
}

.compact-form-actions {
    margin-top: 0.15rem;
}

.stat-card span {
    display: block;
    color: var(--ink-soft);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.stat-card strong {
    display: block;
    margin-top: 0.5rem;
    font-size: 2.2rem;
}

.table-stack {
    display: grid;
    gap: 0.85rem;
}

.guest-row,
.log-row {
    padding: 1rem 1.1rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.guest-record,
.activity-record {
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(27, 47, 71, 0.08);
    border-radius: 22px;
}

.guest-copy,
.activity-main {
    display: grid;
    gap: 0.2rem;
}

.guest-list-stack {
    margin-top: 1rem;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.35rem;
    align-content: start;
}

.manual-pagination {
    margin-top: 0;
}

.registry-table-wrap {
    margin-top: 1.5rem;
    overflow-x: auto;
    border: 1px solid rgba(27, 47, 71, 0.08);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
    -webkit-overflow-scrolling: touch;
}

.registry-table {
    width: 100%;
    min-width: 980px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
}

.registry-table th,
.registry-table td {
    padding: 1.05rem 1.15rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(27, 47, 71, 0.08);
}

.registry-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--ink-soft);
    background: rgba(232, 241, 247, 0.9);
    white-space: nowrap;
}

.registry-table thead th:first-child {
    border-top-left-radius: 26px;
}

.registry-table thead th:last-child {
    border-top-right-radius: 26px;
}

.registry-table tbody tr:last-child td {
    border-bottom: 0;
}

.registry-table tbody tr:nth-child(even) td {
    background: rgba(248, 251, 254, 0.72);
}

.registry-table tbody tr:hover td {
    background: rgba(160, 201, 227, 0.1);
}

.registry-table th:nth-child(1),
.registry-table td:nth-child(1) {
    width: 7%;
}

.registry-table th:nth-child(2),
.registry-table td:nth-child(2) {
    width: 18%;
}

.registry-table th:nth-child(3),
.registry-table td:nth-child(3) {
    width: 24%;
}

.registry-table th:nth-child(4),
.registry-table td:nth-child(4) {
    width: 15%;
}

.registry-table th:nth-child(5),
.registry-table td:nth-child(5) {
    width: 12%;
}

.registry-table th:nth-child(6),
.registry-table td:nth-child(6) {
    width: 13%;
}

.registry-table th:nth-child(7),
.registry-table td:nth-child(7) {
    width: 7%;
}

.registry-table th:nth-child(8),
.registry-table td:nth-child(8) {
    width: 11%;
}

.registry-table td {
    overflow-wrap: anywhere;
}

.registry-select-column,
.registry-select-cell {
    white-space: nowrap;
}

.registry-select-cell {
    vertical-align: middle;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.88rem;
    color: var(--ink-soft);
}

.checkbox-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--accent);
    margin: 0;
    flex: 0 0 auto;
}

.registry-name-cell strong {
    display: inline-block;
    line-height: 1.2;
}

.registry-email-cell,
.registry-phone-cell {
    color: var(--ink-soft);
}

.registry-category-cell {
    line-height: 1.3;
}

.registry-status-cell .status-pill,
.registry-action-column .status-pill {
    white-space: nowrap;
}

.registry-action-cell {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
}

.action-stack {
    flex-direction: column;
    gap: 0.65rem;
}

.registry-action-form,
.registry-action-button {
    width: 100%;
}

.registry-action-button {
    white-space: nowrap;
}

.registry-filter-actions {
    justify-content: flex-end;
}

.queue-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(300px, 0.9fr);
    gap: 1.5rem;
}

.sidebar-stack {
    display: grid;
    gap: 1.5rem;
    align-content: start;
}

.section-head-tight {
    margin-bottom: 0.75rem;
}

.review-table-wrap {
    margin-top: 1rem;
}

.review-table th,
.review-table td {
    vertical-align: middle;
}

.table-subcopy {
    color: var(--ink-soft);
    font-size: 0.84rem;
    margin-top: 0.2rem;
}

.table-action-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.table-action-stack form {
    margin: 0;
}

.table-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 5rem;
    padding: 0.62rem 0.8rem;
    font-size: 0.88rem;
}

.table-subcopy-strong {
    color: var(--ink-soft);
}

.empty-table-copy {
    padding: 1.25rem 1rem;
    text-align: center;
    color: var(--ink-soft);
}

.activity-mini-list {
    display: grid;
    gap: 0.75rem;
}

.mini-activity-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(27, 47, 71, 0.08);
}

.mini-activity-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.mini-activity-meta {
    display: grid;
    gap: 0.2rem;
    color: var(--ink-soft);
    font-size: 0.82rem;
    text-align: right;
}

.review-support-grid {
    align-items: start;
}

.support-stat-panel {
    display: grid;
    gap: 0.95rem;
}

.support-stat-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.support-stat-value {
    font-family: "Montserrat", system-ui, sans-serif;
    font-size: 2.4rem;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--ink);
}

.support-stat-value-text {
    font-size: 1.7rem;
    line-height: 1.1;
    text-align: right;
}

.support-stat-copy {
    margin: -0.2rem 0 0;
}

.activity-stack {
    margin-top: 1rem;
}

.activity-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.55rem;
}

.guest-row p,
.log-row p,
.compact {
    color: var(--ink-soft);
}

.guest-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.status-pill {
    display: inline-flex;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
}

.status-success {
    color: var(--green);
    background: rgba(104, 196, 153, 0.12);
}

.status-reserved {
    color: var(--ink);
    background: rgba(49, 86, 127, 0.08);
}

.status-muted {
    color: var(--ink-soft);
    background: rgba(27, 47, 71, 0.06);
}

.status-seat-success {
    color: var(--green);
    background: rgba(104, 196, 153, 0.12);
}

.status-seat-muted {
    color: var(--ink);
    background: rgba(49, 86, 127, 0.08);
}

.status-seat-warning {
    color: var(--accent);
    background: rgba(210, 75, 75, 0.12);
}

.text-link {
    color: var(--ink);
}

.admin-subnav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.98);
}

.admin-subnav-group {
    display: grid;
    gap: 0.55rem;
    align-content: start;
}

.admin-subnav-group-compact {
    align-content: end;
}

.admin-subnav-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--ink-soft);
    font-weight: 800;
    padding: 0 0.25rem;
}

.admin-subnav-link {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    color: var(--ink);
    background: rgba(247, 249, 251, 1);
    border: 1px solid rgba(27, 47, 71, 0.08);
    font-size: 0.92rem;
    font-weight: 700;
}

.admin-subnav-link.is-active {
    background: rgba(36, 71, 108, 0.1);
    border-color: rgba(36, 71, 108, 0.2);
    color: #24476c;
    box-shadow: none;
}

.action-card {
    display: block;
    padding: 1.1rem 1.15rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(27, 47, 71, 0.08);
}

.action-card strong {
    display: block;
    margin-bottom: 0.35rem;
}

.dashboard-workspace-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.record-card,
.danger-panel {
    padding: 1.2rem 1.25rem;
    border-radius: 18px;
    border: 1px solid rgba(27, 47, 71, 0.08);
    background: rgba(255, 255, 255, 0.98);
}

.record-card {
    display: grid;
    gap: 1rem;
}

.record-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.record-card-actions,
.danger-actions {
    display: flex;
    justify-content: flex-end;
}

.workspace-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
}

.review-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
}

.review-record-card {
    gap: 1.15rem;
}

.compact-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.danger-panel {
    margin-top: 1.25rem;
    background: rgba(255, 245, 245, 0.84);
    border-color: rgba(210, 75, 75, 0.18);
}

.danger-button {
    border-color: rgba(210, 75, 75, 0.24);
    color: var(--accent);
}

.staff-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
}

.summary-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(27, 47, 71, 0.08);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.74);
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
}

.summary-table th,
.summary-table td {
    padding: 0.95rem 1.05rem;
    text-align: left;
    border-bottom: 1px solid rgba(27, 47, 71, 0.08);
}

.summary-table th {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-soft);
    background: rgba(232, 241, 247, 0.9);
}

.summary-table tbody tr:last-child td {
    border-bottom: 0;
}

.export-shortcuts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.report-card {
    display: grid;
    gap: 0.9rem;
}

.report-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem;
}

.report-button {
    width: 100%;
    justify-content: center;
    text-align: center;
}

.report-table-wrap {
    margin-top: 0.75rem;
}

.report-table td:last-child {
    white-space: nowrap;
}

.stackable-summary-table td {
    overflow-wrap: anywhere;
}

.category-create-form,
.category-edit-form {
    align-items: start;
}

.toggle-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.toggle-grid-compact {
    margin-top: 0.25rem;
}

.toggle-card {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.95rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(27, 47, 71, 0.08);
    background: rgba(248, 251, 253, 0.98);
    cursor: pointer;
}

.toggle-card input[type="checkbox"] {
    margin-top: 0.2rem;
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    accent-color: #24476c;
}

.toggle-card span {
    display: grid;
    gap: 0.2rem;
}

.toggle-card strong {
    font-size: 0.95rem;
    line-height: 1.2;
}

.toggle-card small {
    color: var(--ink-soft);
    line-height: 1.35;
}

.pagination-wrap {
    margin-top: 1rem;
}

.pagination-wrap nav,
.pagination-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.pagination-meta {
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.pagination-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination-link {
    min-width: 2.35rem;
    height: 2.35rem;
    padding: 0 0.85rem;
    border-radius: 10px;
    border: 1px solid rgba(27, 47, 71, 0.08);
    background: rgba(255, 255, 255, 0.98);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--ink);
}

.pagination-link.is-active {
    background: #24476c;
    border-color: #24476c;
    color: white;
}

.pagination-link.is-disabled {
    color: var(--ink-soft);
    opacity: 0.48;
}

.pagination-link.is-prev,
.pagination-link.is-next {
    padding: 0 1rem;
}

.scanner-box {
    min-height: 320px;
    overflow: hidden;
}

.seating-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.seating-stat strong {
    font-size: 1.6rem;
}

.reserved-summary {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.seat-copy {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-top: 0.45rem;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--ink-soft);
}

.error-text {
    color: var(--accent);
    font-size: 0.85rem;
}

.align-end {
    align-self: end;
}

.hidden {
    display: none;
}

.pagination-wrap nav {
    margin-top: 1rem;
}

@media (max-width: 900px) {
    .memorial-hero,
    .login-layout,
    .operations-grid,
    .admin-grid,
    .queue-layout,
    .grid-two,
    .seating-summary-grid,
    .settings-grid,
    .stats-grid,
    .filters-grid,
    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .topbar,
    .page-hero,
    .section-head,
    .guest-row,
    .log-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .guest-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .record-card-head,
    .record-card-actions,
    .danger-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-actions,
    .activity-meta {
        width: 100%;
        align-items: flex-start;
    }

    .filter-actions {
        justify-content: stretch;
    }

    .settings-actions {
        justify-content: stretch;
    }

    .hero-card,
    .panel {
        border-radius: 26px;
    }

    .hero-copy {
        padding: 0.25rem 0;
    }

    .hero-portrait {
        min-height: 300px;
    }

    .search-row {
        grid-template-columns: 1fr;
    }

    .seating-settings-grid {
        grid-template-columns: 1fr;
    }

    .scanner-panel,
    .manual-panel {
        height: auto;
    }

    .manual-results,
    .guest-list-stack {
        min-height: unset;
        overflow: visible;
    }

    .guest-intake-grid,
    .registry-filter-grid,
    .review-filter-grid,
    .upload-form,
    .staff-form-grid,
    .export-shortcuts,
    .bulk-category-controls,
    .toggle-grid {
        grid-template-columns: 1fr;
    }

    .admin-subnav,
    .dashboard-workspace-grid,
    .review-actions-grid,
    .compact-stats-grid,
    .reports-grid {
        grid-template-columns: 1fr;
    }

    .guest-intake-notes {
        grid-column: auto;
    }

    .field-span-full {
        grid-column: auto;
    }

    .registry-filter-actions {
        justify-content: stretch;
    }

    .upload-form-actions,
    .registry-filter-actions {
        width: 100%;
    }

    .bulk-category-toolbar {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .workspace-badges,
    .record-card-actions,
    .danger-actions {
        justify-content: flex-start;
    }

    .pagination-wrap nav,
    .pagination-shell {
        align-items: flex-start;
        flex-direction: column;
    }

    .manual-panel .lookup-toolbar h2 {
        font-size: 1.35rem;
    }
}

@media (max-width: 1080px) {
    .registry-table-wrap {
        overflow: visible;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .registry-table {
        min-width: 0;
    }

    .registry-table thead {
        display: none;
    }

    .registry-table,
    .registry-table tbody,
    .registry-table tr,
    .registry-table td {
        display: block;
        width: 100%;
    }

    .registry-table tbody {
        display: grid;
        gap: 1.1rem;
    }

    .registry-table tbody tr {
        padding: 1.15rem 1.1rem;
        border-radius: 22px;
        border: 1px solid rgba(27, 47, 71, 0.08);
        background: rgba(255, 255, 255, 0.82);
        box-shadow: 0 18px 36px rgba(41, 72, 104, 0.08);
    }

    .registry-table td {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.35rem;
        padding: 0;
        border: 0;
        white-space: normal;
        background: transparent;
        overflow-wrap: normal;
        word-break: normal;
    }

    .registry-table td + td {
        margin-top: 0.9rem;
    }

    .registry-table td::before {
        content: attr(data-label);
        font-size: 0.76rem;
        text-transform: uppercase;
        letter-spacing: 0.14em;
        color: var(--ink-soft);
        font-weight: 700;
        margin-bottom: 0.1rem;
    }

    .registry-select-cell .checkbox-label {
        justify-content: flex-start;
    }

    .registry-name-cell strong {
        font-size: 1.05rem;
    }

    .registry-phone-cell,
    .registry-email-cell,
    .registry-guests-cell,
    .registry-category-cell,
    .registry-status-cell .status-pill,
    .registry-action-column .status-pill {
        white-space: normal;
        overflow-wrap: normal;
    }

    .registry-status-cell,
    .registry-action-column {
        align-items: start;
    }

    .registry-action-cell {
        justify-content: flex-start;
        width: 100%;
    }

    .registry-action-form,
    .registry-action-button {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .topbar,
    .page-wrap {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero-card {
        padding: 1.25rem;
    }

    .panel {
        padding: 1.2rem;
    }

    h1 {
        font-size: clamp(2rem, 8vw, 2.5rem);
        line-height: 1.02;
    }

    h2 {
        font-size: 1.45rem;
    }

    .page-hero-compact {
        padding: 1rem 1.1rem;
    }

    .admin-subnav {
        padding: 0.85rem;
    }

    .guest-management-stack {
        gap: 1.25rem;
    }

    .guest-management-stack > .panel {
        padding: 1.2rem;
    }

    .guest-intake-grid {
        gap: 1rem;
        margin-top: 1.25rem;
    }

    .memorial-hero {
        gap: 1.1rem;
    }

    .hero-portrait {
        min-height: 240px;
        background-position: center top;
    }

    .hero-name {
        font-size: 2rem;
    }

    .upload-help-card,
    .registry-table tbody tr {
        padding: 1rem;
    }

    .registry-filters-form,
    .upload-form,
    .registry-bulk-form {
        margin-top: 1.25rem;
    }

    .bulk-category-toolbar {
        padding: 1rem;
    }

    .toggle-card {
        padding: 0.85rem 0.9rem;
    }

    .registry-table td {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .registry-table td + td {
        margin-top: 0.85rem;
    }

    .primary-button,
    .secondary-button {
        width: 100%;
    }

    .ticket-card {
        margin-top: 1rem;
    }

    .qr-box {
        width: 180px;
        height: 180px;
        padding: 0.55rem;
    }

    .reserved-summary {
        gap: 0.5rem;
    }

    .guest-actions,
    .table-action-stack {
        width: 100%;
    }
}

@media (max-width: 760px) {
    .stackable-summary-wrap {
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .stackable-summary-table thead {
        display: none;
    }

    .stackable-summary-table,
    .stackable-summary-table tbody,
    .stackable-summary-table tr,
    .stackable-summary-table td {
        display: block;
        width: 100%;
    }

    .stackable-summary-table tbody {
        display: grid;
        gap: 0.9rem;
    }

    .stackable-summary-table tbody tr {
        padding: 1rem;
        border-radius: 16px;
        border: 1px solid rgba(27, 47, 71, 0.08);
        background: rgba(255, 255, 255, 0.98);
    }

    .stackable-summary-table td {
        padding: 0;
        border: 0;
        display: grid;
        grid-template-columns: minmax(96px, 116px) minmax(0, 1fr);
        gap: 0.5rem 0.75rem;
        align-items: start;
    }

    .stackable-summary-table td + td {
        margin-top: 0.7rem;
    }

    .stackable-summary-table td::before {
        content: attr(data-label);
        font-size: 0.74rem;
        text-transform: uppercase;
        letter-spacing: 0.14em;
        color: var(--ink-soft);
        font-weight: 800;
    }

    .stackable-summary-table .table-action-button {
        width: 100%;
    }

    .stackable-summary-table .empty-table-copy {
        display: block;
    }
}
