/* Shared workspace skin inspired by the supplied dashboard reference. */
.admin-shell,
.portal-shell {
    --workspace-header-height: 88px;
    --workspace-sidebar-width: 224px;
    --forest: #4e6540;
    --green: #4e6540;
    --ink: #34372f;
    --muted: #77786a;
    --line: #e7e5d9;
    --canvas: #f7f6ef;
    --cream: #faf9f3;
    display: block;
    min-height: 100vh;
    min-width: 0;
    max-width: 100%;
    background: var(--canvas);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.75;
}

:is(.admin-shell, .portal-shell) .reference-header {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    z-index: 80;
    width: 100%;
    height: var(--workspace-header-height);
    min-height: var(--workspace-header-height);
    padding: 12px 24px;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    background: #292b29;
    border: 0;
    box-shadow: 0 2px 9px #2529200a;
    color: #f8f6ed;
}
.reference-brand-area { display: flex; align-items: center; gap: 13px; min-width: 0; max-width: min(360px, 45%); flex-shrink: 1; }
.reference-header .party-brand-copy { display: none; }
.reference-header .party-logo-plate { width: 57px; height: 57px; padding: 5px; border-radius: 7px; border: 1px solid #9b824c66; background: #231f20; }
.reference-portal-heading { min-width: 0; }
.reference-portal-heading strong { display: block; font-size: 22px; font-weight: 600; line-height: 1.5; color: #fffdf5; }
.reference-portal-heading > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 3px; font-size: 10px; color: #c5c1af; }
:is(.admin-shell, .portal-shell) .reference-utility-strip {
    display: flex;
    flex: 1;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    min-width: 0;
    max-width: 840px;
    gap: 13px;
    padding: 7px 12px;
    border: 1px solid #e3e1d2;
    border-radius: 9px;
    background: #f8f7ef;
    color: #555b48;
}
:is(.admin-shell, .portal-shell) .reference-search {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 9px;
    min-width: 0;
    min-height: 37px;
    padding: 7px 10px;
    border: 1px solid #e8e6da;
    border-radius: 6px;
    background: #fffef9;
    color: #7a7b6a;
    font-size: 11px;
}
.reference-search > svg { color: #9b8346; }
.reference-search > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reference-search:hover { border-color: #c9bd97; background: #fff; }
.reference-utility-strip .today-date { display: flex; gap: 6px; align-items: center; font-size: 10px; white-space: nowrap; color: #777b68; }
.reference-utility-strip .today-date > svg { color: #9b8346; }
.reference-utility-strip .notification-trigger { color: #84723d; width: 35px; height: 35px; }
.reference-utility-strip .notification-trigger:hover { background: #efecde; }
:is(.admin-shell, .portal-shell) .reference-account { display: flex; align-items: center; gap: 8px; min-width: 0; color: #535b45; }
:is(.admin-shell, .portal-shell) .reference-account > span { display: block; }
:is(.admin-shell, .portal-shell) .reference-account-avatar {
    display: inline-flex !important;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #dfdcc9;
    border-radius: 50%;
    background: #efedde;
    color: #7a7d5a;
    overflow: hidden;
}
.reference-account-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.reference-account > span:last-child { max-width: 130px; min-width: 0; }
.reference-account strong, .reference-account .staff-name { display: block; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #515943; font-size: 11px; font-weight: 500; }
.reference-account small { display: block; font-size: 9px; color: #81816f; line-height: 1.5; }
.reference-utility-strip > form { margin: 0; display: flex; flex-shrink: 0; }
:is(.admin-shell, .portal-shell) .reference-logout { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 35px; padding: 6px; border: 0; background: transparent; color: #7c7a64; text-decoration: none; font-size: 10px; }
.reference-logout:hover { color: #4e6540; background: #efecde; border-radius: 5px; }
.reference-header .notification-panel { color: var(--ink); z-index: 110; }

.admin-shell > .sidebar,
.portal-shell > .portal-sidebar {
    position: fixed;
    inset-block-start: var(--workspace-header-height);
    inset-block-end: 0;
    inset-inline-start: 0;
    inset-inline-end: auto;
    width: var(--workspace-sidebar-width);
    display: flex;
    flex-direction: column;
    padding: 18px 13px 0;
    z-index: 70;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #faf9f3;
    border: 0;
    border-inline-end: 1px solid #e7e5d8;
    box-shadow: none;
    scrollbar-width: thin;
    scrollbar-color: #d6d2bf transparent;
    transform: none;
}
.reference-sidebar-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 26px; padding: 0 10px 10px; font-size: 11px; font-weight: 500; color: #777c65; }
.admin-shell .administration-nav,
.portal-shell .portal-navigation { display: flex; flex-direction: column; gap: 3px; padding-bottom: 20px; margin: 0; }
.admin-shell .administration-nav .nav-section-label,
.portal-shell .portal-nav-label { margin: 13px 10px 5px; color: #9b947e; font-size: 9px; font-weight: 400; letter-spacing: 0; }
.admin-shell .administration-nav > a,
.portal-shell .portal-navigation > a { display: flex; align-items: center; gap: 10px; min-height: 37px; padding: 7px 10px; border-radius: 6px; color: #707360; font-size: 11px; font-weight: 400; }
.admin-shell .administration-nav > a > svg,
.portal-shell .portal-navigation > a > svg { width: 18px; height: 18px; color: #a28b4c; stroke-width: 1.6; }
.admin-shell .administration-nav > a:hover,
.portal-shell .portal-navigation > a:hover { background: #f0eedf; color: #566143; }
.admin-shell .administration-nav > a.active,
.portal-shell .portal-navigation > a.active { background: #ece7d5; color: #6f5c2d; box-shadow: inset -3px 0 #b49a54; font-weight: 500; }
.admin-shell .administration-sidebar-footer,
.portal-shell .portal-sidebar-bottom { margin-top: auto; border-top: 1px solid #e7e5d8; padding: 15px 10px 19px; }
.admin-shell .administration-sidebar-footer a,
.portal-shell .portal-sidebar-bottom a,
.portal-shell .portal-sidebar-bottom button { display: flex; align-items: center; gap: 9px; font-size: 10px; color: #7c7d68; }
.admin-shell > .admin-main,
.portal-shell > .portal-main-shell { display: flex; flex-direction: column; margin-right: 0; margin-inline-start: var(--workspace-sidebar-width); padding-block-start: var(--workspace-header-height); min-height: 100vh; min-width: 0; width: calc(100% - var(--workspace-sidebar-width)); max-width: calc(100% - var(--workspace-sidebar-width)); }
.admin-shell .dashboard-content,
.portal-shell .member-main { width: 100%; max-width: 1450px; min-width: 0; margin: 0 auto; padding: 24px 26px 32px; flex: 1; }
.admin-shell .demo-banner { min-width: 0; padding: 7px 26px; gap: 12px; background: #eeede3; color: #7a7c69; border-bottom: 1px solid #e6e4d8; font-size: 10px; }
.admin-shell .demo-banner > span { display: flex; align-items: center; gap: 7px; min-width: 0; }
.admin-shell .storage-refresh { color: #73775e; font-size: 10px; white-space: nowrap; }
.admin-shell .storage-warning { padding: 11px 26px; }
.admin-shell .admin-footer,
.portal-shell .member-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 26px; padding: 15px 0; border-top: 1px solid #e7e5d9; color: #8d8b7b; font-size: 10px; }

/* Carry the same card, form and table language through every workspace screen. */
:is(.admin-shell, .portal-shell) .panel { border-color: var(--line); border-radius: 9px; background: #fffefb; box-shadow: 0 2px 6px #3b3c2903; }
:is(.admin-shell, .portal-shell) :is(.page-heading, .party-masthead, .portal-page-heading) { margin-bottom: 20px; gap: 16px; padding-block: 0; }
:is(.admin-shell, .portal-shell) :is(.page-heading, .party-masthead, .portal-page-heading) h1 { margin: 0 0 5px; font-size: 27px; letter-spacing: 0; line-height: 1.6; color: #424936; }
:is(.admin-shell, .portal-shell) :is(.page-heading, .party-masthead, .portal-page-heading) p { color: var(--muted); font-size: 12px; line-height: 1.9; }
:is(.admin-shell, .portal-shell) .eyebrow { font-size: 11px; color: #88763f; }
:is(.admin-shell, .portal-shell) .party-panel { padding: 22px; }
:is(.admin-shell, .portal-shell) .party-panel-title h2 { font-size: 16px; color: #555d46; letter-spacing: 0; }
:is(.admin-shell, .portal-shell) .party-panel-title > a { color: #8c7b45; font-size: 11px; }
:is(.admin-shell, .portal-shell) .button { gap: 8px; min-height: 40px; padding: 8px 17px; border-radius: 6px; font-size: 12px; }
:is(.admin-shell, .portal-shell) .button:hover { transform: none; }
:is(.admin-shell, .portal-shell) .button.dark { background: #4e6540; color: #fff; }
:is(.admin-shell, .portal-shell) .button.dark:hover { background: #3e5532; box-shadow: 0 2px 7px #32432b15; }
:is(.admin-shell, .portal-shell) .button.outline { background: #fffefb; border-color: #dbddcd; color: #677252; }
:is(.admin-shell, .portal-shell) .button.soft { background: #edf0e2; color: #526740; }
:is(.admin-shell, .portal-shell) .button.lime { background: #eee5c9; color: #6f5b2d; }
:is(.admin-shell, .portal-shell) .party-toolbar { gap: 9px; margin-bottom: 18px; min-width: 0; }
:is(.admin-shell, .portal-shell) .field { color: #657053; font-size: 12px; }
:is(.admin-shell, .portal-shell) :is(.field input, .field select, .field textarea, .party-search input, .party-toolbar > select) { border-color: #dedfd2; border-radius: 6px; color: #4c5842; font-size: 12px; background: #fffefb; }
:is(.admin-shell, .portal-shell) :is(.party-table-wrap, .table-wrap) { min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
:is(.admin-shell, .portal-shell) .party-table th { background: #f5f4e9; color: #7a7b64; padding: 12px 16px; font-size: 11px; }
:is(.admin-shell, .portal-shell) .party-table td { padding: 13px 16px; border-color: #eeede3; color: #586149; }
:is(.admin-shell, .portal-shell) .party-table td > strong { font-size: 12px; }
:is(.admin-shell, .portal-shell) .party-table td > small { color: #848574; font-size: 10px; }
:is(.admin-shell, .portal-shell) .party-badge { background: #eef1e5; color: #586e42; font-size: 10px; }
:is(.admin-shell, .portal-shell) .party-badge.warn { background: #f7efd9; color: #896f30; }
:is(.admin-shell, .portal-shell) :is(a, button, summary):focus-visible { outline: 3px solid #b99b48; outline-offset: 3px; }
:is(.admin-shell, .portal-shell) :is(input, select, textarea):focus { outline-color: #8b9b70; }
.reference-header :is(.mobile-menu, .portal-menu-button) { display: none; color: #f4edda; flex-shrink: 0; }
.reference-sidebar-heading :is(.mobile-menu, .portal-menu-button) { display: none; color: #77775e; }
:is(.sidebar, .portal-sidebar).is-open .reference-sidebar-heading :is(.mobile-menu, .portal-menu-button) { display: inline-flex; }
.admin-shell > .sidebar-overlay,
.portal-shell > .portal-menu-overlay { position: fixed; inset: 0; z-index: 90; border: 0; background: #292b2966; }
:is(.admin-shell > .sidebar, .portal-shell > .portal-sidebar).is-open { z-index: 100; }

@media (max-width: 1200px) {
    :is(.admin-shell, .portal-shell) .reference-header { gap: 18px; padding-inline: 20px; }
    .reference-portal-heading strong { font-size: 20px; }
    :is(.admin-shell, .portal-shell) .reference-utility-strip { gap: 9px; }
    .reference-account > span:last-child, .reference-account strong { max-width: 95px; }
}
@media (max-width: 1100px) {
    .reference-utility-strip .today-date { display: none; }
}
@media (max-width: 980px) {
    .admin-shell > .sidebar, .portal-shell > .portal-sidebar { width: min(280px, calc(100vw - 48px)); transform: translateX(100%); visibility: hidden; pointer-events: none; transition: transform .2s ease; z-index: 100; }
    :is(.admin-shell > .sidebar, .portal-shell > .portal-sidebar).is-open { transform: translateX(0); visibility: visible; pointer-events: auto; box-shadow: -12px 0 36px #292b2926; }
    .admin-shell > .admin-main, .portal-shell > .portal-main-shell { margin-inline: 0; width: 100%; max-width: 100%; }
    .reference-header :is(.mobile-menu, .portal-menu-button), .reference-sidebar-heading :is(.mobile-menu, .portal-menu-button) { display: inline-flex; }
    .reference-header :is(.mobile-menu, .portal-menu-button):hover { background: #ffffff12; }
    .reference-brand-area { gap: 10px; }
    :is(.admin-shell, .portal-shell) .reference-account > span:last-child { display: none; }
    :is(.admin-shell, .portal-shell) .reference-account { display: flex; }
    :is(.admin-shell, .portal-shell) .reference-search > span { display: block; }
    .reference-logout > span { display: none; }
    .admin-shell .dashboard-content, .portal-shell .member-main { padding: 22px; }
}
@media (max-width: 600px) {
    .admin-shell, .portal-shell { --workspace-header-height: 120px; }
    :is(.admin-shell, .portal-shell) .reference-header { flex-wrap: wrap; align-content: center; height: 120px; gap: 7px; padding: 8px 15px; }
    .reference-brand-area { width: 100%; max-width: none; gap: 10px; }
    .reference-header .party-logo-plate { width: 39px; height: 39px; border-radius: 5px; padding: 3px; }
    .reference-portal-heading strong { font-size: 17px; }
    .reference-portal-heading > span { font-size: 9px; margin-top: 0; }
    .reference-header :is(.mobile-menu, .portal-menu-button) { width: 34px; height: 36px; }
    :is(.admin-shell, .portal-shell) .reference-utility-strip { width: 100%; max-width: none; padding: 3px 7px; gap: 6px; border-radius: 6px; }
    :is(.admin-shell, .portal-shell) .reference-search { min-height: 32px; padding: 5px 8px; font-size: 10px; }
    :is(.admin-shell, .portal-shell) .reference-account-avatar { flex-basis: 28px; width: 28px; height: 28px; }
    .reference-utility-strip .notification-trigger, :is(.admin-shell, .portal-shell) .reference-logout { width: 32px; min-height: 34px; height: 34px; }
    .admin-shell .dashboard-content, .portal-shell .member-main { padding: 17px 14px 24px; }
    .admin-shell .demo-banner { padding: 7px 14px; font-size: 9px; }
    .admin-shell .demo-banner > span > svg { display: none; }
    .admin-shell .storage-refresh { font-size: 9px; }
    .admin-shell .storage-warning { padding-inline: 14px; }
    .admin-shell .admin-footer, .portal-shell .member-footer { margin-inline: 14px; font-size: 9px; }
    :is(.admin-shell, .portal-shell) :is(.page-heading, .party-masthead, .portal-page-heading) h1 { font-size: 23px; }
    :is(.admin-shell, .portal-shell) .party-panel { padding: 18px 15px; }
    :is(.admin-shell, .portal-shell) .button { min-height: 42px; padding-inline: 13px; }
    .reference-header .notification-panel { position: fixed; inset-block-start: calc(var(--workspace-header-height) + 6px); inset-inline: 12px; width: auto; max-width: none; max-height: calc(100dvh - var(--workspace-header-height) - 18px); }
}
@media (prefers-reduced-motion: reduce) {
    :is(.admin-shell, .portal-shell) *, :is(.admin-shell, .portal-shell) *::before, :is(.admin-shell, .portal-shell) *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
    :is(.admin-shell, .portal-shell) .reference-header,
    .admin-shell > .sidebar, .portal-shell > .portal-sidebar,
    .admin-shell .demo-banner, .admin-shell .admin-footer, .portal-shell .member-footer { display: none !important; }
    .admin-shell > .admin-main, .portal-shell > .portal-main-shell { margin: 0; padding: 0; width: 100%; max-width: 100%; min-height: 0; }
    .admin-shell .dashboard-content, .portal-shell .member-main { padding: 0; max-width: none; }
}
