@font-face {
    font-family: "Tajawal";
    src: url("../fonts/tajawal/Tajawal-Regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Tajawal";
    src: url("../fonts/tajawal/Tajawal-Medium.ttf") format("truetype");
    font-style: normal;
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: "Tajawal";
    src: url("../fonts/tajawal/Tajawal-Bold.ttf") format("truetype");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: "Tajawal";
    src: url("../fonts/tajawal/Tajawal-ExtraBold.ttf") format("truetype");
    font-style: normal;
    font-weight: 800;
    font-display: swap;
}

@font-face {
    font-family: "Tajawal";
    src: url("../fonts/tajawal/Tajawal-Black.ttf") format("truetype");
    font-style: normal;
    font-weight: 900;
    font-display: swap;
}

:root {
    --page: #f4f6f2;
    --surface: #ffffff;
    --surface-2: #f8faf6;
    --line: #d9dfd5;
    --line-strong: #c8cfbf;
    --ink: #17231b;
    --muted: #69766e;
    --emerald: #045036;
    --emerald-2: #0d6a48;
    --gold: #c19733;
    --gold-soft: #f7edd3;
    --danger: #c94435;
    --warning: #b47b12;
    --success: #147c4f;
    --shadow: 0 8px 24px rgba(21, 38, 28, .08);
    --shadow-hover: 0 18px 45px rgba(21, 38, 28, .16);
    --system-bar-height: 58px;
}

* { box-sizing: border-box; }
html {
    direction: rtl;
    overflow-x: hidden;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 18% 8%, rgba(4, 80, 54, .06), transparent 32%),
        radial-gradient(circle at 70% 18%, rgba(193, 151, 51, .08), transparent 26%),
        var(--page);
    color: var(--ink);
    font-family: "Tajawal", "Cairo", "Noto Kufi Arabic", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
    letter-spacing: 0;
    font-size: 13px;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

body.auth-body {
    min-height: 100vh;
    direction: ltr;
    color: #f7f2df;
    background:
        radial-gradient(circle at 84% 12%, rgba(218, 171, 74, .22), transparent 26%),
        radial-gradient(circle at 10% 90%, rgba(4, 80, 54, .38), transparent 34%),
        linear-gradient(135deg, #0a1e18 0%, #05241a 46%, #08140f 100%);
}

.auth-shell {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 30px;
    overflow: hidden;
}

.auth-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, transparent 0 34%, rgba(218, 171, 74, .10) 34.2%, transparent 34.7%),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 18px);
    opacity: .65;
    pointer-events: none;
}

.login-panel {
    position: relative;
    z-index: 1;
    width: min(1120px, 100%);
    min-height: 610px;
    display: grid;
    grid-template-columns: 1.12fr .88fr;
    direction: ltr;
    overflow: hidden;
    border: 1px solid rgba(218, 171, 74, .72);
    border-radius: 12px;
    background: rgba(3, 35, 25, .86);
    box-shadow:
        0 36px 110px rgba(0, 0, 0, .38),
        0 0 0 1px rgba(255, 255, 255, .04) inset;
}

.login-brand {
    position: relative;
    min-width: 0;
    display: grid;
    align-content: center;
    direction: rtl;
    order: 2;
    padding: 56px 48px 34px;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(4, 80, 54, .42), rgba(4, 80, 54, .12)),
        radial-gradient(circle at 28% 48%, rgba(218, 171, 74, .12), transparent 34%);
    border-left: 1px solid rgba(218, 171, 74, .28);
}

.login-pattern {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(30deg, transparent 0 46%, rgba(218, 171, 74, .16) 46.2%, transparent 46.8%),
        repeating-linear-gradient(135deg, rgba(218, 171, 74, .055) 0 1px, transparent 1px 24px);
    opacity: .58;
}

.login-arch {
    position: absolute;
    inset-block: 56px;
    inset-inline-start: -160px;
    width: 370px;
    border: 3px solid rgba(218, 171, 74, .58);
    border-inline-end: 0;
    border-radius: 220px 0 0 220px;
    opacity: .85;
}

.login-brand-content {
    position: relative;
    z-index: 1;
    width: min(390px, 100%);
    margin-inline: auto;
    display: grid;
    justify-items: center;
    gap: 18px;
    text-align: center;
}

.login-full-logo {
    display: block;
    width: min(270px, 100%);
    height: auto;
    object-fit: contain;
    filter:
        brightness(1.16)
        saturate(1.08)
        drop-shadow(0 2px 0 rgba(255, 248, 231, .22))
        drop-shadow(0 22px 30px rgba(0, 0, 0, .24));
}

.login-gold-rule {
    position: relative;
    width: 168px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(218, 171, 74, .78), transparent);
}

.login-gold-rule::after {
    content: "";
    position: absolute;
    inset-block-start: -4px;
    inset-inline-start: 50%;
    width: 9px;
    height: 9px;
    background: #d8aa48;
    transform: translateX(50%) rotate(45deg);
}

.login-brand-copy {
    display: block;
    color: #dfb24f;
    font-size: 20px;
    line-height: 1.8;
    font-weight: 900;
    letter-spacing: 0;
    text-shadow: 0 2px 18px rgba(216, 170, 72, .20);
}

.login-feature-strip {
    position: absolute;
    inset-inline: 42px;
    inset-block-end: 28px;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding-top: 18px;
    border-top: 1px solid rgba(218, 171, 74, .32);
}

.login-feature {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    color: #f3e6bd;
    font-size: 12px;
    font-weight: 800;
}

.login-feature svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: #d8aa48;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-form-stage {
    display: grid;
    place-items: center;
    padding: 42px;
    direction: rtl;
    order: 1;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .025)),
        rgba(3, 29, 21, .74);
}

.login-form {
    width: min(430px, 100%);
    padding: 34px;
    border: 1px solid rgba(218, 171, 74, .48);
    border-radius: 12px;
    background: rgba(15, 54, 40, .72);
    box-shadow:
        0 24px 70px rgba(0, 0, 0, .24),
        inset 0 1px 0 rgba(255, 255, 255, .08);
    backdrop-filter: blur(12px);
}

.login-form-inner {
    width: 100%;
}

.login-form-head {
    margin-bottom: 22px;
    text-align: center;
}

.login-form-head h1 {
    margin: 0;
    color: #fff8e7;
    font-size: 27px;
    line-height: 1.35;
    font-weight: 900;
}

.login-form-head p {
    margin: 6px 0 0;
    color: rgba(255, 248, 231, .72);
    font-size: 13px;
    font-weight: 700;
}

.login-form .auth-error-box {
    width: 100%;
    margin: 0 0 16px;
    padding: 11px 14px;
    color: #ffd9d4;
    background: rgba(132, 28, 21, .22);
    border: 1px solid rgba(255, 117, 97, .34);
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .12);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.6;
    text-align: center;
}

.login-security-mark svg,
.auth-control-icon svg,
.password-toggle svg,
.login-submit svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-field {
    margin-top: 16px;
}

.auth-field label {
    display: block;
    margin-bottom: 7px;
    color: rgba(255, 248, 231, .76);
    font-size: 12px;
    font-weight: 800;
}

.auth-control {
    position: relative;
}

.auth-control input {
    width: 100%;
    min-height: 50px;
    padding: 0 46px 0 48px;
    color: #fff8e7;
    background: rgba(2, 22, 16, .68);
    border: 1px solid rgba(255, 248, 231, .18);
    border-radius: 8px;
    outline: 0;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.auth-control input::placeholder {
    color: rgba(255, 248, 231, .48);
}

.auth-control input:focus {
    border-color: rgba(218, 171, 74, .86);
    background: rgba(2, 22, 16, .82);
    box-shadow: 0 0 0 3px rgba(218, 171, 74, .14);
}

.auth-control-icon {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 15px;
    display: grid;
    place-items: center;
    color: rgba(255, 248, 231, .70);
    pointer-events: none;
}

.password-toggle {
    position: absolute;
    inset-block: 7px;
    inset-inline-end: 7px;
    width: 36px;
    display: grid;
    place-items: center;
    color: rgba(255, 248, 231, .66);
    background: rgba(255, 255, 255, .05);
    border: 1px solid transparent;
    border-radius: 7px;
    cursor: pointer;
    transition: color .16s ease, background .16s ease, border-color .16s ease;
}

.password-toggle:hover {
    color: #d8aa48;
    background: rgba(218, 171, 74, .10);
    border-color: rgba(218, 171, 74, .24);
}

.remember-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0 22px;
    color: rgba(255, 248, 231, .82);
    font-weight: 800;
    cursor: pointer;
    user-select: none;
}

.remember-row input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
    pointer-events: none;
}

.remember-switch {
    position: relative;
    width: 42px;
    height: 24px;
    flex: 0 0 42px;
    border-radius: 999px;
    background: rgba(2, 22, 16, .72);
    border: 1px solid rgba(255, 248, 231, .18);
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.remember-switch::after {
    content: "";
    position: absolute;
    inset-block-start: 3px;
    inset-inline-start: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 248, 231, .86);
    box-shadow: 0 3px 10px rgba(0, 0, 0, .24);
    transition: transform .18s ease, background .18s ease;
}

.remember-row input:checked + .remember-switch {
    background: linear-gradient(180deg, #e4b752, #bd8827);
    border-color: rgba(255, 235, 172, .80);
    box-shadow: 0 0 18px rgba(218, 171, 74, .18);
}

.remember-row input:checked + .remember-switch::after {
    background: #17301f;
    transform: translateX(-18px);
}

.remember-row input:focus-visible + .remember-switch {
    box-shadow: 0 0 0 3px rgba(218, 171, 74, .18);
}

.remember-text {
    font-size: 12px;
    line-height: 1;
}

.login-submit {
    width: 100%;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #183221;
    background: linear-gradient(180deg, #e9bf5d, #c8942f);
    border: 1px solid rgba(255, 235, 172, .76);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 900;
    box-shadow: 0 18px 36px rgba(0, 0, 0, .26), 0 0 26px rgba(218, 171, 74, .18);
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.login-submit:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 22px 46px rgba(0, 0, 0, .30), 0 0 32px rgba(218, 171, 74, .24);
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    padding-top: var(--system-bar-height);
}

.mobile-menu-state,
.mobile-menu-backdrop,
.mobile-menu-trigger,
.mobile-menu-close {
    display: none;
}

.page-loader {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    z-index: 80;
    height: 3px;
    background: linear-gradient(90deg, var(--emerald), var(--gold), var(--emerald));
    transform: scaleX(0);
    transform-origin: right center;
    opacity: 0;
    transition: transform .22s ease, opacity .14s ease;
}

body.is-pjax-loading {
    cursor: progress;
}

body.is-menu-open {
    overflow: hidden;
}

body.is-modal-open,
body.is-busy {
    overflow: hidden;
}

.app-busy-overlay {
    position: fixed;
    inset: 0;
    z-index: 140;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(10, 18, 13, .48);
    backdrop-filter: blur(5px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .16s ease;
    --progress: 0%;
}

body.is-busy .app-busy-overlay {
    opacity: 1;
    pointer-events: all;
}

.busy-card {
    width: min(340px, 100%);
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 22px;
    border-radius: 8px;
    color: var(--ink);
    background: rgba(255, 255, 255, .98);
    border: 1px solid rgba(255, 255, 255, .72);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .22);
    text-align: center;
}

.busy-ring {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background:
        radial-gradient(circle at center, #fff 58%, transparent 60%),
        conic-gradient(var(--emerald) var(--progress), #e7eee5 0);
    border: 1px solid #d7e3d5;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 12px 28px rgba(4, 80, 54, .15);
}

.busy-ring span {
    color: var(--emerald);
    font-size: 18px;
    font-weight: 900;
}

.busy-card strong {
    color: var(--emerald);
    font-size: 16px;
}

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

body.is-pjax-loading .page-loader {
    opacity: 1;
    transform: scaleX(1);
}

.main {
    transition: opacity .12s ease, transform .12s ease;
}

.main.is-loading {
    opacity: .78;
    transform: translateY(2px);
}

.modal-shell {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: grid;
    place-items: center;
    padding: 18px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .16s ease;
}

.modal-shell.is-open {
    opacity: 1;
    pointer-events: all;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 14, 10, .58);
    backdrop-filter: blur(4px);
}

.modal-card {
    position: relative;
    z-index: 1;
    width: min(680px, 100%);
    max-height: min(86vh, 780px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, .78);
    box-shadow: 0 30px 90px rgba(0, 0, 0, .28);
    transform: translateY(12px) scale(.98);
    transition: transform .18s ease;
}

.modal-shell.is-open .modal-card {
    transform: translateY(0) scale(1);
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(247, 251, 246, .98)),
        var(--surface);
}

.modal-head.danger-head h2 {
    color: var(--danger);
}

.modal-head h2 {
    margin: 0;
    color: var(--emerald);
    font-size: 17px;
    line-height: 1.5;
}

.modal-head p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.modal-close {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    border-radius: 8px;
    border: 1px solid #334155;
    background: #334155;
    color: #fff;
    cursor: pointer;
    transition: transform .16s ease, background .16s ease, color .16s ease, border-color .16s ease;
}

.modal-close:hover {
    transform: translateY(-1px);
    color: #fff;
    background: var(--danger);
    border-color: var(--danger);
}

.modal-close svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.modal-body {
    overflow: auto;
    padding: 18px;
}

.document-preview-modal {
    z-index: 125;
}

.document-modal-card {
    width: min(1180px, calc(100vw - 28px));
    height: min(92dvh, 980px);
    max-height: min(92dvh, 980px);
}

.document-modal-card .modal-head {
    align-items: flex-start;
}

.document-modal-card .modal-head .toolbar {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.document-close-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    padding: 0;
    display: grid;
    place-items: center;
    color: #fff;
    background: #334155;
    border-color: #334155;
}

.document-close-btn:hover {
    color: #fff;
    background: var(--danger);
    border-color: var(--danger);
}

.document-close-btn svg {
    width: 19px;
    height: 19px;
    stroke-width: 2.8;
}

.document-preview-body {
    --document-preview-width: 760px;
    --document-preview-ratio: 210 / 297;
    min-height: 0;
    padding: 16px;
    overflow: auto;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .58), rgba(238, 243, 239, .96)),
        repeating-linear-gradient(90deg, rgba(7, 92, 66, .035) 0 1px, transparent 1px 28px);
    overscroll-behavior: contain;
}

.document-preview-stage {
    display: grid;
    place-items: start center;
    min-height: 100%;
}

.document-paper-preview {
    width: min(100%, var(--document-preview-width));
    aspect-ratio: var(--document-preview-ratio);
    overflow: hidden;
    background: #fff;
    border: 1px solid #d6e2dc;
    border-radius: 8px;
    box-shadow: 0 20px 44px rgba(15, 49, 37, .16);
}

.document-preview-a4-portrait {
    --document-preview-width: 760px;
    --document-preview-ratio: 210 / 297;
}

.document-preview-a4-landscape {
    --document-preview-width: 1040px;
    --document-preview-ratio: 297 / 210;
}

.document-preview-a5-landscape {
    --document-preview-width: 820px;
    --document-preview-ratio: 210 / 148;
}

.document-preview-frame {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    border-radius: 8px;
    background: #f8faf8;
}

@media (max-width: 720px) {
    .document-modal-card {
        width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
    }

    .document-modal-card .modal-head {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }

    .document-modal-card .modal-head .toolbar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
        width: 100%;
    }

    .document-modal-card .modal-head .toolbar .btn,
    .document-close-btn {
        min-height: 38px;
        width: 100%;
        min-width: 0;
        padding: 7px 9px;
    }

    .document-preview-body {
        padding: 8px;
    }

    .document-paper-preview {
        border-radius: 7px;
        box-shadow: 0 12px 26px rgba(15, 49, 37, .14);
    }
}

.delete-modal-card {
    width: min(520px, 100%);
}

.confirm-modal-card {
    width: min(540px, 100%);
}

.sidebar {
    position: sticky;
    top: var(--system-bar-height);
    height: calc(100vh - var(--system-bar-height));
    padding: 14px;
    background:
        radial-gradient(circle at 20% 0%, rgba(193, 151, 51, .14), transparent 28%),
        linear-gradient(180deg, #013e2d 0%, #02533a 52%, #003624 100%);
    border-left: 1px solid rgba(255, 255, 255, .12);
    box-shadow: -18px 0 48px rgba(4, 80, 54, .18);
    overflow-x: hidden;
    overflow-y: hidden;
}

.brand-zone {
    position: relative;
}

.brand {
    display: block;
    padding: 6px 0 10px;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
}

.brand-card {
    position: relative;
    min-height: 154px;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 8px;
    padding: 15px 12px 14px;
    border-radius: 20px;
    text-align: center;
    background:
        radial-gradient(circle at 24% 14%, rgba(193, 151, 51, .16), transparent 34%),
        linear-gradient(145deg, #ffffff 0%, #fbfdf9 48%, #eef7f0 100%);
    border: 1px solid rgba(255, 255, 255, .78);
    box-shadow: 0 22px 38px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .95);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.brand-card::before {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 16px;
    border: 1px solid rgba(4, 80, 54, .08);
    pointer-events: none;
}

.brand-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 24%, rgba(255, 255, 255, .72) 48%, transparent 72%);
    transform: translateX(120%);
    transition: transform .55s ease;
    pointer-events: none;
}

.brand:hover .brand-card {
    transform: translateY(-2px);
    border-color: rgba(193, 151, 51, .38);
    box-shadow: 0 24px 44px rgba(0, 0, 0, .22), 0 0 0 1px rgba(193, 151, 51, .12) inset;
}

.brand:hover .brand-card::after {
    transform: translateX(-120%);
}

.brand-logo-frame {
    position: relative;
    z-index: 1;
    width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background:
        linear-gradient(145deg, #ffffff, #eef4ef);
    border: 1px solid rgba(4, 80, 54, .14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 12px 24px rgba(4, 80, 54, .12);
}

.brand-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.brand-card-logo-only {
    min-height: 124px;
    padding: 8px;
}

.brand-logo-full {
    position: relative;
    z-index: 1;
    width: min(136px, 100%);
    height: auto;
    max-height: 102px;
    object-fit: contain;
}

.brand-mark {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: var(--emerald);
    border: 2px solid var(--gold);
    font-weight: 800;
    line-height: 1;
}

.brand-title {
    position: relative;
    z-index: 1;
    display: block;
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--emerald);
    font-weight: 800;
    text-wrap: balance;
}

.brand-subtitle,
.muted {
    color: var(--muted);
}

.brand-subtitle {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: #69766e;
}

.nav {
    display: grid;
    gap: 3px;
    margin-top: 10px;
}

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 7px 9px;
    border-radius: 7px;
    color: rgba(255, 255, 255, .84);
    border: 1px solid transparent;
    transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, .10);
    border-color: rgba(255, 255, 255, .22);
    color: #ffffff;
    transform: translateX(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
}

.nav-icon {
    width: 23px;
    height: 23px;
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
}

.nav-counter {
    margin-inline-start: auto;
    min-width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    padding: 0 6px;
    color: #15301f;
    background: linear-gradient(180deg, #f2c865, #d7a844);
    border: 1px solid rgba(255, 238, 180, .74);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    box-shadow: 0 8px 16px rgba(0, 0, 0, .18);
}

.sidebar-logout {
    margin-top: 12px;
}

.nav-icon svg,
.kpi-icon svg,
.card-action svg,
.quick-icon svg,
.btn svg,
.mobile-menu-trigger svg,
.mobile-menu-close svg,
.notification-trigger svg,
.notification-mini-icon svg,
.notification-row-icon svg,
.user-hub-link-icon svg,
.user-hub-role-icon svg,
.user-hub-logout svg,
.member-profile-tab svg,
.member-document-link svg {
    width: 15px;
    height: 15px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.main {
    min-width: 0;
    width: 100%;
    padding: 16px;
}

@media (min-width: 1081px) {
    .app-shell {
        display: block;
        padding-inline-start: 248px;
    }

    .sidebar {
        position: fixed;
        inset-block: var(--system-bar-height) 0;
        inset-inline-start: 0;
        top: var(--system-bar-height);
        width: 248px;
        height: auto;
        z-index: 39;
        display: flex;
        flex-direction: column;
        min-height: calc(100vh - var(--system-bar-height));
    }

    .brand-zone,
    .brand {
        flex: 0 0 auto;
    }

    .brand {
        padding: 4px 0 8px;
    }

    .brand-card-logo-only {
        min-height: 108px;
    }

    .brand-logo-full {
        width: min(124px, 100%);
        max-height: 88px;
    }

    .nav {
        flex: 1 1 auto;
        min-height: 0;
        align-content: start;
        gap: 3px;
        margin-top: 8px;
    }

    .nav-link {
        min-height: 0;
        height: clamp(30px, calc((100vh - var(--system-bar-height) - 186px) / 12), 34px);
        padding: 5px 8px;
        font-size: 12.5px;
        line-height: 1.25;
    }

    .nav-icon {
        width: 21px;
        height: 21px;
        border-radius: 6px;
    }

    .nav-icon svg {
        width: 14px;
        height: 14px;
    }
}

@media (min-width: 1081px) and (max-height: 720px) {
    .sidebar {
        padding: 10px;
    }

    .brand {
        padding: 2px 0 6px;
    }

    .brand-card-logo-only {
        min-height: 78px;
        padding: 5px;
        border-radius: 14px;
    }

    .brand-card::before {
        inset: 7px;
        border-radius: 11px;
    }

    .brand-logo-full {
        width: min(104px, 100%);
        max-height: 64px;
    }

    .nav {
        gap: 2px;
        margin-top: 6px;
    }

    .nav-link {
        height: clamp(27px, calc((100vh - var(--system-bar-height) - 126px) / 12), 31px);
        padding: 4px 7px;
        font-size: 11.5px;
    }

    .nav-icon {
        width: 19px;
        height: 19px;
    }

    .nav-icon svg {
        width: 13px;
        height: 13px;
    }
}

@media (min-width: 1081px) and (max-height: 620px) {
    .brand-card-logo-only {
        min-height: 62px;
    }

    .brand-logo-full {
        width: min(90px, 100%);
        max-height: 50px;
    }

    .nav-link {
        height: clamp(25px, calc((100vh - var(--system-bar-height) - 108px) / 12), 29px);
        gap: 6px;
        font-size: 11px;
    }
}

.topbar {
    min-height: 58px;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.topbar {
    display: none !important;
}

.app-page-hero {
    isolation: isolate;
    position: relative;
    overflow: hidden;
    min-height: 148px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding: 24px;
    color: #fff7df;
    background:
        radial-gradient(circle at 7% 24%, rgba(218, 171, 74, .22), transparent 28%),
        linear-gradient(135deg, rgba(4, 42, 30, .98), rgba(4, 82, 55, .96) 55%, rgba(7, 28, 21, .99)),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 18px);
    border: 1px solid rgba(218, 171, 74, .42);
    border-radius: 8px;
    box-shadow: 0 24px 56px rgba(5, 39, 27, .17);
}

.app-page-hero::before,
.app-page-hero::after {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: -1;
}

.app-page-hero::before {
    inset-inline-end: -74px;
    top: -84px;
    width: 220px;
    height: 220px;
    border: 1px solid rgba(218, 171, 74, .36);
    border-radius: 999px;
}

.app-page-hero::after {
    inset-inline-start: 12%;
    top: -35%;
    width: 1px;
    height: 190%;
    background: linear-gradient(180deg, transparent, rgba(218, 171, 74, .34), transparent);
    transform: rotate(24deg);
}

.app-page-hero h2 {
    margin: 14px 0 8px;
    color: #fffaf1;
    font-size: clamp(28px, 3.1vw, 42px);
    line-height: 1.18;
    font-weight: 900;
}

.app-page-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 250, 241, .76);
    font-size: 14px;
    line-height: 1.9;
}

