:root {
    --gx-ink: #16201d;
    --gx-muted: #66736e;
    --gx-canvas: #f4f3ed;
    --gx-surface: #ffffff;
    --gx-surface-soft: #f8f8f4;
    --gx-line: #e4e5df;
    --gx-sidebar: #17231f;
    --gx-sidebar-soft: #22302b;
    --gx-primary: #c8653b;
    --gx-primary-dark: #a94d29;
    --gx-accent: #e8a94f;
    --gx-sage: #4e7868;
    --gx-danger: #b7443e;
    --gx-shadow: 0 18px 50px rgba(31, 39, 35, 0.08);
    --gx-radius: 18px;
    --gx-sidebar-width: 270px;
    --bs-primary: var(--gx-primary);
    --bs-primary-rgb: 200, 101, 59;
    --bs-body-color: var(--gx-ink);
    --bs-body-bg: var(--gx-canvas);
    --bs-border-color: var(--gx-line);
    --bs-link-color: #466e60;
    --bs-link-hover-color: #2e5145;
    --bs-font-sans-serif: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--gx-sidebar);
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--gx-ink);
    background:
        radial-gradient(circle at 92% 0%, rgba(232, 169, 79, 0.12), transparent 25rem),
        var(--gx-canvas);
    font-size: 0.94rem;
    -webkit-font-smoothing: antialiased;
}

a {
    text-underline-offset: 0.16em;
}

.workflow-header {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 1.4rem;
}

.workflow-actions {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

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

.workflow-card {
    display: flex;
    min-height: 220px;
    overflow: hidden;
    flex-direction: column;
}

.workflow-card .card-body {
    flex: 1;
}

.workflow-card-title {
    margin: 0.55rem 0 0.3rem;
    font-size: 1.02rem;
    font-weight: 720;
}

.workflow-card-copy {
    color: var(--gx-muted);
    font-size: 0.73rem;
    line-height: 1.55;
}

.status-chip {
    display: inline-flex;
    width: fit-content;
    gap: 0.3rem;
    align-items: center;
    padding: 0.3rem 0.52rem;
    color: #5c5142;
    background: #f2eee6;
    border-radius: 99px;
    font-size: 0.64rem;
    font-weight: 720;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.status-chip.status-approved,
.status-chip.status-completed {
    color: #315e4d;
    background: #e3eee8;
}

.status-chip.status-review,
.status-chip.status-needs_review {
    color: #7d581e;
    background: #f8edda;
}

.status-chip.status-blocked,
.status-chip.status-failed,
.status-chip.status-cancelled {
    color: #893f39;
    background: #f5e6e3;
}

.status-chip.status-queued,
.status-chip.status-running {
    color: #4d557b;
    background: #e9eaf2;
}

.setup-gate {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    margin-bottom: 1.2rem;
    padding: 0.95rem 1rem;
    color: #654f2f;
    background: #fbf2df;
    border: 1px solid #ebd7af;
    border-radius: 0.9rem;
}

.setup-gate i {
    margin-top: 0.05rem;
    color: #a6712e;
}

.setup-gate strong,
.setup-gate small {
    display: block;
}

.setup-gate strong {
    font-size: 0.78rem;
}

.setup-gate small {
    margin-top: 0.16rem;
    font-size: 0.69rem;
    line-height: 1.5;
}

.builder-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.62fr);
    gap: 1rem;
    align-items: start;
}

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

.builder-step {
    display: inline-flex;
    width: 1.8rem;
    height: 1.8rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    color: #fff4e8;
    background: #a45d3c;
    border-radius: 0.55rem;
    font-size: 0.7rem;
    font-weight: 760;
}

.builder-section-title {
    display: flex;
    gap: 0.7rem;
    align-items: center;
}

.builder-section-title h2,
.builder-section-title p {
    margin: 0;
}

.builder-section-title h2 {
    font-size: 0.91rem;
    font-weight: 720;
}

.builder-section-title p {
    margin-top: 0.15rem;
    color: var(--gx-muted);
    font-size: 0.67rem;
}

