:root {
    --ink: #182d35;
    --muted: #71818a;
    --line: #e3e9e9;
    --brand: #137b69;
    --brand-dark: #0c594d;
    --bg: #f5f8f7;
    --sidebar: #122c31;
    --gold: #c9aa65;
    --radius: 12px;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    font-size: 14px;
    line-height: 1.5;
}
button,
input,
select,
textarea {
    font: inherit;
}
button,
a,
input,
select,
textarea {
    outline-offset: 4px;
}
a {
    color: var(--brand);
    text-decoration: none;
}
button {
    cursor: pointer;
}
button:disabled {
    opacity: 0.55;
    cursor: wait;
}
[hidden] {
    display: none !important;
}
h1,
h2,
h3,
p {
    margin-top: 0;
}
h1 {
    font-size: 31px;
    line-height: 1.2;
    letter-spacing: -0.9px;
    margin-bottom: 8px;
}
h2 {
    font-size: 22px;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
}
h3 {
    font-size: 15px;
    margin: 0;
}
.muted {
    color: var(--muted);
}
.tiny {
    font-size: 10px;
    letter-spacing: 1.3px;
    font-weight: 700;
}
.eyebrow {
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 700;
    color: var(--brand);
    display: block;
    margin-bottom: 14px;
}
.wordmark {
    display: flex;
    gap: 10px;
    align-items: center;
    font-weight: 750;
    font-size: 18px;
    letter-spacing: 1px;
    color: inherit;
}
.logo-mark {
    display: inline-grid;
    place-items: center;
    border: 1px solid #ffffff47;
    background: #ffffff0d;
    width: 37px;
    height: 37px;
    border-radius: 9px;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
}
.pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 1.2px;
    border-radius: 5px;
    background: #e8f4ef;
    color: #147560;
    white-space: nowrap;
}
.login-screen {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}
.login-story {
    background: var(--sidebar);
    color: white;
    padding: 55px 11%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.login-story:after {
    content: "";
    position: absolute;
    border: 1px solid #ffffff0e;
    border-radius: 50%;
    width: 550px;
    height: 550px;
    right: -300px;
    bottom: -150px;
    pointer-events: none;
}
.login-story h1 {
    font-family: Georgia, serif;
    font-size: clamp(38px, 3.5vw, 62px);
    font-weight: 400;
    letter-spacing: -1.5px;
    line-height: 1.12;
    margin-bottom: 25px;
}
.login-story p {
    color: #b3c9cb;
    max-width: 365px;
    font-size: 15px;
    line-height: 1.8;
}
.login-story .eyebrow {
    color: var(--gold);
    margin-bottom: 26px;
}
.login-story small {
    color: #789c9f;
    font-size: 11px;
}
.story-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 30px;
}
.story-chips span {
    border: 1px solid #557578;
    padding: 6px 9px;
    border-radius: 4px;
    font-size: 11px;
    color: #cbdddd;
}
.login-panel {
    display: grid;
    place-items: center;
    padding: 50px;
    background: #fbfcfb;
}
.login-card {
    width: 100%;
    max-width: 370px;
}
.login-card h2 {
    font-size: 30px;
    margin: 22px 0 8px;
    letter-spacing: -1px;
}
.login-card form {
    margin-top: 32px;
}
.login-card .button {
    width: 100%;
    justify-content: space-between;
    margin-top: 10px;
}
.note {
    background: #edf3f0;
    padding: 13px 16px;
    border-radius: 8px;
    color: #678078;
    font-size: 12px;
    margin-top: 22px;
}
label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #475d66;
    margin-bottom: 16px;
}
input,
select,
textarea {
    width: 100%;
    display: block;
    border: 1px solid #d5dfdf;
    border-radius: 7px;
    padding: 10px 12px;
    background: white;
    color: var(--ink);
    margin-top: 6px;
    min-height: 41px;
}
input:focus,
select:focus,
textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px #137b6911;
}
textarea {
    resize: vertical;
    min-height: 85px;
}
input[type="checkbox"] {
    width: 16px;
    min-height: auto;
    margin: 0;
    display: inline-block;
    accent-color: var(--brand);
}
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 16px;
    border: 1px solid #cfdbd9;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    background: white;
    color: var(--ink);
    min-height: 40px;
    white-space: nowrap;
}
.button:hover {
    background: #f2f6f4;
}
.button.primary {
    background: var(--brand);
    border-color: var(--brand);
    color: white;
}
.button.primary:hover {
    background: var(--brand-dark);
}
.button.danger {
    color: #a9443b;
    background: #fff8f6;
    border-color: #edcbc5;
}
.button.small {
    padding: 6px 10px;
    min-height: 30px;
    font-size: 11px;
}
.text-button {
    border: 0;
    background: none;
    padding: 0;
    color: var(--brand);
    font-size: 12px;
}
.form-error {
    color: #b14d40;
    font-size: 12px;
    margin: 8px 0;
    white-space: pre-line;
}
.workspace {
    display: flex;
    min-height: 100vh;
}
.sidebar {
    background: var(--sidebar);
    color: #9fb8ba;
    width: 235px;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    padding: 30px 17px 0;
    display: flex;
    flex-direction: column;
    z-index: 20;
}
.sidebar > .wordmark {
    color: #e9f5f3;
    margin: 0 13px 38px;
    position: relative;
    font-size: 21px;
}
.wordmark-sub {
    font-size: 8px;
    letter-spacing: 2px;
    position: absolute;
    left: 48px;
    top: 31px;
    font-weight: 400;
    color: #9fb8ba;
}
.nav-label {
    display: block;
    color: #668c90;
    font-size: 8px;
    letter-spacing: 1.6px;
    font-weight: 700;
    margin: 12px 16px;
}
.sidebar nav {
    overflow: auto;
    flex: 1;
}
.sidebar nav > a {
    display: flex;
    align-items: center;
    gap: 13px;
    color: #a6bfc2;
    padding: 11px 14px;
    border-radius: 6px;
    font-size: 19px;
    line-height: 1.2;
    margin-bottom: 4px;
}
.sidebar nav > a > span {
    font-size: 12px;
}
.sidebar nav > a:hover {
    background: #ffffff08;
    color: white;
}
.sidebar nav > a.active {
    color: white;
    background: #1e464b;
    box-shadow: inset 3px 0 var(--gold);
}
.nav-divider {
    border-top: 1px solid #ffffff12;
    margin: 24px 13px 16px;
}
.sidebar-bottom {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 21px 6px;
    border-top: 1px solid #ffffff1c;
    font-size: 11px;
}
.sidebar-bottom strong {
    display: block;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #dce9e7;
}
.sidebar-bottom .text-button {
    color: #84a8aa;
    font-size: 10px;
}
.avatar {
    border-radius: 50%;
    background: #345a58;
    color: #e2c68e;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    font-family: Georgia, serif;
    font-size: 15px;
}
.logout-button {
    margin-left: auto;
    background: none;
    border: 0;
    color: #99b1b4;
    font-size: 20px;
}
.main-shell {
    margin-left: 235px;
    flex: 1;
    min-width: 0;
}
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border-bottom: 1px solid var(--line);
    padding: 16px 36px;
    height: 84px;
}
.topbar select {
    border: 0;
    margin: 0;
    padding: 2px 25px 2px 0;
    font-weight: 650;
    font-size: 14px;
    min-height: 24px;
    max-width: 330px;
    background: transparent;
}
.top-right {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 11px;
}
.lab-banner {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 36px;
    background: #ecf4ef;
    color: #698276;
    font-size: 11px;
    border-bottom: 1px solid #e1eae4;
}
.lab-banner strong {
    color: #40745d;
    font-size: 10px;
}
.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6f997a;
}
main {
    padding: 32px 36px 50px;
    max-width: 1600px;
    margin: auto;
    min-height: calc(100vh - 181px);
}
.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 27px;
    gap: 16px;
}
.page-heading .eyebrow {
    margin-bottom: 10px;
    font-size: 9px;
}
.page-heading p {
    font-size: 12px;
    margin: 0;
}
.row-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 25px;
}
.metric {
    border: 1px solid var(--line);
    background: white;
    border-radius: var(--radius);
    padding: 22px;
    position: relative;
}
.metric .metric-icon {
    position: absolute;
    right: 19px;
    top: 18px;
    background: #eef5f2;
    color: var(--brand);
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    font-size: 18px;
}
.metric-label {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 13px;
    display: block;
    padding-right: 30px;
}
.metric-value {
    font-size: 30px;
    font-weight: 650;
    letter-spacing: -1px;
    line-height: 1.2;
}
.metric-foot {
    font-size: 10px;
    color: #8b9a9f;
    margin-top: 10px;
}
.panel {
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 22px;
}
.panel-head {
    padding: 20px 23px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid #edf0ef;
}
.panel-head p {
    font-size: 11px;
    margin: 4px 0 0;
    color: var(--muted);
}
.panel-body {
    padding: 24px;
}
.grid-two {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: 22px;
}
.help-panel {
    background: #e8f0ed;
    border: 1px solid #d9e4df;
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 22px;
}
.help-panel h3 {
    font-family: Georgia, serif;
    font-size: 23px;
    font-weight: 400;
    margin: 9px 0 12px;
}
.help-panel p {
    font-size: 12px;
    color: #6d8078;
    line-height: 1.8;
}
.steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 6px 0;
}
.step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #d9e6df;
    display: grid;
    place-items: center;
    font-size: 10px;
    flex-shrink: 0;
    color: #4d7d69;
}
.step strong {
    font-size: 11px;
    display: block;
}
.step p {
    margin: 3px 0 0;
    font-size: 11px;
}
.table-wrap {
    overflow: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
th {
    font-size: 9px;
    color: #8a989f;
    letter-spacing: 1px;
    font-weight: 650;
    text-transform: uppercase;
    background: #fbfcfb;
    padding: 12px 20px;
    white-space: nowrap;
}
td {
    font-size: 12px;
    padding: 16px 20px;
    border-top: 1px solid #eef1f1;
    vertical-align: middle;
}
td small {
    display: block;
    color: #92a0a5;
    font-size: 10px;
    margin-top: 3px;
}
td strong {
    font-size: 12px;
    font-weight: 650;
}
tbody tr:hover {
    background: #fcfdfc;
}
.right {
    text-align: right;
}
.badge {
    font-size: 9px;
    font-weight: 650;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 4px;
    color: #5e7884;
    background: #edf2f5;
}
.badge.success {
    background: #edf6ef;
    color: #467552;
}
.badge.warning {
    background: #faf3e3;
    color: #a28032;
}
.badge.error {
    background: #faeeeb;
    color: #b36752;
}
.badge.neutral {
    background: #edf0f4;
    color: #78848e;
}
.empty {
    padding: 45px 25px;
    text-align: center;
    color: #899b9f;
    font-size: 12px;
}
.empty-symbol {
    font-size: 33px;
    display: block;
    color: #b7ceca;
    margin-bottom: 10px;
}
.toolbar {
    display: flex;
    align-items: end;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}
.toolbar label {
    margin: 0;
    min-width: 110px;
    flex: 1;
    max-width: 220px;
    font-size: 10px;
}
.toolbar select,
.toolbar input {
    padding: 8px 10px;
    min-height: 35px;
    font-size: 12px;
}
.pager {
    padding: 16px 20px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--muted);
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
}
.form-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.span-all {
    grid-column: 1/-1;
}
.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    margin-top: 8px;
}
.section-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: #758f90;
    margin: 12px 0 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    grid-column: 1/-1;
}
.line-row {
    display: grid;
    grid-template-columns:
        75px minmax(150px, 1fr)
        70px 70px 90px 110px 80px 28px;
    gap: 7px;
    align-items: start;
    margin: 12px 0;
}
.line-row input,
.line-row select {
    padding: 7px;
    min-height: 35px;
    margin: 0;
    font-size: 11px;
}
.line-row label {
    font-size: 9px;
    margin: 0;
}
.line-row label input,
.line-row label select {
    margin-top: 5px;
}
.remove-line {
    padding: 0;
    border: 0;
    background: none;
    font-size: 21px;
    color: #b39b94;
    margin-top: 22px;
}
.amount-preview {
    text-align: right;
    font-size: 13px;
    color: var(--muted);
    padding: 16px 0;
}
.amount-preview strong {
    font-size: 22px;
    color: var(--ink);
    margin-left: 12px;
}
.notice {
    border-left: 3px solid #c2a569;
    background: #fbf8f0;
    padding: 12px 16px;
    font-size: 11px;
    color: #8a794f;
    margin: 0 0 20px;
    line-height: 1.7;
}
.code {
    font-family: Consolas, monospace;
    font-size: 11px;
    background: #f2f5f5;
    padding: 12px;
    border-radius: 6px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-all;
}
.secret {
    background: #fff8df;
    border: 1px solid #eedc99;
    padding: 16px;
    margin: 16px 0;
}
.data-list {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 12px 20px;
    font-size: 12px;
}
.data-list dt {
    color: var(--muted);
}
.data-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}
.check-label {
    display: flex;
    gap: 8px;
    align-items: center;
    font-weight: 400;
}
.toast {
    position: fixed;
    right: 25px;
    top: 22px;
    max-width: 450px;
    background: #173e35;
    color: white;
    padding: 14px 20px;
    border-radius: 9px;
    box-shadow: 0 8px 35px #0002;
    z-index: 100;
    font-size: 12px;
    white-space: pre-line;
}
.toast.error {
    background: #8c4438;
}
dialog {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 27px;
    width: min(850px, 94vw);
    max-height: 90vh;
    overflow: auto;
    color: var(--ink);
}
dialog::backdrop {
    background: #112e3988;
    backdrop-filter: blur(3px);
}
.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}
.modal-head h2 {
    margin: 0;
}
.modal-head .eyebrow {
    font-size: 9px;
    margin: 0 0 7px;
}
.icon-button {
    border: 0;
    background: #f1f4f3;
    color: #6c8487;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    font-size: 21px;
}
footer {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: #a1afae;
    padding: 18px 36px;
    border-top: 1px solid var(--line);
}
.loading {
    padding: 60px;
    text-align: center;
    color: var(--muted);
}
.mobile-menu {
    display: none;
    border: 0;
    background: none;
    font-size: 22px;
}
.legend {
    display: flex;
    gap: 13px;
    font-size: 10px;
    color: var(--muted);
    margin-top: 16px;
}
.progress-bar {
    height: 7px;
    display: flex;
    border-radius: 5px;
    overflow: hidden;
    background: #e7eeeb;
    margin: 22px 0 10px;
}
.progress-bar span {
    height: 100%;
    background: var(--brand);
}
.shortcut {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 17px 20px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
}
.shortcut:last-child {
    border: 0;
}
.shortcut .shortcut-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #f0f5f3;
    display: grid;
    place-items: center;
    color: var(--brand);
    font-size: 19px;
}
.shortcut strong {
    display: block;
    font-size: 12px;
}
.shortcut small {
    font-size: 10px;
    color: var(--muted);
}
.shortcut > span:last-child {
    margin-left: auto;
    color: #91aaa3;
}
.document-choice {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.document-choice button {
    background: white;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 10px 18px;
    font-size: 12px;
    color: var(--muted);
}
.document-choice button.selected {
    background: #eaf4ee;
    color: var(--brand);
    border-color: #91bbab;
    font-weight: 650;
}
@media (min-width: 1600px) {
    main {
        padding-top: 42px;
    }
}
@media (max-width: 1200px) {
    .sidebar {
        width: 210px;
    }
    .main-shell {
        margin-left: 210px;
    }
    main {
        padding: 28px 24px;
    }
    .topbar,
    .lab-banner {
        padding-left: 24px;
        padding-right: 24px;
    }
    .metric {
        padding: 18px;
    }
    .metric-icon {
        display: none !important;
    }
    .metric-label {
        padding-right: 0;
    }
    .line-row {
        grid-template-columns:
            65px minmax(120px, 1fr)
            55px 55px 75px 90px 60px 20px;
    }
    .line-row input,
    .line-row select {
        font-size: 10px;
    }
    .grid-two {
        grid-template-columns: 1.25fr 1fr;
    }
}
@media (max-width: 900px) {
    .metrics {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-two {
        grid-template-columns: 1fr;
    }
    .sidebar {
        width: 195px;
        padding-left: 10px;
        padding-right: 10px;
    }
    .main-shell {
        margin-left: 195px;
    }
    .top-right #active-ruc {
        display: none;
    }
    .form-grid.three {
        grid-template-columns: repeat(2, 1fr);
    }
    .line-row {
        grid-template-columns: 1fr 2fr 1fr 1fr;
        gap: 10px;
        padding: 15px;
        border: 1px solid var(--line);
        border-radius: 8px;
        position: relative;
    }
    .remove-line {
        position: absolute;
        right: 8px;
        top: -12px;
    }
    .login-story {
        padding: 35px 10%;
    }
    .login-panel {
        padding: 35px;
    }
}
@media (max-width: 650px) {
    .login-screen {
        grid-template-columns: 1fr;
    }
    .login-story {
        display: none;
    }
    .login-panel {
        min-height: 100vh;
        padding: 30px;
    }
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.2s;
        width: 235px;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-shell {
        margin-left: 0;
    }
    .mobile-menu {
        display: block;
        margin-right: 10px;
    }
    .topbar {
        padding: 12px 16px;
        height: 74px;
        justify-content: flex-start;
    }
    .topbar select {
        font-size: 12px;
        max-width: 210px;
    }
    .top-right {
        margin-left: auto;
    }
    .lab-banner {
        padding: 9px 16px;
        gap: 7px;
        font-size: 9px;
        flex-wrap: wrap;
    }
    .lab-banner span:last-child {
        font-size: 9px;
    }
    main {
        padding: 24px 16px;
    }
    .page-heading {
        align-items: flex-start;
    }
    .page-heading h1 {
        font-size: 26px;
    }
    .page-heading p {
        font-size: 11px;
    }
    .page-heading .row-actions {
        flex-direction: column;
    }
    .metrics {
        gap: 10px;
    }
    .metric {
        padding: 16px;
    }
    .metric-value {
        font-size: 25px;
    }
    .metric-label {
        font-size: 10px;
    }
    .panel-body {
        padding: 18px;
    }
    .panel-head {
        padding: 18px;
    }
    .form-grid,
    .form-grid.three {
        grid-template-columns: 1fr;
    }
    .line-row {
        grid-template-columns: 1fr 1fr;
    }
    .data-list {
        grid-template-columns: 95px 1fr;
        gap: 10px;
        font-size: 11px;
    }
    td,
    th {
        padding-left: 14px;
        padding-right: 14px;
    }
    footer {
        padding: 16px;
        font-size: 8px;
    }
    .toast {
        right: 12px;
        left: 12px;
        max-width: none;
    }
    .toolbar {
        padding: 16px;
    }
    .toolbar label {
        max-width: none;
        min-width: 100px;
    }
    .document-choice button {
        padding: 8px 12px;
        font-size: 11px;
    }
    .topbar .tiny {
        font-size: 8px;
    }
    .topbar .pill {
        font-size: 9px;
    }
}