.app-page-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.page-meta-strip {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 12px;
    margin: -2px 0 16px;
    padding: 12px;
    background: rgba(255, 255, 255, .88);
    border: 1px solid rgba(4, 80, 54, .14);
    border-inline-start: 4px solid var(--gold);
    border-radius: 8px;
    box-shadow: 0 16px 34px rgba(4, 45, 31, .08);
}

.page-meta-copy {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.page-meta-copy strong {
    color: var(--emerald);
    font-size: 17px;
    line-height: 1.45;
}

.page-meta-copy small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.7;
}

.page-meta-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(116px, 1fr));
    gap: 8px;
    align-items: stretch;
}

.page-meta-stats span {
    min-width: 0;
    display: grid;
    align-content: center;
    gap: 2px;
    padding: 10px 12px;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
    background: rgba(244, 248, 242, .92);
    border: 1px solid rgba(4, 80, 54, .12);
    border-radius: 8px;
}

.page-meta-stats strong {
    color: var(--ink);
    font-size: 18px;
    line-height: 1;
}

.page-title {
    margin: 0;
    color: var(--emerald);
    font-size: 20px;
    line-height: 1.35;
}

.page-kicker {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.grid { display: grid; gap: 12px; }
.grid > * { min-width: 0; }
.grid.metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.two { grid-template-columns: 1.2fr .8fr; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card,
.panel,
.form-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.card:hover,
.panel:hover,
.form-panel:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: #cbdacb;
}

.card {
    padding: 12px;
    min-height: 86px;
}

.metric-label {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 12px;
}

.metric-value {
    margin: 0;
    font-size: 19px;
    color: var(--ink);
    font-weight: 800;
}

.metric-note {
    margin-top: 7px;
    color: var(--emerald);
    font-size: 11px;
}

.panel,
.form-panel {
    padding: 14px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.section-title {
    margin: 0;
    font-size: 15px;
    color: var(--emerald);
}

.table-wrap {
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(250, 252, 249, .98));
    box-shadow: 0 16px 38px rgba(4, 45, 31, .07);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 760px;
    background: transparent;
    font-variant-numeric: tabular-nums;
}

th,
td {
    padding: 11px 12px;
    text-align: right;
    border-bottom: 1px solid rgba(213, 224, 216, .8);
    vertical-align: middle;
    white-space: nowrap;
}

th {
    position: relative;
    color: #546258;
    background: #f6f9f5;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    box-shadow: inset 0 -1px 0 rgba(213, 224, 216, .9);
}

.sort-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    font: inherit;
}

.sort-icon {
    width: 17px;
    height: 17px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: #edf3ef;
    border: 1px solid #dce7d9;
    position: relative;
}

.sort-icon::before,
.sort-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border-inline: 4px solid transparent;
}

.sort-icon::before {
    top: 4px;
    border-bottom: 5px solid #9caf9f;
}

.sort-icon::after {
    bottom: 4px;
    border-top: 5px solid #9caf9f;
}

.sort-link.active {
    color: var(--emerald);
}

.sort-link.active .sort-icon {
    background: #efe5ff;
    border-color: #d9c5ff;
}

.sort-link.active.asc .sort-icon::before,
.sort-link.active.desc .sort-icon::after {
    border-bottom-color: #7c3aed;
    border-top-color: #7c3aed;
}

.sort-link.active.asc .sort-icon::after,
.sort-link.active.desc .sort-icon::before {
    opacity: .28;
}

td {
    color: #1c2a20;
    font-size: 12px;
    font-weight: 700;
}

tbody tr {
    transition: background .16s ease, transform .16s ease;
}

tbody tr:hover td {
    background: #f8fbf8;
}

tr:last-child td { border-bottom: 0; }

.table-wrap .toolbar {
    gap: 5px;
}

.table-wrap .toolbar .btn {
    min-height: 30px;
    padding: 5px 8px;
    border-radius: 8px;
    font-size: 11px;
}

.table-wrap .badge {
    min-width: 72px;
    border-radius: 999px;
    font-weight: 900;
}

.unified-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .92);
}

.unified-table-toolbar .form-grid {
    flex: 1;
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    gap: 8px;
}

.unified-table-toolbar .field label {
    font-size: 10px;
}

.unified-table-toolbar .toolbar {
    margin-top: 0 !important;
    flex-wrap: nowrap;
}

.table-search {
    flex: 1;
    min-width: 220px;
}

.table-search input {
    width: 100%;
    min-height: 38px;
    border-radius: 8px;
    background: #f8faf7;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.payments-tabs-panel {
    padding: 8px;
}

.payments-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 6px;
    border: 1px solid #dce7d9;
    border-radius: 8px;
    background: #f6f8f5;
}

.payments-tab {
    position: relative;
    min-height: 58px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #506056;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.payments-tab::after {
    content: "";
    position: absolute;
    right: 12px;
    bottom: 0;
    left: 12px;
    height: 3px;
    background: var(--gold);
    transform: scaleX(0);
    transition: transform .18s ease;
}

.payments-tab > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.payments-tab svg {
    width: 22px;
    height: 22px;
    justify-self: center;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.payments-tab strong {
    min-width: 36px;
    min-height: 24px;
    display: inline-grid;
    place-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fff;
    color: #0b4f3a;
    border: 1px solid #dce7d9;
    font-size: 11px;
}

.payments-tab.active {
    color: #052d21;
    background: #fff;
    border-color: #d5e1d8;
    box-shadow: 0 8px 20px rgba(4, 45, 31, .08);
}

.payments-tab.active svg {
    color: var(--gold);
}

.payments-tab.active::after {
    transform: scaleX(1);
}

.payments-tab-actions,
.assets-report-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0;
    padding: 10px 0;
    border-top: 1px solid #e0e8e2;
    border-bottom: 1px solid #e0e8e2;
}

.payment-filter-panel,
.payment-ledger-panel,
.monthly-payment-board {
    margin-top: 14px;
}

.payment-summary-pills {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.payment-summary-pills span {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border: 1px solid #d9c28a;
    border-radius: 999px;
    background: #fffdf7;
    color: #0b4331;
    font-size: 11px;
    font-weight: 900;
}

.professional-table-wrap table {
    min-width: 920px;
}

.professional-table-wrap.compact-table table {
    min-width: 620px;
}

.table-person-cell {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.table-person-cell .member-avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
}

.table-person-cell div {
    display: grid;
    gap: 2px;
}

.table-person-cell small,
.table-muted {
    display: block;
    margin-top: 2px;
    color: #87938a;
    font-size: 10px;
    font-weight: 800;
}

.table-action-group {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    min-width: max-content;
}

.table-icon-action {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    border: 1px solid #dce7d9;
    border-radius: 8px;
    background: #f7faf7;
    color: #0b4f3a;
    cursor: pointer;
    transition: transform .16s ease, background .16s ease, border-color .16s ease;
    flex: 0 0 32px;
}

.table-icon-action svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.table-icon-action:hover {
    transform: translateY(-1px);
    background: #fff;
    border-color: #c8d9cd;
}

.table-icon-action.primary {
    color: #fff;
    border-color: #075c42;
    background: #075c42;
}

.table-icon-action.danger {
    color: #c73328;
    border-color: #f1c4bf;
    background: #fff7f6;
}

.table-icon-action:focus-visible {
    outline: 3px solid rgba(193, 151, 51, .24);
    outline-offset: 2px;
}

.table-control-toolbar,
.payments-ledger-toolbar {
    display: block;
    padding: 8px;
}

.table-control-line,
.ledger-toolbar-line {
    display: grid;
    grid-template-columns: minmax(280px, 1.75fr) minmax(126px, .7fr) minmax(118px, .64fr) minmax(106px, .54fr) minmax(80px, .38fr);
    align-items: center;
    gap: 7px;
    width: 100%;
}

.monthly-control-line {
    grid-template-columns: minmax(160px, .75fr) minmax(220px, 1.2fr) minmax(140px, .7fr);
}

.members-control-line,
.expenses-control-line {
    grid-template-columns: minmax(280px, 1.7fr) minmax(150px, .7fr) minmax(82px, .42fr);
}

.table-control-toolbar .table-search,
.payments-ledger-toolbar .table-search {
    min-width: 0;
}

.table-control-toolbar .field,
.payments-ledger-toolbar .field {
    min-width: 0;
}

.table-control-toolbar .field label,
.payments-ledger-toolbar .field label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.table-control-toolbar input,
.table-control-toolbar select,
.table-control-toolbar .btn,
.payments-ledger-toolbar input,
.payments-ledger-toolbar select,
.payments-ledger-toolbar .btn {
    min-height: 38px;
}

.table-control-toolbar input,
.table-control-toolbar select,
.payments-ledger-toolbar input,
.payments-ledger-toolbar select {
    width: 100%;
    border-radius: 8px;
    background: #f8faf7;
}

.table-footer-bar {
    min-height: 54px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #dce7d9;
    border-top: 0;
    border-radius: 0 0 8px 8px;
    background: #fff;
    color: #526156;
    font-size: 12px;
    font-weight: 900;
}

.table-footer-bar > span {
    justify-self: start;
}

.table-footer-bar > div {
    grid-column: 2;
    justify-self: center;
}

.mithaq-pagination {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    direction: rtl;
}

.mithaq-page-numbers {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.mithaq-page-number,
.mithaq-page-nav,
.mithaq-page-dots {
    min-width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    padding: 0 10px;
    border: 1px solid #dce7d9;
    border-radius: 8px;
    background: #fff;
    color: #526156;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
}

.mithaq-page-nav {
    min-width: 58px;
}

.mithaq-page-number.active {
    color: #fff;
    border-color: #075c42;
    background: #075c42;
    box-shadow: 0 8px 20px rgba(7, 92, 66, .16);
}

.mithaq-page-nav.disabled {
    color: #a0aaa3;
    background: #f5f7f5;
    cursor: not-allowed;
}

.range-modal-card {
    max-width: 520px;
}

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

.range-print-form .single-range-grid {
    grid-template-columns: minmax(0, 1fr);
}

.range-print-form [data-range-field][hidden] {
    display: none !important;
}

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

    .payments-tab {
        grid-template-columns: 24px 1fr;
        align-content: center;
    }

    .payments-tab strong {
        grid-column: 2;
        justify-self: start;
    }

    .payments-tab-actions,
    .assets-report-actions {
        justify-content: stretch;
    }

    .payments-tab-actions .btn,
    .assets-report-actions .btn {
        flex: 1 1 160px;
    }

    .table-control-line,
    .ledger-toolbar-line {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .table-footer-bar {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .table-footer-bar > div {
        grid-column: 1;
    }
}

@media (max-width: 560px) {
    .table-control-line,
    .ledger-toolbar-line,
    .range-print-form .form-grid {
        grid-template-columns: 1fr;
    }

    .payments-tabs {
        gap: 5px;
    }

    .payments-tab {
        min-height: 66px;
        grid-template-columns: 26px minmax(0, 1fr);
        gap: 6px;
        padding: 8px;
        white-space: normal;
    }

    .payments-tab strong {
        grid-column: 2;
        justify-self: start;
    }

    .payments-tab-actions,
    .assets-report-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .payments-tab-actions .btn,
    .assets-report-actions .btn {
        width: 100%;
        min-width: 0;
    }

}

.confirm-password-field {
    margin-top: 12px;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    color: #344238;
    background: #f2f4ef;
    border: 1px solid var(--line);
}

.badge.success,
.badge.paid,
.badge.active,
.badge.accepted {
    color: var(--success);
    background: #eaf7f0;
    border-color: #c9ead8;
}

.badge.warning,
.badge.pending,
.badge.watch,
.badge.review,
.badge.open {
    color: var(--warning);
    background: #fff6df;
    border-color: #f2dfaa;
}

.badge.closed {
    color: #475569;
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.badge.danger,
.badge.late,
.badge.rejected {
    color: var(--danger);
    background: #fff0ee;
    border-color: #f0cac5;
}

.amount-positive {
    color: var(--success) !important;
}

.amount-negative {
    color: var(--danger) !important;
}

.project-command-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
}

.project-command-title {
    display: grid;
    gap: 4px;
}

.project-command-title strong {
    color: var(--emerald);
    font-size: 22px;
}

.project-command-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.project-command-actions .btn {
    min-height: 40px;
}

.project-ledger-grid {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 16px;
}

.project-operation-card {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #fff, #f8fbf8);
    padding: 12px;
    border-radius: 8px;
}

.project-operation-card strong,
.project-operation-card small {
    display: block;
}

.project-operation-card strong {
    color: var(--ink);
}

.project-operation-card small {
    margin-top: 2px;
    color: var(--muted);
}

.btn {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 7px;
    border: 1px solid #cdd8cc;
    background: #fff;
    color: var(--emerald);
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}

.btn:hover {
    background: #f4f8f2;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(4, 80, 54, .10);
}

.btn.primary {
    color: #fff;
    background: var(--emerald);
    border-color: var(--emerald);
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(4, 80, 54, .18);
}

.btn.ghost {
    color: #445149;
    background: #f7f9f5;
    border-color: var(--line);
}

.btn.danger-btn {
    color: #fff;
    background: var(--danger);
    border-color: var(--danger);
    font-weight: 900;
    box-shadow: 0 10px 20px rgba(201, 68, 53, .18);
}

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

.field { display: grid; gap: 5px; }
.field.full { grid-column: 1 / -1; }

label {
    color: var(--muted);
    font-size: 11px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #cfd8ce;
    border-radius: 7px;
    background: #fff;
    color: var(--ink);
    padding: 8px 9px;
    outline: none;
}

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

input:focus,
select:focus,
textarea:focus {
    border-color: var(--emerald-2);
    box-shadow: 0 0 0 3px rgba(4, 80, 54, .1);
}

.alert {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #ead9aa;
    background: #fff9e9;
    color: #604712;
    margin-bottom: 12px;
}

.alert.danger {
    border-color: #f0cac5;
    background: #fff0ee;
    color: var(--danger);
}

.action-toast {
    position: fixed;
    inset-inline-start: 18px;
    bottom: 18px;
    z-index: 10050;
    width: min(420px, calc(100vw - 32px));
    padding: 13px 16px;
    border: 1px solid #b9dfcf;
    border-right: 4px solid #0b7657;
    border-radius: 6px;
    background: #f2fbf7;
    box-shadow: 0 14px 34px rgba(5, 43, 31, .18);
    color: #07543f;
    font-weight: 700;
    line-height: 1.65;
    animation: action-toast-in .22s ease-out both;
}

.action-toast.danger {
    border-color: #f0bdb5;
    border-right-color: #c34232;
    background: #fff3f1;
    color: #9e3024;
}

.action-toast.is-leaving {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease;
}

@keyframes action-toast-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .action-toast {
        inset-inline: 12px;
        bottom: 12px;
        width: auto;
    }
}

.chart-box { min-height: 220px; }

.dashboard-hero {
    position: relative;
    min-height: 104px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    margin-bottom: 12px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(247, 251, 246, .96) 52%, rgba(235, 245, 237, .96)),
        var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.dashboard-hero::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    width: 5px;
    background: linear-gradient(180deg, var(--gold), var(--emerald));
}

.dashboard-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 24%, rgba(255, 255, 255, .62) 48%, transparent 72%);
    transform: translateX(120%);
    transition: transform .6s ease;
    pointer-events: none;
}

.dashboard-hero:hover {
    transform: translateY(-2px);
    border-color: #cbdacb;
    box-shadow: var(--shadow-hover);
}

.dashboard-hero:hover::after {
    transform: translateX(-120%);
}

.dashboard-hero > * {
    position: relative;
    z-index: 1;
}

.dashboard-hero h2 {
    margin: 8px 0 4px;
    font-size: 22px;
    color: var(--emerald);
}

.dashboard-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.session-chip {
    width: fit-content;
    padding: 4px 10px;
    border-radius: 999px;
    color: var(--success);
    background: #eaf7f0;
    border: 1px solid #c9ead8;
    font-size: 11px;
    font-weight: 800;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: flex-end;
}

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

.kpi-card {
    isolation: isolate;
    position: relative;
    min-height: 148px;
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 10px;
    align-items: start;
    padding: 14px 14px 42px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.kpi-card::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    width: 4px;
    background: var(--gold);
}

.kpi-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(120deg, transparent 18%, rgba(255, 255, 255, .7) 46%, transparent 72%);
    transform: translateX(125%);
    transition: transform .55s ease;
    pointer-events: none;
}

.kpi-card:hover {
    transform: translateY(-4px);
    border-color: #c9dac9;
    box-shadow: var(--shadow-hover);
}

.kpi-card:hover::after {
    transform: translateX(-125%);
}

.kpi-card > * {
    position: relative;
    z-index: 1;
}

.kpi-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: var(--emerald);
    background: #eef5ef;
    border: 1px solid #d5e2d5;
    transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.kpi-card:hover .kpi-icon {
    transform: translateY(-2px) scale(1.06);
    box-shadow: 0 10px 20px rgba(4, 80, 54, .12);
}

.kpi-card.tone-gold .kpi-icon {
    color: #8b6518;
    background: #fff6df;
    border-color: #ead9aa;
}

.kpi-card.tone-blue .kpi-icon {
    color: #0b72aa;
    background: #ebf7fd;
    border-color: #cce9f7;
}

.kpi-card.tone-green .kpi-icon {
    color: var(--success);
    background: #eaf7f0;
    border-color: #c9ead8;
}

.kpi-card.tone-purple .kpi-icon {
    color: #7a3fb0;
    background: #f4eefb;
    border-color: #e4d1f4;
}

.kpi-copy {
    min-width: 0;
    display: grid;
    align-content: start;
}

.metric-en {
    display: block;
    margin-top: -2px;
    color: #95a098;
    font-size: 10px;
    text-transform: uppercase;
}

.kpi-card .metric-value {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: 9px;
    font-size: 20px;
    line-height: 1.2;
    text-align: start;
    direction: rtl;
}

.metric-number {
    display: inline-block;
    max-width: 100%;
    direction: ltr;
    unicode-bidi: isolate;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.card-action {
    position: absolute;
    inset-inline-start: 14px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 26px;
    padding: 3px 8px;
    border-radius: 999px;
    color: var(--emerald);
    background: rgba(4, 80, 54, .05);
    border: 1px solid transparent;
    font-size: 11px;
    font-weight: 800;
    transition: gap .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
}

.card-action:hover {
    color: #032f20;
    gap: 8px;
    background: #edf7ef;
    border-color: #cfe4d4;
}

.dashboard-alerts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.dashboard-charts {
    display: grid;
    grid-template-columns: .82fr 1.58fr;
    gap: 12px;
    margin-top: 12px;
}

.chart-card {
    position: relative;
    min-height: 340px;
    overflow: hidden;
}

.chart-card::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--emerald), var(--gold));
}

.chart-card > * {
    position: relative;
    z-index: 1;
}

.section-subtitle {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.donut-wrap {
    position: relative;
    min-height: 194px;
    display: grid;
    place-items: center;
}

.legend-list {
    display: grid;
    gap: 8px;
}

.legend-row {
    display: grid;
    grid-template-columns: 12px 1fr auto;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    padding: 3px 7px;
    border-radius: 7px;
    color: #3d4a41;
    font-size: 12px;
    transition: transform .16s ease, background .16s ease;
}

.legend-row:hover {
    background: #f6faf6;
    transform: translateX(-3px);
}

.legend-label {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.legend-label > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.legend-label small {
    color: #7a8b81;
    font-size: 10px;
    font-weight: 800;
    direction: rtl;
}

.legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
}

.nav-chart-wrap {
    position: relative;
    width: 100%;
    height: 220px;
    margin-top: 8px;
}

.nav-chart {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.nav-chart polyline {
    fill: none;
    stroke: var(--gold);
    stroke-width: 3;
}

.nav-chart circle {
    fill: var(--emerald);
    stroke: #fff;
    stroke-width: 2;
    pointer-events: none;
}

.nav-chart polyline,
.nav-chart circle,
.donut {
    transition: transform .18s ease, filter .18s ease;
}

.chart-hotspot {
    position: absolute;
    left: var(--x);
    top: var(--y);
    z-index: 3;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transform: translate(-50%, -50%);
}

.chart-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--emerald);
    border: 3px solid #fff;
    box-shadow: 0 6px 14px rgba(4, 80, 54, .25);
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.chart-tooltip {
    position: absolute;
    left: 50%;
    bottom: 24px;
    min-width: 136px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #fff;
    background: #063d2b;
    border: 1px solid rgba(255, 255, 255, .14);
    box-shadow: 0 14px 28px rgba(0, 0, 0, .2);
    opacity: 0;
    pointer-events: none;
    text-align: right;
    transform: translate(-50%, 8px);
    transition: opacity .16s ease, transform .16s ease;
}

.chart-tooltip::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 10px;
    height: 10px;
    background: #063d2b;
    transform: translateX(-50%) rotate(45deg);
}

.chart-tooltip strong,
.chart-tooltip small,
.chart-tooltip em {
    display: block;
    line-height: 1.6;
    font-style: normal;
    white-space: nowrap;
}

.chart-tooltip small,
.chart-tooltip em {
    color: rgba(255, 255, 255, .76);
    font-size: 10px;
}

.chart-hotspot:hover .chart-dot,
.chart-hotspot:focus-visible .chart-dot {
    background: var(--gold);
    transform: scale(1.35);
    box-shadow: 0 0 0 8px rgba(193, 151, 51, .16), 0 10px 20px rgba(4, 80, 54, .22);
}

.chart-hotspot:hover .chart-tooltip,
.chart-hotspot:focus-visible .chart-tooltip {
    opacity: 1;
    transform: translate(-50%, 0);
}

