:root {
    --ink-900: #18201a;
    --ink-700: #35503d;
    --ink-500: #58725e;
    --ink-300: #b8c4bb;
    --stone-50: #f6f2e8;
    --stone-100: #ece3d1;
    --stone-200: #dbc9aa;
    --gold-500: #b77b29;
    --gold-700: #8d5a15;
    --clay-200: #ead8c2;
    --clay-500: #a66a3f;
    --red-500: #b24732;
    --green-500: #2c7a57;
    --blue-500: #356a8a;
    --shadow-lg: 0 24px 60px rgba(24, 32, 26, 0.16);
    --shadow-md: 0 12px 28px rgba(24, 32, 26, 0.1);
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --content-width: 1180px;
    --admin-width: 1420px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink-900);
    font-family: "Segoe UI", "Trebuchet MS", sans-serif;
    background: var(--stone-50);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

button,
input,
select,
textarea {
    min-width: 0;
}

h1,
h2,
h3,
h4,
strong {
    font-family: Georgia, "Times New Roman", serif;
    margin: 0;
}

p {
    margin: 0;
    line-height: 1.65;
}

small {
    color: var(--ink-500);
}

main,
section,
article,
aside,
header,
footer {
    display: block;
}

.public-shell {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
}

.public-background {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(183, 123, 41, 0.18), transparent 30%),
        radial-gradient(circle at bottom right, rgba(53, 106, 138, 0.12), transparent 28%),
        linear-gradient(180deg, #fcf9f1 0%, #f4eddc 100%);
    z-index: -1;
}

.public-header,
.public-main,
.public-footer {
    width: min(var(--content-width), calc(100% - 2rem));
    margin-inline: auto;
}

.admin-layout {
    width: min(var(--admin-width), calc(100% - 2rem));
    margin-inline: auto;
}

.public-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 0;
}

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

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

.brand-lockup strong {
    display: block;
    font-size: 1.1rem;
}

.brand-lockup small {
    display: block;
    max-width: 18rem;
}

.brand-mark {
    width: 3rem;
    height: 3rem;
    border-radius: 18px;
    display: inline-grid;
    place-items: center;
    background: linear-gradient(135deg, var(--ink-700), var(--gold-500));
    color: white;
    font-weight: 700;
    letter-spacing: 0.06em;
    box-shadow: var(--shadow-md);
}

.public-nav,
.button-row,
.admin-topbar,
.section-head,
.stat-line,
.sidebar-user {
    display: flex;
    align-items: center;
}

.public-nav {
    gap: 1rem;
    flex-wrap: wrap;
}

.button-row {
    gap: 0.85rem;
    flex-wrap: wrap;
}

.inline-action {
    display: inline-flex;
    margin: 0;
}

.public-nav a {
    padding: 0.65rem 0.85rem;
    border-radius: 999px;
    color: var(--ink-700);
}

.public-nav a.active,
.public-nav a:hover {
    background: rgba(24, 32, 26, 0.08);
    color: var(--ink-900);
}

.nav-cta,
.button {
    background: linear-gradient(135deg, var(--ink-700), var(--green-500));
    color: white;
    border: 0;
    border-radius: 999px;
    padding: 0.9rem 1.25rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    font-weight: 600;
}

.button-sm {
    padding: 0.58rem 0.92rem;
    font-size: 0.84rem;
}

.button.ghost,
.nav-cta.ghost {
    background: transparent;
    color: var(--ink-900);
    border: 1px solid rgba(24, 32, 26, 0.14);
    box-shadow: none;
}

.flash-band {
    width: min(var(--content-width), calc(100% - 2rem));
    margin: 0 auto 1rem;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-sm);
}

.flash-success {
    background: rgba(44, 122, 87, 0.12);
    color: var(--green-500);
}

.flash-error {
    background: rgba(178, 71, 50, 0.12);
    color: var(--red-500);
}

.flash-stack {
    display: grid;
    gap: 0.75rem;
}

.flash-card {
    position: relative;
    display: grid;
    gap: 0.8rem;
    padding: 1rem 1.1rem;
    border-radius: 20px;
    border: 1px solid rgba(24, 32, 26, 0.08);
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.84);
}

.flash-card--success {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(232, 246, 239, 0.94) 100%);
    border-color: rgba(44, 122, 87, 0.18);
}

.flash-card--error {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(252, 238, 235, 0.96) 100%);
    border-color: rgba(178, 71, 50, 0.18);
}

.flash-card-head,
.flash-actions {
    display: flex;
    align-items: center;
}

.flash-card-head {
    gap: 0.75rem;
    padding-right: 3.5rem;
}

.flash-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: rgba(24, 32, 26, 0.08);
    color: var(--ink-700);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.flash-list {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--ink-700);
}

.flash-list li + li {
    margin-top: 0.45rem;
}

.flash-actions {
    gap: 0.7rem;
    flex-wrap: wrap;
}

.flash-dismiss {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    border: 0;
    border-radius: 999px;
    padding: 0.45rem 0.7rem;
    background: rgba(24, 32, 26, 0.08);
    color: var(--ink-700);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.public-main {
    display: grid;
    gap: 1.5rem;
    padding: 1rem 0 4rem;
}

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

.hero-copy,
.hero-panel,
.panel,
.metric-card,
.media-card,
.auth-card {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(24, 32, 26, 0.08);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.hero-copy {
    padding: clamp(1.8rem, 3vw, 3rem);
    position: relative;
    overflow: hidden;
}

.hero-copy::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    right: -70px;
    bottom: -70px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(183, 123, 41, 0.22), transparent 70%);
}

.hero-copy h1,
.page-hero h1,
.auth-card h1 {
    font-size: clamp(2.2rem, 4vw, 4.2rem);
    line-height: 1.04;
}

.hero-panel,
.panel,
.auth-card,
.metric-card,
.media-card {
    padding: 1.5rem;
}

.lead {
    font-size: 1.12rem;
    color: var(--ink-700);
}

.eyebrow {
    color: var(--gold-700);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    font-weight: 700;
}

.meta-block,
.stack-xs,
.stack-sm,
.stack-md,
.stack-lg,
.list-card,
.alert-card {
    display: grid;
    gap: 0.65rem;
}

.stack-sm > * + *,
.stack-md > * + *,
.stack-lg > * + * {
    margin-top: 0.2rem;
}

.three-up,
.card-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-band,
.page-hero {
    padding: 1.4rem 0 0.6rem;
}

.stat-line {
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(24, 32, 26, 0.08);
}

.stat-line:last-child {
    border-bottom: 0;
}

.stat-line strong,
.metric-card strong,
.stat-card strong {
    font-size: 1.8rem;
}

.section-head {
    justify-content: space-between;
    gap: 1rem;
}

.faq-item {
    padding: 1rem 1.1rem;
    border-radius: var(--radius-sm);
    background: rgba(236, 227, 209, 0.45);
}

.faq-item summary {
    cursor: pointer;
    font-weight: 700;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.public-footer {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0 0 2.5rem;
}

.admin-shell {
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(183, 123, 41, 0.11), transparent 20%),
        radial-gradient(circle at bottom left, rgba(53, 106, 138, 0.08), transparent 28%),
        linear-gradient(180deg, #f8f4eb 0%, #edf3ec 100%);
}

.admin-layout {
    display: grid;
    grid-template-columns: clamp(224px, 18vw, 264px) minmax(0, 1fr);
    gap: 0.9rem;
    height: 100vh;
    padding: 0.75rem 0;
    align-items: stretch;
}

.admin-rail {
    position: sticky;
    top: 0.75rem;
    display: grid;
    grid-template-rows: auto auto auto auto minmax(0, 1fr);
    gap: 0.55rem;
    align-self: start;
    height: calc(100vh - 1.5rem);
    min-height: 0;
    padding: 0.82rem;
    border-radius: 24px;
    color: white;
    background:
        linear-gradient(180deg, rgba(32, 49, 38, 0.98) 0%, rgba(20, 30, 24, 0.98) 100%);
    box-shadow: var(--shadow-lg);
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.admin-rail::-webkit-scrollbar {
    width: 8px;
}

.admin-rail::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
}

.admin-rail::-webkit-scrollbar-track {
    background: transparent;
}

.admin-rail .brand-lockup strong,
.admin-rail .brand-lockup small,
.admin-rail .eyebrow,
.admin-rail p,
.admin-rail small {
    color: rgba(255, 255, 255, 0.82);
}

.admin-rail .brand-lockup strong,
.admin-rail h2,
.admin-rail-user strong {
    color: white;
}

.admin-rail .brand-lockup {
    gap: 0.75rem;
}

.admin-rail .brand-mark {
    width: 2.55rem;
    height: 2.55rem;
    border-radius: 16px;
    font-size: 0.9rem;
}

.admin-rail .brand-lockup strong {
    font-size: 0.96rem;
    line-height: 1.18;
}

.admin-rail .brand-lockup small {
    max-width: none;
    font-size: 0.74rem;
    line-height: 1.3;
}

.admin-rail-user,
.admin-rail-section {
    display: grid;
    gap: 0.35rem;
    padding: 0.68rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
}

.admin-rail-user {
    grid-template-columns: auto 1fr;
    align-items: center;
}

.admin-rail-user strong {
    font-size: 0.9rem;
    line-height: 1.2;
}

.admin-rail-user small,
.admin-rail-section p {
    font-size: 0.75rem;
    line-height: 1.32;
}

.admin-rail-section h2 {
    font-size: 0.92rem;
    line-height: 1.18;
}

.admin-signout {
    width: 100%;
    justify-content: center;
    padding: 0.72rem 0.95rem;
    font-size: 0.9rem;
}

.avatar {
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
    background: linear-gradient(135deg, var(--gold-500), var(--clay-500));
    color: white;
    font-weight: 700;
    font-size: 0.96rem;
}

.admin-sidebar-nav {
    display: grid;
    gap: 0.4rem;
    align-content: start;
}

.admin-sidebar-nav a {
    display: grid;
    gap: 0.15rem;
    padding: 0.6rem 0.68rem;
    border-radius: 13px;
    color: rgba(255, 255, 255, 0.82);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid transparent;
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.admin-sidebar-nav a span {
    color: white;
    font-weight: 700;
    font-family: "Segoe UI", "Trebuchet MS", sans-serif;
    font-size: 0.85rem;
    line-height: 1.2;
}

.admin-sidebar-nav a small {
    color: rgba(255, 255, 255, 0.62);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.55rem;
    line-height: 1.2;
}

.admin-sidebar-nav a:hover,
.admin-sidebar-nav a.active {
    transform: translateX(3px);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.16);
}

.admin-stage {
    display: grid;
    gap: 0.85rem;
    height: calc(100vh - 1.5rem);
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    align-content: start;
    padding-right: 0.2rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(24, 32, 26, 0.28) transparent;
}

.admin-stage::-webkit-scrollbar {
    width: 10px;
}

.admin-stage::-webkit-scrollbar-thumb {
    background: rgba(24, 32, 26, 0.18);
    border-radius: 999px;
}

.admin-stage::-webkit-scrollbar-track {
    background: transparent;
}

.admin-header {
    display: grid;
    gap: 0.85rem;
}

.admin-menu-bar,
.admin-pagehead {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(24, 32, 26, 0.08);
    box-shadow: var(--shadow-md);
}

.admin-menu-bar {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.65rem;
    border-radius: 18px;
    position: sticky;
    top: 0.75rem;
    z-index: 5;
}

.admin-menu-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    color: var(--ink-700);
    font-weight: 700;
    transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.admin-menu-link:hover,
.admin-menu-link.active {
    background: linear-gradient(135deg, rgba(44, 122, 87, 0.16), rgba(183, 123, 41, 0.14));
    color: var(--ink-900);
    transform: translateY(-1px);
}

.admin-pagehead,
.admin-breadcrumbs {
    display: flex;
    align-items: center;
}

.admin-pagehead {
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.15rem 1.25rem;
    border-radius: 24px;
}

.page-intro {
    max-width: 56rem;
    color: var(--ink-700);
}

.admin-breadcrumbs {
    gap: 0.55rem;
    flex-wrap: wrap;
    color: var(--ink-500);
    font-size: 0.92rem;
}

.admin-breadcrumbs a {
    color: var(--ink-700);
    font-weight: 600;
}

.admin-date-chip {
    min-width: 172px;
    display: grid;
    gap: 0.2rem;
    padding: 0.85rem 0.95rem;
    border-radius: 18px;
    background: linear-gradient(180deg, #f9f4ea 0%, #f0f5ef 100%);
    border: 1px solid rgba(24, 32, 26, 0.08);
    text-align: right;
}

.admin-date-chip span {
    color: var(--ink-500);
    font-size: 0.86rem;
}

.admin-main {
    display: grid;
    gap: 1.2rem;
}

.admin-stage,
.admin-main,
.content-grid > *,
.grid-two > * {
    min-width: 0;
}

.page-banner,
.table-card,
.info-card,
.stats-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(24, 32, 26, 0.08);
    border-radius: 28px;
    box-shadow: var(--shadow-lg);
}

.page-banner {
    padding: 1.25rem;
    display: grid;
    gap: 1rem;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(183, 123, 41, 0.12), transparent 32%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(247, 243, 233, 0.9) 100%);
}

.page-banner-head,
.page-banner-actions,
.summary-strip,
.report-grid,
.content-grid,
.info-list {
    display: grid;
}

.page-banner-head {
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
}

.page-banner-actions {
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(160px, max-content));
    justify-content: start;
}

.profile-hero {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: center;
}

.profile-avatar {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 1.4rem;
    background: linear-gradient(135deg, var(--gold-500), var(--gold-700));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.summary-strip {
    gap: 0.8rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.summary-strip--compact {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.summary-tile {
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(24, 32, 26, 0.08);
    display: grid;
    gap: 0.25rem;
}

.summary-tile strong {
    font-size: 1.45rem;
}

.summary-tile span {
    color: var(--ink-500);
    font-size: 0.92rem;
}

.content-grid {
    gap: 1.2rem;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
}

.table-card,
.info-card,
.stats-card {
    padding: 1.2rem;
    border-radius: 24px;
}

.table-card .table-wrap {
    margin-top: 0.4rem;
}

.info-list {
    gap: 0.75rem;
}

.info-list .list-card,
.source-list .list-card {
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(236, 227, 209, 0.38);
}

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

.report-area-card {
    display: grid;
    gap: 0.85rem;
    align-content: space-between;
}

.report-area-card .button,
.report-area-card .tag {
    width: fit-content;
}

.report-priority-list {
    display: grid;
    gap: 0.75rem;
}

.report-priority-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.85rem;
    align-items: center;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(24, 32, 26, 0.08);
}

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

.report-priority-row p {
    margin: 0.2rem 0 0;
    color: var(--ink-500);
    font-size: 0.9rem;
    line-height: 1.4;
}

.panel-muted {
    padding: 1rem;
    border-radius: 18px;
    background: rgba(236, 227, 209, 0.42);
    border: 1px solid rgba(24, 32, 26, 0.06);
}

.status-pill.active {
    color: var(--green-500);
    background: rgba(44, 122, 87, 0.12);
}

.status-pill.inactive {
    color: var(--ink-500);
    background: rgba(24, 32, 26, 0.08);
}

.status-pill.draft {
    color: var(--ink-500);
    background: rgba(24, 32, 26, 0.08);
}

.status-pill.warning,
.status-pill.needs-attention {
    color: var(--gold-700);
    background: rgba(183, 123, 41, 0.14);
}

.status-pill.critical {
    color: var(--red-500);
    background: rgba(178, 71, 50, 0.14);
}

.status-pill.info,
.status-pill.review-queue {
    color: var(--blue-500);
    background: rgba(53, 106, 138, 0.14);
}

.status-pill.success,
.status-pill.stable,
.status-pill.pass,
.status-pill.increase {
    color: var(--green-500);
    background: rgba(44, 122, 87, 0.12);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.status-pill.reviewed {
    color: var(--blue-500);
    background: rgba(53, 106, 138, 0.12);
}

.status-pill.submitted {
    color: var(--gold-700);
    background: rgba(183, 123, 41, 0.12);
}

.status-pill.approved {
    color: var(--green-500);
    background: rgba(44, 122, 87, 0.12);
}

.status-pill.confirmed {
    color: var(--green-500);
    background: rgba(44, 122, 87, 0.12);
}

.status-pill.accepted {
    color: var(--green-500);
    background: rgba(44, 122, 87, 0.12);
}

.status-pill.unconfirmed {
    color: var(--gold-700);
    background: rgba(183, 123, 41, 0.14);
}

.status-pill.open,
.status-pill.pending,
.status-pill.high,
.status-pill.egg_setting,
.status-pill.overdue {
    color: var(--gold-700);
    background: rgba(183, 123, 41, 0.14);
}

.status-pill.monitoring,
.status-pill.in-progress,
.status-pill.syncing,
.status-pill.medium,
.status-pill.transfer,
.status-pill.adjustment,
.status-pill.neutral,
.status-pill.candling,
.status-pill.review,
.status-pill.due-today,
.status-pill.due-soon {
    color: var(--blue-500);
    background: rgba(53, 106, 138, 0.14);
}

.status-pill.resolved,
.status-pill.completed,
.status-pill.low,
.status-pill.inbound,
.status-pill.hatching,
.status-pill.upcoming,
.status-pill.unscheduled {
    color: var(--green-500);
    background: rgba(44, 122, 87, 0.12);
}

.status-pill.blocked,
.status-pill.allocation,
.status-pill.outbound,
.status-pill.fail,
.status-pill.rejected,
.status-pill.conflict,
.status-pill.decrease {
    color: var(--red-500);
    background: rgba(178, 71, 50, 0.14);
}

.status-pill.voided {
    color: var(--gold-700);
    background: rgba(183, 123, 41, 0.14);
}

.status-pill.deleted {
    color: var(--red-500);
    background: rgba(178, 71, 50, 0.14);
}

.status-pill.fresh {
    color: var(--blue-500);
    background: rgba(53, 106, 138, 0.12);
}

.metric-card {
    display: grid;
    gap: 0.45rem;
    min-height: 150px;
}

.metric-card small,
.metric-card span {
    color: var(--ink-500);
}

.alert-card {
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(24, 32, 26, 0.08);
}

.alert-warning {
    background: rgba(183, 123, 41, 0.1);
}

.alert-info,
.intelligence-info {
    background: rgba(53, 106, 138, 0.1);
}

.alert-success,
.intelligence-success {
    background: rgba(44, 122, 87, 0.1);
}

.intelligence-warning {
    background: rgba(183, 123, 41, 0.12);
}

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 0.25rem;
}

.queue-bulk-toolbar,
.queue-selection-panel,
.table-select-toggle {
    display: flex;
    align-items: center;
}

.queue-bulk-toolbar {
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.queue-selection-count {
    color: var(--ink-500);
    font-size: 0.92rem;
    font-weight: 600;
}

.queue-selection-panel {
    justify-content: space-between;
    gap: 0.8rem;
}

.table-select-toggle {
    gap: 0.55rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-500);
}

.table-select-note {
    color: var(--ink-500);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

tr.queue-row-selected td {
    background: rgba(183, 123, 41, 0.06);
}

.admin-main .table-wrap {
    border-radius: 18px;
}

.admin-main .table-wrap table {
    min-width: 700px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 0.9rem;
    text-align: left;
    border-bottom: 1px solid rgba(24, 32, 26, 0.08);
    vertical-align: top;
}

th {
    color: var(--ink-500);
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

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

.field {
    display: grid;
    gap: 0.45rem;
}

.field span {
    font-size: 0.9rem;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid rgba(24, 32, 26, 0.14);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    background: white;
    color: var(--ink-900);
    font: inherit;
}

input[type="radio"],
input[type="checkbox"] {
    width: auto;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

textarea {
    resize: vertical;
}

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

.checkbox-grid label {
    padding: 0.75rem 0.85rem;
    border-radius: 14px;
    background: rgba(236, 227, 209, 0.45);
}

.checklist-panel,
.subdued,
.map-placeholder,
.media-placeholder {
    padding: 1rem;
    border-radius: var(--radius-md);
    background: rgba(236, 227, 209, 0.45);
}

.map-placeholder,
.media-placeholder {
    min-height: 180px;
    display: grid;
    place-items: center;
    color: var(--ink-500);
    border: 1px dashed rgba(24, 32, 26, 0.16);
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(53, 106, 138, 0.12);
    color: var(--blue-500);
    font-size: 0.82rem;
}

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

.stat-card,
.intelligence-card {
    min-height: 180px;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: #ffffff;
    padding: clamp(1rem, 4vw, 2rem);
}

.auth-card-wrap {
    width: min(430px, 100%);
}

.auth-card {
    position: relative;
    overflow: hidden;
    padding: clamp(1.35rem, 5vw, 2rem);
    border-radius: 24px;
    border: 1px solid rgba(0, 80, 31, 0.14);
    background:
        linear-gradient(#ffffff, #ffffff) padding-box,
        linear-gradient(145deg, rgba(0, 80, 31, 0.42), rgba(183, 123, 41, 0.28), rgba(44, 122, 87, 0.2)) border-box;
    box-shadow: 0 24px 70px rgba(17, 31, 19, 0.12);
}

.auth-card::before,
.auth-card::after {
    content: "";
    position: absolute;
    pointer-events: none;
    border-radius: 999px;
}

.auth-card::before {
    width: 160px;
    height: 160px;
    top: -90px;
    right: -70px;
    background: rgba(183, 123, 41, 0.12);
}

.auth-card::after {
    width: 130px;
    height: 130px;
    bottom: -82px;
    left: -72px;
    background: rgba(0, 80, 31, 0.09);
}

.signin-panel {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1.35rem;
}

.signin-header {
    display: grid;
    justify-items: center;
    gap: 0.7rem;
    text-align: center;
}

.signin-mark {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 999px;
    background: linear-gradient(145deg, #00501f, #2c7a57);
    color: #ffffff;
    font-weight: 900;
    letter-spacing: 0.04em;
    box-shadow: 0 14px 28px rgba(0, 80, 31, 0.2);
}

.signin-header h1 {
    color: #111714;
    font-family: "Segoe UI", "Trebuchet MS", sans-serif;
    font-size: clamp(2rem, 8vw, 2.75rem);
    line-height: 1.05;
    letter-spacing: 0;
}

.signin-header p {
    max-width: 21rem;
    color: #55615a;
    font-size: 0.98rem;
    line-height: 1.5;
}

.signin-form {
    display: grid;
    gap: 0.95rem;
}

.signin-field {
    display: grid;
    gap: 0.42rem;
}

.signin-label {
    color: #152119;
    font-size: 0.86rem;
    font-weight: 800;
}

.signin-input-shell {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center;
    gap: 0.72rem;
    min-height: 52px;
    padding: 0 0.95rem;
    border: 1px solid #dce5d8;
    border-radius: 14px;
    background: #fbfdf9;
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.signin-input-shell:focus-within {
    border-color: #00501f;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 80, 31, 0.12);
}

.signin-input-icon {
    width: 18px;
    height: 18px;
    fill: #607067;
}

.signin-input-shell input {
    width: 100%;
    min-height: 50px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    outline: none;
    color: #111714;
    font-size: 1rem;
}

.signin-input-shell input::placeholder {
    color: #8a968f;
}

.signin-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    color: #55615a;
    font-size: 0.82rem;
    line-height: 1.35;
}

.signin-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 52px;
    width: 100%;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #00501f, #2c7a57);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 850;
    box-shadow: 0 16px 28px rgba(0, 80, 31, 0.22);
}

.signin-submit:hover,
.signin-submit:focus-visible {
    background: linear-gradient(135deg, #003f17, #236b4c);
}

.signin-submit-icon {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.signin-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.75rem;
    color: #7a8a82;
    font-size: 0.82rem;
}

.signin-divider::before,
.signin-divider::after {
    content: "";
    height: 1px;
    background: #e6ece3;
}

.signin-support {
    display: grid;
    gap: 0.2rem;
    min-height: 52px;
    padding: 0.85rem 1rem;
    border: 1px solid #e2e8df;
    border-radius: 14px;
    background: #f8fbf6;
    text-align: center;
}

.signin-support strong {
    color: #0b3e1a;
    font-family: "Segoe UI", "Trebuchet MS", sans-serif;
    font-size: 0.94rem;
}

.signin-support span {
    color: #55615a;
    font-size: 0.86rem;
    line-height: 1.4;
}

.field-actions {
    align-self: end;
}

.action-stack {
    display: grid;
    gap: 0.55rem;
    min-width: 180px;
}

.inline-action-form {
    display: block;
}

.muted-note {
    color: var(--ink-500);
    font-size: 0.82rem;
    line-height: 1.45;
}

.permission-module-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.permission-module-card {
    align-content: start;
}

.permission-rule {
    display: grid;
    gap: 0.75rem;
    padding: 0.9rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(24, 32, 26, 0.08);
}

.permission-rule-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 0.75rem;
}

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

.permission-choice {
    display: grid;
    gap: 0.35rem;
    padding: 0.78rem 0.82rem;
    border-radius: 14px;
    background: rgba(236, 227, 209, 0.38);
    border: 1px solid transparent;
}

.permission-choice:has(input:checked) {
    border-color: rgba(44, 122, 87, 0.28);
    background: rgba(232, 246, 239, 0.76);
}

.permission-choice input {
    margin: 0;
    accent-color: var(--green-500);
}

.permission-choice span {
    font-weight: 700;
}

.permission-choice small {
    color: var(--ink-500);
    line-height: 1.4;
}

.permission-table-group {
    gap: 0.8rem;
}

.permission-matrix th,
.permission-matrix td {
    vertical-align: middle;
}

.permission-label-cell {
    min-width: 260px;
}

.permission-label-cell strong,
.permission-label-cell small {
    display: block;
}

.permission-label-cell small {
    margin-top: 0.18rem;
    color: var(--ink-500);
}

.radio-cell {
    text-align: center;
    min-width: 120px;
}

.radio-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
}

.audit-change-card {
    display: grid;
    gap: 0.55rem;
    min-width: 250px;
}

.audit-detail {
    border-top: 1px solid rgba(24, 32, 26, 0.08);
    padding-top: 0.65rem;
}

.audit-detail summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--ink-900);
}

.audit-detail-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0.75rem;
}

.audit-payload {
    display: grid;
    gap: 0.45rem;
}

.audit-payload pre {
    margin: 0;
    padding: 0.8rem;
    border-radius: 14px;
    background: rgba(236, 227, 209, 0.38);
    border: 1px solid rgba(24, 32, 26, 0.06);
    color: var(--ink-700);
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.8rem;
    line-height: 1.45;
}

.print-shell {
    min-height: 100vh;
    background: #f5f1e6;
    color: var(--ink-900);
}

.print-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: min(1120px, calc(100% - 2rem));
    margin: 1rem auto 0;
    padding: 1rem 1.1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(24, 32, 26, 0.08);
    box-shadow: var(--shadow-md);
}

.print-stage {
    width: min(1120px, calc(100% - 2rem));
    margin: 1rem auto 2rem;
}

.print-sheet {
    background: white;
    border-radius: 24px;
    border: 1px solid rgba(24, 32, 26, 0.08);
    box-shadow: var(--shadow-lg);
    padding: 1.35rem;
}

.print-sheet-head {
    display: grid;
    gap: 1rem;
}

.print-filter-chip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 0.8rem 0.9rem;
    border-radius: 16px;
    background: rgba(236, 227, 209, 0.34);
    color: var(--ink-700);
}

