:root {
    --public-ink: #243746;
    --public-navy: #23384a;
    --public-gold: #a98543;
    --public-olive: #6d7d5f;
    --public-cream: #f7f2e9;
    --public-sand: #ece2d2;
    --public-mist: #f8f6f1;
    --public-line: rgba(35, 56, 74, 0.12);
    --ink: #102033;
    --muted: #62748a;
    --line: #d9e2ec;
    --panel: #ffffff;
    --bg: #edf3f8;
    --brand: #0f6c5b;
    --brand-deep: #0a4d41;
    --brand-soft: #dff5ef;
    --shadow: 0 24px 60px rgba(16, 32, 51, 0.08);
    --radius: 18px;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: SF Pro Display, SF Pro Icons, Helvetica Neue, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(169, 133, 67, 0.12), transparent 28%),
        radial-gradient(circle at bottom right, rgba(109, 125, 95, 0.08), transparent 30%),
        linear-gradient(180deg, #fbf8f2 0%, #f5f3ee 100%);
    min-height: 100vh;
}

.public-shell::before,
.public-shell::after {
    content: "";
    position: fixed;
    z-index: -1;
    width: 26rem;
    height: 26rem;
    border-radius: 999px;
    filter: blur(22px);
    opacity: 0.45;
}

.public-shell::before {
    top: -9rem;
    right: -11rem;
    background: rgba(169, 133, 67, 0.18);
}

.public-shell::after {
    bottom: -11rem;
    left: -8rem;
    background: rgba(109, 125, 95, 0.12);
}

.public-brand {
    letter-spacing: -0.05em;
    line-height: 0.94;
}

.public-topbar {
    border-bottom: 1px solid rgba(16, 32, 51, 0.08);
}

.public-topbar-inner {
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: 1.15rem 1rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
}

.public-topbar-brand {
    min-height: 42px;
    display: flex;
    align-items: center;
}

.public-topbar-logo {
    display: block;
    max-width: min(220px, 44vw);
    max-height: 58px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.public-topbar-link {
    color: #243746;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.9rem;
    font-weight: 800;
    white-space: nowrap;
}

.public-topbar-link:hover {
    color: #0f6c5b;
}

.public-hero-scene {
    min-height: 42rem;
    display: flex;
    align-items: center;
    padding: 5.5rem 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background:
        linear-gradient(rgba(15, 23, 42, 0.64), rgba(15, 23, 42, 0.64)),
        linear-gradient(135deg, #102033 0%, #1f3858 52%, #2f4f76 100%);
}

.public-hero-inner,
.container {
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: 0 1rem;
}

.public-hero-copy {
    max-width: 48rem;
}

.public-eyebrow,
.public-kicker,
.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--public-gold);
}

.public-eyebrow::before,
.public-kicker::before {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.75;
}

.public-hero h1,
.h-display {
    font-size: clamp(3.3rem, 8vw, 5.7rem);
    color: #fff;
    margin: 0.5rem 0 1.5rem;
}

.public-hero-text {
    font-size: 1.15rem;
    line-height: 1.72;
    max-width: 42rem;
    color: rgba(255,255,255,0.88);
}

.branding-preview {
    border: 1px solid #d9e2ec;
    border-radius: 1rem;
    padding: .75rem;
    background: #f8fafc;
    overflow: hidden;
}

.branding-preview img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: .8rem;
}

.branding-preview--logo {
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.branding-preview--logo img {
    width: auto;
    max-width: 100%;
    max-height: 96px;
    object-fit: contain;
}

.branding-preview--wide {
    padding: 0;
    aspect-ratio: 16 / 9;
}

.branding-preview--wide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.public-btn-primary {
    background: linear-gradient(135deg, #274058 0%, #355772 100%);
    border: none;
    border-radius: 999px;
    padding: 0.9rem 1.5rem;
    font-weight: 700;
    color: #fff;
}

.public-story,
.public-form-wrap {
    padding: 4rem 0;
}

.public-story-panel,
.public-form-card,
.auth-card,
.page-hero,
.admin-card {
    background: rgba(255,255,255,0.92);
    border: 1px solid var(--public-line);
    border-radius: 2rem;
    box-shadow: 0 18px 45px rgba(35, 56, 74, 0.07);
}

.public-story-panel,
.public-form-card,
.auth-card,
.admin-card,
.page-hero {
    padding: 2rem;
}

.public-story-heading,
.public-form-title,
.page-hero h1,
.auth-card h1 {
    font-size: 2.2rem;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
}

.public-stat {
    height: 100%;
    padding: 1.5rem;
    border-radius: 1.5rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,246,241,0.98));
    border: 1px solid var(--public-line);
}