.chart-hotspot.edge-start .chart-tooltip {
    left: 0;
    transform: translate(0, 8px);
}

.chart-hotspot.edge-start:hover .chart-tooltip,
.chart-hotspot.edge-start:focus-visible .chart-tooltip {
    transform: translate(0, 0);
}

.chart-hotspot.edge-start .chart-tooltip::after {
    left: 14px;
    transform: rotate(45deg);
}

.chart-hotspot.edge-end .chart-tooltip {
    left: auto;
    right: 0;
    transform: translate(0, 8px);
}

.chart-hotspot.edge-end:hover .chart-tooltip,
.chart-hotspot.edge-end:focus-visible .chart-tooltip {
    transform: translate(0, 0);
}

.chart-hotspot.edge-end .chart-tooltip::after {
    left: auto;
    right: 14px;
    transform: rotate(45deg);
}

.chart-card:hover .donut {
    transform: scale(1.03);
}

.chart-card:hover .nav-chart polyline {
    filter: drop-shadow(0 6px 8px rgba(193, 151, 51, .26));
}

.empty-state {
    padding: 10px 12px;
    color: var(--muted);
    background: #f7f9f5;
    border: 1px dashed #cbd5c9;
    border-radius: 8px;
    text-align: center;
    line-height: 1.7;
}

.empty-state.compact {
    position: absolute;
    bottom: 8px;
    font-size: 11px;
    padding: 5px 9px;
}

.empty-action {
    color: var(--emerald);
    font-weight: 800;
    transition: color .16s ease;
}

.empty-action:hover {
    color: #032f20;
}

.notification-menu {
    position: relative;
    z-index: 45;
}

.notification-menu summary {
    list-style: none;
}

.notification-menu summary::-webkit-details-marker {
    display: none;
}

.notification-trigger {
    position: relative;
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    color: var(--emerald);
    background:
        linear-gradient(145deg, #ffffff, #f3f8f2);
    border: 1px solid rgba(4, 80, 54, .16);
    border-radius: 999px;
    box-shadow: 0 12px 28px rgba(4, 45, 31, .10);
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.notification-trigger:hover,
.notification-menu[open] .notification-trigger {
    transform: translateY(-1px);
    border-color: rgba(193, 151, 51, .46);
    box-shadow: 0 18px 38px rgba(4, 45, 31, .16);
}

.notification-count {
    position: absolute;
    inset-block-start: -5px;
    inset-inline-end: -4px;
    min-width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    padding: 0 5px;
    color: #17311f;
    background: linear-gradient(180deg, #f1c75f, #d6a43b);
    border: 1px solid rgba(255, 244, 204, .88);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    box-shadow: 0 10px 20px rgba(193, 151, 51, .28);
}

.topbar-notification {
    display: none;
}

.brand-notification {
    position: absolute;
    top: 22px;
    right: 12px;
    z-index: 5;
}

.brand-notification .notification-trigger {
    width: 44px;
    height: 44px;
    background:
        radial-gradient(circle at 32% 20%, rgba(255, 255, 255, .96), rgba(244, 250, 246, .90)),
        rgba(255, 255, 255, .92);
    border-color: rgba(4, 80, 54, .16);
    box-shadow: 0 14px 28px rgba(4, 45, 31, .14), 0 0 0 5px rgba(255, 255, 255, .42);
}

.brand-notification .notification-popover {
    position: fixed;
    top: 26px;
    right: 264px;
    left: auto;
    width: min(360px, calc(100vw - 300px));
}

.brand-notification .notification-popover::before {
    top: 28px;
    right: -6px;
    left: auto;
    border-inline-start: 0;
    border-inline-end: 1px solid rgba(4, 80, 54, .14);
    border-block-start: 1px solid rgba(4, 80, 54, .14);
}

.notification-popover {
    position: absolute;
    inset-block-start: calc(100% + 10px);
    inset-inline-start: 0;
    width: min(340px, calc(100vw - 32px));
    padding: 10px;
    background: rgba(255, 255, 255, .98);
    border: 1px solid rgba(4, 80, 54, .14);
    border-radius: 8px;
    box-shadow: 0 26px 60px rgba(8, 39, 28, .18);
}

.notification-popover::before {
    content: "";
    position: absolute;
    inset-block-start: -6px;
    inset-inline-start: 16px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-inline-start: 1px solid rgba(4, 80, 54, .14);
    border-block-start: 1px solid rgba(4, 80, 54, .14);
    transform: rotate(45deg);
}

.notification-popover-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 4px 4px 10px;
    border-bottom: 1px solid #edf1ea;
}

.notification-popover-head strong {
    color: var(--emerald);
    font-size: 14px;
}

.notification-popover-head a {
    color: var(--gold);
    font-size: 12px;
    font-weight: 900;
}

.notification-mini-list {
    display: grid;
    gap: 0;
    max-height: 238px;
    overflow: auto;
    margin-top: 6px;
}

.notification-mini-item {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 62px;
    padding: 9px 6px;
    background: transparent;
    border: 0;
    border-bottom: 1px solid #edf1ea;
    border-radius: 0;
    transition: background .16s ease;
}

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

.notification-mini-item:hover {
    background: #f6fbf5;
}

.notification-mini-item.is-unread {
    background: rgba(4, 80, 54, .045);
}

.notification-mini-item.is-unread::after {
    content: "";
    position: absolute;
    inset-block: 13px;
    inset-inline-start: 0;
    width: 3px;
    border-radius: 3px;
    background: var(--gold);
}

.notification-mini-icon,
.notification-row-icon {
    display: inline-grid;
    place-items: center;
    color: var(--emerald);
    background: #edf8f1;
    border: 1px solid #cbe8d8;
    border-radius: 8px;
}

.notification-mini-icon {
    width: 34px;
    height: 34px;
    background: #f2f7f3;
    border-color: #dce8df;
}

.notification-mini-icon.warning {
    color: var(--warning);
}

.notification-row-icon.warning {
    color: var(--warning);
    background: #fff8e8;
    border-color: #f1dfaa;
}

.notification-mini-icon.danger {
    color: var(--danger);
}

.notification-row-icon.danger {
    color: var(--danger);
    background: #fff0ee;
    border-color: #f0cac5;
}

.notification-mini-item strong {
    display: block;
    color: var(--ink);
    font-size: 12px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-mini-item small {
    display: block;
    color: var(--muted);
    font-size: 10px;
}

.system-bar {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    z-index: 78;
    height: var(--system-bar-height);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    direction: ltr;
    padding: 6px 14px;
    color: #eaf4ee;
    background:
        linear-gradient(90deg, rgba(193, 151, 51, .10), transparent 24%, rgba(4, 80, 54, .18)),
        linear-gradient(180deg, #09261b 0%, #071d15 100%);
    border-bottom: 1px solid rgba(218, 171, 74, .34);
    box-shadow: 0 14px 34px rgba(6, 22, 15, .20);
}

.system-bar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-self: start;
    min-width: 0;
    position: relative;
    z-index: 3;
}

.system-bar-menu {
    display: none;
}

.system-bar-brand {
    min-width: 220px;
    max-width: 360px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    direction: ltr;
    transform: translateX(-8px);
    position: relative;
    z-index: 3;
}

.system-bar-search {
    min-width: 0;
    max-width: 360px;
    height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0;
    color: rgba(255, 250, 241, .90);
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: 13px;
    font-weight: 900;
    direction: rtl;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.system-bar-logo {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background:
        radial-gradient(circle at 34% 18%, rgba(255, 255, 255, .98), rgba(249, 252, 248, .94));
    border: 1px solid rgba(218, 171, 74, .62);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
    margin-inline-end: 0;
}

.system-bar-logo img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.system-bar-nav {
    position: relative;
    height: 100%;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    direction: rtl;
    overflow: hidden;
    justify-self: stretch;
    margin: 0;
    padding: 0;
    background:
        linear-gradient(90deg, rgba(32, 183, 230, .07), rgba(244, 197, 66, .08), rgba(34, 209, 143, .06)),
        rgba(255, 255, 255, .045);
    border-block: 1px solid rgba(244, 197, 66, .20);
    border-inline: 0;
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 0 0 1px rgba(255, 255, 255, .035);
}

.system-bar-nav::-webkit-scrollbar {
    display: none;
}

.system-bar-ticker-track {
    display: flex;
    align-items: center;
    width: max-content;
    min-width: 100%;
    animation: system-bar-ticker 38s linear infinite;
    will-change: transform;
}

.system-bar-nav:hover .system-bar-ticker-track {
    animation-play-state: paused;
}

.system-bar-ticker-set {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-inline: 10px;
}

.system-market-tick {
    position: relative;
    flex: 0 0 auto;
    min-width: max-content;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 4px;
    direction: rtl;
    color: rgba(234, 244, 238, .84);
    background: transparent;
    border: 0;
    border-radius: 0;
    text-decoration: none;
    cursor: default;
    transition: color .16s ease, background .16s ease, border-color .16s ease;
}

.system-market-tick:hover,
.system-market-tick:focus-visible {
    color: #fff8e8;
    background: rgba(255, 255, 255, .055);
    border-color: rgba(244, 197, 66, .24);
    outline: none;
    transform: none;
}

.ticker-separator-logo {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    flex: 0 0 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(244, 197, 66, .54);
    box-shadow: 0 0 0 3px rgba(244, 197, 66, .08), 0 7px 14px rgba(0, 0, 0, .16);
    overflow: hidden;
}

.ticker-separator-logo img {
    width: 17px;
    height: 17px;
    object-fit: contain;
}

.system-market-tick small {
    color: rgba(234, 244, 238, .66);
    font-size: 10.5px;
    font-weight: 900;
    white-space: nowrap;
}

.system-market-tick strong,
.system-market-tick em {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
}

.system-market-tick strong {
    direction: ltr;
    color: #fff8df;
    font-size: 13px;
    margin-inline-start: 2px;
}

.system-market-tick em {
    direction: rtl;
    min-height: 20px;
    padding: 2px 8px;
    color: rgba(234, 244, 238, .76);
    background: rgba(255, 255, 255, .075);
    border-radius: 999px;
    font-size: 9.5px;
}

.system-market-tick.ticker-tone-up {
    border-color: rgba(34, 209, 143, .28);
}

.system-market-tick.ticker-tone-up + .ticker-separator-logo {
    border-color: rgba(34, 209, 143, .58);
    box-shadow: 0 0 0 3px rgba(34, 209, 143, .10), 0 7px 14px rgba(0, 0, 0, .16);
}

.system-market-tick.ticker-tone-up strong,
.system-market-tick.ticker-tone-up em {
    color: #52e7b4;
}

.system-market-tick.ticker-tone-up em {
    background: rgba(34, 209, 143, .12);
}

.system-market-tick.ticker-tone-down {
    border-color: rgba(255, 107, 107, .30);
}

.system-market-tick.ticker-tone-down + .ticker-separator-logo {
    border-color: rgba(255, 107, 107, .58);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, .10), 0 7px 14px rgba(0, 0, 0, .16);
}

.system-market-tick.ticker-tone-down strong,
.system-market-tick.ticker-tone-down em {
    color: #ff8585;
}

.system-market-tick.ticker-tone-down em {
    background: rgba(255, 107, 107, .12);
}

.system-market-tick.ticker-tone-flat + .ticker-separator-logo {
    border-color: rgba(244, 197, 66, .56);
}

.system-bar-nav-link {
    position: relative;
    flex: 0 0 auto;
    min-width: 126px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 6px 10px;
    color: rgba(234, 244, 238, .68);
    border-radius: 8px;
    transition: color .16s ease, background .16s ease, transform .16s ease;
}

.system-bar-nav-link:hover {
    color: #fff8e8;
    background: rgba(255, 255, 255, .08);
    transform: translateY(-1px);
}

.system-bar-nav-link.active {
    color: #f6d576;
    background:
        linear-gradient(180deg, rgba(193, 151, 51, .18), rgba(193, 151, 51, .08));
    border: 1px solid rgba(218, 171, 74, .18);
}

.system-bar-nav-link.active::after {
    content: "";
    position: absolute;
    inset-inline: 12px;
    inset-block-end: 3px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--emerald), var(--gold));
}

.system-bar-nav-link span {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    flex: 0 0 24px;
    color: currentColor;
}

.system-bar-nav-link svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.system-bar-nav-link small {
    display: block;
    min-width: 0;
    color: inherit;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.system-bar-nav-link bdi {
    direction: rtl;
    min-height: 20px;
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    color: #082118;
    background: rgba(244, 197, 66, .88);
    border-radius: 999px;
    font-size: 9px;
    font-weight: 900;
    white-space: nowrap;
}

.system-bar-nav-link:not(.active) bdi {
    color: rgba(234, 244, 238, .76);
    background: rgba(255, 255, 255, .075);
}

@keyframes system-bar-ticker {
    from { transform: translateX(0); }
    to { transform: translateX(50%); }
}

.system-bar .user-hub-avatar {
    width: 42px;
    height: 42px;
    position: relative;
    padding: 2px;
    overflow: hidden;
    color: #fff8df;
    background:
        conic-gradient(from 215deg, #f0cc67, #70591d, #0c241a, #f0cc67);
    border: 1px solid rgba(218, 171, 74, .46);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .20);
}

.system-bar .user-hub-avatar:hover,
.system-bar .user-hub-profile[open] .user-hub-avatar {
    box-shadow: 0 0 0 3px rgba(218, 171, 74, .18), 0 10px 24px rgba(0, 0, 0, .22);
}

.system-bar .user-hub-avatar span {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background:
        radial-gradient(circle at 35% 22%, rgba(255, 255, 255, .24), transparent 27%),
        linear-gradient(145deg, #1e4f3d 0%, #0b241b 74%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .24);
}

.system-bar .user-hub-avatar::after {
    display: none;
}

.system-bar .notification-trigger {
    width: 40px;
    height: 40px;
    color: #e9f5ee;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .06));
    border-color: rgba(255, 255, 255, .14);
    box-shadow: none;
}

.system-bar .notification-trigger:hover,
.system-bar .notification-menu[open] .notification-trigger {
    border-color: rgba(218, 171, 74, .40);
    box-shadow: 0 0 0 3px rgba(218, 171, 74, .12);
}

.user-hub {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 70;
    display: flex;
    align-items: center;
    gap: 8px;
    direction: ltr;
}

.user-hub-profile {
    position: relative;
    direction: rtl;
}

.user-hub-profile summary {
    list-style: none;
}

.user-hub-profile summary::-webkit-details-marker {
    display: none;
}

.user-hub-avatar,
.user-hub-panel-avatar {
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
}

.user-hub-avatar {
    width: 44px;
    height: 44px;
    color: #fff;
    background:
        radial-gradient(circle at 30% 18%, rgba(255, 255, 255, .72), transparent 28%),
        linear-gradient(145deg, #12694b, #063c2b 62%, #c19733);
    border: 2px solid rgba(255, 255, 255, .72);
    box-shadow:
        0 18px 36px rgba(4, 45, 31, .18),
        0 0 0 5px rgba(255, 255, 255, .58);
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
    transition: transform .16s ease, box-shadow .16s ease;
}

.user-hub-profile[open] .user-hub-avatar,
.user-hub-avatar:hover {
    transform: translateY(-1px);
    box-shadow:
        0 22px 42px rgba(4, 45, 31, .22),
        0 0 0 5px rgba(247, 237, 211, .76);
}

.user-hub-panel {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    width: min(430px, calc(100vw - 34px));
    display: grid;
    gap: 10px;
    padding: 12px;
    direction: rtl;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(246, 250, 246, .96));
    border: 1px solid rgba(4, 80, 54, .16);
    border-radius: 10px;
    box-shadow: 0 30px 80px rgba(9, 34, 24, .18);
}

.user-hub-panel::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 19px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-top: 1px solid rgba(4, 80, 54, .16);
    border-left: 1px solid rgba(4, 80, 54, .16);
    transform: rotate(45deg);
}

.user-hub-card {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(247, 237, 211, .28));
    border: 1px solid rgba(4, 80, 54, .12);
}

.user-hub-panel-avatar {
    width: 54px;
    height: 54px;
    color: #fff;
    background: linear-gradient(145deg, #0d6a48, #063c2b);
    border: 2px solid rgba(193, 151, 51, .72);
    font-weight: 900;
}

.user-hub-identity {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.user-hub-identity strong,
.user-hub-role-card strong,
.user-hub-link strong {
    color: var(--ink);
    font-size: 13px;
    line-height: 1.5;
}

.user-hub-identity small,
.user-hub-role-card small,
.user-hub-link small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
}

.user-hub-role-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 11px 12px;
    border-radius: 8px;
    background: #f7fbf4;
    border: 1px solid #e0eadb;
}

.user-hub-role-icon,
.user-hub-link-icon,
.user-hub-logout span {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: var(--emerald);
    background: #eef8f1;
    border: 1px solid #d2e6d4;
    border-radius: 8px;
}

.user-hub-links {
    display: grid;
    gap: 8px;
}

.user-hub-link,
.user-hub-logout {
    width: 100%;
    min-height: 54px;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    text-align: start;
    border-radius: 8px;
    border: 1px solid #e3ebe1;
    background: #fff;
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.user-hub-link:hover {
    transform: translateY(-1px);
    border-color: rgba(193, 151, 51, .36);
    background: #fbfdf9;
}

.user-hub-logout {
    color: var(--danger);
    background: #fff8f7;
    border-color: #f1d1cc;
    cursor: pointer;
}

.user-hub-logout span {
    color: var(--danger);
    background: #fff0ee;
    border-color: #f2cac5;
}

.user-hub-logout strong {
    color: var(--danger);
}

.user-hub-notification {
    direction: rtl;
}

.user-hub-notification .notification-trigger {
    width: 42px;
    height: 42px;
}

.user-hub-notification .notification-popover {
    inset-inline-start: 0;
    inset-inline-end: auto;
    top: calc(100% + 12px);
    left: 0;
    right: auto;
    width: min(350px, calc(100vw - 34px));
}

.user-hub-notification .notification-popover::before {
    inset-inline-start: 14px;
    inset-inline-end: auto;
    left: 14px;
    right: auto;
}

.notification-page {
    display: grid;
    gap: 12px;
}

.notification-page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.notification-page-head h2 {
    margin: 6px 0 0;
    color: var(--emerald);
    font-size: 22px;
}

.notification-list {
    display: grid;
    gap: 8px;
}

.notification-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(21, 38, 28, .06);
}

.notification-row.is-unread {
    border-color: rgba(193, 151, 51, .38);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(247, 237, 211, .42)),
        var(--surface);
}

.notification-row-main {
    min-width: 0;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.notification-row-icon {
    width: 44px;
    height: 44px;
}

.notification-row-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.notification-row-copy strong {
    color: var(--emerald);
    font-size: 14px;
}

.notification-row-copy small {
    color: var(--ink);
    line-height: 1.65;
}

.notification-row-copy em {
    color: var(--muted);
    font-size: 11px;
    font-style: normal;
}

.pagination-wrap {
    display: flex;
    justify-content: center;
}

.profit-metrics,
.withdrawal-metrics {
    margin-bottom: 16px;
}

.profit-distribution-panel,
.withdrawal-request-panel,
.profit-ledger-panel,
.withdrawals-ledger-panel {
    margin-top: 16px;
}

.profit-distribution-card {
    display: grid;
    gap: 10px;
    padding: 12px;
    background: #fbfdf9;
    border: 1px solid rgba(4, 80, 54, .12);
    border-radius: 8px;
}

.profit-distribution-card + .profit-distribution-card {
    margin-top: 10px;
}

.profit-distribution-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.profit-distribution-head > :first-child {
    flex: 1 1 auto;
    min-width: 0;
}

.profit-distribution-head h3 {
    margin: 8px 0 2px;
    color: var(--emerald);
    font-size: 17px;
}

.profit-distribution-total {
    min-width: 170px;
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    text-align: center;
    background: linear-gradient(135deg, #064936, #0d7550);
    color: #f8f2df;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 8px;
}

.profit-distribution-total span {
    font-size: 11px;
    color: rgba(255, 255, 255, .72);
}

.profit-distribution-total strong {
    font-size: 18px;
}

.profit-distribution-actions {
    justify-content: flex-end;
    min-width: 164px;
}

.profit-distribution-actions .btn {
    min-height: 36px;
}

.profit-items-table table {
    min-width: 760px;
}

.withdrawals-table-wrap table {
    min-width: 1180px;
}

.capital-withdrawal-command {
    margin-top: 16px;
    padding: 12px;
}

.capital-withdrawal-command-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.capital-withdrawal-tabs {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(170px, 1fr));
    gap: 4px;
    padding: 4px;
    background: #f1f5ef;
    border: 1px solid #dce7dc;
    border-radius: 8px;
}

.capital-withdrawal-tab {
    min-height: 42px;
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: #607268;
    border: 1px solid transparent;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.capital-withdrawal-tab svg,
.capital-withdrawal-create svg {
    width: 18px;
    height: 18px;
}

.capital-withdrawal-command svg,
.withdrawal-membership-assurance svg,
.withdrawal-account-summary svg,
.withdrawal-full-balance-note svg,
.withdrawal-modal-actions svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.capital-withdrawal-tab b {
    min-width: 28px;
    padding: 2px 7px;
    color: var(--emerald);
    background: #fff;
    border: 1px solid #d6e3d7;
    border-radius: 999px;
    text-align: center;
    font-size: 11px;
}

.capital-withdrawal-tab.active {
    color: var(--emerald);
    background: #fff;
    border-color: #ccdccc;
    box-shadow: 0 4px 12px rgba(4, 80, 54, .07);
}

.capital-withdrawal-create {
    min-height: 44px;
}

.capital-withdrawal-flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr) 20px minmax(0, 1fr) 20px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 12px;
    background: #fbfcfa;
    border: 1px solid #e2e9df;
    border-radius: 6px;
}

.capital-withdrawal-flow > i {
    display: grid;
    place-items: center;
    color: #b38a24;
}

.capital-withdrawal-flow > i svg {
    width: 17px;
    height: 17px;
}

.capital-flow-step {
    min-width: 0;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
}

.capital-flow-step > span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--emerald);
    border-radius: 50%;
    font-size: 10px;
    font-weight: 800;
}

