@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;600;700&family=Noto+Sans+TC:wght@400;500;700&display=swap');

:root {
    --bg: #eef3ff;
    --bg-deep: #dce7ff;
    --panel: rgba(255, 255, 255, 0.9);
    --panel-strong: #ffffff;
    --ink: #10224f;
    --muted: #54688f;
    --line: #c1d1fb;
    --accent: #002b93;
    --accent-dark: #001e66;
    --accent-soft: #d9e5ff;
    --accent-pale: #f2f6ff;
    --success: #176845;
    --error: #a1283f;
    --shadow: 0 24px 60px rgba(0, 43, 147, 0.12);
    --radius: 24px;
    --font-body: "Open Sans", sans-serif;
    --font-cjk: "Noto Sans TC", "Noto Sans Traditional Chinese", sans-serif;
}

* {
    box-sizing: border-box;
}

html[lang="zh-Hant"] body,
html[lang="zh-Hant"] input,
html[lang="zh-Hant"] textarea,
html[lang="zh-Hant"] select,
html[lang="zh-Hant"] button {
    font-family: var(--font-cjk);
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(0, 43, 147, 0.16), transparent 30%),
        radial-gradient(circle at right 15%, rgba(82, 125, 255, 0.12), transparent 26%),
        linear-gradient(145deg, var(--bg) 0%, #ffffff 46%, var(--bg-deep) 100%);
}

body.landing-page {
    height:100vh;
    color: #eff4ff;
    background:
        radial-gradient(circle at top, rgba(81, 119, 255, 0.26), transparent 28%),
        linear-gradient(180deg, #0a2a78 0%, #061f5c 52%, #041846 100%);
}

body.login-page {
    color: #eff4ff;
    background:
        radial-gradient(circle at top, rgba(81, 119, 255, 0.2), transparent 24%),
        linear-gradient(180deg, #08256d 0%, #061f5c 58%, #051949 100%);
}

body.admin-page {
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(242, 246, 255, 0.86), rgba(255, 255, 255, 0.94)),
        var(--bg);
}

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

.shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 56px;
}

.shell-narrow {
    width: min(520px, calc(100% - 32px));
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.topbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 18px;
}

