@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Sora:wght@600;700;800&display=swap');

:root {
    --bg: #f4f0e7;
    --bg-accent: #e8e0cf;
    --surface: #ffffff;
    --surface-soft: #fcf8f1;
    --surface-strong: #f6efdf;
    --border: #dccfb8;
    --border-strong: #c7b894;
    --text: #1f1a12;
    --muted: #5f5543;
    --brand: #b7923d;
    --brand-dark: #8d6f2f;
    --brand-ink: #5f4a1f;
    --brand-soft: #f3e5c2;
    --danger: #b04539;
    --warning: #9a7022;
    --success: #2f6b4f;
    --shadow-sm: 0 4px 12px rgba(25, 19, 10, 0.09);
    --shadow-md: 0 14px 32px rgba(22, 16, 9, 0.18);
    --page-max: 1320px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    color: var(--text);
    font-family: 'Manrope', 'Trebuchet MS', 'Lucida Sans Unicode', 'Segoe UI', sans-serif;
    line-height: 1.5;
    font-size: 15px;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    background:
        radial-gradient(circle at 4% 4%, #fffaf0 0%, rgba(255, 250, 240, 0.2) 35%, transparent 55%),
        radial-gradient(circle at 95% 8%, #f0e4cb 0%, rgba(240, 228, 203, 0.45) 20%, transparent 45%),
        radial-gradient(circle at 50% 110%, rgba(198, 173, 120, 0.2) 0%, rgba(198, 173, 120, 0) 42%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-accent) 100%);
}

h1,
h2,
h3,
h4 {
    font-family: 'Sora', 'Manrope', 'Segoe UI', sans-serif;
    line-height: 1.24;
    letter-spacing: -0.01em;
}

::selection {
    background: #f3dfaa;
    color: #2b2113;
}

a {
    color: var(--brand);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--brand-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #d6b463;
    outline-offset: 2px;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 272px minmax(0, 1fr);
    align-items: start;
}

.sidebar {
    background:
        radial-gradient(circle at top left, rgba(248, 225, 170, 0.22) 0%, rgba(248, 225, 170, 0) 42%),
        linear-gradient(180deg, #1a1712 0%, #0f0d0a 100%);
    color: #f2e8d2;
    padding: 1.45rem 1.2rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 110;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08);
}

.sidebar-backdrop {
    display: none;
}

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

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 0.72rem;
}

.brand-copy {
    display: grid;
    gap: 0.14rem;
}

.brand h1 {
    margin: 0;
    font-size: 1.32rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.05;
}

.brand p {
    margin: 0;
    color: #d9c7a1;
    font-size: 0.88rem;
    letter-spacing: 0.01em;
}

.bbh-logo-mark {
    display: block;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.sidebar-logo {
    width: 64px;
    height: 64px;
}

.main-nav {
    display: grid;
    gap: 0.55rem;
}

.main-nav a {
    color: #eddcb9;
    padding: 0.66rem 0.78rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.12s ease, color 0.2s ease;
    position: relative;
}

.main-nav a:hover {
    background: rgba(243, 216, 159, 0.15);
    border-color: rgba(243, 216, 159, 0.35);
    text-decoration: none;
}

.main-nav a.active {
    background: rgba(243, 216, 159, 0.24);
    border-color: rgba(243, 216, 159, 0.48);
    color: #fff7e7;
}

.main-nav a.active::before {
    content: '';
    position: absolute;
    left: -0.55rem;
    top: 20%;
    width: 3px;
    height: 60%;
    border-radius: 999px;
    background: #eecb84;
}

.main-content {
    width: 100%;
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 1.35rem 1.5rem 1.8rem;
}

.topbar {
    position: sticky;
    top: 0.7rem;
    z-index: 90;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
    padding: 0.95rem 1.1rem;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(255, 252, 246, 0.97) 0%, rgba(246, 238, 223, 0.92) 100%);
    border: 1px solid rgba(205, 187, 147, 0.6);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm);
    border-bottom-color: rgba(185, 162, 111, 0.62);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 0.72rem;
}

.topbar h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.015em;
    color: #332716;
}

