:root {
    --navy: #0c2f6b;
    --navy-deep: #082252;
    --ink: #1c2434;
    --muted: #667085;
    --rose: #c23b55;
    --line: #ead7dc;
    --paper: #f3f5f8;
    --card: #ffffff;
    --shadow: 0 10px 30px rgba(18, 38, 71, 0.06);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: "Source Sans 3", "Segoe UI", sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.55;
}

h1, h2, h3, h4, .btn, .nav-link, .form-label {
    font-family: inherit;
}

a { color: var(--navy); }

img { max-width: 100%; }

.site-header {
    background: #fff;
    border-bottom: 1px solid #edf0f4;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.navbar-brand img {
    height: 52px;
    width: auto;
}

.navbar-nav { flex-wrap: wrap; }

.navbar-nav .nav-link {
    color: #24324a;
    font-weight: 600;
    font-size: 15px;
    padding: 10px 12px;
    border-radius: 999px;
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link:hover {
    color: #1d4ed8;
    background: #f3f7ff;
}

.user-tools { flex-wrap: wrap; }

.icon-link,
.btn-quiet {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 6px 12px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--navy);
    font-weight: 600;
    background: #f4f7fb;
}

.icon-link .count {
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    background: var(--rose);
    color: #fff;
    font-size: 12px;
    display: inline-grid;
    place-items: center;
    padding: 0 6px;
}

.btn-brand {
    background: var(--navy);
    border: 0;
    color: #fff;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    min-height: 42px;
    padding: 8px 16px;
}

.btn-brand:hover,
.btn-brand:focus {
    background: var(--navy-deep);
    color: #fff;
}

.btn-line {
    background: #fff;
    border: 1px solid #d7deea;
    color: var(--navy);
    border-radius: 12px;
    font-weight: 650;
    min-height: 44px;
}

.btn-export {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 42px;
    padding: 8px 12px;
    font-size: 14px;
}

.export-hint {
    margin: -4px 0 14px;
    color: var(--muted);
    font-size: 13px;
}

.page-main { min-height: 58vh; }

.page-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 18px;
}

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

