:root {
    color-scheme: light;
    --bg: #f4f6f8;
    --panel: #ffffff;
    --panel-soft: #f9fafb;
    --text: #17202c;
    --muted: #667085;
    --line: #d8dee8;
    --line-soft: #edf0f4;
    --accent: #2442f5;
    --accent-dark: #1832d8;
    --danger: #b42318;
    --warning: #b54708;
    --ok: #027a48;
    --shadow: 0 12px 32px rgba(20, 31, 43, .07);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f7f8fa;
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.45;
}

a {
    color: inherit;
}

.shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 264px 1fr;
}

.sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    overflow-y: auto;
    background: #ffffff;
    border-right: 1px solid var(--line);
    color: var(--text);
    padding: 24px 16px;
}

.brand {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0;
    margin-bottom: 6px;
}

.userline {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 24px;
}

.nav {
    display: grid;
    gap: 22px;
}

.nav-section {
    display: grid;
    gap: 3px;
}

.nav-heading {
    width: 122px;
    margin-bottom: 2px;
    padding-bottom: 2px;
    border-bottom: 1px solid #17202c;
    color: #344054;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.nav a {
    display: block;
    text-decoration: none;
    padding: 7px 9px;
    border-radius: 7px;
    color: #344054;
    font-weight: 700;
    font-size: 14px;
}

.nav a.active,
.nav a:hover {
    background: #eef2ff;
    color: var(--accent);
}

.nav-placeholder {
    display: block;
    padding: 7px 9px;
    color: #98a2b3;
    font-size: 14px;
    font-weight: 700;
}

.logout-link {
    margin-top: 2px;
}

.main {
    padding: 30px;
    max-width: none;
    width: 100%;
    min-width: 0;
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

h1 {
    font-size: 28px;
    line-height: 1.15;
    margin: 0 0 5px;
}

h2 {
    font-size: 16px;
    margin: 0 0 14px;
}

.subtitle,
.muted-text {
    color: var(--muted);
}

.subtitle {
    margin: 0;
}

.grid {
    display: grid;
    gap: 16px;
}

.grid.two {
    grid-template-columns: minmax(320px, 440px) minmax(0, 1fr);
    align-items: start;
}

.stats {
    grid-template-columns: repeat(5, minmax(130px, 1fr));
}

.rate-margin-stats {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.rate-margin-stats .card {
    padding: 16px;
}

.rate-margin-stats .value {
    font-size: 25px;
}

.cashflow-stats {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.cashflow-stats .card {
    padding: 16px;
}

.cashflow-stats .value {
    font-size: 23px;
}

.estimation-stats {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-bottom: 18px;
}

.estimation-stats .card {
    padding: 16px;
}

.estimation-stats .value {
    font-size: 24px;
}

.module-stats {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin: 0 0 18px;
}

.module-stats .card.stat {
    min-height: 96px;
    padding: 16px;
}

.module-stats .stat .value {
    font-size: 24px;
}

.pto-stats {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    margin-bottom: 18px;
}

.pto-record-lines {
    display: grid;
    gap: 6px;
    line-height: 1.35;
}

.pto-record-reason {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.pto-rejection-section {
    border-color: #fecdca;
    background: #fffbfa;
}

.pto-rejection-note {
    min-height: 46px;
    border: 1px solid #fecdca;
    border-radius: 8px;
    background: #ffffff;
    color: var(--danger);
    padding: 12px 14px;
    overflow-wrap: anywhere;
}

.pto-balance-records {
    overflow-x: auto;
}

.pto-balance-records table {
    width: 100%;
    min-width: 640px;
}

.pto-balance-records th,
.pto-balance-records td {
    vertical-align: top;
}

.pto-balance-records td:last-child {
    max-width: 320px;
    overflow-wrap: anywhere;
}

.pto-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.pto-actions .inline-form {
    margin-top: 0;
}

.pto-hr-table th,
.pto-hr-table td {
    vertical-align: middle;
}

.pto-hr-table td:nth-child(8) {
    vertical-align: top;
}

.pto-hr-table .actions-cell {
    display: table-cell;
    width: 88px;
    text-align: right;
    white-space: nowrap;
}

.pto-hr-table .row-menu {
    display: inline-block;
}

.estimation-month-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.cashflow-balance-panel {
    margin: 18px 0;
}

.cashflow-balance-form .modal-actions {
    margin-top: 12px;
}

.cashflow-balance-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cashflow-balance-title button {
    flex: 0 0 auto;
    min-height: 42px;
}

.cashflow-balance-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.cashflow-balance-field {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 14px;
    background: #fff;
}

.cashflow-balance-field > span {
    color: #52607a;
    font-size: 13px;
    font-weight: 700;
}

.balance-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 68px;
    gap: 8px;
    align-items: center;
}

.balance-input-row input {
    width: 100%;
    min-width: 0;
    height: 42px;
}

.currency-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, .35);
    border-radius: 10px;
    background: #f8fafc;
    color: #24324b;
    font-size: 13px;
    font-weight: 800;
}

.cashflow-section {
    margin-top: 16px;
}

.cashflow-section h2 {
    margin: 0 0 12px;
    font-size: 17px;
}

.cashflow-collapsible {
    padding: 0;
    overflow: hidden;
}

.cashflow-collapsible summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 54px;
    padding: 0 16px;
    cursor: pointer;
    color: #101828;
    font-size: 16px;
    font-weight: 850;
    list-style: none;
}

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

.cashflow-collapsible summary::before {
    content: "v";
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
    color: var(--accent);
    transition: transform .16s ease;
}

.cashflow-collapsible:not([open]) summary::before {
    transform: rotate(-90deg);
}

.cashflow-collapsible summary span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: auto;
}

.cashflow-collapsible summary span:last-child {
    padding: 5px 10px;
    border-radius: 999px;
    background: #eef4ff;
    color: #3257d9;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.cashflow-collapsible table {
    border-top: 1px solid var(--line-soft);
}

.cashflow-section-list {
    display: grid;
    gap: 12px;
    padding: 0 12px 12px;
    border-top: 1px solid var(--line-soft);
}

.cashflow-subsection {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 12px;
    background: #fff;
}

.cashflow-subsection summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 48px;
    padding: 0 14px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 850;
    list-style: none;
}

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

.cashflow-subsection summary::before {
    content: "v";
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    transition: transform .16s ease;
}

.cashflow-subsection:not([open]) summary::before {
    transform: rotate(-90deg);
}

.cashflow-subsection summary span:first-child {
    margin-right: auto;
}

.cashflow-subsection summary span:last-child {
    padding: 4px 9px;
    border-radius: 999px;
    background: #eef4ff;
    color: #3257d9;
    font-size: 12px;
    font-weight: 800;
}

.cashflow-subsection table {
    border-top: 1px solid var(--line-soft);
    border-radius: 0;
}

.table-total-row td {
    background: #f8fafc;
    border-top: 1px solid rgba(37, 99, 235, .18);
}

.panel,
.card {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 18px;
}

.stat {
    min-height: 112px;
}

.stat .label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.stat .value {
    font-size: 25px;
    font-weight: 800;
    margin-top: 7px;
}

form {
    display: grid;
    gap: 12px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

label {
    display: grid;
    gap: 5px;
    color: #344054;
    font-size: 13px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #cfd6e2;
    border-radius: 7px;
    padding: 9px 10px;
    font: inherit;
    background: #fff;
    color: var(--text);
    outline: none;
}

select {
    appearance: none;
    padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%23344054' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    background-size: 16px;
}

select:not(:disabled),
input[type="checkbox"]:not(:disabled) {
    cursor: pointer;
}

input:disabled,
select:disabled,
textarea:disabled {
    background-color: #f2f4f7;
    color: #667085;
    cursor: not-allowed;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(36, 66, 245, .12);
}

textarea {
    min-height: 82px;
    resize: vertical;
}

.is-disabled {
    color: #667085;
}

.rate-currency-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 118px;
    gap: 8px;
}

.rate-currency-field select {
    min-width: 0;
}

.modal-field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.modal-field-row + .modal-field-row {
    margin-top: 12px;
}

.tool-form-grid .section-field {
    grid-column: 1 / -1;
}

.full-span {
    grid-column: 1 / -1;
}

.settings-card {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-top: 18px;
    padding: 18px;
}

.settings-card .form-actions {
    display: flex;
    justify-content: flex-end;
}

