:root {
    --bg: #f3f5f7;
    --panel: #ffffff;
    --panel-soft: #f8fafb;
    --line: #e2e7eb;
    --line-strong: #cfd6dc;
    --text: #172027;
    --muted: #68757f;
    --dark: #111518;
    --dark-soft: #1a2024;
    --brand: #9ee500;
    --brand-dark: #78ad00;
    --brand-soft: #efffc8;
    --blue: #2680a8;
    --teal: #168678;
    --green: #559b38;
    --amber: #c18325;
    --red: #c84a47;
    --shadow-sm: 0 1px 2px rgba(16, 24, 32, .04), 0 8px 22px rgba(16, 24, 32, .05);
    --shadow-md: 0 18px 48px rgba(10, 16, 20, .12);
    --radius: 12px;
    --sidebar: 272px;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
    min-width: 320px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 3px solid rgba(158, 229, 0, .35);
    outline-offset: 2px;
}

.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
    min-height: 100vh;
    transition: grid-template-columns .2s ease;
}

body.sidebar-collapsed {
    --sidebar: 78px;
}

.sidebar {
    background:
        radial-gradient(circle at 18% 6%, rgba(158, 229, 0, .11), transparent 24%),
        linear-gradient(180deg, #171c20 0%, #0e1113 100%);
    color: #dbe1e4;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 24px 18px 20px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.sidebar-collapse {
    align-items: center;
    background: var(--brand);
    border: 3px solid var(--bg);
    border-radius: 50%;
    box-shadow: 0 7px 20px rgba(0, 0, 0, .24);
    color: #11160c;
    cursor: pointer;
    display: flex;
    font-size: 25px;
    font-weight: 900;
    height: 34px;
    justify-content: center;
    padding: 0 0 3px;
    position: absolute;
    right: -17px;
    top: 96px;
    transition: background-color .15s ease, transform .15s ease;
    width: 34px;
    z-index: 3;
}

.sidebar-collapse:hover {
    background: #aff21a;
    transform: scale(1.06);
}

.sidebar-collapsed .sidebar {
    padding-left: 12px;
    padding-right: 12px;
}

.sidebar-collapsed .brand {
    align-items: center;
    display: flex;
    height: 52px;
    justify-content: center;
    padding: 7px;
}

.sidebar-collapsed .brand img {
    display: none;
}

.sidebar-collapsed .brand::after {
    color: #192008;
    content: "DC";
    font-size: 16px;
    font-weight: 900;
    letter-spacing: -.04em;
}

.sidebar-collapsed .user-box {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.sidebar-collapsed .user-box div,
.sidebar-collapsed .side-nav a span,
.sidebar-collapsed .sidebar-foot {
    display: none;
}

.sidebar-collapsed .side-nav a {
    gap: 0;
    justify-content: center;
    padding-left: 8px;
    padding-right: 8px;
}

.sidebar-collapsed .side-nav a.active::after {
    right: -13px;
}

.brand {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
    display: block;
    padding: 10px 13px;
    text-decoration: none;
}

.brand img {
    display: block;
    height: auto;
    max-width: 100%;
    width: 210px;
}

.user-box {
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
    display: flex;
    gap: 12px;
    margin-top: 22px;
    padding: 0 4px 20px;
}

.user-avatar {
    align-items: center;
    background: var(--brand);
    border: 3px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    color: #101410;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 800;
    height: 42px;
    justify-content: center;
    letter-spacing: .04em;
    width: 42px;
}

.user-box div {
    display: grid;
    min-width: 0;
}

.user-box small {
    color: #8f9ba3;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.user-box strong {
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-box em {
    color: #98a3aa;
    font-size: 11px;
    font-style: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-nav {
    display: grid;
    gap: 5px;
    margin-top: 24px;
}

.side-nav a {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #aeb7bd;
    display: flex;
    font-weight: 650;
    gap: 12px;
    min-height: 44px;
    padding: 10px 12px;
    position: relative;
    text-decoration: none;
    transition: background-color .16s ease, color .16s ease, transform .16s ease;
}

.side-nav .nav-icon {
    fill: none;
    flex: 0 0 21px;
    height: 21px;
    opacity: .78;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 21px;
}

.side-nav a:hover {
    background: rgba(255, 255, 255, .055);
    color: #fff;
    transform: translateX(2px);
}

.side-nav a.active {
    background: rgba(158, 229, 0, .13);
    border-color: rgba(158, 229, 0, .2);
    color: #fff;
}

.side-nav a.active::after {
    background: var(--brand);
    border-radius: 4px 0 0 4px;
    bottom: 10px;
    content: "";
    position: absolute;
    right: -19px;
    top: 10px;
    width: 3px;
}

.side-nav a.active .nav-icon {
    color: var(--brand);
    opacity: 1;
}

.sidebar-foot {
    color: #657077;
    font-size: 10px;
    letter-spacing: .05em;
    margin-top: auto;
    padding: 16px 7px 0;
    text-transform: uppercase;
}

.nav-backdrop {
    display: none;
}

.main {
    min-width: 0;
    padding-bottom: 28px;
}

.topbar {
    align-items: center;
    backdrop-filter: blur(14px);
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid rgba(210, 217, 222, .85);
    display: flex;
    gap: 16px;
    height: 68px;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.menu-button {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
    display: none;
    flex-direction: column;
    gap: 4px;
    height: 40px;
    justify-content: center;
    padding: 0;
    width: 40px;
}

.menu-button span {
    background: var(--text);
    border-radius: 2px;
    display: block;
    height: 2px;
    width: 17px;
}

.topbar-context {
    display: grid;
    line-height: 1.2;
}

.topbar-context small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.topbar-context strong {
    font-size: 15px;
}

.topbar-actions {
    align-items: center;
    display: flex;
    gap: 18px;
    margin-left: auto;
}

.online-state {
    align-items: center;
    color: var(--muted);
    display: inline-flex;
    font-size: 12px;
    gap: 7px;
}

.online-state i {
    background: var(--brand);
    border: 3px solid var(--brand-soft);
    border-radius: 50%;
    height: 10px;
    width: 10px;
}

.logout {
    border-left: 1px solid var(--line);
    color: #44515a;
    font-size: 12px;
    font-weight: 700;
    padding-left: 18px;
    text-decoration: none;
}

.logout:hover {
    color: #111;
}

.page-head {
    background: linear-gradient(135deg, #fff 0%, #fbfcfc 72%, #f4f8ec 100%);
    border-bottom: 1px solid var(--line);
    padding: 30px 32px 28px;
    position: relative;
}

.page-head::after {
    background: var(--brand);
    bottom: -1px;
    content: "";
    height: 3px;
    left: 32px;
    position: absolute;
    width: 54px;
}

.page-head > span {
    color: var(--brand-dark);
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .11em;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.page-head h1 {
    color: #10171c;
    font-size: clamp(27px, 3vw, 36px);
    letter-spacing: -.035em;
    line-height: 1.15;
    margin: 0 0 7px;
}

.page-head p {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
    max-width: 700px;
}

.head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 19px;
}

.button {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    font-size: 13px;
    font-weight: 750;
    justify-content: center;
    min-height: 40px;
    padding: 9px 14px;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease, background-color .15s ease;
    white-space: nowrap;
}

.button:hover {
    border-color: #aeb8bf;
    box-shadow: 0 7px 18px rgba(16, 24, 32, .08);
    transform: translateY(-1px);
}

.button.primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #10150b;
}

.button.primary:hover {
    background: #a9ee0c;
    border-color: #a9ee0c;
}

.button.muted {
    background: #f8fafb;
    color: #4f5d66;
}

button:disabled,
.button:disabled {
    box-shadow: none;
    cursor: not-allowed;
    opacity: .5;
    transform: none;
}

.metrics,
.tile-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 22px 30px 0;
}

.metric,
.tile,
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.metric,
.tile {
    min-height: 116px;
    overflow: hidden;
    padding: 20px;
    position: relative;
}

.dashboard-card,
.dashboard-sub-link {
    text-decoration: none;
}

.dashboard-card {
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.dashboard-card:hover,
.dashboard-card:focus-visible {
    border-color: rgba(120, 173, 0, .5);
    box-shadow: 0 12px 28px rgba(44, 64, 18, .12);
    transform: translateY(-2px);
}

.metric::after,
.tile::after {
    background: currentColor;
    border-radius: 50%;
    content: "";
    height: 72px;
    opacity: .055;
    position: absolute;
    right: -18px;
    top: -18px;
    width: 72px;
}

.metric span,
.tile span {
    color: var(--muted);
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .065em;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.metric strong,
.tile strong {
    color: #11181d;
    display: block;
    font-size: 30px;
    letter-spacing: -.035em;
    line-height: 1;
}

.metric small {
    color: var(--muted);
    display: block;
    font-size: 11px;
    margin-top: 8px;
}

.tone-blue { border-top: 3px solid var(--blue); color: var(--blue); }
.tone-teal { border-top: 3px solid var(--teal); color: var(--teal); }
.tone-green { border-top: 3px solid var(--green); color: var(--green); }
.tone-amber { border-top: 3px solid var(--amber); color: var(--amber); }
.tone-red { border-top: 3px solid var(--red); color: var(--red); }
.tone-cyan { border-top: 3px solid #3298a5; color: #3298a5; }
.tone-orange { border-top: 3px solid #c46e35; color: #c46e35; }
.tone-violet { border-top: 3px solid #78699f; color: #78699f; }
.tone-slate { border-top: 3px solid #647783; color: #647783; }
.tone-gray { border-top: 3px solid #7c858a; color: #7c858a; }

.dashboard-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 2fr) minmax(290px, 1fr);
    padding: 18px 30px 0;
}

.dashboard-grid > .panel {
    min-width: 0;
}

.panel {
    padding: 22px;
}

.main > .panel {
    margin: 20px 30px 0;
}

.panel > header,
.panel-title-row {
    align-items: flex-start;
    display: flex;
    gap: 15px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.panel h2 {
    color: #172027;
    font-size: 17px;
    letter-spacing: -.015em;
    line-height: 1.25;
    margin: 0 0 3px;
}

.panel header span,
.panel-title-row span {
    color: var(--muted);
    font-size: 12px;
}

.panel header strong {
    color: var(--brand-dark);
    font-size: 18px;
}

.panel-link {
    color: #4e7500;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.panel-link:hover {
    text-decoration: underline;
}

.bar-chart {
    align-items: end;
    background: linear-gradient(180deg, rgba(245, 248, 249, .2), rgba(245, 248, 249, .78));
    border-bottom: 1px solid var(--line-strong);
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    height: 220px;
    padding: 20px 22px 0;
}

.bar-item {
    align-items: center;
    border-radius: 8px 8px 0 0;
    display: grid;
    gap: 10px;
    justify-items: center;
    padding-top: 6px;
    transition: background-color .15s ease, transform .15s ease;
}

.bar-item:hover,
.bar-item:focus-visible {
    background: rgba(158, 229, 0, .12);
    transform: translateY(-2px);
}

.bar-item i {
    background: linear-gradient(180deg, var(--brand), #79b200);
    border-radius: 6px 6px 0 0;
    box-shadow: 0 4px 12px rgba(121, 178, 0, .18);
    display: block;
    min-height: 4px;
    width: 68%;
}

.bar-item span {
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
}

.ranking {
    display: grid;
    gap: 17px;
}

.ranking-row {
    border-radius: 8px;
    display: grid;
    font-size: 13px;
    gap: 8px;
    grid-template-columns: 1fr auto;
    margin: -6px;
    padding: 6px;
    transition: background-color .15s ease;
}

.ranking-row:hover,
.ranking-row:focus-visible {
    background: rgba(158, 229, 0, .12);
}

.ranking-row strong {
    color: var(--text) !important;
    font-size: 13px !important;
}

.ranking-row i {
    background: linear-gradient(90deg, #7eb900, var(--brand));
    border-radius: 999px;
    display: block;
    grid-column: 1 / -1;
    height: 6px;
}

.table-wrap {
    margin: 0 -4px;
    overflow-x: auto;
    scrollbar-color: #c8d0d5 transparent;
    scrollbar-width: thin;
}

table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

th {
    background: #f6f8f9;
    color: #6c7880;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .065em;
    text-align: left;
    text-transform: uppercase;
}

th:first-child {
    border-radius: 8px 0 0 8px;
}

th:last-child {
    border-radius: 0 8px 8px 0;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 13px 11px;
    vertical-align: middle;
}

th {
    border-bottom: 0;
}

tbody tr {
    transition: background-color .12s ease;
}

tbody tr:not(.is-empty):hover > td,
tbody tr.record-row:focus-visible > td {
    background: rgba(158, 229, 0, .16);
}

tbody tr.record-row {
    cursor: pointer;
    outline: 0;
}

tbody tr.record-row:focus-visible > td:first-child {
    box-shadow: inset 3px 0 0 var(--brand-dark);
}

tbody td {
    transition: background-color .12s ease, box-shadow .12s ease;
}

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

td strong {
    color: #182027;
}

td small {
    color: var(--muted);
    display: block;
    font-size: 11px;
    margin-top: 3px;
}

.align-right {
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.tile-stack {
    display: grid;
    gap: 2px;
}

.mini-tile {
    align-items: center;
    border-bottom: 1px solid var(--line);
    border-radius: 7px;
    display: flex;
    justify-content: space-between;
    padding: 10px 2px;
    transition: background-color .15s ease, padding .15s ease;
}

.mini-tile:hover,
.mini-tile:focus-visible {
    background: rgba(158, 229, 0, .12);
    padding-left: 9px;
    padding-right: 9px;
}

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

.mini-tile strong {
    background: var(--brand-soft);
    border-radius: 999px;
    color: #4f7300;
    font-size: 11px;
    min-width: 30px;
    padding: 3px 8px;
    text-align: center;
}

.notice {
    border: 1px solid;
    border-radius: 9px;
    box-shadow: var(--shadow-sm);
    font-weight: 650;
    margin: 18px 30px 0;
    padding: 12px 15px;
}

.notice.success {
    background: #f0f9e8;
    border-color: #cde7b9;
    color: #416f25;
}

.notice.error {
    background: #fff1f0;
    border-color: #efc5c3;
    color: #9b3936;
}

.filter-bar,
.form-grid {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.filter-bar {
    align-items: end;
}

.filter-bar label,
.document-form label {
    color: #5f6c75;
    display: grid;
    font-size: 10px;
    font-weight: 800;
    gap: 7px;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.filter-bar input,
.document-form input,
.document-form select,
.document-form textarea {
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    color: var(--text);
    min-height: 42px;
    padding: 9px 11px;
    text-transform: none;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
    width: 100%;
}

.filter-bar input:hover,
.document-form input:hover,
.document-form select:hover,
.document-form textarea:hover {
    border-color: #aab5bd;
}

.filter-bar input:focus,
.document-form input:focus,
.document-form select:focus,
.document-form textarea:focus {
    border-color: var(--brand-dark);
    box-shadow: 0 0 0 3px rgba(158, 229, 0, .18);
    outline: 0;
}

.document-form input[readonly] {
    background: #f3f5f6;
    color: var(--muted);
}

.document-form textarea {
    min-height: 120px;
    resize: vertical;
}

.document-form label {
    font-size: 12px;
    letter-spacing: .025em;
}

.document-form input,
.document-form select,
.document-form textarea {
    font-size: 15px;
    min-height: 46px;
    padding: 10px 12px;
}

.document-form textarea {
    line-height: 1.55;
}

.document-form {
    padding: 20px 30px 86px;
}

.lookup-control {
    align-items: stretch;
    display: flex;
    gap: 7px;
}

.lookup-control select {
    flex: 1 1 auto;
    min-width: 0;
}

.lookup-add-button {
    align-items: center;
    background: var(--brand);
    border: 1px solid var(--brand-dark);
    border-radius: 8px;
    color: #142000;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 46px;
    font-size: 24px;
    font-weight: 800;
    justify-content: center;
    min-height: 46px;
    padding: 0;
    transition: background-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.lookup-add-button:hover {
    background: #aff21a;
    box-shadow: 0 8px 18px rgba(121, 178, 0, .2);
    transform: translateY(-1px);
}

.quick-add-dialog {
    background: #fff;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 28px 80px rgba(8, 14, 17, .28);
    color: var(--text);
    max-height: min(82vh, 780px);
    max-width: 760px;
    padding: 0;
    width: calc(100% - 36px);
}

.quick-add-dialog::backdrop {
    backdrop-filter: blur(3px);
    background: rgba(8, 12, 15, .58);
}

.quick-add-form.document-form {
    max-height: min(82vh, 780px);
    overflow: auto;
    padding: 0;
}

.quick-add-head {
    align-items: center;
    background: #151a1d;
    color: #fff;
    display: flex;
    justify-content: space-between;
    padding: 19px 22px;
}

.quick-add-head span {
    color: var(--brand);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.quick-add-head h2 {
    font-size: 20px;
    margin: 2px 0 0;
}

.quick-add-close {
    background: transparent;
    border: 0;
    color: #d8dfe2;
    cursor: pointer;
    font-size: 29px;
    line-height: 1;
    padding: 4px;
}

.quick-add-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 22px 22px 8px;
}

.quick-add-status {
    color: var(--muted);
    margin: 6px 22px 0;
    min-height: 21px;
}

.quick-add-status.error {
    color: var(--red);
    font-weight: 700;
}

.quick-add-actions {
    align-items: center;
    border-top: 1px solid var(--line);
    display: flex;
    gap: 9px;
    justify-content: flex-end;
    margin-top: 14px;
    padding: 15px 22px 18px;
}

.form-card {
    margin-bottom: 17px;
}

.assignment-card {
    overflow: hidden;
}

.assignment-summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 11px;
    list-style: none;
    min-height: 66px;
    padding: 12px 22px;
    transition: background .18s ease;
}

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

.assignment-summary:hover {
    background: rgba(158, 229, 0, .055);
}

.assignment-card[open] > .assignment-summary {
    border-bottom: 1px solid var(--line);
}

.assignment-summary-mark {
    background: var(--brand);
    border: 4px solid rgba(158, 229, 0, .2);
    border-radius: 50%;
    box-sizing: content-box;
    flex: 0 0 9px;
    height: 9px;
    width: 9px;
}

.assignment-summary-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.assignment-summary-copy strong {
    color: var(--text);
    font-size: 15px;
}

.assignment-summary-copy small {
    color: var(--muted);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.assignment-summary-hint {
    align-items: center;
    color: var(--brand-dark);
    display: flex;
    font-size: 12px;
    font-weight: 800;
    gap: 8px;
    margin-left: auto;
    white-space: nowrap;
}

.assignment-summary-hint::after {
    border-bottom: 2px solid currentColor;
    border-right: 2px solid currentColor;
    content: '';
    height: 7px;
    margin-top: -4px;
    transform: rotate(45deg);
    transition: transform .18s ease, margin .18s ease;
    width: 7px;
}

.assignment-card[open] .assignment-summary-hint::after {
    margin-top: 4px;
    transform: rotate(225deg);
}

.assignment-body {
    padding: 14px 22px 17px;
}

.assignment-current {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.assignment-current > div:first-child {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.assignment-current > div:first-child span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.assignment-current > div:first-child strong {
    font-size: 13px;
    line-height: 1.4;
}

.assignment-current-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 9px;
}

.assignment-pending {
    background: rgba(158, 229, 0, .12);
    border: 1px solid rgba(126, 184, 0, .3);
    border-radius: 999px;
    color: #527800;
    font-size: 11px;
    font-weight: 800;
    padding: 5px 9px;
}

.assignment-editor {
    border-top: 1px solid var(--line);
    margin-top: 14px;
    padding-top: 14px;
}

.assignment-editor[hidden],
.assignment-users-panel[hidden],
.document-form .assignment-user-option[hidden],
.assignment-pending[hidden],
.assignment-empty[hidden],
.assignment-error[hidden],
.assignment-current-actions .button[hidden] {
    display: none;
}

.assignment-choice {
    border: 0;
    margin: 0;
    min-width: 0;
    padding: 0;
}

.assignment-choice legend {
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 8px;
    padding: 0;
    width: 100%;
}

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

.assignment-choice-options label {
    align-items: flex-start;
    background: #f8fafb;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    gap: 8px;
    min-height: 44px;
    padding: 8px 10px;
}

.assignment-choice-options label:has(input:checked) {
    background: rgba(158, 229, 0, .09);
    border-color: rgba(126, 184, 0, .48);
}

.assignment-choice-options input {
    accent-color: var(--brand-dark);
    flex: 0 0 auto;
    height: 14px;
    margin: 2px 0 0;
    width: 14px;
}

.assignment-choice-options span {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.assignment-choice-options strong {
    color: var(--text);
    font-size: 13px;
}

.assignment-choice-options small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
}

.assignment-users-panel {
    background: #f8fafb;
    border: 1px solid var(--line);
    border-radius: 9px;
    margin-top: 9px;
    padding: 9px;
}

.assignment-search {
    align-items: center;
    display: grid;
    gap: 5px;
    grid-template-columns: auto minmax(170px, 290px);
    justify-content: end;
    margin-bottom: 8px;
}

.assignment-search span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.document-form .assignment-search input {
    background: #fff;
    font-size: 12px;
    min-height: 34px;
    padding: 6px 10px;
}

.assignment-users {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    max-height: 214px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 2px 4px 2px 1px;
    scrollbar-color: rgba(126, 184, 0, .55) transparent;
    scrollbar-width: thin;
}

.document-form .assignment-user-option {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 7px;
    cursor: pointer;
    display: flex;
    gap: 6px;
    min-height: 30px;
    min-width: 0;
    overflow: hidden;
    padding: 5px 8px;
}

.document-form .assignment-user-option:has(input:checked) {
    background: rgba(158, 229, 0, .075);
    border-color: rgba(126, 184, 0, .42);
}

.document-form .assignment-user-option input {
    accent-color: var(--brand-dark);
    flex: 0 0 auto;
    height: 10px;
    margin: 0;
    width: 10px;
}

.document-form .assignment-user-option span {
    font-size: 11.5px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-form .assignment-user-option:hover {
    border-color: rgba(126, 184, 0, .55);
}

.assignment-empty,
.assignment-error {
    font-size: 12px;
    margin: 8px 1px 0;
}

.assignment-empty {
    color: var(--muted);
}

.assignment-error {
    color: var(--red);
    font-weight: 800;
}

.assignment-editor-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 11px;
}

.import-guide {
    padding-bottom: 20px;
}

.import-steps {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0 22px 18px;
}

.import-steps article {
    align-items: flex-start;
    background: #f8fafb;
    border: 1px solid var(--line);
    border-radius: 10px;
    display: flex;
    gap: 11px;
    padding: 14px;
}

.import-steps article > strong {
    align-items: center;
    background: var(--brand);
    border-radius: 50%;
    color: #182008;
    display: flex;
    flex: 0 0 28px;
    font-size: 13px;
    height: 28px;
    justify-content: center;
}

.import-steps h3 {
    font-size: 14px;
    margin: 1px 0 4px;
}

.import-steps p,
.import-note {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
    margin: 0;
}

.import-note,
.import-columns {
    background: #f8fafb;
    border-left: 3px solid var(--brand-dark);
    margin: 0 22px 12px;
    padding: 11px 14px;
}

.import-note.safe {
    background: #f1f8eb;
    color: #3f6628;
}

.import-columns {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.import-columns code,
.import-guide code {
    background: #edf1f3;
    border-radius: 5px;
    color: #344148;
    font-size: 11px;
    padding: 2px 5px;
}

.upload-card {
    padding: 22px;
}

.csv-upload {
    align-items: center;
    background: linear-gradient(145deg, #fbfcfc, #f3f7ef);
    border: 2px dashed #bdc9b3;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 30px 20px;
    text-align: center;
    transition: border-color .15s ease, background-color .15s ease;
}

.csv-upload:hover {
    border-color: var(--brand-dark);
}

.csv-upload-icon {
    align-items: center;
    background: var(--brand);
    border-radius: 8px;
    color: #182008;
    display: flex;
    font-size: 11px;
    font-weight: 900;
    height: 42px;
    justify-content: center;
    letter-spacing: .06em;
    width: 48px;
}

.csv-upload small {
    color: var(--muted);
}

.csv-upload input {
    margin-top: 8px;
    max-width: 100%;
}

.mapping-summary {
    padding-bottom: 10px;
}

.mapping-required-key {
    align-items: center;
    display: inline-flex;
    gap: 7px;
    white-space: nowrap;
}

.mapping-required-key i {
    background: var(--brand-dark);
    border-radius: 50%;
    display: inline-block;
    height: 8px;
    width: 8px;
}

.mapping-card,
.mapping-preview-card {
    overflow: hidden;
}

.mapping-list {
    display: grid;
    gap: 9px;
    padding: 0 22px 20px;
}

.mapping-row {
    align-items: center;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    display: grid;
    gap: 13px;
    grid-template-columns: minmax(150px, .9fr) 24px minmax(220px, 1.25fr) minmax(150px, 1fr);
    padding: 12px 14px;
}

.mapping-source,
.mapping-samples {
    min-width: 0;
}

.mapping-source > span,
.mapping-samples > span,
.mapping-target > span {
    color: var(--muted);
    display: block;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .07em;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.mapping-source strong {
    display: block;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.mapping-arrow {
    color: var(--brand-dark);
    font-size: 22px;
    font-weight: 900;
    text-align: center;
}

.mapping-target {
    gap: 0 !important;
}

.mapping-target select[aria-invalid="true"] {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(200, 74, 71, .12);
}

.mapping-samples p {
    color: #3f4b53;
    font-size: 12px;
    line-height: 1.4;
    margin: 0;
    overflow-wrap: anywhere;
}

.mapping-samples .muted-value {
    color: var(--muted);
}

.mapping-error {
    background: #fff2f1;
    border: 1px solid #efc5c2;
    border-radius: 8px;
    color: var(--red);
    font-size: 13px;
    font-weight: 800;
    margin: 0 22px 20px;
    padding: 10px 12px;
}

.mapping-preview-scroll {
    margin: 0 22px 22px;
    overflow-x: auto;
}

.mapping-preview-table {
    min-width: max-content;
}

.mapping-preview-table th,
.mapping-preview-table td {
    max-width: 240px;
    min-width: 135px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mapping-preview-table td {
    font-size: 12px;
}

.conflict-card,
.duplicate-warning-card {
    overflow: hidden;
}

.conflict-count {
    background: #fff1cf;
    border: 1px solid #e8c86f;
    border-radius: 999px;
    color: #795900;
    font-size: 11px;
    padding: 6px 10px;
}

.conflict-list,
.duplicate-match-list {
    display: grid;
    gap: 12px;
    padding: 0 22px 22px;
}

.conflict-item {
    background: #fffaf0;
    border: 1px solid #ead7a5;
    border-radius: 11px;
    padding: 15px;
}

.conflict-heading {
    align-items: flex-start;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.conflict-heading span {
    color: #7b6840;
    display: block;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .07em;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.conflict-heading h3 {
    font-size: 16px;
    margin: 0 0 3px;
}

.conflict-heading small,
.conflict-heading p {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
    margin: 0;
}

.conflict-heading p {
    max-width: 360px;
}

.conflict-options {
    display: grid;
    gap: 9px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.conflict-option {
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    cursor: pointer;
    display: flex;
    gap: 10px;
    min-width: 0;
    padding: 12px;
}

.conflict-option:has(input:checked) {
    background: var(--brand-soft);
    border-color: var(--brand-dark);
    box-shadow: 0 0 0 2px rgba(126, 185, 0, .12);
}

.document-form .conflict-option input[type="radio"] {
    accent-color: var(--brand-dark);
    background: initial;
    border: 0;
    flex: 0 0 auto;
    height: 16px;
    min-height: 0;
    margin-top: 3px;
    padding: 0;
    width: 16px;
}

.conflict-option-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.conflict-option-copy strong {
    color: var(--text);
    font-size: 12px;
}

.conflict-option-copy small {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.conflict-option-create {
    border-style: dashed;
}

.conflict-required {
    color: var(--red);
    font-size: 11px;
    font-weight: 800;
    margin: 10px 0 0;
}

.duplicate-match-list article {
    align-items: center;
    background: #fffaf0;
    border: 1px solid #ead7a5;
    border-radius: 9px;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 12px 14px;
}

.duplicate-match-list article > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.duplicate-match-list small {
    color: var(--muted);
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.duplicate-confirm {
    margin: 0 22px 22px;
}

.duplicate-blocked {
    margin-bottom: 22px;
    margin-top: 0;
}

.update-panel {
    padding: 0 22px 22px;
}

.update-panel > .panel-title-row {
    margin-left: -22px;
    margin-right: -22px;
}

.update-version-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 16px;
}

.update-version-grid article {
    background: #f8fafb;
    border: 1px solid var(--line);
    border-radius: 10px;
    display: grid;
    gap: 5px;
    padding: 16px;
}

.update-version-grid span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.update-version-grid strong {
    font-size: 21px;
}

.update-state {
    border: 1px solid;
    border-radius: 10px;
    margin-bottom: 16px;
    padding: 14px 16px;
}

.update-state p {
    margin: 5px 0 0;
}

.update-state.warning {
    background: #fff8e9;
    border-color: #ead29b;
    color: #765d1d;
}

.update-state.available {
    background: #f1f9e9;
    border-color: #c7e2ae;
    color: #385d22;
}

.update-state.current {
    background: #f3f7f8;
    border-color: var(--line);
    color: #41515a;
}

.update-safety {
    border-top: 1px solid var(--line);
    margin-top: 20px;
    padding-top: 18px;
}

.update-safety h3 {
    font-size: 14px;
    margin: 0 0 9px;
}

.update-safety ul,
.update-state ul {
    color: var(--muted);
    line-height: 1.65;
    margin-bottom: 0;
    padding-left: 19px;
}

.pdf-settings-panel {
    max-width: 860px;
}

.setting-toggle {
    align-items: center;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 11px;
    cursor: pointer;
    display: grid;
    gap: 14px;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 17px;
}

.setting-toggle input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.setting-toggle-track {
    background: #aeb7bd;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
    display: block;
    height: 28px;
    padding: 3px;
    transition: background-color .18s ease;
    width: 50px;
}

.setting-toggle-track span {
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
    display: block;
    height: 22px;
    transition: transform .18s ease;
    width: 22px;
}

.setting-toggle input:checked + .setting-toggle-track {
    background: var(--brand-dark);
}

.setting-toggle input:checked + .setting-toggle-track span {
    transform: translateX(22px);
}

.setting-toggle input:focus-visible + .setting-toggle-track {
    outline: 3px solid rgba(158, 229, 0, .35);
    outline-offset: 3px;
}

.setting-toggle-copy {
    display: grid;
    gap: 3px;
}

.setting-toggle-copy strong {
    color: var(--text);
    font-size: 14px;
}

.setting-toggle-copy small {
    color: var(--muted);
    line-height: 1.45;
}

.pdf-settings-preview {
    background: #f7f9fa;
    border: 1px dashed var(--line-strong);
    border-radius: 9px;
    display: grid;
    gap: 4px;
    margin-top: 15px;
    padding: 14px 16px;
}

.pdf-settings-preview span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.pdf-settings-preview strong {
    font-size: 13px;
}

.pdf-settings-actions {
    border-top: 1px solid var(--line);
    display: flex;
    gap: 9px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 17px;
}

.sticky-actions {
    align-items: center;
    backdrop-filter: blur(14px);
    background: rgba(246, 248, 249, .9);
    border-top: 1px solid rgba(207, 214, 220, .9);
    bottom: 0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    left: var(--sidebar);
    padding: 13px 30px;
    position: fixed;
    right: 0;
    z-index: 25;
}

.detail-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 20px 30px 0;
}

.detail-list {
    display: grid;
    gap: 11px 18px;
    grid-template-columns: 150px minmax(0, 1fr);
    margin: 0;
}

.detail-list dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.detail-list dd {
    color: #273137;
    margin: 0;
}

.notes-view {
    display: grid;
    gap: 12px;
}

.notes-view p {
    border-bottom: 1px solid var(--line);
    margin: 0;
    min-height: 36px;
    padding-bottom: 12px;
}

.master-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 20px 30px 0;
}

.master-card {
    display: grid;
    gap: 22px;
    min-height: 165px;
    overflow: hidden;
    position: relative;
}

.master-card::before {
    background: var(--brand);
    border-radius: 50%;
    content: "";
    height: 54px;
    opacity: .09;
    position: absolute;
    right: -14px;
    top: -14px;
    width: 54px;
}

.master-card h2 {
    margin-bottom: 6px;
}

.master-card span {
    color: var(--muted);
    font-size: 12px;
}

.master-actions {
    align-items: center;
    align-self: end;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.document-table table {
    min-width: 1040px;
}

.row-actions {
    text-align: right;
    width: 1%;
}

.actions-heading {
    background: #f6f8f9;
    box-shadow: -8px 0 14px -12px rgba(16, 24, 32, .5);
    position: sticky;
    right: 0;
    text-align: center;
    z-index: 3;
}

.document-table .row-actions {
    background: #fff;
    box-shadow: -8px 0 14px -12px rgba(16, 24, 32, .5);
    position: sticky;
    right: 0;
    z-index: 2;
}

.document-table tbody tr:not(.is-empty):hover > .row-actions,
.document-table tbody tr.record-row:focus-visible > .row-actions {
    background: #f0fad9;
}

.row-action-group {
    display: inline-grid;
    gap: 6px;
    grid-template-columns: repeat(2, minmax(68px, 1fr));
    min-width: 148px;
}

.row-actions-mobile {
    display: none;
}

.row-action-button,
.row-actions a.row-action-button {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    color: #4f5d66;
    cursor: pointer;
    display: inline-flex;
    font-family: inherit;
    font-size: 11px;
    font-weight: 800;
    gap: 5px;
    justify-content: center;
    line-height: 1;
    margin: 0;
    min-height: 31px;
    padding: 6px 8px;
    text-decoration: none;
    transition: background-color .14s ease, border-color .14s ease, box-shadow .14s ease, transform .14s ease;
    white-space: nowrap;
    width: 100%;
}

.row-action-button svg {
    fill: none;
    flex: 0 0 14px;
    height: 14px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 14px;
}

.row-action-edit {
    background: var(--brand-soft) !important;
    border-color: #cbe88b !important;
    color: #466700 !important;
}

.row-action-copy {
    background: #f2f8ee;
    border-color: #cbdcc0;
    color: #477237;
}

.row-action-delete {
    background: #fff4f3;
    border-color: #ecc6c3;
    color: var(--red);
}

.row-action-button:hover,
.row-actions a.row-action-button:hover {
    background: #fff;
    border-color: #9eadb5;
    box-shadow: 0 4px 10px rgba(16, 24, 32, .1);
    text-decoration: none;
    transform: translateY(-1px);
}

.row-action-edit:hover {
    background: #e8f9bc !important;
    border-color: var(--brand-dark) !important;
}

.row-action-delete:hover {
    background: #ffe5e2;
    border-color: #d99089;
}

.row-action-button:active {
    box-shadow: none;
    transform: translateY(0);
}

.row-action-button:focus-visible {
    outline: 3px solid rgba(126, 185, 0, .28);
    outline-offset: 2px;
}

.inline-delete {
    display: inline;
    margin-left: 10px;
}

.inline-delete button {
    background: transparent;
    border: 0;
    color: var(--red);
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    padding: 0;
}

.document-delete-form {
    display: inline-flex;
    margin: 0;
}

.document-copy-form {
    display: inline-flex;
    margin: 0;
}

.facturae-export {
    display: none !important;
}

.button.danger {
    background: #fff3f2;
    border-color: #e9b8b4;
    color: var(--red);
}

.button.danger:hover {
    background: #ffe5e2;
    border-color: #d99089;
}

.panel-actions {
    margin-top: 0;
}

.sortable-heading {
    align-items: center;
    display: inline-flex;
    gap: 7px;
    white-space: nowrap;
}

.sort-arrows {
    display: inline-flex;
    flex-direction: column;
    gap: 1px;
    line-height: .7;
}

.sort-arrow {
    color: #a5afb5;
    font-size: 10px;
    padding: 2px 3px;
    text-decoration: none;
}

.sort-arrow:hover,
.sort-arrow:focus-visible,
.sort-arrow.active {
    color: var(--brand-dark);
}

.notice.warning {
    background: #fff8e9;
    border-color: #eacb7a;
    color: #735511;
}

.bulk-delete-confirmation {
    max-width: 920px;
}

.bulk-delete-summary {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 18px;
}

.bulk-delete-summary article {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 16px;
}

.bulk-delete-summary article.has-impact {
    background: #fff8e9;
    border-color: #eacb7a;
}

.bulk-delete-summary span {
    color: var(--muted);
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.bulk-delete-summary strong {
    color: var(--text);
    font-size: 26px;
}

.bulk-delete-list {
    display: grid;
    gap: 7px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 18px 0;
    max-height: 260px;
    overflow: auto;
}

.bulk-delete-list > span {
    background: #fbfcfc;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    padding: 10px 12px;
}

.bulk-delete-list strong {
    color: var(--text);
    margin-right: 6px;
}

.bulk-delete-acknowledgement {
    margin: 10px 0 18px;
}

.bulk-delete-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.empty-row {
    color: var(--muted);
    padding: 38px 10px;
    text-align: center;
}

.pagination {
    align-items: center;
    color: var(--muted);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 18px;
}

.select-cell {
    text-align: center;
    width: 42px;
}

.select-cell input,
.check-label input {
    accent-color: var(--brand-dark);
}

.select-cell input {
    height: 16px;
    width: 16px;
}

.check-label {
    align-items: center;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex !important;
    flex-direction: row;
    gap: 9px !important;
    letter-spacing: 0 !important;
    min-height: 42px;
    padding: 9px 11px;
    text-transform: none !important;
}

.check-label input {
    min-height: 0 !important;
    width: auto !important;
}

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

.button-icon {
    font-size: 17px;
    line-height: 1;
    margin-right: 4px;
}

.shipment-card {
    background: #fafcf8;
    border: 1px solid #dfe7d5;
    border-left: 3px solid var(--brand);
    border-radius: 10px;
    margin-top: 14px;
    padding: 18px;
}

.shipment-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.shipment-head h2,
.shipment-head h3 {
    color: #1c252a;
    font-size: 16px;
    margin: 0;
}

.shipment-remove:disabled {
    visibility: hidden;
}

.shipment-notes {
    margin-top: 15px;
}

.detail-shipments {
    padding-top: 0;
}

.shipment-detail-list {
    grid-template-columns: 190px minmax(0, 1fr);
}

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

.guest-shell {
    align-items: center;
    background:
        radial-gradient(circle at 18% 14%, rgba(158, 229, 0, .18), transparent 25%),
        radial-gradient(circle at 82% 82%, rgba(158, 229, 0, .08), transparent 28%),
        linear-gradient(135deg, #111518 0%, #1d2428 50%, #0d1012 100%);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
    padding: 28px 16px;
    position: relative;
}

.guest-shell::before,
.guest-shell::after {
    border: 1px solid rgba(255, 255, 255, .045);
    border-radius: 50%;
    content: "";
    height: 480px;
    position: fixed;
    width: 480px;
}

.guest-shell::before {
    left: -240px;
    top: -220px;
}

.guest-shell::after {
    bottom: -300px;
    right: -180px;
}

.login-card {
    background: rgba(255, 255, 255, .98);
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 18px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, .32);
    overflow: hidden;
    padding: 0 34px 27px;
    position: relative;
    width: min(430px, calc(100vw - 32px));
    z-index: 2;
}

.login-card::before {
    background: var(--brand);
    content: "";
    height: 4px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.login-brand {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: center;
    margin: 0 -34px 26px;
    padding: 24px 34px 20px;
}

.login-brand img {
    display: block;
    height: auto;
    width: 225px;
}

.login-heading > span {
    color: var(--brand-dark);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.login-heading h1 {
    font-size: 29px;
    letter-spacing: -.035em;
    margin: 4px 0 4px;
}

.login-heading p,
.login-card > p {
    color: var(--muted);
    margin: 0 0 22px;
}

.login-card form {
    display: grid;
    gap: 15px;
}

.login-card label {
    color: #5b6871;
    display: grid;
    font-size: 11px;
    font-weight: 800;
    gap: 7px;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.login-card input {
    background: #fafbfc;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    color: var(--text);
    min-height: 46px;
    padding: 10px 12px;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.login-card input:focus {
    background: #fff;
    border-color: var(--brand-dark);
    box-shadow: 0 0 0 3px rgba(158, 229, 0, .18);
    outline: 0;
}

.login-card button {
    background: var(--brand);
    border: 0;
    border-radius: 9px;
    color: #11160c;
    cursor: pointer;
    font-weight: 850;
    min-height: 47px;
    transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.login-card button:hover {
    background: #a9ee0c;
    box-shadow: 0 10px 22px rgba(121, 178, 0, .2);
    transform: translateY(-1px);
}

.login-foot {
    color: #8a949a;
    display: block;
    font-size: 10px;
    margin-top: 22px;
    text-align: center;
}

.alert {
    border-radius: 8px;
    margin: 0 0 18px;
    padding: 11px 13px;
}

.alert-error {
    background: #fff0ef;
    border: 1px solid #efc7c5;
    color: #963936;
}

@media (max-width: 1180px) {
    .metrics,
    .tile-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

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

    .row-action-group {
        grid-template-columns: repeat(2, minmax(76px, 1fr));
        min-width: 160px;
    }

    .row-action-button,
    .row-actions a.row-action-button {
        min-height: 34px;
        padding: 7px 9px;
    }

    .document-table .actions-heading,
    .document-table td.row-actions {
        display: none;
    }

    .row-actions-mobile {
        display: block;
        margin-top: 10px;
    }

    .row-actions-mobile .row-action-group {
        display: grid;
        width: 160px;
    }
}

@media (max-width: 960px) {
    body.sidebar-collapsed {
        --sidebar: 272px;
    }

    .app-shell {
        display: block;
    }

    .sidebar {
        bottom: 0;
        height: 100vh;
        left: 0;
        position: fixed;
        top: 0;
        transform: translateX(-105%);
        transition: transform .2s ease;
        width: min(var(--sidebar), calc(100vw - 48px));
    }

    .sidebar-collapse {
        display: none;
    }

    .sidebar-collapsed .sidebar {
        padding: 24px 18px 20px;
    }

    .sidebar-collapsed .brand {
        display: block;
        height: auto;
        padding: 10px 13px;
    }

    .sidebar-collapsed .brand img {
        display: block;
    }

    .sidebar-collapsed .brand::after {
        display: none;
    }

    .sidebar-collapsed .user-box {
        justify-content: flex-start;
    }

    .sidebar-collapsed .user-box div {
        display: grid;
    }

    .sidebar-collapsed .side-nav a {
        gap: 12px;
        justify-content: flex-start;
        padding: 10px 12px;
    }

    .sidebar-collapsed .side-nav a span {
        display: inline;
    }

    .sidebar-collapsed .sidebar-foot {
        display: block;
    }

    .nav-open .sidebar {
        box-shadow: 20px 0 60px rgba(0, 0, 0, .3);
        transform: translateX(0);
    }

    .nav-backdrop {
        background: rgba(5, 8, 10, .54);
        border: 0;
        bottom: 0;
        cursor: default;
        display: block;
        left: 0;
        opacity: 0;
        pointer-events: none;
        position: fixed;
        right: 0;
        top: 0;
        transition: opacity .2s ease;
        z-index: 40;
    }

    .nav-open {
        overflow: hidden;
    }

    .nav-open .nav-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .menu-button {
        display: flex;
    }

    .sticky-actions {
        left: 0;
    }

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

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

    .assignment-users,
    .import-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .mapping-row {
        grid-template-columns: minmax(140px, .9fr) 18px minmax(210px, 1.2fr);
    }

    .conflict-options {
        grid-template-columns: 1fr;
    }

    .mapping-samples {
        grid-column: 1 / -1;
        padding-left: 0;
    }
}

@media (max-width: 700px) {
    .topbar {
        height: 62px;
        padding: 0 18px;
    }

    .online-state {
        display: none;
    }

    .logout {
        border-left: 0;
        padding-left: 0;
    }

    .page-head {
        padding: 24px 20px 22px;
    }

    .quick-add-fields {
        grid-template-columns: 1fr;
    }

    .page-head::after {
        left: 20px;
    }

    .metrics,
    .tile-grid,
    .dashboard-grid,
    .detail-grid,
    .master-grid {
        padding-left: 18px;
        padding-right: 18px;
    }

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

    .admin-metrics,
    .master-grid,
    .detail-grid,
    .filter-bar,
    .form-grid,
    .notes-grid {
        grid-template-columns: 1fr;
    }

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

    .assignment-summary {
        padding-left: 16px;
        padding-right: 16px;
    }

    .assignment-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .assignment-current {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .assignment-current-actions {
        flex-wrap: wrap;
        justify-content: space-between;
        width: 100%;
    }

    .assignment-search {
        grid-template-columns: 1fr;
        justify-content: stretch;
    }

    .assignment-choice-options,
    .import-steps,
    .update-version-grid {
        grid-template-columns: 1fr;
    }

    .mapping-row {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .mapping-arrow {
        display: none;
    }

    .mapping-list {
        padding-left: 16px;
        padding-right: 16px;
    }

    .mapping-error,
    .mapping-preview-scroll {
        margin-left: 16px;
        margin-right: 16px;
    }

    .mapping-required-key {
        align-self: flex-start;
        margin-top: 8px;
    }

    .mapping-summary .panel-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .conflict-list,
    .duplicate-match-list {
        padding-left: 16px;
        padding-right: 16px;
    }

    .conflict-heading,
    .duplicate-match-list article {
        align-items: stretch;
        flex-direction: column;
    }

    .duplicate-match-list .button {
        width: 100%;
    }

    .duplicate-confirm {
        margin-left: 16px;
        margin-right: 16px;
    }

    .main > .panel {
        margin-left: 18px;
        margin-right: 18px;
    }

    .panel {
        padding: 18px;
    }

    .document-form {
        padding: 18px 18px 84px;
    }

    .notice {
        margin-left: 18px;
        margin-right: 18px;
    }

    .sticky-actions {
        padding: 11px 18px;
    }

    .bar-chart {
        gap: 10px;
        padding-left: 8px;
        padding-right: 8px;
    }

    .bar-item span {
        font-size: 9px;
    }

    .shipment-detail-list,
    .detail-list {
        grid-template-columns: 1fr;
    }

    .bulk-delete-summary,
    .bulk-delete-list {
        grid-template-columns: 1fr;
    }

    .bulk-delete-actions {
        flex-direction: column-reverse;
    }

    .bulk-delete-actions .button {
        width: 100%;
    }

    .detail-list dt {
        margin-bottom: -8px;
    }
}

@media (max-width: 460px) {
    .assignment-users {
        grid-template-columns: 1fr;
    }

    .topbar-context small,
    .topbar-context strong {
        max-width: 155px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .logout {
        font-size: 0;
    }

    .logout::after {
        content: "Salir";
        font-size: 12px;
    }

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

    .metric,
    .tile {
        min-height: 100px;
    }

    .head-actions,
    .master-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .head-actions .button,
    .master-actions .button {
        width: 100%;
    }

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

    .login-card {
        padding-left: 24px;
        padding-right: 24px;
    }

    .login-brand {
        margin-left: -24px;
        margin-right: -24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