.print-filter-chip span,
.print-filter-chip strong {
    font-size: 0.9rem;
}

@media (max-width: 980px) {
    .hero-grid,
    .grid-two,
    .public-footer,
    .admin-layout,
    .content-grid,
    .page-banner-head,
    .audit-detail-grid,
    .permission-module-grid {
        grid-template-columns: 1fr;
    }

    .three-up,
    .card-grid,
    .summary-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-shell {
        height: auto;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .admin-layout {
        height: auto;
    }

    .admin-rail {
        position: static;
        top: auto;
        height: auto;
        border-radius: 20px;
        padding: 1rem;
    }

    .admin-sidebar-nav {
        overflow: visible;
        padding-right: 0;
    }

    .admin-stage {
        height: auto;
        overflow: visible;
        padding-right: 0;
    }

    .admin-pagehead {
        align-items: flex-start;
        flex-direction: column;
        padding: 1rem 1.1rem;
    }

    .admin-menu-bar,
    .page-banner,
    .table-card,
    .info-card,
    .stats-card,
    .flash-card {
        border-radius: 20px;
    }

    .page-banner,
    .table-card,
    .info-card,
    .stats-card,
    .flash-card {
        padding: 1rem;
    }

    .queue-bulk-toolbar {
        justify-content: flex-start;
    }

    .print-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 720px) {
    .admin-layout {
        width: min(var(--admin-width), calc(100% - 1rem));
        gap: 0.85rem;
        padding: 0.65rem 0 1.1rem;
    }

    .public-header,
    .admin-pagehead,
    .section-head,
    .button-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .public-nav,
    .form-grid,
    .filter-grid,
    .checkbox-grid,
    .permission-choice-grid,
    .three-up,
    .card-grid,
    .summary-strip,
    .page-banner-actions {
        grid-template-columns: 1fr;
    }

    .hero-copy h1,
    .page-hero h1,
    .auth-card h1 {
        font-size: 2rem;
    }

    .admin-rail {
        gap: 0.75rem;
        padding: 0.9rem;
        border-radius: 18px;
    }

    .admin-rail-user,
    .admin-rail-section {
        padding: 0.8rem;
        border-radius: 14px;
    }

    .admin-sidebar-nav a {
        padding: 0.72rem 0.8rem;
        border-radius: 14px;
    }

    .admin-header,
    .admin-stage,
    .admin-main {
        gap: 0.75rem;
    }

    .admin-menu-bar {
        padding: 0.5rem;
    }

    .admin-date-chip {
        min-width: 0;
        width: 100%;
        text-align: left;
        justify-items: start;
    }

    .admin-menu-link {
        width: 100%;
        min-height: 40px;
        padding: 0.65rem 0.85rem;
        font-size: 0.95rem;
    }

    .admin-menu-bar {
        display: grid;
        grid-template-columns: 1fr;
    }

    .page-banner,
    .table-card,
    .info-card,
    .stats-card,
    .flash-card {
        padding: 0.9rem;
        border-radius: 18px;
    }

    .panel-muted {
        padding: 0.85rem;
        border-radius: 16px;
    }

    .summary-tile {
        padding: 0.8rem 0.85rem;
        border-radius: 16px;
    }

    .summary-tile strong {
        font-size: 1.2rem;
    }

    .info-list .list-card,
    .source-list .list-card {
        padding: 0.82rem 0.88rem;
        border-radius: 16px;
    }

    .flash-card-head {
        padding-right: 0;
        flex-direction: column;
        align-items: flex-start;
    }

    .flash-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .flash-dismiss {
        position: static;
        justify-self: start;
    }

    .admin-main .table-wrap table {
        min-width: 620px;
        font-size: 0.93rem;
    }

    .admin-main th,
    .admin-main td {
        padding: 0.72rem;
    }

    .admin-main th {
        font-size: 0.74rem;
    }

    .admin-main input,
    .admin-main select,
    .admin-main textarea {
        padding: 0.82rem 0.9rem;
        border-radius: 12px;
    }

    .queue-bulk-toolbar,
    .queue-selection-panel,
    .table-select-toggle {
        align-items: flex-start;
        flex-direction: column;
    }

    .print-stage,
    .print-toolbar {
        width: min(1120px, calc(100% - 1rem));
    }
}

@media (max-width: 560px) {
    .admin-layout {
        width: min(var(--admin-width), calc(100% - 0.75rem));
    }

    .page-banner-head {
        gap: 0.85rem;
    }

    .page-banner-actions {
        gap: 0.6rem;
    }

    .admin-pagehead,
    .page-banner,
    .table-card,
    .info-card,
    .stats-card,
    .flash-card {
        padding: 0.8rem;
        border-radius: 16px;
    }

    .admin-main .table-wrap table {
        min-width: 560px;
        font-size: 0.89rem;
    }

    .admin-main th,
    .admin-main td {
        padding: 0.65rem;
    }
}

.admin-shell {
    min-height: 100vh;
    height: calc(100vh - 84px);
    overflow-x: hidden;
    overflow-y: auto;
    background:
        linear-gradient(90deg, rgba(21, 41, 22, 0.1) 0 1px, transparent 1px 48px),
        linear-gradient(180deg, #f7f2e6 0%, #efe8d8 58%, #e5dfd0 100%);
}

.admin-app-frame {
    width: min(1500px, calc(100% - 2rem));
    margin-inline: auto;
    padding: 1rem 0 1.35rem;
}

.ufms-topbar {
    position: sticky;
    top: 0.65rem;
    z-index: 20;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0.8rem 0.55rem 1rem;
    border-radius: 12px 12px 0 0;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(22, 79, 29, 0.98) 0%, rgba(13, 65, 22, 0.98) 100%);
    border: 1px solid rgba(5, 39, 12, 0.34);
    border-bottom: 4px solid rgba(190, 155, 74, 0.65);
    box-shadow: 0 18px 38px rgba(11, 39, 18, 0.22);
}

.ufms-topbar__left,
.ufms-topbar__right,
.ufms-topbar-brand,
.ufms-user-chip {
    display: flex;
    align-items: center;
}

.ufms-topbar__left,
.ufms-topbar__right {
    gap: 0.72rem;
    min-width: 0;
}

.ufms-topbar-brand {
    gap: 0.7rem;
    min-width: 0;
}

.ufms-topbar-brand img {
    width: 4.75rem;
    height: 4.75rem;
    object-fit: contain;
    margin-block: -0.8rem -1.15rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.22));
}

.ufms-topbar-brand strong {
    color: #fff;
    font-family: "Segoe UI", "Trebuchet MS", sans-serif;
    font-size: 1.65rem;
    line-height: 1;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.28);
}

.ufms-topbar-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-grid;
    place-items: center;
    position: relative;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
    cursor: pointer;
}

.ufms-topbar-icon:hover,
.ufms-topbar-icon:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 2px;
    background: rgba(255, 255, 255, 0.16);
}

.ufms-bars,
.ufms-bars::before,
.ufms-bars::after {
    width: 24px;
    height: 3px;
    display: block;
    border-radius: 999px;
    background: currentColor;
    content: "";
}

.ufms-bars {
    position: relative;
}

.ufms-bars::before,
.ufms-bars::after {
    position: absolute;
    left: 0;
}

.ufms-bars::before {
    top: -8px;
}

.ufms-bars::after {
    top: 8px;
}

.ufms-search-icon::before {
    width: 14px;
    height: 14px;
    border: 3px solid currentColor;
    border-radius: 999px;
    content: "";
}

.ufms-search-icon::after {
    width: 10px;
    height: 3px;
    position: absolute;
    right: 10px;
    bottom: 11px;
    border-radius: 999px;
    background: currentColor;
    transform: rotate(45deg);
    content: "";
}

.ufms-alert-icon::before {
    width: 17px;
    height: 17px;
    border-radius: 999px;
    background:
        radial-gradient(circle at 50% 50%, #0d4116 0 2px, transparent 2px),
        #fff;
    content: "";
}

.ufms-mail-icon span {
    width: 19px;
    height: 13px;
    border: 2px solid currentColor;
    border-radius: 4px;
}

.ufms-mail-icon::after {
    width: 10px;
    height: 10px;
    position: absolute;
    top: 5px;
    right: 4px;
    border-radius: 999px;
    background: #cf3d24;
    border: 2px solid #fff;
    content: "";
}

.ufms-user-chip {
    gap: 0.62rem;
    min-width: 0;
    color: #fff;
}

.ufms-user-chip .avatar {
    width: 3rem;
    height: 3rem;
    flex: 0 0 3rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #f2d59a, #a96935);
    color: #17351b;
    border: 2px solid rgba(255, 255, 255, 0.72);
}

.ufms-user-chip strong,
.ufms-user-chip small {
    display: block;
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
    font-family: "Segoe UI", "Trebuchet MS", sans-serif;
}

.ufms-user-chip small {
    color: rgba(255, 255, 255, 0.76);
}

.admin-layout {
    width: 100%;
    display: grid;
    grid-template-columns: 284px minmax(0, 1fr);
    gap: 0;
    height: auto;
    padding: 0;
    align-items: start;
    border: 1px solid rgba(16, 56, 21, 0.12);
    border-top: 0;
    border-radius: 0 0 12px 12px;
    background: rgba(255, 252, 243, 0.72);
    box-shadow: 0 24px 70px rgba(20, 28, 20, 0.16);
}

.admin-rail {
    position: sticky;
    top: 5.4rem;
    height: calc(100vh - 6.5rem);
    min-height: 0;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: 1rem;
    align-self: start;
    padding: 1.15rem 0.85rem;
    border-radius: 0;
    color: #172116;
    background: rgba(255, 252, 243, 0.86);
    border-right: 1px solid rgba(26, 63, 28, 0.12);
    box-shadow: inset -16px 0 32px rgba(46, 54, 37, 0.05);
    overflow-x: hidden;
    overflow-y: auto;
}

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

.admin-category-nav a {
    min-height: 54px;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 0.72rem;
    padding: 0.75rem 0.85rem;
    border-radius: 8px;
    color: #132317;
    font-weight: 700;
    background: transparent;
    border: 1px solid transparent;
    transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.admin-category-nav a:hover,
.admin-category-nav a:focus-visible,
.admin-category-nav a.active {
    background: linear-gradient(180deg, rgba(238, 243, 231, 0.96), rgba(218, 226, 208, 0.92));
    border-color: rgba(25, 73, 27, 0.12);
    box-shadow: 5px 7px 16px rgba(35, 48, 32, 0.12), -5px -5px 12px rgba(255, 255, 255, 0.88);
    outline: 0;
}

.admin-category-nav a.active {
    transform: translateX(3px);
}

.admin-nav-icon {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    color: #0f551d;
    background: rgba(16, 95, 31, 0.08);
    font-size: 0.66rem;
    font-weight: 900;
}

.admin-rail-brand-card {
    align-self: end;
    padding: 0.75rem 0.4rem;
    text-align: center;
}

.admin-rail-brand-card img {
    max-height: 175px;
    object-fit: contain;
    filter: drop-shadow(0 16px 18px rgba(26, 42, 24, 0.1));
}

.admin-sidebar-nav {
    display: grid;
    gap: 0.38rem;
    align-content: start;
    min-height: 0;
    overflow-y: auto;
    padding: 0.6rem;
    border-radius: 10px;
    background: rgba(236, 231, 216, 0.46);
    border: 1px solid rgba(26, 63, 28, 0.08);
}

.admin-sidebar-nav a {
    display: grid;
    gap: 0.08rem;
    padding: 0.58rem 0.68rem;
    border-radius: 8px;
    color: #23321f;
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid transparent;
    transform: none;
}

.admin-sidebar-nav a span {
    color: #18241a;
    font-family: "Segoe UI", "Trebuchet MS", sans-serif;
    font-size: 0.82rem;
    line-height: 1.2;
}

.admin-sidebar-nav a small {
    color: #65705d;
    font-size: 0.57rem;
}

.admin-sidebar-nav a:hover,
.admin-sidebar-nav a.active {
    transform: none;
    background: #fff;
    border-color: rgba(18, 86, 29, 0.15);
}

.admin-signout {
    width: 100%;
    border-radius: 8px;
    justify-content: center;
    box-shadow: none;
}

.admin-stage {
    min-height: calc(100vh - 6rem);
    height: auto;
    display: grid;
    gap: 1rem;
    align-content: start;
    padding: 1rem;
    overflow: visible;
}

.admin-header {
    display: grid;
    gap: 0.85rem;
}

.admin-pagehead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 0;
    background: rgba(255, 252, 243, 0.62);
    backdrop-filter: blur(8px);
    border: 0;
    border-bottom: 1px solid rgba(32, 70, 29, 0.1);
    box-shadow: none;
}

.admin-pagehead h1 {
    color: #0b3f18;
    font-family: "Segoe UI", "Trebuchet MS", sans-serif;
    font-size: 1.85rem;
    line-height: 1.15;
}

.page-intro {
    max-width: 60rem;
    color: #42533d;
}

.admin-breadcrumbs {
    gap: 0.48rem;
    color: #65705d;
}

.admin-date-chip {
    min-width: 172px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.65);
    border-color: rgba(23, 78, 29, 0.1);
    text-align: right;
}

.admin-main {
    display: grid;
    gap: 1rem;
}

.page-banner,
.table-card,
.info-card,
.stats-card,
.flash-card {
    border-radius: 10px;
    border-color: rgba(31, 81, 33, 0.12);
    background: rgba(255, 253, 247, 0.8);
    box-shadow: 7px 10px 24px rgba(37, 48, 33, 0.1), -6px -6px 18px rgba(255, 255, 255, 0.8);
}

.button,
.nav-cta {
    border-radius: 8px;
}

@media (max-width: 980px) {
    .admin-app-frame {
        width: min(100% - 1rem, 1500px);
        padding-top: 0.5rem;
    }

    .admin-layout {
        grid-template-columns: 1fr;
        border-radius: 0 0 10px 10px;
    }

    .admin-rail {
        position: sticky;
        top: 5.2rem;
        z-index: 14;
        height: auto;
        max-height: none;
        grid-template-rows: auto auto auto auto;
        border-right: 0;
        border-bottom: 1px solid rgba(26, 63, 28, 0.1);
    }

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

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

    .admin-rail-brand-card {
        display: none;
    }

    .admin-stage {
        min-height: 0;
    }
}

@media (max-width: 760px) {
    .ufms-topbar {
        top: 0.35rem;
        min-height: 62px;
        border-radius: 10px;
        padding: 0.45rem 0.55rem;
    }

    .ufms-topbar-brand img {
        width: 3.4rem;
        height: 3.4rem;
        margin-block: -0.35rem -0.5rem;
    }

    .ufms-topbar-brand strong {
        font-size: 1.32rem;
    }

    .ufms-topbar__right {
        gap: 0.45rem;
    }

    .ufms-topbar-icon {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .ufms-user-chip span:not(.avatar) {
        display: none;
    }

    .admin-rail {
        display: none;
        position: fixed;
        top: 4.75rem;
        left: 0.5rem;
        right: 0.5rem;
        z-index: 30;
        max-height: calc(100vh - 5.5rem);
        padding: 0.8rem;
        border-radius: 10px;
        border: 1px solid rgba(21, 76, 28, 0.16);
        background: #fffbf1;
        box-shadow: 0 24px 55px rgba(18, 42, 19, 0.24);
    }

    .admin-nav-open .admin-rail {
        display: grid;
    }

    .admin-category-nav,
    .admin-sidebar-nav {
        grid-template-columns: 1fr;
    }

    .admin-category-nav a {
        min-height: 48px;
    }

    .admin-stage {
        padding: 0.75rem;
    }

    .admin-pagehead {
        align-items: flex-start;
        flex-direction: column;
        padding: 0.75rem 0.25rem 0.85rem;
    }

    .admin-pagehead h1 {
        font-size: 1.42rem;
    }

    .page-intro,
    .admin-breadcrumbs {
        font-size: 0.92rem;
    }

    .admin-date-chip {
        width: 100%;
        min-width: 0;
        text-align: left;
        justify-items: start;
    }

}

@media (max-width: 520px) {
    .admin-app-frame {
        width: min(100% - 0.5rem, 1500px);
    }

    .ufms-topbar {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .ufms-topbar__left,
    .ufms-topbar__right {
        width: 100%;
        justify-content: space-between;
    }

    .ufms-topbar__right {
        display: grid;
        grid-template-columns: 38px 38px 38px 1fr;
    }

    .ufms-user-chip {
        justify-content: end;
    }

    .admin-rail {
        top: 7.55rem;
        max-height: calc(100vh - 8.2rem);
    }

    .admin-stage {
        padding: 0.55rem;
    }

}

/* UFMS generated reference pass */
body.admin-shell {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 40px),
        linear-gradient(180deg, #223f1f 0, #173718 145px, #f1ecd9 145px, #ded8c8 100%);
}

.admin-app-frame {
    width: min(1452px, calc(100% - 5.25rem));
    padding: 4rem 0 1.5rem;
}

.ufms-topbar {
    min-height: 72px;
    padding: 0.42rem 0.85rem 0.42rem 1.5rem;
    border-radius: 9px 9px 0 0;
    background: linear-gradient(180deg, rgba(22, 83, 28, 0.98), rgba(8, 63, 19, 0.98));
    border-bottom: 4px solid rgba(217, 190, 119, 0.78);
    box-shadow: 0 18px 48px rgba(6, 28, 12, 0.42);
}

.ufms-topbar__left {
    gap: 0.68rem;
}

.ufms-topbar__right {
    gap: 0.9rem;
}

.ufms-topbar-brand {
    gap: 0.82rem;
}

.ufms-topbar-brand img {
    width: 6rem;
    height: 6rem;
    margin-block: -1.1rem -1.45rem;
    object-fit: contain;
    filter: drop-shadow(0 7px 8px rgba(0, 0, 0, 0.26));
}

.ufms-topbar-brand strong {
    font-size: 1.85rem;
    letter-spacing: 0;
}

.ufms-topbar-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    background: transparent;
    box-shadow: none;
}

.ufms-topbar-icon:first-child {
    width: 45px;
    flex-basis: 45px;
}

.ufms-bars,
.ufms-bars::before,
.ufms-bars::after {
    width: 31px;
    height: 4px;
}

.ufms-bars::before {
    top: -10px;
}

.ufms-bars::after {
    top: 10px;
}

.ufms-alert-icon,
.ufms-mail-icon {
    background: rgba(255, 255, 255, 0.14);
}

.admin-layout {
    grid-template-columns: 284px minmax(0, 1fr);
    background: rgba(255, 252, 242, 0.78);
    border-color: rgba(10, 44, 17, 0.1);
    box-shadow: 0 28px 80px rgba(18, 28, 18, 0.22);
}

.admin-rail {
    top: 8.8rem;
    height: calc(100vh - 9.5rem);
    background: rgba(255, 252, 243, 0.9);
    box-shadow: inset -24px 0 38px rgba(38, 44, 31, 0.08);
}

.admin-app-frame--reference .admin-rail {
    display: flex;
    flex-direction: column;
    padding: 3.05rem 0 2.1rem;
}

.admin-category-nav {
    gap: 0;
}

.admin-category-nav a {
    min-height: 56px;
    grid-template-columns: 38px minmax(0, 1fr) 18px;
    gap: 0.72rem;
    padding: 0.72rem 1rem 0.72rem 1.55rem;
    border-radius: 0;
    font-size: 1.03rem;
    font-weight: 700;
}

.admin-category-nav a::after {
    color: #123d1a;
    font-size: 1.4rem;
    line-height: 1;
    content: "";
}

.admin-category-nav a.active::after {
    content: "›";
}

.admin-category-nav a:hover,
.admin-category-nav a:focus-visible,
.admin-category-nav a.active {
    background: linear-gradient(180deg, rgba(232, 239, 224, 0.98), rgba(214, 223, 204, 0.95));
    border-color: rgba(16, 74, 28, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

.admin-category-nav a.active {
    transform: none;
}

.admin-nav-icon {
    width: 31px;
    height: 31px;
    border-radius: 7px;
    background: transparent;
}

.admin-category-nav a.active .admin-nav-icon {
    background: rgba(10, 112, 48, 0.13);
}

.admin-nav-icon img {
    width: 25px;
    height: 25px;
    object-fit: contain;
}

.admin-rail-brand-card {
    margin-top: auto;
    padding: 1rem 1.2rem 0;
}

.admin-rail-brand-card img {
    width: min(220px, 100%);
    max-height: 185px;
    object-fit: contain;
    filter: drop-shadow(0 12px 16px rgba(18, 35, 19, 0.13));
}

.admin-app-frame--reference .admin-stage {
    padding: 2.25rem 2rem 2rem;
}

.admin-app-frame--reference .flash-stack {
    margin-bottom: 0.3rem;
}

@media (max-width: 980px) {
    .admin-app-frame {
        width: min(100% - 1rem, 1452px);
        padding-top: 0.5rem;
    }

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

    .admin-app-frame--reference .admin-rail {
        padding: 1rem 0;
    }

    .admin-app-frame--reference .admin-stage {
        padding: 1rem;
    }

    .admin-rail-brand-card {
        display: none;
    }

}

@media (max-width: 760px) {
    body.admin-shell {
        background: linear-gradient(180deg, #173718 0, #173718 124px, #f1ecd9 124px, #ded8c8 100%);
    }

    .ufms-topbar {
        top: 0.35rem;
        min-height: 64px;
        padding: 0.5rem 0.6rem;
        border-radius: 9px;
    }

    .ufms-topbar-brand img {
        width: 4.4rem;
        height: 4.4rem;
        margin-block: -0.55rem -0.75rem;
    }

    .ufms-topbar-brand strong {
        font-size: 1.45rem;
    }

    .admin-app-frame--reference .admin-rail {
        display: none;
        position: fixed;
        top: 4.95rem;
        left: 0.5rem;
        right: 0.5rem;
        z-index: 30;
        max-height: calc(100vh - 5.6rem);
        padding: 0.85rem 0;
        border-radius: 10px;
        background: #fffbf1;
        box-shadow: 0 24px 55px rgba(18, 42, 19, 0.24);
    }

    .admin-nav-open .admin-app-frame--reference .admin-rail {
        display: flex;
    }

    .admin-category-nav a {
        min-height: 50px;
        padding-inline: 1.05rem;
        border-radius: 8px;
    }

}

@media (max-width: 520px) {
    .admin-app-frame {
        width: min(100% - 0.5rem, 1452px);
    }

    .ufms-topbar__left {
        display: grid;
        grid-template-columns: 44px 38px minmax(0, 1fr);
    }

    .ufms-topbar__right {
        grid-template-columns: 38px 38px 38px 1fr;
    }

    .admin-app-frame--reference .admin-rail {
        top: 7.6rem;
        max-height: calc(100vh - 8.25rem);
    }

    .admin-app-frame--reference .admin-stage {
        padding: 0.65rem;
    }

}

/* UFMS screenshot UI system */
body.admin-shell {
    --uf-green: #00501f;
    --uf-green-dark: #003f17;
    --uf-green-soft: #eaf3e6;
    --uf-border: #e3e5df;
    --uf-ink: #0f1412;
    --uf-muted: #55615a;
    --uf-card-shadow: 0 8px 22px rgba(23, 36, 26, 0.055);
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--uf-ink);
    font-family: "Segoe UI", Arial, sans-serif;
    background: #ffffff;
}

body.admin-shell h1,
body.admin-shell h2,
body.admin-shell h3,
body.admin-shell h4,
body.admin-shell strong,
body.admin-shell button,
body.admin-shell input,
body.admin-shell select,
body.admin-shell textarea {
    font-family: inherit;
}

.admin-app-frame {
    width: 100%;
    min-height: 100vh;
    padding: 0;
}

.ufms-topbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 60;
    min-height: 84px;
    padding: 0 1.45rem 0 1.55rem;
    border: 0;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, #006022 0%, #004818 100%);
    box-shadow: 0 5px 18px rgba(0, 48, 17, 0.28);
}

.ufms-topbar__left,
.ufms-topbar__right {
    display: flex;
    align-items: center;
}

.ufms-topbar__left {
    gap: 1.1rem;
}

.ufms-topbar__right {
    gap: 1rem;
}

.ufms-topbar-brand {
    display: inline-flex;
    align-items: center;
    height: 84px;
}

.ufms-topbar-brand img {
    width: 350px;
    height: 82px;
    max-width: none;
    margin: 0;
    object-fit: contain;
    filter: none;
}

.ufms-topbar-icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 0;
    display: grid;
    place-items: center;
    background: transparent;
    box-shadow: none;
    color: white;
}

.ufms-topbar-icon:first-child {
    flex-basis: 42px;
    width: 42px;
}

.ufms-image-icon img {
    width: 38px;
    height: 38px;
    max-width: none;
    object-fit: contain;
}

.ufms-bars,
.ufms-bars::before,
.ufms-bars::after {
    width: 29px;
    height: 3px;
    border-radius: 99px;
    background: #ffffff;
}

.ufms-bars::before {
    top: -9px;
}

.ufms-bars::after {
    top: 9px;
}

.ufms-user-chip {
    display: grid;
    grid-template-columns: 48px max-content;
    align-items: center;
    gap: 0.7rem;
    min-width: 178px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #ffffff;
    box-shadow: none;
}

.ufms-user-avatar {
    width: 48px;
    height: 48px;
    max-width: none;
    border-radius: 50%;
}

.ufms-user-chip strong,
.ufms-user-chip small {
    display: block;
    color: #ffffff;
    line-height: 1.18;
}

.ufms-user-chip strong {
    font-size: 1rem;
    font-weight: 800;
}

.ufms-user-chip small {
    margin-top: 0.15rem;
    font-size: 0.78rem;
    opacity: 0.92;
}

.admin-layout {
    width: 100%;
    margin: 0;
    display: block;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #ffffff;
}

.admin-rail {
    position: fixed;
    top: 84px;
    bottom: 0;
    left: 0;
    z-index: 40;
    width: 280px;
    height: auto;
    max-height: none;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.55rem 0.75rem 1.25rem;
    border-right: 1px solid #e7e9e3;
    background: #fffefa;
    box-shadow: inset -16px 0 28px rgba(26, 37, 28, 0.035);
}

.admin-stage {
    min-height: calc(100vh - 84px);
    margin-left: 280px;
    padding: calc(84px + 1.45rem) 1.95rem 2.4rem;
}

.admin-header {
    display: none;
}

.admin-main {
    display: block;
    width: 100%;
}

.admin-category-nav,
.admin-category-group,
.admin-subnav {
    display: grid;
}

.admin-category-nav {
    gap: 0.28rem;
}

.admin-category-nav a {
    min-height: 48px;
    grid-template-columns: 30px minmax(0, 1fr) 16px;
    gap: 0.78rem;
    padding: 0.58rem 0.78rem;
    border: 1px solid transparent;
    border-radius: 7px;
    color: #111a15;
    font-size: 1rem;
    font-weight: 750;
    box-shadow: none;
}

.admin-category-nav a::after {
    content: "";
    align-self: center;
    justify-self: center;
    color: #15241a;
    font-size: 1.25rem;
    line-height: 1;
}

.admin-category-group.active > a::after {
    content: "›";
}

.admin-category-nav a:hover,
.admin-category-nav a:focus-visible,
.admin-category-nav a.active {
    transform: none;
    background: var(--uf-green-soft);
    border-color: #dfe8d9;
    color: #003f19;
}

.admin-nav-icon {
    width: 27px;
    height: 27px;
    border-radius: 0;
    display: grid;
    place-items: center;
    background: transparent;
    color: inherit;
}

.admin-category-nav a.active .admin-nav-icon {
    background: transparent;
}

.admin-nav-icon img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.admin-subnav {
    gap: 0.12rem;
    margin: 0.14rem 0 0.58rem 2rem;
    padding-left: 0.6rem;
    border-left: 1px solid #e4e7df;
}

.admin-subnav a {
    min-height: 36px;
    display: flex;
    align-items: center;
    padding: 0.42rem 0.82rem;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 650;
    color: #1e261f;
}

.admin-subnav a::after {
    display: none;
}

.admin-subnav a.active {
    color: #004d1e;
    background: #edf5e9;
}

.admin-rail-brand-card {
    margin-top: auto;
    padding: 1.4rem 0 0;
}

.admin-rail:not(:has(.admin-subnav)) .admin-rail-brand-card {
    margin-top: 9rem;
}

.admin-rail-brand-card img {
    width: 254px;
    max-height: none;
    max-width: 100%;
    display: block;
    margin-inline: auto;
    object-fit: contain;
    filter: none;
}

.admin-rail > form {
    display: block;
    margin-top: 0.75rem;
}

.page-banner {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.page-banner-head {
    align-items: flex-start;
}

.page-banner .eyebrow,
.table-card .eyebrow,
.info-card .eyebrow,
.panel-muted .eyebrow {
    display: none;
}

.page-banner h2 {
    font-size: 1.9rem;
    line-height: 1.1;
    letter-spacing: 0;
}

.page-banner p {
    max-width: 64rem;
    color: var(--uf-muted);
}

.summary-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.95rem;
    margin-top: 1.1rem;
}

.summary-tile,
.table-card,
.info-card,
.panel-muted,
.list-card,
.alert-card {
    border: 1px solid var(--uf-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--uf-card-shadow);
}

.summary-tile {
    min-height: 116px;
    padding: 1rem 1.08rem;
}

.summary-tile strong {
    display: block;
    color: #003f19;
    font-size: 1.72rem;
    line-height: 1.15;
}

.summary-tile span {
    display: block;
    margin-top: 0.5rem;
    color: #1f2723;
    font-size: 0.92rem;
    line-height: 1.35;
}

.content-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 1rem;
}