.settings-form {
    display: grid;
    gap: 16px;
}

.settings-form .timesheet-extra-section {
    margin: 0;
}

.billing-invoice-form {
    display: block;
}

.billing-sticky-toolbar {
    position: sticky;
    top: 0;
    z-index: 12;
    margin-bottom: 18px;
    padding: 10px 0 12px;
    background: linear-gradient(180deg, var(--bg) 0%, rgba(248, 250, 247, .96) 84%, rgba(248, 250, 247, 0) 100%);
}

.billing-sticky-toolbar .filter-form {
    width: 100%;
}

.billing-sticky-toolbar .billing-generate-button {
    margin-left: 0;
}

.billing-scroll-panel {
    height: calc(100vh - 260px);
    max-height: calc(100vh - 260px);
    min-height: 320px;
    overflow: auto;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--shadow);
}

.billing-scroll-panel table {
    min-width: 1420px;
    overflow: visible;
    border-collapse: separate;
    border-spacing: 0;
}

.billing-scroll-panel thead,
.billing-scroll-panel thead th {
    position: sticky;
    top: 0;
    z-index: 8;
    background: #f1f2f4;
    box-shadow: inset 0 -1px 0 var(--line-soft);
}

.table-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.table-form-actions button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.list-toolbar button:disabled,
.list-toolbar .button:disabled {
    opacity: .45;
    cursor: not-allowed;
    box-shadow: none;
}

.invoice-preview-modal {
    width: min(1180px, 100%);
}

.invoice-preview-form .timesheet-extra-section {
    margin-bottom: 18px;
}

.manual-billing-form .timesheet-extra-section {
    display: grid;
    gap: 14px;
}

.manual-billing-form .modal-field-row,
.vat-item-form .modal-field-row {
    gap: 14px;
}

.manual-billing-form .modal-field-row + .modal-field-row,
.manual-billing-form .section-field,
.vat-item-form .modal-field-row + .modal-field-row {
    margin-top: 0;
}

.manual-billing-form textarea {
    min-height: 92px;
}

.vat-item-form .timesheet-extra-section {
    display: grid;
    gap: 14px;
}

.vat-item-form textarea {
    min-height: 82px;
}

.invoice-line-list {
    display: grid;
    gap: 12px;
}

.invoice-line-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.8fr) minmax(86px, .58fr) minmax(110px, .65fr) minmax(120px, .72fr) minmax(130px, .78fr) auto;
    gap: 10px;
    align-items: end;
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #fff;
}

.invoice-line-remove {
    height: 38px;
}

.section-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.section-title-row .button {
    flex: 0 0 auto;
}

.invoice-preview-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.invoice-preview-summary div {
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #f8fbff;
    padding: 14px 16px;
}

.invoice-preview-summary span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 7px;
}

.invoice-preview-summary strong {
    color: var(--ink);
    font-size: 20px;
}

.people-table th,
.people-table td {
    white-space: nowrap;
}

.tools-list-panel {
    overflow-x: auto;
}

.tools-table {
    min-width: 1660px;
    table-layout: auto;
}

.tools-table th,
.tools-table td {
    vertical-align: middle;
}

.tools-table th:nth-child(1),
.tools-table td:nth-child(1),
.tools-table th:nth-child(3),
.tools-table td:nth-child(3),
.tools-table th:nth-child(4),
.tools-table td:nth-child(4),
.tools-table th:nth-child(5),
.tools-table td:nth-child(5),
.tools-table th:nth-child(10),
.tools-table td:nth-child(10),
.tools-table th:nth-child(11),
.tools-table td:nth-child(11),
.tools-table th:nth-child(12),
.tools-table td:nth-child(12),
.tools-table th:nth-child(13),
.tools-table td:nth-child(13) {
    white-space: nowrap;
}

.tools-table td:nth-child(3) {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tools-table th:last-child,
.tools-table td:last-child {
    width: 72px;
    text-align: right;
}

.account-form .password-label {
    grid-column: 1 / -1;
}

.password-action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: stretch;
}

.password-field {
    position: relative;
    display: block;
}

.password-field input {
    padding-right: 58px;
}

.password-toggle {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    min-height: 28px;
    padding: 4px 8px;
    border-radius: 6px;
    background: transparent;
    color: #475467;
    font-size: 12px;
    font-weight: 800;
}

.password-toggle:hover {
    background: #eef2ff;
    color: var(--accent);
}

.password-generate {
    min-height: 39px;
    padding: 9px 14px;
    border: 1px solid #cfd6e2;
    background: #f8faff;
    color: var(--accent);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
    white-space: nowrap;
}

.password-generate:hover {
    border-color: var(--accent);
    background: #eef2ff;
    color: var(--accent-dark);
}

.upload-dropzone {
    position: relative;
    display: grid;
    place-items: center;
    gap: 6px;
    margin: 10px 0 16px;
    min-height: 168px;
    padding: 28px 24px;
    border: 1.5px dashed #cfd6e2;
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    text-align: center;
    cursor: pointer;
}

.timesheet-extra-section {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #fbfcfd;
}

.modal-body form > .timesheet-extra-section:first-of-type {
    margin-top: 0;
}

.section-field {
    margin-top: 12px;
}

.readonly-grid {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.readonly-grid > div {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.readonly-grid span {
    color: #475467;
    font-size: 13px;
    line-height: 1.45;
}

.readonly-grid strong {
    color: var(--text);
    font-weight: 800;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.rate-note-field {
    margin-top: 18px;
}

.kpi-note-field {
    margin-top: 18px;
}

.section-title {
    margin-bottom: 12px;
}

.section-title h3 {
    margin: 0 0 4px;
    font-size: 15px;
}

.section-title p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.timesheet-lines {
    display: grid;
    gap: 10px;
}

.timesheet-line-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px auto;
    gap: 10px;
    align-items: end;
}

.timesheet-line-row label {
    margin: 0;
}

.timesheet-line-row .small-button,
.line-row-spacer {
    min-height: 38px;
}

.add-timesheet-line {
    margin-top: 12px;
}

.upload-dropzone:hover,
.upload-dropzone:focus-within,
.upload-dropzone.is-dragover {
    border-color: var(--accent);
    background: #f8faff;
    box-shadow: 0 0 0 3px rgba(36, 66, 245, .08);
}

.upload-dropzone input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.upload-dropzone strong {
    font-size: 15px;
}

.upload-dropzone span:not(.upload-icon) {
    color: var(--accent);
    font-weight: 700;
}

.upload-dropzone small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.selected-files {
    display: grid;
    gap: 6px;
    width: min(520px, 100%);
    margin-top: 4px;
}

.selected-file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid var(--line-soft);
    border-radius: 7px;
    background: #fff;
    padding: 7px 8px;
    color: #344054;
    font-weight: 700;
}

.selected-file-row button {
    min-height: 28px;
    padding: 4px 8px;
    border: 1px solid #cfd6e2;
    background: #fff;
    color: var(--danger);
    font-size: 12px;
}

.selected-file-row button:hover {
    border-color: #fecdca;
    background: #fef3f2;
    color: var(--danger);
}

.current-files {
    width: min(520px, 100%);
    margin-top: 4px;
    border-top: 1px solid var(--line-soft);
    padding-top: 10px;
    color: #344054;
    text-align: left;
}

.current-files span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.current-files a {
    display: block;
    margin-top: 6px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.current-files a:hover {
    text-decoration: underline;
}

.current-files ul {
    margin: 6px 0 4px;
    padding-left: 18px;
    font-weight: 700;
}

.current-file-list {
    display: grid;
    gap: 7px;
    margin: 8px 0;
}

.current-file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid var(--line-soft);
    border-radius: 9px;
    background: #fff;
    padding: 8px 9px;
}

.current-file-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #344054;
    font-size: 13px;
    font-weight: 750;
    text-transform: none;
}

.current-file-row button {
    min-height: 28px;
    padding: 4px 8px;
    border: 1px solid #fecdca;
    background: #fff;
    color: var(--danger);
    box-shadow: none;
    font-size: 12px;
}

.current-file-row button:hover {
    background: #fef3f2;
    color: var(--danger);
}

.upload-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid #cfd6e2;
    color: #475467;
    font-size: 24px;
    line-height: 1;
}

.actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

button,
.button {
    border: 0;
    border-radius: 7px;
    background: var(--accent);
    color: #fff;
    padding: 9px 13px;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
}