.capital-flow-step > div {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.capital-flow-step strong {
    color: var(--emerald);
    font-size: 13px;
}

.capital-flow-step small {
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.withdrawal-ledger-head {
    align-items: center;
}

.withdrawal-membership-assurance {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #087b58;
    font-size: 12px;
    font-weight: 800;
}

.withdrawal-membership-assurance svg {
    width: 18px;
    height: 18px;
}

.withdrawal-reference,
.withdrawal-date-pair,
.withdrawal-units-cell,
.withdrawal-value-cell,
.withdrawal-status-cell {
    display: grid;
    gap: 4px;
}

.withdrawal-reference strong,
.withdrawal-units-cell strong,
.withdrawal-value-cell strong {
    color: var(--emerald);
}

.withdrawal-reference small,
.withdrawal-date-pair small,
.withdrawal-units-cell small,
.withdrawal-value-cell small,
.withdrawal-status-cell small {
    color: var(--muted);
    font-size: 10px;
}

.withdrawal-date-pair {
    grid-template-columns: repeat(2, minmax(86px, 1fr));
    gap: 8px;
}

.withdrawal-date-pair span {
    display: grid;
    gap: 2px;
}

.withdrawal-units-progress {
    width: 110px;
    height: 5px;
    overflow: hidden;
    background: #e3eae1;
    border-radius: 999px;
}

.withdrawal-units-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #087b58, #d7aa36);
}

.withdrawal-status-cell {
    justify-items: start;
}

.withdrawal-status-cell .text-success {
    color: #087b58;
    font-weight: 800;
}

.withdrawal-modal-card {
    width: min(720px, calc(100vw - 28px));
}

.withdrawal-settlement-modal-card {
    width: min(780px, calc(100vw - 28px));
}

.withdrawal-account-summary {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding: 10px 12px;
    color: var(--emerald);
    background: #f0f8f2;
    border: 1px solid #cfe4d3;
    border-radius: 6px;
}

.withdrawal-account-summary svg {
    width: 28px;
    height: 28px;
}

.withdrawal-account-summary div {
    display: grid;
    gap: 2px;
}

.withdrawal-account-summary small {
    color: #607268;
}

.withdrawal-full-balance-note {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 10px 12px;
    color: #78570b;
    background: #fff8e8;
    border: 1px solid #ead39b;
    border-radius: 6px;
}

.withdrawal-full-balance-note svg {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
}

.withdrawal-settlement-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 14px 0;
    overflow: hidden;
    border: 1px solid #d6e2d6;
    border-radius: 7px;
}

.withdrawal-settlement-summary > div {
    min-width: 0;
    display: grid;
    gap: 4px;
    padding: 12px;
    background: #fafcf9;
    border-inline-start: 1px solid #dfe8de;
}

.withdrawal-settlement-summary > div:first-child {
    border-inline-start: 0;
}

.withdrawal-settlement-summary small {
    color: var(--muted);
    font-size: 10px;
}

.withdrawal-settlement-summary strong {
    color: var(--emerald);
    font-size: 17px;
}

.withdrawal-settlement-summary .net {
    background: #eaf7f0;
}

.withdrawal-settlement-summary .net strong {
    color: #087b58;
}

.withdrawal-settlement-warning {
    margin-top: 12px;
}

.withdrawal-modal-actions {
    margin-top: 14px;
}

.badge.approved,
.badge.settled {
    color: #087b58;
    background: #e7f7ef;
    border-color: #bce5d0;
}

.badge.new,
.badge.review {
    color: #8b650f;
    background: #fff8e6;
    border-color: #edd59a;
}

.badge.cancelled {
    color: #637068;
    background: #f0f3f0;
    border-color: #d6ddd7;
}

.dashboard-tables {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.compact-table table {
    min-width: 0;
}

.compact-table td,
.compact-table th {
    white-space: normal;
}

.quick-actions-panel {
    margin-top: 12px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(247, 250, 245, .98)),
        var(--surface);
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(174px, 1fr));
    gap: 10px;
}

.quick-action {
    position: relative;
    min-height: 72px;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(21, 38, 28, .05);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

button.quick-action {
    width: 100%;
    color: inherit;
    font: inherit;
    text-align: start;
    cursor: pointer;
}

.quick-action::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    width: 3px;
    background: var(--gold);
    opacity: .75;
}

.quick-action:hover {
    transform: translateY(-3px);
    border-color: #c9dac9;
    background: #fbfdf9;
    box-shadow: var(--shadow-hover);
}

.quick-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: var(--emerald);
    background: #eef7ef;
    border: 1px solid #d2e6d6;
    transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}

.quick-action:hover .quick-icon {
    color: #fff;
    background: var(--emerald);
    border-color: var(--emerald);
    transform: scale(1.05);
}

.quick-action strong,
.quick-action small {
    display: block;
    min-width: 0;
}

.quick-action strong {
    color: var(--ink);
    font-size: 13px;
    line-height: 1.5;
}

.quick-action small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
}

.bylaws-form {
    display: grid;
    gap: 12px;
}

.bylaws-cover {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(244, 249, 242, .96)),
        var(--surface);
    box-shadow: var(--shadow);
}

.bylaws-cover h2 {
    margin: 8px 0 6px;
    color: var(--emerald);
    font-size: 22px;
}

.bylaws-cover p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.bylaws-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(90px, 1fr));
    gap: 8px;
    min-width: min(420px, 100%);
}

.bylaws-meta span {
    display: grid;
    gap: 4px;
    min-height: 70px;
    align-content: center;
    padding: 10px;
    border-radius: 8px;
    color: #4b5a50;
    background: #fff;
    border: 1px solid var(--line);
    text-align: center;
}

.bylaws-meta strong {
    color: var(--emerald);
    font-size: 18px;
}

.bylaws-actions {
    display: flex;
    justify-content: flex-end;
}

.bylaws-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.bylaws-index {
    position: sticky;
    top: 16px;
    display: grid;
    gap: 7px;
    padding: 12px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.bylaws-index h2 {
    margin: 0 0 4px;
    color: var(--emerald);
    font-size: 15px;
}

.bylaws-index a {
    display: grid;
    grid-template-columns: 30px 1fr auto;
    gap: 8px;
    align-items: center;
    min-height: 42px;
    padding: 7px;
    border-radius: 7px;
    color: #314137;
    border: 1px solid transparent;
    transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.bylaws-index a:hover {
    transform: translateX(-3px);
    background: #f6faf6;
    border-color: #d6e3d4;
}

.bylaws-index span {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    color: var(--emerald);
    background: #edf7ef;
    font-weight: 800;
    font-size: 11px;
}

.bylaws-index strong {
    font-size: 11px;
    line-height: 1.6;
}

.bylaws-index small {
    color: var(--muted);
    font-size: 10px;
    white-space: nowrap;
}

.bylaw-chapters,
.article-list {
    display: grid;
    gap: 12px;
}

.bylaw-chapter {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: var(--shadow);
}

.chapter-head {
    padding: 14px 16px;
    background:
        linear-gradient(135deg, rgba(4, 80, 54, .96), rgba(8, 99, 69, .94)),
        var(--emerald);
    color: #fff;
}

.chapter-head span {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    color: #f7e9bf;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .16);
    font-size: 11px;
    font-weight: 800;
}

.chapter-head h2 {
    margin: 8px 0 3px;
    font-size: 19px;
}

.chapter-head p {
    margin: 0;
    color: rgba(255, 255, 255, .72);
}

.article-list {
    padding: 12px;
}

.bylaw-article {
    position: relative;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e3e9df;
    background: #fbfdf9;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.bylaw-article:hover {
    transform: translateY(-2px);
    border-color: #cbdacb;
    box-shadow: 0 12px 24px rgba(21, 38, 28, .09);
}

.article-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.article-number {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    border-radius: 8px;
    color: #7a5814;
    background: #fff6df;
    border: 1px solid #ecd89c;
    font-weight: 900;
}

.article-head h3 {
    margin: 0;
    color: var(--emerald);
    font-size: 15px;
    line-height: 1.6;
}

.article-body {
    display: grid;
    gap: 6px;
    padding-inline-start: 44px;
}

.article-body p {
    position: relative;
    margin: 0;
    color: #2c3b32;
    line-height: 1.9;
}

.article-body p::before {
    content: "";
    position: absolute;
    inset-inline-start: -14px;
    top: .85em;
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: var(--gold);
}

.admin-edit-box {
    margin-top: 10px;
    padding: 10px;
    border-radius: 8px;
    border: 1px dashed #cbd5c9;
    background: #fff;
}

.admin-edit-box summary,
.bylaw-new summary {
    cursor: pointer;
    color: var(--emerald);
    font-weight: 800;
}

.admin-edit-box .form-grid,
.bylaw-new .form-grid {
    margin-top: 10px;
}

.bylaw-new {
    margin-top: 4px;
}

.bar-list {
    display: grid;
    gap: 8px;
}

.bar-row {
    display: grid;
    grid-template-columns: 145px 1fr 74px;
    gap: 8px;
    align-items: center;
    font-size: 11px;
}

.bar-track {
    height: 8px;
    background: #edf1ea;
    border-radius: 999px;
    overflow: hidden;
}

.bar-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--emerald), var(--gold));
}

.donut {
    width: min(180px, 100%);
    aspect-ratio: 1;
    margin: 4px auto 14px;
    border-radius: 50%;
    border: 1px solid var(--line);
    position: relative;
}

.donut::after {
    content: "";
    position: absolute;
    inset: 29%;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--line);
}

.sparkline {
    width: 100%;
    height: 150px;
    overflow: visible;
}

.sparkline polyline {
    fill: none;
    stroke: var(--emerald);
    stroke-width: 3;
}

.sparkline circle { fill: var(--gold); }

.notice-list { display: grid; gap: 8px; }

.notice {
    padding: 10px;
    border-radius: 8px;
    background: #fbfcfa;
    border: 1px solid var(--line);
}

.profile-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
}

.member-profile-shell {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}

.member-profile-cover {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 18px;
    border-radius: 8px;
    color: #fff8e8;
    background:
        linear-gradient(112deg, rgba(193, 151, 51, .17) 0 1px, transparent 1px 30px),
        linear-gradient(135deg, #04291e, #075239 62%, #032419);
    border: 1px solid rgba(193, 151, 51, .36);
    box-shadow: 0 22px 52px rgba(4, 45, 31, .18);
    overflow: hidden;
}

.member-profile-cover::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    width: 5px;
    background: linear-gradient(180deg, var(--gold), rgba(255, 255, 255, .18), var(--gold));
}

.member-profile-person {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.member-profile-avatar {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    color: #fff;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .55), transparent 28%),
        linear-gradient(145deg, #0d6a48, #032f22);
    border: 2px solid rgba(218, 171, 74, .74);
    border-radius: 8px;
    box-shadow: 0 18px 32px rgba(0, 0, 0, .18);
    font-size: 24px;
    font-weight: 900;
}

.member-profile-eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    color: #f5d579;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(218, 171, 74, .28);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
}

.member-profile-person h2 {
    margin: 9px 0 4px;
    color: #fffdf5;
    font-size: 30px;
    line-height: 1.18;
    font-weight: 900;
}

.member-profile-person p {
    margin: 0;
    color: rgba(255, 248, 231, .74);
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.member-profile-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    max-width: 520px;
}

.member-profile-actions .btn:not(.primary) {
    color: #f8f0d7;
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .20);
}

.member-profile-actions .btn.primary {
    color: #102a1c;
    background: linear-gradient(180deg, #e8c561, #c19733);
    border-color: rgba(247, 220, 141, .86);
}

.member-profile-status {
    min-height: 40px;
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    padding: 7px 11px;
    color: #fff8e8;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 8px;
}

.member-profile-status strong,
.member-profile-status small {
    display: block;
    line-height: 1.4;
}

.member-profile-status small {
    color: rgba(255, 248, 231, .72);
    font-size: 10px;
}

.member-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--success);
    box-shadow: 0 0 0 5px rgba(20, 124, 79, .16);
}

.member-status-dot.inactive,
.member-status-dot.suspended,
.member-status-dot.rejected {
    background: var(--danger);
    box-shadow: 0 0 0 5px rgba(201, 68, 53, .14);
}

.member-profile-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(4, 80, 54, .12);
    box-shadow: 0 14px 34px rgba(4, 45, 31, .08);
}

.member-profile-tab {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    color: #435246;
    background: #fff;
    border: 1px solid #dce7d9;
    border-radius: 8px;
    font-weight: 900;
    transition: transform .16s ease, color .16s ease, border-color .16s ease, background .16s ease;
}

.member-profile-tab span {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    color: var(--emerald);
    background: #eef8f1;
    border: 1px solid #d2e6d4;
    border-radius: 7px;
}

.member-profile-tab:hover {
    transform: translateY(-1px);
    border-color: rgba(193, 151, 51, .42);
}

.member-profile-tab.active {
    color: #f8df9a;
    background: linear-gradient(145deg, #073929, #05281d);
    border-color: rgba(218, 171, 74, .42);
}

.member-profile-tab.active span {
    color: #f8df9a;
    background: rgba(255, 255, 255, .09);
    border-color: rgba(255, 255, 255, .18);
}

.member-profile-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.member-profile-metric {
    position: relative;
    min-height: 116px;
    display: grid;
    align-content: center;
    gap: 6px;
    padding: 14px;
    border-radius: 8px;
    background:
        linear-gradient(145deg, #fff, #f7faf6);
    border: 1px solid rgba(4, 80, 54, .12);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.member-profile-metric::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--gold), var(--emerald));
}

.member-profile-metric small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
}

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

.member-profile-card {
    min-width: 0;
    display: grid;
    gap: 12px;
    align-content: start;
    padding: 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .98);
    border: 1px solid rgba(4, 80, 54, .12);
    box-shadow: var(--shadow);
}

.member-profile-card-wide {
    grid-column: 1 / -1;
}

.member-ownership-meter {
    display: grid;
    gap: 9px;
    padding: 12px;
    border-radius: 8px;
    background: #f7fbf5;
    border: 1px solid #e0eadb;
}

.member-ownership-meter > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    color: var(--muted);
}

.member-ownership-meter strong {
    color: var(--emerald);
    font-size: 18px;
    font-weight: 900;
}

.member-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.member-facts span {
    min-height: 62px;
    display: grid;
    align-content: center;
    gap: 3px;
    padding: 10px;
    background: #fff;
    border: 1px solid #e2eadf;
    border-radius: 8px;
}

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

.member-facts strong {
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
}

.member-identity-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.member-identity-panel > div {
    min-height: 58px;
    display: grid;
    align-content: center;
    gap: 4px;
    padding: 10px 12px;
    color: var(--ink);
    background: linear-gradient(145deg, #fff, #f8fbf6);
    border: 1px solid #e2eadf;
    border-radius: 8px;
    overflow-wrap: anywhere;
}

.member-identity-panel small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
}

.member-identity-panel strong {
    color: #063a2b;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 900;
}

.member-highlight {
    display: grid;
    gap: 4px;
    padding: 12px;
    border-radius: 8px;
    color: #f9edcf;
    background:
        linear-gradient(135deg, #073929, #075239);
    border: 1px solid rgba(193, 151, 51, .30);
}

.member-highlight strong {
    color: #fff;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 900;
}

.member-highlight span {
    color: rgba(255, 248, 231, .74);
}

.member-document-actions {
    display: grid;
    gap: 8px;
}

.member-document-link {
    min-height: 58px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    color: var(--ink);
    background: #fbfdf9;
    border: 1px solid #e2eadf;
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.member-document-link:hover {
    transform: translateY(-1px);
    border-color: rgba(193, 151, 51, .38);
    background: #fff;
}

.member-document-link span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: var(--emerald);
    background: #eef8f1;
    border: 1px solid #d2e6d4;
    border-radius: 8px;
}

.member-note-box {
    margin: 0;
    min-height: 70px;
    padding: 12px;
    color: #344238;
    background: #fbfdf9;
    border: 1px solid #e2eadf;
    border-radius: 8px;
    line-height: 1.8;
}

.bar-list.compact {
    gap: 7px;
}

.bar-list.compact .bar-row {
    grid-template-columns: 64px minmax(0, 1fr) 62px;
}

.member-tab-panel {
    padding: 14px;
}

.documents-grid {
    align-items: start;
}

.member-inline-report-preview {
    padding: 12px;
}

.member-inline-report-frame {
    width: 100%;
    height: min(74vh, 900px);
    min-height: 680px;
    border: 0;
    border-radius: 8px;
    background: #eef3ef;
}

.members-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
    gap: 14px;
    align-items: stretch;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(244, 249, 242, .98)),
        var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.members-hero::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    width: 5px;
    background: linear-gradient(180deg, var(--emerald), var(--gold));
}

.members-hero h2 {
    margin: 8px 0 6px;
    color: var(--emerald);
    font-size: 22px;
    line-height: 1.45;
}

.members-hero p {
    max-width: 820px;
    margin: 0;
    color: var(--muted);
    line-height: 1.9;
}

.role-policy-grid {
    display: grid;
    gap: 8px;
}

.role-policy-grid span {
    display: grid;
    gap: 4px;
    min-height: 58px;
    align-content: center;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--muted);
    line-height: 1.55;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.role-policy-grid span:hover {
    transform: translateY(-2px);
    border-color: #cbdacb;
    box-shadow: 0 10px 22px rgba(21, 38, 28, .08);
}

.role-policy-grid strong {
    color: var(--emerald);
}

.member-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(282px, 1fr));
    gap: 12px;
}

.member-card {
    position: relative;
    display: grid;
    gap: 12px;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.member-card::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    width: 4px;
    background: var(--gold);
}

.member-card:hover {
    transform: translateY(-3px);
    border-color: #cbdacb;
    box-shadow: var(--shadow-hover);
}

.member-card-head {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.member-avatar {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, var(--emerald), #0d6a48);
    border: 2px solid var(--gold);
    font-weight: 900;
}

.member-card h2 {
    margin: 0;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.5;
}

.member-card p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 11px;
    overflow-wrap: anywhere;
}

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

.member-meta-grid span {
    display: grid;
    gap: 3px;
    min-height: 58px;
    align-content: center;
    padding: 9px;
    border-radius: 8px;
    background: #f8faf6;
    border: 1px solid #e4eadf;
}

.member-meta-grid small,
.ownership-meter span,
.member-access-form label {
    color: var(--muted);
    font-size: 10px;
}

.member-meta-grid strong {
    color: var(--ink);
    font-size: 12px;
    line-height: 1.5;
}

.ownership-meter {
    display: grid;
    gap: 7px;
}

.ownership-meter div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.ownership-meter strong {
    color: var(--emerald);
    font-size: 12px;
}

.member-card-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
    gap: 8px;
}

.member-access-form,
.member-access-note {
    display: grid;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid #edf1eb;
}

.member-access-form div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.member-access-note {
    grid-template-columns: 1fr auto;
    align-items: center;
    color: var(--muted);
    font-size: 11px;
}

.member-access-note strong {
    color: var(--emerald);
}

.settings-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
    gap: 14px;
    align-items: stretch;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(244, 249, 242, .98)),
        var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.settings-hero::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    width: 5px;
    background: linear-gradient(180deg, var(--gold), var(--emerald));
}

.settings-hero h2 {
    margin: 8px 0 6px;
    color: var(--emerald);
    font-size: 22px;
    line-height: 1.45;
}

.settings-hero p {
    margin: 0;
    color: var(--muted);
    line-height: 1.9;
}

.settings-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.settings-stat-grid span {
    display: grid;
    gap: 4px;
    align-content: center;
    min-height: 84px;
    padding: 10px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--muted);
    text-align: center;
}

.settings-stat-grid strong {
    color: var(--emerald);
    font-size: 20px;
}

.settings-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr);
    gap: 12px;
    align-items: start;
}

.settings-tabs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(148px, 1fr);
    justify-content: center;
    gap: 4px;
    width: min(760px, 100%);
    max-width: 100%;
    margin: 16px auto 0;
    padding: 6px;
    overflow-x: auto;
    border-radius: 8px;
    background: #f5f8f4;
    border: 1px solid rgba(4, 80, 54, .14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .86), 0 12px 28px rgba(4, 45, 31, .06);
}

.settings-tab {
    min-height: 44px;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 7px 12px;
    color: #435246;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 7px;
    transition: transform .16s ease, color .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.settings-tab > span {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    color: var(--emerald);
    background: rgba(255, 255, 255, .78);
    border: 1px solid rgba(4, 80, 54, .15);
    border-radius: 7px;
}

.settings-tab svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.settings-tab strong {
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.settings-tab small {
    display: none;
}

.settings-tab:hover {
    transform: translateY(-1px);
    border-color: rgba(193, 151, 51, .42);
    background: rgba(255, 255, 255, .78);
}

.settings-tab.active {
    color: #f7d56f;
    background: #063727;
    border-color: rgba(218, 171, 74, .38);
    box-shadow: 0 8px 18px rgba(4, 45, 31, .16);
}

.settings-tab.active > span {
    color: #f8df9a;
    background: rgba(255, 255, 255, .08);
    border-color: rgba(248, 213, 111, .28);
}

.settings-tab.active small {
    color: rgba(255, 248, 231, .68);
}

.locked-nav-input {
    color: var(--emerald);
    background:
        linear-gradient(135deg, rgba(248, 223, 154, .18), rgba(238, 248, 241, .88));
    border-color: rgba(193, 151, 51, .45);
    font-weight: 900;
}

.settings-tab-shell {
    margin-top: 12px;
}

.settings-tab-panel {
    animation: panelFadeIn .16s ease both;
}

.security-settings-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
    gap: 12px;
    align-items: start;
}

.security-policy-panel,
.backup-panel {
    padding: 18px;
}

.security-panel-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    color: #f7d56f;
    background: #063727;
    border: 1px solid rgba(193, 151, 51, .38);
    border-radius: 8px;
}

.security-panel-icon svg,
.security-toolbar svg,
.backup-download-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.security-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.security-number-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 74px;
    align-items: stretch;
}

.security-number-field input {
    min-width: 0;
    border-radius: 0 7px 7px 0;
}

.security-number-field span {
    display: grid;
    place-items: center;
    color: var(--emerald);
    background: #f3f8f2;
    border: 1px solid var(--line);
    border-right: 0;
    border-radius: 7px 0 0 7px;
    font-size: 12px;
    font-weight: 900;
}

.security-toolbar {
    margin-top: 14px;
}

.security-toolbar .btn,
.backup-download-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.backup-panel {
    display: grid;
    gap: 16px;
}

.backup-panel-head {
    display: flex;
    gap: 12px;
    align-items: center;
}

.backup-panel-head .section-title,
.backup-panel-head .section-subtitle {
    margin: 0;
}

.backup-panel-head .section-subtitle {
    margin-top: 4px;
}

.backup-scope {
    display: grid;
    gap: 8px;
}

.backup-scope > span {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    border: 1px solid rgba(4, 80, 54, .12);
    border-radius: 7px;
    background: #f8fbf6;
}

.backup-scope strong {
    color: var(--emerald);
    font-size: 13px;
}

.backup-scope small {
    color: var(--muted);
    line-height: 1.6;
}

.pdf-diagnostics-json {
    max-height: 260px;
    overflow: auto;
    margin: 0;
    padding: 12px;
    border: 1px solid rgba(4, 80, 54, .12);
    border-radius: 7px;
    background: #fbfaf7;
    color: var(--ink);
    direction: ltr;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-word;
    font: 12px/1.55 Consolas, "Courier New", monospace;
}