.table-card,
.info-card,
.panel-muted {
    padding: 1rem;
}

.section-head {
    margin-bottom: 0.8rem;
}

.section-head h2,
.panel-muted h3,
.info-card h2 {
    color: #0d1411;
    font-size: 1.05rem;
    line-height: 1.25;
}

.form-grid {
    gap: 1.05rem;
}

.field span,
.field > span {
    margin-bottom: 0.42rem;
    color: #111714;
    font-size: 0.86rem;
    font-weight: 750;
}

.password-readout {
    display: flex;
    min-height: 45px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    border: 1px solid #d9ddd5;
    border-radius: 6px;
    background: #fbfaf6;
    padding: 0.72rem 0.85rem;
    color: #111714;
}

.password-readout strong {
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: 1rem;
    letter-spacing: 0;
}

.password-readout small {
    margin: 0;
    color: var(--uf-muted);
    font-size: 0.78rem;
    line-height: 1.25;
    text-align: right;
}

input,
select,
textarea {
    min-height: 45px;
    border-radius: 6px;
    border: 1px solid #d9ddd5;
    background-color: #ffffff;
    color: #111714;
    font-size: 0.98rem;
    box-shadow: inset 0 1px 2px rgba(20, 28, 22, 0.025);
}

textarea {
    min-height: 86px;
}

.button,
.nav-cta {
    border-radius: 6px;
    padding: 0.78rem 1.18rem;
    background: linear-gradient(180deg, #006423, #004919);
    box-shadow: 0 8px 16px rgba(0, 72, 25, 0.16);
    font-weight: 800;
}

.button.ghost,
.nav-cta.ghost {
    background: #ffffff;
    color: #0b3e1a;
    border-color: #b9d0bd;
    box-shadow: none;
}

.table-wrap {
    border: 1px solid var(--uf-border);
    border-radius: 8px;
    overflow: auto;
    background: #ffffff;
}

.table-wrap.uf-wide-table table {
    min-width: 1120px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}

th {
    background: #fbfaf6;
    color: #101612;
    font-weight: 800;
}

td,
th {
    padding: 0.78rem 0.82rem;
    border-bottom: 1px solid #e9ebe6;
}

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

.status-pill {
    border-radius: 5px;
    padding: 0.28rem 0.55rem;
    font-weight: 750;
}

.uf-page {
    display: grid;
    gap: 1rem;
}

.uf-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.2rem;
}

.uf-page-title h1 {
    color: #0c1110;
    font-size: 1.9rem;
    line-height: 1.12;
    font-weight: 850;
    letter-spacing: 0;
}

.uf-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: 0.55rem;
    color: #1a211d;
    font-size: 0.95rem;
}

.uf-breadcrumbs a,
.uf-breadcrumbs strong {
    color: #00501f;
    font-weight: 700;
}

.uf-page-actions,
.uf-card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.uf-action {
    min-height: 43px;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 1.05rem;
    border: 1px solid #d9ded6;
    border-radius: 6px;
    background: #ffffff;
    color: #101612;
    font-size: 0.9rem;
    font-weight: 800;
}

.uf-action--green {
    border-color: #006423;
    background: linear-gradient(180deg, #006423, #004919);
    color: #ffffff;
}

.uf-action img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

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

.uf-stat-grid--five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.uf-stat-grid--six {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.uf-stat-card {
    min-height: 126px;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 0.85rem;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--uf-border);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--uf-card-shadow);
}

.uf-stat-card__icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #edf5e9;
}

.uf-stat-card__icon img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.uf-stat-card small {
    display: block;
    color: #111714;
    font-size: 0.78rem;
    font-weight: 650;
}

.uf-stat-card strong {
    display: block;
    margin-top: 0.33rem;
    color: #0a0f0d;
    font-size: 1.5rem;
    line-height: 1.08;
    font-weight: 850;
}

.uf-stat-card span {
    display: block;
    margin-top: 0.45rem;
    color: #00501f;
    font-size: 0.78rem;
    font-weight: 750;
}

.uf-stat-card .negative {
    color: #db1515;
}

.uf-filter-card,
.uf-panel,
.uf-table-card,
.uf-side-card {
    border: 1px solid var(--uf-border);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--uf-card-shadow);
}

.uf-filter-card {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto auto;
    gap: 0.9rem;
    align-items: end;
    padding: 0.9rem 1rem;
}

.uf-field {
    display: grid;
    gap: 0.42rem;
}

.uf-field label,
.uf-field span {
    color: #111714;
    font-size: 0.78rem;
    font-weight: 800;
}

.uf-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 1rem;
}

.uf-report-stack {
    display: grid;
    gap: 1rem;
}

.uf-two-col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
}

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

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

.uf-report-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 1rem;
    align-items: stretch;
}

.uf-report-dashboard-grid > *,
.uf-report-overview-grid > * {
    min-width: 0;
}

.uf-report-control-panel {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--uf-border);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--uf-card-shadow);
}

.uf-report-control-panel p {
    margin: 0 0 0.35rem;
    color: #35423b;
    line-height: 1.45;
}

.uf-report-control-panel--compact p {
    margin: 0;
}

.uf-report-control-panel strong,
.uf-report-control-panel span {
    display: block;
}

.uf-report-control-panel strong {
    color: #00451b;
    font-weight: 850;
}

.uf-report-control-panel span {
    margin-top: 0.2rem;
    color: #5d6b64;
    font-size: 0.84rem;
    font-weight: 700;
}

.uf-report-periods {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
}

.uf-report-filter-panel {
    grid-template-columns: minmax(140px, 0.75fr) minmax(190px, 1fr) minmax(260px, 1.35fr) auto auto;
}

.uf-card-filter-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.uf-card-filter-head h2 {
    margin: 0;
}

.uf-card-filter-shell {
    display: grid;
    gap: 0.55rem;
    min-width: 0;
}

.uf-card-filter-shell > summary {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    padding: 0;
    border: 0;
    clip: rect(0, 0, 0, 0);
    list-style: none;
}

.uf-card-filter-shell > summary::-webkit-details-marker {
    display: none;
}

.uf-card-filter-shell > summary::after {
    content: "+";
    font-size: 1rem;
    line-height: 1;
}

.uf-card-filter-shell[open] > summary::after {
    content: "-";
}

.uf-card-filter {
    display: grid;
    grid-template-columns: minmax(95px, 0.7fr) repeat(2, minmax(130px, 0.85fr)) minmax(120px, 0.9fr) minmax(140px, 1fr) auto auto;
    gap: 0.45rem;
    align-items: end;
    width: 100%;
    box-sizing: border-box;
    padding: 0.52rem;
    border: 1px solid #dce9d7;
    border-radius: 8px;
    background: #f8fbf6;
}

.uf-card-filter .uf-field {
    min-width: 0;
}

.uf-card-filter .button,
.uf-card-filter .uf-action {
    min-height: 38px;
    justify-content: center;
}

.uf-card-filter--inline {
    grid-template-columns: minmax(115px, 0.75fr) repeat(2, minmax(130px, 0.85fr)) minmax(140px, 1fr) minmax(170px, 1.15fr) auto;
    width: min(100%, 960px);
    padding: 0;
    border: 0;
    background: transparent;
}

.uf-card-filter-shell--inline {
    width: min(100%, 960px);
}

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

.uf-report-chart-grid > * {
    min-width: 0;
}

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

.uf-report-insight-card {
    display: grid;
    gap: 0.35rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--uf-border);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--uf-card-shadow);
}

.uf-report-insight-card small {
    color: #5d6b64;
    font-size: 0.76rem;
    font-weight: 850;
    text-transform: uppercase;
}

.uf-report-insight-card strong {
    color: #0f1d15;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.25;
}

.uf-report-insight-card span {
    color: #3d4943;
    font-size: 0.82rem;
    line-height: 1.4;
}

.uf-panel,
.uf-table-card,
.uf-side-card {
    padding: 1rem;
}

.uf-panel h2,
.uf-table-card h2,
.uf-side-card h2 {
    margin-bottom: 0.9rem;
    color: #101612;
    font-size: 1rem;
    font-weight: 850;
}

.uf-side-stack {
    display: grid;
    gap: 1rem;
}

.uf-side-row,
.uf-list-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.65rem 0;
    border-bottom: 1px solid #eff1ed;
}

.uf-side-row:last-child,
.uf-list-row:last-child {
    border-bottom: 0;
}

.uf-side-row img,
.uf-list-row img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.uf-side-row strong,
.uf-list-row strong {
    display: block;
    font-size: 0.88rem;
    line-height: 1.25;
}

.uf-side-row span,
.uf-list-row span {
    display: block;
    margin-top: 0.18rem;
    color: #303936;
    font-size: 0.8rem;
    line-height: 1.3;
}

.uf-chart {
    position: relative;
    min-height: 280px;
    border: 1px solid #eef0eb;
    border-radius: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    background: #ffffff;
    -webkit-overflow-scrolling: touch;
}

.uf-chart svg {
    width: 100%;
    min-width: 32rem;
    height: 280px;
    display: block;
}

.uf-chart .grid-line {
    stroke: rgba(18, 28, 22, 0.09);
    stroke-width: 1;
}

.uf-chart .axis-line {
    stroke: rgba(18, 28, 22, 0.18);
    stroke-width: 1.2;
}

.uf-chart .axis-label {
    fill: #64716c;
    font-size: 11px;
    font-weight: 750;
}

.uf-chart .axis-label--y {
    text-anchor: end;
}

.uf-chart .axis-label--x,
.uf-chart .bar-label {
    text-anchor: middle;
}

.uf-chart .bar-label {
    fill: #15231b;
    font-size: 11px;
    font-weight: 850;
}

.uf-chart .point {
    stroke: #ffffff;
    stroke-width: 2;
}

.uf-chart__empty {
    display: grid;
    min-height: 280px;
    place-items: center;
    padding: 1rem;
    color: #64716c;
    font-weight: 750;
    text-align: center;
}

.uf-chart--green .area {
    fill: rgba(0, 105, 34, 0.12);
}

.uf-chart--green .line,
.uf-chart--green .bar,
.uf-chart--green .point {
    stroke: #006423;
    fill: #137c36;
}

.uf-chart--red .area {
    fill: rgba(220, 28, 28, 0.11);
}

.uf-chart--red .line,
.uf-chart--red .bar,
.uf-chart--red .point {
    stroke: #e21d1d;
    fill: #e21d1d;
}

.uf-chart--blue .area {
    fill: rgba(0, 102, 190, 0.1);
}

.uf-chart--blue .line,
.uf-chart--blue .bar,
.uf-chart--blue .point {
    stroke: #126bc2;
    fill: #126bc2;
}

.uf-chart--purple .area {
    fill: rgba(108, 44, 177, 0.11);
}

.uf-chart--purple .line,
.uf-chart--purple .bar,
.uf-chart--purple .point {
    stroke: #6a2eb0;
    fill: #6a2eb0;
}

.uf-table {
    width: 100%;
    border-collapse: collapse;
}

.uf-table th,
.uf-table td {
    padding: 0.7rem 0.75rem;
    border: 1px solid #e9ebe6;
    text-align: left;
    vertical-align: middle;
}

.uf-table tfoot td,
.uf-total-row td {
    background: #edf4ea;
    color: #00451b;
    font-weight: 850;
}

.uf-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.82rem;
    font-size: 0.86rem;
}

.uf-pages {
    display: flex;
    align-items: center;
    gap: 0.48rem;
}

.uf-pages span,
.uf-pages a,
.uf-pages button {
    min-width: 32px;
    min-height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid #e3e7df;
    border-radius: 5px;
    background: #ffffff;
}

.uf-pages button {
    appearance: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.uf-pages .active {
    border-color: #00501f;
    background: #00501f;
    color: #ffffff;
}

.uf-pending-queue {
    display: grid;
    gap: 1rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.uf-pending-filter-panel {
    max-width: 100%;
    min-width: 0;
    padding: 0.75rem 1rem;
}

.uf-pending-filter-list {
    justify-content: flex-start;
    gap: 0.6rem;
    flex-wrap: wrap;
    min-width: 0;
}

.uf-pending-filter-list button {
    min-width: 120px;
    padding: 0.65rem 0.8rem;
    color: #18221c;
}

.uf-pending-filter-list button:not(.active):hover {
    border-color: #bfd5b6;
    background: #f1f8ee;
    color: #00501f;
}

.uf-pending-table-card .table-wrap {
    width: 100%;
}

.uf-pending-table-card {
    max-width: 100%;
    min-width: 0;
}

.uf-pending-table-card .uf-table td {
    line-height: 1.35;
}

.uf-pending-table-card .uf-pagination form {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: 0;
}

.uf-pending-bulk-form {
    margin: 0;
}

.uf-check-cell {
    width: 3rem;
    text-align: center;
}

.uf-check-cell input {
    margin-inline: auto;
}

.uf-pending-table-card [hidden] {
    display: none !important;
}

@media (min-width: 681px) {
    .admin-main .uf-pending-table-card .table-wrap table,
    .uf-pending-table-card .uf-table {
        min-width: 0 !important;
        table-layout: fixed;
    }

    .uf-pending-table-card .uf-table th,
    .uf-pending-table-card .uf-table td {
        overflow-wrap: anywhere;
    }

    .uf-pending-table-card .uf-table th {
        font-size: 0.72rem;
        line-height: 1.08;
        letter-spacing: 0;
    }

    .uf-pending-table-card .uf-table th:nth-child(1),
    .uf-pending-table-card .uf-table td:nth-child(1) {
        width: 12%;
    }

    .uf-pending-table-card .uf-table th:nth-child(2),
    .uf-pending-table-card .uf-table td:nth-child(2) {
        width: 15%;
    }

    .uf-pending-table-card .uf-table th:nth-child(3),
    .uf-pending-table-card .uf-table td:nth-child(3) {
        width: 11%;
    }

    .uf-pending-table-card .uf-table th:nth-child(4),
    .uf-pending-table-card .uf-table td:nth-child(4) {
        width: 8%;
    }

    .uf-pending-table-card .uf-table th:nth-child(5),
    .uf-pending-table-card .uf-table td:nth-child(5) {
        width: 12%;
    }

    .uf-pending-table-card .uf-table th:nth-child(6),
    .uf-pending-table-card .uf-table td:nth-child(6) {
        width: 18%;
    }

    .uf-pending-table-card .uf-table th:nth-child(7),
    .uf-pending-table-card .uf-table td:nth-child(7) {
        width: 13%;
    }

    .uf-pending-table-card .uf-table th:nth-child(8),
    .uf-pending-table-card .uf-table td:nth-child(8) {
        width: 11%;
        overflow-wrap: normal;
    }

    .uf-pending-bulk-form .uf-table th:nth-child(1),
    .uf-pending-bulk-form .uf-table td:nth-child(1) {
        width: 4%;
    }

    .uf-pending-bulk-form .uf-table th:nth-child(2),
    .uf-pending-bulk-form .uf-table td:nth-child(2) {
        width: 11%;
    }

    .uf-pending-bulk-form .uf-table th:nth-child(3),
    .uf-pending-bulk-form .uf-table td:nth-child(3) {
        width: 14%;
    }

    .uf-pending-bulk-form .uf-table th:nth-child(4),
    .uf-pending-bulk-form .uf-table td:nth-child(4) {
        width: 11%;
    }

    .uf-pending-bulk-form .uf-table th:nth-child(5),
    .uf-pending-bulk-form .uf-table td:nth-child(5) {
        width: 8%;
    }

    .uf-pending-bulk-form .uf-table th:nth-child(6),
    .uf-pending-bulk-form .uf-table td:nth-child(6) {
        width: 11%;
    }

    .uf-pending-bulk-form .uf-table th:nth-child(7),
    .uf-pending-bulk-form .uf-table td:nth-child(7) {
        width: 18%;
    }

    .uf-pending-bulk-form .uf-table th:nth-child(8),
    .uf-pending-bulk-form .uf-table td:nth-child(8) {
        width: 12%;
    }

    .uf-pending-bulk-form .uf-table th:nth-child(9),
    .uf-pending-bulk-form .uf-table td:nth-child(9) {
        width: 11%;
        overflow-wrap: normal;
    }

    .uf-pending-table-card .status-pill {
        white-space: normal;
    }

    .uf-pending-table-card .uf-action {
        min-height: 32px;
        padding: 0.32rem 0.52rem;
        font-size: 0.78rem;
    }
}

.uf-pagination .uf-pages > span:first-child,
.uf-pagination .uf-pages > span:last-child {
    font-size: 0;
}

.uf-pagination .uf-pages > span:first-child::after,
.uf-pagination .uf-pages > span:last-child::after {
    font-size: 0.95rem;
    line-height: 1;
}

.uf-pagination .uf-pages > span:first-child::after {
    content: "\2039";
}

.uf-pagination .uf-pages > span:last-child::after {
    content: "\203A";
}

.uf-form-card {
    padding: 1.55rem 1.75rem;
    border: 1px solid var(--uf-border);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--uf-card-shadow);
}

.uf-form-section {
    padding: 1.15rem 0;
    border-top: 1px solid #edf0ea;
}

.uf-form-section:first-child {
    padding-top: 0;
    border-top: 0;
}

.uf-form-section h2 {
    margin-bottom: 1rem;
    color: #072f15;
    font-size: 1.25rem;
    font-weight: 850;
}

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

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

.uf-form-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.uf-age-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 1.55rem;
    border: 1px solid #cbdcbe;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(180deg, #f3faef, #eaf3e4);
}

.uf-age-strip div {
    padding: 1rem;
    border-right: 1px solid #d2dfc8;
}

.uf-age-strip div:last-child {
    border-right: 0;
}

.uf-age-strip span {
    display: block;
    color: #17221a;
    font-size: 0.82rem;
}

.uf-age-strip strong {
    display: block;
    margin-top: 0.65rem;
    color: #00451b;
    font-size: 1.15rem;
}