.admin-hero {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-end;
    background: linear-gradient(145deg, #082252 0%, #0c2f6b 58%, #1a4f98 100%);
    color: #fff;
    border-radius: 24px;
    padding: 28px;
    margin-bottom: 16px;
    box-shadow: 0 16px 36px rgba(12, 47, 107, 0.18);
}

.admin-hero h1 {
    color: #fff;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 6px;
}

.admin-hero .lede { color: rgba(255, 255, 255, 0.78); }

.admin-hero .btn-brand {
    background: #fff;
    color: var(--navy);
}

.admin-hero .btn-brand:hover,
.admin-hero .btn-brand:focus {
    background: #f4f7fb;
    color: var(--navy);
}

.admin-hero .btn-line {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

.admin-hero .btn-line:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.eyebrow {
    margin: 0 0 8px;
    color: #f3c3cc;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.shortcut-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.shortcut {
    display: flex;
    gap: 12px;
    align-items: center;
    background: #fff;
    border: 1px solid #eef1f6;
    border-radius: 18px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
}

.shortcut:hover { color: inherit; transform: translateY(-1px); }

.shortcut i {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #eef3fb;
    color: var(--navy);
    font-size: 18px;
}

.shortcut strong { display: block; line-height: 1.2; }
.shortcut span span { color: var(--muted); font-size: 13px; }

.identity {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 16px;
}

.identity .status-pill { margin-left: auto; }

.avatar {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: #e8eef8;
    color: var(--navy);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 22px;
}

.identity-id { font-size: 18px; letter-spacing: 0.02em; }

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

.account-card h2 {
    font-size: 22px;
    margin: 14px 0 2px;
}

.import-grid {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 16px;
    align-items: start;
}

.step-list {
    margin: 0 0 16px;
    padding-left: 18px;
    display: grid;
    gap: 8px;
}

.col-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.col-chips span {
    background: #f4f7fb;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 650;
}

.field-help {
    margin: -6px 0 14px;
    color: var(--muted);
    font-size: 13px;
}

.skip-reason { color: #b42335; font-weight: 650; }

code {
    background: #f4f7fb;
    border-radius: 8px;
    padding: 2px 6px;
}

.page-head h1,
.panel h1,
.empty-panel h1 {
    font-size: 26px;
    letter-spacing: -0.02em;
    font-weight: 600;
    margin: 0 0 4px;
}

.lede { color: var(--muted); margin: 0; }

.stat-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 118px;
    background: var(--card);
    border-radius: 18px;
    padding: 16px 16px 14px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    border: 1px solid #eef1f6;
    border-bottom: 3px solid var(--navy);
}

.stat-card:hover { transform: translateY(-1px); color: inherit; }

.tone-rose { border-bottom-color: var(--rose); }
.tone-green { border-bottom-color: #178a55; }
.tone-amber { border-bottom-color: #c9841a; }
.tone-blue { border-bottom-color: #1d4ed8; }

.stat-label {
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.stat-value {
    font-size: 34px;
    letter-spacing: -0.05em;
    font-weight: 700;
    line-height: 1;
}

.panel,
.stack-card,
.table-wrap,
.login-card {
    background: #fff;
    border: 1px solid #eef1f6;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.panel { padding: 18px; }

.table-wrap { padding: 8px 12px 4px; overflow-x: auto; }

.table { margin-bottom: 0; }

.table thead th {
    color: #8b95a7;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 700;
    border-bottom-color: #eef1f6;
}

.table td { border-color: #f2f4f8; padding-top: 14px; padding-bottom: 14px; }

.code-link,
.name-link { font-weight: 700; text-decoration: none; }

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

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    background: #eef2ff;
    color: #243b80;
}

.st-new { background: #e8f0ff; color: #1d4ed8; }
.st-contacted { background: #e7f7fb; color: #0f6f8a; }
.st-interested { background: #fff4df; color: #9a6408; }
.st-site_visit { background: #f3e8ff; color: #7a3eaf; }
.st-negotiation { background: #eceff5; color: #334155; }
.st-booked, .st-active { background: #e5f7ee; color: #0f7a45; }
.st-lost, .st-inactive { background: #fde8ea; color: #b42335; }
.st-cancelled { background: #f1f2f4; color: #667085; }

.stack-list { display: grid; gap: 12px; }

.stack-card {
    display: block;
    padding: 16px;
    text-decoration: none;
    color: inherit;
}

.stack-top,
.stack-meta,
.page-head,
.detail-grid,
.form-actions,
.filter-bar,
.search-bar,
.footer-bottom .container-fluid {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.stack-meta { margin-top: 10px; color: var(--muted); font-size: 14px; }

.status-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
    text-decoration: none;
    background: #fff;
    border: 1px solid #e5eaf2;
    border-radius: 999px;
    padding: 7px 12px;
    color: #24324a;
    font-weight: 650;
    font-size: 14px;
}
.chip.active { background: var(--navy); color: #fff; border-color: var(--navy); }

.search-bar,
.filter-bar { margin-bottom: 14px; align-items: end; flex-wrap: wrap; }

.search-bar .form-control { max-width: 420px; }

.filter-bar label,
.field { display: grid; gap: 6px; font-weight: 500; font-size: 14px; }

.filter-bar label { font-size: 13px; color: var(--muted); }

.form-panel {
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.page-head:has(+ .form-panel) {
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.form-stage {
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.form-stage-wide {
    max-width: 960px;
}

.form-stage .form-panel,
.account-layout .form-panel,
.split-form .form-panel,
.split-form .page-head {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

.split-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
}

.split-form-main { min-width: 0; }

.form-visual {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    padding: 40px 36px;
    color: #fff;
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.18), transparent 36%),
        linear-gradient(165deg, #082252 0%, #0c2f6b 58%, #1a4f98 100%);
    box-shadow: 0 16px 36px rgba(12, 47, 107, 0.16);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.form-visual::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -50px;
    width: 180px;
    height: 180px;
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.08);
    transform: rotate(18deg);
}

.form-visual-icon {
    width: 84px;
    height: 84px;
    border-radius: 26px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.14);
    font-size: 38px;
    margin-bottom: 18px;
}

.form-visual h2 {
    color: #fff;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
}

.form-visual p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    max-width: 36ch;
}

.form-visual ul {
    list-style: none;
    margin: 22px 0 0;
    padding: 0;
    display: grid;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.form-visual li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 650;
}

.form-visual li i {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.12);
    flex: 0 0 34px;
}

.form-visual > * { position: relative; z-index: 1; }

.form-visual .step-list { color: rgba(255, 255, 255, 0.92); }

.form-visual .col-chips span {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.form-visual .btn-line {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.45);
}

.form-visual .btn-line:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.home-banner {
    margin: 0 0 32px;
    text-align: center;
}

.home-banner img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 18px;
}

.home-banner .btn { margin-top: 18px; }

.home-story {
    max-width: 760px;
    margin: 0 auto 36px;
    text-align: center;
}

.home-story h2 {
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0 0 10px;
}

.home-story p { color: var(--muted); margin: 0; font-size: 16px; }

.crumb {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.crumb span { margin: 0 6px; }

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

.benefit-card {
    background: #fff;
    border: 1px solid #eef1f6;
    border-radius: 18px;
    padding: 20px 18px;
    box-shadow: var(--shadow);
}

.benefit-card i {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #eef3fb;
    color: var(--navy);
    font-size: 18px;
    margin-bottom: 12px;
}

.benefit-card h3 { font-size: 16px; font-weight: 600; margin: 0 0 6px; }
.benefit-card p { color: var(--muted); margin: 0; }

.home-intro {
    text-align: center;
    max-width: 760px;
    margin: 8px auto 36px;
}

.home-intro .eyebrow { color: var(--rose); }

.home-intro h1 {
    font-size: 42px;
    letter-spacing: -0.045em;
    font-weight: 700;
    margin: 0 0 12px;
}

.home-intro p { color: var(--muted); font-size: 18px; }

.home-block h2,
.refer-sheet h2,
.home-contact h2,
.home-terms h2 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
}

.home-block { margin-bottom: 28px; }

.step-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.step-card {
    background: #fff;
    border: 1px solid #eef1f6;
    border-radius: 18px;
    padding: 18px 16px;
    box-shadow: var(--shadow);
}

.step-num {
    color: var(--rose);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.step-card h3 { font-size: 16px; font-weight: 600; margin: 8px 0; }
.step-card p { color: var(--muted); margin: 0; }

.refer-sheet {
    background: #fff;
    border: 1px solid #eef1f6;
    border-radius: 24px;
    padding: 28px 24px;
    box-shadow: var(--shadow);
    margin-bottom: 28px;
}

.refer-group { margin-top: 8px; }
.refer-group h3 { font-size: 17px; font-weight: 600; margin: 18px 0 12px; }

.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
}

.home-contact { text-align: center; margin-bottom: 28px; }
.home-contact a { font-weight: 700; text-decoration: none; }
.home-terms { display: grid; gap: 14px; color: #4b5568; padding-left: 18px; margin: 20px 0 0; }
.home-terms a { font-weight: 700; }

.terms-page { max-width: 820px; margin: 0 auto 20px; }
.terms-page h1 { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; margin: 12px 0 8px; }
.back-link { font-weight: 700; text-decoration: none; }

.site-header .container-fluid,
.page-main > .container-fluid,
.site-footer > .container-fluid,
.footer-bottom .container-fluid {
    width: 80%;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 12px;
    padding-right: 12px;
}

.field { margin-bottom: 14px; }

.form-control,
.form-select {
    border-radius: 12px;
    border-color: #d9e0ea;
    min-height: 42px;
    font-size: 15px;
}

.form-control-lg,
.form-select-lg {
    font-size: 15px;
    min-height: 42px;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
}

textarea.form-control { min-height: 96px; }

.form-control:focus,
.form-select:focus {
    border-color: #8eaddf;
    box-shadow: 0 0 0 4px rgba(12, 47, 107, 0.12);
}

.field-note { min-height: 22px; margin: -6px 0 12px; color: var(--rose); font-weight: 700; }
.field-note.ok { color: #0f7a45; }

.locked-note,
.check-line { margin-bottom: 14px; }

.empty-state,
.empty-panel { padding: 28px 8px; color: var(--muted); }

.detail-grid { align-items: stretch; margin-bottom: 16px; }

.detail-grid .panel { flex: 1; }

.meta-list { display: grid; gap: 8px; margin: 0; }
.meta-list div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid #f2f4f8; padding-bottom: 8px; }
.meta-list dt { color: var(--muted); font-weight: 600; }
.meta-list dd { margin: 0; text-align: right; font-weight: 700; }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.timeline li { padding-left: 16px; border-left: 3px solid #d9e3f5; }
.timeline .when { color: var(--rose); font-weight: 700; font-size: 13px; }
.timeline .what { font-weight: 700; }

.pager { margin-top: 16px; }
.page-link { color: var(--navy); border-radius: 10px; margin-right: 4px; }
.page-item.active .page-link { background: var(--navy); border-color: var(--navy); }

.login-wrap {
    max-width: 460px;
    margin: 24px auto 40px;
}

.split-form-main:has(.login-box) {
    display: flex;
}

.login-box {
    flex: 1;
    width: 100%;
    background: #fff;
    border: 1px solid #c5d0e0;
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 32px 28px 28px;
}

.login-box h1 {
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin: 0 0 4px;
}

.login-box .lede { margin-bottom: 18px; }

.login-card { padding: 28px 22px 22px; }
.login-card h1 { font-size: 30px; letter-spacing: -0.04em; }

.alert { border: 0; border-radius: 14px; }

.form-error { scroll-margin-top: 96px; scroll-margin-bottom: 24px; }

.site-footer {
    background: #fff;
    border-top: 3px solid #c98b98;
    margin-top: 28px;
    padding-top: 36px;
}

.footer-logo { height: 58px; width: auto; margin-bottom: 16px; }

.site-footer h2 {
    color: var(--rose);
    font-size: 20px;
    font-weight: 650;
    margin-bottom: 12px;
}

.site-footer p { color: #4b5568; }

.site-footer a {
    display: block;
    color: #2a3344;
    text-decoration: none;
    margin: 6px 0;
}

.socials { display: flex; gap: 8px; }
.socials a {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    color: #fff;
    margin: 0;
}
.socials .ig { background: #e1306c; }
.socials .fb { background: #1877f2; }
.socials .yt { background: #ff0000; }
.socials .x { background: #111; }
.socials .in { background: #0a66c2; }

.contact-line { font-weight: 650; }

.footer-bottom {
    border-top: 1px solid #f0e4e7;
    margin-top: 28px;
    padding: 14px 0 18px;
    color: #667085;
    font-size: 14px;
}

.mobile-cta {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 1030;
    background: var(--navy);
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    border-radius: 14px;
    min-height: 52px;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 24px rgba(12, 47, 107, 0.25);
}

.has-mobile-cta { padding-bottom: 84px; }

.public-wrap { max-width: 720px; margin: 0 auto 12px; }

.public-wrap h1 {
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
}

.public-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: #eef3fb;
    color: var(--navy);
    font-size: 20px;
    margin-bottom: 12px;
}

.share-box {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.share-box h2 { margin: 0 0 6px; }

.share-text { color: var(--muted); margin: 0 0 12px; }

.share-link { display: flex; gap: 8px; }

.share-link .form-control { min-height: 42px; font-size: 14px; }

.share-qr {
    width: 168px;
    height: 168px;
    flex: 0 0 168px;
    border: 1px solid #eef1f6;
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
}

.share-qr svg {
    display: block;
    width: 100%;
    height: 100%;
}

.form-section-label {
    margin: 2px 0 10px;
    color: var(--navy);
    font-weight: 600;
}

.form-section-label + .field-grid { margin-bottom: 6px; }

.lead-unlock { margin-top: 16px; }

.public-wrap .field-grid { margin-bottom: 4px; }

@media (max-width: 991.98px) {
    .shortcut-grid,
    .import-grid,
    .account-layout,
    .split-form { grid-template-columns: 1fr; }

    .step-row,
    .field-grid,
    .benefit-row { grid-template-columns: 1fr; }

    .share-box,
    .share-link { flex-direction: column; align-items: stretch; }

    .share-qr { align-self: center; }

    .form-visual { min-height: 280px; padding: 28px 24px; }

    .site-header .container-fluid,
    .page-main > .container-fluid,
    .site-footer > .container-fluid,
    .footer-bottom .container-fluid {
        width: 100%;
        max-width: 100%;
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (max-width: 767.98px) {
    .page-head,
    .admin-hero { align-items: stretch; flex-direction: column; }
    .page-head h1,
    .admin-hero h1 { font-size: 28px; }
    .stat-value { font-size: 28px; }
    .mobile-cta { display: flex; }
    .footer-bottom .container-fluid { flex-direction: column; align-items: flex-start; }
    .navbar-brand img { height: 44px; }
    .identity { align-items: flex-start; }
}

@media (min-width: 768px) {
    .has-mobile-cta { padding-bottom: 0; }
}

.market-dash-link { margin: -4px 0 16px; color: var(--muted); }

.market-admin { display: grid; gap: 18px; }
.market-admin h2 { margin: 0 0 6px; font-size: 22px; }
.market-form .field { margin-bottom: 12px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 18px; }
.media-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f7f9fc;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 12px;
}
.media-card img,
.media-card video {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 14px;
    background: #071833;
}
.media-card video { aspect-ratio: 9 / 16; }
.media-card .btn { width: 100%; }
.associate-market { max-width: 760px; }
.photo-field { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 8px; }
.photo-preview {
    width: 96px;
    height: 96px;
    border-radius: 28px;
    object-fit: cover;
    flex: 0 0 auto;
    background: var(--navy);
}
.photo-empty {
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 28px;
    font-weight: 700;
}
.banner-field { margin: 6px 0 14px; }
.banner-preview {
    display: block;
    width: 100%;
    height: 148px;
    margin-bottom: 10px;
    border-radius: 18px;
    object-fit: cover;
    object-position: center;
    background: #0c2f6b;
}
.banner-empty {
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 600;
}
.page-link-card h2 { margin: 0 0 8px; font-size: 20px; }
.page-link-card .share-link { display: flex; gap: 8px; }
.page-link-card .share-link .form-control { min-width: 0; }

.market-body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(600px 280px at 50% -10%, rgba(208, 18, 45, 0.16), transparent 60%),
        #071833;
    font-family: "Source Sans 3", "Segoe UI", sans-serif;
    color: #172033;
}
.market-sheet {
    width: min(440px, 100%);
    margin: 0 auto;
    min-height: 100vh;
    background: #f6f8fb;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}
.market-private {
    margin: 0;
    padding: 10px 16px;
    background: #fff4d6;
    color: #6b4e00;
    font-size: 14px;
}
.market-cover {
    height: 210px;
    background:
        linear-gradient(180deg, rgba(7, 24, 51, 0.15), rgba(7, 24, 51, 0.55)),
        linear-gradient(145deg, #123a86, #071833);
    background-size: cover;
    background-position: center;
    position: relative;
    z-index: 0;
}
.market-brand {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #fff;
    border-radius: 12px;
    padding: 6px 10px;
    line-height: 0;
}
.market-brand img { height: 28px; width: auto; }
.market-identity { position: relative; z-index: 1; margin-top: -56px; padding: 0 18px 8px; text-align: center; }
.market-photo {
    position: relative;
    z-index: 2;
    display: block;
    width: 112px;
    height: 112px;
    margin: 0 auto;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
    border: 4px solid #fff;
    box-shadow: 0 10px 24px rgba(7, 24, 51, 0.18);
    background: #0c2f6b;
}
.market-initials {
    display: grid;
    place-items: center;
    margin: 0 auto;
    color: #fff;
    font-size: 36px;
    font-weight: 700;
}
.market-identity h1 { margin: 12px 0 0; font-size: 30px; letter-spacing: -0.03em; }
.market-headline { margin: 6px 0 0; color: #5c6b82; font-size: 16px; }
.market-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.market-pills span {
    background: #fff;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #0c2f6b;
}
.market-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.market-call, .market-wa, .market-share {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 14px;
    font-weight: 700;
    text-decoration: none;
    border: 0;
    font-size: 16px;
}
.market-call { background: #0c2f6b; color: #fff; }
.market-wa { background: #128c4a; color: #fff; }
.market-bio {
    margin-top: 16px;
    text-align: left;
    background: #fff;
    border-radius: 18px;
    padding: 14px 16px;
    line-height: 1.5;
}
.market-share {
    width: 100%;
    margin-top: 12px;
    background: #fff;
    color: #0c2f6b;
    border: 1px solid rgba(12, 47, 107, 0.12);
}
.market-block { padding: 8px 0 18px; }
.market-block h2 { margin: 0 0 10px; padding: 0 18px; font-size: 20px; }
.market-empty { margin: 0 18px; color: #5c6b82; }
.gallery-rail, .reel-rail {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0 18px 8px;
    -webkit-overflow-scrolling: touch;
}
.gallery-rail figure, .reel {
    flex: 0 0 78%;
    scroll-snap-align: center;
    margin: 0;
    position: relative;
}
.gallery-rail img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 20px;
    background: #d9e2ef;
}
.gallery-rail figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 28px 14px 14px;
    border-radius: 0 0 20px 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
    color: #fff;
}
.gallery-rail figcaption span, .reel-caption span { color: rgba(255, 255, 255, 0.82); font-size: 13px; }
.reel {
    aspect-ratio: 9 / 16;
    border-radius: 22px;
    overflow: hidden;
    background: #071833;
}
.reel video { width: 100%; height: 100%; object-fit: cover; display: block; }
.reel-play {
    position: absolute;
    left: 50%;
    top: 42%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #0c2f6b;
    font-weight: 700;
}
.reel.is-playing .reel-play { opacity: 0; pointer-events: none; }
.reel-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 28px 14px 14px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
    color: #fff;
}
.reel-caption span { color: rgba(255, 255, 255, 0.82); }
.market-foot {
    margin-top: 12px;
    padding: 22px 18px 28px;
    background: #071833;
    color: rgba(255, 255, 255, 0.82);
    text-align: center;
}
.market-foot strong { display: block; color: #fff; font-size: 16px; letter-spacing: 0.04em; }
.market-foot p { margin: 8px 0 0; font-size: 14px; line-height: 1.45; }
.market-foot a { color: #fff; text-decoration: none; font-weight: 700; }
.market-foot-links { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.market-foot-links a {
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
}
.market-foot-office { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.market-foot-office span { display: block; margin-top: 2px; font-size: 13px; color: rgba(255, 255, 255, 0.7); }
.market-sheet .story-rail {
    justify-content: safe center;
    scroll-padding-inline: 24px;
    padding: 4px 24px 16px;
}
.market-sheet .story-rail .story-post {
    flex: 0 0 min(300px, calc(100% - 8px));
    scroll-snap-align: center;
}
.market-sheet .story-frame:not(.is-reel) { aspect-ratio: 4 / 5; }
.market-sheet .story-frame:not(.is-reel) > img {
    object-fit: contain;
    object-position: center;
    background: #071833;
}
.story-solo {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.story-solo .story-frame,
.story-solo .story-share,
.story-solo .market-actions { width: min(340px, 100%); }
.story-post { min-width: 0; }
.story-post .story-frame { width: 100%; }
.story-post .story-share { margin-top: 10px; }

.story-board h3 { margin: 4px 0 12px; font-size: 18px; }
.story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 320px)); gap: 16px; margin-bottom: 22px; }
.story-card { min-width: 0; }
.story-rail {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0 18px 8px;
    -webkit-overflow-scrolling: touch;
}
.story-rail .story-post,
.story-rail .story-frame { flex: 0 0 82%; scroll-snap-align: center; }
.story-frame {
    position: relative;
    aspect-ratio: 9 / 16;
    border-radius: 22px;
    overflow: hidden;
    background: #071833;
}
.story-frame.is-landscape {
    aspect-ratio: 16 / 9;
}
.story-frame > img,
.story-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.story-logo {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    background: #fff;
    border-radius: 10px;
    padding: 5px 8px;
    line-height: 0;
}
.story-logo img { height: 22px; width: auto; }
.story-title {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 92px;
    z-index: 2;
    margin: 0;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.25;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
.story-person {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border-radius: 16px;
    background: rgba(var(--bar-r, 8), var(--bar-g, 22), var(--bar-b, 52), var(--bar-alpha, 0.86));
    color: #fff;
}
.story-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
    border: 2px solid #fff;
    background: #0c2f6b;
}
.story-initials { display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.story-person strong { display: block; font-size: 14px; line-height: 1.2; }
.story-person span { display: block; font-size: 12px; line-height: 1.3; color: rgba(255, 255, 255, 0.9); }
.story-frame .reel-play { z-index: 3; }
.story-frame.is-playing .reel-play { opacity: 0; pointer-events: none; }
.story-frame.font-serif .story-person,
.story-frame.font-serif .story-title { font-family: "Libre Baskerville", Georgia, serif; }
.story-frame.font-round .story-person,
.story-frame.font-round .story-title { font-family: Comfortaa, "Source Sans 3", sans-serif; }
.story-frame .story-logo,
.story-frame .story-title,
.story-frame .story-avatar,
.story-frame .story-person strong,
.story-frame .story-person span { display: none; }
.story-frame.show-logo .story-logo { display: block; }
.story-frame.show-title .story-title { display: block; }
.story-frame.show-photo .story-avatar { display: block; }
.story-frame.show-photo .story-initials { display: grid; }
.story-frame.show-name .story-person strong,
.story-frame.show-mobile .story-person span,
.story-frame.show-rera .story-person span { display: block; }
.story-frame.bar-light .story-person { color: #0c2f6b; }
.story-frame.bar-light .story-person span { color: #3c4d68; }
.story-frame.bar-light .story-person strong,
.story-frame.bar-light .story-person span { text-shadow: none; }
.story-frame.bar-clear .story-person { background: transparent; }
.story-frame.bar-clear .story-person strong,
.story-frame.bar-clear .story-person span { text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7); }
.color-row { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; }
.color-pick { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; }
.color-pick input[type="color"] {
    width: 56px;
    height: 42px;
    padding: 4px;
    border: 1px solid #d7deea;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
}
.opacity-pick { display: grid; gap: 4px; min-width: 180px; flex: 1; font-weight: 650; }
.opacity-pick input[type="range"] { width: 100%; accent-color: #0c2f6b; }
.color-row.is-clear .color-pick,
.color-row.is-clear .opacity-pick { opacity: 0.45; }
.story-frame.align-center .story-person { flex-direction: column; text-align: center; }
.story-frame.align-center .story-title { text-align: center; }
.story-frame.place-top .story-person { top: 16px; bottom: auto; }
.story-frame.place-top.show-logo .story-person { top: 16px; }
.story-frame.place-top .story-logo { top: auto; bottom: 14px; }
.story-frame.place-top .story-title { top: auto; bottom: 18px; }
.story-frame.place-top.show-logo .story-title { bottom: 62px; }
.story-frame.size-large .story-avatar { width: 64px; height: 64px; }
.story-frame.size-large .story-person strong { font-size: 18px; }
.story-frame.size-large .story-title { font-size: 20px; }
.look-panel h2 { margin: 0 0 6px; font-size: 22px; }
.look-layout { display: grid; gap: 22px; align-items: start; }
.look-stage {
    background: #f4f7fb;
    border-radius: 22px;
    padding: 14px;
}
.look-stage h3 { margin: 0 0 4px; font-size: 16px; }
.look-stage .field-help { margin: 0 0 12px; }
.look-stage-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.look-stage-header h3 { margin: 0 0 2px; font-size: 16px; }
.look-stage-header .field-help { margin: 0; }
.card-toggle-group {
    display: inline-flex;
    background: #e2e8f0;
    padding: 3px;
    border-radius: 12px;
    gap: 3px;
}
.card-toggle-group .btn {
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 9px;
    background: transparent;
    color: #475569;
    border: none;
    box-shadow: none;
    cursor: pointer;
    transition: all 0.15s ease;
}
.card-toggle-group .btn:hover {
    color: #0c2f6b;
}
.card-toggle-group .btn.active {
    background: #ffffff;
    color: #0c2f6b;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.look-empty { margin: 0; color: #5c6b82; }
.look-preview { width: min(280px, 100%); margin: 0 auto; transition: width 0.2s ease; }
.look-preview:has(.is-landscape) { width: min(360px, 100%); }
.look-preview-kind {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #667085;
}
.story-open {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 22px;
    overflow: hidden;
    background: #071833;
    cursor: pointer;
}
.story-open img,
.story-open video {
    width: 100%;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    display: block;
}
.story-open-label {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #fff;
    color: #0c2f6b;
    font-weight: 700;
}
dialog.edit-modal {
    width: min(1040px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 24px;
    overflow: auto;
    box-shadow: 0 24px 80px rgba(7, 24, 51, 0.28);
}
dialog.edit-modal::backdrop { background: rgba(7, 24, 51, 0.62); }
.edit-sheet { display: grid; gap: 18px; padding: 18px; }
.edit-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.edit-head h2 { margin: 0; font-size: 22px; }
.edit-modal .look-stage { position: static; }
.look-grid { display: grid; gap: 12px; margin: 14px 0; }
.look-grid fieldset { border: 0; margin: 0; padding: 0; }
.look-grid legend { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #667085; margin-bottom: 8px; }
.look-options { display: flex; flex-wrap: wrap; gap: 8px; }
.look-options label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #d7deea;
    font-weight: 650;
    cursor: pointer;
}
.look-options input { accent-color: #0c2f6b; }
.swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.15); display: inline-block; }
.swatch-clear { background: repeating-conic-gradient(#d5dbe6 0% 25%, #fff 0% 50%) 50% / 8px 8px; }
.swatch-navy { background: #0c2f6b; }
.swatch-white { background: #fff; }
.swatch-black { background: #111; }
.swatch-rose { background: #c23b55; }
.story-make { display: grid; gap: 8px; margin-top: 10px; }
.story-make .btn,
.story-make form,
.story-make .story-share { width: 100%; margin: 0; }
.story-make .story-share-main { background: #fff; color: #0c2f6b; border: 1px solid rgba(12, 47, 107, 0.16); }
.story-make .field-help { margin: 0; }
.story-share-main { width: 100%; }
.story-apps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.story-app {
    flex: 1 1 calc(33.33% - 6px);
    min-height: 38px;
    border: 0;
    border-radius: 10px;
    background: #f4f7fb;
    color: #0c2f6b;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
}
.story-wa { background: #e7f6ee; color: #0d6b38; }
.story-ig { background: #fde8ef; color: #9d174d; }
.story-fb { background: #e7f0ff; color: #1d4ed8; }
.story-tg { background: #e7f4fb; color: #0b6e99; }
.story-solo { padding: 16px 16px 0; }
.story-solo .market-actions { margin-top: 14px; }

@media (max-width: 767.98px) {
    .photo-field,
    .page-link-card .share-link { grid-template-columns: 1fr; display: grid; }
    .story-grid { grid-template-columns: 1fr; }
    .page-link-card .share-link { display: grid; }
    .market-sheet { width: 100%; box-shadow: none; }
    .media-card .btn,
    .market-form .btn { min-height: 46px; }
}

@media (min-width: 900px) {
    .look-layout,
    .edit-sheet { grid-template-columns: minmax(320px, 1.05fr) minmax(260px, 340px); align-items: start; }
    .look-stage { position: sticky; top: 16px; }
}
@media (min-width: 768px) {
    .market-body { padding: 28px 0; }
    .market-sheet { min-height: auto; border-radius: 28px; overflow: hidden; }
    .gallery-rail figure, .reel { flex-basis: 240px; }
}

/* Autocomplete Dropdown & Associate Selection Mobile Styles */
.assoc-dropdown-panel {
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(12, 47, 107, 0.16);
    background: #ffffff;
}
.associate-option:hover,
.associate-option:focus {
    background-color: #f1f5f9;
}
.associate-option:active {
    background-color: #e2e8f0;
}
@media (max-width: 575.98px) {
    .assoc-search-card {
        padding: 14px !important;
        border-radius: 16px !important;
    }
    .assoc-dropdown-panel {
        max-height: 290px !important;
    }
    .home-hero-banner .hero-highlights {
        font-size: 13px;
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }
    .home-story .lead {
        font-size: 15px !important;
    }
    .refer-sheet {
        padding: 18px 14px !important;
        border-radius: 18px !important;
    }
}
