:root {
    --navy-950: #050d1c;
    --navy-900: #08162c;
    --navy-850: #0b1c38;
    --navy-800: #102748;
    --navy-700: #17385f;

    --red: #df1838;
    --red-dark: #b9122c;

    --bg: #f4f6f9;
    --surface: #ffffff;

    --text: #101827;
    --muted: #697586;
    --border: #e4e8ef;

    --success: #17865d;
    --warning: #d58b16;

    --sidebar-width: 270px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: var(--text);
    background: var(--bg);
}

button,
input {
    font: inherit;
}


/* LOGIN */

.login-body {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 32px;

    background:
        radial-gradient(
            circle at 20% 10%,
            #132f55 0,
            transparent 38%
        ),
        var(--navy-950);
}

.login-shell {
    width: 100%;
    max-width: 420px;
}

.login-brand {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo {
    display: block;

    max-width: 260px;
    max-height: 105px;

    object-fit: contain;

    margin: 0 auto 16px;
}

.login-brand-copy {
    color: #8d9aaf;
    font-size: 13px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.login-card {
    background: rgba(255, 255, 255, .98);

    border-radius: 18px;

    padding: 38px;

    box-shadow:
        0 30px 70px rgba(0, 0, 0, .35);
}

.login-card-header {
    margin-bottom: 30px;
}

.login-card-header h1 {
    margin: 7px 0 7px;
    font-size: 30px;
    color: var(--navy-900);
}

.login-card-header p {
    margin: 0;
    color: var(--muted);
}

.eyebrow {
    color: var(--red);

    font-size: 11px;
    font-weight: 800;

    letter-spacing: .16em;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;

    margin-bottom: 8px;

    font-size: 13px;
    font-weight: 700;

    color: #324056;
}

.form-group input {
    width: 100%;

    padding: 13px 14px;

    border: 1px solid #d7dce5;
    border-radius: 9px;

    outline: none;

    transition: .18s ease;
}

.form-group input:focus {
    border-color: var(--navy-700);

    box-shadow:
        0 0 0 3px rgba(23, 56, 95, .10);
}

.remember-row {
    display: flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 24px;

    color: var(--muted);
    font-size: 13px;
}

.btn {
    border: 0;
    border-radius: 9px;

    padding: 13px 20px;

    cursor: pointer;

    font-weight: 700;
}

.btn-primary {
    color: #fff;
    background: var(--red);
}

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

.btn-full {
    width: 100%;
}

.alert {
    padding: 12px 14px;

    margin-bottom: 20px;

    border-radius: 8px;

    font-size: 13px;
}

.alert-error {
    background: #fff0f2;
    color: #a31329;
}


/* FALLBACK LOGO */

.brand-fallback {
    font-size: 38px;
    font-weight: 300;
    letter-spacing: -2px;

    color: #fff;
}

.brand-fallback .brand-core {
    font-weight: 800;
    color: #193963;
}

.brand-sidebar {
    font-size: 29px;
}


/* APP */

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

.sidebar {
    position: fixed;

    left: 0;
    top: 0;
    bottom: 0;

    width: var(--sidebar-width);

    display: flex;
    flex-direction: column;

    background:
        linear-gradient(
            180deg,
            var(--navy-950),
            var(--navy-900)
        );

    color: #fff;

    z-index: 20;
}

.sidebar-brand {
    height: 92px;

    display: flex;
    align-items: center;

    padding: 17px 23px;

    border-bottom:
        1px solid rgba(255, 255, 255, .07);
}

.sidebar-logo {
    max-width: 190px;
    max-height: 62px;

    object-fit: contain;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 14px;

    overflow-y: auto;
}

.nav-section-label {
    padding: 10px 13px 8px;

    color: #687996;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: .15em;
}

.nav-item {
    min-height: 43px;

    display: flex;
    align-items: center;

    gap: 12px;

    padding: 10px 13px;

    margin: 3px 0;

    border-radius: 8px;

    color: #aebbd0;

    font-size: 14px;

    text-decoration: none;
}

.nav-item.active {
    color: #fff;

    background:
        linear-gradient(
            90deg,
            rgba(223, 24, 56, .18),
            rgba(223, 24, 56, .05)
        );

    box-shadow:
        inset 3px 0 0 var(--red);
}

.nav-item:not(.nav-disabled):hover {
    color: #fff;
    background: rgba(255, 255, 255, .05);
}

.nav-icon {
    width: 21px;

    text-align: center;

    font-size: 17px;
}

.nav-disabled {
    opacity: .48;
    cursor: default;
}

.nav-divider {
    height: 1px;

    margin: 17px 10px;

    background: rgba(255, 255, 255, .07);
}

.sidebar-bottom {
    padding: 18px;

    border-top:
        1px solid rgba(255, 255, 255, .07);
}

.user-mini {
    display: flex;
    align-items: center;

    gap: 11px;

    margin-bottom: 14px;
}

.user-avatar {
    width: 35px;
    height: 35px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--red);

    color: #fff;

    font-weight: 800;
}

.user-mini-info {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.user-mini-info strong {
    font-size: 12px;
}

.user-mini-info small {
    max-width: 160px;

    overflow: hidden;

    color: #74839c;

    font-size: 10px;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-button {
    width: 100%;

    padding: 8px 10px;

    border:
        1px solid rgba(255, 255, 255, .10);

    border-radius: 7px;

    background: transparent;

    color: #8f9db2;

    cursor: pointer;

    font-size: 11px;
}

.logout-button:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, .22);
}


.main-area {
    min-height: 100vh;

    margin-left: var(--sidebar-width);
}

.topbar {
    height: 78px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 34px;

    background: #fff;

    border-bottom: 1px solid var(--border);
}

.topbar-switchers {
    display: flex;
    align-items: center;
    gap: 28px;
}

.project-switcher-wrap {
    min-width: 220px;
    margin: 0;
}


.topbar-label {
    margin-bottom: 4px;

    color: #8994a4;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: .08em;
    text-transform: uppercase;
}

.client-selector {
    min-width: 180px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;

    padding: 7px 10px;

    border: 0;

    background: transparent;

    color: var(--navy-900);

    font-weight: 700;
}

.system-status {
    display: flex;
    align-items: center;

    gap: 8px;

    color: var(--muted);

    font-size: 12px;
}

.status-dot {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: var(--success);

    box-shadow:
        0 0 0 4px rgba(23, 134, 93, .10);
}

.page-content {
    padding: 36px;
}

.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    margin-bottom: 28px;
}