.uf-sr-token {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

@media (max-width: 1200px) {
    .uf-stat-grid,
    .uf-stat-grid--five,
    .uf-stat-grid--six {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .uf-main-grid,
    .content-grid,
    .uf-finance-layout {
        grid-template-columns: 1fr;
    }

    .uf-report-overview-grid {
        grid-template-columns: 1fr;
    }

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

    .uf-report-filter-panel,
    .uf-card-filter,
    .uf-report-chart-grid,
    .uf-report-insight-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 980px) {
    body.admin-shell {
        background: #ffffff;
    }

    .ufms-topbar {
        min-height: 72px;
        padding: 0 0.75rem;
    }

    .ufms-topbar-brand,
    .ufms-topbar-brand img {
        height: 72px;
    }

    .ufms-topbar-brand img {
        width: 280px;
    }

    .admin-rail {
        top: 72px;
        height: calc(100vh - 72px);
        width: min(82vw, 310px);
        transform: translateX(-105%);
        transition: transform 180ms ease;
        box-shadow: 22px 0 40px rgba(17, 31, 19, 0.16);
    }

    .admin-nav-open .admin-rail {
        transform: translateX(0);
    }

    .admin-stage {
        min-height: calc(100vh - 72px);
        margin-left: 0;
        padding: calc(72px + 1rem) 1.25rem 1.25rem;
    }

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

    .uf-page-head,
    .page-banner-head {
        display: grid;
    }

    .uf-page-actions,
    .page-banner-actions {
        justify-content: start;
    }

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

    .uf-card-filter,
    .uf-card-filter--inline {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .uf-card-filter-shell,
    .uf-card-filter-shell--inline {
        width: 100%;
    }

    .uf-two-col,
    .uf-three-col,
    .uf-report-dashboard-grid,
    .uf-report-chart-grid,
    .uf-report-insight-grid,
    .uf-form-grid,
    .uf-form-grid--four,
    .uf-form-grid--three {
        grid-template-columns: 1fr;
    }

    .uf-report-control-panel {
        display: grid;
    }

    .uf-report-periods {
        justify-content: start;
    }

    .uf-card-filter-shell > summary {
        position: static;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: auto;
        height: auto;
        min-height: 38px;
        overflow: visible;
        padding: 0.48rem 0.62rem;
        border: 1px solid #dce9d7;
        border-radius: 8px;
        background: #f8fbf6;
        clip: auto;
        color: #00451b;
        font-size: 0.82rem;
        font-weight: 850;
        cursor: pointer;
    }

    .uf-table-card__header:has(.uf-card-filter-shell) {
        display: grid;
    }

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

@media (max-width: 680px) {
    .ufms-topbar {
        min-height: 66px;
        gap: 0.45rem;
    }

    .ufms-topbar__left {
        gap: 0.55rem;
        min-width: 0;
    }

    .ufms-topbar-brand,
    .ufms-topbar-brand img {
        height: 62px;
    }

    .ufms-topbar-brand img {
        width: min(205px, 52vw);
    }

    .ufms-topbar__right {
        gap: 0.25rem;
    }

    .ufms-topbar-icon,
    .ufms-topbar-icon:first-child {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .ufms-image-icon img {
        width: 32px;
        height: 32px;
    }

    .ufms-user-chip {
        min-width: 0;
        grid-template-columns: 34px;
        gap: 0;
    }

    .ufms-user-chip span {
        display: none;
    }

    .ufms-user-avatar {
        width: 34px;
        height: 34px;
    }

    .admin-rail {
        top: 66px;
        height: calc(100vh - 66px);
    }

    .admin-stage {
        min-height: calc(100vh - 66px);
        padding: calc(66px + 0.85rem) 0.75rem 1.6rem;
    }

    .uf-card-filter,
    .uf-card-filter--inline {
        grid-template-columns: 1fr;
    }

    .uf-page {
        gap: 0.82rem;
    }

    .uf-page-title h1 {
        font-size: 1.65rem;
    }

    .uf-breadcrumbs {
        gap: 0.45rem;
        flex-wrap: wrap;
        font-size: 0.88rem;
    }

    .uf-stat-grid,
    .uf-stat-grid--five,
    .uf-stat-grid--six,
    .summary-strip,
    .uf-side-stack {
        grid-template-columns: 1fr;
    }

    .uf-stat-card {
        min-height: 104px;
    }

    .uf-filter-card {
        grid-template-columns: 1fr;
    }

    .uf-form-card,
    .table-card,
    .info-card,
    .panel-muted,
    .uf-panel,
    .uf-table-card,
    .uf-side-card {
        padding: 0.88rem;
    }

    .uf-age-strip {
        grid-template-columns: 1fr;
    }

    .uf-age-strip div {
        border-right: 0;
        border-bottom: 1px solid #d2dfc8;
    }

    .uf-age-strip div:last-child {
        border-bottom: 0;
    }

    .uf-pagination {
        display: grid;
    }

    .uf-table-card,
    .uf-panel,
    .table-wrap {
        max-width: 100%;
        min-width: 0;
    }

    .admin-main .table-wrap table,
    .uf-table {
        min-width: 0 !important;
    }

    .uf-table thead {
        display: none;
    }

    .uf-table,
    .uf-table tbody,
    .uf-table tr,
    .uf-table td {
        display: block;
        width: 100%;
    }

    .uf-table tr {
        margin-bottom: 0.75rem;
        border: 1px solid #e6e9e2;
        border-radius: 8px;
        overflow: hidden;
        background: #ffffff;
    }

    .uf-table td {
        display: grid;
        grid-template-columns: minmax(112px, 42%) minmax(0, 1fr);
        gap: 0.65rem;
        align-items: center;
        border: 0;
        border-bottom: 1px solid #edf0ea;
        padding: 0.7rem 0.75rem;
        word-break: break-word;
    }

    .uf-table td:last-child {
        border-bottom: 0;
    }

    .uf-table td::before {
        content: attr(data-label);
        color: #4a554f;
        font-size: 0.74rem;
        font-weight: 800;
        text-transform: uppercase;
    }

    .uf-table td[colspan] {
        display: block;
    }

    .uf-table td[colspan]::before {
        display: none;
    }
}

.admin-category-group.active > a::after {
    content: "\203A";
}

/* 21st.dev-inspired admin design layer, extended with the UFMS green palette. */
body.admin-shell {
    --uf-shell-bg: #f7f8f5;
    --uf-surface: #ffffff;
    --uf-surface-muted: #fbfcfa;
    --uf-hover: #f3f7f1;
    --uf-active: var(--uf-green-soft);
    --uf-border: #e2e7df;
    --uf-border-strong: #d4ddd0;
    --uf-ring: rgba(0, 80, 31, 0.18);
    --uf-card-shadow: 0 1px 2px rgba(18, 27, 21, 0.05);
    --uf-card-shadow-hover: 0 10px 26px rgba(18, 27, 21, 0.09);
    background: var(--uf-shell-bg);
}

.admin-app-frame {
    background: var(--uf-shell-bg);
}

.ufms-topbar {
    min-height: 76px;
    padding: 0 1.25rem;
    background: linear-gradient(180deg, #006123 0%, #004818 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 22px rgba(0, 48, 17, 0.16);
}

.ufms-topbar-brand,
.ufms-topbar-brand img {
    height: 76px;
}

.ufms-topbar-brand img {
    width: 318px;
}

.ufms-topbar-icon {
    position: relative;
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.11);
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.ufms-topbar-icon:hover,
.ufms-topbar-icon:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

.ufms-image-icon img {
    width: 26px;
    height: 26px;
}

.ufms-bars,
.ufms-bars::before,
.ufms-bars::after {
    width: 22px;
    height: 2px;
}

.ufms-bars::before {
    top: -7px;
}

.ufms-bars::after {
    top: 7px;
}

.ufms-user-chip {
    min-height: 46px;
    grid-template-columns: 38px max-content;
    gap: 0.62rem;
    min-width: 0;
    padding: 0.28rem 0.78rem 0.28rem 0.32rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.1);
}

.ufms-user-avatar {
    width: 38px;
    height: 38px;
}

.ufms-user-chip strong {
    font-size: 0.9rem;
    font-weight: 750;
}

.ufms-user-chip small {
    font-size: 0.74rem;
}

.admin-rail {
    top: 76px;
    width: 260px;
    padding: 0.78rem 0.62rem;
    gap: 0.68rem;
    border-right: 1px solid var(--uf-border);
    background: var(--uf-surface);
    box-shadow: 1px 0 2px rgba(18, 27, 21, 0.04);
    transition: width 220ms ease, transform 180ms ease;
}

.admin-stage {
    min-height: calc(100vh - 76px);
    margin-left: 260px;
    padding: calc(76px + 1.15rem) 1.55rem 2rem;
    transition: margin-left 220ms ease, padding 180ms ease;
}

.admin-category-nav {
    gap: 0.2rem;
}

.admin-category-nav a {
    min-height: 44px;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 12px;
    align-items: center;
    gap: 0.52rem;
    padding: 0 0.65rem 0 0.18rem;
    border: 1px solid transparent;
    border-radius: 7px;
    color: var(--uf-muted);
    font-size: 0.93rem;
    font-weight: 650;
    line-height: 1.2;
}

.admin-category-nav a::after {
    color: #6b756f;
    font-size: 1.05rem;
}

.admin-category-nav a:hover,
.admin-category-nav a:focus-visible {
    background: var(--uf-hover);
    border-color: transparent;
    color: var(--uf-ink);
}

.admin-category-nav a.active,
.admin-category-group.active > a {
    background: var(--uf-active);
    border-color: var(--uf-border-strong);
    border-left-color: var(--uf-green);
    border-left-width: 2px;
    color: var(--uf-green-dark);
    box-shadow: 0 1px 2px rgba(0, 80, 31, 0.08);
}

.admin-nav-icon {
    width: 40px;
    height: 40px;
    border-radius: 7px;
    background: transparent;
}

.admin-nav-icon img {
    width: 22px;
    height: 22px;
}

.admin-category-nav a.active .admin-nav-icon,
.admin-category-group.active > a .admin-nav-icon {
    background: rgba(0, 80, 31, 0.08);
}

.admin-subnav {
    gap: 0.1rem;
    margin: 0.14rem 0 0.5rem 2.45rem;
    padding-left: 0.58rem;
    border-left: 1px solid var(--uf-border);
}

.admin-subnav a {
    min-height: 34px;
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
    color: var(--uf-muted);
    font-size: 0.82rem;
    font-weight: 620;
}

.admin-subnav a.active {
    background: var(--uf-active);
    color: var(--uf-green-dark);
}

.admin-rail-brand-card {
    margin-top: auto;
    padding: 0.7rem 0 0;
}

.admin-rail-brand-card img {
    width: 226px;
    border: 1px solid var(--uf-border);
    border-radius: 8px;
    box-shadow: var(--uf-card-shadow);
}

.admin-rail-collapse-toggle {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 0.58rem;
    padding: 0 0.7rem 0 0.35rem;
    border: 1px solid transparent;
    border-top-color: var(--uf-border);
    border-radius: 0;
    background: transparent;
    color: var(--uf-muted);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 650;
    transition: background 160ms ease, color 160ms ease;
}

.admin-rail-collapse-toggle:hover,
.admin-rail-collapse-toggle:focus-visible {
    background: var(--uf-hover);
    color: var(--uf-ink);
}

.admin-rail-collapse-toggle__icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    flex: 0 0 40px;
}

.admin-rail-collapse-toggle svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
    stroke: none;
    transform: rotate(180deg);
    transition: transform 220ms ease;
}

body.admin-sidebar-collapsed .admin-rail {
    width: 68px;
}

body.admin-sidebar-collapsed .admin-stage {
    margin-left: 68px;
}

body.admin-sidebar-collapsed .admin-category-nav a {
    grid-template-columns: 40px;
    justify-content: center;
    padding: 0 0.3rem;
}

body.admin-sidebar-collapsed .admin-category-nav a::after,
body.admin-sidebar-collapsed .admin-category-nav a > span:not(.admin-nav-icon),
body.admin-sidebar-collapsed .admin-subnav,
body.admin-sidebar-collapsed .admin-rail-brand-card,
body.admin-sidebar-collapsed .admin-rail-collapse-toggle__text,
body.admin-sidebar-collapsed .admin-rail > form {
    display: none;
}

body.admin-sidebar-collapsed .admin-rail-collapse-toggle {
    justify-content: center;
    padding: 0;
}

body.admin-sidebar-collapsed .admin-rail-collapse-toggle svg {
    transform: rotate(0deg);
}

.summary-tile,
.table-card,
.info-card,
.panel-muted,
.list-card,
.alert-card,
.uf-stat-card,
.uf-filter-card,
.uf-panel,
.uf-table-card,
.uf-side-card,
.uf-form-card,
.flash-card {
    border: 1px solid var(--uf-border);
    border-radius: 8px;
    background: var(--uf-surface);
    box-shadow: var(--uf-card-shadow);
}

.summary-tile,
.uf-stat-card,
.table-card,
.info-card,
.panel-muted,
.uf-panel,
.uf-table-card,
.uf-side-card,
.uf-form-card {
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.summary-tile:hover,
.uf-stat-card:hover,
.uf-panel:hover,
.uf-side-card:hover {
    border-color: var(--uf-border-strong);
    box-shadow: var(--uf-card-shadow-hover);
    transform: translateY(-1px);
}

.uf-stat-card {
    min-height: 118px;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 0.82rem;
    padding: 1rem;
}

.uf-stat-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: var(--uf-active);
}

.uf-stat-card__icon img {
    width: 32px;
    height: 32px;
}

.uf-stat-card small,
.summary-tile span,
.uf-side-row span,
.uf-list-row span,
.field span,
.field > span,
.uf-field span,
.uf-field label {
    color: var(--uf-muted);
}

.uf-stat-card strong,
.summary-tile strong {
    color: var(--uf-ink);
}

.uf-action,
.button,
.nav-cta {
    border-radius: 7px;
    letter-spacing: 0;
}

.button,
.nav-cta,
.uf-action--green {
    background: linear-gradient(180deg, #006423 0%, #004919 100%);
    box-shadow: 0 8px 16px rgba(0, 80, 31, 0.14);
}

.button.ghost,
.nav-cta.ghost,
.uf-action {
    background: var(--uf-surface);
    border-color: var(--uf-border-strong);
    color: var(--uf-green-dark);
    box-shadow: none;
}

input,
select,
textarea {
    border-color: var(--uf-border-strong);
    border-radius: 7px;
    background: var(--uf-surface);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--uf-green);
    box-shadow: 0 0 0 3px var(--uf-ring);
    outline: 0;
}

.table-wrap {
    border-color: var(--uf-border);
    border-radius: 8px;
    box-shadow: none;
}

th,
.uf-table th {
    background: var(--uf-surface-muted);
    color: var(--uf-ink);
}

td,
th,
.uf-table th,
.uf-table td {
    border-color: #e8ece5;
}

tbody tr {
    transition: background 140ms ease;
}

tbody tr:hover {
    background: #fbfcfa;
}

.status-pill {
    border-radius: 999px;
}

.uf-page-title h1,
.page-banner h2 {
    color: var(--uf-ink);
}

.uf-breadcrumbs,
.page-banner p {
    color: var(--uf-muted);
}

@media (max-width: 980px) {
    .ufms-topbar {
        min-height: 72px;
    }

    .ufms-topbar-brand,
    .ufms-topbar-brand img {
        height: 72px;
    }

    .ufms-topbar-brand img {
        width: min(245px, 48vw);
    }

    .admin-rail {
        top: 72px;
        width: min(82vw, 310px);
        height: calc(100vh - 72px);
        transform: translateX(-105%);
        box-shadow: 22px 0 40px rgba(17, 31, 19, 0.16);
    }

    .admin-nav-open .admin-rail {
        transform: translateX(0);
    }

    .admin-stage,
    body.admin-sidebar-collapsed .admin-stage {
        min-height: calc(100vh - 72px);
        margin-left: 0;
        padding: calc(72px + 1rem) 1.25rem 1.25rem;
    }

    body.admin-sidebar-collapsed .admin-rail {
        width: min(82vw, 310px);
    }

    body.admin-sidebar-collapsed .admin-category-nav a {
        grid-template-columns: 40px minmax(0, 1fr) 12px;
        justify-content: stretch;
        padding: 0 0.65rem 0 0.18rem;
    }

    body.admin-sidebar-collapsed .admin-category-nav a::after {
        display: block;
    }

    body.admin-sidebar-collapsed .admin-category-nav a > span:not(.admin-nav-icon),
    body.admin-sidebar-collapsed .admin-subnav,
    body.admin-sidebar-collapsed .admin-rail-brand-card {
        display: grid;
    }

    .admin-rail-collapse-toggle {
        display: none;
    }
}

@media (max-width: 680px) {
    .ufms-topbar {
        min-height: 66px;
        padding-inline: 0.62rem;
    }

    .ufms-topbar__left {
        gap: 0.42rem;
    }

    .ufms-topbar__right {
        gap: 0.22rem;
    }

    .ufms-topbar-brand,
    .ufms-topbar-brand img {
        height: 64px;
    }

    .ufms-topbar-brand img {
        width: min(150px, 39vw);
    }

    .ufms-topbar-icon,
    .ufms-topbar-icon:first-child {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .ufms-image-icon img {
        width: 24px;
        height: 24px;
    }

    .admin-rail {
        top: 66px;
        height: calc(100vh - 66px);
    }

    .admin-stage,
    body.admin-sidebar-collapsed .admin-stage {
        min-height: calc(100vh - 66px);
        padding: calc(66px + 0.85rem) 0.75rem 1.6rem;
    }

    .ufms-user-chip {
        padding: 0;
        border: 0;
        background: transparent;
    }
}

@media (max-width: 420px) {
    .ufms-topbar-brand img {
        width: min(128px, 35vw);
    }

    .ufms-topbar-icon,
    .ufms-topbar-icon:first-child {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }

    .ufms-image-icon img {
        width: 22px;
        height: 22px;
    }
}

/* Assetless reference-component layer. */
.ui-icon {
    width: 1em;
    height: 1em;
    display: inline-block;
    fill: currentColor;
    stroke: none;
    vertical-align: middle;
}

.ui-logo-mark {
    width: 20px;
    height: auto;
    display: block;
    fill: currentColor;
    stroke: none;
}

.ufms-topbar {
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--uf-border);
    color: var(--uf-ink);
    box-shadow: 0 1px 2px rgba(18, 27, 21, 0.05);
    backdrop-filter: blur(10px);
}

.ufms-topbar-brand {
    gap: 0.72rem;
    color: var(--uf-ink);
}

.ufms-topbar-brand img {
    display: none;
}

.ufms-brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    border-radius: 8px;
    background: linear-gradient(180deg, var(--uf-green), var(--uf-green-dark));
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(0, 80, 31, 0.14);
}

.ufms-brand-text {
    display: grid;
    gap: 0.1rem;
}

.ufms-brand-text strong {
    color: var(--uf-ink);
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.05;
}

.ufms-brand-text small {
    color: var(--uf-muted);
    font-size: 0.72rem;
    line-height: 1.15;
}

.ufms-topbar-icon {
    background: #ffffff;
    border-color: var(--uf-border);
    color: var(--uf-muted);
    box-shadow: var(--uf-card-shadow);
}

.ufms-topbar-icon:hover,
.ufms-topbar-icon:focus-visible {
    background: var(--uf-hover);
    border-color: var(--uf-border-strong);
    color: var(--uf-ink);
}

.ufms-topbar-icon .ui-icon {
    width: 18px;
    height: 18px;
}

.ufms-topbar-icon--badged::after {
    content: "";
    position: absolute;
    top: 9px;
    right: 9px;
    width: 7px;
    height: 7px;
    border: 1px solid #ffffff;
    border-radius: 999px;
    background: var(--red-500);
}

.ufms-bars,
.ufms-bars::before,
.ufms-bars::after {
    background: var(--uf-green);
}

.ufms-user-chip {
    background: #ffffff;
    border-color: var(--uf-border);
    color: var(--uf-ink);
    box-shadow: var(--uf-card-shadow);
}

.ufms-user-avatar,
.profile-avatar span {
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--uf-green), var(--uf-green-dark));
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
}

.ufms-user-chip strong,
.ufms-user-chip small {
    color: var(--uf-ink);
}

.ufms-user-chip small {
    color: var(--uf-muted);
}

.admin-nav-icon .ui-icon {
    width: 18px;
    height: 18px;
}

.admin-nav-icon img,
.uf-stat-card__icon img,
.uf-side-row img,
.uf-list-row img {
    display: none;
}

.admin-rail-brand-card--generated {
    display: grid;
    gap: 0.42rem;
    padding: 0.95rem;
    border: 1px solid var(--uf-border);
    border-radius: 8px;
    background: var(--uf-surface-muted);
    box-shadow: var(--uf-card-shadow);
}

.admin-rail-brand-card--generated .admin-rail-brand-card__mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--uf-active);
    color: var(--uf-green);
}

.admin-rail-brand-card--generated strong {
    color: var(--uf-ink);
    font-size: 0.9rem;
    line-height: 1.2;
}

.admin-rail-brand-card--generated small {
    color: var(--uf-muted);
    font-size: 0.76rem;
    line-height: 1.35;
}

.uf-stat-card__icon .ui-icon,
.uf-side-row__icon .ui-icon,
.uf-table-type-icon .ui-icon,
.uf-table-action-icon .ui-icon {
    width: 19px;
    height: 19px;
}

.uf-side-row__icon,
.uf-table-type-icon,
.uf-table-action-icon {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background: var(--uf-active);
    color: var(--uf-green);
    vertical-align: middle;
}

.uf-table-type-icon {
    width: 28px;
    height: 28px;
    margin-right: 0.42rem;
}

.uf-table-action-icon {
    width: 30px;
    height: 30px;
    background: transparent;
    color: var(--uf-muted);
}

.uf-action .ui-icon,
.button .ui-icon {
    width: 17px;
    height: 17px;
}

@media (max-width: 680px) {
    .ufms-brand-mark {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .ufms-brand-text strong {
        font-size: 0.86rem;
    }

    .ufms-brand-text small {
        display: none;
    }

    .ufms-user-chip {
        grid-template-columns: 34px;
        min-width: 0;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .ufms-user-chip .ufms-user-avatar {
        width: 34px;
        height: 34px;
        display: grid !important;
    }

    .ufms-user-chip span:not(.ufms-user-avatar) {
        display: none;
    }
}

@media (max-width: 420px) {
    .ufms-topbar-brand {
        gap: 0.45rem;
    }

    .ufms-brand-text {
        max-width: 4.4rem;
        overflow: hidden;
    }
}

/* Final dashboard fit pass: keep shell and cards from overlapping in tight viewports. */
body.admin-shell .ufms-topbar {
    z-index: 80;
}

body.admin-shell .admin-rail {
    position: fixed;
    top: 77px !important;
    bottom: 0;
    height: calc(100vh - 77px) !important;
    max-height: calc(100vh - 77px);
    display: flex;
    flex-direction: column;
    padding-top: 0.62rem;
    padding-bottom: 0.62rem;
    overflow-x: hidden;
    overflow-y: hidden;
    z-index: 50;
}

body.admin-shell .admin-category-nav {
    flex: 0 0 auto;
    gap: 0.12rem;
}

body.admin-shell .admin-category-nav a {
    min-height: 40px;
    padding-block: 0.16rem;
}

body.admin-shell .admin-rail:has(.admin-subnav) {
    overflow-y: auto;
}

body.admin-shell .admin-nav-icon,
body.admin-shell .admin-rail-collapse-toggle__icon {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
}

body.admin-shell .admin-rail-collapse-toggle {
    min-height: 40px;
    flex: 0 0 40px;
    margin-top: auto;
    padding-block: 0;
}

body.admin-shell .admin-signout {
    min-height: 36px;
    margin-top: 0.24rem;
    padding: 0.44rem 0.65rem;
    font-size: 0.82rem;
}

@media (min-width: 981px) {
    body.admin-shell:not(.admin-sidebar-collapsed) [data-admin-nav-toggle] {
        display: none;
    }

    body.admin-shell.admin-sidebar-collapsed [data-admin-nav-toggle] {
        display: grid;
    }

    body.admin-shell.admin-sidebar-collapsed .admin-rail {
        width: 0;
        padding-right: 0;
        padding-left: 0;
        border-right: 0;
        opacity: 0;
        pointer-events: none;
        transform: translateX(-100%);
    }

    body.admin-shell.admin-sidebar-collapsed .admin-stage {
        margin-left: 0;
    }
}

body.admin-shell .admin-stage {
    min-height: calc(100vh - 77px);
    padding-top: calc(77px + 1rem);
}

body.admin-shell .uf-stat-card {
    min-height: 84px;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 0.68rem;
    align-items: center;
    padding: 0.82rem 1rem;
}

body.admin-shell .uf-stat-card__icon {
    width: 24px;
    height: 24px;
    border-radius: 0;
    background: transparent;
    color: var(--uf-green);
}

body.admin-shell .uf-stat-card__icon .ui-icon {
    width: 19px;
    height: 19px;
}

body.admin-shell .uf-stat-card small {
    font-size: 0.77rem;
    line-height: 1.2;
}

body.admin-shell .uf-stat-card strong {
    margin-top: 0.18rem;
    font-size: 1.35rem;
    line-height: 1;
}

body.admin-shell .uf-stat-card span {
    margin-top: 0.25rem;
}

.uf-mini-table-wrap {
    overflow-x: auto;
}

.uf-mini-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}

.uf-mini-table th,
.uf-mini-table td {
    padding: 0.58rem 0.35rem;
    border-bottom: 1px solid #edf0ea;
    text-align: left;
    vertical-align: middle;
}

.uf-mini-table th {
    background: transparent;
    color: var(--uf-muted);
    font-size: 0.7rem;
    letter-spacing: 0;
    text-transform: uppercase;
}

.uf-mini-table th:nth-child(2),
.uf-mini-table td:nth-child(2) {
    width: 3.2rem;
    text-align: center;
}

.uf-mini-table th:last-child,
.uf-mini-table td:last-child {
    width: 4.8rem;
    text-align: right;
}

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

.uf-activity-table-wrap {
    margin-top: 0.2rem;
    overflow-x: auto;
}

.uf-activity-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 0.85rem;
}

.uf-activity-table th,
.uf-activity-table td {
    padding: 0.68rem 0.55rem;
    border-bottom: 1px solid #edf0ea;
    color: var(--uf-ink);
    text-align: left;
    vertical-align: middle;
}

.uf-activity-table th {
    color: var(--uf-muted);
    font-size: 0.7rem;
    font-weight: 750;
    letter-spacing: 0;
    text-transform: uppercase;
}

.uf-activity-table td {
    overflow-wrap: anywhere;
}

.uf-activity-table td strong {
    display: block;
    color: var(--uf-ink);
    font-size: 0.86rem;
    line-height: 1.25;
}

.uf-activity-table th:nth-child(1),
.uf-activity-table td:nth-child(1) {
    width: 25%;
}

.uf-activity-table th:nth-child(2),
.uf-activity-table td:nth-child(2) {
    width: 35%;
}

.uf-activity-table th:nth-child(3),
.uf-activity-table td:nth-child(3) {
    width: 17%;
}

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

.uf-action--mini {
    min-height: 31px;
    padding: 0.42rem 0.62rem;
    font-size: 0.78rem;
}