button:hover,
.button:hover {
    background: var(--accent-dark);
}

.button.secondary {
    background: #344054;
}

.button.ghost {
    background: #fff;
    color: #344054;
    border: 1px solid var(--line);
}

.button.search-button {
    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);
}

.button.search-button:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}

.button.danger,
button.danger {
    background: var(--danger);
}

button.danger:hover,
.button.danger:hover,
button.danger:focus,
.button.danger:focus,
.review-decision-form button.danger:hover,
.review-decision-form .button.danger:hover {
    background: #991b1b;
    color: #fff;
}

.small-button {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 12px;
}

.inline-form {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: 8px;
}

.actions-cell .inline-form {
    display: inline-flex;
    margin-top: 0;
}

.actions-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.internal-invoices-table th,
.internal-invoices-table td {
    vertical-align: middle;
}

.internal-invoices-table .status-column,
.internal-invoices-table .actions-column,
.internal-invoices-table .status-cell,
.internal-invoices-table .internal-review-action {
    width: 112px;
    white-space: nowrap;
}

.internal-invoices-table td.internal-review-action.actions-cell {
    display: table-cell;
}

.internal-invoices-table .internal-review-action .small-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
}

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

.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.compact-select {
    min-width: 110px;
    width: auto;
    padding: 6px 8px;
    font-size: 13px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
}

th,
td {
    border-bottom: 1px solid #e8ecf2;
    text-align: left;
    padding: 11px 10px;
    vertical-align: top;
}

th.numeric,
td.numeric {
    text-align: right;
    white-space: nowrap;
}

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

th {
    color: #475467;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .02em;
    background: var(--panel-soft);
}

tbody tr:hover {
    background: #fbfcfd;
}

.badge {
    display: inline-block;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 800;
    background: #eef2f6;
    color: #344054;
    white-space: nowrap;
    text-transform: capitalize;
}

.badge.approved,
.badge.active,
.badge.accepted,
.badge.paid {
    background: #ecfdf3;
    color: var(--ok);
}

.badge.submitted,
.badge.issue,
.badge.waiting-for-sign {
    background: #fffaeb;
    color: var(--warning);
}

.badge.planned {
    background: #eef2ff;
    color: var(--accent);
}

.badge.generated {
    background: #eff6ff;
    color: var(--accent);
}

.badge.rejected,
.badge.inactive,
.badge.unpaid,
.badge.cancelled {
    background: #fef3f2;
    color: var(--danger);
}

.reviewer-note {
    margin-top: 6px;
    color: var(--danger);
    font-size: 12px;
    line-height: 1.4;
    max-width: 220px;
}

.notice {
    border: 1px solid #bee7df;
    color: #0b5f59;
    background: #f0fdfa;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 16px;
    font-weight: 700;
}

.error {
    border-color: #fecdca;
    color: #b42318;
    background: #fffbfa;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: #f6f7fb;
}

.login-box {
    width: min(520px, 100%);
    padding: 44px 60px;
    box-shadow: none;
    border: 0;
}

.login-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 34px;
}

.logo-mark {
    width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    border-radius: 7px;
    background: var(--accent);
    color: #fff;
    font-size: 15px;
}

.login-box h1 {
    text-align: center;
    font-size: 30px;
    margin-bottom: 28px;
}

.demo-list {
    color: var(--muted);
    font-size: 13px;
    margin-top: 14px;
}

.empty {
    color: var(--muted);
    padding: 18px 0;
}

.list-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 48px;
    min-width: 0;
}

.list-toolbar button,
.list-toolbar .button {
    min-height: 40px;
    white-space: nowrap;
}

.toolbar-left-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
}

.toolbar-left-group .inline-form {
    margin-top: 0;
}

.toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.hidden-toolbar-form {
    display: none;
}

.toolbar-action-group {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.billing-toolbar .filter-form,
.costs-toolbar .filter-form {
    width: 100%;
    min-width: 0;
    align-items: center;
}

.billing-toolbar .search-label,
.costs-toolbar .search-label {
    flex: 1 1 300px;
    max-width: 470px;
}

.billing-toolbar .filter-form > label:not(.search-label),
.costs-toolbar .filter-form > label:not(.search-label) {
    flex: 0 0 132px;
    min-width: 0;
}

.billing-toolbar .filter-dropdown,
.costs-toolbar .filter-dropdown {
    flex: 0 0 136px;
}

.billing-toolbar .filter-dropdown summary,
.costs-toolbar .filter-dropdown summary {
    width: 100%;
    min-width: 0;
}

.billing-toolbar > .filter-form > button,
.billing-toolbar .toolbar-action-group > button,
.billing-toolbar .toolbar-action-group > .button,
.costs-toolbar > .filter-form > button,
.costs-toolbar > .button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    line-height: 1;
    white-space: nowrap;
    flex: 0 0 auto;
}

.billing-toolbar .toolbar-action-group .button,
.billing-toolbar .toolbar-action-group button {
    min-width: 138px;
}

.toolbar-secondary-action {
    min-width: 176px;
}

.search-box {
    width: min(432px, 100%);
    min-height: 40px;
    display: flex;
    align-items: center;
    border: 1px solid #dfe3ea;
    border-radius: 7px;
    background: #fff;
    color: #667085;
    padding: 0 14px;
}

.search-box::before {
    content: "";
    width: 8px;
    height: 8px;
    border: 2px solid var(--accent);
    border-radius: 999px;
    color: var(--accent);
    margin-right: 10px;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.search-label {
    position: relative;
    width: min(560px, 100%);
}

.search-label input {
    min-height: 40px;
    padding-left: 34px;
}

.search-label::before {
    content: "";
    position: absolute;
    left: 13px;
    bottom: 14px;
    width: 8px;
    height: 8px;
    border: 2px solid var(--accent);
    border-radius: 999px;
}

.filter-dropdown {
    position: relative;
    flex: 0 0 auto;
}

.filter-dropdown summary {
    min-height: 40px;
    min-width: 136px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: #344054;
    padding: 8px 12px;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

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

.filter-dropdown summary::after {
    content: "v";
    color: var(--muted);
    font-size: 11px;
}

.filter-dropdown[open] summary {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}

.filter-dropdown-panel {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    left: 0;
    width: max(220px, 100%);
    max-height: 280px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .14);
    padding: 8px;
}

.filter-clear-button {
    width: 100%;
    min-height: 34px;
    margin-bottom: 6px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-weight: 800;
    cursor: pointer;
}

.filter-clear-button:hover:not(:disabled) {
    border-color: var(--accent);
    background: #eef4ff;
}

.filter-clear-button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.filter-dropdown-panel label {
    min-height: 32px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 7px;
    padding: 7px 8px;
    color: #344054;
    font-weight: 700;
    white-space: nowrap;
}

.filter-dropdown-panel label:hover {
    background: #f5f8ff;
}

.filter-dropdown-panel input {
    width: auto;
    min-height: auto;
}

.sort-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: inherit;
    text-decoration: none;
}

.sort-link:hover {
    color: var(--accent);
}

.list-panel {
    background: transparent;
    max-width: 100%;
    overflow-x: auto;
}

.list-panel table {
    border: 0;
    border-radius: 0;
    background: #fff;
    min-width: min(1080px, 100%);
}

.list-panel th {
    background: #f1f2f4;
    font-size: 13px;
    font-weight: 500;
    text-transform: none;
    color: #66727f;
    padding-top: 15px;
    padding-bottom: 15px;
}

.list-panel td {
    padding-top: 12px;
    padding-bottom: 12px;
}

.billing-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin-top: 16px;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.billing-summary div {
    padding: 16px 18px;
    border-right: 1px solid var(--line-soft);
}

.billing-summary div:last-of-type {
    border-right: 0;
}

.billing-summary span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.billing-summary strong {
    display: block;
    margin-top: 6px;
    font-size: 22px;
}

.billing-summary p {
    grid-column: 1 / -1;
    margin: 0;
    padding: 12px 18px;
    border-top: 1px solid var(--line-soft);
    background: #fbfcfd;
    color: var(--muted);
}

.compact-toolbar {
    margin-bottom: 18px;
}

