:root {
    color-scheme: light;
    --ink: #1d1d1f;
    --muted: #60605c;
    --line: #dfd4bf;
    --paper: #f7f1e6;
    --surface: #ffffff;
    --accent: #a72420;
    --accent-dark: #741916;
    --gold: #c79a45;
    --jade: #236455;
    --ink-soft: #27231f;
    --body-font: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", "Heiti SC", "SimHei", Arial, sans-serif;
    --heading-font: "Noto Serif SC", "Songti SC", "SimSun", "Microsoft YaHei", serif;
    --body-size: 16px;
    --body-leading: 1.72;
    --heading-weight: 760;
    --panel-shadow: 0 18px 48px rgba(54, 38, 20, 0.08);
    --hover-shadow: 0 14px 40px rgba(54, 38, 20, 0.1);
    --hero-overlay-start: rgba(22, 19, 15, 0.82);
    --hero-overlay-end: rgba(22, 19, 15, 0.3);
    --banner-city-heritage: url("../img/banners/modern-city-heritage.jpg");
    --banner-community-culture: url("../img/banners/modern-community-culture.jpg");
    --banner-business-network: url("../img/banners/modern-business-network.jpg");
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(199, 154, 69, 0.16), transparent 34rem),
        linear-gradient(180deg, #fffaf1 0%, var(--paper) 48%, #fff 100%);
    color: var(--ink);
    font-family: var(--body-font);
    font-size: var(--body-size);
    line-height: var(--body-leading);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body[data-theme="modern-grey"] {
    --ink: #f4f1ea;
    --muted: #d0c8ba;
    --line: #5a5348;
    --paper: #1b1d1a;
    --surface: #292b27;
    --accent: #e06458;
    --accent-dark: #ffcf78;
    --gold: #d4a653;
    --jade: #91d5c2;
    --ink-soft: #fff6e8;
    --panel-shadow: 0 18px 52px rgba(0, 0, 0, 0.3);
    --hover-shadow: 0 16px 46px rgba(0, 0, 0, 0.34);
    --hero-overlay-start: rgba(8, 9, 8, 0.9);
    --hero-overlay-end: rgba(8, 9, 8, 0.48);
    color-scheme: dark;
    background:
        radial-gradient(circle at top left, rgba(209, 90, 77, 0.15), transparent 34rem),
        linear-gradient(180deg, #161816 0%, #22231f 58%, #181a18 100%);
}

body[data-theme="cny-festival"] {
    --ink: #2a100c;
    --muted: #73514a;
    --line: #e1b766;
    --paper: #fff2d3;
    --surface: #fffaf0;
    --accent: #c51017;
    --accent-dark: #8e0c13;
    --gold: #f0bd4d;
    --jade: #1f7a5a;
    --ink-soft: #3a130d;
    --heading-font: "Noto Serif SC", "Songti SC", "SimSun", "Microsoft YaHei", serif;
    --heading-weight: 780;
    --panel-shadow: 0 18px 44px rgba(149, 20, 18, 0.14);
    --hover-shadow: 0 16px 46px rgba(149, 20, 18, 0.18);
    --hero-overlay-start: rgba(114, 5, 11, 0.88);
    --hero-overlay-end: rgba(114, 5, 11, 0.34);
    background:
        linear-gradient(135deg, rgba(197, 16, 23, 0.09) 25%, transparent 25%) 0 0 / 38px 38px,
        radial-gradient(circle at top right, rgba(240, 189, 77, 0.28), transparent 32rem),
        linear-gradient(180deg, #fff4d6 0%, #ffe5aa 45%, #fff8e9 100%);
}

a {
    color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand,
.admin-title {
    color: var(--ink-soft);
    font-family: var(--heading-font);
    font-weight: var(--heading-weight);
    letter-spacing: 0;
}

p {
    color: inherit;
}

.text-muted,
.form-text,
.small.text-muted {
    color: var(--muted) !important;
}

.card,
.list-group-item,
.table,
.modal-content,
.dropdown-menu {
    color: var(--ink);
    background-color: var(--surface);
    border-color: var(--line);
}

.table {
    --bs-table-color: var(--ink);
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--line);
    --bs-table-striped-color: var(--ink);
    --bs-table-striped-bg: rgba(199, 154, 69, 0.08);
    --bs-table-hover-color: var(--ink);
    --bs-table-hover-bg: rgba(199, 154, 69, 0.12);
}

.site-header {
    min-height: 72px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

body[data-theme="modern-grey"] .site-header {
    background: rgba(31, 33, 31, 0.94);
}

body[data-theme="modern-grey"] .navbar-toggler {
    filter: invert(1);
}

body[data-theme="cny-festival"] .site-header {
    background:
        linear-gradient(90deg, rgba(197, 16, 23, 0.08), rgba(240, 189, 77, 0.12)),
        rgba(255, 250, 240, 0.96);
}

.brand {
    color: var(--accent);
    font-size: clamp(1.3rem, 2vw, 1.55rem);
    text-decoration: none;
    letter-spacing: 0;
}

.navbar .nav-link {
    color: var(--muted);
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1.35;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: var(--accent);
}

.btn-huatuan {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--accent-dark);
    --bs-btn-hover-border-color: var(--accent-dark);
    --bs-btn-focus-shadow-rgb: 167, 36, 32;
    font-weight: 700;
}

body[data-theme="modern-grey"] .btn-huatuan {
    --bs-btn-color: #1b1d1a;
    --bs-btn-bg: var(--gold);
    --bs-btn-border-color: var(--gold);
    --bs-btn-hover-color: #111;
    --bs-btn-hover-bg: #f0bf65;
    --bs-btn-hover-border-color: #f0bf65;
}

body[data-theme="cny-festival"] .btn-huatuan {
    --bs-btn-bg: #c51017;
    --bs-btn-border-color: #c51017;
    --bs-btn-hover-bg: #8e0c13;
    --bs-btn-hover-border-color: #8e0c13;
}

.site-main {
    min-height: calc(100vh - 70px);
}

.hero-carousel {
    background: var(--ink-soft);
}

.hero-slide {
    min-height: 64vh;
    color: #fff;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, var(--hero-overlay-start), var(--hero-overlay-end)),
        var(--hero-image) var(--hero-position, center)/cover;
}

body[data-theme="modern-grey"] .hero-slide::before,
body[data-theme="modern-grey"] .page-hero {
    background:
        linear-gradient(90deg, var(--hero-overlay-start), var(--hero-overlay-end)),
        var(--page-image, var(--hero-image, var(--banner-business-network))) var(--hero-position, center)/cover;
}

body[data-theme="cny-festival"] .hero-slide::before,
body[data-theme="cny-festival"] .page-hero {
    background:
        linear-gradient(90deg, var(--hero-overlay-start), var(--hero-overlay-end)),
        var(--page-image, var(--hero-image, var(--banner-city-heritage))) var(--hero-position, center)/cover;
}

.hero-slide-heritage {
    --hero-image: var(--banner-city-heritage);
    --hero-position: 62% center;
}

.hero-slide-clan {
    --hero-image: var(--banner-community-culture);
    --hero-position: 64% center;
}

.hero-slide-business {
    --hero-image: var(--banner-business-network);
    --hero-position: 64% center;
}

.hero-copy {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 64vh;
    flex-direction: column;
    justify-content: center;
    max-width: 720px;
    padding-block: clamp(72px, 12vw, 140px);
}

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

.hero-copy .eyebrow,
.page-hero .eyebrow,
.member-hero .eyebrow {
    color: #f4d28a;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0 0 16px;
    color: #fffaf0;
    font-size: clamp(2rem, 5.5vw, 4.25rem);
    line-height: 1.08;
    text-wrap: balance;
}

.hero-copy p:not(.eyebrow) {
    max-width: 580px;
    color: rgba(255, 250, 240, 0.88);
    font-size: clamp(1rem, 1.5vw, 1.12rem);
    line-height: 1.65;
}

.hero-copy .btn {
    align-self: flex-start;
    margin-top: 8px;
}

.feature-link {
    min-height: 180px;
    padding: 28px;
    background: var(--surface);
    border: 1px solid rgba(116, 25, 22, 0.12);
    border-radius: 8px;
    color: var(--ink);
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.feature-link:hover,
.feature-link:focus {
    border-color: rgba(167, 36, 32, 0.32);
    box-shadow: var(--hover-shadow);
    color: var(--ink);
    transform: translateY(-2px);
}

.feature-link strong {
    display: block;
    color: var(--accent-dark);
    font-size: 1.25rem;
}

.feature-link small {
    display: block;
    margin-top: 12px;
    color: var(--muted);
    line-height: 1.6;
}

.feature-kicker {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--jade);
    font-weight: 700;
}

.page-heading,
.auth-shell {
    padding-block: clamp(48px, 9vw, 92px);
}

.content-panel,
.auth-panel {
    padding: clamp(24px, 5vw, 42px);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 251, 244, 0.96)),
        var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--panel-shadow);
}