.page-heading h1 {
    margin: 6px 0 5px;

    color: var(--navy-900);

    font-size: 31px;

    letter-spacing: -.03em;
}

.page-heading p {
    margin: 0;

    color: var(--muted);

    font-size: 14px;
}


/* DASHBOARD */

.stats-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 18px;

    margin-bottom: 20px;
}

.stat-card {
    padding: 22px;

    background: #fff;

    border: 1px solid var(--border);
    border-radius: 12px;
}

.stat-label {
    color: var(--muted);

    font-size: 12px;
    font-weight: 700;
}

.stat-value {
    margin: 8px 0 2px;

    color: var(--navy-900);

    font-size: 34px;
    font-weight: 800;

    letter-spacing: -.04em;
}

.stat-meta {
    color: #98a1af;

    font-size: 11px;
}

.dashboard-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1.35fr)
        minmax(320px, .65fr);

    gap: 20px;
}

.panel {
    padding: 23px;

    background: #fff;

    border: 1px solid var(--border);
    border-radius: 12px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 20px;
}

.panel-header h2 {
    margin: 4px 0 0;

    color: var(--navy-900);

    font-size: 18px;
}

.panel-kicker {
    color: var(--red);

    font-size: 9px;
    font-weight: 800;

    letter-spacing: .15em;
}

.signal-list {
    display: flex;
    flex-direction: column;
}

.signal-item {
    display: grid;

    grid-template-columns:
        39px 1fr auto;

    align-items: center;

    gap: 13px;

    padding: 16px 0;

    border-bottom: 1px solid var(--border);
}

.signal-item:last-child {
    border-bottom: 0;
}

.signal-icon {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    font-weight: 900;
}

.signal-icon.danger {
    color: var(--red);
    background: #fff0f2;
}

.signal-icon.warning {
    color: var(--warning);
    background: #fff8e7;
}

.signal-icon.neutral {
    color: var(--navy-700);
    background: #eef3f9;
}

.signal-copy {
    display: flex;
    flex-direction: column;

    gap: 3px;
}

.signal-copy strong {
    font-size: 13px;
}

.signal-copy span {
    color: var(--muted);

    font-size: 11px;
}

.signal-number {
    min-width: 35px;

    color: var(--navy-900);

    font-size: 19px;
    font-weight: 800;

    text-align: right;
}

.system-flow {
    display: flex;
    flex-direction: column;
}

.flow-item {
    display: flex;
    align-items: center;

    gap: 13px;

    padding: 12px;

    border-radius: 9px;

    background: #f7f9fc;
}

.flow-item > span {
    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 28px;

    border-radius: 7px;

    color: #fff;
    background: var(--navy-800);

    font-size: 9px;
    font-weight: 800;
}

.flow-item div {
    display: flex;
    flex-direction: column;

    gap: 2px;
}

.flow-item strong {
    color: var(--navy-900);
    font-size: 12px;
}

.flow-item small {
    color: var(--muted);
    font-size: 10px;
}

.flow-arrow {
    padding: 2px 0;

    color: #aeb7c3;

    text-align: center;
}


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

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}


/* CLIENTS */

.page-heading-actions {
    gap: 24px;
}

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

.btn-secondary {
    color: var(--navy-900);
    background: #e9eef5;
}

.btn-secondary:hover:not(:disabled) {
    background: #dfe6ef;
}

.btn-light {
    color: var(--navy-900);
    background: #fff;
    border: 1px solid var(--border);
    text-decoration: none;
}

.btn-light:hover {
    border-color: #c8d0dc;
    background: #f8fafc;
}

.btn-small {
    padding: 9px 13px;
    font-size: 12px;
    text-decoration: none;
}

.btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.alert-success {
    background: #eaf8f2;
    color: #146a4b;
    border: 1px solid #cdeade;
}

.error-list {
    margin: 8px 0 0;
    padding-left: 18px;
}

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

.client-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 22px;
}

.client-card-top {
    display: grid;
    grid-template-columns: 46px 1fr auto;
    gap: 13px;
    align-items: center;
}