.payment-settings {
    margin-bottom: 18px;
    padding: 16px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.manual-payment-panel {
    display: grid;
    gap: 14px;
}

.manual-payment-form {
    display: grid;
    gap: 0;
}

.manual-payment-form .wide-field {
    grid-column: span 2;
}

.manual-payment-form button {
    min-height: 40px;
}

.wave-settings {
    display: grid;
    grid-template-columns: repeat(3, minmax(130px, 1fr)) auto;
    align-items: end;
    gap: 12px;
}

.compact-number {
    max-width: 150px;
}

.wave-grid {
    display: grid;
    gap: 18px;
}

.wave-card {
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.wave-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line-soft);
}

.payment-wave-card > summary.wave-card-header {
    cursor: pointer;
    list-style: none;
}

.payment-wave-card > summary.wave-card-header::-webkit-details-marker {
    display: none;
}

.payment-wave-card > summary.wave-card-header::after {
    content: "v";
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 900;
    transition: transform .16s ease;
}

.payment-wave-card:not([open]) > summary.wave-card-header {
    border-bottom: 0;
}

.payment-wave-card:not([open]) > summary.wave-card-header::after {
    transform: rotate(-90deg);
}

.wave-card-body {
    display: block;
}

.wave-card table {
    border: 0;
    border-radius: 0;
}

.wave-card-body {
    overflow-x: auto;
}

.payments-wave-table {
    table-layout: fixed;
    min-width: 1180px;
}

.payments-wave-table .payment-col-item {
    width: 9%;
}

.payments-wave-table .payment-col-role {
    width: 8%;
}

.payments-wave-table .payment-col-client {
    width: 8%;
}

.payments-wave-table .payment-col-note {
    width: 9.5%;
}

.payments-wave-table .payment-col-amount,
.payments-wave-table .payment-col-vat,
.payments-wave-table .payment-col-gross {
    width: 9.5%;
}

.payments-wave-table .payment-col-date {
    width: 8%;
}

.payments-wave-table .payment-col-status {
    width: 8.5%;
}

.payments-wave-table .payment-col-method {
    width: 8.5%;
}

.payments-wave-table .payment-col-change {
    width: 12%;
}

.wave-card th,
.wave-card td {
    padding-left: 18px;
    padding-right: 18px;
}

.payments-wave-table th,
.payments-wave-table td {
    padding-left: 14px;
    padding-right: 14px;
    overflow-wrap: anywhere;
}

.payments-wave-table td.numeric,
.payments-wave-table th.numeric {
    white-space: normal;
}

.payments-wave-table tbody td.numeric {
    white-space: nowrap;
}

.payments-wave-table .status-select {
    min-width: 130px;
    width: 100%;
}

.payments-wave-table .method-select {
    min-width: 108px;
    width: 100%;
}

.payments-wave-table .payment-status-form,
.payments-wave-table .payment-method-form {
    width: 100%;
}

.payments-wave-table td:nth-child(9) .badge {
    display: inline-block;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: normal;
    line-height: 1.15;
    text-align: center;
}

.wave-card td.empty {
    padding: 18px;
}

.wave-total-row td {
    border-top: 1px solid var(--line);
    background: #f8fbff;
    font-weight: 800;
}

.wave-total-row td:first-child {
    color: var(--text);
}

.wave-total-row td:first-child span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.wave-card-header h2 {
    margin: 0 0 3px;
    font-size: 18px;
}

.wave-card-header p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.wave-card-header .wave-total-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
}

.wave-card-header .wave-total-summary strong {
    color: var(--text);
    font-weight: 800;
}

.wave-date {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 12px;
    color: #344054;
    background: #fbfcfd;
    font-weight: 800;
    white-space: nowrap;
}

.payment-status-form,
.payment-method-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-select {
    min-width: 160px;
}

.method-select {
    min-width: 130px;
}

.payment-status-form select.is-saving,
.payment-method-form select.is-saving {
    opacity: .72;
    cursor: progress;
}

.payment-action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.ghost-danger {
    min-height: 34px;
    border: 1px solid rgba(192, 57, 43, .22);
    border-radius: 8px;
    background: #fff5f5;
    color: #b42318;
    box-shadow: none;
}

.ghost-danger:hover {
    border-color: rgba(192, 57, 43, .35);
    background: #ffe9e8;
}

.row-menu {
    position: relative;
    display: inline-block;
}

.row-menu summary {
    list-style: none;
    cursor: pointer;
    width: 34px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    color: #475467;
    font-weight: 800;
}

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

.row-menu summary:hover {
    background: #eef2ff;
    color: var(--accent);
}

.row-menu-panel {
    position: absolute;
    right: 0;
    top: 32px;
    min-width: 132px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
    z-index: 5;
}

.row-menu.open-up .row-menu-panel {
    top: auto;
    bottom: 32px;
}

.row-menu.has-floating-panel > .row-menu-panel {
    display: none;
}

.row-menu-panel.is-floating,
.row-menu-float {
    position: fixed;
    right: auto;
    top: auto;
    bottom: auto;
    z-index: 1000;
}

.row-menu-float {
    width: max-content;
    height: auto;
    max-height: calc(100vh - 24px);
    overflow: auto;
}

.row-menu-panel a,
.menu-action {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 0;
    background: transparent;
    text-decoration: none;
    color: #344054;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    box-shadow: none;
    min-height: auto;
    justify-content: flex-start;
}

.row-menu-panel a:hover,
.menu-action:hover {
    background: #f4f6fb;
    color: #344054;
}

.row-menu-panel a.menu-danger-link {
    color: var(--danger);
}

.row-menu-panel a.menu-danger-link:hover {
    background: #fef3f2;
    color: var(--danger);
}

.row-menu-panel form {
    display: block;
    margin: 0;
}

.menu-danger {
    width: 100%;
    min-height: auto;
    justify-content: flex-start;
    border-radius: 6px;
    background: transparent;
    color: var(--danger);
    padding: 8px 10px;
    font-size: 14px;
    font-weight: 700;
}

.menu-danger:hover {
    background: #fef3f2;
    color: var(--danger);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    background: rgba(17, 24, 39, .76);
    padding: 20px;
}

.modal-window {
    position: relative;
    z-index: 2001;
    width: min(980px, 100%);
    max-height: calc(100vh - 40px);
    overflow: hidden;
    background: #fff;
    border-radius: 9px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

.modal-header {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line-soft);
    padding: 0 28px;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
}

.modal-header p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.modal-close {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    text-decoration: none;
    color: #344054;
    font-size: 22px;
}

.modal-close:hover {
    background: #f2f4f7;
}

.modal-body {
    max-height: calc(100vh - 112px);
    overflow: auto;
    padding: 28px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid var(--line-soft);
    margin-top: 8px;
    padding-top: 18px;
}

.field-with-suffix {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    border: 1px solid #cfd6e2;
    border-radius: 7px;
    background: #fff;
    overflow: hidden;
}

.field-with-suffix input {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.field-with-suffix span {
    color: #667085;
    padding: 0 11px;
    font-weight: 700;
}

.dashboard-toolbar {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 16px;
}

.year-form,
.filter-form {
    display: flex;
    align-items: end;
    gap: 10px;
}

.year-form label,
.filter-form label {
    min-width: 132px;
}

.dashboard-table {
    margin-top: 16px;
}

.pnl-table {
    overflow-x: auto;
}

.pnl-table table {
    min-width: 1480px;
    table-layout: fixed;
}

.pnl-table th,
.pnl-table td {
    text-align: right;
    white-space: nowrap;
}

.pnl-table th {
    color: #667085;
    font-size: 12px;
    font-weight: 600;
}

.pnl-table td {
    color: #1f2937;
    font-weight: 500;
}

.pnl-table th:first-child,
.pnl-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    width: 285px;
    min-width: 285px;
    text-align: left;
    background: #fff;
}

.pnl-table th:first-child {
    z-index: 3;
    background: #f1f2f4;
}

.pnl-table .pnl-row-label {
    color: #111827;
    font-weight: 500;
}

.pnl-table .pnl-total-row td {
    background: #f8fafc;
    color: #111827;
    font-weight: 650;
}

.pnl-table .pnl-total-row td:first-child {
    background: #f8fafc;
    font-weight: 650;
}

.pnl-table .pnl-divider-row td {
    height: 18px;
    padding: 8px 0;
    background: #fff;
    border-bottom: 0;
    box-shadow: inset 0 1px 0 #eef2f6;
}

.mds-report-panel {
    overflow-x: auto;
}