.public-stat h3,
.admin-card h2 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.auth-body {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.auth-shell {
    width: min(100%, 520px);
}

.auth-shell--wide {
    width: min(100%, 1120px);
}

.auth-stage {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 460px);
    background: rgba(255,255,255,0.9);
    border: 1px solid var(--public-line);
    border-radius: 2rem;
    box-shadow: 0 28px 70px rgba(35, 56, 74, 0.12);
    overflow: hidden;
}

.auth-stage__panel {
    padding: 2.5rem;
}

.auth-stage__panel--brand {
    background:
        linear-gradient(rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.58)),
        linear-gradient(135deg, #102033 0%, #1f3858 52%, #2f4f76 100%);
    color: #fff;
}

.auth-stage__panel--form {
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,246,241,0.98));
}

.auth-stage__headline {
    font-size: clamp(2.6rem, 4vw, 4rem);
    line-height: 0.96;
    letter-spacing: -0.05em;
    margin: 0 0 1.25rem;
}

.auth-stage__copy {
    font-size: 1.05rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.84);
    max-width: 34rem;
}

.auth-stage__notes {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
}

.auth-stage__note {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    padding: 1rem 1.1rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 1.2rem;
}

.auth-stage__note strong {
    display: block;
    margin-bottom: 0.2rem;
    color: #fff;
}

.auth-stage__note div:last-child {
    color: rgba(255,255,255,0.78);
}

.admin-layout {
    display: flex;
    min-height: 100vh;
    background: #f0f2f5;
}

.sidebar {
    min-height: 100vh;
    background: #1a2e4a;
    width: 230px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    padding: 1.1rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.admin-nav__eyebrow {
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: 11px;
    font-weight: 700;
}

.admin-nav__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 6px;
}

.admin-nav__meta {
    color: rgba(255,255,255,.72);
    font-size: 13px;
    margin-top: 6px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.7rem 0;
}

.sidebar-link {
    color: rgba(255,255,255,.86);
    text-decoration: none;
    padding: .65rem 1rem;
    border-radius: .5rem;
    margin: 0.1rem .5rem;
    font-size: .9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    line-height: 1.2;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(255,255,255,.12);
    color: #fff;
}

.sidebar-footer {
    margin-top: auto;
    padding: 0.85rem 0 1rem;
    border-top: 1px solid rgba(255,255,255,.1);
}

.sidebar-section {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,.35);
    padding: .35rem 1.5rem .45rem;
}

.main-content {
    flex: 1;
    min-height: 100vh;
    min-width: 0;
}

.page-header {
    background: #fff;
    border-bottom: 1px solid #e3e6ea;
    padding: .95rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.page-header__title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1b2b3d;
}

.page-header__user {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #5f6f80;
    font-size: .92rem;
}

.content-area {
    padding: 1.5rem;
}

.page-hero {
    margin-bottom: 22px;
    background: #fff;
    border: 1px solid #e3e6ea;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

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

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .85fr);
    gap: 1.5rem;
}

.submission-detail-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(440px, 1fr);
    align-items: start;
}

.clients-page-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(340px, 0.78fr);
    align-items: start;
}

.admin-stack {
    display: grid;
    gap: 1.5rem;
}

.client-directory {
    display: grid;
    gap: 1rem;
}

.client-directory__item {
    border: 1px solid #e3e6ea;
    border-radius: 1rem;
    padding: 1rem 1.1rem;
    background: #fbfcfe;
}

.client-directory__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.client-directory__name {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #23344d;
}

.client-directory__slug {
    margin-top: 0.3rem;
}