.section-anchor {
    scroll-margin-top: 96px;
}

body[data-theme="modern-grey"] .content-panel,
body[data-theme="modern-grey"] .auth-panel,
body[data-theme="modern-grey"] .metric-card,
body[data-theme="modern-grey"] .admin-panel,
body[data-theme="modern-grey"] .page-card,
body[data-theme="modern-grey"] .business-news-card,
body[data-theme="modern-grey"] .feature-link {
    background: rgba(43, 43, 40, 0.94);
    box-shadow: var(--panel-shadow);
}

body[data-theme="cny-festival"] .content-panel,
body[data-theme="cny-festival"] .auth-panel,
body[data-theme="cny-festival"] .metric-card,
body[data-theme="cny-festival"] .admin-panel,
body[data-theme="cny-festival"] .page-card,
body[data-theme="cny-festival"] .business-news-card,
body[data-theme="cny-festival"] .feature-link {
    background:
        linear-gradient(180deg, rgba(255, 252, 244, 0.97), rgba(255, 244, 214, 0.96)),
        var(--surface);
    border-color: rgba(197, 16, 23, 0.22);
}

.content-panel h1,
.auth-panel h1 {
    margin-bottom: 16px;
    color: var(--ink-soft);
    font-size: clamp(1.85rem, 4.4vw, 3rem);
    line-height: 1.15;
}

.member-entry-actions {
    display: grid;
    gap: 0.85rem;
}

.member-entry-action {
    display: block;
    padding: 1rem;
    color: var(--ink);
    text-decoration: none;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.member-entry-action strong,
.member-entry-action span {
    display: block;
}

.member-entry-action strong {
    margin-bottom: 0.35rem;
    color: var(--ink-soft);
}

.member-entry-action span {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.member-entry-action:not(.is-muted):hover {
    border-color: color-mix(in srgb, var(--brand-red) 36%, var(--line));
}

.member-entry-action.is-muted {
    opacity: 0.72;
}

.auth-helper-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem 1rem;
}

.admin-shell {
    min-height: calc(100vh - 72px);
}

.admin-title {
    margin: 0;
    color: var(--ink-soft);
    font-size: clamp(1.85rem, 4vw, 3rem);
    line-height: 1.12;
}

.metric-card,
.admin-panel {
    height: 100%;
    padding: 24px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--panel-shadow);
}