.client-avatar {
    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background: var(--navy-900);
    color: #fff;

    font-size: 18px;
    font-weight: 800;
}

.client-card-heading h2 {
    margin: 0 0 3px;
    color: var(--navy-900);
    font-size: 17px;
}

.client-card-heading a,
.client-card-heading span {
    color: var(--muted);
    font-size: 11px;
    text-decoration: none;
}

.status-badge {
    padding: 5px 8px;
    border-radius: 999px;

    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.status-active {
    color: #13704e;
    background: #e7f7f0;
}

.status-inactive {
    color: #8b6413;
    background: #fff5dc;
}

.status-archived {
    color: #667085;
    background: #eef1f5;
}

.client-card-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);

    margin: 20px 0;

    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.client-card-metrics > div {
    padding: 15px 8px;
    text-align: center;
}

.client-card-metrics strong {
    display: block;
    color: var(--navy-900);
    font-size: 18px;
}

.client-card-metrics span {
    color: var(--muted);
    font-size: 9px;
}

.client-goal {
    margin-bottom: 18px;
}

.client-goal span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.client-goal p {
    margin: 5px 0 0;

    color: #3c4758;
    font-size: 12px;
    line-height: 1.55;
}

.client-card-actions {
    display: flex;
    gap: 8px;
}

.empty-state {
    padding: 70px 30px;

    background: #fff;
    border: 1px dashed #ccd4df;
    border-radius: 13px;

    text-align: center;
}

.empty-state-icon {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto 16px;

    border-radius: 12px;

    color: #fff;
    background: var(--red);

    font-size: 26px;
}

.empty-state h2 {
    color: var(--navy-900);
}

.empty-state p {
    max-width: 470px;
    margin: 0 auto 25px;

    color: var(--muted);
    font-size: 13px;
}

.form-panel {
    max-width: 920px;
}

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

.form-span-2 {
    grid-column: span 2;
}

.form-group select,
.form-group textarea {
    width: 100%;

    padding: 13px 14px;

    border: 1px solid #d7dce5;
    border-radius: 9px;

    outline: none;

    color: var(--text);
    background: #fff;

    font: inherit;
}

.form-group textarea {
    resize: vertical;
}

.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--navy-700);

    box-shadow:
        0 0 0 3px rgba(23, 56, 95, .10);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;

    margin-top: 12px;
    padding-top: 20px;

    border-top: 1px solid var(--border);
}

.client-detail-list {
    display: flex;
    flex-direction: column;
}

.client-detail-list > div {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 20px;

    padding: 14px 0;

    border-bottom: 1px solid var(--border);
}

.client-detail-list > div:last-child {
    border-bottom: 0;
}

.client-detail-list span {
    color: var(--muted);
    font-size: 11px;
}

.client-detail-list strong {
    color: var(--navy-900);
    font-size: 12px;
    font-weight: 700;
}

.setup-list {
    display: flex;
    flex-direction: column;
}

.setup-row {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    gap: 11px;
    align-items: center;

    padding: 13px 0;

    border-bottom: 1px solid var(--border);
}

.setup-row:last-child {
    border-bottom: 0;
}

.setup-number {
    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 7px;

    background: #eef3f9;
    color: var(--navy-700);

    font-size: 9px;
    font-weight: 800;
}

.setup-row div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.setup-row strong {
    font-size: 12px;
    color: var(--navy-900);
}

.setup-row small {
    font-size: 10px;
    color: var(--muted);
}

.setup-state {
    padding: 4px 7px;

    border-radius: 999px;

    color: var(--red);
    background: #fff0f2;

    font-size: 8px;
    font-weight: 800;

    text-transform: uppercase;
}

.client-secondary-panel {
    margin-top: 20px;
}

.mini-stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.mini-stat-row > div {
    padding: 10px 18px;

    border-right: 1px solid var(--border);
}

.mini-stat-row > div:last-child {
    border-right: 0;
}

.mini-stat-row strong {
    display: block;

    color: var(--navy-900);

    font-size: 24px;
}

.mini-stat-row span {
    color: var(--muted);
    font-size: 10px;
}

.client-switcher-wrap {
    min-width: 240px;
}

.client-selector {
    min-width: 220px;

    padding: 5px 30px 5px 0;

    border: 0;
    outline: none;

    background: #fff;

    color: var(--navy-900);

    font-weight: 700;

    cursor: pointer;
}


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

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-span-2 {
        grid-column: auto;
    }

    .page-heading-actions {
        flex-direction: column;
    }
}


/* =========================================================
   CLIENT LIST - FINAL LAYOUT FIX
   ========================================================= */

.client-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

.client-card {
    display: flex;
    flex-direction: column;

    min-width: 0;
    min-height: 285px;

    padding: 24px;

    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;

    box-shadow:
        0 1px 2px rgba(16, 24, 40, .02),
        0 5px 18px rgba(16, 24, 40, .025);

    transition:
        border-color .18s ease,
        box-shadow .18s ease,
        transform .18s ease;
}

.client-card:hover {
    border-color: #d2d9e4;

    box-shadow:
        0 2px 5px rgba(16, 24, 40, .035),
        0 10px 30px rgba(16, 24, 40, .045);

    transform: translateY(-1px);
}


/* CARD HEADER */

.client-card-top {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
}