.client-directory__slug code {
    display: inline-block;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: 0.92rem;
}

.client-directory__details {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
    gap: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.client-directory__label {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #70829d;
    margin-bottom: 0.3rem;
    font-weight: 700;
}

.client-directory__value {
    color: #23344d;
    font-size: 1rem;
    line-height: 1.4;
}

.client-directory__staff-list {
    display: grid;
    gap: 0.55rem;
}

.client-directory__staff-user {
    display: grid;
    gap: 0.1rem;
}

.client-directory__staff-name {
    font-weight: 600;
    color: #23344d;
    line-height: 1.35;
}

.client-directory__staff-email {
    color: #6b7788;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.client-directory__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: flex-start;
}

.client-directory__actions .btn {
    font-size: 0.82rem;
    padding: 0.32rem 0.56rem;
    line-height: 1.2;
}

.client-directory__inline-form {
    margin: 0;
}

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

.clients-table {
    table-layout: fixed;
}

.clients-table__col-church {
    width: 16%;
}

.clients-table__col-staff {
    width: 25%;
}

.clients-table__col-slug {
    width: 16%;
}

.clients-table__col-title {
    width: 18%;
}

.clients-table__col-status {
    width: 8%;
}

.clients-table__col-actions {
    width: 30%;
}

.clients-table__church-name,
.clients-table__title {
    font-size: 1rem;
}

.clients-table__slug code {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.clients-table__staff-list {
    line-height: 1.35;
}

.clients-table__staff-user .text-muted {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.clients-table__actions-cell {
    text-align: left;
}

.clients-table__actions {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    justify-content: flex-start;
    flex-wrap: wrap;
    max-width: 100%;
}

.clients-table .btn {
    min-width: auto;
    font-size: 0.85rem;
    padding: 0.38rem 0.62rem;
    line-height: 1.2;
}

.clients-table__inline-form {
    margin: 0;
}

@media (max-width: 1199.98px) {
    .clients-table {
        table-layout: auto;
    }

    .clients-page-grid {
        grid-template-columns: 1fr;
    }
}

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

.metric-card,
.admin-card {
    background: #fff;
    border: 1px solid #e3e6ea;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.metric-card {
    padding: 1.35rem 1rem;
    text-align: center;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1f4f86;
    line-height: 1;
}

.metric-label {
    color: #6b7785;
    font-size: .82rem;
    margin-top: .45rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.admin-card {
    padding: 1.4rem;
}

.admin-card--wide {
    min-width: 0;
}

.admin-card__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-card__header h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
}

.admin-card__meta {
    color: #7b8794;
    font-size: .8rem;
}

.submission-page .page-hero {
    padding: 1.5rem;
}

.submission-page .page-kicker {
    font-size: 0.56rem;
    letter-spacing: 0.16em;
}

.submission-page .page-hero h1 {
    font-size: 1.65rem;
    margin-bottom: 0.7rem;
}

.submission-page .page-hero p {
    font-size: 0.86rem;
    line-height: 1.5;
    margin-bottom: 0;
}

.submission-page .admin-card {
    padding: 1.05rem;
}

.submission-page .admin-card__header {
    margin-bottom: 0.8rem;
}

.submission-page .admin-card__header h2 {
    font-size: 0.92rem;
}

.submission-page .admin-card__meta {
    font-size: 0.68rem;
}

.submission-page .table {
    font-size: 0.76rem;
}

.submission-page .table-responsive {
    overflow-x: auto;
}

.submission-page .table > :not(caption) > * > * {
    padding: 0.68rem 0.72rem;
}

.submission-page .fw-semibold {
    font-size: 0.9em;
}

.submission-page .small {
    font-size: 0.72rem !important;
}

.submission-page .text-muted,
.submission-page .text-secondary {
    font-size: 0.78rem;
}

.submission-page .badge {
    font-size: 0.66rem;
}

.submission-page .btn {
    font-size: 0.76rem;
}

.submission-form-cell {
    display: grid;
    gap: 0.32rem;
}

.submission-retention-flag {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    padding: 0.18rem 0.52rem;
    border-radius: 999px;
    background: #fff0f0;
    border: 1px solid rgba(191, 37, 37, 0.28);
    color: #bf2525;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    animation: submission-alert-blink 1.2s ease-in-out infinite;
}

@keyframes submission-alert-blink {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(191, 37, 37, 0.16);
    }

    50% {
        opacity: 0.45;
        box-shadow: 0 0 0 0.28rem rgba(191, 37, 37, 0.08);
    }
}

.request-overview-metrics {
    --bs-gutter-y: 0.75rem;
}

.request-overview-metric {
    padding: 0.15rem 0 0.35rem;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.request-overview-metric__label {
    font-size: 0.64rem;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7b8794;
    margin-bottom: 0.42rem;
}

.request-overview-metric__value {
    font-size: 0.98rem;
    line-height: 1.3;
    font-weight: 650;
    color: #233243;
    word-break: break-word;
}

.request-overview-inline-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #6b7785;
    margin-right: 0.35rem;
}

.request-overview-email {
    color: #1f4f86;
    text-decoration: none;
    font-weight: 650;
}

.request-overview-email:hover {
    color: #163b63;
    text-decoration: underline;
}

.submission-actions {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
}

.submission-page .list-group-item {
    font-size: 0.82rem;
}

.quick-links {
    display: grid;
    gap: .85rem;
}

.quick-link {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 1rem;
    padding: 1rem 1.05rem;
    border: 1px solid #e4e8ee;
    border-radius: .9rem;
    text-decoration: none;
    color: inherit;
    background: linear-gradient(180deg, #fff 0%, #fafbfd 100%);
}

.quick-link:hover {
    border-color: #c9d6e3;
    transform: translateY(-1px);
}

.quick-link i {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #edf3f8;
    color: #1f4f86;
    font-size: 1.1rem;
}

.quick-link strong {
    display: block;
    margin-bottom: .25rem;
    color: #1d2d40;
}

.quick-link span {
    color: #677482;
    font-size: .92rem;
}

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

.form-build-copy-grid__full {
    grid-column: 1 / -1;
}

.form-build-note {
    padding: 0.9rem 1rem;
    border: 1px solid #e4e8ee;
    border-radius: 0.9rem;
    background: linear-gradient(180deg, #fff 0%, #fafbfd 100%);
    color: #5f6f80;
    font-size: 0.92rem;
    line-height: 1.6;
}

.form-build-group-stack {
    display: grid;
    gap: 1.25rem;
}

.form-build-group-card {
    border: 1px solid #e3e9ef;
    border-radius: 1rem;
    padding: 1.15rem 1.1rem 1.2rem;
    background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%);
}

.form-build-group-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.form-build-group-card__header h3 {
    margin: 0.2rem 0 0;
    font-size: 1.18rem;
    color: #1f2e40;
}

.form-build-group-card__copy {
    margin: 0 0 1rem;
    color: #677482;
    font-size: 0.94rem;
    line-height: 1.65;
}

.form-build-trigger-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.form-build-trigger-pill,
.conditional-group-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.38rem 0.72rem;
    font-size: 0.72rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.form-build-trigger-pill {
    background: rgba(43, 111, 243, 0.08);
    color: #2357b9;
    border: 1px solid rgba(43, 111, 243, 0.14);
}

.conditional-group-grid {
    display: grid;
    gap: 1rem;
}

.conditional-group-card {
    border: 1px dashed #d4dce5;
    border-radius: 1rem;
    padding: 1rem;
    background: #fff;
}

.conditional-group-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.conditional-group-card__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
}

.conditional-group-card__header h4 {
    margin: 0;
    font-size: 1.03rem;
    color: #233243;
}

.conditional-group-card__header p {
    margin: 0.35rem 0 0;
    color: #677482;
    font-size: 0.9rem;
    line-height: 1.55;
}

.conditional-group-badge {
    background: rgba(15, 108, 91, 0.08);
    color: #0f6c5b;
    border: 1px solid rgba(15, 108, 91, 0.12);
    flex-shrink: 0;
}

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

.settings-toggle-card {
    border: 1px solid #dfe5eb;
    border-radius: 0.9rem;
    padding: 1.25rem 1.2rem;
    background: #fff;
    cursor: grab;
    transition: box-shadow 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
}

.settings-toggle-card:hover {
    border-color: #cfd8e3;
}

.settings-toggle-card.is-dragging {
    opacity: 0.65;
    box-shadow: 0 16px 40px rgba(16, 32, 51, 0.12);
    cursor: grabbing;
}

.settings-toggle-card.is-drag-over {
    border-color: #2b6ff3;
    box-shadow: 0 0 0 3px rgba(43, 111, 243, 0.12);
}

.settings-toggle-card__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.settings-toggle-card__main {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    flex: 1;
    min-width: 0;
}

.settings-toggle-card__content {
    flex: 1;
    min-width: 0;
}

.settings-toggle-card__eyebrow {
    font-size: .68rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #7b8794;
    margin-bottom: .25rem;
}

.settings-toggle-card h3 {
    font-size: 1.05rem;
    margin: 0;
    line-height: 1.4;
    color: #2a3443;
}

.settings-toggle-card p {
    margin: 0.55rem 0 0;
    color: #677482;
    font-size: 0.93rem;
    line-height: 1.55;
}

.settings-toggle-card__actions {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
}

.settings-card-switches {
    display: inline-flex;
    gap: 0.85rem;
    align-items: flex-end;
}

.settings-card-switch-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.18rem;
}

.settings-card-switch-label {
    font-size: 0.63rem;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7b8794;
}

.settings-card-switch {
    padding-top: 0;
    margin-right: 0;
    margin-bottom: 0;
}

.settings-card-switch .form-check-input {
    width: 2.1rem;
    height: 1.15rem;
}

.settings-toggle-card .badge {
    align-self: center;
}

.settings-drag-handle {
    cursor: grab;
    line-height: 1;
    align-self: flex-start;
    margin-top: 0.1rem;
    padding-inline: 0.55rem;
}

.settings-drag-handle:active {
    cursor: grabbing;
}

.settings-modal-open {
    overflow: hidden;
}

.settings-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
}