.metric-card span {
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: capitalize;
}

.metric-card strong {
    display: block;
    margin-top: 10px;
    color: var(--accent-dark);
    font-size: 2.2rem;
    line-height: 1;
}

.admin-panel h2 {
    color: var(--ink-soft);
    font-size: 1.22rem;
    line-height: 1.25;
}

.module-list .list-group-item {
    border-color: var(--line);
    color: var(--ink);
    font-weight: 600;
}

.module-list .list-group-item:hover,
.module-list .list-group-item:focus {
    background: rgba(199, 154, 69, 0.13);
    color: var(--accent-dark);
}

.admin-table {
    margin-bottom: 0;
}

.admin-table thead th {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.admin-table td,
.admin-table th {
    border-color: var(--line);
}

.admin-table .btn {
    margin-block: 2px;
}

.audit-details {
    display: inline-block;
    max-width: 420px;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--muted);
    background: color-mix(in srgb, var(--surface-soft) 80%, transparent);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0.35rem 0.5rem;
}

.avatar-sm {
    display: inline-grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-empty,
.member-photo-empty {
    background: #fff0d5;
    color: var(--accent-dark);
    font-weight: 800;
}

.profile-preview {
    width: 128px;
    height: 128px;
    border: 1px solid var(--line);
    border-radius: 8px;
    object-fit: cover;
}

.upload-card {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface-soft) 58%, var(--surface));
}

.upload-preview {
    display: grid;
    gap: 0.6rem;
}

.upload-empty {
    display: grid;
    min-height: 150px;
    place-items: center;
    border: 1px dashed color-mix(in srgb, var(--muted) 55%, transparent);
    border-radius: 8px;
    color: var(--muted);
    background: color-mix(in srgb, var(--surface) 70%, transparent);
    text-align: center;
}

.feature-preview {
    width: 100%;
    max-height: 220px;
    border: 1px solid var(--line);
    border-radius: 8px;
    object-fit: cover;
}

.table-thumb {
    width: 72px;
    height: 54px;
    flex: 0 0 72px;
    border: 1px solid var(--line);
    border-radius: 6px;
    object-fit: cover;
}

.member-hero {
    padding-block: clamp(48px, 9vw, 96px);
    color: #fff;
    background:
        linear-gradient(90deg, rgba(31, 25, 18, 0.86), rgba(31, 25, 18, 0.42)),
        var(--banner-business-network) center/cover;
}

.member-hero h1 {
    margin: 0 0 10px;
    color: #fffaf0;
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.42);
}

.member-hero .eyebrow {
    color: #ffe5a3;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.38);
}

.member-code {
    color: #f4d28a;
    font-weight: 700;
}

.member-photo-lg {
    display: grid;
    width: clamp(120px, 18vw, 180px);
    height: clamp(120px, 18vw, 180px);
    place-items: center;
    border: 4px solid rgba(255, 255, 255, 0.72);
    border-radius: 50%;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
    font-size: 4rem;
    object-fit: cover;
}

.profile-intro {
    color: var(--ink);
    line-height: 1.8;
}

.page-hero {
    padding-block: clamp(72px, 12vw, 150px);
    color: #fff;
    background:
        linear-gradient(90deg, var(--hero-overlay-start), var(--hero-overlay-end)),
        var(--page-image, var(--banner-community-culture)) center/cover;
}

.page-hero h1 {
    max-width: 820px;
    margin: 0;
    color: #fffaf0;
    font-size: clamp(2.1rem, 5.8vw, 4.4rem);
    line-height: 1.08;
    text-wrap: balance;
}

.page-body {
    color: var(--ink-soft);
    font-size: clamp(1rem, 1.2vw, 1.08rem);
    line-height: 1.85;
}

.page-sidebar {
    position: sticky;
    top: 96px;
}

.page-sidebar h2 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.page-sidebar-list {
    display: grid;
}

.page-sidebar-list a {
    display: grid;
    gap: 0.35rem;
    padding: 0.85rem 0;
    color: inherit;
    text-decoration: none;
    border-top: 1px solid var(--line);
}

.page-sidebar-list a:first-child {
    border-top: 0;
}

.page-sidebar-list strong {
    color: var(--ink);
    line-height: 1.35;
}

.page-sidebar-list small {
    color: var(--muted);
    font-weight: 700;
}

.page-sidebar-list a:hover strong {
    color: var(--accent);
    text-decoration: underline;
}

.profile-intro,
.business-news-content,
.page-body,
.venue-description {
    line-height: 1.75;
}

.profile-intro :where(p, ul, ol, blockquote, table),
.business-news-content :where(p, ul, ol, blockquote, table),
.page-body :where(p, ul, ol, blockquote, table),
.venue-description :where(p, ul, ol, blockquote, table) {
    margin-bottom: 1rem;
}

.profile-intro :where(ul, ol),
.business-news-content :where(ul, ol),
.page-body :where(ul, ol),
.venue-description :where(ul, ol) {
    padding-left: 1.35rem;
}

.profile-intro :where(h2, h3, h4),
.business-news-content :where(h2, h3, h4),
.page-body :where(h2, h3, h4),
.venue-description :where(h2, h3, h4) {
    margin-top: 1.35rem;
    color: var(--ink-soft);
}

.profile-intro table,
.business-news-content table,
.page-body table,
.venue-description table {
    width: 100%;
    margin-block: 1rem;
    border-collapse: collapse;
}