.topbar p {
    margin: 0.24rem 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.68rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.icon-button {
    border: 1px solid var(--border-strong);
    background: linear-gradient(180deg, #fffdf8 0%, #f8efdc 100%);
    border-radius: var(--radius-sm);
    width: 42px;
    height: 42px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform 0.16s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.icon-button:hover {
    border-color: #bca372;
    background: linear-gradient(180deg, #fffefb 0%, #f5e6c7 100%);
    box-shadow: 0 4px 12px rgba(56, 41, 16, 0.2);
    transform: translateY(-1px);
}

.icon-button:active {
    transform: translateY(0);
}

.icon-button span {
    display: block;
    position: absolute;
    left: 50%;
    width: 18px;
    height: 2px;
    background: #5b4520;
    border-radius: 999px;
    transition: transform 0.2s ease, opacity 0.2s ease;
    transform-origin: center;
    transform: translateX(-50%);
}

.icon-button span:nth-child(1) {
    top: 13px;
}

.icon-button span:nth-child(2) {
    top: 20px;
}

.icon-button span:nth-child(3) {
    top: 27px;
}

.sidebar-toggle span,
.member-nav-toggle span {
    will-change: transform, opacity;
}

.sidebar-toggle[aria-expanded='true'] span:nth-child(1),
.member-nav-toggle[aria-expanded='true'] span:nth-child(1) {
    transform: translateX(-50%) translateY(7px) rotate(45deg);
}

.sidebar-toggle[aria-expanded='true'] span:nth-child(2),
.member-nav-toggle[aria-expanded='true'] span:nth-child(2) {
    opacity: 0;
}

.sidebar-toggle[aria-expanded='true'] span:nth-child(3),
.member-nav-toggle[aria-expanded='true'] span:nth-child(3) {
    transform: translateX(-50%) translateY(-7px) rotate(-45deg);
}

.sidebar-toggle,
.member-nav-toggle {
    display: none;
}

.panel {
    background: linear-gradient(180deg, #ffffff 0%, #fcf8f1 100%);
    border: 1px solid #d8ccb5;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
    margin-bottom: 1.22rem;
    animation: panelIn 0.28s ease;
}

@keyframes panelIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.panel-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.panel.page-hero,
.panel.dashboard-hero {
    background: linear-gradient(180deg, #fffdf7 0%, #f8f0df 100%);
    border-color: #d2c3a2;
}

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

.kpi-card {
    background: linear-gradient(180deg, #fffdf7 0%, #f7edd8 100%);
    border: 1px solid #d2c3a2;
    border-top: 3px solid #c39f56;
    border-radius: var(--radius-md);
    padding: 0.96rem;
}

.kpi-card h4 {
    margin: 0;
    font-size: 0.86rem;
    color: var(--muted);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.kpi-card p {
    margin: 0.42rem 0 0;
    font-size: 1.68rem;
    font-weight: 800;
    color: #3b2c17;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
    margin-bottom: 1rem;
}

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

.field {
    display: block;
}

.field.full {
    grid-column: span 2;
}

label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    color: #4a3a22;
    font-weight: 700;
    letter-spacing: 0.005em;
}

input[type='text'],
input[type='email'],
input[type='password'],
input[type='date'],
input[type='datetime-local'],
input[type='number'],
input[type='month'],
select,
textarea {
    width: 100%;
    border: 1px solid #d2c3a4;
    border-radius: 12px;
    padding: 0.68rem 0.78rem;
    color: var(--text);
    font: inherit;
    font-size: 0.95rem;
    line-height: 1.4;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:hover,
select:hover,
textarea:hover {
    border-color: #bca375;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #b99344;
    box-shadow: 0 0 0 3px rgba(185, 147, 68, 0.2);
    outline: none;
}

textarea {
    min-height: 132px;
    resize: vertical;
}

::placeholder {
    color: #8a7a5f;
}

input[type='checkbox'] {
    accent-color: var(--brand);
}

.checkbox-row {
    display: flex;
    gap: 0.9rem;
    align-items: center;
    flex-wrap: wrap;
}

.checkbox-row label {
    margin-bottom: 0;
    font-weight: 600;
    font-size: 0.88rem;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.65rem 1rem;
}

.checkbox-grid label {
    margin-bottom: 0;
    font-weight: 600;
    font-size: 0.9rem;
}

.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 12px;
    background: linear-gradient(180deg, #cfb06a 0%, var(--brand) 100%);
    color: #fff;
    padding: 0.62rem 1rem;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.2;
    min-height: 40px;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.08s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 4px 12px rgba(88, 66, 22, 0.24);
}

.button:hover,
button:hover {
    background: linear-gradient(180deg, #b9964f 0%, var(--brand-dark) 100%);
    text-decoration: none;
}

.button:active,
button:active {
    transform: translateY(1px);
}

.button.secondary,
button.secondary {
    background: linear-gradient(180deg, #695f4f 0%, #574c3d 100%);
    box-shadow: 0 2px 8px rgba(42, 34, 23, 0.22);
}

.button.warning,
button.warning {
    background: linear-gradient(180deg, #d1872b 0%, var(--warning) 100%);
    box-shadow: 0 2px 8px rgba(196, 122, 31, 0.18);
}

.button.danger,
button.danger {
    background: linear-gradient(180deg, #d5493b 0%, var(--danger) 100%);
    box-shadow: 0 2px 8px rgba(195, 61, 47, 0.18);
}

.button.ghost,
button.ghost {
    background: #f9f2e4;
    color: #4f3d20;
    border-color: #d8c29a;
    box-shadow: none;
}

button:disabled,
.button:disabled,
button[disabled] {
    opacity: 0.56;
    cursor: not-allowed;
    transform: none;
}

button.is-loading::after,
.button.is-loading::after {
    content: '';
    width: 12px;
    height: 12px;
    margin-left: 0.44rem;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: #ffffff;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.action-row,
.portal-actions {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    align-items: center;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #d8cab0;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    background: #fff;
    overflow: hidden;
}

thead {
    background: #f5ead2;
}

th,
td {
    text-align: left;
    padding: 0.76rem 0.78rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    line-height: 1.45;
}

th {
    color: #4d3b1f;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 800;
    line-height: 1.3;
}

thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

tbody tr:nth-child(even) {
    background: #fdf9f1;
}

tbody tr:hover {
    background: #f9f0dd;
}

.table-clean tbody td[colspan] {
    text-align: center;
    color: var(--muted);
    background: linear-gradient(180deg, #fffdf8 0%, #faf3e6 100%);
    font-style: italic;
    padding: 1rem 0.75rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.22rem 0.58rem;
    font-size: 0.73rem;
    font-weight: 800;
    border: 1px solid transparent;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.badge.blue {
    background: #f4e5c3;
    color: #6a4d1f;
    border-color: #e0c990;
}

.badge.green {
    background: #e3f8ec;
    color: #1f6f42;
    border-color: #bde6ce;
}

.badge.yellow {
    background: #fff3df;
    color: #82560f;
    border-color: #f1deb8;
}

.badge.red {
    background: #fdeaea;
    color: #8f2a2a;
    border-color: #f2caca;
}

.badge.gray {
    background: #f2ebe0;
    color: #625743;
    border-color: #dfd1bb;
}

.alert {
    border-radius: 12px;
    padding: 0.8rem 0.95rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    font-weight: 700;
    font-size: 0.9rem;
    transition: opacity 0.24s ease, transform 0.24s ease;
    box-shadow: 0 1px 8px rgba(56, 40, 15, 0.12);
}

.alert.is-hiding {
    opacity: 0;
    transform: translateY(-4px);
}

.alert.success {
    color: #1e603d;
    background: #e8f8ef;
    border-color: #c6ebd6;
}

.alert.error {
    color: #7f1f1f;
    background: #fdecec;
    border-color: #f5c8c8;
}

.alert.warning {
    color: #805315;
    background: #fff5e6;
    border-color: #f2ddba;
}

.muted {
    color: var(--muted);
    font-size: 0.87rem;
    line-height: 1.5;
    max-width: 76ch;
}

.page-footer {
    color: var(--muted);
    text-align: right;
    margin-top: 1.4rem;
}

.page-footer a {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.page-footer a:hover {
    color: var(--brand-dark);
}

.footer-sep {
    margin: 0 0.35rem;
    opacity: 0.7;
}

.member-footer {
    margin-top: 1rem;
    text-align: center;
}

.auth-page {
    min-height: 100vh;
}

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

.auth-shell-wide {
    max-width: 980px;
    margin: 0 auto;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    background: var(--surface);
    border: 1px solid #d5c5a4;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.35rem;
}

.auth-head {
    margin-bottom: 1.05rem;
    padding-bottom: 0.92rem;
    border-bottom: 1px solid #dfd1bb;
}

.auth-logo {
    width: 68px;
    height: 68px;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.auth-brand-copy {
    display: grid;
    align-content: center;
    gap: 0.16rem;
}

.auth-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid #deca9b;
    background: #f8eed8;
    color: #6b4f23;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    margin-bottom: 0.18rem;
}

.auth-head h1 {
    margin: 0;
    font-size: 1.42rem;
    font-weight: 800;
}

.auth-head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    max-width: 46ch;
}

.auth-note {
    margin-top: 0.65rem;
}

.auth-register-card {
    max-width: 980px;
    width: 100%;
}

.auth-register-head {
    display: flex;
    align-items: center;
    gap: 0.76rem;
}

.auth-register-copy {
    display: grid;
    gap: 0.18rem;
}

.auth-register-copy .page-eyebrow {
    margin: 0;
}

.auth-register-copy h3 {
    margin: 0;
}

.portal-home {
    width: min(840px, 100%);
    margin: 0 auto;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(250px, 1fr);
    gap: 1.3rem;
    align-items: start;
}

.portal-brand {
    display: flex;
    align-items: center;
    gap: 0.88rem;
}

.portal-brand-copy {
    display: grid;
    gap: 0.16rem;
}

.portal-brand-copy .page-eyebrow {
    margin: 0;
}

.portal-home h1 {
    margin: 0;
    font-size: 1.8rem;
    line-height: 1.2;
}

.portal-logo {
    width: 80px;
    height: 80px;
}

.portal-home .muted {
    margin-top: 0.7rem;
    max-width: 54ch;
}

.portal-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.portal-home-actions {
    display: grid;
    gap: 0.58rem;
}

.portal-home-actions .button {
    width: 100%;
}

.member-shell {
    min-height: 100vh;
    max-width: 1240px;
    margin: 0 auto;
    padding: 1.2rem;
}

.member-header {
    background:
        radial-gradient(circle at left top, rgba(251, 229, 177, 0.2) 0%, rgba(251, 229, 177, 0) 45%),
        linear-gradient(180deg, #201a12 0%, #120f0b 100%);
    color: #f4e8ce;
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    margin-bottom: 1.2rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.member-head-main {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.member-brand h1 {
    margin: 0;
    font-size: 1.72rem;
    font-weight: 800;
    letter-spacing: -0.015em;
    line-height: 1.06;
}

.member-brand {
    display: block;
}

.member-brand-lockup {
    display: flex;
    align-items: center;
    gap: 0.76rem;
}

.member-brand-copy {
    display: grid;
    gap: 0.16rem;
}

.member-logo {
    width: 62px;
    height: 62px;
}

.member-brand p {
    margin: 0;
    color: #d9c79f;
    font-size: 0.95rem;
    line-height: 1.38;
}

.member-nav {
    display: flex;
    gap: 0.48rem;
    flex-wrap: wrap;
}

.member-nav a {
    color: #f2e7cd;
    background: rgba(241, 214, 159, 0.14);
    border: 1px solid rgba(241, 214, 159, 0.18);
    border-radius: 12px;
    padding: 0.52rem 0.76rem;
    font-weight: 700;
    font-size: 0.88rem;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.member-nav a:hover {
    text-decoration: none;
    background: rgba(241, 214, 159, 0.24);
}

.member-nav a.active {
    background: rgba(241, 214, 159, 0.3);
    border-color: rgba(241, 214, 159, 0.46);
}

.member-content {
    padding-bottom: 1rem;
}

.qr-code-wrap {
    display: inline-flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.7rem;
    background: #faf3e4;
    border: 1px solid #d7c8aa;
    border-radius: 12px;
}

.qr-code-image {
    width: 180px;
    height: 180px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #d6c7ac;
    object-fit: contain;
}

.qr-code-token {
    font-family: Consolas, Monaco, 'Courier New', monospace;
    background: #f5eddd;
    border: 1px dashed #c3ab7d;
    border-radius: 10px;
    padding: 0.45rem 0.6rem;
    display: inline-block;
    font-size: 0.88rem;
    letter-spacing: 0.035em;
}

.page-hero,
.dashboard-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.page-eyebrow,
.dashboard-eyebrow {
    margin: 0;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 800;
    color: #7d6028;
}

.page-hero h3,
.dashboard-hero h3 {
    margin: 0.4rem 0 0;
    font-size: 1.34rem;
    line-height: 1.3;
}

.page-hero .muted,
.dashboard-hero .muted {
    margin-top: 0.45rem;
    max-width: 70ch;
}

.page-actions,
.dashboard-actions {
    justify-content: flex-end;
}

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

.page-metric {
    background: linear-gradient(180deg, #fffdf7 0%, #f7edd8 100%);
    border: 1px solid #d6c6a8;
    border-radius: var(--radius-md);
    padding: 0.86rem 0.92rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.page-metric span {
    display: block;
    color: #6b5b40;
    font-size: 0.82rem;
    font-weight: 700;
}

.page-metric strong {
    display: block;
    margin-top: 0.3rem;
    color: #3d2d18;
    font-size: 1.36rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.page-table-panel .panel-header {
    margin-bottom: 1.05rem;
}

.page-table-panel {
    overflow-x: auto;
}

.page-table-panel .filter-row {
    margin-bottom: 1.1rem;
}

.page-action-stack form {
    margin: 0;
}

.inline-status-form {
    display: grid;
    grid-template-columns: minmax(110px, 1fr) minmax(160px, 1fr) auto;
    gap: 0.45rem;
    align-items: center;
}

.inline-status-form input[type='text'] {
    min-width: 0;
}

.approval-actions {
    align-items: center;
}

.inline-decline-form {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) auto;
    gap: 0.45rem;
    align-items: center;
}

.inline-decline-form input[type='text'] {
    min-width: 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(300px, 1fr);
    gap: 1.2rem;
    align-items: start;
}

.dashboard-main,
.dashboard-side {
    display: grid;
    gap: 1.2rem;
}

.dashboard-watchlist .panel-header {
    align-items: center;
}

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

.risk-list li {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.7rem;
    border: 1px solid #d6c7aa;
    background: linear-gradient(180deg, #fffdf8 0%, #f8f0df 100%);
    border-radius: 12px;
    padding: 0.62rem;
}

.risk-list strong {
    display: inline-block;
    margin-bottom: 0.1rem;
}

.table-clean tbody tr:last-child td {
    border-bottom: 0;
}

.landing-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 8% 6%, rgba(243, 223, 170, 0.28) 0%, rgba(243, 223, 170, 0) 38%),
        radial-gradient(circle at 92% 0%, rgba(218, 194, 139, 0.2) 0%, rgba(218, 194, 139, 0) 32%),
        linear-gradient(180deg, #f4f0e7 0%, #ece5d4 100%);
}

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

.landing-header {
    position: sticky;
    top: 0;
    z-index: 180;
    background:
        linear-gradient(165deg, rgba(44, 35, 22, 0.98) 0%, rgba(23, 18, 12, 0.98) 100%);
    border-bottom: 1px solid rgba(245, 225, 181, 0.24);
    backdrop-filter: blur(6px);
}

.landing-header-inner {
    width: min(var(--page-max), 100%);
    margin: 0 auto;
    padding: 0.62rem 1.2rem 0.52rem;
    display: flex;
    align-items: center;
    gap: 0.72rem;
    flex-wrap: wrap;
    row-gap: 0.5rem;
}

.landing-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.66rem;
    color: #f5ebd7;
}

.landing-brand:hover {
    color: #fff7e7;
    text-decoration: none;
}

.landing-logo {
    width: 50px;
    height: 50px;
}

.landing-brand-copy {
    display: grid;
    gap: 0.04rem;
}

.landing-brand-copy strong {
    font-family: 'Sora', 'Manrope', 'Segoe UI', sans-serif;
    font-size: 1.03rem;
    line-height: 1.1;
    letter-spacing: 0.03em;
}

.landing-brand-copy small {
    color: #d6c39c;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
}

.landing-primary-nav {
    display: flex;
    align-items: center;
    order: 3;
    width: 100%;
    margin-left: 0;
    gap: 0.92rem;
    padding-top: 0.42rem;
    border-top: 1px solid rgba(245, 225, 181, 0.2);
}

.landing-primary-nav a {
    color: #eadcc0;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-bottom: 2px solid transparent;
    padding-bottom: 0.2rem;
    line-height: 1.2;
}

.landing-primary-nav a:hover {
    color: #fff6e1;
    border-bottom-color: #d0b072;
}

.landing-primary-nav a.is-active {
    color: #fff6e1;
    border-bottom-color: #d0b072;
}

.landing-portal-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    order: 2;
}

.landing-portal-nav .button {
    min-height: 34px;
    padding: 0.42rem 0.74rem;
    font-size: 0.8rem;
}

.landing-main {
    width: min(var(--page-max), 100%);
    margin: 0 auto;
    padding: 1.8rem 1.5rem 3rem;
    display: grid;
    gap: 1.6rem;
}

.landing-hero {
    position: relative;
    overflow: hidden;
    padding: 2.25rem;
    background:
        radial-gradient(circle at right -8%, rgba(244, 214, 153, 0.24) 0%, rgba(244, 214, 153, 0) 39%),
        linear-gradient(165deg, #30261b 0%, #17120d 100%);
    border: 1px solid #4c3c27;
    border-top: 3px solid #d2af6b;
    color: #f6eddc;
}

.landing-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.9fr);
    gap: 1rem;
    align-items: stretch;
}

.landing-hero-main {
    display: block;
}

.landing-hero .landing-kicker {
    margin: 0;
    color: #dfc188;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.landing-hero h1 {
    margin: 0.72rem 0 0;
    max-width: 16ch;
    font-size: clamp(2rem, 3.7vw, 3rem);
    line-height: 1.08;
    color: #fff4df;
}

.landing-intro {
    margin: 0.75rem 0 0;
    max-width: 52ch;
    color: #e8dcc4;
    font-size: 1.02rem;
}

.landing-hero-actions {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.landing-local-highlights {
    margin-top: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.48rem;
}

.landing-local-highlights span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0.3rem 0.68rem;
    border-radius: 999px;
    border: 1px solid rgba(229, 199, 143, 0.48);
    background: rgba(235, 208, 155, 0.12);
    color: #f1dfbc;
    font-size: 0.77rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 700;
}

.landing-hero-side {
    border: 1px solid rgba(230, 203, 151, 0.35);
    border-left: 3px solid #d4b377;
    border-radius: 12px;
    background: rgba(238, 217, 176, 0.09);
    padding: 0.95rem 0.95rem 0.9rem;
}

.landing-hero-side h2 {
    margin: 0.7rem 0 0;
    color: #f5e3bd;
    font-size: 1.06rem;
}

.landing-hero-side p {
    margin: 0.5rem 0 0;
    color: #e4d3af;
    font-size: 0.92rem;
}

.landing-section {
    padding: 1.8rem 1.75rem;
}

.landing-section-head {
    margin-bottom: 1.18rem;
}

.landing-section-head h2 {
    margin: 0.35rem 0 0;
    font-size: clamp(1.34rem, 2.2vw, 2rem);
    color: #2f2414;
}

.landing-section-soft {
    background: linear-gradient(180deg, #fffdf8 0%, #f7efde 100%);
}

.landing-photo-card {
    border-radius: 12px;
    border: 1px solid #d7c39b;
    background: #f5ead1;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.landing-photo-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    filter: brightness(1.03) saturate(1.04);
}

.landing-photo-hero,
.landing-photo-community,
.landing-photo-steps,
.landing-photo-stories {
    width: 100%;
}

.landing-photo-hero {
    aspect-ratio: 16 / 10;
}

.landing-photo-hero .landing-photo-img {
    object-position: center 42%;
}

.landing-photo-community {
    aspect-ratio: 16 / 9;
    margin-bottom: 1rem;
}

.landing-photo-community .landing-photo-img {
    object-position: center 58%;
}

.landing-photo-steps {
    aspect-ratio: 16 / 10;
    min-height: 0;
    max-width: none;
    width: 100%;
    justify-self: stretch;
}

.landing-photo-steps .landing-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 52%;
}

.landing-photo-stories {
    aspect-ratio: 16 / 8;
    margin-bottom: 1rem;
}

.landing-photo-stories .landing-photo-img {
    object-position: center 36%;
}

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

.landing-feature-card {
    border: 1px solid #d8c7a3;
    border-top: 3px solid #caa35c;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, #fffdf8 0%, #f7edd9 100%);
    padding: 1.1rem;
}

.landing-feature-card h3 {
    margin: 0;
    font-size: 1.04rem;
    color: #342716;
}

.landing-feature-card p {
    margin: 0.5rem 0 0;
    color: #5f5543;
}

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

.landing-quote {
    margin: 0;
    border: 1px solid #d8c8a8;
    border-left: 3px solid #c79d52;
    border-radius: var(--radius-md);
    padding: 1.05rem;
    background: #fffdf8;
}

.landing-quote p {
    margin: 0;
    color: #30261a;
    font-size: 0.98rem;
}

.landing-quote cite {
    display: block;
    margin-top: 0.62rem;
    color: #6c5d44;
    font-size: 0.83rem;
    font-style: normal;
    font-weight: 700;
}

.landing-steps {
    background: linear-gradient(180deg, #fffcf4 0%, #f5ebd7 100%);
}

.landing-bottom-cta {
    text-align: center;
    padding: 1.9rem 1.5rem;
    background: linear-gradient(180deg, #fffdf7 0%, #f3e9d3 100%);
}

.landing-bottom-cta h2 {
    margin: 0;
    font-size: clamp(1.35rem, 2.2vw, 2rem);
    color: #2f2414;
}

.landing-bottom-cta p {
    margin: 0.62rem auto 0;
    max-width: 62ch;
    color: #5f5543;
}

.landing-bottom-cta-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.landing-footer {
    margin-top: 1.1rem;
    border-top: 1px solid #d8c9a9;
    background: rgba(255, 250, 241, 0.86);
}

.landing-footer-inner {
    width: min(var(--page-max), 100%);
    margin: 0 auto;
    padding: 0.85rem 1.2rem 1rem;
    display: flex;
    justify-content: space-between;
    gap: 0.7rem;
    align-items: center;
    flex-wrap: wrap;
}

.landing-footer p {
    margin: 0;
    color: #655944;
    font-size: 0.84rem;
}

.landing-footer-links {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.landing-footer-links a {
    font-size: 0.82rem;
    font-weight: 700;
    color: #6b4f23;
}

.landing-footer-links a:hover {
    color: #8d6f2f;
}

.landing-reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.landing-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.landing-steps-layout {
    display: grid;
    grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
    gap: 0.8rem;
    align-items: start;
}

.landing-step-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
    counter-reset: landing-step;
    align-content: start;
}

.landing-step-list li {
    counter-increment: landing-step;
    border: 1px solid #d9c9ab;
    border-radius: var(--radius-md);
    background: #fffefb;
    padding: 0.74rem 0.88rem 0.78rem 2.45rem;
    display: grid;
    gap: 0.22rem;
    position: relative;
    min-height: 0;
}

.landing-step-list li::before {
    content: counter(landing-step);
    position: absolute;
    left: 0.78rem;
    top: 0.7rem;
    width: 1.3rem;
    height: 1.3rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #d8bc84;
    color: #3a2b13;
    font-weight: 800;
    font-size: 0.72rem;
}

.landing-step-list strong {
    color: #342717;
    font-size: 0.93rem;
    line-height: 1.3;
}

.landing-step-list span {
    color: #615845;
    font-size: 0.88rem;
    line-height: 1.35;
}

.landing-steps .landing-photo-steps {
    max-height: 340px;
    min-height: 0;
}

@media (max-width: 1100px) {
    .landing-primary-nav {
        width: 100%;
        gap: 0.8rem;
        padding-top: 0.34rem;
    }

    .landing-primary-nav a {
        font-size: 0.76rem;
        letter-spacing: 0.04em;
    }

    .landing-hero-grid {
        grid-template-columns: 1fr;
    }

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

    .landing-photo-steps {
        aspect-ratio: 16 / 10;
        min-height: 0;
        max-width: none;
        width: 100%;
        max-height: none;
    }

    .landing-feature-grid,
    .landing-testimonials,
    .landing-step-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .landing-header-inner {
        padding: 0.56rem 0.82rem 0.48rem;
        gap: 0.5rem;
    }

    .landing-primary-nav {
        order: 2;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        gap: 0.72rem;
        padding-bottom: 0.14rem;
        -webkit-overflow-scrolling: touch;
    }

    .landing-primary-nav::-webkit-scrollbar {
        height: 4px;
    }

    .landing-primary-nav::-webkit-scrollbar-thumb {
        background: rgba(215, 192, 144, 0.55);
        border-radius: 999px;
    }

    .landing-primary-nav a {
        flex: 0 0 auto;
        font-size: 0.74rem;
    }

    .landing-portal-nav {
        order: 3;
        width: 100%;
        justify-content: flex-end;
    }

    .landing-portal-nav .button {
        min-height: 32px;
        font-size: 0.76rem;
        padding: 0.4rem 0.68rem;
    }

    .landing-main {
        padding: 0.9rem 0.9rem 1.6rem;
    }

    .landing-hero {
        padding: 1.2rem;
    }

    .landing-section {
        padding: 1.15rem;
    }

    .landing-hero h1 {
        font-size: clamp(1.58rem, 8.2vw, 2.05rem);
    }

    .landing-intro {
        font-size: 0.95rem;
    }

    .landing-photo-community,
    .landing-photo-hero,
    .landing-photo-steps,
    .landing-photo-stories {
        aspect-ratio: 4 / 3;
    }

    .landing-photo-img {
        filter: brightness(1.08) saturate(1.05);
    }

    .landing-photo-hero .landing-photo-img {
        object-position: center 40%;
    }

    .landing-photo-community .landing-photo-img {
        object-position: center 52%;
    }

    .landing-photo-stories .landing-photo-img {
        object-position: center 32%;
    }

    .landing-step-list li {
        padding-left: 2.45rem;
    }

    .landing-step-list li::before {
        left: 0.72rem;
        top: 0.72rem;
    }

    .landing-photo-steps {
        max-height: none;
    }

    .landing-footer-inner {
        padding: 0.72rem 0.82rem 0.9rem;
    }

    .landing-footer p {
        font-size: 0.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

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

    .filter-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

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

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

    .portal-home {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 920px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 285px;
        transform: translateX(-105%);
        transition: transform 0.24s ease;
        box-shadow: var(--shadow-md);
        z-index: 220;
    }

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

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        border: 0;
        background: rgba(8, 22, 35, 0.42);
        display: none;
        z-index: 210;
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
    }

    .sidebar-toggle {
        display: inline-flex;
    }

    .main-content {
        padding: 0.9rem;
    }

    .topbar {
        top: 0.5rem;
        padding: 0.84rem 0.9rem;
    }

    .topbar-user span {
        display: none;
    }

    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        min-width: 100%;
    }

    .member-header {
        display: block;
        padding: 0.96rem;
    }

    .member-brand-lockup {
        align-items: flex-start;
    }

    .member-brand h1 {
        font-size: 1.42rem;
    }

    .member-brand p {
        font-size: 0.9rem;
    }

    .member-nav-toggle {
        display: inline-flex;
        background: rgba(255, 255, 255, 0.94);
    }

    .member-nav {
        margin-top: 0.8rem;
        display: none;
        gap: 0.4rem;
    }

    body.member-nav-open .member-nav {
        display: flex;
    }

    .form-grid,
    .filter-row,
    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .field.full {
        grid-column: span 1;
    }
}

@media (max-width: 620px) {
    .button,
    button {
        white-space: normal;
        min-height: 42px;
        font-size: 0.92rem;
    }

    .landing-portal-nav .button {
        min-height: 32px;
        font-size: 0.75rem;
        white-space: nowrap;
        padding: 0.38rem 0.62rem;
    }

    .page-hero,
    .dashboard-hero {
        display: block;
    }

    .page-actions,
    .dashboard-actions {
        margin-top: 0.8rem;
        justify-content: stretch;
    }

    .page-actions .button,
    .dashboard-actions .button {
        width: 100%;
    }

    .portal-home {
        padding: 0.95rem;
    }

    .portal-brand {
        align-items: flex-start;
        gap: 0.7rem;
    }

    .portal-logo {
        width: 64px;
        height: 64px;
    }

    .portal-home h1 {
        font-size: 1.52rem;
    }

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

    .page-action-stack {
        width: 100%;
    }

    .page-action-stack form {
        width: 100%;
    }

    .page-action-stack button {
        width: 100%;
    }

    .topbar {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .topbar h2 {
        font-size: 1.16rem;
    }

    .topbar p {
        font-size: 0.84rem;
    }

    .portal-actions .button,
    .portal-actions button,
    .action-row .button,
    .action-row button {
        width: 100%;
    }

    .action-row form,
    .portal-actions form {
        width: 100%;
    }

    .action-row form button {
        width: 100%;
    }

    .auth-shell {
        padding: 0.9rem;
    }

    .auth-card {
        padding: 0.95rem;
    }

    .auth-brand,
    .auth-register-head {
        align-items: flex-start;
    }

    .auth-logo {
        width: 60px;
        height: 60px;
    }

    .auth-head h1 {
        font-size: 1.28rem;
    }

    .member-logo {
        width: 56px;
        height: 56px;
    }

    .member-brand h1 {
        font-size: 1.24rem;
    }

    .panel {
        padding: 1rem;
        border-radius: 14px;
    }
}