.settings-modal.is-open {
    display: block;
}

.settings-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.5);
}

.settings-modal__dialog {
    position: relative;
    width: min(100% - 2rem, 560px);
    margin: 7vh auto 0;
    background: #fff;
    border-radius: 1rem;
    border: 1px solid #dfe5eb;
    box-shadow: 0 24px 60px rgba(16, 32, 51, 0.18);
    overflow: hidden;
}

.settings-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.15rem 1.2rem;
    border-bottom: 1px solid #e8edf2;
}

.settings-modal__header h3 {
    margin: 0.25rem 0 0;
    font-size: 1.1rem;
    color: #2a3443;
}

.settings-modal__body {
    padding: 1.2rem;
}

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

.field-type-picker__item {
    text-align: left;
    border: 1px solid #dfe5eb;
    border-radius: 0.9rem;
    background: #fff;
    padding: 0.95rem 1rem;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.field-type-picker__item:hover {
    border-color: #2b6ff3;
    box-shadow: 0 0 0 3px rgba(43, 111, 243, 0.08);
    transform: translateY(-1px);
}

.field-type-picker__item strong {
    display: block;
    color: #233243;
    margin-bottom: 0.22rem;
}

.field-type-picker__item span {
    display: block;
    color: #677482;
    font-size: 0.86rem;
    line-height: 1.45;
}

.upload-id-header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.public-upload-id-spacer {
    height: 0.5rem;
}

.upload-id-header__icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    border: 1px solid #dbe5f0;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1c2b40;
    flex: 0 0 auto;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.04);
}