.client-avatar {
    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 46px;

    margin: 0;

    border-radius: 11px;

    background: var(--navy-900);
    color: #ffffff;

    font-size: 17px;
    font-weight: 800;
    line-height: 1;
}

.client-card-heading {
    min-width: 0;
}

.client-card-heading h2 {
    margin: 0 0 5px;

    color: var(--navy-900);

    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;

    letter-spacing: -.015em;
}

.client-card-heading a,
.client-card-heading span {
    display: block;

    max-width: 100%;

    overflow: hidden;

    color: var(--muted);

    font-size: 11px;
    line-height: 1.4;

    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-card-heading a:hover {
    color: var(--navy-700);
    text-decoration: underline;
}


/* STATUS */

.status-badge {
    display: inline-flex;
    align-items: center;

    padding: 5px 9px;

    border-radius: 999px;

    font-size: 9px;
    font-weight: 800;
    line-height: 1;

    letter-spacing: .06em;
    text-transform: uppercase;

    white-space: nowrap;
}

.status-active {
    color: #13704e;
    background: #e7f7f0;
}

.status-inactive {
    color: #8b6413;
    background: #fff5dc;
}

.status-archived {
    color: #667085;
    background: #eef1f5;
}


/* MINI METRICS */

.client-card-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));

    margin: 21px 0 18px;

    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.client-card-metrics > div {
    position: relative;

    min-width: 0;

    padding: 15px 7px;

    text-align: center;
}

.client-card-metrics > div:not(:last-child)::after {
    content: "";

    position: absolute;

    top: 13px;
    right: 0;
    bottom: 13px;

    width: 1px;

    background: var(--border);
}

.client-card-metrics strong {
    display: block;

    margin-bottom: 3px;

    color: var(--navy-900);

    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}

.client-card-metrics span {
    display: block;

    overflow: hidden;

    color: var(--muted);

    font-size: 9px;
    line-height: 1.35;

    text-overflow: ellipsis;
}


/* BUSINESS GOAL */

.client-goal {
    margin: 0 0 19px;
}

.client-goal > span {
    display: block;

    margin-bottom: 5px;

    color: #8994a4;

    font-size: 9px;
    font-weight: 800;

    letter-spacing: .08em;
    text-transform: uppercase;
}

.client-goal p {
    display: -webkit-box;

    overflow: hidden;

    margin: 0;

    color: #3d4859;

    font-size: 11px;
    line-height: 1.5;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}


/* ACTIONS */

.client-card-actions {
    display: flex;
    align-items: center;

    gap: 9px;

    margin-top: auto;
    padding-top: 4px;
}

.client-card-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 38px;

    padding: 9px 14px;

    border-radius: 8px;

    font-size: 11px;
    font-weight: 700;

    text-decoration: none;
}

.client-card-actions .btn-primary {
    background: var(--red);
    color: #ffffff;
}

.client-card-actions .btn-primary:hover {
    background: var(--red-dark);
}

.client-card-actions .btn-light {
    background: #ffffff;
    color: var(--navy-900);

    border: 1px solid var(--border);
}

.client-card-actions .btn-light:hover {
    background: #f8fafc;
    border-color: #c8d0dc;
}


/* CLIENT PAGE HEADER */

.page-heading-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 30px;
}

.page-heading-actions .page-actions {
    flex: 0 0 auto;

    display: flex;
    align-items: center;

    gap: 10px;
}

.page-heading-actions .page-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;

    padding: 10px 16px;

    text-decoration: none;
}


/* RESPONSIVE */

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

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

    .page-heading-actions {
        flex-direction: column;
    }

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

    .client-card-metrics > div:nth-child(2)::after {
        display: none;
    }
}


/* CLIENT FINANCIAL TARGETS */

.field-help {
    display: block;

    margin-top: 7px;

    color: #8994a4;

    font-size: 10px;
    line-height: 1.45;
}

.calculated-field {
    display: flex;
    flex-direction: column;
}

.calculated-value {
    min-height: 48px;

    display: flex;
    align-items: center;

    gap: 8px;

    padding: 13px 14px;

    border: 1px solid #d7dce5;
    border-radius: 9px;

    color: var(--navy-900);
    background: #f6f8fb;

    font-size: 16px;
    font-weight: 800;
}

.calculated-value span {
    color: var(--muted);

    font-size: 11px;
    font-weight: 700;
}

.metric-secondary {
    margin-left: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}


/* =========================================================
   STRATEGY WORKSPACE
   ========================================================= */

.strategy-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.strategy-kpi {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 19px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: inherit;
    text-decoration: none;
    transition:
        border-color .18s ease,
        transform .18s ease,
        box-shadow .18s ease;
}

a.strategy-kpi:hover {
    transform: translateY(-1px);
    border-color: #ccd5e1;
    box-shadow:
        0 8px 25px rgba(16, 24, 40, .04);
}

.strategy-kpi > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.strategy-kpi strong {
    margin: 8px 0 3px;
    color: var(--navy-900);
    font-size: 28px;
}

.strategy-kpi small {
    color: #8994a4;
    font-size: 10px;
    line-height: 1.4;
}

.strategy-kpi-future {
    background: #f8fafc;
}


/* TWO COLUMN STRATEGY LAYOUT */

.strategy-two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

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


/* STRATEGY LIST ITEMS */

.strategy-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    color: inherit;
    text-decoration: none;
}