@media (min-width: 681px) {
    body.admin-shell:has(.uf-page--dashboard) {
        overflow-y: hidden;
    }

    body.admin-shell:has(.uf-page--dashboard) .admin-stage {
        height: 100vh;
        overflow: hidden;
        padding-top: calc(77px + 0.35rem);
        padding-bottom: 0.35rem;
    }

    .uf-page--dashboard {
        display: block;
        height: calc(100vh - 77px - 0.7rem);
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        padding-right: 0.18rem;
        scrollbar-width: thin;
    }

    .uf-page--dashboard > * + * {
        margin-top: 0.32rem;
    }

    .uf-page--dashboard::-webkit-scrollbar {
        width: 8px;
    }

    .uf-page--dashboard::-webkit-scrollbar-thumb {
        background: rgba(24, 32, 26, 0.2);
        border-radius: 999px;
    }

    .uf-page--dashboard::-webkit-scrollbar-track {
        background: transparent;
    }

    .uf-page--dashboard .uf-page-head {
        align-items: center;
        gap: 0.75rem;
    }

    .uf-page--dashboard .uf-page-title h1 {
        font-size: 1.25rem;
        line-height: 1.05;
    }

    .uf-page--dashboard .uf-breadcrumbs {
        gap: 0.45rem;
        margin-top: 0.12rem;
        font-size: 0.78rem;
    }

    .uf-page--dashboard .uf-panel,
    .uf-page--dashboard .uf-table-card,
    .uf-page--dashboard .uf-side-card {
        padding: 0.44rem 0.58rem;
    }

    .uf-page--dashboard .uf-panel h2,
    .uf-page--dashboard .uf-table-card h2,
    .uf-page--dashboard .uf-side-card h2 {
        font-size: 0.95rem;
        line-height: 1.15;
        margin-bottom: 0.35rem;
    }

    .uf-page--dashboard > .uf-stat-grid--four,
    .uf-page--dashboard .uf-panel .uf-stat-grid--four {
        display: flex;
        flex-wrap: wrap;
        align-items: stretch;
        gap: 0.5rem;
    }

    body.admin-shell .uf-page--dashboard .uf-stat-card {
        position: relative;
        display: block;
        flex: 0 1 auto;
        width: fit-content;
        min-width: 150px;
        max-width: 224px;
        min-height: 86px;
        padding: 0.78rem 2rem 0.76rem 0.9rem;
        border: 1px solid #e4ebdf;
        border-radius: 10px;
        background: #ffffff;
        box-shadow: 0 1px 2px rgba(15, 23, 18, 0.05), 0 8px 18px rgba(15, 23, 18, 0.05);
    }

    body.admin-shell .uf-page--dashboard .uf-panel .uf-stat-card {
        min-width: 158px;
    }

    body.admin-shell .uf-page--dashboard .uf-stat-card__icon {
        position: absolute;
        top: 0.78rem;
        right: 0.82rem;
        width: 18px;
        height: 18px;
        margin: 0;
        color: #5f6b64;
    }

    body.admin-shell .uf-page--dashboard .uf-stat-card__icon .ui-icon {
        width: 18px;
        height: 18px;
    }

    body.admin-shell .uf-page--dashboard .uf-stat-card > span:not(.uf-stat-card__icon) {
        display: block;
        min-width: 0;
        margin: 0;
    }

    body.admin-shell .uf-page--dashboard .uf-stat-card small {
        display: block;
        max-width: 142px;
        color: #5b635d;
        font-size: 0.62rem;
        line-height: 1.2;
        font-weight: 800;
    }

    body.admin-shell .uf-page--dashboard .uf-stat-card strong {
        display: block;
        margin-top: 0.34rem;
        color: #060807;
        font-size: 1.05rem;
        line-height: 1;
        font-weight: 900;
    }

    body.admin-shell .uf-page--dashboard .uf-stat-card__meta {
        display: block;
        margin-top: 0.38rem;
        color: var(--uf-green);
        font-size: 0.62rem;
        line-height: 1.15;
        font-weight: 800;
    }

    body.admin-shell .uf-page--dashboard .uf-stat-card__trend {
        display: inline-flex;
        align-items: center;
        gap: 0.22rem;
    }

    body.admin-shell .uf-page--dashboard .uf-stat-card__trend::before {
        content: "\2197";
        font-size: 0.62rem;
        line-height: 1;
    }

    body.admin-shell .uf-page--dashboard .uf-stat-card__trend--down::before {
        content: "\2198";
    }

    body.admin-shell .uf-page--dashboard .uf-stat-card__meta.negative {
        color: #db1515;
    }

    .uf-page--dashboard .uf-pending-queue {
        gap: 0.32rem;
        min-height: 0;
    }

    .uf-page--dashboard .uf-pending-filter-panel {
        padding: 0.4rem 0.52rem;
    }

    .uf-page--dashboard .uf-pending-filter-list {
        gap: 0.42rem;
    }

    .uf-page--dashboard .uf-pending-filter-list button {
        min-width: auto;
        min-height: 30px;
        padding: 0.32rem 0.62rem;
        font-size: 0.74rem;
    }

    .uf-page--dashboard .uf-pending-table-card .table-wrap {
        max-height: none;
    }

    .uf-page--dashboard .uf-pending-table-card .uf-table {
        font-size: 0.72rem;
    }

    .uf-page--dashboard .uf-pending-table-card .uf-table th,
    .uf-page--dashboard .uf-pending-table-card .uf-table td {
        padding: 0.38rem 0.42rem;
    }

    .uf-page--dashboard .uf-pending-table-card .uf-pagination {
        padding-top: 0.4rem;
        font-size: 0.74rem;
    }

    .uf-page--dashboard .uf-pending-table-card .uf-action {
        min-height: 28px;
        padding: 0.26rem 0.52rem;
        font-size: 0.7rem;
    }

    .uf-page--dashboard .uf-main-grid {
        min-height: 0;
        grid-template-columns: minmax(0, 1fr) minmax(250px, 32%);
        gap: 0.55rem;
        overflow: hidden;
    }

    .uf-page--dashboard .uf-table-card {
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .uf-page--dashboard .uf-activity-table-wrap {
        flex: 1 1 auto;
        min-height: 0;
        overflow: auto;
    }

    .uf-page--dashboard .uf-activity-table {
        min-width: 0;
        font-size: 0.78rem;
    }

    .uf-page--dashboard .uf-activity-table th,
    .uf-page--dashboard .uf-activity-table td {
        padding: 0.43rem 0.45rem;
    }

    .uf-page--dashboard .uf-card-actions {
        margin-top: 0.28rem;
    }

    .uf-page--dashboard .uf-card-actions .button {
        min-height: 30px;
        padding: 0.34rem 0.68rem;
        font-size: 0.76rem;
    }

    .uf-page--dashboard .uf-side-stack {
        min-height: 0;
        display: block;
        overflow: hidden;
    }

    .uf-page--dashboard .uf-side-card {
        height: 100%;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .uf-page--dashboard .uf-mini-table-wrap {
        flex: 1 1 auto;
        min-height: 0;
        overflow: auto;
    }

    .uf-page--dashboard .uf-mini-table th,
    .uf-page--dashboard .uf-mini-table td {
        padding: 0.42rem 0.35rem;
    }

    .uf-page--dashboard .uf-mini-table {
        table-layout: fixed;
        font-size: 0.72rem;
    }

    .uf-page--dashboard .uf-mini-table th:first-child,
    .uf-page--dashboard .uf-mini-table td:first-child {
        width: auto;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .uf-page--dashboard .uf-mini-table th:nth-child(2),
    .uf-page--dashboard .uf-mini-table td:nth-child(2) {
        width: 2.25rem;
    }

    .uf-page--dashboard .uf-mini-table th:last-child,
    .uf-page--dashboard .uf-mini-table td:last-child {
        width: 3.65rem;
    }

    .uf-page--dashboard .uf-action--mini {
        min-height: 26px;
        padding: 0.25rem 0.38rem;
        font-size: 0.68rem;
    }
}

@media (min-width: 681px) and (max-width: 1200px) {
    .uf-page--dashboard .uf-main-grid {
        grid-template-columns: minmax(0, 1fr) minmax(250px, 32%);
    }

    .uf-page--dashboard .uf-side-stack {
        grid-template-columns: none;
    }
}

@media (min-width: 681px) {
    body.admin-shell:has(.uf-page--pen-form) {
        overflow-y: auto;
    }

    body.admin-shell:has(.uf-page--pen-form) .admin-stage {
        height: auto;
        min-height: 100vh;
        overflow: visible;
        padding-top: calc(77px + 0.5rem);
        padding-bottom: 0.5rem;
    }

    .uf-page--pen-form {
        height: auto;
        min-height: calc(100vh - 77px - 1rem);
        grid-template-rows: auto auto;
        gap: 0.55rem;
        overflow: visible;
    }

    .uf-page--pen-form .uf-page-head {
        align-items: center;
    }

    .uf-page--pen-form .uf-page-title h1 {
        font-size: 1.45rem;
        line-height: 1.05;
    }

    .uf-page--pen-form .uf-breadcrumbs {
        gap: 0.45rem;
        margin-top: 0.18rem;
        font-size: 0.82rem;
    }

    .uf-pen-form-grid {
        min-height: 0;
        grid-template-columns: minmax(0, 1fr);
        overflow: visible;
    }

    .uf-page--pen-form .uf-form-card {
        min-height: 0;
        display: block;
        gap: 0.65rem;
        overflow: visible;
        padding: 0.85rem 1rem;
    }

    .uf-page--pen-form .uf-form-section {
        min-height: 0;
        padding: 0;
        overflow: visible;
    }

    .uf-page--pen-form .uf-form-section h2 {
        margin-bottom: 0.6rem;
        font-size: 1.02rem;
        line-height: 1.15;
    }

    .uf-page--pen-form .uf-form-grid {
        gap: 0.62rem 1rem;
    }

    .uf-page--pen-form .uf-field {
        gap: 0.25rem;
    }

    .uf-page--pen-form .uf-field label,
    .uf-page--pen-form .uf-field span {
        font-size: 0.72rem;
    }

    .uf-page--pen-form input,
    .uf-page--pen-form select {
        min-height: 42px;
        padding: 0.5rem 0.72rem;
        font-size: 0.9rem;
    }

    .uf-page--pen-form .uf-card-actions {
        margin-top: 0.75rem;
        padding-top: 0.45rem;
    }

    .uf-page--pen-form .uf-action,
    .uf-page--pen-form .button {
        min-height: 38px;
        padding: 0.52rem 0.9rem;
        font-size: 0.82rem;
    }
}

@media (min-width: 681px) and (max-width: 980px) {
    body.admin-shell:has(.uf-page--dashboard) .admin-stage {
        padding-top: calc(73px + 0.35rem);
    }

    .uf-page--dashboard {
        height: calc(100vh - 73px - 1.35rem);
    }

    body.admin-shell:has(.uf-page--pen-form) .admin-stage {
        padding-top: calc(73px + 0.5rem);
    }

    .uf-page--pen-form {
        min-height: calc(100vh - 73px - 1rem);
    }
}

@media (max-width: 980px) {
    body.admin-shell .admin-rail {
        top: 73px !important;
        bottom: 0;
        height: calc(100vh - 73px) !important;
        max-height: calc(100vh - 73px);
    }

    body.admin-shell .admin-stage,
    body.admin-shell.admin-sidebar-collapsed .admin-stage {
        min-height: calc(100vh - 73px);
        padding-top: calc(73px + 1rem);
    }
}

@media (min-width: 681px) and (max-width: 980px) {
    body.admin-shell:has(.uf-page--dashboard) .admin-stage,
    body.admin-shell.admin-sidebar-collapsed:has(.uf-page--dashboard) .admin-stage {
        padding-top: calc(73px + 0.35rem);
    }

    .uf-page--dashboard {
        height: calc(100vh - 73px - 1.35rem);
    }

    body.admin-shell:has(.uf-page--pen-form) .admin-stage,
    body.admin-shell.admin-sidebar-collapsed:has(.uf-page--pen-form) .admin-stage {
        padding-top: calc(73px + 0.5rem);
    }

    .uf-page--pen-form {
        min-height: calc(100vh - 73px - 1rem);
    }
}

@media (max-width: 680px) {
    body.admin-shell .admin-rail {
        top: 67px !important;
        height: calc(100vh - 67px) !important;
        max-height: calc(100vh - 67px);
        overflow-y: auto;
    }

    body.admin-shell .admin-stage,
    body.admin-shell.admin-sidebar-collapsed .admin-stage {
        min-height: calc(100vh - 67px);
        padding-top: calc(67px + 0.85rem);
    }

    body.admin-shell .uf-stat-card {
        min-height: 84px;
    }
}

@media (max-height: 500px) and (min-width: 681px) {
    body.admin-shell .admin-rail {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    body.admin-shell .admin-category-nav a {
        min-height: 38px;
        font-size: 0.88rem;
    }

    body.admin-shell .admin-nav-icon,
    body.admin-shell .admin-rail-collapse-toggle__icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    body.admin-shell .admin-rail-collapse-toggle {
        min-height: 38px;
        flex-basis: 38px;
    }

    body.admin-shell .admin-signout {
        min-height: 34px;
        padding: 0.38rem 0.6rem;
    }
}

@media (min-width: 981px) {
    body.admin-shell:not(.admin-sidebar-collapsed) [data-admin-nav-toggle] {
        display: none;
    }

    body.admin-shell.admin-sidebar-collapsed [data-admin-nav-toggle] {
        display: grid;
    }

    body.admin-shell.admin-sidebar-collapsed .admin-layout {
        grid-template-columns: 0 minmax(0, 1fr);
    }

    body.admin-shell.admin-sidebar-collapsed .admin-rail {
        width: 0 !important;
        min-width: 0 !important;
        padding-right: 0;
        padding-left: 0;
        border-right: 0;
        opacity: 0;
        pointer-events: none;
        transform: translateX(-100%);
    }

    body.admin-shell.admin-sidebar-collapsed .admin-stage {
        margin-left: 0 !important;
    }
}

@media (max-width: 980px) {
    body.admin-shell.admin-nav-open [data-admin-nav-toggle] {
        display: none;
    }

    body.admin-shell:not(.admin-nav-open) [data-admin-nav-toggle] {
        display: grid;
    }
}

/* Unified admin navigation: one sidebar and collapse behavior across all admin views. */
body.admin-shell {
    --admin-topbar-h: 77px;
    --admin-rail-w: 260px;
}

body.admin-shell .admin-app-frame {
    min-height: 100dvh;
}

body.admin-shell .ufms-topbar {
    position: fixed;
    inset: 0 0 auto;
    height: var(--admin-topbar-h);
    min-height: var(--admin-topbar-h);
    z-index: 100;
}

body.admin-shell .admin-layout {
    width: 100%;
    max-width: none;
    min-height: 100dvh;
    height: 100dvh;
    display: grid;
    grid-template-columns: var(--admin-rail-w) minmax(0, 1fr);
    gap: 0;
    margin: 0;
    padding: 0;
    align-items: stretch;
}

body.admin-shell .admin-rail {
    position: fixed;
    inset: var(--admin-topbar-h) auto 0 0;
    width: var(--admin-rail-w) !important;
    min-width: var(--admin-rail-w) !important;
    height: calc(100dvh - var(--admin-topbar-h)) !important;
    max-height: calc(100dvh - var(--admin-topbar-h));
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0;
    padding: 0.7rem 0.65rem;
    border-right: 1px solid var(--uf-border);
    border-radius: 0;
    background: var(--uf-surface);
    color: var(--uf-ink);
    box-shadow: 1px 0 2px rgba(18, 27, 21, 0.04);
    opacity: 1;
    overflow: hidden;
    pointer-events: auto;
    transform: translateX(0);
    transition: width 220ms ease, min-width 220ms ease, transform 220ms ease, opacity 180ms ease;
    z-index: 70;
}

body.admin-shell .admin-category-nav {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    align-content: start;
    gap: 0.14rem;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
}

body.admin-shell .admin-category-nav a {
    min-height: 40px;
    grid-template-columns: 36px minmax(0, 1fr) 12px;
    gap: 0.52rem;
    padding: 0.16rem 0.65rem 0.16rem 0.18rem;
}

body.admin-shell .admin-category-group {
    display: grid;
    gap: 0.08rem;
}

body.admin-shell .admin-category-group--has-subnav > a {
    cursor: pointer;
}

body.admin-shell .admin-category-group--has-subnav > a::after {
    content: "\203A";
    display: block;
    color: var(--uf-muted);
    line-height: 1;
    transform: rotate(0deg);
    transition: transform 180ms ease;
}

body.admin-shell .admin-category-group--has-subnav.is-open > a::after {
    transform: rotate(90deg);
}

body.admin-shell .admin-subnav {
    max-height: 0;
    display: grid;
    gap: 0.08rem;
    margin: 0 0 0 2.05rem;
    padding-left: 0.58rem;
    border-left: 1px solid var(--uf-border);
    opacity: 0;
    overflow: hidden;
    transition: max-height 220ms ease, margin 180ms ease, opacity 180ms ease;
}

body.admin-shell .admin-category-group.is-open > .admin-subnav {
    max-height: 32rem;
    margin-top: 0.12rem;
    margin-bottom: 0.35rem;
    opacity: 1;
}

body.admin-shell .admin-subnav a {
    min-height: 32px;
    display: flex;
    align-items: center;
    padding: 0.35rem 0.55rem;
    border-radius: 6px;
    color: var(--uf-muted);
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.2;
}

body.admin-shell .admin-subnav a::after {
    content: none !important;
    display: none !important;
}

body.admin-shell .admin-subnav a:hover,
body.admin-shell .admin-subnav a:focus-visible,
body.admin-shell .admin-subnav a.active {
    background: var(--uf-active);
    color: var(--uf-green-dark);
}

body.admin-shell .admin-nav-icon {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
}

body.admin-shell .admin-stage {
    grid-column: 2;
    width: 100%;
    min-width: 0;
    min-height: 100dvh;
    height: 100dvh;
    margin-left: 0 !important;
    padding-top: calc(var(--admin-topbar-h) + 1rem);
    overflow-x: hidden;
    overflow-y: auto;
}

body.admin-shell .admin-rail-collapse-toggle {
    min-height: 40px;
    display: flex !important;
    flex: 0 0 40px;
    margin-top: auto;
}

body.admin-shell .admin-rail-collapse-toggle__icon {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
}

@media (min-width: 981px) {
    body.admin-shell:not(.admin-sidebar-collapsed) [data-admin-nav-toggle] {
        display: none !important;
    }

    body.admin-shell.admin-sidebar-collapsed [data-admin-nav-toggle] {
        display: grid !important;
    }

    body.admin-shell.admin-sidebar-collapsed .admin-layout {
        grid-template-columns: 0 minmax(0, 1fr) !important;
    }

    body.admin-shell.admin-sidebar-collapsed .admin-rail {
        width: 0 !important;
        min-width: 0 !important;
        padding-right: 0;
        padding-left: 0;
        border-right: 0;
        opacity: 0;
        overflow: hidden;
        pointer-events: none;
        transform: translateX(-100%);
    }

    body.admin-shell.admin-sidebar-collapsed .admin-subnav {
        display: none !important;
    }

    body.admin-shell.admin-sidebar-collapsed .admin-stage {
        grid-column: 2;
        margin-left: 0 !important;
    }
}

@media (max-width: 980px) {
    body.admin-shell {
        --admin-topbar-h: 73px;
        --admin-rail-w: min(84vw, 304px);
    }

    body.admin-shell .admin-layout {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body.admin-shell .admin-stage,
    body.admin-shell.admin-sidebar-collapsed .admin-stage {
        grid-column: 1;
        min-height: 100dvh;
        height: 100dvh;
        margin-left: 0 !important;
        padding-top: calc(var(--admin-topbar-h) + 1rem);
    }

    body.admin-shell .admin-rail,
    body.admin-shell.admin-sidebar-collapsed .admin-rail {
        top: var(--admin-topbar-h) !important;
        width: var(--admin-rail-w) !important;
        min-width: var(--admin-rail-w) !important;
        height: calc(100dvh - var(--admin-topbar-h)) !important;
        max-height: calc(100dvh - var(--admin-topbar-h));
        padding: 0.7rem 0.65rem;
        border-right: 1px solid var(--uf-border);
        opacity: 0;
        pointer-events: none;
        transform: translateX(-105%);
    }

    body.admin-shell.admin-nav-open {
        overflow: hidden;
    }

    body.admin-shell.admin-nav-open .admin-rail {
        opacity: 1;
        pointer-events: auto;
        transform: translateX(0);
    }

    body.admin-shell.admin-nav-open [data-admin-nav-toggle] {
        display: none !important;
    }

    body.admin-shell:not(.admin-nav-open) [data-admin-nav-toggle] {
        display: grid !important;
    }
}

@media (max-width: 680px) {
    body.admin-shell {
        --admin-topbar-h: 67px;
        --admin-rail-w: min(86vw, 300px);
    }

    body.admin-shell .admin-rail,
    body.admin-shell.admin-sidebar-collapsed .admin-rail {
        padding: 0.6rem 0.55rem;
    }

    body.admin-shell .admin-stage,
    body.admin-shell.admin-sidebar-collapsed .admin-stage {
        padding-top: calc(var(--admin-topbar-h) + 0.85rem);
    }

    body.admin-shell .admin-category-nav a {
        min-height: 42px;
    }
}

@media (max-height: 500px) and (min-width: 681px) {
    body.admin-shell .admin-rail {
        gap: 0.24rem;
        padding: 0.4rem 0.55rem;
    }

    body.admin-shell .admin-category-nav {
        gap: 0.06rem;
    }

    body.admin-shell .admin-category-nav a {
        min-height: 34px;
        padding-block: 0.08rem;
        font-size: 0.82rem;
    }

    body.admin-shell .admin-nav-icon,
    body.admin-shell .admin-rail-collapse-toggle__icon {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

    body.admin-shell .admin-category-group {
        gap: 0.04rem;
    }

    body.admin-shell .admin-category-group.is-open > .admin-subnav {
        margin-top: 0.04rem;
        margin-bottom: 0.16rem;
    }

    body.admin-shell .admin-subnav {
        gap: 0.02rem;
        margin-left: 1.85rem;
        padding-left: 0.5rem;
    }

    body.admin-shell .admin-subnav a {
        min-height: 26px;
        padding: 0.22rem 0.45rem;
        font-size: 0.72rem;
    }

    body.admin-shell .admin-rail-collapse-toggle {
        min-height: 34px;
        flex-basis: 34px;
    }
}

body.admin-shell .admin-app-frame--reference .admin-stage {
    padding-right: 1.5rem;
    padding-left: 1.5rem;
    overflow-x: hidden;
}

@media (min-width: 681px) and (max-width: 980px) {
    body.admin-shell .admin-app-frame--reference .admin-stage {
        padding-right: 1.25rem;
        padding-left: 1.25rem;
    }
}

@media (max-width: 680px) {
    body.admin-shell .admin-app-frame--reference .admin-stage {
        padding-right: 0.75rem;
        padding-left: 0.75rem;
    }

}

@media print {
    body {
        background: white;
    }

    .no-print {
        display: none !important;
    }

    .print-stage,
    .print-toolbar {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .print-sheet {
        padding: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .table-wrap {
        overflow: visible;
    }

    table {
        page-break-inside: auto;
    }

    tr,
    td,
    th {
        page-break-inside: avoid;
    }
}

.content-grid--single,
.uf-page--incident-entry .content-grid,
.uf-page--task-entry .content-grid {
    grid-template-columns: minmax(0, 1fr);
}

.uf-page--item-setup .info-list,
.uf-page--item-setup > .table-card,
.uf-page--brooding-entry .info-list .info-card:not(:first-child),
.uf-page--brooding-entry > .table-card,
.uf-page--grower-entry .info-list .info-card:not(:first-child),
.uf-page--grower-entry > .table-card,
.uf-page--incident-entry .info-list,
.uf-page--incident-entry > .table-card,
.uf-page--task-entry .info-list,
.uf-page--task-entry > .table-card {
    display: none;
}

.uf-page--brooding-entry .checklist-panel {
    display: none;
}

.summary-strip--compact {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-top: 0;
}

.summary-strip--compact .summary-tile {
    min-height: 82px;
    padding: 0.78rem 0.88rem;
}

.summary-strip--compact .summary-tile strong {
    font-size: 1.35rem;
}

.summary-strip--compact .summary-tile span {
    margin-top: 0.35rem;
    font-size: 0.82rem;
}

.uf-stat-card__icon {
    background: transparent;
    border: 0;
}

.summary-strip {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.summary-tile {
    min-height: 82px;
    padding: 0.78rem 0.88rem;
}

.summary-tile strong {
    font-size: 1.35rem;
}

.summary-tile span {
    margin-top: 0.35rem;
    font-size: 0.82rem;
}

.uf-stat-card {
    min-height: 92px;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 0.65rem;
    padding: 0.78rem 0.9rem;
}

.uf-stat-card__icon {
    width: 32px;
    height: 32px;
}

.uf-stat-card__icon img,
.uf-stat-card__icon .ui-icon {
    width: 26px;
    height: 26px;
}

.uf-stat-card strong {
    font-size: 1.16rem;
}

.uf-table-card {
    display: grid;
    gap: 0.9rem;
}

.uf-table-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.uf-table-card__header h2 {
    margin: 0;
}

.uf-table-card__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.55rem;
}

.uf-filter-card--table {
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    align-items: end;
    gap: 0.72rem;
    padding: 0.72rem;
    border-color: #dce9d7;
    background: #f8fbf6;
    box-shadow: none;
}

.uf-filter-card--table .button,
.uf-filter-card--table .uf-action {
    min-height: 42px;
    align-self: end;
    justify-content: center;
}

.uf-finance-layout {
    display: grid;
    grid-template-columns: minmax(340px, 0.9fr) minmax(0, 1.35fr);
    gap: 1rem;
    align-items: start;
}

.uf-finance-layout--entry-only {
    grid-template-columns: minmax(320px, 760px);
}

.uf-page--finance .uf-form-card {
    display: grid;
    gap: 1rem;
}

.uf-page--finance .uf-form-card [hidden] {
    display: none !important;
}

.uf-field--full {
    margin-top: 1.15rem;
}

.uf-choice-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.uf-choice-row label {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 42px;
    padding: 0.65rem 0.85rem;
    border: 1px solid #dce9d7;
    border-radius: 7px;
    background: #f8fbf6;
    color: #0f1711;
    font-size: 0.9rem;
    font-weight: 800;
}

.uf-choice-row label:has(input:checked) {
    border-color: #0a5a2c;
    background: #eef8ef;
    color: #00441f;
}

.uf-page--move-add .move-add-source-grid {
    grid-template-columns: minmax(280px, 1.35fr) minmax(140px, 0.45fr);
}

.uf-page--move-add .move-add-preview {
    display: grid;
    grid-template-columns: minmax(120px, 0.45fr) minmax(0, 1.35fr) minmax(0, 1.1fr);
    gap: 0.7rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(27, 59, 47, 0.12);
    border-radius: 8px;
    background: #ffffff;
}

.uf-page--move-add .move-add-preview.is-warning {
    border-color: rgba(217, 0, 0, 0.32);
    background: #fffafa;
}

.uf-page--move-add .move-add-preview > div {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
}

.uf-page--move-add .move-add-preview span {
    color: #6e7f76;
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.uf-page--move-add .move-add-preview strong {
    color: #173b2f;
    font-size: 0.92rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.uf-page--move-add [data-existing-destination][hidden],
.uf-page--move-add [data-new-destination][hidden] {
    display: none !important;
}

.uf-page--move-add .uf-table .status-pill {
    width: fit-content;
}

@media (max-width: 780px) {
    .uf-page--move-add .move-add-source-grid,
    .uf-page--move-add .move-add-preview {
        grid-template-columns: 1fr;
    }
}

.uf-table-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.uf-table-actions .uf-action {
    min-height: 34px;
    padding: 0.45rem 0.65rem;
    font-size: 0.76rem;
}

.uf-money-positive {
    color: #00501f;
    font-weight: 850;
}

.uf-money-negative {
    color: #d90000;
    font-weight: 850;
}

.uf-pending-filter-panel {
    padding: 0.72rem;
}

.uf-pending-filter-list {
    grid-column: 1 / -1;
}

.uf-pending-filter-list button {
    min-height: 40px;
    border-radius: 7px;
}

.uf-page--breeder-entry .info-list .info-card:first-child,
.uf-page--hatchery-entry .info-list .info-card:first-child,
.uf-page--hatchery-entry .info-list .info-card:nth-child(n+3),
.uf-page--processing-entry .info-list .info-card:first-child {
    display: none;
}

@media (min-width: 981px) {
    .uf-stat-grid--five {
        grid-template-columns: repeat(5, minmax(130px, 1fr));
    }

    .uf-stat-grid--five .uf-stat-card {
        min-height: 92px;
        grid-template-columns: 30px minmax(0, 1fr);
        gap: 0.65rem;
        padding: 0.75rem 0.85rem;
    }

    .uf-stat-grid--five .uf-stat-card__icon {
        width: 30px;
        height: 30px;
    }

    .uf-stat-grid--five .uf-stat-card__icon .ui-icon {
        width: 24px;
        height: 24px;
    }

    .uf-stat-grid--five .uf-stat-card strong {
        font-size: 1.05rem;
    }
}

.uf-stat-grid,
.uf-stat-grid--five,
.uf-stat-grid--six,
body.admin-shell .uf-page .uf-stat-grid,
body.admin-shell .uf-page .uf-stat-grid--five,
body.admin-shell .uf-page .uf-stat-grid--six {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.62rem;
}

.summary-strip,
.summary-strip--compact {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.62rem;
}

.uf-stat-card,
body.admin-shell .uf-page .uf-stat-card {
    position: relative;
    display: block;
    flex: 0 1 auto;
    width: fit-content;
    min-width: 116px;
    max-width: 198px;
    min-height: 86px;
    padding: 0.76rem 1.85rem 0.74rem 0.82rem;
    border: 1px solid #e4ebdf;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 18, 0.05), 0 8px 18px rgba(15, 23, 18, 0.05);
}

.uf-stat-grid--five,
body.admin-shell .uf-page .uf-stat-grid--five {
    gap: 0.35rem;
}

.uf-stat-grid--five .uf-stat-card,
body.admin-shell .uf-page .uf-stat-grid--five .uf-stat-card {
    min-width: 104px;
    max-width: 158px;
    min-height: 82px;
    padding: 0.7rem 1.55rem 0.68rem 0.7rem;
}

.uf-stat-grid--five .uf-stat-card small,
body.admin-shell .uf-page .uf-stat-grid--five .uf-stat-card small {
    max-width: 102px;
    font-size: 0.58rem;
}

.uf-stat-grid--five .uf-stat-card strong,
body.admin-shell .uf-page .uf-stat-grid--five .uf-stat-card strong {
    font-size: 0.92rem;
}

.uf-stat-grid--no-icons .uf-stat-card,
body.admin-shell .uf-page .uf-stat-grid--no-icons .uf-stat-card {
    padding-right: 0.82rem;
}

.uf-stat-grid--no-icons .uf-stat-card__icon {
    display: none;
}

.summary-tile,
.summary-strip--compact .summary-tile {
    flex: 0 1 auto;
    width: fit-content;
    min-width: 132px;
    max-width: 250px;
    min-height: 86px;
    padding: 0.78rem 0.9rem 0.76rem;
    border: 1px solid #e4ebdf;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 18, 0.05), 0 8px 18px rgba(15, 23, 18, 0.05);
}

.uf-stat-card__icon,
body.admin-shell .uf-page .uf-stat-card__icon {
    position: absolute;
    top: 0.78rem;
    right: 0.74rem;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #5f6b64;
}

.uf-stat-card__icon img,
.uf-stat-card__icon .ui-icon,
body.admin-shell .uf-page .uf-stat-card__icon img,
body.admin-shell .uf-page .uf-stat-card__icon .ui-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.uf-stat-card > span:not(.uf-stat-card__icon),
body.admin-shell .uf-page .uf-stat-card > span:not(.uf-stat-card__icon) {
    display: block;
    min-width: 0;
    margin: 0;
}

.uf-stat-card small,
body.admin-shell .uf-page .uf-stat-card small {
    display: block;
    max-width: 122px;
    color: #5b635d;
    font-size: 0.62rem;
    line-height: 1.2;
    font-weight: 800;
}

.uf-stat-card strong,
body.admin-shell .uf-page .uf-stat-card strong,
.summary-tile strong,
.summary-strip--compact .summary-tile strong {
    display: block;
    margin-top: 0.34rem;
    color: #060807;
    font-size: 1.05rem;
    line-height: 1;
    font-weight: 900;
}

.summary-tile strong,
.summary-strip--compact .summary-tile strong {
    margin-top: 0;
}

.uf-stat-card__meta,
.uf-stat-card span.uf-stat-card__meta,
body.admin-shell .uf-page .uf-stat-card__meta,
body.admin-shell .uf-page .uf-stat-card span.uf-stat-card__meta,
.summary-tile span,
.summary-strip--compact .summary-tile span {
    display: block;
    margin-top: 0.38rem;
    color: var(--uf-green);
    font-size: 0.62rem;
    line-height: 1.15;
    font-weight: 800;
}

.uf-stat-card__trend,
.uf-stat-card span.uf-stat-card__trend,
body.admin-shell .uf-page .uf-stat-card__trend,
body.admin-shell .uf-page .uf-stat-card span.uf-stat-card__trend {
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
}

.uf-stat-card__trend::before,
body.admin-shell .uf-page .uf-stat-card__trend::before {
    content: "\2197";
    font-size: 0.62rem;
    line-height: 1;
}

.uf-stat-card__trend--down::before,
body.admin-shell .uf-page .uf-stat-card__trend--down::before {
    content: "\2198";
}

.uf-stat-card__meta.negative,
.uf-stat-card span.uf-stat-card__meta.negative,
body.admin-shell .uf-page .uf-stat-card__meta.negative,
body.admin-shell .uf-page .uf-stat-card span.uf-stat-card__meta.negative {
    color: #db1515;
}

@media (max-width: 680px) {
    .uf-stat-grid,
    .uf-stat-grid--five,
    .uf-stat-grid--six,
    .summary-strip,
    .summary-strip--compact {
        gap: 0.55rem;
    }

    .uf-stat-card,
    body.admin-shell .uf-page .uf-stat-card,
    .summary-tile,
    .summary-strip--compact .summary-tile {
        min-width: min(100%, 150px);
        max-width: min(100%, 220px);
    }
}

body.admin-shell:has(.uf-dashboard-preview) .admin-stage {
    padding: calc(var(--admin-topbar-h) + 0.38rem) 0.52rem 0.8rem;
    background: #ffffff;
}

body.admin-shell:has(.uf-dashboard-preview) .admin-main {
    gap: 0;
    background: #ffffff;
}

body.admin-shell:has(.uf-dashboard-preview) .ufms-topbar-icon--badged {
    display: none;
}

.uf-dashboard-preview {
    --ufdp-bg: #ffffff;
    --ufdp-panel: #ffffff;
    --ufdp-green: #043d1f;
    --ufdp-green-soft: #0f6b37;
    --ufdp-gold: #e5b523;
    --ufdp-text: #17231b;
    --ufdp-muted: #69736c;
    --ufdp-border: #dde6dd;
    --ufdp-inner-border: #edf2ed;
    --ufdp-red: #cf2626;
    --ufdp-shadow: 0 14px 32px rgba(8, 31, 17, 0.08);
    --ufdp-card-shadow: 0 1px 2px rgba(8, 31, 17, 0.05);
    --ufdp-section-gap: 0.56rem;
    --ufdp-panel-pad: 0.68rem;
    display: grid;
    gap: var(--ufdp-section-gap);
    min-height: 100%;
    width: 100%;
    max-width: none;
    padding: 0;
    color: var(--ufdp-text);
    background: transparent;
}

.uf-dashboard-preview *,
.uf-dashboard-preview *::before,
.uf-dashboard-preview *::after {
    box-sizing: border-box;
}

.ufdp-header,
.ufdp-panel {
    border: 1px solid var(--ufdp-border);
    border-radius: 8px;
    background: var(--ufdp-panel);
    box-shadow: var(--ufdp-shadow);
}

.ufdp-header {
    display: grid;
    align-items: start;
    gap: 0.25rem;
    padding: var(--ufdp-panel-pad) 0.78rem;
}

.ufdp-header h1,
.ufdp-panel h2,
.ufdp-chart-head h2 {
    margin: 0;
    color: var(--ufdp-text);
    font-size: 1.04rem;
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: 0;
}

.ufdp-header span,
.ufdp-note,
.ufdp-card-empty,
.ufdp-table-count {
    color: var(--ufdp-muted);
    font-size: 0.72rem;
    line-height: 1.35;
    font-weight: 700;
}

.ufdp-kicker,
.ufdp-section-label {
    display: block;
    margin: 0 0 0.22rem;
    color: var(--ufdp-green-soft);
    font-size: 0.68rem;
    line-height: 1;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.ufdp-section-label--gold {
    color: var(--ufdp-gold);
}

.ufdp-header__link,
.ufdp-row-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.45rem 0.72rem;
    border: 1px solid rgba(4, 61, 31, 0.16);
    border-radius: 7px;
    color: var(--ufdp-green);
    background: #f7fbf7;
    font-size: 0.72rem;
    line-height: 1;
    font-weight: 900;
    text-decoration: none;
}

.ufdp-header__link:hover,
.ufdp-row-action:hover {
    border-color: var(--ufdp-green-soft);
    color: #ffffff;
    background: var(--ufdp-green);
}

.ufdp-panel {
    min-width: 0;
    padding: var(--ufdp-panel-pad);
    overflow: hidden;
}

.ufdp-panel-head,
.ufdp-chart-head,
.ufdp-table-head,
.ufdp-card-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.ufdp-panel-head--tight {
    align-items: center;
}

.ufdp-head-icon,
.ufdp-registry-card__icon,
.ufdp-summary-card > span {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
    border-radius: 7px;
    color: var(--ufdp-green);
    background: #eef7ef;
}

.ufdp-bi {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}

.ufdp-top-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(282px, 28vw, 360px);
    gap: var(--ufdp-section-gap);
}

.ufdp-active-birds-panel {
    display: grid;
    align-content: start;
    gap: 0.72rem;
}

.ufdp-active-birds-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(126px, 1fr);
    gap: 0.58rem;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    scrollbar-color: rgba(4, 61, 31, 0.25) transparent;
}

.ufdp-mini-card,
.ufdp-registry-card,
.ufdp-summary-card {
    position: relative;
    min-width: 0;
    border: 1px solid var(--ufdp-inner-border);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--ufdp-card-shadow);
}

.ufdp-mini-card {
    display: grid;
    align-content: start;
    gap: 0.42rem;
    min-height: 4.35rem;
    padding: 0.66rem 0.72rem;
}

.ufdp-mini-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    min-width: 0;
}

.ufdp-mini-card__icon {
    display: inline-grid;
    place-items: center;
    width: 1.12rem;
    height: 1.12rem;
    flex: 0 0 auto;
    color: var(--ufdp-muted);
}

.ufdp-mini-card__icon .ufdp-bi {
    width: 0.86rem;
    height: 0.86rem;
}

.ufdp-mini-card span,
.ufdp-mini-card small,
.ufdp-registry-card small,
.ufdp-registry-card span,
.ufdp-summary-card small,
.ufdp-summary-card em,
.ufdp-card-title span,
.ufdp-stock-row small,
.ufdp-two-metrics small,
.ufdp-detail-grid dt {
    color: var(--ufdp-muted);
    font-size: 0.68rem;
    line-height: 1.18;
    font-weight: 800;
    font-style: normal;
}

.ufdp-mini-card strong,
.ufdp-registry-card strong,
.ufdp-summary-card strong,
.ufdp-card-title strong,
.ufdp-stock-row strong,
.ufdp-two-metrics strong,
.ufdp-detail-grid dd {
    display: block;
    margin-top: 0.28rem;
    color: var(--ufdp-green);
    font-size: 1.08rem;
    line-height: 1;
    font-weight: 950;
    letter-spacing: 0;
}

.ufdp-mini-card small {
    display: block;
    margin-top: 0;
}

.ufdp-egg-registry {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 0.58rem;
    align-content: stretch;
}

.ufdp-egg-registry .ufdp-section-label {
    font-size: 0.78rem;
}

.ufdp-production-tabs {
    display: flex;
    gap: 0.34rem;
    overflow-x: auto;
    padding-bottom: 0.12rem;
    scrollbar-color: rgba(4, 61, 31, 0.22) transparent;
}

.ufdp-production-tabs button {
    min-height: 1.78rem;
    padding: 0.3rem 0.52rem;
    flex: 0 0 auto;
    border: 1px solid var(--ufdp-border);
    border-radius: 7px;
    color: var(--ufdp-muted);
    background: #ffffff;
    font: inherit;
    font-size: 0.62rem;
    line-height: 1;
    font-weight: 900;
    cursor: pointer;
}

.ufdp-production-tabs button:hover,
.ufdp-production-tabs button:focus-visible {
    border-color: var(--ufdp-green-soft);
    color: var(--ufdp-green);
}

.ufdp-production-tabs button.is-active {
    border-color: var(--ufdp-green);
    color: #ffffff;
    background: var(--ufdp-green);
}

.ufdp-registry-cards {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.4rem;
    overflow-x: auto;
    min-height: 0;
    scrollbar-color: rgba(4, 61, 31, 0.22) transparent;
}

.ufdp-registry-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1.1rem;
    grid-template-areas:
        "title icon"
        "value value"
        "note note";
    column-gap: 0.42rem;
    row-gap: 0.24rem;
    align-content: center;
    align-items: center;
    flex: 1 1 0;
    min-width: 5.95rem;
    min-height: 100%;
    padding: 0.56rem 0.62rem;
}

.ufdp-registry-card__icon {
    grid-area: icon;
    justify-self: end;
    width: 1rem;
    height: 1rem;
    margin-bottom: 0;
    color: var(--ufdp-muted);
    background: transparent;
}

.ufdp-registry-card__icon .ufdp-bi {
    width: 0.86rem;
    height: 0.86rem;
}

.ufdp-registry-card small {
    grid-area: title;
    min-width: 0;
    font-size: 0.6rem;
    white-space: normal;
    overflow-wrap: anywhere;
}

.ufdp-registry-card strong {
    grid-area: value;
    color: var(--ufdp-green);
    font-size: 0.9rem;
    line-height: 1.1;
    margin-top: 0;
}

.ufdp-registry-card span:not(.ufdp-registry-card__icon) {
    grid-area: note;
    display: block;
    margin-top: 0;
    font-size: 0.58rem;
    overflow-wrap: anywhere;
}

.ufdp-registry-card.is-reconciliation-warning strong,
.ufdp-registry-card.is-reconciliation-warning span:not(.ufdp-registry-card__icon) {
    color: var(--ufdp-red);
}

.ufdp-note {
    margin: 0;
}

.ufdp-chart-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(144px, 11.8vw, 168px);
    gap: var(--ufdp-section-gap);
}

.ufdp-chart-panel {
    min-height: 23.35rem;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}

.ufdp-chart-head {
    align-items: center;
    margin-bottom: 0.56rem;
}

.ufdp-control-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.ufdp-control-row label,
.ufdp-wide-select {
    display: grid;
    gap: 0.22rem;
    min-width: 112px;
}

.ufdp-control-row label {
    min-width: 124px;
}

.ufdp-control-row span,
.ufdp-wide-select span {
    color: var(--ufdp-muted);
    font-size: 0.62rem;
    line-height: 1;
    font-weight: 900;
    text-transform: uppercase;
}

.ufdp-control-row select,
.ufdp-wide-select select {
    width: 100%;
    min-height: 2.18rem;
    border: 1px solid var(--ufdp-border);
    border-radius: 7px;
    color: var(--ufdp-text);
    background: #ffffff;
    font-size: 0.76rem;
    font-weight: 850;
}

.ufdp-control-row select {
    min-height: 2rem;
    padding: 0 0.56rem;
    box-shadow: var(--ufdp-card-shadow);
}

.ufdp-control-row select:focus-visible,
.ufdp-wide-select select:focus-visible {
    outline: 2px solid rgba(15, 107, 55, 0.22);
    outline-offset: 2px;
    border-color: rgba(15, 107, 55, 0.42);
}

.ufdp-chart-canvas {
    position: relative;
    min-height: clamp(15.75rem, 34vw, 20rem);
    border: 1px solid var(--ufdp-inner-border);
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.ufdp-chart-canvas svg {
    display: block;
    width: 100%;
    height: clamp(15.75rem, 34vw, 20rem);
}

.ufdp-chart-gridline {
    stroke: #e4ece4;
    stroke-width: 1;
}

.ufdp-chart-axis-line {
    stroke: #cfdbcf;
    stroke-width: 1;
}

.ufdp-chart-axis-label {
    fill: #7a847d;
    font-size: 0.64rem;
    font-weight: 800;
}

.ufdp-chart-axis-title {
    fill: var(--ufdp-muted);
    font-size: 0.66rem;
    font-weight: 900;
    text-transform: uppercase;
}

.ufdp-chart-area {
    fill: rgba(15, 107, 55, 0.1);
}

.ufdp-chart-line {
    stroke: var(--ufdp-green-soft);
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ufdp-chart-point {
    fill: #ffffff;
    stroke: var(--ufdp-gold);
    stroke-width: 2.6;
}

.ufdp-chart-point--latest {
    fill: var(--ufdp-green);
    stroke: #ffffff;
    stroke-width: 2.4;
}

.ufdp-chart-empty {
    position: absolute;
    inset: 0;
    display: none;
    place-items: center;
    color: var(--ufdp-muted);
    font-size: 0.82rem;
    font-weight: 900;
    text-align: center;
    background: rgba(255, 255, 255, 0.82);
}

.ufdp-chart-empty.is-visible {
    display: grid;
}

.ufdp-chart-summary {
    display: grid;
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: var(--ufdp-section-gap);
}

.ufdp-summary-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1.2rem;
    grid-template-areas:
        "title icon"
        "value value"
        "note note";
    row-gap: 0.32rem;
    column-gap: 0.5rem;
    min-height: 6.9rem;
    padding: 0.72rem;
    align-content: start;
}

.ufdp-summary-card > span {
    grid-area: icon;
    justify-self: end;
    width: 1.16rem;
    height: 1.16rem;
    color: var(--ufdp-muted);
    background: transparent;
}

.ufdp-summary-card > span .ufdp-bi {
    width: 0.9rem;
    height: 0.9rem;
}

.ufdp-summary-card small {
    grid-area: title;
}

.ufdp-summary-card strong {
    grid-area: value;
    margin-top: 0;
    color: var(--ufdp-text);
    font-size: 1rem;
    line-height: 1.15;
    white-space: nowrap;
}

.ufdp-summary-card em {
    grid-area: note;
    display: block;
    margin-top: 0;
}

.ufdp-daily-grid {
    display: grid;
    grid-template-columns: 42px 210px minmax(300px, 1fr) 260px;
    grid-template-rows: auto auto;
    gap: var(--ufdp-section-gap);
}

.ufdp-daily-grid .ufdp-panel {
    padding: var(--ufdp-panel-pad);
}

.ufdp-daily-rail {
    display: grid;
    grid-row: 1 / 3;
    place-items: center;
    border-radius: 8px;
    color: #ffffff;
    background: var(--ufdp-green);
    font-size: 0.82rem;
    font-weight: 950;
    letter-spacing: 0;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.ufdp-pen-selector-card {
    display: grid;
    grid-column: 2;
    grid-row: 1;
    gap: 0.48rem;
}

.ufdp-pen-chips {
    display: flex;
    gap: 0.36rem;
    overflow-x: auto;
    padding-bottom: 0.05rem;
}

.ufdp-pen-chips button,
.ufdp-filter-chips button {
    min-height: 1.78rem;
    padding: 0.32rem 0.56rem;
    border: 1px solid var(--ufdp-border);
    border-radius: 7px;
    color: var(--ufdp-muted);
    background: #ffffff;
    font-size: 0.72rem;
    font-weight: 900;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: var(--ufdp-card-shadow);
}

.ufdp-pen-chips button.is-active,
.ufdp-filter-chips button.is-active {
    border-color: var(--ufdp-green);
    color: #ffffff;
    background: var(--ufdp-green);
}

.ufdp-pen-chips button:disabled {
    cursor: default;
}

.ufdp-pen-chips button.is-empty {
    border-color: #dfe8df;
    color: var(--ufdp-muted);
    background: #f8fbf8;
}

.ufdp-pen-meta {
    display: grid;
    gap: 0;
    padding: 0.1rem 0.52rem;
    border: 1px solid var(--ufdp-inner-border);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--ufdp-card-shadow);
}

.ufdp-pen-meta span {
    display: flex;
    justify-content: space-between;
    gap: 0.58rem;
    padding: 0.34rem 0;
    border-bottom: 1px solid var(--ufdp-inner-border);
    color: var(--ufdp-muted);
    font-size: 0.66rem;
    line-height: 1.2;
    font-weight: 850;
}

.ufdp-pen-meta span:last-child {
    border-bottom: 0;
}

.ufdp-pen-meta strong {
    color: var(--ufdp-green);
}

.ufdp-batch-card,
.ufdp-egg-card,
.ufdp-feed-card {
    display: grid;
    align-content: start;
    gap: 0.56rem;
}

.ufdp-batch-card {
    grid-column: 3;
    grid-row: 1;
}

.ufdp-egg-card {
    grid-column: 2;
    grid-row: 2;
}

.ufdp-feed-card {
    grid-column: 3;
    grid-row: 2;
}

.ufdp-stock-row,
.ufdp-two-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.56rem;
}

.ufdp-stock-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    min-height: 4.18rem;
    gap: 1.55rem;
    padding: 0 0.1rem;
}

.ufdp-stock-row::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0.72rem;
    right: 0.72rem;
    z-index: 1;
    height: 3px;
    border-radius: 999px;
    background: var(--ufdp-gold);
    transform: translateY(-50%);
}

.ufdp-stock-row::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 4;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--ufdp-green);
    transform: translate(-50%, -50%);
}