.upload-id-header__icon svg {
    width: 1.9rem;
    height: 1.9rem;
}

.upload-id-header__title {
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
    font-weight: 800;
    color: #122236;
    margin-bottom: 0.4rem;
}

.upload-id-header__text {
    color: #5e6f82;
    font-size: 1.04rem;
    line-height: 1.6;
    max-width: 42rem;
}

.upload-id-choice-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 1rem;
    border: 0;
    border-radius: 1rem;
    overflow: visible;
    background: transparent;
}

.upload-id-choice {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.35rem 1.35rem;
    border: 1.5px solid #d8e0e8;
    border-radius: 1.1rem;
    background: #fff;
    margin: 0;
    min-height: 9.25rem;
    flex: 1 1 0;
    min-width: 280px;
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease, box-shadow .18s ease, border-color .18s ease, transform .18s ease;
    text-align: left;
    appearance: none;
    box-shadow: 0 16px 36px rgba(17, 24, 39, 0.05);
}

.upload-id-choice:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 44px rgba(17, 24, 39, 0.08);
}

.upload-id-choice-art {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1f55d8;
    flex: 0 0 auto;
}

.upload-id-choice-art svg {
    width: 2rem;
    height: 2rem;
}

.upload-id-choice-copy {
    display: block;
    flex: 1 1 auto;
}