.backup-download-button {
    width: 100%;
}

.settings-fund-panel {
    padding: 20px 18px;
}

.settings-fund-panel .form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}

.settings-fund-panel .field {
    min-height: 76px;
    align-content: start;
}

.settings-fund-panel .field label {
    min-height: 18px;
}

.settings-fund-panel input,
.settings-fund-panel select {
    min-height: 44px;
}

.settings-fund-panel textarea {
    min-height: 96px;
}

.settings-field-wide {
    grid-column: 1 / -1;
}

.settings-fund-panel .muted {
    line-height: 1.55;
}

.settings-tab-shell .account-panel {
    position: static;
    max-width: 720px;
    margin-inline: auto;
}

.settings-asset-preview {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-media-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.settings-media-card {
    min-width: 0;
    display: grid;
    gap: 12px;
    align-content: start;
    padding: 14px;
    border-radius: 8px;
    background:
        linear-gradient(145deg, #fff, #f8fbf6);
    border: 1px solid rgba(4, 80, 54, .13);
    box-shadow: 0 10px 24px rgba(13, 37, 24, .06);
}

.settings-media-copy {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.settings-media-copy > span {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: #f4d27b;
    background: linear-gradient(145deg, #073929, #05281d);
    border: 1px solid rgba(218, 171, 74, .28);
    border-radius: 8px;
}

.settings-media-copy svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.settings-media-copy strong,
.settings-media-copy small {
    display: block;
}

.settings-media-copy strong {
    color: var(--emerald);
    font-size: 14px;
    font-weight: 900;
}

.settings-media-copy small {
    margin-top: 3px;
    color: var(--muted);
    line-height: 1.6;
}

.settings-asset-preview img {
    width: 76px;
    height: 76px;
    object-fit: contain;
    padding: 6px;
    background: #fff;
    border: 1px solid #d7e0d8;
    border-radius: 8px;
}

.settings-asset-preview.signature-preview img {
    width: 142px;
    height: 54px;
}

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

.member-settings-layout {
    grid-template-columns: minmax(0, 720px);
    justify-content: center;
}

.member-settings-layout .account-panel {
    position: static;
}

.account-panel {
    position: sticky;
    top: 16px;
}

.account-summary {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #f8faf6;
}

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

.account-summary small {
    margin: 2px 0 6px;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.permission-panel {
    overflow: hidden;
}

.permission-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 12px;
}

.permission-card {
    display: grid;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 8px 20px rgba(21, 38, 28, .05);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.permission-card:hover {
    transform: translateY(-2px);
    border-color: #cbdacb;
    box-shadow: var(--shadow-hover);
}

.permission-head {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.permission-head h3 {
    margin: 0;
    color: var(--ink);
    font-size: 14px;
}

.permission-head p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 11px;
    overflow-wrap: anywhere;
}

.permission-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.permission-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #edf1eb;
}

.permission-footer span {
    color: var(--muted);
    font-size: 11px;
}

.legal-note {
    color: #665016;
    font-size: 11px;
    line-height: 1.8;
    border-top: 1px solid var(--line);
    margin-top: 14px;
    padding-top: 10px;
}

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

.report-choice-card {
    position: relative;
    min-height: 198px;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 14px;
    padding: 18px;
    overflow: hidden;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(244, 249, 244, .96)),
        repeating-linear-gradient(90deg, rgba(7, 92, 66, .028) 0 1px, transparent 1px 34px);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.report-choice-card::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--gold), var(--emerald));
    opacity: .72;
}

.report-choice-card:hover,
.report-choice-card:focus-within,
.report-choice-card.is-active {
    transform: translateY(-2px);
    border-color: rgba(4, 80, 54, .34);
    box-shadow: 0 18px 42px rgba(4, 80, 54, .12);
}

.report-card-meta {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.report-paper-chip,
.report-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.report-paper-chip {
    color: #075c42;
    background: #eef7f1;
    border: 1px solid #cfe2d5;
}

.report-code {
    direction: ltr;
    color: #7a6421;
    background: #fff8e3;
    border: 1px solid #ead79f;
    font-size: 10px;
}

.report-card-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.report-card-copy .section-title {
    margin-bottom: 8px;
    font-size: 19px;
    line-height: 1.45;
}

.report-card-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.85;
}

.report-action-strip {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    gap: 6px;
    align-items: center;
}

.report-action {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 9px;
    color: #075c42;
    background: rgba(255, 255, 255, .88);
    border: 1px solid #cfded2;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    transition: transform .14s ease, border-color .14s ease, background .14s ease, color .14s ease, box-shadow .14s ease;
}

.report-action:hover,
.report-action:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(7, 92, 66, .34);
    box-shadow: 0 10px 22px rgba(7, 92, 66, .10);
    outline: none;
}

.report-action.primary {
    color: #ffffff;
    background: var(--emerald);
    border-color: var(--emerald);
    box-shadow: 0 12px 24px rgba(7, 92, 66, .18);
}

.report-action.icon-only {
    width: 40px;
    padding-inline: 0;
}

.report-action svg {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 1080px) {
    .system-bar {
        grid-template-columns: auto minmax(260px, 1fr) auto;
    }

    .system-bar-search {
        min-width: 210px;
        max-width: 280px;
    }

    .system-bar-nav {
        grid-auto-columns: minmax(48px, 62px);
    }

    .brand-notification .notification-popover {
        top: 92px;
        right: 16px;
        width: min(360px, calc(100vw - 32px));
    }

    .brand-notification .notification-popover::before {
        top: -6px;
        right: 20px;
        border-inline-end: 0;
        border-inline-start: 1px solid rgba(4, 80, 54, .14);
    }

    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; }
    .user-hub {
        top: 14px;
        left: 14px;
    }

    .member-profile-cover,
    .member-profile-metrics,
    .member-profile-grid,
    .member-facts,
    .member-identity-panel {
        grid-template-columns: 1fr;
    }

    .member-profile-actions {
        justify-content: flex-start;
        max-width: none;
    }

    .kpi-grid,
    .dashboard-charts,
    .dashboard-tables,
    .dashboard-alerts,
    .grid.metrics,
    .grid.two,
    .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .project-command-bar,
    .project-ledger-grid {
        grid-template-columns: 1fr;
    }

    .project-command-actions {
        justify-content: flex-start;
    }

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

    .quick-actions-grid {
        grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
    }

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

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

    .capital-withdrawal-flow {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .capital-withdrawal-flow > i {
        display: none;
    }
}