.ufdp-stock-row > div,
.ufdp-two-metrics > div {
    position: relative;
    z-index: 2;
    min-width: 0;
    padding: 0.62rem;
    border: 1px solid var(--ufdp-inner-border);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--ufdp-card-shadow);
}

.ufdp-stock-row > div {
    width: max-content;
    min-width: 7.55rem;
    flex: 0 0 auto;
}

.ufdp-mortality-strip {
    display: grid;
    justify-items: center;
    gap: 0.2rem;
    padding-top: 0.05rem;
    color: var(--ufdp-muted);
    font-size: 0.88rem;
    font-weight: 850;
    text-align: center;
}

.ufdp-mortality-strip span {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.24rem;
}

.ufdp-mortality-strip strong {
    color: var(--ufdp-red);
    font-size: 0.96rem;
}

.ufdp-identity-card {
    grid-column: 4;
    grid-row: 1 / 3;
}

.ufdp-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.82rem 0.7rem;
    margin: 0.72rem 0 0;
}

.ufdp-detail-grid div {
    min-width: 0;
    display: grid;
    grid-template-columns: 1.7rem minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 0.5rem;
    align-items: start;
    padding: 0.04rem 0;
    border-radius: 0;
    background: transparent;
}

.ufdp-detail-grid dt,
.ufdp-detail-grid dd {
    margin: 0;
}