.upload-id-choice-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    background: #eaf1ff;
    color: #1f55d8;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.upload-id-choice-indicator {
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    border: 2px solid #c7d2e0;
    background: #fff;
    box-shadow: inset 0 0 0 4px #fff;
    flex: 0 0 auto;
    margin-top: 0.2rem;
}

.upload-id-choice.is-active {
    border-color: #2f6cf5;
    box-shadow: 0 20px 42px rgba(47, 108, 245, 0.14);
}

.upload-id-choice.is-active .upload-id-choice-copy,
.upload-id-choice.is-active .upload-id-choice-art {
    color: #1f55d8;
}

.upload-id-choice.is-active .upload-id-choice-indicator {
    border-color: #2f6cf5;
    box-shadow: inset 0 0 0 4px #fff;
    background: #2f6cf5;
}

.upload-id-panel {
    border: 1px solid #d8e0e8;
    border-radius: 1.4rem;
    background: #fff;
    padding: 1.55rem;
    box-shadow: 0 18px 44px rgba(17, 24, 39, 0.05);
}

.upload-id-panel-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #18263a;
    margin-bottom: 0.45rem;
}

.upload-id-panel-title--icon {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.upload-id-inline-icon {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #18263a;
    flex: 0 0 auto;
}

.upload-id-inline-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.upload-id-panel-subtitle {
    font-size: 1rem;
    font-weight: 800;
    color: #1f2d40;
    margin-bottom: 1rem;
}

.upload-id-panel-text {
    color: #58687b;
    line-height: 1.58;
    max-width: 34rem;
}

.upload-id-device-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.upload-id-device-copy {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.upload-id-device-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    background: #f1f6ff;
    color: #1f55d8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.upload-id-device-icon svg {
    width: 1.7rem;
    height: 1.7rem;
}

.upload-id-device-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
}

.upload-id-device-button {
    min-width: 10.5rem;
}

.upload-id-qr-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.9fr) minmax(220px, 0.8fr);
    gap: 1.75rem;
    align-items: start;
}

.upload-id-qr-column {
    min-width: 0;
}

.upload-id-qr-column--code,
.upload-id-qr-column--status {
    border-left: 1px dashed #d7e0ea;
    padding-left: 1.75rem;
}

.upload-id-step-list {
    list-style: none;
    padding: 0;
    margin: 1.15rem 0 1.35rem;
    display: grid;
    gap: 0.95rem;
}

.upload-id-step-list li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #1f2d40;
    font-weight: 500;
}

.upload-id-step-number {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 999px;
    background: #2f6cf5;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex: 0 0 auto;
}

.upload-id-security-note {
    border-top: 1px solid #e6edf5;
    padding-top: 1rem;
    display: grid;
    gap: 0.25rem;
}

.upload-id-qr-frame {
    display: inline-flex;
    background: #fff;
    border: 1px solid #e4ebf4;
    border-radius: 1.2rem;
    padding: 1rem;
    box-shadow: 0 18px 42px rgba(17, 24, 39, 0.08);
}

.upload-id-link-note {
    margin-top: 1rem;
    color: #1f55d8;
    font-size: 0.92rem;
    line-height: 1.5;
}

.upload-id-direct-link {
    display: inline-flex;
    align-items: center;
    margin-top: 0.35rem;
    color: #1f55d8;
    font-weight: 700;
    text-decoration: none;
}