.profile-intro :where(th, td),
.business-news-content :where(th, td),
.page-body :where(th, td),
.venue-description :where(th, td) {
    padding: 0.65rem;
    border: 1px solid var(--line);
}

.page-card {
    display: grid;
    height: 100%;
    gap: 12px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.page-card:hover,
.page-card:focus {
    color: var(--ink);
    box-shadow: var(--hover-shadow);
    transform: translateY(-2px);
}

.page-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    object-fit: cover;
}

.page-card span {
    color: var(--muted);
    font-size: 0.82rem;
}

.page-card strong {
    color: var(--accent-dark);
    font-size: 1.15rem;
}

.page-card small {
    color: var(--muted);
    line-height: 1.6;
}

.latest-pages-section {
    background: color-mix(in srgb, var(--surface) 72%, var(--paper));
    border-top: 1px solid var(--line);
}

.latest-pages-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.75rem;
}

.latest-pages-heading h2 {
    margin-bottom: 0.3rem;
}

.btn-outline-huatuan {
    --bs-btn-color: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--accent);
    --bs-btn-hover-border-color: var(--accent);
    flex: 0 0 auto;
    font-weight: 700;
}

.latest-page-card {
    grid-template-rows: auto auto auto 1fr;
}

.page-card-image-placeholder {
    display: grid;
    width: 100%;
    aspect-ratio: 16 / 9;
    place-items: center;
    border-radius: 6px;
    background:
        linear-gradient(135deg, rgba(35, 100, 85, 0.88), rgba(116, 25, 22, 0.9));
    color: #fff;
    font-family: var(--heading-font);
    font-size: 1.3rem;
    font-weight: 700;
}

.page-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.page-card-meta span,
.page-card-meta time {
    color: var(--muted);
    font-size: 0.82rem;
}

.page-card-meta span {
    color: var(--jade);
    font-weight: 700;
}

@media (max-width: 767.98px) {
    .latest-pages-heading {
        align-items: flex-start;
    }

    .latest-pages-section .latest-pages-heading > .btn {
        display: none;
    }
}

.qr-thumb-link {
    display: inline-flex;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.qr-thumb {
    width: 72px;
    height: 72px;
}

.qr-card {
    display: grid;
    justify-items: center;
    gap: 14px;
    text-align: center;
}

.qr-profile {
    width: min(220px, 100%);
    height: auto;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.business-card {
    background: var(--surface);
    border: 1px solid var(--line);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
}

.business-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--hover-shadow);
}

.business-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.business-card-placeholder {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent), var(--gold));
    color: #fff;
    font-size: 4rem;
    font-family: Georgia, serif;
}

.business-feature-banner {
    overflow: hidden;
    margin-inline: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f1e8d8;
    box-shadow: 0 1rem 2rem rgba(31, 41, 55, .08);
}

.business-feature-banner img {
    display: block;
    width: 100%;
    max-height: 440px;
    object-fit: cover;
}

.news-table-content {
    min-width: 280px;
    max-width: 560px;
}

.news-photo-admin-grid,
.business-news-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.news-photo-admin-grid img,
.business-news-gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    border: 1px solid var(--line);
    border-radius: 6px;
    object-fit: cover;
}

.business-news-section .eyebrow {
    color: var(--jade);
}

.business-news-list {
    display: grid;
    gap: 18px;
}

.business-news-card {
    padding: clamp(20px, 4vw, 30px);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--panel-shadow);
}

.business-news-card time {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--accent-dark);
    font-weight: 700;
}

.business-news-title {
    display: block;
    width: 100%;
    padding: 0;
    color: var(--accent-dark);
    text-align: left;
    font: inherit;
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.4;
    background: transparent;
    border: 0;
}

.business-news-title:hover {
    color: var(--accent);
    text-decoration: underline;
}

.business-news-title {
    text-decoration: none;
}

.business-news-content {
    margin-top: 14px;
    color: var(--ink);
    line-height: 1.8;
}

.news-center-hero,
.news-detail-hero {
    padding-block: clamp(54px, 9vw, 112px);
    color: #fff;
    background:
        linear-gradient(90deg, rgba(44, 24, 18, 0.88), rgba(44, 24, 18, 0.36)),
        var(--banner-business-network) center/cover;
}

.news-center-hero.compact {
    padding-block: clamp(42px, 7vw, 82px);
}

.news-center-hero h1,
.news-detail-hero h1 {
    max-width: 920px;
    margin: 0;
    color: #fff8e8;
    font-size: clamp(2.15rem, 5.6vw, 4.35rem);
    line-height: 1.08;
}

.news-center-hero p:not(.eyebrow) {
    max-width: 640px;
    margin: 1rem 0 0;
    color: #ffe8ad;
    font-size: 1.08rem;
}

.news-detail-hero time {
    display: inline-block;
    margin-top: 1rem;
    color: #ffe8ad;
    font-weight: 700;
}

.news-central-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
    gap: 1.25rem;
    align-items: stretch;
}

.news-feature-card,
.news-list-card,
.news-headline-list a,
.news-sidebar-list a {
    color: inherit;
    text-decoration: none;
}

.news-feature-card {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    min-height: 420px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--panel-shadow);
}

.news-feature-image,
.news-list-image {
    display: grid;
    min-height: 100%;
    place-items: center;
    overflow: hidden;
    color: var(--accent-dark);
    font-weight: 800;
    background:
        linear-gradient(135deg, rgba(153, 28, 38, 0.12), rgba(211, 157, 64, 0.18)),
        var(--surface-soft);
}