.mds-report-table {
    min-width: 1280px;
}

.mds-report-table th:first-child,
.mds-report-table td:first-child {
    min-width: 210px;
}

.mds-report-table th:nth-child(2),
.mds-report-table td:nth-child(2) {
    min-width: 190px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.detail-grid div {
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    padding: 12px;
    background: #fbfcfd;
}

.detail-grid span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 4px;
}

.detail-grid .status-field strong {
    text-transform: capitalize;
}

.timesheet-detail-section {
    margin-top: 24px;
}

.timesheet-detail-section h2 {
    margin: 0 0 12px;
    font-size: 16px;
    line-height: 1.25;
}

.timesheet-detail-section .detail-grid {
    margin-bottom: 0;
}

.timesheet-detail-section .note-block {
    margin-top: 0;
}

.rejection-comment-section {
    margin-top: 24px;
    margin-bottom: 4px;
}

.review-modal {
    width: min(1180px, 100%);
}

.review-modal-body {
    padding: 0;
}

.review-ticket {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    min-height: min(680px, calc(100vh - 112px));
}

.review-main {
    padding: 28px;
    overflow: auto;
}

.review-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 28px;
    background: #f8fafc;
    border-left: 1px solid var(--line-soft);
    overflow: auto;
}

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

.review-hero h3,
.review-section h3,
.review-side h3 {
    margin: 0;
}

.review-hero h3 {
    font-size: 21px;
}

.review-hero p {
    margin: 5px 0 0;
    color: var(--muted);
}

.eyebrow {
    display: block;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 5px;
}

.review-section {
    margin-top: 22px;
}

.review-detail-grid {
    margin-bottom: 0;
}

.note-block {
    margin: 10px 0 0;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #fbfcfd;
    padding: 13px;
    color: #344054;
    white-space: pre-wrap;
}

.rejection-comment .note-block,
.note-block.rejection-comment {
    border-color: #fecaca;
    background: #fff7f7;
    color: #991b1b;
}

.attachment-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.attachment-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    border: 1px solid #cfd6e2;
    border-radius: 999px;
    background: #fff;
    padding: 7px 12px;
    color: #344054;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}

.attachment-lines {
    display: grid;
    gap: 4px;
    line-height: 1.35;
}

.attachment-lines a {
    display: block;
    max-width: 160px;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.attachment-lines a:hover {
    text-decoration: underline;
}

a.attachment-pill:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: #f8faff;
}

.comment-timeline {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.comment-item {
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #fff;
    padding: 12px;
}

.comment-item div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: baseline;
    margin-bottom: 8px;
}

.comment-item span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.comment-item p {
    margin: 0;
    color: #344054;
}

.review-decision-form textarea {
    min-height: 96px;
}

.review-decision-form .modal-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 0;
}

.review-decision-form .modal-actions .button,
.review-decision-form .modal-actions button {
    width: 100%;
}

.empty.compact {
    padding: 10px 0;
}

.profile-shell {
    display: grid;
    grid-template-columns: minmax(280px, 420px) minmax(420px, 680px);
    gap: 18px;
    align-items: start;
}

.profile-card,
.profile-password-card {
    background: #fff;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.profile-card {
    overflow: hidden;
}

.profile-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px;
    border-bottom: 1px solid var(--line-soft);
}

.profile-avatar {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    background: #eef2ff;
    color: var(--accent);
    font-size: 18px;
    font-weight: 800;
}

.profile-card-header h2,
.profile-section-title h2 {
    margin: 0;
    font-size: 18px;
}

.profile-card-header p,
.profile-section-title p {
    margin: 4px 0 0;
    color: var(--muted);
}

.profile-field-list {
    display: grid;
    gap: 0;
    padding: 6px 22px 18px;
}

.profile-field-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line-soft);
}

.profile-field-list div:last-child {
    border-bottom: 0;
}

.profile-field-list span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.profile-field-list strong {
    text-align: right;
}

.profile-password-card {
    padding: 22px;
}

.profile-section-title {
    margin-bottom: 18px;
}

.profile-password-form {
    max-width: 520px;
}

.profile-password-hint {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

/* Visual refresh */
:root {
    --bg: #f6f8f5;
    --panel: #ffffff;
    --panel-soft: #f8faf7;
    --text: #111827;
    --muted: #667085;
    --line: #dfe7df;
    --line-soft: #edf2ed;
    --accent: #2563eb;
    --accent-dark: #1d4ed8;
    --accent-soft: #eef4ff;
    --sidebar: #eff6ff;
    --sidebar-strong: #dbeafe;
    --danger: #c3352b;
    --warning: #b7791f;
    --ok: #07864f;
    --shadow: 0 18px 48px rgba(17, 24, 39, .07);
}

body {
    background: linear-gradient(180deg, #fbfcfa 0, var(--bg) 360px);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    letter-spacing: 0;
}

.shell {
    grid-template-columns: 286px minmax(0, 1fr);
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .75), rgba(255, 255, 255, .28)),
        var(--sidebar);
    border-right: 1px solid #dce9e4;
    padding: 18px 14px;
}

.brand-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8px 8px 16px;
    border-bottom: 1px solid rgba(17, 24, 39, .08);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: var(--accent);
    color: #fff;
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(37, 99, 235, .22);
}

.brand {
    margin: 0;
    color: #0f172a;
    font-size: 18px;
    line-height: 1.1;
    font-weight: 850;
}

.brand-subtitle {
    margin-top: 2px;
    color: #667085;
    font-size: 12px;
    font-weight: 650;
}

.nav {
    flex: 1;
    align-content: start;
    gap: 18px;
}

.nav-section {
    display: block;
}

.nav-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: auto;
    margin: 0 2px 4px;
    padding: 6px 8px;
    border-bottom: 0;
    border-radius: 8px;
    color: #8a9a95;
    cursor: pointer;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .04em;
    list-style: none;
    text-transform: uppercase;
}

.nav-heading::-webkit-details-marker {
    display: none;
}

.nav-heading:hover {
    background: rgba(255, 255, 255, .68);
    color: #475467;
}

.nav-chevron {
    color: #98a2b3;
    font-size: 10px;
    line-height: 1;
    transition: transform .16s ease;
}

.nav-section[open] .nav-chevron {
    transform: rotate(180deg);
}

.nav-section-body {
    display: grid;
    gap: 4px;
    margin-top: 2px;
}

.nav a,
.nav-placeholder {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    padding: 8px 10px;
    border-radius: 9px;
    color: #344054;
    font-size: 14px;
    font-weight: 700;
}

.nav a::before,
.nav-placeholder::before {
    content: attr(data-icon);
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: rgba(255, 255, 255, .72);
    border: 1px solid rgba(17, 24, 39, .06);
    color: #667085;
    font-size: 11px;
    font-weight: 850;
}

.nav a.active,
.nav a:hover {
    background: var(--accent-soft);
    color: #1d4ed8;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .12);
}

.nav a.active::before,
.nav a:hover::before {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.nav-placeholder {
    color: #9aa7a3;
}

.logout-link {
    margin-top: 0;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 12px;
    border: 1px solid rgba(17, 24, 39, .07);
    border-radius: 13px;
    background: rgba(255, 255, 255, .74);
}

.sidebar-user span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #eaf2ff;
    color: var(--accent-dark);
    font-weight: 850;
}

.sidebar-user strong,
.sidebar-user small {
    display: block;
}

.sidebar-user strong {
    max-width: 176px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #111827;
    font-size: 13px;
}

.sidebar-user small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.main {
    padding: 28px 34px 42px;
}

.topbar {
    align-items: center;
    min-height: 62px;
    margin-bottom: 24px;
}

h1 {
    color: #0f172a;
    font-size: 29px;
    font-weight: 850;
}

h2 {
    color: #111827;
    font-weight: 800;
}

.subtitle {
    color: #667085;
    font-weight: 500;
}

.panel,
.card,
.profile-card,
.profile-password-card {
    border: 1px solid rgba(17, 24, 39, .06);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.card.stat {
    position: relative;
    overflow: hidden;
    min-height: 118px;
    padding: 18px;
}

.card.stat::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 14px;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: var(--accent-soft);
}

.stat .label {
    color: #667085;
    font-size: 12px;
    font-weight: 750;
}

.stat .value {
    color: #0f172a;
    font-size: 24px;
    font-weight: 850;
}