.merge-field-row {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.merge-field {
    padding: 0.27rem 0.44rem;
    color: #445b52;
    background: #edf2ef;
    border: 0;
    border-radius: 0.38rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.64rem;
}

.message-preview {
    min-height: 240px;
    padding: 1rem;
    color: #2e3834;
    background: #fff;
    border: 1px solid var(--gx-line);
    border-radius: 0.8rem;
    font-size: 0.74rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

.preview-subject {
    margin-bottom: 0.75rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--gx-line);
    font-weight: 720;
}

.readiness-list {
    display: grid;
    gap: 0.65rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.readiness-list li {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    color: var(--gx-muted);
    font-size: 0.7rem;
    line-height: 1.45;
}

.readiness-list i {
    margin-top: 0.05rem;
    color: var(--gx-sage);
}

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

.recipient-stat {
    padding: 0.85rem;
    background: var(--gx-surface-soft);
    border: 1px solid var(--gx-line);
    border-radius: 0.78rem;
}

.recipient-stat strong,
.recipient-stat small {
    display: block;
}

.recipient-stat strong {
    font-size: 1.35rem;
    letter-spacing: -0.04em;
}

.recipient-stat small {
    margin-top: 0.14rem;
    color: var(--gx-muted);
    font-size: 0.64rem;
}

@media (max-width: 991.98px) {
    .workflow-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .builder-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .workflow-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .workflow-grid,
    .recipient-grid {
        grid-template-columns: 1fr;
    }
}

.skip-link {
    position: fixed;
    z-index: 1100;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.65rem 1rem;
    color: #fff;
    background: var(--gx-primary-dark);
    border-radius: 0.6rem;
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

.app-frame {
    min-height: 100vh;
}

.app-sidebar {
    position: fixed;
    z-index: 1040;
    inset: 0 auto 0 0;
    display: flex;
    width: var(--gx-sidebar-width);
    padding: 1.35rem 1rem 1rem;
    color: #f9faf7;
    background:
        radial-gradient(circle at 20% -5%, rgba(232, 169, 79, 0.18), transparent 14rem),
        var(--gx-sidebar);
    flex-direction: column;
    transition: transform 180ms ease;
}

.brand-lockup {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.15rem 0.35rem;
    color: #fff;
    text-decoration: none;
}

.brand-lockup:hover {
    color: #fff;
}

.brand-mark {
    display: inline-flex;
    width: 2.65rem;
    height: 2.65rem;
    align-items: center;
    justify-content: center;
    color: var(--gx-sidebar);
    background: linear-gradient(145deg, #f0bd6d, #d7794a);
    border-radius: 0.85rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.05em;
}

.brand-name,
.brand-subtitle {
    display: block;
}

.brand-name {
    font-size: 1.05rem;
    font-weight: 760;
    letter-spacing: -0.02em;
}

.brand-subtitle {
    margin-top: 0.08rem;
    color: #9facA7;
    font-size: 0.69rem;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.workspace-pill {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    margin: 1.5rem 0.25rem 1rem;
    padding: 0.72rem 0.8rem;
    color: #edf1ee;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.9rem;
    font-size: 0.82rem;
    font-weight: 620;
}

.workspace-pill small {
    display: block;
    margin-bottom: 0.05rem;
    color: #93a19b;
    font-size: 0.65rem;
    font-weight: 650;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.workspace-dot {
    width: 0.58rem;
    height: 0.58rem;
    background: #78aa91;
    border: 2px solid rgba(120, 170, 145, 0.25);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(120, 170, 145, 0.12);
}

.sidebar-nav {
    overflow-y: auto;
    padding: 0 0.15rem;
    scrollbar-color: #42514b transparent;
    scrollbar-width: thin;
}

.sidebar-nav::-webkit-scrollbar {
    width: 5px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: #42514b;
    border-radius: 99px;
}

.nav-section-label {
    margin: 0.85rem 0.7rem 0.45rem;
    color: #7f8f88;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.app-sidebar .nav-link {
    display: flex;
    gap: 0.72rem;
    align-items: center;
    margin: 0.16rem 0;
    padding: 0.67rem 0.72rem;
    color: #b8c2bd;
    border-radius: 0.72rem;
    font-size: 0.88rem;
    font-weight: 570;
    text-decoration: none;
    transition: color 140ms ease, background 140ms ease, transform 140ms ease;
}

.app-sidebar .nav-link i {
    width: 1.2rem;
    font-size: 1rem;
    text-align: center;
}

.app-sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.055);
    transform: translateX(2px);
}

.app-sidebar .nav-link.active {
    color: #fff;
    background: var(--gx-sidebar-soft);
    box-shadow: inset 3px 0 0 var(--gx-accent);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
}

.user-summary {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    padding: 0.7rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 0.9rem;
}

.user-avatar {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    color: #fff4e7;
    background: #8b5139;
    border-radius: 0.6rem;
    font-size: 0.78rem;
    font-weight: 750;
}

.user-copy {
    min-width: 0;
    flex: 1;
}

.user-copy strong,
.user-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-copy strong {
    color: #f5f7f5;
    font-size: 0.78rem;
}

.user-copy small {
    color: #8fa098;
    font-size: 0.68rem;
}

.app-main {
    min-height: 100vh;
    margin-left: var(--gx-sidebar-width);
}

.app-topbar {
    position: sticky;
    z-index: 1020;
    top: 0;
    display: flex;
    min-height: 72px;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem clamp(1rem, 3vw, 2.5rem);
    background: rgba(244, 243, 237, 0.88);
    border-bottom: 1px solid rgba(213, 216, 208, 0.8);
    backdrop-filter: blur(14px);
}

.sidebar-trigger {
    display: none !important;
}

.global-search {
    display: flex;
    width: min(34rem, 50vw);
    gap: 0.55rem;
    align-items: center;
    padding: 0.58rem 0.72rem;
    color: #7a8580;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid #dedfd9;
    border-radius: 0.75rem;
    transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.global-search:focus-within {
    background: #fff;
    border-color: #b8a285;
    box-shadow: 0 0 0 3px rgba(200, 101, 59, 0.1);
}

.global-search input {
    min-width: 0;
    color: var(--gx-ink);
    background: transparent;
    border: 0;
    outline: 0;
    flex: 1;
}

.global-search input::placeholder {
    color: #929b97;
}

.global-search-submit {
    display: inline-flex;
    padding: 0;
    align-items: center;
    justify-content: center;
    color: #7a8580;
    background: transparent;
    border: 0;
}

.global-search-submit:hover {
    color: var(--gx-primary-dark);
}

.global-search kbd {
    padding: 0.15rem 0.4rem;
    color: #7c8681;
    background: #f1f1ed;
    border: 1px solid #dedfd9;
    border-radius: 0.35rem;
    box-shadow: none;
    font-family: inherit;
    font-size: 0.66rem;
}

.topbar-actions {
    display: flex;
    gap: 0.65rem;
    align-items: center;
}

.warm-context {
    gap: 0.4rem;
    align-items: center;
    color: var(--gx-muted);
    font-size: 0.75rem;
    font-weight: 620;
}

.warm-context i {
    color: var(--gx-primary);
}

.app-content {
    width: min(100%, 1600px);
    margin: 0 auto;
    padding: clamp(1.25rem, 3vw, 2.6rem);
}

.main-content {
    padding: 0 !important;
}

.flash-stack {
    position: fixed;
    z-index: 1080;
    top: 5.2rem;
    right: 1.25rem;
    width: min(28rem, calc(100vw - 2rem));
}

.flash-stack .alert {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    box-shadow: var(--gx-shadow);
}

.sidebar-backdrop {
    display: none;
}

.icon-button {
    display: inline-flex;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    align-items: center;
    justify-content: center;
    color: var(--gx-muted);
    background: #fff;
    border: 1px solid var(--gx-line);
    border-radius: 0.65rem;
}

.icon-button:hover {
    color: var(--gx-ink);
    background: var(--gx-surface-soft);
}

.icon-button-dark {
    color: #aebbb5;
    background: transparent;
    border-color: rgba(255, 255, 255, 0.08);
}

.btn {
    --bs-btn-border-radius: 0.65rem;
    --bs-btn-font-weight: 650;
    --bs-btn-padding-x: 0.9rem;
    --bs-btn-padding-y: 0.52rem;
    font-size: 0.84rem;
}

.btn-primary {
    --bs-btn-bg: var(--gx-primary);
    --bs-btn-border-color: var(--gx-primary);
    --bs-btn-hover-bg: var(--gx-primary-dark);
    --bs-btn-hover-border-color: var(--gx-primary-dark);
    --bs-btn-active-bg: var(--gx-primary-dark);
    --bs-btn-active-border-color: var(--gx-primary-dark);
}

.btn-outline-primary {
    --bs-btn-color: var(--gx-primary-dark);
    --bs-btn-border-color: #d4a58f;
    --bs-btn-hover-bg: #fff3ec;
    --bs-btn-hover-border-color: #c98261;
    --bs-btn-hover-color: #8f3e20;
}

.card {
    background: rgba(255, 255, 255, 0.93);
    border: 1px solid var(--gx-line);
    border-radius: var(--gx-radius);
    box-shadow: 0 6px 24px rgba(34, 42, 38, 0.045);
}

.card-header,
.card-footer {
    padding: 1rem 1.2rem;
    background: transparent;
    border-color: var(--gx-line);
}

.card-body {
    padding: 1.2rem;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: #faf8f2;
    margin-bottom: 0;
    vertical-align: middle;
}

.table > :not(caption) > * > * {
    padding: 0.88rem 0.75rem;
    border-bottom-color: #ecece7;
}

.table thead th {
    color: #77817c;
    background: transparent !important;
    border-bottom-width: 1px;
    font-size: 0.68rem;
    font-weight: 720;
    letter-spacing: 0.055em;
    text-transform: uppercase;
    white-space: nowrap;
}

.form-control,
.form-select,
.input-group-text {
    min-height: 2.65rem;
    border-color: #dcded8;
    border-radius: 0.65rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #c89276;
    box-shadow: 0 0 0 0.2rem rgba(200, 101, 59, 0.1);
}

.form-label {
    color: #52605b;
    font-size: 0.76rem;
    font-weight: 680;
}

.badge {
    padding: 0.38em 0.62em;
    border-radius: 0.45rem;
    font-weight: 650;
}

.bg-success {
    background-color: var(--gx-sage) !important;
}

.bg-warning {
    color: #4f3512 !important;
    background-color: #e8b666 !important;
}

.bg-info {
    color: #fff !important;
    background-color: #557b83 !important;
}

.page-kicker {
    margin-bottom: 0.4rem;
    color: var(--gx-primary);
    font-size: 0.7rem;
    font-weight: 750;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.page-title {
    margin: 0;
    color: var(--gx-ink);
    font-size: clamp(1.75rem, 3vw, 2.45rem);
    font-weight: 740;
    letter-spacing: -0.045em;
    line-height: 1.05;
}

.page-subtitle {
    max-width: 46rem;
    margin: 0.6rem 0 0;
    color: var(--gx-muted);
    font-size: 0.93rem;
}

.auth-page {
    min-height: 100vh;
    color: #f8f4ea;
    background: var(--gx-sidebar);
}

.auth-layout {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(0, 1.12fr) minmax(430px, 0.88fr);
}

.auth-story {
    position: relative;
    display: flex;
    min-height: 100vh;
    overflow: hidden;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(2rem, 5vw, 5rem);
    background:
        radial-gradient(circle at 85% 15%, rgba(232, 169, 79, 0.2), transparent 19rem),
        linear-gradient(145deg, #17231f 0%, #20312b 62%, #2f4a40 100%);
}

.auth-story::after {
    position: absolute;
    right: -10rem;
    bottom: -13rem;
    width: 31rem;
    height: 31rem;
    content: "";
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    box-shadow:
        0 0 0 4rem rgba(255, 255, 255, 0.025),
        0 0 0 9rem rgba(255, 255, 255, 0.018);
}

.auth-brand {
    position: relative;
    z-index: 1;
    display: inline-flex;
    width: fit-content;
    gap: 0.72rem;
    align-items: center;
    color: #fff;
    text-decoration: none;
}

.auth-brand:hover {
    color: #fff;
}

.auth-brand .brand-mark {
    color: #fff8ea;
    background: linear-gradient(145deg, var(--gx-primary), #dc8a54);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.auth-brand .brand-name,
.auth-brand .brand-subtitle {
    display: block;
}

.auth-brand .brand-name {
    font-size: 1.02rem;
}

.auth-brand .brand-subtitle {
    color: rgba(255, 255, 255, 0.55);
}

.auth-story-copy {
    position: relative;
    z-index: 1;
    max-width: 44rem;
    margin-block: clamp(4rem, 12vh, 9rem);
}

.auth-kicker,
.auth-eyebrow {
    color: #e9b86d;
    font-size: 0.69rem;
    font-weight: 760;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.auth-story h1 {
    max-width: 42rem;
    margin: 0.85rem 0 1.25rem;
    font-size: clamp(2.8rem, 6vw, 5.8rem);
    font-weight: 710;
    letter-spacing: -0.065em;
    line-height: 0.96;
}

.auth-story-copy > p:last-child {
    max-width: 37rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.66);
    font-size: clamp(0.95rem, 1.4vw, 1.12rem);
    line-height: 1.7;
}

.auth-proof-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.auth-proof {
    display: flex;
    min-width: 0;
    gap: 0.68rem;
    align-items: flex-start;
    padding: 0.82rem;
    color: rgba(255, 255, 255, 0.57);
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 0.85rem;
    font-size: 0.67rem;
    line-height: 1.5;
}

.auth-proof i {
    color: #e9b86d;
    font-size: 0.95rem;
}

.auth-proof strong,
.auth-proof span {
    display: block;
}

.auth-proof strong {
    margin-bottom: 0.12rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.71rem;
}

.auth-panel {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 6vw, 5.5rem);
    color: var(--gx-ink);
    background:
        radial-gradient(circle at 100% 0%, rgba(232, 169, 79, 0.14), transparent 20rem),
        #f3f1e9;
}

.auth-card {
    width: min(100%, 31rem);
    padding: clamp(1.5rem, 4vw, 2.6rem);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(64, 76, 70, 0.11);
    border-radius: 1.35rem;
    box-shadow: 0 28px 80px rgba(31, 42, 37, 0.13);
    backdrop-filter: blur(14px);
}

.auth-card h2 {
    margin: 0.55rem 0 0.75rem;
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    font-weight: 730;
    letter-spacing: -0.045em;
}

.auth-card-copy {
    margin: 0 0 1.5rem;
    color: var(--gx-muted);
    font-size: 0.84rem;
    line-height: 1.65;
}

.auth-primary-action {
    display: grid;
    min-height: 3.55rem;
    grid-template-columns: auto 1fr auto;
    gap: 0.72rem;
    align-items: center;
    padding: 0.65rem 0.78rem;
    color: #fff;
    background: var(--gx-sidebar);
    border-radius: 0.8rem;
    box-shadow: 0 14px 30px rgba(23, 35, 31, 0.17);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 160ms ease, transform 160ms ease;
}

.auth-primary-action:hover {
    color: #fff;
    background: #243730;
    transform: translateY(-1px);
}

.auth-choice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.9rem 0;
    color: #87918c;
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    text-align: center;
}

.auth-choice::before,
.auth-choice::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #dce2de;
}

.auth-secondary-action {
    display: flex;
    width: 100%;
    min-height: 3.3rem;
    padding: 0.72rem 0.9rem;
    align-items: center;
    gap: 0.75rem;
    color: #24342f;
    background: #fff;
    border: 1px solid #cbd5d0;
    border-radius: 0.8rem;
    font-size: 0.84rem;
    font-weight: 720;
    text-decoration: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.auth-secondary-action:hover {
    color: #17231f;
    border-color: #8ca198;
    box-shadow: 0 0.55rem 1.25rem rgba(23, 35, 31, 0.08);
    transform: translateY(-1px);
}

.auth-secondary-action > .bi-arrow-right {
    margin-left: auto;
}

.auth-work-mark {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: #405b75;
    border-radius: 0.58rem;
}

.auth-legacy-note {
    margin: 0.55rem 0 0;
    color: #76827c;
    font-size: 0.68rem;
    line-height: 1.55;
    text-align: center;
}

.auth-wallet-mark {
    display: inline-flex;
    width: 2.15rem;
    height: 2.15rem;
    align-items: center;
    justify-content: center;
    color: #fffaf0;
    background: var(--gx-primary);
    border-radius: 0.62rem;
    font-size: 0.78rem;
    font-weight: 800;
}

.auth-trust-note {
    display: flex;
    gap: 0.48rem;
    align-items: center;
    margin-top: 0.75rem;
    color: #75817c;
    font-size: 0.66rem;
}

.auth-trust-note i {
    color: var(--gx-sage);
}

.auth-divider {
    height: 1px;
    margin: 1.55rem 0 1.2rem;
    background: var(--gx-line);
}

.auth-scope span {
    display: block;
    margin-bottom: 0.3rem;
    color: #4b5a54;
    font-size: 0.7rem;
    font-weight: 720;
}

.auth-scope p {
    margin: 0;
    color: #7a8580;
    font-size: 0.67rem;
    line-height: 1.55;
}

.auth-alert {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding: 0.72rem 0.78rem;
    color: #5f5749;
    background: #f7f1e4;
    border: 1px solid #e9dbc1;
    border-radius: 0.72rem;
    font-size: 0.7rem;
    line-height: 1.45;
}

.auth-alert-success {
    color: #365c4e;
    background: #eaf2ed;
    border-color: #cfe0d6;
}

.auth-alert-error {
    color: #7c413d;
    background: #f7eae7;
    border-color: #e7cac5;
}

.auth-footer {
    display: flex;
    width: min(100%, 31rem);
    justify-content: space-between;
    margin-top: 1rem;
    color: #7d8783;
    font-size: 0.64rem;
}

.auth-footer a {
    color: #506f64;
    text-decoration: none;
}

@media (max-width: 991.98px) {
    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-story {
        min-height: auto;
        padding: 2rem clamp(1.25rem, 6vw, 3.5rem) 2.5rem;
    }

    .auth-story-copy {
        margin-block: 4rem 3rem;
    }

    .auth-story h1 {
        max-width: 39rem;
        font-size: clamp(2.6rem, 10vw, 4.6rem);
    }

    .auth-panel {
        min-height: auto;
        padding-block: 4rem;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .app-sidebar {
        box-shadow: 18px 0 50px rgba(0, 0, 0, 0.22);
        transform: translateX(-105%);
    }

    .sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        z-index: 1035;
        inset: 0;
        display: block;
        visibility: hidden;
        background: rgba(13, 21, 18, 0.46);
        opacity: 0;
        transition: opacity 180ms ease, visibility 180ms ease;
    }

    .sidebar-open .sidebar-backdrop {
        visibility: visible;
        opacity: 1;
    }

    .app-main {
        margin-left: 0;
    }

    .sidebar-trigger {
        display: inline-flex !important;
        flex: 0 0 auto;
    }

    .app-topbar {
        min-height: 64px;
    }

    .global-search {
        width: auto;
        flex: 1;
    }
}

@media (max-width: 575.98px) {
    .auth-story {
        padding: 1.35rem 1rem 1.6rem;
    }

    .auth-story-copy {
        margin-block: 2.75rem 0;
    }

    .auth-story h1 {
        font-size: clamp(2.45rem, 14vw, 3.35rem);
    }

    .auth-proof-grid {
        display: none;
    }

    .auth-panel {
        padding: 1.35rem 0.85rem 2rem;
    }

    .auth-card {
        padding: 1.35rem;
        border-radius: 1rem;
    }

    .app-topbar {
        gap: 0.55rem;
        padding: 0.65rem 0.75rem;
    }

    .global-search {
        padding-inline: 0.6rem;
    }

    .global-search kbd {
        display: none;
    }

    .topbar-actions .btn {
        width: 2.35rem;
        padding-inline: 0;
    }

    .app-content {
        padding: 1.25rem 0.8rem 2rem;
    }

    .card {
        border-radius: 0.95rem;
    }

    .card-body {
        padding: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
.is-hidden { display: none; }
.bulk-select { width: 200px; }
.selection-column { width: 40px; }
.sortable-column,
.contact-row { cursor: pointer; }
.metric-card-people { --metric-color:#b55331; --metric-tint:#f7e9e1; }
.metric-card-owner { --metric-color:#44705f; --metric-tint:#e7f0eb; }
.metric-card-context { --metric-color:#9a6a22; --metric-tint:#f7edda; }
.metric-card-health { --metric-color:#526f84; --metric-tint:#e7eef2; }
.health-issue-phone { --issue-color:#8c6525; --issue-bg:#f7eedc; }
.health-issue-owner { --issue-color:#4e6d7c; --issue-bg:#e8eff2; }
.health-issue-list { --issue-color:#4a7564; --issue-bg:#e7f0eb; }
.health-issue-mismatch { --issue-color:#8d5148; --issue-bg:#f4e7e4; }
.health-issue-duplicate { --issue-color:#66568a; --issue-bg:#eeeaf5; }
.health-issue-suppressed { --issue-color:#8d3e3a; --issue-bg:#f5e6e3; }
.recipient-grid-two { grid-template-columns:repeat(2,minmax(0,1fr)); }
.recipient-grid-three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.error-page { background:linear-gradient(135deg,#667eea 0%,#764ba2 100%); }
.error-page-icon { color:#fff; font-size:8rem; opacity:.9; }