.news-feature-image img,
.news-list-image img,
.news-photo-grid img,
.news-single-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-feature-body {
    display: flex;
    flex-direction: column;
    justify-content: end;
    gap: 0.8rem;
    padding: clamp(1.35rem, 3vw, 2.2rem);
}

.news-feature-body h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.75rem, 3.4vw, 3.1rem);
    line-height: 1.12;
}

.news-feature-body p,
.news-list-body p {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.65;
}

.news-feature-body time,
.news-list-body time,
.news-headline-list small,
.news-sidebar-list small {
    color: var(--muted);
    font-weight: 700;
}

.news-owner-badge {
    display: inline-flex;
    width: fit-content;
    padding: 0.22rem 0.55rem;
    color: var(--accent-dark);
    font-size: 0.82rem;
    font-weight: 800;
    border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.news-headline-panel {
    padding: clamp(1rem, 2.4vw, 1.35rem);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--panel-shadow);
}

.news-headline-list,
.news-sidebar-list {
    display: grid;
}

.news-headline-list a,
.news-sidebar-list a {
    display: grid;
    gap: 0.35rem;
    padding: 0.85rem 0;
    border-top: 1px solid var(--line);
}

.news-headline-list a:first-child,
.news-sidebar-list a:first-child {
    border-top: 0;
}

.news-headline-list strong,
.news-sidebar-list strong {
    color: var(--ink);
    line-height: 1.35;
}

.news-headline-list a:hover strong,
.news-sidebar-list a:hover strong,
.news-list-body h3 a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.news-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
}

.news-section-heading h2 {
    margin: 0;
}

.news-section-heading span {
    color: var(--muted);
    font-weight: 700;
}

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

.news-list-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--panel-shadow);
}

.news-list-image {
    min-height: 154px;
}

.news-list-body {
    display: grid;
    gap: 0.55rem;
    padding: 1.05rem 1.15rem;
}

.news-list-body h3 {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.35;
}

.news-list-body h3 a {
    color: var(--ink);
    text-decoration: none;
}

.news-article-panel {
    padding: clamp(1.15rem, 3vw, 2rem);
}

.news-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.news-photo-grid img,
.news-single-photo img {
    aspect-ratio: 4 / 3;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.news-single-photo {
    margin: 0;
}

.news-sidebar {
    position: sticky;
    top: 96px;
}

@media (max-width: 991px) {
    .news-central-layout,
    .news-feature-card {
        grid-template-columns: 1fr;
    }

    .news-feature-image {
        min-height: 260px;
    }

    .news-sidebar {
        position: static;
    }

    .page-sidebar {
        position: static;
    }
}

@media (max-width: 640px) {
    .news-list-card {
        grid-template-columns: 1fr;
    }

    .news-list-image {
        min-height: 190px;
    }

    .news-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

.business-news-gallery {
    margin-top: 18px;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.committee-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.committee-year-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.contribution-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.committee-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-block: 10px;
    border-bottom: 1px solid var(--line);
}

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

.committee-row strong {
    color: var(--accent-dark);
}

.committee-row span {
    color: var(--ink);
}

.committee-text {
    color: var(--ink);
    line-height: 1.9;
    white-space: normal;
}

.contribution-total {
    color: var(--accent-dark);
    font-size: 1.2rem;
    white-space: nowrap;
}

.contribution-entry-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px 22px;
    margin-top: 14px;
}

@media (min-width: 992px) {
    .contribution-entry-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    .contribution-entry-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .contribution-entry-list {
        grid-template-columns: 1fr;
    }

    .venue-rent-callout {
        grid-template-columns: 82px 1fr;
    }

    .venue-rent-picture {
        width: 82px;
    }
}

.contribution-entry-row {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
    padding-block: 10px;
    border-bottom: 1px solid var(--line);
}

.contribution-entry-name {
    color: var(--ink);
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

.contribution-entry-amount {
    display: block;
    color: var(--accent-dark);
    font-size: 0.96rem;
    line-height: 1.2;
}

.contribution-member-link {
    color: var(--accent-dark);
    font-weight: 700;
    text-decoration: none;
}

.contribution-member-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.member-contribution-list {
    display: grid;
    gap: 0.75rem;
}

.member-contribution-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 0.85rem 0;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
}

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

.member-contribution-row small {
    display: block;
    margin-top: 0.2rem;
    color: var(--muted);
}

.member-contribution-row:hover strong:first-child {
    color: var(--accent);
}

.news-pagination {
    display: flex;
    justify-content: center;
    margin-top: 22px;
}

.news-pagination .page-link {
    color: var(--accent-dark);
}

.news-pagination .active .page-link {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.venue-space-grid,
.venue-admin-list {
    display: grid;
    gap: 18px;
}

.venue-promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.venue-rent-callout {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    color: #fff;
    text-decoration: none;
    border: 1px solid color-mix(in srgb, var(--gold) 48%, var(--accent-dark));
    border-radius: 10px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent-dark) 94%, #111), color-mix(in srgb, var(--accent) 76%, var(--gold)));
    box-shadow: 0 16px 32px rgba(104, 30, 24, 0.18);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.venue-rent-callout:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 20px 38px rgba(104, 30, 24, 0.24);
}

.venue-rent-picture {
    display: grid;
    place-items: center;
    width: 96px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.72);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255, 244, 208, 0.96), rgba(210, 48, 42, 0.72));
    color: var(--accent-dark);
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
}

.venue-rent-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.venue-rent-copy {
    display: grid;
    gap: 4px;
}

.venue-rent-copy strong {
    font-size: 1.15rem;
    line-height: 1.15;
}

.venue-rent-copy small {
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.35;
}