input,
select,
textarea {
    border-color: #d5dfdd;
    border-radius: 9px;
    padding: 10px 12px;
    box-shadow: 0 1px 1px rgba(17, 24, 39, .02);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .13);
}

label {
    color: #344054;
    font-size: 12px;
    font-weight: 750;
}

button,
.button {
    border-radius: 9px;
    background: var(--accent);
    box-shadow: 0 8px 18px rgba(37, 99, 235, .18);
}

button:hover,
.button:hover {
    background: var(--accent-dark);
}

.button.ghost,
.password-generate {
    background: #fff;
    color: #344054;
    border: 1px solid #d5dfdd;
    box-shadow: 0 1px 2px rgba(17, 24, 39, .04);
}

.button.ghost:hover,
.password-generate:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.list-toolbar {
    margin-bottom: 18px;
}

.list-panel {
    padding: 12px;
    border: 1px solid rgba(17, 24, 39, .06);
    border-radius: 14px;
    background: rgba(255, 255, 255, .86);
    box-shadow: var(--shadow);
    overflow: visible;
}

.list-panel.billing-scroll-panel {
    height: auto;
    max-height: none;
    min-height: 0;
    padding: 12px;
    overflow: visible;
    position: relative;
}

.billing-table-shell {
    overflow-x: auto;
    overflow-y: visible;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    background: #fff;
}

.billing-table-inner {
    width: 1926px;
    min-width: 1926px;
}

.billing-table-header {
    padding-right: var(--billing-scrollbar-width, 17px);
    background: #f1f2f4;
}

.billing-table-body {
    max-height: calc(100vh - 340px);
    min-height: 280px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.list-panel.billing-scroll-panel .billing-table-header table,
.list-panel.billing-scroll-panel .billing-table-body table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    overflow: visible;
    border-collapse: separate;
    border-spacing: 0;
    border: 0;
    border-radius: 0;
}

.list-panel.billing-scroll-panel .billing-table-header thead,
.list-panel.billing-scroll-panel .billing-table-header thead th {
    position: static;
    z-index: auto;
    background: #f1f2f4;
    box-shadow: inset 0 -1px 0 var(--line-soft);
}

.list-panel.billing-scroll-panel .billing-table-body tbody td {
    background: #fff;
}

.billing-table-body td:first-child {
    text-align: center;
}

.billing-select-checkbox {
    width: 20px;
    height: 20px;
    min-width: 20px;
    padding: 0;
    margin: 0;
    border-radius: 5px;
    vertical-align: middle;
    accent-color: var(--accent);
}

.billing-select-checkbox:focus,
.billing-select-checkbox:focus-visible {
    border-color: #cfd6e2;
    box-shadow: none;
    outline: none;
}

.billing-select-checkbox:disabled {
    cursor: not-allowed;
}

.list-toolbar.billing-sticky-toolbar {
    position: sticky;
    top: 0;
    z-index: 80;
    overflow: visible;
}

.billing-sticky-toolbar .filter-dropdown[open] {
    z-index: 120;
}

.billing-sticky-toolbar .filter-dropdown-panel {
    z-index: 130;
}

.audit-filter-panel {
    margin-bottom: 18px;
    padding: 16px;
    border: 1px solid rgba(17, 24, 39, .06);
    border-radius: 14px;
    background: rgba(255, 255, 255, .86);
    box-shadow: var(--shadow);
}