@media (max-width: 720px) {
    body {
        --system-bar-height: 62px;
    }

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

    .report-choice-card {
        min-height: 0;
        padding: 14px;
    }

    .report-action-strip {
        grid-template-columns: minmax(0, 1fr) 44px 44px;
    }

    .report-action:not(.primary) span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .capital-withdrawal-command-row {
        align-items: stretch;
        flex-direction: column;
    }

    .capital-withdrawal-tabs {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .capital-withdrawal-tab {
        grid-template-columns: 18px minmax(0, 1fr) auto;
        padding-inline: 8px;
        font-size: 11px;
    }

    .capital-withdrawal-create {
        width: 100%;
    }

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

    .withdrawal-ledger-head {
        align-items: flex-start;
    }

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

    .withdrawal-settlement-summary > div {
        border-inline-start: 0;
        border-block-start: 1px solid #dfe8de;
    }

    .withdrawal-settlement-summary > div:first-child {
        border-block-start: 0;
    }

    .withdrawal-modal-actions .btn {
        flex: 1 1 0;
    }

    .system-bar {
        height: 62px;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 8px;
        padding: 7px 10px;
        background:
            linear-gradient(90deg, rgba(193, 151, 51, .12), transparent 38%),
            linear-gradient(180deg, #0b2b1f 0%, #071c15 100%);
    }

    .system-bar-user {
        gap: 7px;
        min-width: 0;
    }

    .system-bar-menu {
        display: inline-flex;
        width: 40px;
        height: 40px;
        min-height: 40px;
        padding: 0;
        color: #f6df9c;
        background: rgba(255, 255, 255, .08);
        border-color: rgba(218, 171, 74, .30);
        border-radius: 8px;
    }

    .system-bar-nav {
        display: none;
    }

    .system-bar-brand {
        justify-self: end;
        gap: 7px;
        min-width: 0;
        transform: translateX(-4px);
    }

    .system-bar-search {
        display: inline-flex;
        min-width: 0;
        max-width: min(174px, 43vw);
        height: auto;
        padding: 0;
        font-size: 11px;
        border: 0;
        background: transparent;
    }

    .system-bar-logo {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
    }

    .system-bar-logo img {
        width: 31px;
        height: 31px;
    }

    .user-hub-notification .notification-trigger {
        width: 40px;
        height: 40px;
    }

    .user-hub-panel {
        position: fixed;
        top: calc(var(--system-bar-height) + 8px);
        left: 10px;
        right: 10px;
        width: auto;
        max-height: calc(100dvh - var(--system-bar-height) - 18px);
        overflow: auto;
        padding: 10px;
        border-radius: 8px;
    }

    .user-hub-panel::before {
        left: 74px;
    }

    .user-hub-card,
    .user-hub-role-card,
    .user-hub-link,
    .user-hub-logout {
        min-height: 50px;
        padding: 8px 9px;
    }

    .user-hub-card {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .user-hub-panel-avatar {
        width: 48px;
        height: 48px;
    }

    .user-hub-notification .notification-popover {
        position: fixed;
        top: calc(var(--system-bar-height) + 8px);
        left: 10px;
        right: 10px;
        width: auto;
        max-height: calc(100dvh - var(--system-bar-height) - 18px);
        overflow: auto;
    }

    .user-hub-notification .notification-popover::before {
        left: 84px;
        right: auto;
    }

    .brand-notification,
    .topbar-notification {
        display: none;
    }

    .notification-popover {
        inset-inline-start: auto;
        inset-inline-end: 0;
    }

    .notification-popover::before {
        inset-inline-start: auto;
        inset-inline-end: 16px;
    }

    .notification-page-head,
    .profit-distribution-head {
        flex-direction: column;
        align-items: stretch;
    }

    .notification-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .member-profile-cover {
        padding: 14px;
    }

    .member-profile-person {
        grid-template-columns: 58px minmax(0, 1fr);
        gap: 10px;
    }

    .member-profile-avatar {
        width: 58px;
        height: 58px;
        font-size: 19px;
    }

    .member-profile-person h2 {
        font-size: 23px;
    }

    .member-profile-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        scroll-snap-type: x mandatory;
    }

    .member-profile-tab {
        min-width: 132px;
        scroll-snap-align: start;
    }

    .member-profile-actions .btn,
    .member-profile-status {
        flex: 1 1 100%;
    }

    .member-profile-metric,
    .member-profile-card,
    .member-tab-panel {
        padding: 12px;
    }

    .member-inline-report-frame {
        min-height: 580px;
        height: 72vh;
    }

    .profit-distribution-total {
        min-width: 0;
    }

    .profit-distribution-actions {
        justify-content: stretch;
        min-width: 0;
    }

    .profit-distribution-actions .btn {
        flex: 1 1 0;
    }

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

    .settlement-form .btn {
        width: 100%;
    }

    .app-shell { display: block; }
    .main { padding: 12px; }

    body {
        overflow-x: hidden;
    }

    .sidebar {
        position: fixed;
        inset-block: var(--system-bar-height) 0;
        inset-inline: auto 0;
        right: 0;
        left: auto;
        z-index: 40;
        width: min(420px, 100vw);
        height: calc(100dvh - var(--system-bar-height));
        padding: 14px;
        border-left: 0;
        overflow: hidden;
        visibility: hidden;
        pointer-events: none;
        opacity: 0;
        transform: translate3d(110vw, 0, 0);
        box-shadow: none;
        transition: transform .22s ease, opacity .18s ease, visibility .22s ease, box-shadow .22s ease;
    }

    .modal-shell {
        padding: 10px;
        align-items: end;
    }

    .modal-card {
        width: 100%;
        max-height: 92vh;
        border-radius: 10px 10px 0 0;
    }

    .modal-head,
    .modal-body {
        padding: 14px;
    }

    .mobile-menu-state:checked ~ .mobile-menu-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 35;
        background: rgba(6, 22, 15, .42);
        backdrop-filter: blur(4px);
    }

    .mobile-menu-state:checked ~ .app-shell .sidebar {
        visibility: visible;
        pointer-events: auto;
        opacity: 1;
        transform: translateX(0);
        box-shadow: -18px 0 48px rgba(4, 80, 54, .18);
    }

    .mobile-menu-trigger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 32px;
        padding: 7px 10px;
        border-radius: 7px;
        color: #fff;
        background: var(--emerald);
        border: 1px solid var(--emerald);
        cursor: pointer;
        font-weight: 800;
    }

    .mobile-menu-close {
        position: absolute;
        inset-block-start: 12px;
        inset-inline-start: 12px;
        width: 34px;
        height: 34px;
        display: grid;
        place-items: center;
        border-radius: 8px;
        color: #fff;
        background: rgba(255, 255, 255, .1);
        border: 1px solid rgba(255, 255, 255, .18);
        cursor: pointer;
    }

    .brand {
        padding-top: 28px;
    }

    .brand-card {
        min-height: 118px;
        padding: 10px;
    }

    .brand-card-logo-only {
        min-height: 104px;
        padding: 7px;
    }

    .brand-logo-full {
        width: min(124px, 100%);
        max-height: 88px;
    }

    .brand-logo-frame {
        width: 62px;
        height: 62px;
        border-radius: 18px;
    }

    .brand-logo {
        width: 52px;
        height: 52px;
    }

    .login-panel,
    .dashboard-hero,
    .bylaws-cover,
    .kpi-grid,
    .dashboard-charts,
    .dashboard-tables,
    .dashboard-alerts,
    .grid.metrics,
    .grid.two,
    .grid.three,
    .form-grid,
    .project-command-bar,
    .project-ledger-grid { grid-template-columns: 1fr; }

    .auth-shell {
        display: block;
        padding: 14px;
        overflow-x: hidden;
    }

    .login-panel {
        width: calc(100vw - 28px);
        max-width: 430px;
        min-height: auto;
        margin: 0 auto;
    }

    .login-brand {
        min-height: 178px;
        padding: 18px 16px 16px;
        border-left: 0;
        border-bottom: 1px solid rgba(218, 171, 74, .28);
        order: 1;
    }

    .login-arch {
        inset-block: 30px;
        inset-inline-start: -210px;
        width: 300px;
        opacity: .42;
    }

    .login-full-logo {
        width: min(150px, 100%);
    }

    .login-brand-content {
        gap: 9px;
    }

    .login-gold-rule {
        width: 118px;
    }

    .login-brand-copy {
        font-size: 13px;
        line-height: 1.3;
    }

    .login-feature-strip {
        display: none;
    }

    .login-form-stage {
        width: 100%;
        padding: 12px;
        order: 2;
    }

    .login-form {
        width: 100%;
        padding: 18px 16px;
        border-color: rgba(218, 171, 74, .36);
    }

    .login-form-head {
        margin-bottom: 14px;
    }

    .login-form-head h1 {
        font-size: 21px;
    }

    .login-form-head p {
        margin-top: 3px;
        font-size: 11px;
    }

    .auth-field {
        margin-top: 11px;
    }

    .auth-field label {
        margin-bottom: 5px;
        font-size: 11px;
    }

    .auth-control input {
        min-height: 43px;
        padding-inline-start: 40px;
        padding-inline-end: 42px;
    }

    .auth-control-icon {
        inset-inline-start: 12px;
    }

    .password-toggle {
        inset-block: 5px;
        width: 33px;
    }

    .remember-row {
        margin: 12px 0 14px;
        font-size: 12px;
    }

    .login-submit {
        min-height: 44px;
    }

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

    .quick-actions-grid {
        grid-template-columns: 1fr;
    }

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

    .nav-link {
        min-height: 36px;
        padding: 7px 9px;
        font-size: 13px;
    }

    .sidebar-logout {
        margin-top: 10px;
    }

    .topbar,
    .section-head,
    .profile-head,
    .members-hero,
    .settings-hero,
    .settings-layout,
    .bylaws-cover {
        align-items: stretch;
        flex-direction: column;
        grid-template-columns: 1fr;
    }

    .member-board {
        grid-template-columns: 1fr;
    }

    .settings-stat-grid {
        grid-template-columns: 1fr;
    }

    .settings-tabs {
        width: 100%;
        grid-auto-columns: minmax(132px, 1fr);
        overflow-x: auto;
    }

    .settings-tab {
        min-width: 132px;
        justify-content: center;
    }

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

    .settings-media-grid {
        grid-template-columns: 1fr;
    }

    .security-settings-layout,
    .security-fields {
        grid-template-columns: 1fr;
    }

    .account-panel {
        position: static;
    }

    .member-card-head {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .member-card-head .badge {
        grid-column: 1 / -1;
        justify-content: flex-start;
        width: fit-content;
    }

    .bylaws-meta {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        min-width: 0;
    }

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

    .bylaws-index {
        position: static;
        grid-auto-flow: column;
        grid-auto-columns: minmax(190px, 1fr);
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }

    .bylaws-index h2 {
        display: none;
    }

    .bylaws-index a {
        scroll-snap-align: start;
    }

    .article-body {
        padding-inline-start: 8px;
    }

    .article-body p::before {
        inset-inline-start: -10px;
    }
    .toolbar { width: 100%; }
    .btn { flex: 1; }
    .dashboard-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-actions {
        justify-content: stretch;
    }

    .kpi-card {
        min-height: 152px;
        grid-template-columns: 1fr;
        padding: 12px 12px 42px;
    }

    .metric-value {
        font-size: 18px;
    }

    .quick-action {
        min-height: 68px;
    }
}

@media (max-width: 720px) and (max-height: 760px) {
    .sidebar {
        padding: 10px;
    }

    .brand {
        padding-top: 22px;
        padding-bottom: 10px;
    }

    .brand-card {
        min-height: 118px;
        gap: 5px;
        padding: 10px;
        border-radius: 16px;
    }

    .brand-card-logo-only {
        min-height: 84px;
        padding: 6px;
    }

    .brand-logo-full {
        width: min(112px, 100%);
        max-height: 72px;
    }

    .brand-logo-frame {
        width: 54px;
        height: 54px;
        border-radius: 15px;
    }

    .brand-logo {
        width: 46px;
        height: 46px;
    }

    .brand-title {
        font-size: 12px;
        line-height: 1.45;
    }

    .brand-subtitle {
        font-size: 10px;
    }

    .nav {
        gap: 2px;
        margin-top: 8px;
    }

    .nav-link {
        min-height: 32px;
        padding: 5px 8px;
        font-size: 12px;
    }

    .nav-icon {
        width: 21px;
        height: 21px;
    }

    .sidebar-logout {
        margin-top: 8px;
    }
}

@media (max-width: 480px) {
    .topbar,
    .dashboard-hero,
    .bylaws-cover,
    .panel,
    .form-panel {
        padding: 12px;
    }

    .bylaws-meta {
        grid-template-columns: 1fr;
    }

    .chapter-head h2 {
        font-size: 16px;
    }

    .kpi-card {
        grid-template-columns: 40px minmax(0, 1fr);
        min-height: 144px;
    }

    .member-meta-grid,
    .member-card-actions,
    .member-access-form div,
    .member-access-note,
    .permission-head,
    .permission-footer {
        grid-template-columns: 1fr;
    }

    .permission-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .permission-board {
        grid-template-columns: 1fr;
    }

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

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

/* Premium dashboard refresh */
.mobile-top-brand {
    display: none;
}

.topbar-copy {
    min-width: 0;
}

.topbar-toolbar {
    justify-content: flex-end;
}

.dashboard-page .topbar {
    display: none;
}

.dashboard-hero {
    isolation: isolate;
    min-height: 168px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(112px, 148px);
    align-items: stretch;
    gap: 14px;
    padding: 18px;
    color: #f7f2df;
    background:
        linear-gradient(135deg, rgba(3, 36, 26, .98), rgba(4, 80, 54, .96) 54%, rgba(8, 28, 21, .98)),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 18px);
    border-color: rgba(218, 171, 74, .42);
    box-shadow: 0 22px 55px rgba(4, 35, 25, .18);
}

.dashboard-hero::before {
    inset: 0;
    width: auto;
    background:
        linear-gradient(120deg, transparent 0 46%, rgba(218, 171, 74, .13) 46.2%, transparent 46.7%),
        linear-gradient(90deg, rgba(218, 171, 74, .16), transparent 28%);
    opacity: .85;
}

.dashboard-hero::after {
    inset-block: 22px;
    inset-inline-start: -82px;
    width: 180px;
    border: 1px solid rgba(218, 171, 74, .42);
    border-inline-end: 0;
    border-radius: 110px 0 0 110px;
    background: transparent;
    opacity: .7;
    transform: none;
}

.dashboard-hero:hover::after {
    opacity: .92;
    transform: none;
}

.dashboard-hero h2 {
    color: #fffaf0;
    font-size: clamp(23px, 2.1vw, 31px);
    font-weight: 900;
}

.dashboard-hero p {
    max-width: 720px;
    color: rgba(255, 255, 255, .76);
    font-size: 13px;
}

.dashboard-hero-copy {
    display: grid;
    align-content: center;
    gap: 4px;
}

.dashboard-hero-summary {
    position: relative;
    z-index: 1;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 4px;
    min-width: 0;
    padding: 12px;
    border-radius: 8px;
    color: var(--emerald);
    text-align: center;
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(255, 255, 255, .78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 20px 45px rgba(0, 0, 0, .18);
}

.dashboard-hero-summary img {
    width: min(104px, 100%);
    max-height: 62px;
    object-fit: contain;
    margin-bottom: 4px;
}

.dashboard-hero-summary span,
.dashboard-hero-summary small {
    color: var(--muted);
    font-size: 11px;
}

.dashboard-hero-summary strong {
    color: var(--emerald);
    font-size: 20px;
    font-weight: 900;
    direction: ltr;
    unicode-bidi: plaintext;
}

.session-chip {
    color: #f6df9c;
    background: rgba(218, 171, 74, .12);
    border-color: rgba(218, 171, 74, .34);
}

.hero-actions {
    display: grid;
    align-content: center;
    justify-content: stretch;
    gap: 8px;
}

.hero-actions .btn {
    width: 100%;
    min-height: 36px;
    border-color: rgba(255, 255, 255, .20);
}

.hero-actions .btn:not(.primary) {
    color: #f7f2df;
    background: rgba(255, 255, 255, .08);
}

.hero-actions .btn.primary {
    color: #082017;
    background: linear-gradient(180deg, #e5bd55, #c99b30);
    border-color: rgba(245, 213, 132, .8);
    box-shadow: 0 16px 30px rgba(0, 0, 0, .20);
}

.kpi-grid {
    gap: 14px;
}

.kpi-card {
    min-height: 158px;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 11px;
    padding: 15px 15px 44px;
    background:
        linear-gradient(180deg, #ffffff, #fbfdf8),
        var(--surface);
    border-color: rgba(4, 80, 54, .15);
    box-shadow: 0 12px 30px rgba(13, 37, 24, .08);
}

.kpi-card::before {
    width: 4px;
    background: linear-gradient(180deg, #e1b54c, #b78924);
}

.kpi-card::after {
    background: linear-gradient(120deg, transparent 20%, rgba(218, 171, 74, .18) 46%, transparent 72%);
}

.kpi-card:hover {
    border-color: rgba(193, 151, 51, .38);
    box-shadow: 0 20px 48px rgba(13, 37, 24, .14);
}

.kpi-icon {
    width: 42px;
    height: 42px;
    color: #f5d584;
    background: linear-gradient(145deg, #073929, #05281d);
    border-color: rgba(218, 171, 74, .28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.kpi-card.tone-gold .kpi-icon,
.kpi-card.tone-blue .kpi-icon,
.kpi-card.tone-green .kpi-icon,
.kpi-card.tone-purple .kpi-icon {
    color: #f5d584;
    background: linear-gradient(145deg, #073929, #05281d);
    border-color: rgba(218, 171, 74, .28);
}

.kpi-card .metric-label {
    color: #58665d;
    font-weight: 800;
}

.kpi-card .metric-value {
    color: #071f16;
    font-size: 23px;
    font-weight: 900;
}

.kpi-card .metric-note {
    color: var(--emerald);
    font-weight: 700;
}

.card-action {
    min-height: 28px;
    color: #063d2b;
    background: #edf6ef;
    border-color: rgba(4, 80, 54, .08);
}

.chart-card,
.dashboard-tables .panel,
.quick-actions-panel {
    border-color: rgba(4, 80, 54, .14);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(249, 252, 247, .98)),
        var(--surface);
    box-shadow: 0 14px 36px rgba(13, 37, 24, .08);
}

.nav-chart-wrap {
    height: 232px;
    border-radius: 8px;
    border: 1px solid #dde6d9;
    background:
        linear-gradient(180deg, #fbfdfb, #f2f7ef),
        repeating-linear-gradient(0deg, transparent 0 39px, rgba(4, 80, 54, .06) 40px),
        repeating-linear-gradient(90deg, transparent 0 79px, rgba(4, 80, 54, .05) 80px);
}

.nav-chart polyline {
    stroke: #c19733;
    stroke-width: 3.4;
}

.nav-chart circle,
.chart-dot {
    fill: #045036;
    background: #045036;
}

.chart-tooltip {
    background: #05271c;
    border-color: rgba(218, 171, 74, .28);
}

.chart-tooltip::after {
    background: #05271c;
}

.dashboard-page .dashboard-charts {
    grid-template-columns: minmax(300px, .86fr) minmax(0, 1.6fr);
    gap: 16px;
}

.dashboard-page .chart-card {
    min-height: 360px;
    padding: 18px;
    border-radius: 8px;
    background:
        radial-gradient(circle at 10% 10%, rgba(193, 151, 51, .10), transparent 30%),
        linear-gradient(180deg, #ffffff, #f8fbf6);
    border-color: rgba(4, 80, 54, .16);
    box-shadow: 0 18px 44px rgba(13, 37, 24, .10);
}

.dashboard-page .chart-card::before {
    width: 5px;
    background: linear-gradient(180deg, #e5bd55, #0b6b4c);
}

.dashboard-page .chart-card .section-head {
    align-items: flex-start;
}

.dashboard-page .chart-card .section-title {
    font-size: 19px;
    color: #063d2b;
}

.dashboard-page .chart-card .section-subtitle {
    color: #789083;
    font-size: 11px;
    font-weight: 800;
}

.donut-wrap {
    min-height: 214px;
}

.donut-shell {
    position: relative;
    width: 180px;
    height: 180px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background:
        radial-gradient(circle, #ffffff 0 45%, transparent 46%),
        linear-gradient(145deg, rgba(4, 80, 54, .08), rgba(193, 151, 51, .10));
    box-shadow: inset 0 0 0 1px rgba(4, 80, 54, .08), 0 22px 36px rgba(4, 80, 54, .10);
}

.donut {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(4, 80, 54, .10), 0 12px 26px rgba(4, 80, 54, .12);
}

.donut::after {
    content: "";
    position: absolute;
    inset: 32px;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff, #f9fbf7);
    box-shadow: inset 0 0 0 1px rgba(4, 80, 54, .08);
}

.donut-center {
    position: absolute;
    inset: 44px;
    z-index: 1;
    display: grid;
    place-items: center;
    align-content: center;
    color: #063d2b;
    text-align: center;
}

.donut-center strong {
    font-size: 24px;
    line-height: 1;
    font-weight: 900;
}

.donut-center small {
    margin-top: 3px;
    color: #7c8c82;
    font-size: 11px;
    font-weight: 900;
}

.dashboard-page .legend-list {
    margin-top: 4px;
}

.dashboard-page .legend-row {
    min-height: 34px;
    padding: 5px 8px;
    border: 1px solid transparent;
    border-radius: 8px;
}

.dashboard-page .legend-row:hover {
    background: #f4faf5;
    border-color: #dce9dc;
}

.dashboard-page .legend-dot {
    width: 11px;
    height: 11px;
    box-shadow: 0 0 0 4px rgba(4, 80, 54, .06);
}

.dashboard-page .nav-chart-wrap {
    height: 258px;
    padding: 16px 42px 34px 14px;
    overflow: hidden;
    border-color: #d8e5d8;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(246, 250, 244, .94)),
        radial-gradient(circle at 16% 10%, rgba(193, 151, 51, .16), transparent 30%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95);
}

.dashboard-page .nav-chart {
    position: relative;
    z-index: 1;
}

.nav-chart-grid line {
    stroke: rgba(4, 80, 54, .10);
    stroke-width: 1;
    stroke-dasharray: 3 5;
}

.dashboard-page .nav-chart polyline {
    stroke: url(#navStroke);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 8px 10px rgba(193, 151, 51, .20));
}

.dashboard-page .nav-chart circle {
    fill: #ffffff;
    stroke: #c19733;
    stroke-width: 3;
}

.nav-chart-y-axis {
    position: absolute;
    inset-block: 22px 47px;
    inset-inline-end: 11px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #799187;
    font-size: 10px;
    font-weight: 900;
    direction: ltr;
}

.nav-chart-x-axis {
    position: absolute;
    inset-inline: 14px 42px;
    bottom: 9px;
    z-index: 2;
    height: 18px;
}

.nav-chart-x-axis span {
    position: absolute;
    left: var(--x);
    max-width: 72px;
    color: #7a8f84;
    font-size: 10px;
    font-weight: 900;
    text-align: center;
    white-space: nowrap;
    transform: translateX(-50%);
}

.nav-chart-current {
    position: absolute;
    left: var(--x);
    top: 20px;
    bottom: 43px;
    z-index: 2;
    border-inline-start: 1px solid rgba(4, 80, 54, .22);
    pointer-events: none;
}

.nav-chart-current span {
    position: absolute;
    top: calc(var(--y) - 48px);
    left: 50%;
    min-width: 76px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #063d2b;
    background: #fffdf6;
    border: 1px solid rgba(193, 151, 51, .42);
    box-shadow: 0 12px 26px rgba(13, 37, 24, .10);
    font-size: 11px;
    font-weight: 900;
    text-align: center;
    direction: ltr;
    transform: translateX(-50%);
}

.dashboard-page .chart-hotspot {
    z-index: 4;
}

.dashboard-page .chart-hotspot::before {
    content: "";
    position: absolute;
    top: -128px;
    bottom: -128px;
    left: 50%;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(4, 80, 54, .28), transparent);
    opacity: 0;
    transform: translateX(-50%);
    transition: opacity .16s ease;
}

.dashboard-page .chart-dot {
    width: 13px;
    height: 13px;
    background: #ffffff;
    border-color: #c19733;
    box-shadow: 0 0 0 5px rgba(193, 151, 51, .14), 0 10px 22px rgba(4, 80, 54, .14);
}

.dashboard-page .chart-tooltip {
    min-width: 152px;
    color: #f8fbf7;
    background: #062f22;
    border-color: rgba(229, 189, 85, .34);
    box-shadow: 0 18px 32px rgba(7, 37, 26, .20);
}

.dashboard-page .chart-tooltip::after {
    background: #062f22;
}

.dashboard-page .chart-tooltip small,
.dashboard-page .chart-tooltip em {
    color: rgba(255, 255, 255, .78);
}

.dashboard-page .chart-hotspot:hover::before,
.dashboard-page .chart-hotspot:focus-visible::before {
    opacity: 1;
}

/* Dashboard chart correction: compact, readable, light. */
.dashboard-page .dashboard-charts {
    grid-template-columns: minmax(320px, .78fr) minmax(0, 1.45fr);
    gap: 14px;
    align-items: stretch;
}

.dashboard-page .chart-card {
    min-height: 310px;
    padding: 16px 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .99), rgba(249, 252, 247, .98)),
        var(--surface);
    box-shadow: 0 14px 34px rgba(13, 37, 24, .08);
}

.dashboard-page .chart-card .section-title {
    font-size: 18px;
}

.dashboard-page .donut-wrap {
    min-height: 168px;
}

.dashboard-page .donut-shell {
    width: 146px;
    height: 146px;
    box-shadow: inset 0 0 0 1px rgba(4, 80, 54, .08), 0 14px 28px rgba(4, 80, 54, .08);
}

.dashboard-page .donut {
    width: 122px;
    height: 122px;
    margin: 0;
}

.dashboard-page .donut::after {
    inset: 27px;
}

.dashboard-page .donut-center {
    inset: 37px;
}

.dashboard-page .donut-center strong {
    font-size: 19px;
}

.dashboard-page .legend-list {
    gap: 5px;
}

.dashboard-page .legend-row {
    min-height: 28px;
    padding: 3px 6px;
    font-size: 11px;
}

.dashboard-page .nav-chart-wrap {
    height: 206px;
    margin-top: 10px;
    padding: 14px 36px 28px 12px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(248, 251, 246, .96)),
        repeating-linear-gradient(0deg, transparent 0 39px, rgba(4, 80, 54, .055) 40px),
        repeating-linear-gradient(90deg, transparent 0 110px, rgba(4, 80, 54, .05) 111px);
}

.dashboard-page .nav-chart polyline {
    stroke-width: 3.2;
    filter: none;
}

.dashboard-page .nav-chart circle {
    opacity: 0;
}

.dashboard-page .chart-dot {
    width: 11px;
    height: 11px;
    box-shadow: 0 0 0 4px rgba(193, 151, 51, .12), 0 8px 18px rgba(4, 80, 54, .12);
}

.dashboard-page .chart-hotspot::before {
    display: none;
}

.dashboard-page .nav-chart-y-axis {
    inset-block: 22px 39px;
    inset-inline-end: 8px;
    font-size: 9px;
    color: #7b9086;
}

.dashboard-page .nav-chart-x-axis {
    inset-inline: 12px 36px;
    bottom: 7px;
}

.dashboard-page .nav-chart-x-axis span {
    max-width: 62px;
    overflow: hidden;
    color: #73877c;
    font-size: 9px;
    text-overflow: ellipsis;
}

.dashboard-page .nav-chart-current {
    display: none;
}

/* Recharts-style dashboard charts, implemented in Blade/SVG. */
.dashboard-page .dashboard-charts {
    direction: rtl;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

.dashboard-page .nav-card {
    order: 1;
    grid-column: span 2;
}

.dashboard-page .allocation-card {
    order: 2;
    grid-column: span 1;
}

.dashboard-page .chart-card {
    min-height: 326px;
    padding: 20px;
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .995), rgba(248, 251, 247, .99)),
        var(--surface);
    border-color: rgba(4, 80, 54, .15);
    box-shadow: 0 16px 38px rgba(13, 37, 24, .08);
}

.dashboard-page .chart-card .toolbar {
    display: none;
}

.dashboard-page .chart-card .section-head {
    margin-bottom: 12px;
}

.dashboard-page .chart-card .section-title {
    font-size: 20px;
    color: #063d2b;
    line-height: 1.25;
}

.dashboard-page .chart-card .section-subtitle {
    color: #71867b;
    font-size: 11px;
    font-weight: 800;
}

.dashboard-page .nav-chart-wrap {
    height: 256px;
    margin-top: 4px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.dashboard-page .nav-chart {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.dashboard-page .nav-chart-grid line {
    stroke: rgba(4, 80, 54, .11);
    stroke-width: 1;
    stroke-dasharray: 3 4;
}

.dashboard-page .nav-area {
    fill: rgba(193, 151, 51, .16);
}

.dashboard-page .nav-line {
    fill: none;
    stroke: hsl(42 78% 56%);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 5px 8px rgba(193, 151, 51, .18));
}

.dashboard-page .nav-chart text {
    pointer-events: none;
    user-select: none;
}

.dashboard-page .nav-axis-label,
.dashboard-page .nav-x-label {
    fill: #73877c;
    font-size: 10px;
    font-weight: 900;
    direction: ltr;
}

.dashboard-page .nav-x-label {
    fill: #667c70;
}

.dashboard-page .nav-point {
    cursor: default;
}

.dashboard-page .nav-point-ring {
    display: block;
    fill: #fffdf7;
    stroke: hsl(42 78% 56%);
    stroke-width: 4;
    filter: drop-shadow(0 5px 8px rgba(4, 80, 54, .16));
    transition: stroke .16s ease, filter .16s ease, transform .16s ease;
    transform-box: fill-box;
    transform-origin: center;
}

.dashboard-page .nav-point-core {
    display: block;
    fill: #0b6b4c;
    stroke: #ffffff;
    stroke-width: 1.5;
    transition: fill .16s ease, transform .16s ease;
    transform-box: fill-box;
    transform-origin: center;
}

.dashboard-page .nav-point:hover .nav-point-ring {
    stroke: #0b6b4c;
    filter: drop-shadow(0 8px 12px rgba(193, 151, 51, .22));
    transform: scale(1.12);
}

.dashboard-page .nav-point:hover .nav-point-core {
    fill: hsl(42 78% 56%);
    transform: scale(1.1);
}

.dashboard-page .nav-hover-guide {
    position: absolute;
    top: 34px;
    bottom: 62px;
    left: var(--nav-reader-x, 50%);
    z-index: 3;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(6, 61, 43, .20), rgba(193, 151, 51, .75), rgba(6, 61, 43, .20), transparent);
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%);
    transition: opacity .12s ease;
}

.dashboard-page .nav-hover-tooltip {
    position: absolute;
    left: var(--nav-reader-tooltip-x, 50%);
    top: var(--nav-reader-tooltip-y, 40%);
    z-index: 4;
    min-width: 154px;
    padding: 9px 11px;
    color: #fff;
    background: #062f22;
    border: 1px solid rgba(218, 171, 74, .26);
    border-radius: 8px;
    box-shadow: 0 18px 34px rgba(6, 47, 34, .20);
    opacity: 0;
    pointer-events: none;
    text-align: right;
    transform: translate(-50%, -112%);
    transition: opacity .12s ease, transform .12s ease;
}

.dashboard-page .nav-hover-tooltip strong,
.dashboard-page .nav-hover-tooltip small,
.dashboard-page .nav-hover-tooltip em {
    display: block;
    line-height: 1.65;
    font-style: normal;
    white-space: nowrap;
}

.dashboard-page .nav-hover-tooltip small,
.dashboard-page .nav-hover-tooltip em {
    color: rgba(255, 255, 255, .78);
    font-size: 10px;
}

.dashboard-page .nav-chart-wrap.is-reading .nav-hover-guide,
.dashboard-page .nav-chart-wrap.is-reading .nav-hover-tooltip {
    opacity: 1;
}

.dashboard-page .nav-chart-wrap.is-reading .nav-hover-tooltip {
    transform: translate(-50%, -118%);
}

.dashboard-page .chart-hotspot {
    z-index: 5;
    width: 30px;
    height: 30px;
    outline: none;
}

.dashboard-page .chart-hotspot::before {
    content: "";
    position: absolute;
    top: -126px;
    bottom: -126px;
    left: 50%;
    display: block;
    width: 1px;
    background: linear-gradient(180deg, transparent 0%, rgba(6, 61, 43, .10) 9%, rgba(193, 151, 51, .62) 50%, rgba(6, 61, 43, .10) 91%, transparent 100%);
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) scaleY(.78);
    transform-origin: center;
    transition: opacity .18s ease, transform .18s ease;
}

.dashboard-page .chart-dot {
    display: block;
    width: 13px;
    height: 13px;
    background: #fffdf7;
    border: 3px solid hsl(42 78% 56%);
    box-shadow: 0 0 0 5px rgba(193, 151, 51, .13), 0 9px 20px rgba(4, 80, 54, .16);
    transform: scale(.92);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

.dashboard-page .chart-tooltip {
    min-width: 144px;
    padding: 9px 11px;
    color: #fff;
    background: #062f22;
    border: 1px solid rgba(218, 171, 74, .24);
    border-radius: 8px;
    box-shadow: 0 18px 34px rgba(6, 47, 34, .20);
}

.dashboard-page .chart-tooltip strong {
    color: #fff;
}

.dashboard-page .chart-tooltip small,
.dashboard-page .chart-tooltip em {
    color: rgba(255, 255, 255, .78);
}

.dashboard-page .chart-tooltip::after {
    background: #062f22;
}

.dashboard-page .chart-hotspot:hover::before,
.dashboard-page .chart-hotspot:focus::before,
.dashboard-page .chart-hotspot:focus-visible::before,
.dashboard-page .chart-hotspot.is-active::before {
    opacity: 1;
    transform: translateX(-50%) scaleY(1);
}

.dashboard-page .chart-hotspot:hover .chart-dot,
.dashboard-page .chart-hotspot:focus .chart-dot,
.dashboard-page .chart-hotspot:focus-visible .chart-dot,
.dashboard-page .chart-hotspot.is-active .chart-dot {
    background: #ffffff;
    border-color: #0b6b4c;
    box-shadow: 0 0 0 8px rgba(193, 151, 51, .18), 0 14px 28px rgba(4, 80, 54, .22);
    transform: scale(1.35);
}

.dashboard-page .chart-hotspot:hover .chart-tooltip,
.dashboard-page .chart-hotspot:focus .chart-tooltip,
.dashboard-page .chart-hotspot:focus-visible .chart-tooltip,
.dashboard-page .chart-hotspot.is-active .chart-tooltip {
    opacity: 1;
    transform: translate(-50%, 0);
}

.dashboard-page .chart-hotspot.edge-start:hover .chart-tooltip,
.dashboard-page .chart-hotspot.edge-start:focus .chart-tooltip,
.dashboard-page .chart-hotspot.edge-start:focus-visible .chart-tooltip,
.dashboard-page .chart-hotspot.edge-start.is-active .chart-tooltip {
    transform: translate(0, 0);
}

.dashboard-page .chart-hotspot.edge-end:hover .chart-tooltip,
.dashboard-page .chart-hotspot.edge-end:focus .chart-tooltip,
.dashboard-page .chart-hotspot.edge-end:focus-visible .chart-tooltip,
.dashboard-page .chart-hotspot.edge-end.is-active .chart-tooltip {
    transform: translate(0, 0);
}

.dashboard-page .nav-chart-y-axis {
    inset-block: 21px 40px;
    inset-inline-end: 7px;
    width: 50px;
    color: #73877c;
    font-size: 10px;
    font-weight: 900;
    text-align: left;
}

.dashboard-page .nav-chart-x-axis {
    inset-inline: 12px 62px;
    bottom: 4px;
}

.dashboard-page .nav-chart-x-axis span {
    max-width: 78px;
    color: #73877c;
    font-size: 10px;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-page .nav-chart-current {
    display: none !important;
}

.dashboard-page .donut-wrap {
    min-height: 166px;
    margin-top: 2px;
}

.dashboard-page .donut-shell {
    display: contents;
}

.dashboard-page .donut {
    width: 150px;
    height: 150px;
    margin: 0 auto 10px;
    border: 1px solid rgba(4, 80, 54, .14);
    border-radius: 999px;
    box-shadow: 0 16px 28px rgba(4, 80, 54, .08);
}

.dashboard-page .donut::after {
    inset: 34px;
    background: #fff;
    border: 1px solid rgba(4, 80, 54, .12);
}

.dashboard-page .donut-center {
    display: grid;
}

.dashboard-page .legend-list {
    gap: 7px;
    margin-top: 4px;
}

.dashboard-page .legend-row {
    grid-template-columns: 12px 1fr auto;
    min-height: 28px;
    padding: 2px 4px;
    border: 0;
    color: #34463b;
    font-size: 12px;
}

.dashboard-page .legend-row strong {
    color: #53665b;
    font-weight: 900;
    direction: ltr;
}

.dashboard-page .legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 4px;
    box-shadow: none;
}

@media (max-width: 1180px) {
    .dashboard-page .dashboard-charts {
        grid-template-columns: 1fr;
    }

    .dashboard-page .nav-card,
    .dashboard-page .allocation-card {
        grid-column: 1;
    }
}

.quick-actions-panel {
    position: relative;
    overflow: hidden;
}

.quick-actions-panel::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--emerald), var(--gold));
}

.quick-actions-panel > * {
    position: relative;
    z-index: 1;
}

.quick-action {
    background: #fff;
    border-color: rgba(4, 80, 54, .13);
}

.quick-action:hover {
    border-color: rgba(193, 151, 51, .36);
}

@media (max-width: 720px) {
    .dashboard-page .topbar {
        display: grid;
    }

    body {
        background:
            linear-gradient(180deg, #eef4ef 0%, #f7f9f5 38%, #f3f6f1 100%);
    }

    .main {
        padding: 12px 12px 14px;
    }

    .topbar {
        position: sticky;
        top: 0;
        z-index: 34;
        min-height: 64px;
        height: 64px;
        width: calc(100% + 24px);
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr);
        grid-template-areas: "menu brand";
        align-items: center;
        justify-content: stretch;
        gap: 10px;
        direction: ltr;
        margin: 0 -12px 12px;
        padding: 8px 12px;
        border: 0;
        border-bottom: 1px solid rgba(218, 171, 74, .38);
        border-radius: 0;
        color: #fff;
        background:
            linear-gradient(135deg, #071c15, #06402d 58%, #06130f),
            repeating-linear-gradient(135deg, rgba(255, 255, 255, .04) 0 1px, transparent 1px 16px);
        box-shadow: 0 12px 30px rgba(5, 35, 24, .20);
    }

    .app-page-hero {
        min-height: 132px;
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        margin: 0 0 12px;
        padding: 16px;
    }

    .app-page-hero h2 {
        margin: 10px 0 6px;
        font-size: 27px;
    }

    .app-page-hero p {
        font-size: 12px;
        line-height: 1.7;
    }

    .app-page-hero-actions {
        width: 100%;
        justify-content: stretch;
    }

    .app-page-hero-actions .btn {
        flex: 1 1 0;
    }

    .page-meta-strip {
        flex-direction: column;
        gap: 10px;
        margin: 0 0 12px;
        padding: 12px;
    }

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

    .topbar-copy,
    .topbar-toolbar {
        display: none;
    }

    .mobile-top-brand {
        grid-area: brand;
        min-width: 0;
        max-width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 9px;
        direction: rtl;
        color: #fff;
    }

    .mobile-top-brand img {
        width: 42px;
        height: 42px;
        object-fit: contain;
        padding: 5px;
        border-radius: 8px;
        background: rgba(255, 255, 255, .94);
        border: 1px solid rgba(218, 171, 74, .34);
    }

    .mobile-top-brand span {
        min-width: 0;
        display: grid;
        justify-items: start;
        line-height: 1.35;
        text-align: right;
    }

    .mobile-top-brand strong {
        max-width: 220px;
        overflow: hidden;
        color: #fffaf0;
        font-size: 13px;
        font-weight: 900;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .mobile-top-brand small {
        color: #e4bd57;
        font-size: 10px;
        font-weight: 800;
    }

    .mobile-menu-trigger {
        grid-area: menu;
        margin: 0;
        width: 44px;
        height: 44px;
        min-height: 44px;
        display: grid;
        place-items: center;
        padding: 0;
        border-radius: 8px;
        color: #f8dfa0;
        background: rgba(255, 255, 255, .09);
        border: 1px solid rgba(255, 255, 255, .20);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
    }

    .mobile-menu-trigger span {
        display: none;
    }

    .mobile-menu-trigger svg {
        width: 22px;
        height: 22px;
    }

    .sidebar {
        width: min(360px, 92vw);
        padding: 12px;
        background:
            linear-gradient(180deg, #062117 0%, #045036 54%, #031b13 100%),
            repeating-linear-gradient(135deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 16px);
    }

    .dashboard-hero {
        min-height: auto;
        grid-template-columns: 1fr;
        gap: 11px;
        margin-top: 8px;
        padding: 14px;
    }

    .dashboard-hero h2 {
        margin-top: 6px;
        font-size: 22px;
    }

    .dashboard-hero p {
        display: none;
    }

    .dashboard-hero-summary {
        grid-template-columns: 54px minmax(0, 1fr);
        justify-items: stretch;
        align-items: center;
        text-align: right;
        padding: 10px;
    }

    .dashboard-hero-summary img {
        grid-row: span 3;
        width: 50px;
        max-height: 50px;
        margin: 0;
    }

    .dashboard-hero-summary strong {
        font-size: 18px;
    }

    .hero-actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
    }

    .hero-actions .btn {
        min-width: 0;
        flex: 0 1 auto;
        padding: 7px 6px;
        font-size: 11px;
        white-space: nowrap;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .kpi-card {
        width: 100%;
        min-height: 136px;
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 10px;
        padding: 12px 12px 40px;
    }

    .kpi-icon {
        width: 38px;
        height: 38px;
    }

    .kpi-card .metric-label {
        margin-bottom: 2px;
        font-size: 11px;
        line-height: 1.45;
    }

    .metric-en {
        font-size: 9px;
    }

    .kpi-card .metric-value {
        margin-top: 6px;
        font-size: 17px;
        line-height: 1.3;
        word-break: break-word;
    }

    .kpi-card .metric-note {
        margin-top: 5px;
        font-size: 10px;
        line-height: 1.45;
    }

    .card-action {
        inset-inline-start: 10px;
        bottom: 9px;
        max-width: calc(100% - 20px);
        font-size: 10px;
        white-space: nowrap;
    }

    .dashboard-charts,
    .dashboard-tables,
    .dashboard-alerts {
        gap: 10px;
        margin-top: 10px;
    }

    .chart-card {
        min-height: 296px;
    }

    .nav-chart-wrap {
        height: 184px;
    }

    .quick-actions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .quick-action {
        min-height: 74px;
        grid-template-columns: 34px minmax(0, 1fr);
        padding: 10px;
    }

    .quick-icon {
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 480px) {
    .mobile-top-brand strong {
        max-width: 176px;
        font-size: 12px;
    }

    .dashboard-hero,
    .panel,
    .form-panel {
        padding: 11px;
    }

    .hero-actions .btn {
        min-height: 34px;
    }

    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 360px) {
    .mobile-top-brand strong {
        max-width: 140px;
    }

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

/* Premium members refresh */
.members-hero {
    isolation: isolate;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 350px);
    min-height: 210px;
    padding: 18px;
    color: #fffaf0;
    background:
        linear-gradient(135deg, rgba(3, 33, 24, .98), rgba(4, 80, 54, .96) 58%, rgba(6, 18, 14, .98)),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 18px);
    border-color: rgba(218, 171, 74, .42);
    box-shadow: 0 22px 55px rgba(4, 35, 25, .16);
}

.members-hero::before {
    inset: 0;
    width: auto;
    background:
        linear-gradient(120deg, transparent 0 50%, rgba(218, 171, 74, .12) 50.2%, transparent 50.8%),
        linear-gradient(90deg, rgba(218, 171, 74, .14), transparent 32%);
    opacity: .86;
}

.members-hero::after {
    content: "";
    position: absolute;
    inset-block: 24px;
    inset-inline-start: -86px;
    width: 190px;
    border: 1px solid rgba(218, 171, 74, .36);
    border-inline-end: 0;
    border-radius: 120px 0 0 120px;
    pointer-events: none;
}

.members-hero > * {
    position: relative;
    z-index: 1;
}

.members-hero-copy {
    display: grid;
    align-content: center;
    gap: 8px;
}

.members-hero h2 {
    margin: 0;
    color: #fffaf0;
    font-size: clamp(25px, 2.2vw, 34px);
    font-weight: 900;
    line-height: 1.35;
}

.members-hero p {
    max-width: 760px;
    color: rgba(255, 255, 255, .76);
    font-size: 13px;
    line-height: 1.8;
}

.members-command-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.members-command-row .btn {
    min-height: 38px;
    border-color: rgba(255, 255, 255, .20);
}

.members-command-row .btn:not(.primary) {
    color: #f7f2df;
    background: rgba(255, 255, 255, .08);
}

.members-command-row .btn.primary {
    color: #082017;
    background: linear-gradient(180deg, #e5bd55, #c99b30);
    border-color: rgba(245, 213, 132, .8);
    box-shadow: 0 16px 30px rgba(0, 0, 0, .20);
}

.members-hero-ledger {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
    padding: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(255, 255, 255, .78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 20px 45px rgba(0, 0, 0, .18);
}

.members-target-ring {
    width: 104px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    align-content: center;
    border-radius: 999px;
    color: var(--emerald);
    background:
        radial-gradient(circle at center, #fff 58%, transparent 60%),
        conic-gradient(#c19733 var(--progress), #e7eee5 0);
    border: 1px solid #d9e4d6;
}

.members-target-ring strong,
.members-target-ring span {
    grid-column: 1;
    grid-row: 1;
}

.members-target-ring strong {
    align-self: center;
    margin-top: -10px;
    font-size: 25px;
    font-weight: 900;
}

.members-target-ring span {
    align-self: center;
    margin-top: 26px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.members-hero-lines {
    display: grid;
    gap: 8px;
}

.members-hero-lines span {
    display: grid;
    gap: 2px;
    align-content: center;
    min-height: 42px;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--muted);
    background: #f8fbf7;
    border: 1px solid #e1eadf;
}

.members-hero-lines small {
    font-size: 10px;
}

.members-hero-lines strong {
    color: #071f16;
    font-size: 14px;
    font-weight: 900;
}

.member-policy-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.member-policy-strip span {
    min-height: 70px;
    display: grid;
    align-content: center;
    gap: 4px;
    padding: 11px 12px;
    border-radius: 8px;
    color: #5b675f;
    background: #fff;
    border: 1px solid rgba(4, 80, 54, .14);
    box-shadow: 0 10px 24px rgba(13, 37, 24, .06);
}

.member-policy-strip strong {
    color: var(--emerald);
}

.member-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.member-metric-card {
    position: relative;
    min-height: 112px;
    padding: 14px 14px 14px 46px;
    border-radius: 8px;
    background: linear-gradient(180deg, #fff, #fbfdf8);
    border: 1px solid rgba(4, 80, 54, .15);
    box-shadow: 0 12px 30px rgba(13, 37, 24, .08);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.member-metric-card::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    width: 4px;
    background: linear-gradient(180deg, #e1b54c, #b78924);
}

.member-metric-card::after {
    content: "";
    position: absolute;
    inset-block-start: 14px;
    inset-inline-start: 14px;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(145deg, #073929, #05281d);
    border: 1px solid rgba(218, 171, 74, .28);
}

.member-metric-card:hover {
    transform: translateY(-3px);
    border-color: rgba(193, 151, 51, .36);
    box-shadow: 0 20px 48px rgba(13, 37, 24, .14);
}

.member-metric-card .metric-value {
    font-size: 24px;
    font-weight: 900;
}

.member-board {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.member-card {
    gap: 13px;
    padding: 15px;
    background:
        linear-gradient(180deg, #ffffff, #fbfdf8),
        var(--surface);
    border-color: rgba(4, 80, 54, .15);
    box-shadow: 0 12px 30px rgba(13, 37, 24, .08);
}

.member-card::before {
    width: 4px;
    background: linear-gradient(180deg, #e1b54c, #b78924);
}

.member-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 18%, rgba(218, 171, 74, .12) 46%, transparent 72%);
    transform: translateX(125%);
    transition: transform .55s ease;
    pointer-events: none;
}

.member-card:hover {
    border-color: rgba(193, 151, 51, .36);
    box-shadow: 0 20px 48px rgba(13, 37, 24, .14);
}

.member-card:hover::after {
    transform: translateX(-125%);
}

.member-card > * {
    position: relative;
    z-index: 1;
}

.member-card-head {
    grid-template-columns: 48px minmax(0, 1fr) auto;
}

.member-avatar {
    width: 48px;
    height: 48px;
    color: #f5d584;
    background: linear-gradient(145deg, #073929, #05281d);
    border-color: rgba(218, 171, 74, .58);
}

.member-card h2 {
    color: #071f16;
    font-size: 16px;
    font-weight: 900;
}

.member-card-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 5px;
}

.member-meta-grid span {
    background: #f8fbf7;
    border-color: #e1eadf;
}

.member-meta-grid strong {
    color: #071f16;
    font-weight: 900;
}

.ownership-meter {
    padding: 10px;
    border-radius: 8px;
    background: #f7fbf7;
    border: 1px solid #e0e9df;
}

.ownership-meter .bar-track {
    height: 9px;
    background: #e5ece2;
}

.ownership-meter .bar-fill {
    background: linear-gradient(90deg, #045036, #c19733);
}

.member-card-actions .btn {
    min-height: 34px;
}

.member-access-note {
    min-height: 42px;
    padding: 10px;
    border: 1px solid #e0e9df;
    border-radius: 8px;
    background: #f8fbf7;
}

.members-table-panel {
    margin-top: 14px;
}

.members-table-panel table {
    min-width: 980px;
}

.members-table-actions .btn {
    min-width: 82px;
}

.member-modal-card {
    width: min(820px, 100%);
}

.member-modal-card .modal-head {
    color: #fffaf0;
    background:
        linear-gradient(135deg, #072319, #045036 60%, #06140f),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 16px);
    border-bottom-color: rgba(218, 171, 74, .36);
}

.member-modal-card .modal-head h2 {
    color: #fffaf0;
}

.member-modal-card .modal-head p {
    color: rgba(255, 255, 255, .72);
}

.member-modal-card .modal-close {
    color: #f7df9a;
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .18);
}

.member-modal-card .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1080px) {
    .members-hero,
    .member-policy-strip,
    .member-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .members-hero,
    .member-policy-strip,
    .member-metric-grid,
    .member-board {
        grid-template-columns: 1fr;
    }

    .members-hero {
        min-height: auto;
        gap: 11px;
        padding: 14px;
    }

    .members-hero h2 {
        font-size: 23px;
    }

    .members-hero p {
        font-size: 12px;
        line-height: 1.7;
    }

    .members-command-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .members-hero-ledger {
        grid-template-columns: 86px minmax(0, 1fr);
        padding: 10px;
    }

    .members-target-ring {
        width: 86px;
    }

    .member-policy-strip,
    .member-metric-grid,
    .member-board,
    .members-table-panel {
        margin-top: 10px;
    }

    .member-metric-card {
        min-height: 106px;
    }

    .member-card {
        width: 100%;
    }

    .member-card-head {
        grid-template-columns: 46px minmax(0, 1fr);
    }

    .member-card-badges {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .member-meta-grid,
    .member-card-actions,
    .member-access-note {
        grid-template-columns: 1fr;
    }

    .members-table-actions {
        width: 100%;
    }

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

/* Members directory final simplification */
.members-directory-hero {
    min-height: 156px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 18px 20px;
    background:
        linear-gradient(135deg, #072319, #045036 62%, #06140f),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, .028) 0 1px, transparent 1px 18px);
}

.members-directory-hero::before {
    inset: auto 0 0;
    width: auto;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(218, 171, 74, .8), transparent);
    opacity: .9;
}

.members-directory-hero::after {
    display: none;
}

.members-directory-hero .members-hero-copy {
    gap: 7px;
}

.members-directory-hero h2 {
    font-size: clamp(27px, 2.4vw, 36px);
}

.members-directory-hero p {
    max-width: 640px;
}

.members-hero-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.members-hero-actions .btn {
    min-height: 38px;
    min-width: 118px;
    border-color: rgba(255, 255, 255, .2);
}

.members-hero-actions .btn:not(.primary) {
    color: #f7f2df;
    background: rgba(255, 255, 255, .08);
}

.members-hero-actions .btn.primary {
    color: #082017;
    background: linear-gradient(180deg, #e5bd55, #c99b30);
    border-color: rgba(245, 213, 132, .8);
    box-shadow: 0 16px 30px rgba(0, 0, 0, .2);
}

.members-table-panel {
    margin-top: 14px;
    padding: 0;
    overflow: hidden;
    border-color: rgba(4, 80, 54, .14);
    background: #fff;
}

.members-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 12px;
    border-bottom: 1px solid #e2e9de;
    background: linear-gradient(180deg, #fbfdf9, #f3f7f0);
}

.members-tab {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid #d4dfd1;
    color: #405247;
    background: #fff;
    font-weight: 800;
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}

button.members-tab {
    font: inherit;
}

.members-tab:hover {
    transform: translateY(-1px);
    border-color: rgba(193, 151, 51, .42);
}

.members-tab.active {
    color: #f7df9a;
    background: linear-gradient(145deg, #073929, #05281d);
    border-color: rgba(218, 171, 74, .34);
}

.members-table-panel .section-head {
    margin: 0;
    padding: 14px 16px;
    border-bottom: 1px solid #e6ece2;
}

.members-table-panel .section-title {
    font-size: 18px;
    font-weight: 900;
}

.members-table-summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.members-table-summary span {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #4d5d52;
    background: #f4f8f2;
    border: 1px solid #dce6d9;
    font-size: 11px;
}

.members-table-summary strong {
    color: var(--emerald);
    font-size: 14px;
    font-weight: 900;
}

.members-table-wrap {
    margin: 0 16px 16px;
    border-color: #dfe8dd;
}

.members-directory-table {
    min-width: 980px;
}

.members-directory-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    color: #31443a;
    background: #eef4ea;
}

.members-directory-table td {
    height: 58px;
}

.member-table-person {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    min-width: 180px;
}

.member-avatar.small {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 13px;
}

.member-table-person strong,
.member-table-person small {
    display: block;
    min-width: 0;
}

.member-table-person strong {
    color: #071f16;
    font-weight: 900;
}

.member-table-person small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
    overflow-wrap: anywhere;
}

.member-table-ownership {
    display: grid;
    gap: 5px;
    min-width: 120px;
}

.member-table-ownership strong {
    color: var(--emerald);
    font-size: 11px;
}

.member-table-ownership .bar-track {
    height: 7px;
    background: #e5ece2;
}

.member-table-ownership .bar-fill {
    background: linear-gradient(90deg, #045036, #c19733);
}

@media (max-width: 720px) {
    .members-directory-hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 14px;
    }

    .members-directory-hero h2 {
        font-size: 24px;
    }

    .members-hero-actions,
    .members-table-summary {
        justify-content: stretch;
    }

    .members-hero-actions .btn,
    .members-tab {
        flex: 1 1 auto;
    }

    .members-table-panel .section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .members-table-wrap {
        margin: 0 10px 12px;
    }
}

/* Market-style dashboard boards */
.dashboard-page .market-board {
    display: grid;
    grid-template-columns: minmax(520px, 1.45fr) minmax(340px, .85fr);
    gap: 16px;
    align-items: start;
    direction: rtl;
}

.dashboard-page .market-board .nav-card {
    grid-column: 1;
    order: 1;
}

.dashboard-page .market-board .allocation-card {
    grid-column: 2;
    order: 2;
}

.dashboard-page .market-panel {
    position: relative;
    isolation: isolate;
    min-width: 0;
    min-height: 0;
    padding: 18px;
    color: #edf8f1;
    background:
        linear-gradient(135deg, rgba(7, 19, 15, .98), rgba(5, 49, 35, .97) 58%, rgba(8, 17, 14, .99)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 24px);
    border: 1px solid rgba(244, 197, 66, .24);
    border-radius: 8px;
    box-shadow: 0 22px 48px rgba(3, 28, 19, .18);
    overflow: hidden;
}

.dashboard-page .market-board .nav-card {
    min-height: 420px;
}

.dashboard-page .market-board .allocation-card {
    align-self: start;
    padding: 16px;
}

.dashboard-page .market-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(32, 183, 230, .08) 1px, transparent 1px),
        linear-gradient(180deg, rgba(244, 197, 66, .09) 1px, transparent 1px);
    background-size: 56px 56px;
    opacity: .42;
}

.dashboard-page .market-panel::after {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    z-index: 1;
    width: 4px;
    background: linear-gradient(180deg, #20b7e6, #f4c542 52%, #22d18f);
}

.dashboard-page .market-panel > * {
    position: relative;
    z-index: 2;
}

.dashboard-page .market-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.dashboard-page .market-title-block {
    min-width: 0;
}

.dashboard-page .market-kicker {
    display: block;
    margin-bottom: 4px;
    color: #20b7e6;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0;
}

.dashboard-page .market-title-block h2 {
    margin: 0;
    color: #fff8df;
    font-size: 24px;
    line-height: 1.25;
}

.dashboard-page .market-title-block p {
    margin: 5px 0 0;
    color: rgba(237, 248, 241, .66);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.6;
}

.dashboard-page .market-panel-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
    min-width: 0;
}

.dashboard-page .market-action,
.dashboard-page .market-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 11px;
    color: #08130f;
    background: #f4c542;
    border: 1px solid rgba(244, 197, 66, .34);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

.dashboard-page .market-action.ghost {
    color: #e7f7ef;
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .16);
}

.dashboard-page .market-status {
    gap: 7px;
    color: #d8fff1;
    background: rgba(34, 209, 143, .10);
    border-color: rgba(34, 209, 143, .24);
}

.dashboard-page .market-status i {
    width: 8px;
    height: 8px;
    background: #22d18f;
    border-radius: 999px;
    box-shadow: 0 0 0 5px rgba(34, 209, 143, .10), 0 0 16px rgba(34, 209, 143, .82);
    animation: market-pulse 1.5s ease-in-out infinite;
}

.dashboard-page .allocation-focus {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
    align-items: center;
    min-height: 54px;
    margin-bottom: 10px;
    padding: 9px 11px;
    color: #fffaf0;
    background: rgba(255, 255, 255, .055);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    box-shadow: inset 4px 0 0 var(--active-asset-color);
}

.dashboard-page .allocation-focus-label {
    min-width: 0;
    color: #ffffff;
    font-size: 15px;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-page .allocation-focus strong,
.dashboard-page .allocation-focus bdi {
    direction: ltr;
    color: #f4c542;
    font-weight: 900;
    white-space: nowrap;
}

.dashboard-page .allocation-focus bdi {
    grid-column: 1 / -1;
    justify-self: start;
    min-height: 22px;
    padding: 2px 8px;
    color: #07130f;
    background: #f4c542;
    border-radius: 999px;
    font-size: 11px;
}

.dashboard-page .allocation-depth-list {
    display: grid;
    gap: 7px;
}

.dashboard-page .allocation-depth-row {
    display: grid;
    grid-template-columns: 30px minmax(82px, .75fr) minmax(104px, 1fr) minmax(92px, .72fr) 62px;
    gap: 8px;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 7px 9px;
    color: #eaf8f0;
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 8px;
    cursor: pointer;
    text-align: right;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.dashboard-page .allocation-depth-row:hover,
.dashboard-page .allocation-depth-row:focus-visible,
.dashboard-page .allocation-depth-row.is-active {
    background: rgba(255, 255, 255, .085);
    border-color: var(--asset-color);
    outline: none;
    transform: translateY(-1px);
}

.dashboard-page .depth-rank {
    direction: ltr;
    color: rgba(237, 248, 241, .54);
    font-size: 11px;
    font-weight: 900;
}

.dashboard-page .depth-name {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.dashboard-page .depth-name strong {
    min-width: 0;
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-page .depth-name small {
    color: rgba(237, 248, 241, .58);
    font-size: 10px;
    font-weight: 800;
}

.dashboard-page .depth-bar {
    display: block;
    height: 7px;
    background: rgba(255, 255, 255, .10);
    border-radius: 999px;
    overflow: hidden;
}

.dashboard-page .depth-bar i {
    display: block;
    width: var(--asset-percent);
    height: 100%;
    background: var(--asset-color);
    border-radius: inherit;
    box-shadow: 0 0 16px var(--asset-color);
}

.dashboard-page .depth-value,
.dashboard-page .depth-percent {
    direction: ltr;
    color: rgba(237, 248, 241, .80);
    font-size: 10.5px;
    font-weight: 900;
    text-align: left;
    white-space: nowrap;
}

.dashboard-page .depth-percent {
    color: #f4c542;
}

.dashboard-page .market-kpi-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.dashboard-page .market-kpi-strip span {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 9px 10px;
    background: rgba(255, 255, 255, .055);
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 8px;
}

.dashboard-page .market-kpi-strip small {
    color: rgba(237, 248, 241, .58);
    font-size: 10px;
    font-weight: 900;
}

.dashboard-page .market-kpi-strip strong {
    direction: ltr;
    color: #fff8df;
    font-size: 15px;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-page .market-kpi-strip .tone-up strong,
.dashboard-page .market-tick.tone-up strong {
    color: #33e2a3;
}

.dashboard-page .market-kpi-strip .tone-down strong,
.dashboard-page .market-tick.tone-down strong {
    color: #ff7d7d;
}

.dashboard-page .market-chart-shell {
    position: relative;
    height: 286px;
    min-height: 286px;
    background:
        linear-gradient(180deg, rgba(1, 8, 6, .42), rgba(255, 255, 255, .035)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 28px);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    overflow: hidden;
}

.dashboard-page .market-svg {
    display: block;
    width: 100%;
    height: 100%;
}

.dashboard-page .market-grid-line {
    stroke: rgba(237, 248, 241, .16);
    stroke-width: 1;
    stroke-dasharray: 5 8;
}

.dashboard-page .market-grid-line.vertical {
    stroke: rgba(32, 183, 230, .13);
}

.dashboard-page .market-axis-label,
.dashboard-page .market-x-label {
    direction: ltr;
    fill: rgba(237, 248, 241, .62);
    font-size: 11px;
    font-weight: 900;
    pointer-events: none;
    user-select: none;
}

.dashboard-page .market-x-label {
    fill: rgba(237, 248, 241, .70);
}

.dashboard-page .market-area {
    fill: url(#marketNavAreaFill);
}

.dashboard-page .market-line {
    fill: none;
    stroke: url(#marketNavStroke);
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 10px rgba(244, 197, 66, .24));
}

.dashboard-page .market-crosshair {
    opacity: 0;
    stroke: rgba(244, 197, 66, .78);
    stroke-width: 1;
    stroke-dasharray: 4 6;
    pointer-events: none;
    transition: opacity .12s ease;
}

.dashboard-page .market-crosshair-y {
    stroke: rgba(32, 183, 230, .55);
}

.dashboard-page .market-chart-shell.is-reading .market-crosshair {
    opacity: 1;
}

.dashboard-page .market-chart-shell.is-pinned .market-crosshair {
    stroke-dasharray: 0;
}

.dashboard-page .market-point {
    cursor: pointer;
    outline: none;
}

.dashboard-page .market-point-ring,
.dashboard-page .market-point-core {
    transform-box: fill-box;
    transform-origin: center;
    transition: transform .16s ease, stroke .16s ease, fill .16s ease, opacity .16s ease;
}

.dashboard-page .market-point-ring {
    fill: #07130f;
    stroke: #f4c542;
    stroke-width: 3;
    filter: drop-shadow(0 0 8px rgba(244, 197, 66, .30));
}

.dashboard-page .market-point-core {
    fill: #ffffff;
    stroke: #07130f;
    stroke-width: 1.4;
}

.dashboard-page .market-point.is-active .market-point-ring,
.dashboard-page .market-point.is-pinned .market-point-ring,
.dashboard-page .market-point:hover .market-point-ring,
.dashboard-page .market-point:focus-visible .market-point-ring {
    stroke: #20b7e6;
    transform: scale(1.22);
}

.dashboard-page .market-point.is-active .market-point-core,
.dashboard-page .market-point.is-pinned .market-point-core,
.dashboard-page .market-point:hover .market-point-core,
.dashboard-page .market-point:focus-visible .market-point-core {
    fill: #f4c542;
    transform: scale(1.18);
}

.dashboard-page .market-point:last-child .market-point-ring {
    animation: market-point-pulse 1.7s ease-in-out infinite;
}

.dashboard-page .market-tooltip {
    position: absolute;
    left: var(--market-tooltip-x, 50%);
    top: var(--market-tooltip-y, 40%);
    z-index: 5;
    min-width: 168px;
    padding: 9px 11px;
    color: #fffaf0;
    background: rgba(3, 16, 12, .96);
    border: 1px solid rgba(244, 197, 66, .34);
    border-radius: 8px;
    box-shadow: 0 18px 34px rgba(0, 0, 0, .26);
    pointer-events: none;
    text-align: right;
    transform: translate(-50%, -118%);
}

.dashboard-page .market-chart-shell.is-pinned .market-tooltip {
    border-color: rgba(32, 183, 230, .72);
    box-shadow: 0 18px 34px rgba(0, 0, 0, .26), 0 0 0 1px rgba(32, 183, 230, .18);
}

.dashboard-page .market-tooltip strong,
.dashboard-page .market-tooltip small,
.dashboard-page .market-tooltip em {
    display: block;
    line-height: 1.65;
    font-style: normal;
    white-space: nowrap;
}

.dashboard-page .market-tooltip strong {
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

.dashboard-page .market-tooltip small {
    color: #f4c542;
    font-size: 11px;
    font-weight: 900;
}

.dashboard-page .market-tooltip em {
    color: rgba(237, 248, 241, .74);
    font-size: 10px;
    font-weight: 800;
}

.dashboard-page .market-tape {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-bottom: 2px;
    overflow-x: auto;
}

.dashboard-page .market-tick {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 7px 10px;
    color: rgba(237, 248, 241, .74);
    background: rgba(255, 255, 255, .055);
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    white-space: nowrap;
}

.dashboard-page .market-tick strong {
    direction: ltr;
    color: #fff8df;
}

.dashboard-page .market-empty-action {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px;
    color: #fff8df;
    background: rgba(244, 197, 66, .11);
    border: 1px dashed rgba(244, 197, 66, .42);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
}

.dashboard-page .market-empty-action.nav-note {
    margin-top: 10px;
}

.dashboard-page .dashboard-tables {
    align-items: stretch;
    gap: 14px;
    margin-top: 14px;
}

.dashboard-page .dashboard-tables .panel {
    min-width: 0;
    padding: 14px;
    border-radius: 8px;
    overflow: hidden;
}

.dashboard-page .dashboard-tables .section-head {
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding: 0 0 10px;
    border-bottom: 1px solid #e1eadf;
}

.dashboard-page .dashboard-tables .section-title {
    font-size: 18px;
}

.dashboard-page .dashboard-tables .section-subtitle {
    margin-top: 2px;
    font-size: 11px;
}

.dashboard-page .dashboard-tables .btn {
    min-height: 34px;
    padding: 7px 11px;
    border-radius: 7px;
    font-size: 12px;
    white-space: nowrap;
}

.dashboard-page .dashboard-tables .table-wrap {
    margin: 0;
    border-radius: 8px;
    overflow: hidden;
}

.dashboard-page .dashboard-tables table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.dashboard-page .dashboard-tables th,
.dashboard-page .dashboard-tables td {
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.5;
    white-space: normal;
}

.dashboard-page .dashboard-tables th {
    height: 40px;
    color: #234234;
    background: #eef5eb;
}

.dashboard-page .dashboard-tables td {
    height: 46px;
}

.dashboard-page .dashboard-tables .badge {
    width: 100%;
    max-width: 116px;
    justify-content: center;
}

@keyframes market-pulse {
    0%, 100% { opacity: .7; transform: scale(.86); }
    50% { opacity: 1; transform: scale(1.08); }
}

@keyframes market-point-pulse {
    0%, 100% { opacity: .82; stroke-width: 3; }
    50% { opacity: 1; stroke-width: 4.5; }
}

@media (max-width: 1180px) {
    .dashboard-page .market-board {
        grid-template-columns: 1fr;
    }

    .dashboard-page .market-board .nav-card,
    .dashboard-page .market-board .allocation-card {
        grid-column: 1;
    }
}

@media (max-width: 720px) {
    .dashboard-page .market-panel {
        min-height: auto;
        padding: 13px;
    }

    .dashboard-page .market-panel-head {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-page .market-panel-actions {
        justify-content: stretch;
    }

    .dashboard-page .market-action,
    .dashboard-page .market-status {
        flex: 1 1 auto;
    }

    .dashboard-page .market-kpi-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-page .market-chart-shell {
        height: 238px;
        min-height: 238px;
    }

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

    .dashboard-page .allocation-depth-row {
        grid-template-columns: 28px minmax(0, 1fr) 78px;
    }

    .dashboard-page .depth-value,
    .dashboard-page .depth-percent {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .system-bar-ticker-track,
    .dashboard-page .market-status i,
    .dashboard-page .market-point:last-child .market-point-ring {
        animation: none;
    }
}

.vote-create-panel,
.vote-register-panel,
.vote-result-metrics,
.vote-content-grid {
    margin-top: 14px;
}

.vote-create-panel .section-head,
.vote-register-panel .section-head,
.vote-summary-panel .profile-head,
.vote-ballots-panel .section-head,
.vote-cast-panel .section-head {
    align-items: flex-start;
}

.vote-create-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    list-style: none;
}

.vote-create-summary::-webkit-details-marker {
    display: none;
}

.vote-create-summary-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vote-create-trigger {
    pointer-events: none;
}

.vote-create-panel[open] .vote-create-trigger svg {
    transform: rotate(45deg);
}

.vote-create-body {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.vote-create-panel .muted,
.vote-register-panel .muted,
.vote-description,
.vote-ballots-panel .muted,
.vote-cast-panel .muted {
    margin: 4px 0 0;
}

.vote-title-field {
    grid-column: span 2;
}

.vote-form-actions {
    justify-content: flex-start;
    margin-top: 12px;
}

.table-secondary-text {
    display: block;
    max-width: 360px;
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    white-space: normal;
}

.empty-table-cell {
    padding: 28px 16px !important;
    color: var(--muted);
    text-align: center;
}

.vote-heading-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.vote-report-actions {
    justify-content: flex-start;
}

.vote-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.vote-facts > div {
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid #dfe7e2;
    border-radius: 7px;
    background: #f8fbf8;
}

.vote-facts span,
.vote-facts strong {
    display: block;
}

.vote-facts span {
    color: var(--muted);
    font-size: 10px;
}

.vote-facts strong {
    margin-top: 3px;
    color: var(--ink);
    font-size: 12px;
}

.vote-metric {
    border-top: 3px solid #16805f;
}

.vote-metric.reject {
    border-top-color: #c94435;
}

.vote-metric.abstain {
    border-top-color: #c28f1f;
}

.vote-metric.participation {
    border-top-color: #2a708c;
}

.vote-content-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(310px, .6fr);
    align-items: start;
}

.vote-ballots-panel,
.vote-cast-panel {
    min-width: 0;
}

.badge.vote-choice-approve {
    color: #087052;
    background: #e9f8f2;
    border-color: #bfe9da;
}

.badge.vote-choice-reject {
    color: #b6382d;
    background: #fff0ee;
    border-color: #f0c7c1;
}

.badge.vote-choice-abstain {
    color: #8a6310;
    background: #fff8df;
    border-color: #ecd493;
}

.vote-member-identity {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid #cfe0d5;
    border-right: 3px solid var(--emerald-2);
    border-radius: 7px;
    background: #f4faf6;
}

.vote-member-identity span {
    color: var(--muted);
    font-size: 10px;
}

.vote-member-identity strong {
    color: var(--emerald);
    font-size: 12px;
}

.vote-choice-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin: 0;
    padding: 0;
    border: 0;
}

.vote-choice-group legend {
    width: 100%;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 11px;
}

.vote-choice-option {
    position: relative;
    min-width: 0;
    cursor: pointer;
}

.vote-choice-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.vote-choice-option span {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    border: 1px solid #d7e1da;
    border-radius: 7px;
    background: #fff;
    color: #29483d;
    font-size: 11px;
    font-weight: 800;
    transition: border-color .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}

.vote-choice-option svg,
.vote-state-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.vote-choice-option input:focus-visible + span {
    box-shadow: 0 0 0 3px rgba(4, 80, 54, .12);
}

.vote-choice-option.approve input:checked + span {
    color: #087052;
    background: #e9f8f2;
    border-color: #76caae;
}

.vote-choice-option.reject input:checked + span {
    color: #b6382d;
    background: #fff0ee;
    border-color: #e89f97;
}

.vote-choice-option.abstain input:checked + span {
    color: #8a6310;
    background: #fff8df;
    border-color: #d9b951;
}

.vote-submit-button {
    width: 100%;
    justify-content: center;
    margin-top: 12px;
}

.vote-locked-state,
.vote-unavailable-state {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 14px;
    border: 1px solid #bfe4d5;
    border-radius: 7px;
    background: #edf9f4;
}

.vote-unavailable-state {
    border-color: #e2d9c0;
    background: #fffaf0;
}

.vote-state-icon {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 7px;
    color: #087052;
    background: #fff;
    border: 1px solid currentColor;
}

.vote-unavailable-state .vote-state-icon {
    color: #8a6310;
}

.vote-locked-state strong,
.vote-unavailable-state strong {
    color: var(--ink);
    font-size: 13px;
}

.vote-locked-state p,
.vote-unavailable-state p,
.vote-locked-state small {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 11px;
}

@media (max-width: 960px) {
    .vote-content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .vote-title-field {
        grid-column: 1 / -1;
    }

    .vote-summary-panel .profile-head,
    .vote-create-summary {
        flex-direction: column;
        align-items: stretch;
    }

    .vote-create-summary-actions {
        justify-content: space-between;
    }

    .vote-report-actions .btn {
        flex: 1 1 auto;
        justify-content: center;
    }

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

@media (max-width: 480px) {
    .vote-choice-group {
        grid-template-columns: 1fr;
    }
}

.activity-ledger-panel {
    display: grid;
    gap: 18px;
}

.user-access-panel {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
}

.user-access-table {
    width: 100%;
    min-width: 860px;
    table-layout: fixed;
}

.user-access-table th,
.user-access-table td {
    vertical-align: middle;
    white-space: normal;
}

.user-access-table td strong,
.user-access-table td small {
    display: block;
}

.user-access-table td small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.user-access-table .number {
    font-variant-numeric: tabular-nums;
}

.user-access-table-wrap {
    overflow-x: auto;
}

.activity-toolbar {
    margin-bottom: 0;
}

.activity-control-line {
    grid-template-columns:
        minmax(240px, 1.5fr)
        minmax(170px, .9fr)
        minmax(170px, .9fr)
        minmax(120px, .55fr)
        minmax(110px, .5fr)
        82px
        40px;
}

.activity-control-line .btn {
    width: 40px;
    min-width: 40px;
    padding: 0;
    align-self: stretch;
}

.activity-control-line .btn svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.activity-table-wrap .activity-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.activity-table-wrap {
    overflow-x: hidden;
    border-radius: 8px 8px 0 0;
}

.activity-col-time {
    width: 150px;
}

.activity-col-summary {
    width: auto;
}

.activity-col-member {
    width: 270px;
}

.activity-col-actor {
    width: 150px;
}

.activity-col-status {
    width: 92px;
}

.activity-col-preview {
    width: 64px;
}

.activity-table th,
.activity-table td {
    vertical-align: middle;
    white-space: normal;
    overflow-wrap: anywhere;
}

.activity-time,
.activity-member,
.activity-actor {
    display: flex;
    align-items: center;
    gap: 6px;
}

.activity-time small,
.activity-member small,
.activity-actor small,
.activity-summary small {
    color: var(--muted);
    font-size: 12px;
}

.notification-entity-chip,
.notification-mini-entity {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    align-items: center;
    color: var(--green);
    background: #edf7f1;
    border: 1px solid #d3e7da;
    border-radius: 5px;
    font-size: 11px;
    font-style: normal;
    line-height: 1.4;
}

.notification-entity-chip {
    margin-top: 5px;
    padding: 4px 8px;
}

.notification-mini-entity {
    display: block;
    max-width: 100%;
    margin-top: 2px;
    padding: 0;
    overflow: hidden;
    color: #527064;
    background: transparent;
    border: 0;
    border-radius: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-summary {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
}

.activity-summary > strong,
.activity-member-name,
.activity-actor-name {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-action-icon {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    color: var(--green);
    background: #edf7f1;
    border: 1px solid #d3e7da;
    border-radius: 6px;
}

.activity-action-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.activity-preview-cell {
    text-align: center;
}

.activity-preview-header {
    text-align: center;
}

.activity-preview-header svg {
    width: 17px;
    height: 17px;
    display: block;
    margin-inline: auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.activity-preview-cell .table-icon-action {
    margin-inline: auto;
}

.activity-table-footer {
    margin-top: -18px;
}

.activity-preview-modal-card {
    width: min(700px, calc(100vw - 28px));
    max-width: 700px;
}

.activity-preview-body {
    display: grid;
    gap: 14px;
}

.activity-preview-heading {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 11px;
    align-items: center;
    padding: 13px;
    border: 1px solid #d8e5da;
    border-radius: 8px;
    background: #f6faf7;
}

.activity-preview-heading > div {
    display: grid;
    gap: 4px;
}

.activity-preview-heading strong {
    color: var(--ink);
    font-size: 16px;
}

.activity-preview-heading small {
    color: var(--muted);
    line-height: 1.55;
}

.activity-preview-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: var(--green);
    background: #e8f4ed;
    border: 1px solid #cfe3d6;
    border-radius: 8px;
}

.activity-preview-icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.activity-preview-status {
    min-width: 78px;
    display: inline-grid;
    place-items: center;
    padding: 7px 10px;
    color: #08764f;
    background: #e9f8f1;
    border: 1px solid #c4e8d6;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
}

.activity-preview-status[data-tone="failed"] {
    color: #b3332b;
    background: #fff0ee;
    border-color: #f2c6c1;
}

.activity-preview-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.activity-preview-facts > div {
    display: grid;
    gap: 4px;
    min-height: 66px;
    align-content: center;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.activity-preview-facts > .full {
    grid-column: 1 / -1;
}

.activity-preview-facts dt {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
}

.activity-preview-facts dd {
    margin: 0;
    color: var(--ink);
    font-size: 12px;
    font-weight: 900;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.activity-preview-description {
    padding: 13px;
    border-inline-end: 4px solid var(--gold);
    border-radius: 8px;
    background: #fffaf0;
}

.activity-preview-description h3 {
    margin: 0 0 6px;
    color: var(--emerald);
    font-size: 13px;
}

.activity-preview-description p {
    margin: 0;
    color: var(--ink);
    line-height: 1.8;
    overflow-wrap: anywhere;
}

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

    .activity-table-search {
        grid-column: 1 / -1;
    }

    .activity-control-line .btn {
        width: 100%;
    }
}

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

    .activity-control-line {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .activity-table-search,
    .activity-control-line > .field:nth-child(2),
    .activity-control-line > .field:nth-child(3) {
        grid-column: 1 / -1;
    }

    .activity-control-line .btn {
        width: 100%;
    }

    .activity-table-footer {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .activity-table-footer > span,
    .activity-table-footer > div {
        grid-column: 1;
        justify-self: center;
    }

    .activity-table-wrap {
        overflow: visible;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .activity-table,
    .activity-table tbody {
        display: block;
        width: 100%;
    }

    .activity-table colgroup,
    .activity-table thead {
        display: none;
    }

    .activity-table tbody {
        display: grid;
        gap: 9px;
    }

    .activity-table tbody tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        grid-template-areas:
            "summary summary preview"
            "member member preview"
            "actor date status";
        gap: 8px;
        padding: 11px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #fff;
    }

    .activity-table tbody td {
        display: block;
        width: auto;
        padding: 0;
        border: 0;
    }

    .activity-summary-cell { grid-area: summary; }
    .activity-member-cell { grid-area: member; }
    .activity-actor-cell { grid-area: actor; }
    .activity-date-cell { grid-area: date; }
    .activity-status-cell { grid-area: status; }
    .activity-preview-cell {
        grid-area: preview;
        align-self: center;
    }

    .activity-member-cell,
    .activity-actor-cell,
    .activity-date-cell,
    .activity-status-cell {
        min-width: 0;
    }

    .activity-member-cell::before,
    .activity-actor-cell::before {
        display: block;
        margin-bottom: 2px;
        color: var(--muted);
        font-size: 9px;
        font-weight: 800;
    }

    .activity-member-cell::before {
        content: "العضو";
    }

    .activity-actor-cell::before {
        content: "المنفذ";
    }

    .activity-time {
        gap: 4px;
        font-size: 10px;
    }

    .activity-member-name,
    .activity-actor-name {
        font-size: 11px;
    }

    .activity-action-icon {
        width: 30px;
        height: 30px;
    }

    .activity-summary {
        grid-template-columns: 30px minmax(0, 1fr);
        gap: 7px;
    }

    .activity-summary > strong {
        font-size: 12px;
    }

    .activity-table .badge {
        min-width: 0;
        padding-inline: 8px;
        font-size: 9px;
    }

    .activity-preview-cell .table-icon-action {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .activity-preview-heading {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .activity-preview-icon {
        width: 40px;
        height: 40px;
    }

    .activity-preview-status {
        grid-column: 1 / -1;
        width: 100%;
    }

    .activity-preview-facts {
        grid-template-columns: 1fr;
    }

    .activity-preview-facts > .full {
        grid-column: auto;
    }
}

.pdf-download-progress {
    position: fixed;
    inset: auto 24px 24px auto;
    z-index: 10020;
    width: min(360px, calc(100vw - 32px));
    padding: 14px 16px;
    border: 1px solid #cbded5;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(10, 62, 47, 0.18);
    color: #0c4938;
    direction: rtl;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
}

.pdf-download-progress.is-leaving {
    opacity: 0;
    transform: translateY(8px);
}

.pdf-download-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
}

.pdf-download-progress-head span {
    min-width: 40px;
    color: #a97813;
    font-weight: 800;
    text-align: left;
}

.pdf-download-progress p {
    margin: 7px 0 10px;
    color: #60716b;
    font-size: 12px;
    line-height: 1.55;
}

.pdf-download-progress-track {
    height: 6px;
    overflow: hidden;
    border-radius: 3px;
    background: #edf3f0;
}

.pdf-download-progress-track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #0d7558;
    transition: width 220ms ease;
}

.pdf-download-progress[data-tone="success"] .pdf-download-progress-track span {
    background: #0b8a5f;
}

.pdf-download-progress[data-tone="error"] {
    border-color: #e6b9b9;
}

.pdf-download-progress[data-tone="error"] .pdf-download-progress-track span {
    background: #b83b3b;
}

@media (max-width: 640px) {
    .pdf-download-progress {
        inset: auto 16px 16px;
        width: auto;
    }
}

@media print {
    body { background: #fff; color: #111; }
    .sidebar,
    .topbar,
    .no-print,
    .toolbar,
    form { display: none !important; }
    .app-shell,
    .main { display: block; padding: 0; }
    .panel,
    .card { box-shadow: none; background: #fff; color: #111; }
    .vote-cast-panel { display: none !important; }
    .vote-content-grid { display: block; }
}