.venue-rent-copy em {
    display: inline-flex;
    width: fit-content;
    margin-top: 4px;
    padding: 4px 10px;
    color: var(--accent-dark);
    font-size: 0.82rem;
    font-style: normal;
    font-weight: 800;
    background: #fff;
    border-radius: 999px;
}

.btn-venue-calendar {
    box-shadow: 0 10px 24px rgba(104, 30, 24, 0.18);
}

.venue-promo-card {
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.venue-promo-card:hover {
    color: inherit;
    border-color: rgba(149, 35, 41, 0.35);
    transform: translateY(-2px);
}

.venue-promo-image {
    display: grid;
    place-items: center;
    min-height: 150px;
    background: linear-gradient(135deg, rgba(149, 35, 41, 0.11), rgba(176, 133, 50, 0.16));
    color: var(--accent-dark);
    font-weight: 700;
}

.venue-promo-image img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.venue-promo-body {
    padding: 16px;
}

.venue-promo-body h3 {
    margin: 0 0 6px;
    font-size: 1.08rem;
}

.venue-promo-body p {
    min-height: 1.4em;
    margin: 0 0 12px;
    color: var(--muted);
}

.venue-promo-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.venue-promo-tags span {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(149, 35, 41, 0.08);
    color: var(--accent-dark);
    font-size: 0.82rem;
}

.venue-date-panel {
    max-width: 560px;
}

.venue-calendar-panel {
    overflow: hidden;
}

.venue-calendar-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.venue-calendar-weekdays,
.venue-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.venue-calendar-weekdays {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.82rem;
    text-align: center;
}

.venue-calendar-day {
    display: flex;
    min-height: 74px;
    flex-direction: column;
    justify-content: space-between;
    padding: 9px;
    color: var(--text);
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.65);
}

.venue-calendar-day:hover {
    color: var(--accent-dark);
    border-color: rgba(149, 35, 41, 0.35);
}

.venue-calendar-day span {
    font-weight: 700;
}

.venue-calendar-day small {
    color: var(--muted);
    font-size: 0.72rem;
}

.venue-calendar-day.is-available {
    background: rgba(37, 125, 86, 0.08);
}

.venue-calendar-day.has-booking {
    background: rgba(176, 133, 50, 0.14);
}

.venue-calendar-day.is-selected {
    color: #fff;
    border-color: var(--accent);
    background: var(--accent);
}

.venue-calendar-day.is-selected small {
    color: rgba(255, 255, 255, 0.82);
}

.venue-calendar-day.is-empty {
    visibility: hidden;
}

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

.venue-event-card {
    padding: 18px;
}

.venue-event-title {
    display: inline;
    width: auto;
    padding: 0;
    color: var(--accent-dark);
    text-align: left;
    font: inherit;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.35;
    background: transparent;
    border: 0;
}

.venue-event-title:hover {
    color: var(--accent);
    text-decoration: underline;
}

.venue-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.venue-event-meta span {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.7);
    font-size: 0.88rem;
}

.venue-event-detail {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.venue-space-card {
    overflow: hidden;
}

.venue-slot-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.venue-slot {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--accent-dark);
    background: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.venue-admin-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.62);
}

.venue-management-stack .admin-panel {
    height: auto;
}

.venue-management-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.venue-booking-panel {
    order: 2;
}

.venue-space-management-panel {
    order: 1;
}

.venue-space-management-panel h2 {
    margin-bottom: 4px;
}

.venue-admin-collapsed-card {
    padding: 0;
    overflow: hidden;
}

.venue-admin-summary {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border: 0;
    color: var(--ink);
    text-align: left;
    background: transparent;
}

.venue-admin-summary:hover {
    background: color-mix(in srgb, var(--surface-soft) 72%, transparent);
}

.venue-admin-summary strong,
.venue-admin-summary small {
    display: block;
}

.venue-admin-summary small {
    color: var(--muted);
}

.venue-admin-summary-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.venue-admin-detail {
    padding: 0 16px 16px;
    border-top: 1px solid var(--line);
}

.venue-admin-detail form {
    margin-top: 16px;
}

.admin-booking-title {
    color: var(--accent-dark);
    font-weight: 700;
    text-align: left;
    text-decoration: none;
}

.admin-booking-title:hover {
    color: var(--accent);
    text-decoration: underline;
}

.admin-booking-edit-row > td {
    padding-top: 0;
    border-top: 0;
}

.admin-booking-edit {
    margin: 8px 0 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
}

.member-search-results {
    display: grid;
    gap: 6px;
    margin-top: 8px;
}

.member-search-result {
    display: grid;
    gap: 2px;
    width: 100%;
    padding: 9px 10px;
    color: var(--ink);
    text-align: left;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.member-search-result:hover {
    border-color: rgba(149, 35, 41, 0.32);
    background: rgba(149, 35, 41, 0.06);
}

.member-search-result span,
.member-search-empty {
    color: var(--muted);
    font-size: 0.86rem;
}

.member-search-empty {
    padding: 8px 2px;
}

.venue-photo-grid,
.venue-photo-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.venue-photo-grid img,
.venue-photo-admin-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
}

.venue-photo-admin-grid {
    grid-template-columns: repeat(auto-fit, minmax(110px, 160px));
}

.venue-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px 12px;
}

.venue-check {
    min-width: 0;
}

.venue-tag-section {
    margin-bottom: 18px;
}

.venue-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.venue-tag {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(149, 35, 41, 0.22);
    border-radius: 999px;
    padding: 5px 10px;
    background: rgba(149, 35, 41, 0.08);
    color: var(--accent-dark);
    font-size: 0.9rem;
}