.strategy-list-item:last-child {
    border-bottom: 0;
}

.strategy-list-item:hover strong {
    color: var(--red);
}

.strategy-list-item > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.strategy-list-item strong {
    color: var(--navy-900);
    font-size: 12px;
    transition: color .18s ease;
}

.strategy-list-item small {
    color: var(--muted);
    font-size: 10px;
}

.strategy-empty {
    padding: 22px;
    color: var(--muted);
    background: #f8fafc;
    border-radius: 9px;
    font-size: 11px;
}


/* PRIORITY */

.priority-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
}

.priority-high {
    color: #a31329;
    background: #fff0f2;
}

.priority-medium {
    color: #8a6314;
    background: #fff6de;
}

.priority-low {
    color: #536174;
    background: #eef2f6;
}


/* STRATEGY FLOW */

.strategy-architecture {
    margin-bottom: 20px;
}

.strategy-flow {
    display: grid;
    grid-template-columns:
        1fr auto
        1fr auto
        1fr auto
        1fr auto
        1fr;
    align-items: center;
    gap: 10px;
}

.strategy-flow > div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;

    min-height: 70px;
    padding: 12px;

    background: #f7f9fc;
    border: 1px solid #edf0f4;
    border-radius: 9px;

    text-align: center;
}

.strategy-flow strong {
    color: var(--navy-900);
    font-size: 11px;
}

.strategy-flow span {
    color: var(--muted);
    font-size: 9px;
}

.strategy-flow b {
    color: #a8b2c1;
    font-size: 15px;
}


/* STRATEGY ENTITY CARDS */

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

.strategy-entity-card {
    display: flex;
    flex-direction: column;

    min-width: 0;
    min-height: 230px;

    padding: 22px;

    background: #fff;
    border: 1px solid var(--border);
    border-radius: 13px;

    color: inherit;
    text-decoration: none;

    transition:
        border-color .18s ease,
        transform .18s ease,
        box-shadow .18s ease;
}

.strategy-entity-card:hover {
    transform: translateY(-1px);
    border-color: #ccd5e1;
    box-shadow:
        0 8px 28px rgba(16, 24, 40, .045);
}

.strategy-entity-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.strategy-entity-head > div {
    min-width: 0;
}

.strategy-entity-head h2 {
    margin: 4px 0 2px;
    color: var(--navy-900);
    font-size: 17px;
    line-height: 1.3;
}

.strategy-entity-head small {
    color: var(--muted);
    font-size: 10px;
}

.entity-type {
    color: var(--red);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .12em;
}

.strategy-entity-card > p {
    flex: 1;

    margin: 18px 0;

    color: var(--muted);

    font-size: 11px;
    line-height: 1.55;
}

.entity-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    padding-top: 15px;

    border-top: 1px solid var(--border);
}

.entity-metrics > div {
    position: relative;
    text-align: center;
}

.entity-metrics > div:not(:last-child)::after {
    content: "";

    position: absolute;

    top: 3px;
    right: 0;
    bottom: 3px;

    width: 1px;

    background: var(--border);
}

.entity-metrics strong {
    display: block;

    margin-bottom: 3px;

    color: var(--navy-900);

    font-size: 17px;
}

.entity-metrics span {
    color: var(--muted);
    font-size: 9px;
}


/* STRATEGY FORMS */

.strategy-form-panel {
    max-width: 1050px;
}

.form-section-title {
    margin: 12px 0 8px;
    padding: 12px 0 7px;

    border-bottom: 1px solid var(--border);

    color: var(--red);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: .12em;
    text-transform: uppercase;
}


/* TARGET MARKET CHECKBOXES */

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

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

    padding: 12px;

    border: 1px solid var(--border);
    border-radius: 9px;

    cursor: pointer;

    transition:
        background .18s ease,
        border-color .18s ease;
}

.market-checkbox:hover {
    background: #f8fafc;
    border-color: #ccd5e1;
}

.market-checkbox input {
    width: auto;
    margin: 0;
}

.market-checkbox div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.market-checkbox strong {
    color: var(--navy-900);
    font-size: 11px;
}

.market-checkbox small {
    color: var(--muted);
    font-size: 9px;
}


/* STRATEGY TAGS */

.strategy-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.strategy-tag-list > span {
    padding: 7px 9px;

    color: #32435d;
    background: #f0f4f8;

    border-radius: 7px;

    font-size: 10px;
    line-height: 1.35;
}

.strategy-tag-list > small {
    color: var(--muted);
}

.strategy-long-text {
    margin: 0;

    color: #465368;

    font-size: 12px;
    line-height: 1.65;

    white-space: pre-line;
}

.stat-text {
    font-size: 21px;
}


/* RESPONSIVE */

@media (max-width: 1250px) {
    .strategy-kpi-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .strategy-kpi-grid,
    .strategy-card-grid,
    .strategy-two-column,
    .market-checkbox-grid {
        grid-template-columns: 1fr;
    }

    .strategy-flow {
        grid-template-columns: 1fr;
    }

    .strategy-flow b {
        text-align: center;
        transform: rotate(90deg);
    }
}


/* Marketing assets */

.asset-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 24px;
}

.asset-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border: 1px solid #dde3ea;
    border-radius: 10px;
    background: #fff;
    color: #4b5563;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.asset-filter span {
    min-width: 21px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #f2f4f7;
    text-align: center;
    font-size: 11px;
}