.ufdp-detail-icon {
    display: grid;
    grid-row: 1 / 3;
    place-items: center;
    width: 1.42rem;
    height: 1.42rem;
    border-radius: 6px;
    color: var(--ufdp-gold);
    background: #fff8dd;
}

.ufdp-detail-icon .ufdp-bi {
    width: 0.78rem;
    height: 0.78rem;
}

.ufdp-detail-grid dd {
    color: var(--ufdp-green);
    font-size: 0.9rem;
    line-height: 1.18;
}

.ufdp-card-empty {
    margin: 0;
    padding: 0.78rem;
    border: 1px solid var(--ufdp-inner-border);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--ufdp-card-shadow);
}

.ufdp-pending-panel {
    display: grid;
    gap: 0.72rem;
}

.ufdp-table-head {
    align-items: center;
    padding-bottom: 0.06rem;
}

.ufdp-table-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
    min-width: 0;
}

.ufdp-search {
    display: flex;
    align-items: center;
    gap: 0.46rem;
    min-width: min(100%, 320px);
    min-height: 2.4rem;
    padding: 0 0.65rem;
    border: 1px solid var(--ufdp-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ufdp-muted);
    box-shadow: var(--ufdp-card-shadow);
}

.ufdp-search .ufdp-bi {
    width: 0.86rem;
    height: 0.86rem;
}

.ufdp-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--ufdp-text);
    font-size: 0.78rem;
    font-weight: 760;
    background: transparent;
}

.ufdp-search input::placeholder {
    color: #8b948e;
}

.ufdp-filter-chips {
    display: flex;
    flex: 1 1 auto;
    gap: 0.38rem;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 0.05rem;
}

.ufdp-filter-chips button {
    font-size: 0.68rem;
}

.ufdp-table-wrap {
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid var(--ufdp-inner-border);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--ufdp-card-shadow);
}

.ufdp-table {
    width: 100%;
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.ufdp-table th {
    padding: 0.7rem 0.76rem;
    border-bottom: 1px solid var(--ufdp-border);
    color: var(--ufdp-muted);
    background: #f7faf7;
    font-size: 0.68rem;
    line-height: 1;
    font-weight: 950;
    text-align: left;
    text-transform: uppercase;
}

.ufdp-table th:last-child,
.ufdp-table td:last-child {
    text-align: right;
}

.ufdp-table td {
    padding: 0.78rem 0.76rem;
    border-bottom: 1px solid var(--ufdp-inner-border);
    color: var(--ufdp-text);
    font-size: 0.76rem;
    line-height: 1.3;
    font-weight: 760;
    vertical-align: top;
    background: #ffffff;
}

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

.ufdp-table tbody tr:nth-child(even) td {
    background: #fcfdfc;
}

.ufdp-table tbody tr:hover td {
    background: #f8fbf8;
}

.ufdp-table-empty td {
    padding: 1.1rem 0.76rem;
    color: var(--ufdp-muted);
    font-weight: 850;
    text-align: center;
    background: #ffffff;
}

.ufdp-table td strong,
.ufdp-table td span {
    display: block;
}

.ufdp-table td strong {
    color: var(--ufdp-text);
    font-size: 0.78rem;
    line-height: 1.15;
    font-weight: 950;
}

.ufdp-table td span {
    max-width: 42rem;
    margin-top: 0.18rem;
    color: var(--ufdp-muted);
    font-size: 0.7rem;
}

.ufdp-table td:nth-child(2),
.ufdp-table td:nth-child(3),
.ufdp-table td:nth-child(4) {
    color: #4f5b53;
    font-weight: 850;
    white-space: nowrap;
}

.ufdp-priority {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    min-height: 1.55rem;
    padding: 0.24rem 0.52rem;
    border-radius: 999px;
    color: var(--ufdp-green);
    background: #eef7ef;
    font-size: 0.68rem;
    font-weight: 950;
    white-space: nowrap;
}

.ufdp-priority::before {
    content: "";
    width: 0.36rem;
    height: 0.36rem;
    border-radius: 999px;
    background: currentColor;
}

.ufdp-priority--critical {
    color: #a71919;
    background: #fff0ee;
}

.ufdp-priority--warning {
    color: #8a6500;
    background: #fff7d6;
}

.ufdp-pending-panel .ufdp-row-action {
    min-height: 1.8rem;
    padding: 0.4rem 0.62rem;
    border-color: #dce8dc;
    background: #ffffff;
    box-shadow: var(--ufdp-card-shadow);
}

.ufdp-table-count {
    margin: -0.18rem 0 0;
    text-align: right;
}

.uf-dashboard-preview [hidden] {
    display: none !important;
}

@media (max-width: 1100px) {
    body.admin-shell:has(.uf-dashboard-preview) .admin-stage,
    body.admin-shell.admin-sidebar-collapsed:has(.uf-dashboard-preview) .admin-stage {
        padding: calc(var(--admin-topbar-h) + 0.32rem) 0.4rem 0.75rem;
        background: #ffffff;
    }

    .uf-dashboard-preview {
        gap: var(--ufdp-section-gap);
        padding: 0;
    }

    .ufdp-panel {
        padding: var(--ufdp-panel-pad);
    }

    .ufdp-header {
        padding: 0.62rem 0.72rem;
    }

    .ufdp-header h1,
    .ufdp-panel h2,
    .ufdp-chart-head h2 {
        font-size: 0.96rem;
    }

    .ufdp-top-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--ufdp-section-gap);
    }

    .ufdp-chart-grid {
        grid-template-columns: minmax(0, 1fr) 150px;
        gap: var(--ufdp-section-gap);
    }

    .ufdp-daily-grid {
        grid-template-columns: 34px 160px minmax(190px, 1fr) 190px;
        gap: 0.4rem;
    }

    .ufdp-active-birds-scroll {
        grid-auto-columns: minmax(112px, 1fr);
    }

    .ufdp-registry-card {
        min-height: 4.45rem;
    }

    .ufdp-control-row label {
        min-width: 88px;
    }

    .ufdp-control-row select,
    .ufdp-wide-select select {
        min-height: 1.92rem;
        font-size: 0.7rem;
    }

    .ufdp-chart-panel {
        min-height: 20.9rem;
    }

    .ufdp-chart-canvas {
        min-height: clamp(15rem, 48vw, 17.75rem);
    }

    .ufdp-chart-canvas svg {
        height: clamp(15rem, 48vw, 17.75rem);
    }

    .ufdp-summary-card {
        min-height: 5.95rem;
        padding: 0.52rem;
    }

    .ufdp-summary-card strong {
        font-size: 0.94rem;
    }

    .ufdp-daily-grid .ufdp-panel {
        padding: 0.56rem;
    }

    .ufdp-pen-selector-card {
        gap: 0.3rem;
    }

    .ufdp-detail-grid {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .ufdp-detail-grid div {
        padding: 0.42rem;
    }
}

@media (max-width: 900px) {
    .ufdp-top-grid,
    .ufdp-chart-grid,
    .ufdp-daily-grid {
        grid-template-columns: 1fr;
    }

    .ufdp-daily-grid {
        grid-template-rows: auto;
    }

    .ufdp-daily-rail,
    .ufdp-pen-selector-card,
    .ufdp-batch-card,
    .ufdp-egg-card,
    .ufdp-feed-card,
    .ufdp-identity-card {
        grid-column: auto;
        grid-row: auto;
    }

    .ufdp-daily-rail {
        min-height: 2.6rem;
        writing-mode: horizontal-tb;
        transform: none;
    }
}

@media (max-width: 720px) {
    body.admin-shell:has(.uf-dashboard-preview) .admin-stage,
    body.admin-shell.admin-sidebar-collapsed:has(.uf-dashboard-preview) .admin-stage {
        padding-inline: 0.32rem;
        background: #ffffff;
    }

    .uf-dashboard-preview {
        padding: 0;
    }

    .ufdp-header,
    .ufdp-chart-head,
    .ufdp-table-head {
        align-items: stretch;
        flex-direction: column;
    }

    .ufdp-top-grid,
    .ufdp-chart-grid,
    .ufdp-daily-grid,
    .ufdp-stock-row,
    .ufdp-two-metrics,
    .ufdp-detail-grid {
        grid-template-columns: 1fr;
    }

    .ufdp-control-row {
        justify-content: stretch;
    }

    .ufdp-control-row label {
        min-width: min(100%, 180px);
        flex: 1 1 10rem;
    }

    .ufdp-table-controls {
        align-items: stretch;
        flex-direction: column;
        gap: 0.62rem;
    }

    .ufdp-search {
        width: 100%;
        min-width: 0;
    }

    .ufdp-filter-chips {
        width: 100%;
    }

    .ufdp-table-count {
        text-align: left;
    }

    .ufdp-stock-row::before {
        left: 0.72rem;
        right: 0.72rem;
        height: 2px;
    }

    .ufdp-stock-row::after {
        width: 7px;
        height: 7px;
    }

    .ufdp-daily-rail {
        order: 1;
    }

    .ufdp-pen-selector-card {
        order: 2;
    }

    .ufdp-egg-card {
        order: 3;
    }

    .ufdp-batch-card {
        order: 4;
    }

    .ufdp-identity-card {
        order: 5;
    }

    .ufdp-feed-card {
        order: 6;
    }
}

/* Dashboard reference system: shared admin pages inherit the promoted dashboard look. */
body.admin-shell {
    --uf-shell-bg: #ffffff;
    --uf-surface: #ffffff;
    --uf-surface-muted: #f7fbf7;
    --uf-hover: #f3f8f3;
    --uf-active: #eef7ef;
    --uf-green: #043d1f;
    --uf-green-dark: #043d1f;
    --uf-muted: #69736c;
    --uf-ink: #17231b;
    --uf-border: #dde6dd;
    --uf-border-strong: #cad9ca;
    --uf-ring: rgba(15, 107, 55, 0.18);
    --uf-card-shadow: 0 1px 2px rgba(8, 31, 17, 0.05);
    --uf-card-shadow-hover: 0 12px 28px rgba(8, 31, 17, 0.08);
    background: #ffffff;
}

body.admin-shell .admin-app-frame,
body.admin-shell .admin-stage,
body.admin-shell .admin-main {
    background: #ffffff;
}

body.admin-shell .page-banner,
body.admin-shell .table-card,
body.admin-shell .info-card,
body.admin-shell .stats-card,
body.admin-shell .summary-tile,
body.admin-shell .panel-muted,
body.admin-shell .list-card,
body.admin-shell .alert-card,
body.admin-shell .uf-filter-card,
body.admin-shell .uf-panel,
body.admin-shell .uf-table-card,
body.admin-shell .uf-side-card,
body.admin-shell .uf-form-card,
body.admin-shell .flash-card,
body.admin-shell .checklist-panel,
body.admin-shell .subdued {
    border: 1px solid var(--uf-border);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(8, 31, 17, 0.05);
    backdrop-filter: none;
}

body.admin-shell .page-banner {
    display: grid;
    gap: 0.76rem;
    padding: 0.82rem 0.9rem;
}

body.admin-shell .table-card,
body.admin-shell .info-card,
body.admin-shell .stats-card,
body.admin-shell .panel-muted,
body.admin-shell .uf-filter-card,
body.admin-shell .uf-panel,
body.admin-shell .uf-table-card,
body.admin-shell .uf-side-card,
body.admin-shell .uf-form-card {
    padding: 0.82rem;
}

body.admin-shell .summary-tile,
body.admin-shell .list-card,
body.admin-shell .alert-card,
body.admin-shell .checklist-panel,
body.admin-shell .subdued {
    padding: 0.74rem 0.82rem;
}

body.admin-shell .page-banner .eyebrow,
body.admin-shell .table-card .eyebrow,
body.admin-shell .info-card .eyebrow,
body.admin-shell .panel-muted .eyebrow,
body.admin-shell .uf-page .eyebrow,
body.admin-shell .section-head .eyebrow {
    margin: 0 0 0.22rem;
    color: #0f6b37;
    font-size: 0.68rem;
    line-height: 1;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

body.admin-shell .page-banner h2,
body.admin-shell .section-head h2,
body.admin-shell .panel-muted h3,
body.admin-shell .info-card h2,
body.admin-shell .table-card h2,
body.admin-shell .uf-panel h2,
body.admin-shell .uf-table-card h2,
body.admin-shell .uf-page-title h1 {
    margin: 0;
    color: var(--uf-ink);
    font-size: 1.04rem;
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: 0;
}

body.admin-shell .uf-page-title h1 {
    font-size: 1.28rem;
}

body.admin-shell .page-banner p,
body.admin-shell .info-card p,
body.admin-shell .panel-muted p,
body.admin-shell .list-card p,
body.admin-shell .muted-note {
    color: var(--uf-muted);
    font-size: 0.82rem;
    line-height: 1.42;
}

body.admin-shell .summary-strip,
body.admin-shell .summary-strip--compact,
body.admin-shell .uf-stat-grid,
body.admin-shell .uf-stat-grid--five,
body.admin-shell .uf-stat-grid--six {
    gap: 0.56rem;
}

body.admin-shell .summary-tile {
    min-height: 5rem;
    align-content: start;
}

body.admin-shell .summary-tile strong,
body.admin-shell .uf-stat-card strong {
    color: var(--uf-green);
    font-size: 1.08rem;
    line-height: 1;
    font-weight: 950;
}

body.admin-shell .summary-tile span,
body.admin-shell .uf-stat-card small,
body.admin-shell .uf-stat-card__meta {
    color: var(--uf-muted);
    font-size: 0.68rem;
    line-height: 1.2;
    font-weight: 800;
}

body.admin-shell .uf-action,
body.admin-shell .button,
body.admin-shell .nav-cta {
    min-height: 2rem;
    border-radius: 7px;
    padding: 0.48rem 0.74rem;
    font-size: 0.76rem;
    line-height: 1;
    font-weight: 900;
    letter-spacing: 0;
    box-shadow: none;
}

body.admin-shell .button,
body.admin-shell .nav-cta,
body.admin-shell .uf-action--green {
    border: 1px solid var(--uf-green);
    color: #ffffff;
    background: var(--uf-green);
}

body.admin-shell .button.ghost,
body.admin-shell .nav-cta.ghost,
body.admin-shell .uf-action {
    border: 1px solid rgba(4, 61, 31, 0.16);
    color: var(--uf-green);
    background: #f7fbf7;
}

body.admin-shell .button:hover,
body.admin-shell .button:focus-visible,
body.admin-shell .uf-action:hover,
body.admin-shell .uf-action:focus-visible {
    border-color: var(--uf-green);
    color: #ffffff;
    background: var(--uf-green);
}

body.admin-shell .field span,
body.admin-shell .field > span,
body.admin-shell .uf-field span,
body.admin-shell .uf-field label {
    margin-bottom: 0.3rem;
    color: var(--uf-muted);
    font-size: 0.68rem;
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

body.admin-shell input,
body.admin-shell select,
body.admin-shell textarea {
    min-height: 2.55rem;
    border: 1px solid var(--uf-border-strong);
    border-radius: 7px;
    padding: 0.62rem 0.72rem;
    background: #ffffff;
    color: var(--uf-ink);
    font-size: 0.86rem;
    box-shadow: 0 1px 2px rgba(8, 31, 17, 0.025);
}

body.admin-shell textarea {
    min-height: 5.75rem;
}

body.admin-shell .table-wrap {
    border: 1px solid var(--uf-border);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: none;
}

body.admin-shell table {
    font-size: 0.82rem;
}

body.admin-shell th {
    background: #f7fbf7;
    color: var(--uf-muted);
    font-size: 0.68rem;
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: 0;
}

body.admin-shell td,
body.admin-shell th {
    padding: 0.68rem 0.72rem;
    border-bottom: 1px solid #edf2ed;
}

body.admin-shell tbody tr:hover {
    background: #fbfdfb;
}

body.admin-shell .tag,
body.admin-shell .status-pill {
    border-radius: 999px;
    padding: 0.28rem 0.55rem;
    font-size: 0.7rem;
    font-weight: 850;
}

body.admin-shell .status-pill.active,
body.admin-shell .status-pill.confirmed,
body.admin-shell .status-pill.approved {
    color: var(--uf-green);
    background: #eef7ef;
}

.icon-button {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(27, 59, 47, 0.14);
    border-radius: 8px;
    background: #fff;
    color: #173b2f;
    cursor: pointer;
}

.icon-button:hover,
.icon-button:focus-visible {
    background: rgba(15, 107, 55, 0.08);
    outline: none;
}

.icon-button svg {
    width: 17px;
    height: 17px;
}

.permission-dialog {
    width: min(820px, calc(100vw - 28px));
    max-height: min(640px, calc(100vh - 28px));
    border: 0;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 24px 80px rgba(15, 31, 25, 0.25);
    overflow: hidden;
}

.permission-dialog[open] {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}

.permission-dialog::backdrop {
    background: rgba(14, 30, 24, 0.46);
}

.permission-dialog__head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px;
    border-bottom: 1px solid rgba(27, 59, 47, 0.1);
}

.permission-dialog__head h2 {
    margin: 0;
    font-size: 1.2rem;
}

.permission-dialog > form,
.permission-dialog > .panel-muted {
    margin: 0;
    padding: 16px 24px 20px;
    max-height: calc(100vh - 160px);
    overflow: auto;
    overflow-x: hidden;
}

.permission-dialog .button-row {
    position: sticky;
    bottom: -20px;
    z-index: 2;
    margin: 8px 0 -20px;
    padding: 12px 0 16px;
    border-top: 1px solid rgba(27, 59, 47, 0.1);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(6px);
}

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

.permission-feature {
    border: 1px solid rgba(27, 59, 47, 0.12);
    border-radius: 8px;
    background: #fff;
    padding: 10px;
}

.permission-feature__top,
.permission-switch-row,
.checkbox-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.permission-feature__top small,
.permission-switch-row small {
    display: block;
    color: #6e7f76;
    font-size: 0.78rem;
}

.permission-feature details {
    margin-top: 8px;
}

.permission-feature summary {
    cursor: pointer;
    color: #0f6b37;
    font-weight: 700;
}

.permission-row-selected {
    background: rgba(15, 107, 55, 0.06);
}

.switch-control input:disabled + span {
    cursor: not-allowed;
    opacity: 0.48;
}

.permission-detail-grid {
    display: grid;
    gap: 6px;
    margin-top: 8px;
    max-height: 220px;
    overflow: auto;
    padding-right: 4px;
}

.permission-switch-row {
    border-top: 1px solid rgba(27, 59, 47, 0.08);
    padding: 7px 0;
}

.permission-switch-row > span:first-child {
    min-width: 0;
}

.permission-switch-row strong,
.permission-switch-row small {
    overflow-wrap: anywhere;
}

.switch-control {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.switch-control input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.switch-control span {
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: #d8e0db;
    position: relative;
    transition: background 160ms ease;
}

.switch-control span::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    top: 3px;
    left: 3px;
    box-shadow: 0 2px 6px rgba(20, 40, 32, 0.18);
    transition: transform 160ms ease;
}

.switch-control input:checked + span {
    background: #0f6b37;
}

.switch-control input:checked + span::after {
    transform: translateX(18px);
}

.checkbox-row {
    justify-content: flex-start;
    border: 1px solid rgba(27, 59, 47, 0.12);
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
    width: auto;
    max-width: 100%;
    min-height: auto;
    flex-wrap: nowrap;
    min-width: 0;
}

.checkbox-row span {
    overflow-wrap: anywhere;
    min-width: 0;
}

body.admin-shell .checkbox-row input {
    width: 18px;
    height: 18px;
    min-height: 18px;
    border: 0;
    box-shadow: none;
}

.checkbox-row input:disabled + span {
    color: #7a8a82;
}

.uf-page--records .uf-table-card {
    gap: 0.9rem;
}

.entry-batch-card {
    gap: 0.85rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    scroll-margin-top: calc(var(--admin-topbar-h, 72px) + 0.75rem);
    overflow: hidden;
}

.entry-batch-card__head {
    border-bottom: 1px solid rgba(27, 59, 47, 0.08);
    padding-bottom: 0.68rem;
}

.entry-batch-card__head > div {
    min-width: 0;
}

.entry-batch-card__head h3,
.entry-batch-card__head small {
    overflow-wrap: anywhere;
}

.entry-batch-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.24rem 0.46rem;
    align-items: center;
    max-width: 100%;
    line-height: 1.35;
}

.entry-batch-meta span {
    min-width: 0;
}

.entry-batch-meta span + span::before {
    content: "|";
    margin-right: 0.46rem;
    color: rgba(27, 59, 47, 0.42);
}

.treatment-check-card {
    display: grid;
    gap: 0.52rem;
    align-items: start;
    padding-block: 0.82rem;
}

.treatment-check-row {
    width: 100%;
    align-items: flex-start;
    gap: 0.48rem;
    min-height: 0;
    padding: 0.58rem 0.68rem;
    font-size: 0.82rem;
    line-height: 1.28;
}

.treatment-check-row input {
    flex: 0 0 auto;
    margin-top: 0.1rem;
}

.treatment-check-row.is-empty {
    background: #f8fbf6;
    color: #6e7f76;
}

.treatment-check-card h3 {
    font-size: 0.96rem;
}

.treatment-summary-card {
    border: 1px solid rgba(27, 59, 47, 0.12);
    border-radius: 8px;
    background: #fff;
    padding: 12px 14px;
}

.treatment-summary-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    overflow-wrap: anywhere;
}

.drug-row-list {
    display: grid;
    gap: 10px;
}

.drug-row {
    grid-template-columns: minmax(180px, 1.2fr) minmax(180px, 1.1fr) minmax(130px, 0.65fr) auto;
    align-items: end;
}

.field--button {
    justify-content: end;
}

.field--static strong {
    min-height: 42px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(27, 59, 47, 0.12);
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
    color: #173b2f;
    font-size: 0.95rem;
    overflow-wrap: anywhere;
}

.entry-auto-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(27, 59, 47, 0.12);
    border-radius: 8px;
    background: #f8fbf6;
    max-width: 100%;
}

@supports (content-visibility: auto) {
    .admin-main > section,
    .content-grid > *,
    .card-grid > *,
    .uf-main-grid > *,
    .uf-side-stack > *,
    .uf-table-card,
    .uf-form-card,
    .uf-filter-card,
    .uf-report-card,
    .ufdp-card,
    .ufdp-panel,
    .metric-card,
    .alert-card,
    .stats-card,
    .report-area-card,
    .permission-module-card,
    .audit-change-card,
    .intelligence-card,
    .entry-batch-card,
    .treatment-summary-card {
        content-visibility: auto;
        contain-intrinsic-size: auto 360px;
    }

    .admin-main > section:first-child,
    .auth-card,
    .page-banner,
    .uf-page-head,
    .ufdp-hero,
    .ufms-topbar,
    .admin-rail {
        content-visibility: visible;
        contain-intrinsic-size: auto 0px;
    }
}

@media (max-width: 760px) {
    body.admin-shell,
    .admin-stage,
    .admin-main {
        scroll-behavior: auto;
    }

    .uf-form-card,
    .uf-table-card,
    .uf-filter-card,
    .ufdp-card,
    .ufdp-panel,
    .metric-card,
    .stats-card,
    .report-area-card {
        box-shadow: 0 1px 2px rgba(15, 23, 18, 0.05);
    }
}

.entry-auto-meta--inline {
    grid-template-columns: 1fr;
    align-self: end;
    min-height: 45px;
}

.entry-auto-meta > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.entry-auto-meta span {
    color: #6e7f76;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.entry-auto-meta strong {
    color: #173b2f;
    font-size: 0.95rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.crate-display-field strong {
    color: var(--uf-green);
    font-weight: 900;
}

.uf-page--records .uf-table-card,
.uf-page--records .panel-muted,
.uf-page--records .form-grid,
.uf-page--records .entry-auto-meta,
.uf-page--records .entry-summary-card,
.uf-page--records .treatment-summary-card {
    max-width: 100%;
    min-width: 0;
}

.entry-summary-card {
    border: 1px solid rgba(27, 59, 47, 0.12);
    border-radius: 8px;
    background: #fff;
    padding: 12px 14px;
}

.entry-summary-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 22px;
    margin: 0;
}

.entry-summary-list div {
    display: grid;
    grid-template-columns: minmax(118px, 0.38fr) minmax(0, 1fr);
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(27, 59, 47, 0.08);
    min-width: 0;
}

.entry-summary-list dt {
    color: #6e7f76;
    font-size: 0.78rem;
    font-weight: 800;
}