.venue-tag-alt {
    border-color: rgba(176, 133, 50, 0.28);
    background: rgba(176, 133, 50, 0.1);
}

@media (max-width: 575.98px) {
    .venue-calendar-weekdays,
    .venue-calendar-grid {
        gap: 5px;
    }

    .venue-calendar-day {
        min-height: 58px;
        padding: 6px;
    }

    .venue-calendar-day small {
        font-size: 0.62rem;
        line-height: 1.1;
    }
}

.theme-option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.theme-option-card {
    display: grid;
    gap: 12px;
    min-height: 250px;
    padding: 18px;
    cursor: pointer;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 14px 40px rgba(54, 38, 20, 0.06);
}

.theme-option-card:has(input:checked) {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(167, 36, 32, 0.18);
}

.theme-option-card strong {
    color: var(--ink-soft);
    font-size: 1.15rem;
}

.theme-option-card small {
    color: var(--muted);
    line-height: 1.6;
}

.country-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.country-filter .btn {
    border-radius: 999px;
    padding-inline: 0.9rem;
}

.theme-preview-window {
    display: grid;
    height: 120px;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 34px 1fr;
    gap: 8px;
    padding: 12px;
    border-radius: 8px;
}

.theme-preview-window span:first-child {
    grid-column: 1 / -1;
    border-radius: 6px;
}

.theme-preview-window span {
    border-radius: 6px;
}

.theme-preview-clean-white .theme-preview-window {
    background: #fffaf1;
    border: 1px solid #dfd4bf;
}

.theme-preview-clean-white .theme-preview-window span:first-child {
    background: #ffffff;
}

.theme-preview-clean-white .theme-preview-window span:nth-child(2) {
    background: #a72420;
}

.theme-preview-clean-white .theme-preview-window span:nth-child(3) {
    background: #f7f1e6;
}

.theme-preview-modern-grey .theme-preview-window {
    background: #1f211f;
    border: 1px solid #4a443c;
}

.theme-preview-modern-grey .theme-preview-window span:first-child {
    background: #2b2b28;
}

.theme-preview-modern-grey .theme-preview-window span:nth-child(2) {
    background: #d4a653;
}

.theme-preview-modern-grey .theme-preview-window span:nth-child(3) {
    background: #343530;
}

.theme-preview-cny-festival .theme-preview-window {
    background: #fff2d3;
    border: 1px solid #e1b766;
}

.theme-preview-cny-festival .theme-preview-window span:first-child {
    background: #c51017;
}

.theme-preview-cny-festival .theme-preview-window span:nth-child(2) {
    background: #f0bd4d;
}

.theme-preview-cny-festival .theme-preview-window span:nth-child(3) {
    background: #fffaf0;
}

.form-control {
    color: var(--ink);
    background-color: var(--surface);
    border-color: var(--line);
    border-radius: 6px;
    padding: 0.75rem 0.875rem;
}

.form-select {
    color: var(--ink);
    background-color: var(--surface);
    border-color: var(--line);
}

.form-control::placeholder {
    color: color-mix(in srgb, var(--muted) 76%, transparent);
}

.form-control:focus {
    color: var(--ink);
    background-color: var(--surface);
    border-color: var(--gold);
    box-shadow: 0 0 0 0.25rem rgba(199, 154, 69, 0.2);
}

.form-label {
    color: var(--muted);
    font-weight: 700;
}

body[data-theme="modern-grey"] .btn-outline-secondary {
    --bs-btn-color: var(--ink);
    --bs-btn-border-color: var(--line);
    --bs-btn-hover-color: #141514;
    --bs-btn-hover-bg: var(--gold);
    --bs-btn-hover-border-color: var(--gold);
}

body[data-theme="modern-grey"] .btn-outline-danger {
    --bs-btn-color: #ffb7b1;
    --bs-btn-border-color: #9a514d;
    --bs-btn-hover-color: #1b1d1a;
    --bs-btn-hover-bg: #ffb7b1;
    --bs-btn-hover-border-color: #ffb7b1;
}

body[data-theme="modern-grey"] .alert-success,
body[data-theme="modern-grey"] .alert-danger {
    color: var(--ink);
    background-color: #252722;
    border-color: var(--line);
}

body[data-theme="cny-festival"] .eyebrow,
body[data-theme="cny-festival"] .feature-kicker {
    color: var(--accent);
}

body[data-theme="cny-festival"] .hero-copy .eyebrow,
body[data-theme="cny-festival"] .page-hero .eyebrow,
body[data-theme="cny-festival"] .member-hero .eyebrow {
    color: #ffe5a3;
}

.carousel-indicators [data-bs-target] {
    width: 34px;
    height: 4px;
    border-radius: 999px;
}

.nav-logout-form {
    display: flex;
    align-items: center;
}

.nav-link-count {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.member-menu {
    display: flex;
    align-items: center;
}

.nav-member-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.nav-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1;
}

.member-dropdown {
    min-width: 220px;
    padding: 0.45rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.member-dropdown .dropdown-item {
    color: var(--ink);
    border-radius: 6px;
    padding: 0.65rem 0.75rem;
}

.member-dropdown .dropdown-item:hover,
.member-dropdown .dropdown-item:focus {
    color: var(--ink);
    background: color-mix(in srgb, var(--surface-soft) 82%, transparent);
}

.member-dropdown .dropdown-divider {
    border-color: var(--line);
}

.member-directory-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.member-card-head {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.member-card-head h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.2rem;
    line-height: 1.3;
}

.member-card-head p,
.request-row p {
    margin: 0.2rem 0 0;
    color: var(--muted);
    font-size: 0.92rem;
    overflow-wrap: anywhere;
}

.member-avatar {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid var(--line);
}

.member-avatar.member-photo-empty {
    position: relative;
    display: inline-grid;
    place-items: center;
    overflow: hidden;
    font-size: 0;
    line-height: 0;
    color: transparent;
    text-indent: -9999px;
}

.member-avatar.member-photo-empty::before {
    content: "";
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--accent) 78%, #ffffff);
    transform: translateY(-7px);
    text-indent: 0;
}