.audit-filter-form {
    display: grid;
    grid-template-columns: 128px 150px 160px 128px 128px 150px minmax(260px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.audit-filter-form label {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.audit-filter-form input,
.audit-filter-form select,
.audit-filter-form .filter-dropdown,
.audit-filter-form .filter-dropdown summary {
    width: 100%;
    min-width: 0;
}

.audit-filter-form .search-label input {
    min-width: 0;
}

.audit-filter-form .search-button {
    min-height: 42px;
    align-self: end;
}

.list-panel table,
table {
    border: 0;
    border-radius: 10px;
    font-size: 13px;
}

th {
    background: #f8faf7;
    color: #667085;
    font-size: 11px;
    font-weight: 850;
}

th,
td {
    border-bottom-color: #edf1ef;
    padding: 12px 11px;
}

tbody tr:hover {
    background: #fbfdfb;
}

.badge {
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 850;
}

.badge.approved,
.badge.active,
.badge.accepted,
.badge.paid {
    background: #e8f8ef;
}

.badge.submitted,
.badge.issue,
.badge.waiting-for-sign {
    background: #fff6df;
}

.badge.generated {
    background: #eff6ff;
    color: var(--accent);
}

.badge.cancelled {
    background: #fef3f2;
    color: var(--danger);
}

.notice {
    border-color: #ccebdd;
    border-radius: 11px;
    background: #eefbf4;
}

.timesheet-extra-section {
    border-color: #e4ece8;
    border-radius: 13px;
    background: #fbfdfb;
}

.section-title h3 {
    color: #111827;
    font-size: 15px;
    font-weight: 850;
}

.upload-dropzone {
    border-color: #d5dfdd;
    border-radius: 13px;
}

.upload-dropzone:hover,
.upload-dropzone:focus-within,
.upload-dropzone.is-dragover {
    background: #fbfdfb;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .10);
}

.modal-backdrop {
    background: rgba(15, 23, 42, .68);
    backdrop-filter: blur(2px);
}

.modal-window {
    border-radius: 16px;
    box-shadow: 0 30px 90px rgba(15, 23, 42, .28);
}

.modal-header {
    min-height: 76px;
    padding: 0 30px;
}

.modal-header h2 {
    font-size: 23px;
    font-weight: 850;
}

.modal-body {
    padding: 28px 30px;
}

.modal-actions {
    padding-top: 20px;
}

.compact-modal {
    width: min(560px, 100%);
}

.count-link {
    color: var(--accent);
    font-weight: 850;
    text-decoration: none;
}

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

.consultant-list {
    display: grid;
    gap: 8px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.consultant-list li {
    padding: 10px 12px;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    background: #fff;
    font-weight: 750;
}

.row-menu-panel {
    border-radius: 11px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .16);
}

.search-label input,
.search-box {
    border-color: #d5dfdd;
    border-radius: 10px;
}

.search-label::before,
.search-box::before {
    border-color: var(--accent);
}

.login-page {
    background:
        radial-gradient(circle at 50% 0, rgba(22, 179, 100, .12), transparent 34%),
        #f7faf7;
}

.login-box {
    border: 1px solid rgba(17, 24, 39, .06);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.logo-mark {
    background: var(--accent);
    border-radius: 10px;
}

@media (max-width: 1320px) {
    .cashflow-balance-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .audit-filter-form {
        grid-template-columns: repeat(4, minmax(140px, 1fr));
    }

    .audit-filter-form .search-label {
        grid-column: span 3;
    }
}

@media (max-width: 980px) {
    .cashflow-balance-grid {
        grid-template-columns: 1fr;
    }

    .cashflow-balance-title {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .sidebar {
        position: static;
        height: auto;
        overflow: visible;
    }

    .grid.two,
    .stats,
    .estimation-month-grid,
    .form-grid,
    .profile-shell {
        grid-template-columns: 1fr;
    }

    .main {
        padding: 18px;
    }

    .list-toolbar {
        align-items: stretch;
        flex-direction: column;
        margin-bottom: 28px;
    }

    .year-form,
    .filter-form,
    .wave-settings,
    .payment-status-form,
    .payment-method-form {
        align-items: stretch;
        flex-direction: column;
    }

    .wave-settings {
        grid-template-columns: 1fr;
    }

    .manual-payment-form {
        grid-template-columns: 1fr;
    }

    .manual-payment-form .wide-field {
        grid-column: auto;
    }

    .audit-filter-form {
        grid-template-columns: 1fr;
    }

    .audit-filter-form .search-label {
        grid-column: auto;
    }

    .compact-number,
    .status-select,
    .method-select {
        max-width: none;
        width: 100%;
    }

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

    .review-ticket {
        grid-template-columns: 1fr;
    }

    .review-side {
        border-left: 0;
        border-top: 1px solid var(--line-soft);
    }

    .review-hero {
        flex-direction: column;
    }

    .search-box,
    .search-label {
        width: 100%;
    }

    .search-form {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-dropdown,
    .filter-dropdown summary {
        width: 100%;
    }

    .filter-dropdown-panel {
        position: static;
        width: 100%;
        margin-top: 6px;
    }

    .list-toolbar .button {
        width: 100%;
    }

    table {
        white-space: nowrap;
    }
}

/* Whirr workspace refinement layer.
   This intentionally sits last: it tightens the existing server-rendered UI
   without rewriting page-specific layouts. */
:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --panel-soft: #f9fafb;
    --text: #111928;
    --muted: #637077;
    --line: #dfe4ea;
    --line-soft: #edf0f3;
    --accent: #1b3cf5;
    --accent-dark: #1429e1;
    --accent-soft: #eef3ff;
    --danger: #c3352b;
    --warning: #9b6200;
    --ok: #12715b;
    --shadow: 0 10px 28px rgba(17, 24, 39, .055);
    --shadow-soft: 0 6px 18px rgba(17, 24, 39, .045);
    --font-sans: "Geist", "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #ccd2d5 transparent;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: #ccd2d5;
    border-radius: 8px;
}

body {
    background:
        radial-gradient(circle at 92% 6%, rgba(27, 60, 245, .065), transparent 26%),
        linear-gradient(180deg, #ffffff 0, #f6f8fb 380px, var(--bg) 100%);
    color: var(--text);
    font-family: var(--font-sans);
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.shell {
    grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
    gap: 16px;
    background: rgba(255, 255, 255, .96);
    border-right: 1px solid var(--line);
    box-shadow: 1px 0 0 rgba(255, 255, 255, .7);
    padding: 18px 14px;
}

.brand-row {
    gap: 10px;
    padding: 8px 8px 16px;
    border-bottom: 1px solid var(--line-soft);
}

.brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #25282b;
    color: #fff;
    box-shadow: none;
    font-size: 15px;
    font-weight: 760;
}

.brand {
    color: #25282b;
    font-size: 18px;
    font-weight: 720;
}

.nav {
    gap: 14px;
}

.nav-heading {
    min-height: 30px;
    margin: 0 2px 5px;
    padding: 6px 8px;
    color: #7e8b92;
    font-size: 11px;
    font-weight: 760;
}

.nav-chevron {
    color: #a9b2b7;
}

.nav-section-body {
    gap: 3px;
}

.nav a,
.nav-placeholder {
    gap: 10px;
    min-height: 38px;
    padding: 8px 9px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #495055;
    font-size: 13px;
    font-weight: 610;
}

.nav a::before,
.nav-placeholder::before {
    display: none;
    content: none;
}

.nav-icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border: 1px solid #e7e7e7;
    border-radius: 7px;
    background: #fbfbfb;
    color: #637077;
}

.nav-icon svg {
    width: 16px;
    height: 16px;
}

.nav-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav a:hover,
.nav a.active {
    background: var(--accent-soft);
    border-color: #d9e4ff;
    color: var(--accent-dark);
    box-shadow: none;
}

.nav a:hover .nav-icon,
.nav a.active .nav-icon {
    background: #ffffff;
    border-color: #bcd0ff;
    color: var(--accent);
}

.logout-link {
    margin-top: 4px;
    color: #637077;
}

.sidebar-user {
    border-color: var(--line);
    border-radius: 8px;
    background: #fbfbfb;
    box-shadow: none;
}

.sidebar-user span {
    background: var(--accent-soft);
    color: var(--accent-dark);
}

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

.topbar {
    align-items: flex-end;
    min-height: 58px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(223, 228, 234, .72);
}

h1 {
    color: #25282b;
    font-size: 28px;
    font-weight: 680;
    line-height: 1.15;
}

h2,
.section-title h3 {
    color: #25282b;
    font-weight: 690;
}

.subtitle,
.muted-text {
    color: var(--muted);
}

.panel,
.card,
.profile-card,
.profile-password-card,
.list-panel,
.audit-filter-panel,
.wave-card,
.settings-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    box-shadow: var(--shadow-soft);
    min-width: 0;
}

.card.stat {
    min-height: 108px;
    padding: 16px;
}

.card.stat::after {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(27, 60, 245, .14), rgba(18, 113, 91, .10));
}

.stat .label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 620;
}

.stat .value {
    color: #25282b;
    font-size: 23px;
    font-weight: 690;
    font-variant-numeric: tabular-nums;
}

label {
    color: #495055;
    font-size: 12px;
    font-weight: 620;
}

input,
select,
textarea {
    min-height: 40px;
    border-color: #dfe4ea;
    border-radius: 8px;
    color: #25282b;
    background-color: #fff;
    box-shadow: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #8eb3ff;
    box-shadow: 0 0 0 3px rgba(27, 60, 245, .10);
}

button,
.button {
    min-height: 38px;
    border-radius: 8px;
    background: var(--accent);
    box-shadow: none;
    font-weight: 650;
}

button:hover,
.button:hover {
    background: var(--accent-dark);
}

.button.ghost,
.button.secondary,
.password-generate {
    background: #fff;
    color: #495055;
    border: 1px solid var(--line);
    box-shadow: none;
}

.button.ghost:hover,
.button.secondary:hover,
.password-generate:hover {
    background: var(--accent-soft);
    border-color: #bcd0ff;
    color: var(--accent-dark);
}

.small-button {
    min-height: 30px;
    padding: 5px 9px;
    border-radius: 7px;
}

.list-toolbar {
    margin-bottom: 16px;
}

.filter-form {
    flex-wrap: wrap;
}

.mds-report-toolbar .filter-form {
    width: 100%;
    min-width: 0;
    align-items: center;
    flex-wrap: nowrap;
}

.mds-report-toolbar .search-label {
    flex: 1 1 320px;
    max-width: 520px;
    min-width: 260px;
}

.mds-report-toolbar .filter-form > label:not(.search-label) {
    flex: 0 0 132px;
    min-width: 0;
}

.mds-report-toolbar .filter-dropdown {
    flex: 0 0 132px;
}

.mds-report-toolbar .filter-dropdown summary {
    width: 100%;
}

.mds-report-toolbar button {
    flex: 0 0 auto;
}

.internal-invoices-toolbar .filter-form {
    flex: 1 1 auto;
    min-width: 0;
    align-items: center;
    flex-wrap: nowrap;
}

.internal-invoices-toolbar .search-label {
    flex: 1 1 300px;
    max-width: 420px;
    min-width: 240px;
}

.internal-invoices-toolbar .filter-form > label:not(.search-label) {
    flex: 0 0 132px;
    min-width: 0;
}

.internal-invoices-toolbar .filter-dropdown {
    flex: 0 0 136px;
}

.internal-invoices-toolbar .filter-dropdown summary {
    width: 100%;
    min-width: 0;
}

.internal-invoices-toolbar button,
.internal-invoices-toolbar > .button {
    flex: 0 0 auto;
}

.consultant-timesheets-toolbar .filter-form {
    width: 100%;
    min-width: 0;
    align-items: center;
    flex-wrap: nowrap;
}

.consultant-timesheets-toolbar .search-label {
    flex: 1 1 320px;
    max-width: 560px;
    min-width: 240px;
}

.consultant-timesheets-toolbar .filter-form > label:not(.search-label) {
    flex: 0 0 132px;
    min-width: 0;
}

.consultant-timesheets-toolbar .filter-dropdown {
    flex: 0 0 136px;
}

.consultant-timesheets-toolbar .filter-dropdown summary {
    width: 100%;
    min-width: 0;
}

.consultant-timesheets-toolbar button {
    flex: 0 0 auto;
}

.invoice-payments-toolbar .filter-form {
    width: 100%;
    min-width: 0;
    align-items: center;
    flex-wrap: nowrap;
}

.invoice-payments-toolbar .search-label {
    flex: 1 1 340px;
    max-width: 560px;
    min-width: 260px;
}

.invoice-payments-toolbar .filter-form > label:not(.search-label) {
    flex: 0 0 132px;
    min-width: 0;
}

.invoice-payments-toolbar .filter-dropdown {
    flex: 0 0 136px;
}

.invoice-payments-toolbar .filter-dropdown summary {
    width: 100%;
    min-width: 0;
}

.invoice-payments-toolbar button {
    flex: 0 0 auto;
}

.partner-rewards-toolbar .filter-form {
    width: 100%;
    min-width: 0;
    align-items: center;
    flex-wrap: nowrap;
}

.partner-rewards-toolbar .search-label {
    flex: 1 1 340px;
    max-width: 560px;
    min-width: 260px;
}

.partner-rewards-toolbar .filter-form > label:not(.search-label) {
    flex: 0 0 132px;
    min-width: 0;
}

.partner-rewards-toolbar .filter-dropdown {
    flex: 0 0 136px;
}

.partner-rewards-toolbar .filter-dropdown summary {
    width: 100%;
    min-width: 0;
}

.partner-rewards-toolbar button {
    flex: 0 0 auto;
}

@media (max-width: 900px) {
    .mds-report-toolbar .filter-form {
        flex-wrap: wrap;
    }

    .mds-report-toolbar .search-label,
    .mds-report-toolbar .filter-form > label:not(.search-label),
    .mds-report-toolbar .filter-dropdown {
        flex: 1 1 100%;
        max-width: none;
    }
}

@media (max-width: 1100px) {
    .internal-invoices-toolbar .filter-form {
        flex-wrap: wrap;
    }

    .internal-invoices-toolbar .search-label,
    .internal-invoices-toolbar .filter-form > label:not(.search-label),
    .internal-invoices-toolbar .filter-dropdown {
        flex: 1 1 180px;
        max-width: none;
    }

    .consultant-timesheets-toolbar .filter-form {
        flex-wrap: wrap;
    }

    .consultant-timesheets-toolbar .search-label,
    .consultant-timesheets-toolbar .filter-form > label:not(.search-label),
    .consultant-timesheets-toolbar .filter-dropdown {
        flex: 1 1 180px;
        max-width: none;
    }

    .invoice-payments-toolbar .filter-form {
        flex-wrap: wrap;
    }

    .invoice-payments-toolbar .search-label,
    .invoice-payments-toolbar .filter-form > label:not(.search-label),
    .invoice-payments-toolbar .filter-dropdown {
        flex: 1 1 180px;
        max-width: none;
    }

    .partner-rewards-toolbar .filter-form {
        flex-wrap: wrap;
    }

    .partner-rewards-toolbar .search-label,
    .partner-rewards-toolbar .filter-form > label:not(.search-label),
    .partner-rewards-toolbar .filter-dropdown {
        flex: 1 1 180px;
        max-width: none;
    }
}

.billing-toolbar .toolbar-action-group,
.costs-toolbar .toolbar-action-group {
    margin-left: 0;
    flex: 1 1 320px;
    justify-content: flex-end;
    min-width: min(100%, 320px);
}

.list-panel {
    padding: 10px;
    overflow-x: auto;
}

.list-panel.dashboard-table,
.pnl-table {
    max-width: 100%;
    overflow-x: auto;
}

.list-panel.billing-scroll-panel {
    max-width: 100%;
    overflow-x: hidden;
}

.billing-table-shell {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    border-color: var(--line);
    border-radius: 8px;
}

.list-panel table,
table {
    border-color: var(--line);
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
}

th,
td {
    border-bottom-color: var(--line-soft);
    padding: 10px 11px;
}

th {
    background: #f9fafb;
    color: #637077;
    font-size: 11px;
    font-weight: 720;
}

td {
    color: #25282b;
}

td.numeric,
th.numeric {
    font-variant-numeric: tabular-nums;
}

tbody tr:hover,
.list-panel.billing-scroll-panel .billing-table-body tbody tr:hover td {
    background: #f8fbff;
}

.badge {
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 680;
}

.notice {
    border-color: #ccebdd;
    border-radius: 8px;
    background: #f0fbf5;
    color: #12715b;
    box-shadow: none;
}

.modal-window,
.row-menu-panel,
.filter-dropdown-panel {
    border-radius: 8px;
}

.modal-window {
    box-shadow: 0 24px 68px rgba(17, 24, 39, .24);
}

.login-page {
    background:
        radial-gradient(circle at 50% -8%, rgba(27, 60, 245, .09), transparent 32%),
        linear-gradient(180deg, #ffffff 0, #f8fafc 100%);
}

.login-box {
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.logo-mark {
    border-radius: 7px;
    background: #25282b;
}

@media (max-width: 980px) {
    .shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        padding: 14px;
        max-height: min(560px, 58vh);
        overflow-y: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .nav-section {
        margin-top: 12px;
    }

    .nav {
        gap: 5px;
    }

    .nav a,
    .nav-placeholder {
        min-height: 38px;
        padding: 8px 9px;
    }

    .main {
        padding: 18px;
    }

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

    .billing-toolbar .toolbar-action-group,
    .costs-toolbar .toolbar-action-group {
        justify-content: flex-start;
    }

    h1 {
        font-size: 25px;
    }
}

/* Demand-management inspired login shell. Kept isolated to avoid touching app pages. */
.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 4vw, 56px);
    background:
        linear-gradient(135deg, #fbfdff 0%, #eef5ff 50%, #f8fafc 100%);
}

.login-shell {
    width: 100%;
    max-width: 1160px;
    display: grid;
    grid-template-columns: minmax(520px, 1.08fr) minmax(380px, .72fr);
    align-items: stretch;
    gap: clamp(24px, 3.8vw, 42px);
}

.login-intro,
.login-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    box-shadow: var(--shadow-soft);
}

.login-intro {
    position: relative;
    min-height: 460px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 28px;
    overflow: hidden;
    padding: 34px 36px 36px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(238, 246, 255, .92));
}

.login-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #25282b;
}

