:root { color-scheme: light; font-family: system-ui, sans-serif; color: #262022; background: #f9f6f7; }
body { margin: 0; }
header { background: white; border-bottom: 1px solid #e7dade; }
.shell { max-width: 1080px; width: calc(100% - 2rem); margin: 0 auto; }
.header-inner, .heading, nav, .brand { display: flex; align-items: center; gap: 1rem; }
.header-inner, .heading { justify-content: space-between; flex-wrap: wrap; padding: .7rem 0; }
.brand { color: inherit; font-weight: 700; text-decoration: none; }
.brand img { object-fit: contain; }
main { padding: 2rem 0 4rem; }
h1 { margin: 0 0 .5rem; }
h2 { font-size: 1.2rem; }
a { color: #81193e; }
p { line-height: 1.55; }
.card { padding: 1.5rem; background: white; border: 1px solid #e7dade; border-radius: 12px; }
.narrow { max-width: 30rem; margin: auto; }
label { display: block; font-weight: 600; margin: 0 0 1rem; }
input, textarea, select { display: block; box-sizing: border-box; width: 100%; margin: .35rem 0 0; padding: .65rem; font: inherit; font-weight: 400; background: white; border: 1px solid #b8a9ae; border-radius: 6px; }
input[readonly] { background: #f6f2f3; }
button, .button { display: inline-block; padding: .7rem 1rem; border: 1px solid #81193e; background: #81193e; color: white; border-radius: 6px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
button.outline { color: #81193e; background: white; }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 3px solid #ba426b; outline-offset: 2px; }
.message { padding: .8rem 1.2rem; border: 1px solid #669278; background: #f2faf5; border-radius: 6px; }
.error { border-color: #a22b40; background: #fef2f4; }
.variant { display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); gap: .8rem; margin: 0 0 1rem; border: 1px solid #e7dade; border-radius: 6px; }
.variant label { margin: 0; }
#add-variant { margin-bottom: 1rem; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: .85rem; border-bottom: 1px solid #eee4e7; }
td a { margin-right: 1rem; }
.pager { margin-top: 1rem; }

.staff-panel {
    --staff-primary: #6366f1;
    --staff-border: #e5e7eb;
    --staff-muted: #6b7280;
    display: grid;
    grid-template: 68px 1fr / 230px minmax(0, 1fr);
    min-height: 100vh;
    color: #111827;
    background: #f9fafb;
}
.staff-panel header { grid-column: 2; border-color: var(--staff-border); }
.staff-panel header .shell, .staff-panel main.shell { width: calc(100% - 3rem); max-width: 1440px; }
.staff-panel header .header-inner { height: 100%; box-sizing: border-box; }
.staff-panel main { grid-column: 2; padding-top: 1rem; min-width: 0; }
.staff-panel a { color: #4338ca; }
.staff-panel .button, .staff-panel button:not(.outline) { background: #4f46e5; border-color: #4f46e5; color: white; }
.staff-panel button.outline { color: #4338ca; border-color: var(--staff-border); }
.staff-sidebar { grid-row: 1 / 3; padding: 0 1rem; background: white; border-right: 1px solid var(--staff-border); }
.staff-sidebar .brand { min-height: 68px; gap: .65rem; color: #111827; }
.staff-sidebar nav { display: grid; gap: .25rem; margin-top: 1.25rem; }
.staff-sidebar nav a { padding: .65rem .75rem; color: #374151; text-decoration: none; font-size: .9rem; border-radius: .5rem; }
.staff-sidebar nav a:hover, .staff-sidebar nav a[aria-current] { background: #eef2ff; color: #4338ca; }
.staff-panel .heading p { margin: .25rem 0; color: var(--staff-muted); }
.staff-panel .card { border-color: var(--staff-border); box-shadow: 0 1px 2px #11182708; }
.staff-panel th, .staff-panel td { border-color: var(--staff-border); }
.dashboard-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0 1.5rem; }
.staff-panel .metric { min-height: 5.5rem; display: grid; align-content: center; gap: .6rem; text-decoration: none; color: white; border: 0; overflow: hidden; position: relative; }
.metric::after { content: ""; position: absolute; width: 6.25rem; height: 6.25rem; border-radius: 50%; right: -1rem; top: -1rem; background: #ffffff1f; pointer-events: none; }
.metric strong { font-size: 1.65rem; }
.metric span { font-weight: 600; font-size: .85rem; }
.metric:nth-child(1) { background: linear-gradient(135deg, #4338ca, #7c3aed); }
.metric:nth-child(2) { background: linear-gradient(135deg, #047857, #059669); }
.metric:nth-child(3) { background: linear-gradient(135deg, #0369a1, #0e7490); }
.metric:nth-child(4) { background: linear-gradient(135deg, #b45309, #be185d); }
.dashboard-panels { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.dashboard-panels h2, .section-heading h2 { margin: 0; }
.dashboard-bars { list-style: none; padding: 0; margin-bottom: 0; }
.dashboard-bars li { display: grid; grid-template-columns: 3.5rem 1fr 2rem; gap: .75rem; align-items: center; padding: .3rem 0; }
.dashboard-bars meter { width: 100%; height: .85rem; }
.dashboard-bars meter::-webkit-meter-optimum-value { background: var(--staff-primary); }
.dashboard-links { display: grid; gap: .35rem; margin-top: .75rem; }
.dashboard-links a { padding: .6rem .25rem; border-bottom: 1px solid var(--staff-border); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.order-status { display: inline-block; padding: .25rem .5rem; border-radius: .4rem; background: #eef2ff; color: #3730a3; font-size: .85rem; }
.panel-filters { display: flex; align-items: end; gap: .85rem; margin-bottom: 1rem; flex-wrap: wrap; }
.panel-filters label { margin: 0; flex: 1; min-width: 9rem; }
.staff-footer { margin-top: 2rem; color: var(--staff-muted); font-size: .85rem; }
@media (max-width: 1024px) {
    .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-panels { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .staff-panel { display: block; }
    .staff-sidebar { border-right: 0; border-bottom: 1px solid var(--staff-border); }
    .staff-sidebar nav { display: flex; flex-wrap: wrap; margin: 0; padding-bottom: .6rem; }
    .staff-panel header .shell, .staff-panel main.shell { width: calc(100% - 2rem); }
    .staff-panel .metric { padding: .9rem; }
    .metric strong { font-size: 1.3rem; }
}