.asset-filter:hover,
.asset-filter.active {
    border-color: #e44949;
    color: #b42318;
}

.asset-filter.active {
    background: #fff5f5;
}


.asset-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.asset-card {
    display: block;
    padding: 20px;
    border: 1px solid #e1e6ec;
    border-radius: 14px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition:
        transform .15s ease,
        box-shadow .15s ease,
        border-color .15s ease;
}

.asset-card:hover {
    transform: translateY(-2px);
    border-color: #cfd6df;
    box-shadow: 0 10px 28px rgba(16, 24, 40, .07);
}

.asset-card-top,
.asset-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.asset-card h2 {
    margin: 16px 0 5px;
    font-size: 18px;
}

.asset-card p {
    color: #667085;
    line-height: 1.55;
}

.asset-card-footer {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #edf0f3;
    justify-content: flex-start;
    flex-wrap: wrap;
    color: #667085;
    font-size: 12px;
}

.asset-type-badge,
.asset-primary-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: #fff1f1;
    color: #b42318;
    font-size: 11px;
    font-weight: 700;
}

.asset-status {
    color: #667085;
    font-size: 12px;
}

.asset-subtype {
    color: #98a2b3;
    font-size: 12px;
    font-family: monospace;
}

.asset-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 10px 0 20px;
}

.asset-tags > span:not(.muted) {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 8px;
    background: #f2f4f7;
    color: #475467;
    font-size: 12px;
    font-weight: 600;
}

.asset-option-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px;
}

.asset-check-option {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 13px;
    border: 1px solid #e1e6ec;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.asset-check-option:hover {
    border-color: #c8d0da;
}

.asset-relation-list,
.asset-link-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.asset-relation-row,
.asset-link-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border: 1px solid #e4e8ed;
    border-radius: 10px;
    background: #fff;
}

.asset-relation-main {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.asset-relation-main span,
.asset-link-row > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.asset-relation-main small,
.asset-link-row small {
    color: #98a2b3;
}

.asset-primary-choice {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #667085;
    font-size: 12px;
    white-space: nowrap;
}

.asset-url-block,
.asset-description {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #eaecf0;
}

.asset-url-block > span,
.asset-description > span,
.asset-section-label {
    display: block;
    margin-bottom: 7px;
    color: #98a2b3;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.asset-url-block a {
    overflow-wrap: anywhere;
}

.asset-description p {
    margin-bottom: 0;
    line-height: 1.65;
}

.asset-section-label {
    margin-top: 20px;
}

.form-error-box {
    margin-bottom: 22px;
    padding: 14px 16px;
    border: 1px solid #fda29b;
    border-radius: 10px;
    background: #fff1f0;
    color: #912018;
}

.form-error-box ul {
    margin: 8px 0 0 18px;
}


@media (max-width: 700px) {

    .asset-relation-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .asset-primary-choice {
        padding-left: 28px;
    }

}


/* FIX: marketing asset checkbox / radio layout */

.asset-check-option input[type="checkbox"],
.asset-relation-main input[type="checkbox"],
.asset-primary-choice input[type="radio"] {
    width: 16px !important;
    min-width: 16px !important;
    max-width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 0 0 16px !important;
}


.asset-check-option {
    justify-content: flex-start !important;
    align-items: center !important;
}

.asset-check-option input[type="checkbox"] {
    order: 0;
}

.asset-check-option span {
    order: 1;
}


.asset-relation-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 24px !important;
    width: 100%;
    box-sizing: border-box;
}


.asset-relation-main {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    flex: 1 1 auto !important;
    min-width: 0;
    cursor: pointer;
}


.asset-relation-main > span {
    flex: 1 1 auto;
    min-width: 0;
}


.asset-primary-choice {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;

    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 110px;

    margin: 0 !important;
    padding: 0 !important;

    white-space: nowrap;
    cursor: pointer;
}


.asset-primary-choice input[type="radio"] {
    order: 0;
}

.asset-primary-choice {
    color: #344054;
    font-size: 13px;
    font-weight: 600;
}


@media (max-width: 700px) {

    .asset-relation-row {
        align-items: flex-start !important;
        flex-direction: column !important;
        gap: 12px !important;
    }

    .asset-primary-choice {
        min-width: 0;
        padding-left: 28px !important;
    }

}


/* Marketing asset actions */

.inline-form {
    display: inline-flex;
    margin: 0;
}

.btn-danger-outline {
    border: 1px solid #f04438;
    background: #fff;
    color: #b42318;
}

.btn-danger-outline:hover {
    border-color: #d92d20;
    background: #fff1f0;
    color: #912018;
}


/* JOURNEY GRAPH */

.journey-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 28px;
    border: 1px solid #e4e8ed;
    border-radius: 16px;
    background: #fff;
}

.journey-header h1 {
    margin: 5px 0 6px;
}

.journey-header p {
    margin: 0;
    color: #667085;
}

.journey-mode-switch {
    display: flex;
    gap: 6px;
    padding: 4px;
    border: 1px solid #e4e8ed;
    border-radius: 10px;
    background: #f8fafc;
}

.journey-mode {
    padding: 9px 14px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #667085;
    font-weight: 700;
    cursor: pointer;
}