.login-brand .logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #25282b;
    font-size: 16px;
}

.login-brand strong {
    display: block;
    line-height: 1.15;
}

.login-brand strong {
    font-size: 20px;
    font-weight: 720;
}

.login-intro-copy {
    max-width: 640px;
    align-self: center;
}

.login-intro h1 {
    max-width: 620px;
    margin: 0 0 16px;
    color: #25282b;
    font-size: clamp(39px, 4.4vw, 54px);
    font-weight: 620;
    line-height: 1.08;
    letter-spacing: 0;
}

.login-intro-copy > p:last-child {
    max-width: 600px;
    margin: 0;
    color: #495055;
    font-size: 17px;
    line-height: 1.6;
}

.login-proof-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.login-proof {
    min-height: 84px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border: 1px solid rgba(220, 227, 238, .88);
    border-radius: 8px;
    background: rgba(255, 255, 255, .78);
    color: #495055;
    font-size: 13px;
    font-weight: 680;
}

.login-proof-icon {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent);
}

.login-proof svg {
    width: 17px;
    height: 17px;
}

.login-spark {
    position: absolute;
    top: 144px;
    right: 34px;
    width: 26px;
    height: 26px;
    color: #d7164f;
    opacity: .92;
}

.login-spark::before,
.login-spark::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    background: currentColor;
    transform: translate(-50%, -50%);
}

.login-spark::before {
    width: 4px;
    height: 26px;
}

.login-spark::after {
    width: 26px;
    height: 4px;
}

.login-card {
    align-self: stretch;
    width: 100%;
    min-height: 460px;
    display: grid;
    align-content: center;
    padding: 28px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 22px 58px rgba(15, 23, 42, .10);
}

.login-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.login-card-header h2 {
    margin: 0 0 5px;
    color: #25282b;
    font-size: 24px;
    font-weight: 720;
}

.login-card-header p {
    margin: 0;
    color: #637077;
    font-size: 13px;
}

.login-card-arrow {
    width: 36px;
    height: 36px;
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent);
}

.login-card-arrow svg {
    width: 18px;
    height: 18px;
}

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

.login-field {
    display: grid;
    gap: 7px;
}

.login-field span {
    color: #495055;
    font-size: 12px;
    font-weight: 650;
}

.login-field input {
    width: 100%;
    min-height: 46px;
    border-radius: 8px;
}

.login-submit {
    width: 100%;
    min-height: 46px;
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    box-shadow: 0 14px 30px rgba(37, 99, 235, .22);
}

.login-submit svg {
    width: 17px;
    height: 17px;
}

.login-card .notice {
    margin: 0 0 16px;
}

@media (max-width: 1050px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-intro {
        min-height: auto;
    }
}

@media (max-width: 720px) {
    .login-page {
        padding: 16px;
    }

    .login-intro,
    .login-card {
        padding: 22px;
    }

    .login-intro h1 {
        font-size: 34px;
    }

    .login-intro-copy > p:last-child {
        font-size: 15px;
    }

    .login-proof-grid {
        display: none;
    }

    .login-spark {
        top: 118px;
        right: 28px;
    }
}