.member-avatar.member-photo-empty::after {
    content: "";
    position: absolute;
    bottom: 8px;
    width: 34px;
    height: 18px;
    border-radius: 18px 18px 8px 8px;
    background: color-mix(in srgb, var(--accent) 72%, #ffffff);
}

.member-card-intro {
    color: var(--muted);
    line-height: 1.7;
    margin: 0;
}

.member-card-actions,
.request-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    margin-top: auto;
}

.request-list {
    display: grid;
    gap: 0.85rem;
}

.request-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--line);
}

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

.request-row strong {
    color: var(--ink);
}

.chat-panel {
    padding: 0;
    overflow: hidden;
}

.whatsapp-chat {
    max-width: 960px;
    margin-inline: auto;
}

.chat-topbar {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 88%, var(--surface-soft));
}

.chat-topbar h1 {
    margin: 0;
    color: var(--ink);
    font-size: 1.25rem;
    line-height: 1.2;
}

.chat-thread {
    display: grid;
    gap: 0.9rem;
    max-height: 62vh;
    overflow-y: auto;
    padding: 1.25rem;
    background:
        linear-gradient(45deg, color-mix(in srgb, var(--line) 16%, transparent) 25%, transparent 25%),
        linear-gradient(-45deg, color-mix(in srgb, var(--line) 16%, transparent) 25%, transparent 25%),
        color-mix(in srgb, var(--surface-soft) 78%, transparent);
    background-size: 22px 22px;
}

.chat-message {
    display: flex;
}

.chat-message-other {
    justify-content: flex-start;
}

.chat-message-own {
    justify-content: flex-end;
}

.chat-bubble {
    max-width: min(680px, 82%);
    padding: 0.7rem 0.85rem 0.55rem;
    border: 1px solid var(--line);
    border-radius: 10px 10px 10px 3px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 8px 18px rgba(31, 28, 24, 0.06);
}

.chat-message-own .chat-bubble {
    border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
    background: color-mix(in srgb, var(--accent) 10%, var(--surface));
    border-radius: 10px 10px 3px 10px;
}

.chat-bubble p {
    margin: 0;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.chat-sender {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--accent);
    font-size: 0.78rem;
}

.chat-message-own .chat-sender {
    color: var(--accent-dark);
}

.chat-time {
    display: block;
    margin-top: 0.45rem;
    color: var(--muted);
    font-size: 0.78rem;
    text-align: right;
}

.chat-form {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 0.8rem;
    padding: 1rem;
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.conversation-panel {
    padding: 0;
    overflow: hidden;
}

.conversation-list {
    display: grid;
}

.conversation-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    transition: background-color 160ms ease, transform 160ms ease;
}

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

.conversation-row:hover {
    background: color-mix(in srgb, var(--surface-soft) 72%, transparent);
    transform: translateY(-1px);
}

.conversation-meta {
    display: grid;
    justify-items: end;
    gap: 0.4rem;
    min-width: 7rem;
}

.conversation-meta small {
    color: var(--muted);
    font-size: 0.78rem;
    text-align: right;
}

.member-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 1rem;
}

.sidebar-member-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.col-lg-4 .business-news-card {
    padding: 1rem;
}

.col-lg-4 .business-news-title {
    font-size: 1rem;
    line-height: 1.35;
}

.member-preview-card {
    display: grid;
    justify-items: center;
    gap: 0.75rem;
    padding: 1rem;
    color: var(--ink-soft);
    text-align: center;
    text-decoration: none;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--panel-shadow);
}

.member-preview-card:hover {
    border-color: color-mix(in srgb, var(--brand-red) 36%, var(--line));
}

.record-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-end;
}

.record-page-size {
    width: 5.5rem;
}

.urgent-panel {
    border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--accent) 7%, transparent), transparent 46%),
        var(--surface);
}

.pending-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(6.8rem, 1fr));
    gap: 0.65rem;
    min-width: min(100%, 25rem);
}

.pending-summary-grid div {
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.pending-summary-grid span,
.pending-item small {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
}

.pending-summary-grid strong {
    display: block;
    color: var(--brand-red);
    font-size: 1.55rem;
    line-height: 1.1;
}

.pending-box {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface) 88%, var(--surface-soft));
}

.pending-box h3 {
    margin: 0;
    font-size: 1rem;
}

.pending-list {
    display: grid;
    gap: 0.85rem;
}

.pending-item {
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.pending-item strong {
    display: block;
    color: var(--ink);
    line-height: 1.35;
}

.pending-item p {
    margin: 0.15rem 0;
    color: var(--ink-soft);
    line-height: 1.45;
}

.pending-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

@media (max-width: 640px) {
    .hero-slide,
    .hero-copy {
        min-height: 68vh;
    }

    .hero-slide-heritage,
    .hero-slide-clan,
    .hero-slide-business {
        --hero-position: 70% center;
    }

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

    .chat-bubble {
        max-width: 92%;
    }

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

    .chat-topbar {
        align-items: flex-start;
    }

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

    .conversation-meta {
        justify-items: start;
        min-width: 0;
    }

    .pending-summary-grid {
        grid-template-columns: 1fr;
    }
}