.journey-mode.active {
    background: #fff;
    color: #101828;
    box-shadow: 0 1px 3px rgba(16,24,40,.08);
}

.journey-create-panel {
    margin-top: 18px;
    padding: 20px;
    border: 1px solid #e4e8ed;
    border-radius: 14px;
    background: #fff;
}

.journey-create-title {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 15px;
}

.journey-create-title span {
    color: #667085;
    font-size: 13px;
}

.journey-node-form {
    display: grid;
    grid-template-columns:
        1.25fr
        1fr
        1fr
        1fr
        1.5fr
        auto;
    gap: 12px;
    align-items: end;
}

.journey-node-form label {
    display: block;
    margin-bottom: 5px;
    color: #667085;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.journey-node-form input,
.journey-node-form select {
    width: 100%;
    box-sizing: border-box;
}

.journey-help {
    margin: 18px 0 10px;
    padding: 12px 15px;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    background: #f8fafc;
    color: #475467;
    font-size: 13px;
}

.journey-canvas-scroll {
    overflow: auto;
    padding: 0 0 20px;
}

.journey-canvas {
    position: relative;
    overflow: hidden;
    border: 1px solid #dfe4ea;
    border-radius: 18px;
    background:
        linear-gradient(
            #f4f6f8 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            #f4f6f8 1px,
            transparent 1px
        ),
        #fff;
    background-size: 24px 24px;
    box-shadow: 0 10px 30px rgba(16,24,40,.05);
}

.journey-connections {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.journey-zone {
    position: absolute;
    top: 20px;
    bottom: 20px;
    z-index: 1;
    border: 1px dashed #d0d5dd;
    border-radius: 16px;
    background: rgba(248,250,252,.7);
}

.journey-source-zone {
    background: rgba(249,250,251,.92);
}

.journey-stage-zone {
    background: rgba(252,252,253,.76);
}

.journey-zone-heading {
    position: absolute;
    top: 15px;
    left: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.journey-zone-heading > span {
    color: #98a2b3;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
}

.journey-zone-heading > strong {
    color: #344054;
    font-size: 14px;
}

.journey-zone-heading > small {
    color: #98a2b3;
    font-size: 11px;
}

.journey-node {
    position: absolute;
    z-index: 10;
    width: 240px;
    box-sizing: border-box;
    padding: 14px;
    border: 1px solid #d0d5dd;
    border-radius: 13px;
    background: #fff;
    box-shadow:
        0 4px 10px rgba(16,24,40,.07),
        0 1px 2px rgba(16,24,40,.04);
    cursor: grab;
    user-select: none;
    touch-action: none;
    transition:
        box-shadow .15s ease,
        border-color .15s ease,
        transform .15s ease;
}

.journey-node:hover {
    border-color: #98a2b3;
    box-shadow:
        0 8px 18px rgba(16,24,40,.11);
}

.journey-node.dragging {
    z-index: 50;
    cursor: grabbing;
    transform: scale(1.02);
    box-shadow:
        0 16px 36px rgba(16,24,40,.18);
}

.journey-node.saving {
    opacity: .76;
}

.journey-node.saved {
    border-color: #12b76a;
}

.journey-node.save-error {
    border-color: #f04438;
}

.journey-node-source {
    border-left: 4px solid #6172f3;
}

.journey-node-touchpoint {
    border-left: 4px solid #2e90fa;
}

.journey-node-action {
    border-left: 4px solid #f79009;
}

.journey-node-business_event {
    border-left: 4px solid #12b76a;
}

.journey-node-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.journey-node-type {
    color: #98a2b3;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
}

.journey-drag-hint {
    color: #98a2b3;
    font-weight: 800;
}

.journey-node-name {
    display: block;
    color: #101828;
    font-size: 14px;
}

.journey-node-channel {
    display: inline-flex;
    margin-top: 7px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #f2f4f7;
    color: #475467;
    font-size: 10px;
    font-weight: 700;
}

.journey-node-url {
    margin-top: 7px;
    color: #667085;
    font-size: 10px;
    overflow-wrap: anywhere;
}

.journey-node-metrics {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #eaecf0;
    color: #98a2b3;
    font-size: 10px;
}

.journey-health {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #f2f4f7;
    color: #667085;
}

.journey-empty-state {
    position: absolute;
    z-index: 5;
    left: 50%;
    top: 50%;
    width: 380px;
    transform: translate(-50%, -50%);
    padding: 28px;
    border: 1px dashed #d0d5dd;
    border-radius: 16px;
    background: rgba(255,255,255,.92);
    text-align: center;
    color: #667085;
}

.journey-empty-state strong {
    color: #344054;
}

.journey-empty-state p {
    margin: 8px 0 0;
    line-height: 1.55;
    font-size: 13px;
}

.journey-flash {
    margin-bottom: 18px;
    padding: 12px 16px;
    border: 1px solid #abefc6;
    border-radius: 10px;
    background: #ecfdf3;
    color: #067647;
    font-weight: 600;
}


@media (max-width: 1100px) {

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

    .journey-node-form .btn {
        width: 100%;
    }

}



/* JOURNEY ASSET LIBRARY */

.journey-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.journey-toolbar > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.journey-toolbar span {
    color: #667085;
    font-size: 13px;
}

.journey-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.journey-system-add {
    position: relative;
}

.journey-system-add summary {
    list-style: none;
    cursor: pointer;
}

.journey-system-add summary::-webkit-details-marker {
    display: none;
}

.journey-system-popover {
    position: absolute;
    z-index: 100;
    top: calc(100% + 8px);
    right: 0;
    width: 300px;
    padding: 18px;
    border: 1px solid #e4e8ed;
    border-radius: 12px;
    background: #fff;
    box-shadow:
        0 16px 40px rgba(16,24,40,.14);
}

.journey-system-popover form {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.journey-system-popover label {
    margin-top: 4px;
    color: #667085;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.journey-asset-dialog {
    width: min(900px, calc(100vw - 60px));
    max-height: calc(100vh - 80px);
    padding: 0;
    border: 0;
    border-radius: 18px;
    background: #fff;
    box-shadow:
        0 30px 80px rgba(16,24,40,.24);
}

.journey-asset-dialog::backdrop {
    background: rgba(16,24,40,.48);
}

.journey-asset-dialog-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 26px 18px;
    border-bottom: 1px solid #eaecf0;
}

.journey-asset-dialog-header h2 {
    margin: 4px 0;
}

.journey-asset-dialog-header p {
    margin: 0;
    color: #667085;
}

.journey-dialog-close {
    width: 38px;
    height: 38px;
    border: 1px solid #e4e8ed;
    border-radius: 9px;
    background: #fff;
    color: #667085;
    font-size: 24px;
    cursor: pointer;
}

.journey-asset-search {
    padding: 16px 26px;
    border-bottom: 1px solid #eaecf0;
}

.journey-asset-search input {
    width: 100%;
    box-sizing: border-box;
}

.journey-asset-list {
    max-height: 560px;
    overflow: auto;
    padding: 8px 26px 26px;
}

.journey-asset-row {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto;
    align-items: center;
    gap: 24px;
    padding: 16px 0;
    border-bottom: 1px solid #eaecf0;
}

.journey-asset-info {
    min-width: 0;
}

.journey-asset-type {
    margin-bottom: 4px;
    color: #98a2b3;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
}

.journey-asset-info strong {
    display: block;
    color: #101828;
}

.journey-asset-info small {
    display: block;
    margin-top: 6px;
    color: #98a2b3;
    overflow-wrap: anywhere;
}

.journey-asset-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
}

.journey-asset-meta span {
    padding: 3px 7px;
    border-radius: 999px;
    background: #f2f4f7;
    color: #475467;
    font-size: 10px;
    font-weight: 700;
}

.journey-asset-add-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.journey-node-marketing_asset {
    border-left: 4px solid #7f56d9;
}

.journey-library-empty {
    padding: 40px 10px;
    color: #667085;
    text-align: center;
}

.journey-library-empty a {
    display: block;
    margin-top: 8px;
    font-weight: 700;
}


@media (max-width: 800px) {

    .journey-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .journey-toolbar-actions {
        flex-wrap: wrap;
    }

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

    .journey-asset-add-form {
        align-items: stretch;
        flex-direction: column;
    }

}



/* JOURNEY ASSET FILTERS */

.journey-asset-filters {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-top: 12px;
}

.journey-asset-filters > div {
    min-width: 180px;
}

.journey-asset-filters label {
    display: block;
    margin-bottom: 5px;
    color: #667085;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.journey-asset-filters select {
    width: 100%;
}

.journey-asset-result-count {
    min-width: auto !important;
    padding: 9px 4px;
    color: #667085;
    font-size: 12px;
    white-space: nowrap;
}

.journey-asset-result-count span {
    color: #101828;
    font-weight: 800;
}


@media (max-width: 700px) {

    .journey-asset-filters {
        align-items: stretch;
        flex-direction: column;
    }

    .journey-asset-filters > div {
        width: 100%;
        min-width: 0;
    }

}

.journey-asset-row[hidden] {
    display: none !important;
}


/* JOURNEY PERFORMANCE */

.journey-mode {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.journey-create-panel.is-hidden {
    display: none;
}

.journey-node-performance {
    width: 360px;
}

.journey-node-performance .journey-node-url {
    margin-bottom: 4px;
}

.journey-node-metrics-performance {
    display: block;
}

.journey-performance-period {
    margin-bottom: 10px;
    color: #98a2b3;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
}

.journey-performance-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.journey-performance-grid section {
    padding: 10px;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    background: #f9fafb;
}

.journey-performance-grid section > strong {
    display: block;
    margin-bottom: 8px;
    color: #667085;
    font-size: 10px;
    letter-spacing: .06em;
}

.journey-performance-grid section > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 5px;
}

.journey-performance-grid section span {
    color: #667085;
    font-size: 11px;
}

.journey-performance-grid section b {
    color: #101828;
    font-size: 12px;
}

.journey-performance-freshness {
    margin-top: 10px;
    color: #98a2b3;
    font-size: 10px;
}

.journey-health.good {
    color: #039855;
    font-weight: 800;
}


/* JOURNEY PERFORMANCE PERIOD */

.journey-period-switch {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 10px;
}

.journey-period {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 62px;
    padding: 7px 10px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #fff;
    color: #475467;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.journey-period:hover {
    border-color: #98a2b3;
}

.journey-period.active {
    border-color: #101828;
    background: #101828;
    color: #fff;
}