.topbar-centered {
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.topbar-split {
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.topbar-utility-links {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.topbar-utility-link {
    color: var(--muted);
    font-size: 0.94rem;
    font-weight: 700;
}

.landing-topbar {
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}

.landing-login-link {
    color: #dce6ff;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.topbar-compact {
    margin-bottom: 14px;
}

.admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 282px minmax(0, 1fr);
    transition: grid-template-columns 180ms ease;
}

.admin-shell.sidebar-collapsed {
    grid-template-columns: 88px minmax(0, 1fr);
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 20px 16px;
    overflow: hidden;
    color: #eaf0ff;
    background: linear-gradient(180deg, #08256d 0%, #061f5c 58%, #041846 100%);
    box-shadow: 18px 0 44px rgba(6, 31, 92, 0.16);
    z-index: 20;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
}

.admin-brand-logo {
    justify-content: center;
    min-height: 68px;
    padding: 4px 0;
}

.admin-brand-logo img {
    display: block;
    width: min(100%, 226px);
    max-height: 60px;
    object-fit: contain;
}

.admin-brand-mark,
.admin-nav a i,
.admin-sidebar-toggle i,
.admin-mobile-menu i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.admin-brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.admin-brand-text {
    min-width: 0;
}

.admin-brand-text span {
    display: block;
    color: #aebff2;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.admin-brand-text strong {
    display: block;
    color: #fff;
    font-size: 0.98rem;
    line-height: 1.35;
}

.admin-sidebar-toggle,
.admin-mobile-menu {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 0;
    font: inherit;
    cursor: pointer;
}

.admin-sidebar-toggle {
    justify-content: flex-start;
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    color: #dce6ff;
    background: rgba(255, 255, 255, 0.1);
    font-weight: 700;
}

.admin-nav {
    display: grid;
    gap: 8px;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 12px 14px;
    border-radius: 14px;
    color: #dce6ff;
    font-weight: 700;
    transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.admin-nav a:hover,
.admin-sidebar-toggle:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.14);
}

.admin-nav a.active {
    color: #061f5c;
    background: #fff;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.16);
}

.admin-nav a i,
.admin-sidebar-toggle i {
    width: 22px;
}

.admin-sidebar-footer {
    margin-top: auto;
}

.admin-language-switcher {
    width: 100%;
    justify-content: center;
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.admin-language-switcher a {
    color: #c8d6ff;
}

.admin-language-switcher a.active {
    color: #061f5c;
    background: #fff;
}

.admin-shell.sidebar-collapsed .admin-brand-text,
.admin-shell.sidebar-collapsed .admin-sidebar-toggle span,
.admin-shell.sidebar-collapsed .admin-nav span,
.admin-shell.sidebar-collapsed .admin-sidebar-footer {
    display: none;
}

.admin-shell.sidebar-collapsed .admin-brand,
.admin-shell.sidebar-collapsed .admin-sidebar-toggle,
.admin-shell.sidebar-collapsed .admin-nav a {
    justify-content: center;
}

.admin-main {
    min-width: 0;
    padding: 24px;
}

.admin-content-header {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(193, 209, 251, 0.9);
}

.admin-content-header h1 {
    margin-bottom: 8px;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1.12;
}

.admin-mobile-menu {
    display: none;
    padding: 11px 14px;
    border-radius: 14px;
    color: var(--accent-dark);
    background: var(--accent-soft);
    font-weight: 700;
}

.language-switcher {
    display: inline-flex;
    gap: 6px;
    padding: 6px;
    border-radius: 999px;
    border: 1px solid rgba(0, 43, 147, 0.12);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 12px 28px rgba(0, 43, 147, 0.08);
}

.language-switcher a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
    transition: 180ms ease;
}

.language-switcher a.active {
    color: #fff;
    background: linear-gradient(135deg, #1540ad, var(--accent));
}

.hero {
    display: grid;
    grid-template-columns: 1.7fr 0.8fr;
    gap: 24px;
    align-items: stretch;
    margin-bottom: 28px;
}

.hero-copy {
    padding: 42px;
}

.hero-card {
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    background:
        linear-gradient(180deg, rgba(242, 246, 255, 0.96), rgba(226, 236, 255, 0.94));
}

.hero-card-stack {
    align-items: flex-start;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.78rem;
    font-weight: 700;
}

.landing-page .eyebrow,
.landing-page .landing-login-link,
.landing-page .hero-label {
    color: #b9ccff;
}

h1,
h2,
h3,
h4,
p {
    margin-top: 0;
}

h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.05;
    margin-bottom: 16px;
}

h2 {
    font-size: 1.72rem;
    margin-bottom: 0;
}

h3 {
    font-size: 1.3rem;
}

.hero-text {
    max-width: 62ch;
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 0;
}

.landing-page .hero-text {
    color: rgba(239, 244, 255, 0.82);
}

.hero-label,
.hint,
.detail-label {
    color: var(--muted);
}

.panel {
    padding: 28px;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.action-panel {
    display: grid;
    gap: 16px;
    align-content: start;
}

.landing-brand {
    display: grid;
    justify-items: center;
    gap: 14px;
    margin: 8px 0 26px;
    text-align: center;
}

.landing-logo {
    width: min(180px, 42vw);
    height: auto;
    display: block;
}

.landing-hero {
    grid-template-columns: 1fr;
    margin-bottom: 24px;
}

.landing-hero-copy {
    text-align: center;
    padding: 56px 42px;
}

.landing-hero-copy .hero-text {
    margin: 0 auto;
}

.landing-actions {
    margin-top: 0;
}

.landing-cta-panel {
    display: grid;
    gap: 20px;
    justify-items: center;
    text-align: center;
    padding: 34px 28px;
    width: fit-content;
    margin: auto;
}

.landing-cta-text {
    max-width: 54ch;
}

.landing-cta-actions {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
}

.landing-cta-subline {
    width: 100%;
    display: flex;
    justify-content: flex-start;
}

.landing-inline-auth {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.landing-login-link-inline {
    color: #eff4ff;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.landing-signup-note {
    margin-bottom: 0;
    color: rgba(239, 244, 255, 0.8);
}

.landing-signup-link {
    color: #ffffff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.landing-page .button {
    background: linear-gradient(135deg, #ffffff, #d9e6ff);
    color: #07205d;
}

.button-landing-secondary {
    background: rgba(255, 255, 255, 0.08) !important;
    color: rgba(239, 244, 255, 0.92) !important;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: none !important;
}

.landing-page .language-switcher {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.landing-page .language-switcher a {
    color: #dce6ff;
}

.landing-page .language-switcher a.active {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.login-page .language-switcher {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: none;
}

.login-page .language-switcher a {
    color: #dce6ff;
}

.login-page .language-switcher a.active {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.login-page .landing-login-link,
.login-page .eyebrow {
    color: #b9ccff;
}

.login-brand {
    display: grid;
    justify-items: center;
    gap: 12px;
    text-align: center;
    margin: 16px 0 18px;
}

.login-logo {
    width: min(140px, 34vw);
}

.login-page .hero-text {
    max-width: 42ch;
    color: rgba(239, 244, 255, 0.82);
}

.login-panel-polished {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(18px);
}

.login-panel-polished label,
.login-panel-polished .text-link {
    color: #eff4ff;
}

.login-panel-polished input {
    background: rgba(255, 255, 255, 0.96);
}

.login-links {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.panel-head,
.profiles-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.submission-form,
.profile-card,
.profile-detail-card {
    display: grid;
    gap: 18px;
}

.grid {
    display: grid;
    gap: 18px;
}

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

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

label {
    display: grid;
    gap: 8px;
    font-size: 0.96rem;
}

label span {
    font-weight: 700;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--panel-strong);
    border-radius: 16px;
    padding: 13px 14px;
    font: inherit;
    color: var(--ink);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

input::placeholder,
textarea::placeholder {
    color: #7b8eb5;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0, 43, 147, 0.1);
    transform: translateY(-1px);
}

textarea {
    resize: vertical;
}

.field-hint {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.phone-input-group {
    display: grid;
    grid-template-columns: minmax(156px, 0.56fr) minmax(0, 1fr);
    gap: 10px;
}

.is-hidden {
    display: none !important;
}

.relationship-options-editor {
    display: grid;
    gap: 12px;
}

.relationship-options-title,
.relationship-option-head,
.relationship-option-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.relationship-options-title {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.relationship-option-head {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.relationship-option-row {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.62);
}

.relationship-option-row label span {
    display: none;
}

.button,
.button-secondary,
.text-button {
    cursor: pointer;
    border: 0;
    font: inherit;
}

.button,
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 700;
    transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

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

.button {
    color: #fff;
    background: linear-gradient(135deg, #1845ba, var(--accent));
}

.button-secondary {
    color: var(--accent-dark);
    background: var(--accent-soft);
}

.button-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 700;
    color: var(--accent);
    background: transparent;
    border: 1px solid rgba(0, 43, 147, 0.2);
}

.text-button,
.text-link {
    color: var(--accent);
    background: none;
    padding: 0;
    font-weight: 700;
}

.form-actions {
    display: flex;
    justify-content: flex-start;
}

.profiles-section {
    display: grid;
    gap: 18px;
}

.plaque-rows-wrapper {
    display: grid;
    gap: 14px;
}

.profile-card,
.profile-detail-card,
.submission-item {
    border-radius: 20px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(242, 246, 255, 0.88));
}

.profile-card,
.profile-detail-card {
    padding: 22px;
}

.profile-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.plaque-row-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.plaque-row-fields {
    align-items: start;
}

.alert {
    padding: 14px 16px;
    border-radius: 16px;
    margin-bottom: 20px;
}

.alert ul {
    margin: 0;
    padding-left: 18px;
}

.alert-success {
    background: rgba(23, 104, 69, 0.1);
    color: var(--success);
}

.alert-error {
    background: rgba(161, 40, 63, 0.1);
    color: var(--error);
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tabs a {
    padding: 12px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(0, 43, 147, 0.12);
    font-weight: 700;
}

.tabs a.active {
    background: var(--accent);
    color: #fff;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.3fr);
    gap: 24px;
}

.admin-records-layout {
    display: grid;
    gap: 24px;
}

.search-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin-bottom: 18px;
}

.filter-toolbar {
    display: grid;
    grid-template-columns: minmax(280px, 1.8fr) repeat(2, minmax(180px, 0.8fr)) auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 18px;
}

.filter-toolbar-wide {
    grid-template-columns: minmax(260px, 1.7fr) repeat(3, minmax(150px, 0.7fr)) auto;
}

.filter-field {
    display: grid;
    gap: 8px;
}

.filter-field-wide {
    min-width: 0;
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.csv-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin: -4px 0 18px;
}

.csv-import-form {
    display: flex;
    align-items: end;
    gap: 10px;
    flex-wrap: wrap;
}

.csv-file-field {
    min-width: min(320px, 100%);
}

.csv-toolbar .button,
.csv-import-form .button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.submission-list,
.profile-detail-list {
    display: grid;
    gap: 14px;
}

.submission-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 16px;
}

.submission-item.active {
    border-color: var(--accent);
    background: linear-gradient(180deg, rgba(217, 229, 255, 0.95), rgba(242, 246, 255, 0.9));
}

.empty-state {
    color: var(--muted);
    margin-bottom: 0;
}

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

.details-full {
    grid-column: 1 / -1;
}

.checkbox-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.checkbox-row input {
    width: auto;
}

.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line), transparent);
    margin: 10px 0 2px;
}

.table-wrap {
    overflow-x: auto;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.82);
}

.records-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
}

.records-table thead th {
    padding: 18px 16px;
    text-align: left;
    font-size: 0.9rem;
    color: var(--muted);
    background: linear-gradient(180deg, rgba(242, 246, 255, 0.98), rgba(230, 238, 255, 0.94));
    border-bottom: 1px solid var(--line);
}

.records-table tbody td {
    padding: 0.5%;
    border-bottom: 1px solid rgba(193, 209, 251, 0.7);
    vertical-align: middle;
    min-width: 168px;
}

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

.records-table tbody tr.is-selected {
    background: rgba(217, 229, 255, 0.42);
}

.records-table tbody tr:hover {
    background: rgba(242, 246, 255, 0.9);
}

.sort-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    font-weight: 700;
}

.sort-link.active {
    color: var(--accent);
}

.sort-icons {
    display: inline-flex;
    gap: 8px;
    font-size: 0.85rem;
    color: #8aa0d0;
}

.sort-icons .active {
    color: var(--accent);
}

.category-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--accent-pale);
    color: var(--accent-dark);
    font-size: 0.9rem;
    font-weight: 700;
}

.table-meta {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-weight: 700;
    border: 0;
    cursor: pointer;
}

.table-action i {
    font-size: 1rem;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.inline-delete-form {
    margin: 0;
}

.table-action-danger {
    background: rgba(161, 40, 63, 0.12);
    color: var(--error);
}

.table-empty {
    text-align: center;
    color: var(--muted);
}

.details-modal {
    width: min(860px, calc(100% - 24px));
    border: 1px solid rgba(0, 43, 147, 0.14);
    border-radius: 28px;
    padding: 0;
    box-shadow: 0 28px 80px rgba(0, 43, 147, 0.18);
    background: #fff;
}

.details-modal::backdrop {
    background: rgba(7, 18, 54, 0.45);
    backdrop-filter: blur(4px);
}

.details-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 24px 12px;
}

.details-modal-body {
    display: grid;
    gap: 22px;
    padding: 0 24px 24px;
}

.modal-section {
    padding: 20px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 246, 255, 0.9));
}