.upload-id-direct-link:hover {
    text-decoration: underline;
}

.upload-id-status-icon {
    width: 4.4rem;
    height: 4.4rem;
    border-radius: 999px;
    background: #fff5dd;
    border: 1px solid #ffe19c;
    margin: 0.35rem 0 1rem;
    position: relative;
}

.upload-id-status-icon::before {
    content: "";
    position: absolute;
    inset: 1rem;
    border: 3px solid #f2b428;
    border-radius: 999px;
}

.upload-id-status-icon::after {
    content: "";
    position: absolute;
    width: 0.16rem;
    height: 1rem;
    background: #f2b428;
    left: calc(50% - 0.08rem);
    top: 1.18rem;
    transform-origin: bottom center;
    box-shadow: 0.44rem 0.36rem 0 -0.02rem #f2b428;
}

.upload-id-status-copy {
    color: #1c2b40;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 0.8rem;
}

.upload-id-status-note {
    margin-bottom: 0.9rem;
    line-height: 1.55;
}

.upload-id-status-button {
    border-radius: 999px;
}

.upload-id-phone-callout {
    margin-top: 1.45rem;
    border: 1px solid #f3d07a;
    background: linear-gradient(180deg, #fffdfa 0%, #fff8ea 100%);
    border-radius: 1rem;
    padding: 1rem 1.15rem;
}

.upload-id-phone-callout-title {
    color: #6c4e00;
    font-weight: 800;
    margin-bottom: 0.22rem;
}

@media (max-width: 768px) {
    .upload-id-header {
        flex-direction: column;
    }

    .upload-id-choice-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .upload-id-choice {
        min-width: 0;
        width: 100%;
        flex: initial;
        align-items: flex-start;
        flex-direction: column;
        min-height: 0;
    }

    .upload-id-panel {
        padding: 1.1rem;
    }

    .upload-id-device-panel,
    .upload-id-qr-layout {
        display: grid;
        grid-template-columns: 1fr;
    }

    .upload-id-qr-column--code,
    .upload-id-qr-column--status {
        border-left: 0;
        padding-left: 0;
        border-top: 1px dashed #d7e0ea;
        padding-top: 1.25rem;
    }
}


.public-signature-box {
    min-height: 140px;
    border: 1px dashed #b6c2cf;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #677482;
    background: #fff;
    padding: 1rem;
    text-align: center;
}

.public-field--compact-date .form-control {
    max-width: 220px;
}

.public-form-section {
    border-radius: 1.15rem;
    padding: 1rem;
}

.public-form-section--muted {
    background: #f5f7fa;
}

.public-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
}

.public-choice {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 3.9rem;
    padding: 0.95rem 1rem;
    border: 1px solid #d8e0e8;
    border-radius: 0.95rem;
    background: #fff;
    color: #1d2d40;
    font-size: 1.02rem;
    font-weight: 500;
    cursor: pointer;
}

.public-choice input[type="checkbox"] {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    flex: 0 0 auto;
}

.public-field--compact-choice .public-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.public-field--compact-choice .public-choice {
    min-height: 3.25rem;
    padding: 0.8rem 1rem;
}

.public-field--section-gap {
    margin-top: 0.9rem;
}

@media (max-width: 768px) {
    .public-field--compact-date .form-control {
        max-width: 100%;
    }

    .public-field--compact-choice .public-choice-grid {
        grid-template-columns: 1fr;
    }
}

.public-signature-pad {
    border: 1px solid #d8e0e8;
    border-radius: 1rem;
    background: #fff;
    overflow: hidden;
}

.public-signature-canvas {
    display: block;
    width: 100%;
    height: 170px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
    touch-action: none;
    cursor: crosshair;
}

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