.entry-summary-list dd {
    margin: 0;
    color: #173b2f;
    font-size: 0.9rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.health-bars {
    min-height: 190px;
    display: grid;
    grid-template-columns: repeat(14, minmax(20px, 1fr));
    gap: 10px;
    align-items: end;
}

.health-bars__item {
    display: grid;
    gap: 8px;
    justify-items: center;
}

.health-bars__bar {
    width: 100%;
    min-height: 4px;
    border-radius: 8px 8px 3px 3px;
    background: linear-gradient(180deg, #d95550 0%, #f1a05f 100%);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding-top: 4px;
}

.health-bars__item small {
    color: #6e7f76;
    font-size: 0.72rem;
}

@media (max-width: 760px) {
    .permission-dialog {
        width: calc(100vw - 16px);
        max-height: calc(100vh - 16px);
    }

    .permission-dialog__head,
    .permission-dialog > form,
    .permission-dialog > .panel-muted {
        padding-left: 16px;
        padding-right: 16px;
    }

    .permission-feature-list {
        grid-template-columns: 1fr;
    }

    .health-bars {
        gap: 6px;
        overflow-x: auto;
        grid-template-columns: repeat(14, minmax(34px, 1fr));
    }

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

    .entry-summary-list div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .drug-row {
        grid-template-columns: 1fr;
    }
}

body.admin-shell .uf-stat-grid--no-icons .uf-stat-card__icon {
    display: none !important;
}

body.admin-shell .uf-stat-grid--no-icons .uf-stat-card {
    padding-right: 0.82rem !important;
}

.scope-editor {
    gap: 1rem;
}

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

.scope-summary-card {
    display: grid;
    gap: 0.55rem;
    min-width: 0;
    padding: 0.85rem;
    border: 1px solid rgba(24, 32, 26, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
}

.scope-summary-card > span,
.scope-select-panel small,
.admin-scope-summary small,
.admin-access-summary small,
.scope-readonly-note p {
    color: var(--ink-500);
    font-size: 0.82rem;
    line-height: 1.4;
}

.scope-summary-card strong,
.admin-scope-summary strong,
.admin-access-summary strong {
    color: var(--ink-900);
}

.scope-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-width: 0;
}

.scope-chip,
.access-mini {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 1.55rem;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.scope-chip {
    background: rgba(8, 77, 46, 0.1);
    color: #064e3b;
}

.scope-chip--empty {
    background: rgba(24, 32, 26, 0.06);
    color: var(--ink-500);
}

.scope-chip--more {
    background: rgba(23, 35, 27, 0.1);
    color: var(--ink-700);
}

.scope-select-panel {
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid rgba(24, 32, 26, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.62);
}

.scope-select-panel select[multiple] {
    min-height: 9.5rem;
    padding: 0.65rem;
}

.scope-readonly-note {
    padding: 0.85rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.64);
    border: 1px solid rgba(24, 32, 26, 0.08);
}

.scope-readonly-note p {
    margin: 0.3rem 0 0;
}

.admin-scope-summary,
.admin-access-summary {
    display: grid;
    gap: 0.35rem;
    min-width: 12rem;
}

.admin-directory-layout {
    display: grid;
    gap: 1rem;
}

.admin-directory-table {
    width: 100%;
    min-width: 0;
}

.admin-directory-table .table-wrap {
    width: 100%;
    overflow-x: auto;
}

.admin-directory-table table {
    min-width: 1080px;
}

.admin-directory-support {
    display: grid;
    align-items: start;
    gap: 1rem;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
}

.admin-create-card {
    grid-row: span 2;
}

.access-mini-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.access-mini--enabled {
    background: rgba(6, 95, 70, 0.1);
    color: #065f46;
}

.access-mini--blocked {
    background: rgba(148, 27, 27, 0.08);
    color: #8a1c1c;
}

@media (max-width: 820px) {
    .admin-directory-support,
    .scope-overview-grid,
    .scope-editor-grid {
        grid-template-columns: 1fr;
    }

    .admin-create-card {
        grid-row: auto;
    }
}

.uf-page--intelligence .uf-intelligence-layout {
    align-items: start;
}

.uf-intel-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.uf-intel-date {
    flex: 0 0 auto;
    color: #64716c;
    font-size: 0.82rem;
    font-weight: 800;
}

.uf-intel-signal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.uf-intel-signal {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
    min-height: 104px;
    padding: 0.85rem;
    border: 1px solid #e9efe7;
    border-radius: 8px;
    background: #f8fbf7;
}

.uf-intel-signal.is-warning {
    border-color: rgba(204, 52, 36, 0.22);
    background: #fff7f4;
}

.uf-intel-signal__icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #eaf5ec;
    color: #00501f;
}

.uf-intel-signal.is-warning .uf-intel-signal__icon {
    background: #fde8e2;
    color: #c43222;
}

.uf-intel-signal small,
.uf-intel-signal em {
    display: block;
    color: #64716c;
    font-size: 0.76rem;
    font-style: normal;
    font-weight: 800;
    line-height: 1.35;
}

.uf-intel-signal strong {
    display: block;
    margin: 0.1rem 0;
    color: #101612;
    font-size: 1.15rem;
    line-height: 1.2;
}

.uf-intel-rank-grid,
.uf-intel-use-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.uf-intel-rank-grid h3 {
    margin: 0 0 0.55rem;
    color: #101612;
    font-size: 0.9rem;
}

.uf-intel-mini-row {
    display: grid;
    gap: 0.18rem;
    padding: 0.58rem 0;
    border-bottom: 1px solid #eff1ed;
}

.uf-intel-mini-row:last-child {
    border-bottom: 0;
}

.uf-intel-mini-row strong {
    color: #17231b;
    font-size: 0.86rem;
}

.uf-intel-mini-row span {
    color: #64716c;
    font-size: 0.78rem;
    line-height: 1.35;
}

.uf-intel-use {
    display: grid;
    gap: 0.35rem;
    min-height: 118px;
    padding: 0.85rem;
    border: 1px solid #e8eee6;
    border-radius: 8px;
    background: #fbfdfb;
}

.uf-intel-use strong {
    color: #102116;
    font-size: 0.9rem;
}

.uf-intel-use span {
    color: #4f5e58;
    font-size: 0.82rem;
    line-height: 1.45;
}

.uf-intel-recommendation {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.7rem;
    align-items: start;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eff1ed;
}

.uf-intel-recommendation:last-child {
    border-bottom: 0;
}

.uf-intel-recommendation strong,
.uf-intel-recommendation span,
.uf-intel-recommendation small {
    display: block;
}

.uf-intel-recommendation strong {
    color: #111714;
    font-size: 0.9rem;
}

.uf-intel-recommendation span {
    margin-top: 0.2rem;
    color: #303936;
    font-size: 0.8rem;
    line-height: 1.4;
}

.uf-intel-recommendation small {
    margin-top: 0.35rem;
    color: #64716c;
    font-size: 0.76rem;
    line-height: 1.4;
}

.uf-intel-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: #edf3ef;
    color: #245242;
    font-size: 0.68rem;
    font-weight: 850;
    text-transform: uppercase;
}

.uf-intel-badge.is-warning {
    background: #fde8e2;
    color: #b52b20;
}

.uf-intel-badge.is-success {
    background: #e2f5e7;
    color: #00501f;
}

.uf-intel-quality-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #eff1ed;
}

.uf-intel-quality-row:last-child {
    border-bottom: 0;
}

.uf-intel-quality-row span {
    color: #4f5e58;
    font-size: 0.82rem;
}

.uf-intel-quality-row strong {
    color: #101612;
    font-size: 0.88rem;
}

.uf-intel-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.uf-intel-tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: #f1f6ef;
    color: #244236;
    font-size: 0.76rem;
    font-weight: 800;
}

@media (max-width: 1180px) {
    .uf-intel-signal-grid,
    .uf-intel-rank-grid,
    .uf-intel-use-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .uf-intel-panel-head {
        display: grid;
    }

    .uf-intel-signal-grid,
    .uf-intel-rank-grid,
    .uf-intel-use-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile density pass: let controls and cards wrap by available width instead of forcing full-width rows. */
.field,
.uf-field,
.form-grid > *,
.filter-grid > *,
.uf-form-grid > *,
.uf-filter-card > *,
.card-grid > *,
.summary-strip > *,
.uf-stat-grid > *,
.ufdp-panel,
.ufdp-mini-card,
.ufdp-registry-card,
.ufdp-summary-card {
    min-width: 0;
}

.form-grid,
.filter-grid,
.uf-form-grid,
.uf-form-grid--two,
.uf-form-grid--three,
.uf-form-grid--four {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.6rem), 1fr));
}

.uf-filter-card,
.uf-filter-card--table {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.75rem), 1fr));
}

.uf-field--full,
.field--full {
    grid-column: 1 / -1;
    margin-top: 0;
}

.card-grid,
.summary-strip,
.uf-stat-grid,
.uf-stat-grid--five,
.uf-stat-grid--six {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
}

.ufdp-registry-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 5.85rem), 1fr));
    overflow: visible;
}

.ufdp-control-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 7.5rem), 1fr));
    justify-content: normal;
}

.ufdp-control-row label,
.ufdp-wide-select {
    min-width: 0;
}

.ufdp-chart-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(23rem, max-content);
    align-items: start;
}

.ufdp-chart-head .ufdp-control-row {
    width: min(100%, 29rem);
    justify-self: end;
    grid-template-columns: repeat(3, minmax(7.25rem, 1fr));
}

.ufdp-chart-head .ufdp-control-row label {
    min-width: 0;
}

.ufdp-pen-chips {
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.ufdp-pen-chips button {
    flex: 0 0 auto;
    scroll-snap-align: start;
}

.auth-shell {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: clamp(0.65rem, 2.5vw, 1.25rem);
}

.auth-card-wrap {
    display: grid;
    width: min(100%, 430px);
    place-items: center;
}

.auth-card {
    width: 100%;
    max-height: calc(100dvh - 1.3rem);
    overflow: hidden;
}

@media (max-width: 720px) {
    .uf-chart svg {
        width: max(100%, 30rem);
        min-width: 30rem;
    }

    .ufdp-active-birds-scroll {
        grid-auto-flow: column;
        grid-template-columns: none;
        grid-auto-columns: minmax(8.4rem, 42vw);
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .ufdp-active-birds-scroll .ufdp-mini-card {
        scroll-snap-align: start;
    }

    .ufdp-chart-summary {
        grid-auto-flow: column;
        grid-auto-columns: minmax(10.75rem, 58vw);
        grid-template-columns: none;
        grid-template-rows: none;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 0.12rem;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .ufdp-summary-card {
        min-height: 5.45rem;
        scroll-snap-align: start;
    }

    .ufdp-chart-head .ufdp-control-row {
        width: 100%;
        justify-self: stretch;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 7.5rem), 1fr));
    }

    .ufdp-identity-card .ufdp-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.7rem 0.45rem;
    }

    .ufdp-identity-card .ufdp-detail-grid div {
        grid-template-columns: 1.35rem minmax(0, 1fr);
        column-gap: 0.38rem;
        padding: 0.22rem 0;
    }

    .ufdp-identity-card .ufdp-detail-icon {
        width: 1.22rem;
        height: 1.22rem;
    }

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

    .ufdp-feed-metrics > div {
        padding: 0.58rem;
    }

    .ufdp-table {
        display: block;
        min-width: 0;
    }

    .ufdp-table thead {
        display: none;
    }

    .ufdp-table tbody,
    .ufdp-table tr,
    .ufdp-table td {
        display: block;
        width: 100%;
    }

    .ufdp-table tr {
        margin-bottom: 0.55rem;
        padding: 0.58rem 0.65rem;
        border: 1px solid var(--ufdp-inner-border);
        border-radius: 8px;
        background: #ffffff;
    }

    .ufdp-table td {
        display: grid;
        grid-template-columns: minmax(5.6rem, 34%) minmax(0, 1fr);
        gap: 0.55rem;
        align-items: start;
        padding: 0.34rem 0;
        border-bottom: 1px solid #eef3ee;
    }

    .ufdp-table td:last-child {
        border-bottom: 0;
    }

    .ufdp-table td::before {
        content: attr(data-label);
        color: var(--ufdp-muted);
        font-size: 0.66rem;
        font-weight: 900;
        text-transform: uppercase;
    }

    .ufdp-table td:first-child,
    .ufdp-table-empty td {
        grid-template-columns: minmax(0, 1fr);
    }

    .ufdp-table td:first-child::before,
    .ufdp-table-empty td::before {
        content: none;
    }

    .ufdp-chart-head,
    .ufdp-table-head,
    .ufdp-panel-head,
    .section-head,
    .uf-table-card__header {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .button-row,
    .page-banner-actions,
    .uf-page-actions {
        align-items: stretch;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .button-row > *,
    .page-banner-actions > *,
    .uf-page-actions > * {
        flex: 1 1 9rem;
    }
}

@media (max-width: 430px), (max-height: 720px) {
    .auth-card {
        padding: clamp(0.78rem, 3.2vw, 1rem);
        border-radius: 18px;
        box-shadow: 0 12px 34px rgba(17, 31, 19, 0.1);
    }

    .signin-panel {
        gap: 0.78rem;
    }

    .signin-header {
        gap: 0.45rem;
    }

    .signin-mark {
        width: 46px;
        height: 46px;
    }

    .signin-header h1 {
        font-size: 1.72rem;
    }

    .signin-header p,
    .signin-support span {
        font-size: 0.8rem;
        line-height: 1.32;
    }

    .signin-form {
        gap: 0.68rem;
    }

    .signin-input-shell,
    .signin-submit,
    .signin-support {
        min-height: 42px;
        border-radius: 12px;
    }

    .signin-input-shell input {
        min-height: 40px;
        font-size: 0.94rem;
    }

    .signin-meta-row {
        gap: 0.4rem;
        font-size: 0.75rem;
    }

    .signin-divider {
        gap: 0.5rem;
        font-size: 0.76rem;
    }

    .signin-support {
        padding: 0.58rem 0.72rem;
    }
}

@media (max-height: 600px) {
    .auth-shell {
        padding: 0.5rem;
    }

    .auth-card {
        padding: 0.72rem;
        border-radius: 16px;
    }

    .signin-panel {
        gap: 0.55rem;
    }

    .signin-header {
        gap: 0.28rem;
    }

    .signin-mark {
        width: 40px;
        height: 40px;
        font-size: 0.85rem;
    }

    .signin-header h1 {
        font-size: 1.42rem;
    }

    .signin-header p,
    .signin-support span {
        font-size: 0.74rem;
        line-height: 1.22;
    }

    .signin-form {
        gap: 0.48rem;
    }

    .signin-field {
        gap: 0.28rem;
    }

    .signin-label,
    .signin-meta-row,
    .signin-divider {
        font-size: 0.72rem;
    }

    .signin-input-shell,
    .signin-submit,
    .signin-support {
        min-height: 38px;
        border-radius: 10px;
    }

    .signin-input-shell {
        padding: 0 0.72rem;
    }

    .signin-input-shell input {
        min-height: 36px;
        font-size: 0.88rem;
    }

    .signin-support {
        padding: 0.48rem 0.62rem;
    }
}

@media (max-width: 720px) {
    body.admin-shell .summary-strip,
    body.admin-shell .summary-strip--compact,
    body.admin-shell .uf-stat-grid,
    body.admin-shell .uf-page .uf-stat-grid,
    body.admin-shell .uf-stat-grid--five,
    body.admin-shell .uf-page .uf-stat-grid--five,
    body.admin-shell .uf-stat-grid--six,
    body.admin-shell .uf-page .uf-stat-grid--six {
        display: grid !important;
        grid-auto-flow: column;
        grid-auto-columns: minmax(9.5rem, 44vw);
        grid-template-columns: none !important;
        gap: 0.62rem;
        margin-inline: -0.1rem;
        padding: 0.1rem 0.1rem 0.35rem;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    body.admin-shell .summary-strip > *,
    body.admin-shell .summary-strip--compact > *,
    body.admin-shell .uf-stat-grid > *,
    body.admin-shell .uf-page .uf-stat-grid > * {
        width: auto;
        max-width: none;
        min-height: 5rem;
        scroll-snap-align: start;
    }

    body.admin-shell .form-grid,
    body.admin-shell .filter-grid,
    body.admin-shell .uf-form-grid,
    body.admin-shell .uf-form-grid--two,
    body.admin-shell .uf-form-grid--three,
    body.admin-shell .uf-form-grid--four {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 7.25rem), 1fr));
        gap: 0.72rem 0.7rem;
    }

    body.admin-shell .uf-filter-card,
    body.admin-shell .uf-filter-card--table {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.72rem 0.7rem;
        align-items: end;
    }

    body.admin-shell .uf-filter-card .button,
    body.admin-shell .uf-filter-card .uf-action {
        width: 100%;
        min-width: 0;
    }

    body.admin-shell .field--full,
    body.admin-shell .uf-field--full {
        grid-column: 1 / -1;
    }

    body.admin-shell .field,
    body.admin-shell .uf-field {
        gap: 0.32rem;
    }

    body.admin-shell .uf-choice-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
    }

    body.admin-shell .uf-choice-row label {
        width: 100%;
        min-width: 0;
        min-height: 3.1rem;
        padding: 0.62rem 0.68rem;
        line-height: 1.15;
        overflow-wrap: anywhere;
    }

    body.admin-shell .uf-card-actions {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.1rem), 1fr));
        justify-content: stretch;
        gap: 0.6rem;
    }

    body.admin-shell .uf-card-actions > * {
        width: 100%;
        min-width: 0;
    }

    body.admin-shell .entry-summary-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.45rem 0.65rem;
    }

    body.admin-shell .entry-summary-list div {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.16rem;
        padding: 0.46rem 0;
    }

    body.admin-shell .entry-summary-list dt {
        font-size: 0.68rem;
        line-height: 1.18;
    }

    body.admin-shell .entry-summary-list dd {
        font-size: 0.82rem;
        line-height: 1.2;
    }
}

body.admin-shell .status-pill {
    width: fit-content;
    max-width: 100%;
    min-width: 0;
    justify-content: center;
    line-height: 1.15;
    letter-spacing: 0;
    text-transform: none;
    white-space: normal;
    overflow-wrap: anywhere;
}

body.admin-shell .entry-batch-card__head .status-pill {
    justify-self: start;
    align-self: start;
}

body.admin-shell .uf-page--records textarea {
    min-height: 4.6rem;
}

body.admin-shell .uf-page--records .uf-page-actions {
    width: fit-content;
    justify-content: flex-start;
}

body.admin-shell .uf-page--records .uf-page-actions > * {
    flex: 0 0 auto;
    width: fit-content;
}

@media (max-width: 720px) {
    body.admin-shell .summary-strip,
    body.admin-shell .summary-strip--compact,
    body.admin-shell .uf-stat-grid,
    body.admin-shell .uf-page .uf-stat-grid,
    body.admin-shell .uf-stat-grid--five,
    body.admin-shell .uf-page .uf-stat-grid--five,
    body.admin-shell .uf-stat-grid--six,
    body.admin-shell .uf-page .uf-stat-grid--six {
        grid-auto-columns: 11.75rem !important;
    }

    body.admin-shell .summary-strip > *,
    body.admin-shell .summary-strip--compact > *,
    body.admin-shell .uf-stat-grid > *,
    body.admin-shell .uf-page .uf-stat-grid > * {
        width: 11.75rem;
    }

    body.admin-shell .treatment-check-card {
        padding: 0.72rem;
    }
}

/* UFMS production polish overrides */
.ufms-brand-mark,
.brand-mark,
.signin-mark {
    overflow: hidden;
}

.ufms-brand-mark img,
.brand-mark img,
.signin-mark img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    object-fit: contain !important;
    filter: none !important;
}

.ufms-brand-mark {
    background: transparent;
    box-shadow: none;
}

.brand-mark,
.signin-mark {
    background: #ffffff;
    color: transparent;
}

.ufdp-registry-cards {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(126px, 1fr);
    grid-template-columns: none;
    gap: 0.58rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.2rem;
    scrollbar-color: rgba(4, 61, 31, 0.25) transparent;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.ufdp-registry-card {
    min-width: 0;
    scroll-snap-align: start;
}

.ufdp-pen-chips button,
.ufdp-filter-chips button {
    min-width: 0;
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ufdp-control-row select,
.ufdp-control-row button,
.ufdp-wide-select select {
    min-width: 0;
    max-width: 100%;
}

.uf-field--compact-upload input[type="file"] {
    min-height: 2.7rem;
    padding-block: 0.62rem;
    font-size: 0.82rem;
}

body.admin-shell .uf-page--records textarea {
    min-height: 3.7rem;
}

.ufms-pwa-status {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 80;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    max-width: min(30rem, calc(100vw - 2rem));
    padding: 0.55rem 0.65rem;
    border: 1px solid rgba(0, 84, 44, 0.18);
    border-radius: 10px;
    color: #17351f;
    background: #f6fbf7;
    box-shadow: 0 16px 34px rgba(23, 35, 27, 0.14);
    font-size: 0.82rem;
    font-weight: 700;
}

.ufms-pwa-status[hidden] {
    display: none;
}

.ufms-pwa-status.is-offline {
    border-color: rgba(166, 108, 0, 0.28);
    background: #fff8e8;
}

.ufms-pwa-status.is-syncing {
    opacity: 0.88;
}

.ufms-pwa-status button {
    min-height: 2rem;
    padding: 0.35rem 0.65rem;
    border: 1px solid rgba(0, 84, 44, 0.18);
    border-radius: 8px;
    color: #fff;
    background: #00542c;
    font: inherit;
    white-space: nowrap;
}

.offline-form-message {
    border: 1px solid rgba(0, 84, 44, 0.16);
    border-radius: 8px;
    padding: 0.68rem 0.78rem;
    color: #0f4e2d;
    background: #eef9f1;
    font-size: 0.9rem;
    font-weight: 700;
}

.offline-form-message.is-error {
    color: #8f1d1d;
    background: #fff1f1;
    border-color: rgba(143, 29, 29, 0.2);
}

@media (max-width: 720px) {
    body.admin-shell .ufms-topbar {
        position: fixed;
    }

    body.admin-shell .ufms-topbar-brand {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        max-width: 3rem;
        justify-content: center;
        gap: 0;
    }

    body.admin-shell .ufms-brand-mark {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    body.admin-shell .ufms-brand-text {
        display: none;
    }

    body.admin-shell .ufms-topbar__right {
        flex: 0 0 auto !important;
        width: auto !important;
        margin-left: auto;
        justify-content: flex-end;
        gap: 0.42rem;
    }

    .ufdp-registry-cards {
        grid-auto-columns: minmax(126px, 1fr);
        grid-template-columns: none;
        gap: 0.45rem;
    }

    .ufdp-registry-card {
        min-height: 4.85rem;
        padding: 0.58rem 0.45rem;
    }

    .ufdp-registry-card small,
    .ufdp-registry-card span {
        font-size: 0.62rem;
        line-height: 1.12;
    }

    .ufdp-registry-card strong {
        font-size: clamp(0.82rem, 2.6vw, 1rem);
        line-height: 1.08;
    }

    .ufdp-pen-chips button,
    .ufdp-filter-chips button {
        max-width: 7.75rem;
    }

    .ufms-pwa-status {
        right: 0.65rem;
        bottom: 0.65rem;
        left: 0.65rem;
        max-width: none;
        justify-content: space-between;
    }
}

/* Consistency fixes for responsive controls and mobile operational views. */
.password-readout-note {
    display: block;
    margin-top: 0.34rem;
    color: #6e7f76;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
}

.inline-add-link {
    justify-self: end;
    min-height: auto;
    padding: 0;
    border: 0;
    color: var(--uf-green);
    background: transparent;
    box-shadow: none;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 900;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
}

.inline-add-link:hover,
.inline-add-link:focus-visible {
    color: #003d1a;
    text-decoration: underline;
}

.ufdp-filter-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.36rem;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.12rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.ufdp-filter-chips button {
    flex: 0 0 auto;
    width: max-content;
    min-width: max-content;
    max-width: none !important;
    overflow: visible;
    text-overflow: clip;
}

.entry-offline-summary {
    border-color: rgba(0, 84, 44, 0.18);
    background: #f7fbf7;
}

.entry-offline-summary > strong {
    display: block;
    color: var(--uf-green);
    font-size: 0.82rem;
    text-transform: uppercase;
}

.health-bars {
    grid-auto-flow: column;
    grid-auto-columns: minmax(2.4rem, 1fr);
    grid-template-columns: none;
    overflow-x: auto;
    padding-bottom: 0.28rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 720px) {
    body.admin-shell .uf-page--task-entry .summary-strip--compact {
        grid-auto-columns: max-content !important;
    }

    body.admin-shell .uf-page--task-entry .summary-strip--compact > * {
        width: max-content;
        min-width: 7.5rem;
        max-width: none;
        min-height: 4.45rem;
        padding-inline: 0.82rem;
    }

    body.admin-shell .uf-ledger-card .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.admin-shell .uf-ledger-card .uf-table {
        display: table !important;
        width: 100%;
        min-width: 45rem !important;
        border-collapse: collapse;
    }

    body.admin-shell .uf-ledger-card .uf-table thead {
        display: table-header-group !important;
    }

    body.admin-shell .uf-ledger-card .uf-table tbody {
        display: table-row-group !important;
    }

    body.admin-shell .uf-ledger-card .uf-table tr {
        display: table-row !important;
        margin: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    body.admin-shell .uf-ledger-card .uf-table th,
    body.admin-shell .uf-ledger-card .uf-table td {
        display: table-cell !important;
        width: auto;
        padding: 0.62rem 0.68rem;
        border-bottom: 1px solid #edf0ea;
        vertical-align: middle;
        white-space: nowrap;
    }

    body.admin-shell .uf-ledger-card .uf-table td::before {
        content: none !important;
        display: none !important;
    }

    body.admin-shell .uf-ledger-card .uf-table-actions {
        flex-wrap: nowrap;
    }
}

.offline-workspace {
    width: min(44rem, 100%);
    margin-inline: auto;
}

.offline-workspace .uf-table-card {
    overflow: hidden;
}

.offline-action-row,
.offline-link-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.65rem;
}

.offline-action-row > *,
.offline-link-grid > * {
    flex: 1 1 11rem;
    min-width: min(100%, 11rem);
    max-width: 100%;
    justify-content: center;
    text-align: center;
    white-space: normal;
}

.offline-login-workspace .offline-action-row > * {
    flex-basis: 13rem;
}

@media (max-width: 520px) {
    .offline-workspace {
        width: 100%;
    }

    .offline-action-row > *,
    .offline-link-grid > * {
        flex-basis: 100%;
        min-width: 0;
    }
}