.modal-pairs p:last-child {
    margin-bottom: 0;
}

.login-panel {
    width: 100%;
}

@media (max-width: 900px) {
    .admin-shell,
    .admin-shell.sidebar-collapsed {
        display: block;
    }

    .admin-shell::after {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(7, 18, 54, 0.42);
        opacity: 0;
        pointer-events: none;
        transition: opacity 180ms ease;
        z-index: 15;
    }

    .admin-shell.sidebar-open::after {
        opacity: 1;
        pointer-events: auto;
    }

    .admin-sidebar {
        position: fixed;
        inset: 0 auto 0 -100%;
        width: min(84vw, 312px);
        height: 100vh;
        transform: none !important;
        transition: left 180ms ease;
    }

    .admin-shell.sidebar-open .admin-sidebar {
        left: 0;
        transform: none !important;
    }

    .admin-shell.sidebar-collapsed .admin-brand-text,
    .admin-shell.sidebar-collapsed .admin-sidebar-toggle span,
    .admin-shell.sidebar-collapsed .admin-nav span,
    .admin-shell.sidebar-collapsed .admin-sidebar-footer {
        display: block;
    }

    .admin-shell.sidebar-collapsed .admin-sidebar-toggle span,
    .admin-shell.sidebar-collapsed .admin-nav span {
        display: inline;
    }

    .admin-shell.sidebar-collapsed .admin-brand,
    .admin-shell.sidebar-collapsed .admin-sidebar-toggle,
    .admin-shell.sidebar-collapsed .admin-nav a {
        justify-content: flex-start;
    }

    .admin-main {
        padding: 16px;
    }

    .admin-content-header {
        display: grid;
        gap: 14px;
        margin-bottom: 18px;
    }

    .admin-mobile-menu {
        display: inline-flex;
        width: fit-content;
    }

    .hero,
    .action-grid,
    .dashboard-grid,
    .grid-two,
    .grid-three,
    .details-grid,
    .phone-input-group {
        grid-template-columns: 1fr;
    }

    .panel-head,
    .profiles-head,
    .submission-item,
    .search-row,
    .filter-toolbar {
        grid-template-columns: 1fr;
        display: grid;
    }

    .shell {
        width: min(100% - 24px, 1180px);
    }

    .hero-copy,
    .hero-card,
    .panel {
        padding: 22px;
    }

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

    .relationship-options-title,
    .relationship-option-head,
    .relationship-option-row {
        grid-template-columns: 1fr;
    }

    .relationship-option-head {
        display: none;
    }

    .relationship-option-row label span {
        display: block;
    }

    .table-wrap {
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .records-table {
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0 14px;
    }

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

    .records-table thead {
        display: none;
    }

    .records-table tbody tr {
        padding: 12px 14px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.88);
        box-shadow: 0 14px 30px rgba(0, 43, 147, 0.08);
    }

    .records-table tbody tr:hover {
        background: rgba(255, 255, 255, 0.92);
    }

    .records-table tbody td {
        display: grid;
        grid-template-columns: minmax(112px, 0.42fr) minmax(0, 1fr);
        gap: 14px;
        align-items: start;
        padding: 11px 0;
        border-bottom: 1px solid rgba(193, 209, 251, 0.62);
    }

    .records-table tbody td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 0.82rem;
        font-weight: 700;
        line-height: 1.45;
    }

    .records-table tbody td:last-child {
        border-bottom: 0;
        align-items: center;
    }

    .records-table tbody td:last-child::before {
        align-self: center;
    }

    .records-table .table-empty {
        display: block;
        padding: 18px 0;
    }

    .records-table .table-empty::before {
        content: none;
    }

    .topbar {
        justify-content: center;
    }

    .topbar-split,
    .topbar-utility-links {
        justify-content: center;
    }

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

    .csv-toolbar,
    .csv-import-form,
    .csv-toolbar .button,
    .csv-import-form .button {
        width: 100%;
    }
}