.public-signature-meta {
    margin-top: 0.45rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.public-signature-help {
    margin-top: 0 !important;
    text-align: left;
}

.public-single-checkbox {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.1rem;
}

.public-single-checkbox .form-check-input {
    margin-top: 0.12rem;
}

.public-single-checkbox + .public-inline-error {
    min-height: 0;
    margin-top: 0.15rem;
}

@media (max-width: 768px) {
    .public-signature-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .public-signature-help {
        text-align: left;
    }
}

.public-form-card .form-text {
    margin-top: 0.38rem;
    font-size: 0.84rem;
    line-height: 1.45;
    color: #6b7785;
}

.public-inline-error {
    color: #b42318;
    font-size: .88rem;
    margin-top: .45rem;
    min-height: 1.1rem;
}

.form-control.is-invalid,
.form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 .18rem rgba(220, 53, 69, 0.12);
}

.notice {
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 18px;
}

.notice-success { background: #dff5ef; color: #0a4d41; }
.notice-danger { background: #fdecec; color: #b42318; }

.simple-list { margin: 0; padding-left: 1.2rem; }
.simple-list li + li { margin-top: 0.6rem; }

.auth-card {
    border-radius: 1.6rem;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: 0;
}

.auth-card h1 {
    color: #18283a;
}

.auth-card p {
    color: #657384;
}

.auth-stage__panel--form .auth-card {
    padding: 0;
}

.auth-stage__panel--form .form-control,
.auth-stage__panel--form .form-select,
.public-form-card .form-control,
.public-form-card .form-select {
    min-height: 3rem;
    border-radius: .9rem;
    border-color: #d8e0e8;
    box-shadow: none;
}

.auth-stage__panel--form .btn-primary,
.admin-main .btn-primary {
    background: linear-gradient(135deg, #274058 0%, #355772 100%);
    border: none;
    border-radius: 999px;
    padding: .78rem 1.25rem;
    font-weight: 700;
}

.protected-id-preview {
    user-select: none;
    -webkit-user-select: none;
}

.protected-id-preview__canvas {
    display: none;
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 1rem;
    margin: 0 auto;
    pointer-events: none;
}

.submission-page .submission-detail-grid > .admin-card:last-child {
    min-width: 0;
}

.protected-id-preview__empty {
    text-align: center;
}

.admin-divider {
    border-top: 1px solid #e2e8f0;
}

.workspace-preview-grid {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 1rem;
}

.workspace-preview {
    border-radius: 1rem;
    border: 1px solid #d9e2ec;
    overflow: hidden;
    min-height: 140px;
    position: relative;
}

.workspace-preview--sidebar {
    padding: 1rem;
}

.workspace-preview__bar {
    width: 78%;
    height: 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.1rem;
}

.workspace-preview__line {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    margin-bottom: 0.7rem;
}

.workspace-preview__line--short {
    width: 72%;
}

.workspace-preview--canvas {
    padding: 1rem;
}

.workspace-preview__card {
    background: #ffffff;
    border: 1px solid rgba(27, 43, 61, 0.08);
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    height: 64px;
    margin-bottom: 0.9rem;
}

.workspace-preview__card--small {
    width: 62%;
    height: 46px;
    margin-bottom: 0;
}

@media (max-width: 1200px) {
    .submission-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .public-topbar-inner {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    .public-topbar-logo {
        max-width: min(180px, 50vw);
        max-height: 48px;
    }
    .public-topbar-link {
        font-size: 0.78rem;
        letter-spacing: 0.1em;
    }
    .auth-stage {
        grid-template-columns: 1fr;
    }
    .admin-layout {
        display: block;
    }
    .sidebar {
        width: 100%;
        min-height: auto;
    }
    .admin-cards,
    .stats-grid,
    .content-grid,
    .form-build-copy-grid { grid-template-columns: 1fr; }
    .client-directory__top,
    .client-directory__details {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
    .form-build-group-card__header,
    .conditional-group-card__header {
        flex-direction: column;
    }
    .settings-toggle-card__header {
        flex-direction: column;
        align-items: flex-start;
    }
    .settings-toggle-card__main {
        width: 100%;
    }
    .settings-toggle-card__actions {
        flex-wrap: wrap;
        width: 100%;
        justify-content: flex-start;
    }
    .field-type-picker {
        grid-template-columns: 1fr;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .public-topbar-inner {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }
    .public-topbar-brand {
        justify-content: center;
        width: 100%;
    }
    .workspace-preview-grid {
        grid-template-columns: 1fr;
    }
}
