:root {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1f2937;
    background: #f3f5f8;
    line-height: 1.45;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: #155eef; text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar {
    min-height: 68px; padding: 12px 28px; display: flex; align-items: center; gap: 24px;
    background: #111827; color: white; position: sticky; top: 0; z-index: 10;
}
.brand { color: white; font-weight: 800; white-space: nowrap; }
.topbar nav { display: flex; flex-wrap: wrap; gap: 16px; flex: 1; }
.topbar nav a, .link-button { color: #dbe4f0; }
.account { display: flex; align-items: center; gap: 14px; font-size: 13px; }
.link-button { border: 0; background: none; padding: 0; cursor: pointer; }
.container { width: min(1320px, calc(100% - 32px)); margin: 28px auto 60px; }
.auth-container { min-height: 85vh; display: grid; place-items: center; }
.card { background: white; border: 1px solid #e3e8ef; border-radius: 14px; padding: 22px; box-shadow: 0 4px 18px rgba(15, 23, 42, .04); margin-bottom: 20px; }
.compact { padding: 14px; margin: 0; }
.auth-card { width: min(440px, 100%); }
.auth-card.wide { width: min(760px, 100%); }
h1 { margin: 0 0 8px; font-size: clamp(26px, 3vw, 36px); }
h2 { margin-top: 0; font-size: 20px; }
.muted { color: #667085; }
.small { font-size: 12px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 20px; }
.back-link { display: inline-block; margin-bottom: 8px; }
.stack-form { display: grid; gap: 16px; }
.form-grid { display: grid; gap: 14px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.four { grid-template-columns: 2fr 1fr 1fr auto; }
.align-end { align-items: end; }
label { display: grid; gap: 6px; font-weight: 650; font-size: 14px; }
input, select, textarea, output {
    width: 100%; border: 1px solid #cfd6df; border-radius: 8px; padding: 10px 12px;
    font: inherit; color: inherit; background: white;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(21, 94, 239, .14); border-color: #155eef; }
button, .button {
    display: inline-flex; justify-content: center; align-items: center; border: 1px solid #155eef;
    background: #155eef; color: white; border-radius: 8px; padding: 9px 14px; font: inherit;
    font-weight: 700; cursor: pointer; text-decoration: none;
}
button:hover, .button:hover { filter: brightness(.96); text-decoration: none; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.secondary, .button.secondary { background: white; color: #155eef; }
button.ghost { background: transparent; color: #344054; border-color: #cfd6df; }
button.danger { color: #b42318; border-color: #f2b8b5; }
.inline-form { display: flex; align-items: end; gap: 10px; }
.button-group { display: flex; align-items: center; gap: 8px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 12px; text-align: left; border-bottom: 1px solid #eaecf0; vertical-align: middle; }
th { color: #475467; font-size: 13px; }
tfoot th { color: #101828; font-size: 15px; }
.empty { text-align: center; color: #98a2b3; padding: 28px; }
.status { display: inline-flex; border-radius: 999px; padding: 4px 9px; font-size: 12px; font-weight: 750; white-space: nowrap; }
.status-draft { background: #f2f4f7; color: #344054; }
.status-submitted { background: #fff4e5; color: #b54708; }
.status-approved { background: #ecfdf3; color: #027a48; }
.status-disabled { background: #fef3f2; color: #b42318; }
.total-box { min-width: 210px; background: #111827; color: white; border-radius: 14px; padding: 16px 20px; display: grid; gap: 3px; }
.total-box span { color: #b8c1cf; font-size: 13px; }
.total-box strong { font-size: 25px; }
.preview-output { display: flex; align-items: center; min-height: 43px; font-weight: 800; background: #f8fafc; }
.action-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.warning { color: #b54708; font-weight: 700; }
.flash { border-radius: 10px; padding: 12px 15px; margin-bottom: 14px; font-weight: 650; }
.flash-success { background: #ecfdf3; color: #027a48; border: 1px solid #abefc6; }
.flash-error { background: #fef3f2; color: #b42318; border: 1px solid #fecdca; }
.flash-info { background: #eff8ff; color: #175cd3; border: 1px solid #b2ddff; }
.two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.list { display: grid; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid #eaecf0; }
.editable-row { display: grid; grid-template-columns: 2fr 1fr 1fr auto auto; align-items: center; gap: 10px; }
@media (max-width: 900px) {
    .topbar { align-items: flex-start; flex-direction: column; }
    .account { width: 100%; justify-content: space-between; }
    .page-heading, .action-card { align-items: stretch; flex-direction: column; }
    .two-columns, .form-grid.two, .form-grid.three, .form-grid.four { grid-template-columns: 1fr; }
    .editable-row { grid-template-columns: 1fr; }
    .total-box { min-width: 0; }
}

/* Профіль */
.account-link { color: #dbe4f0; font-weight: 650; }
.account-link:hover { color: #fff; }
.profile-card { max-width: 920px; }

/* Таблиця зарплатного звіту */
.report-table-card { max-width: 1100px; }
.report-table {
    table-layout: fixed;
    min-width: 780px;
}
.report-table .report-col-title { width: 34%; }
.report-table .report-col-type { width: 24%; }
.report-table .report-col-quantity { width: 13%; }
.report-table .report-col-rate { width: 13%; }
.report-table .report-col-amount { width: 13%; }
.report-table .report-col-actions { width: 105px; }
.report-title-cell,
.report-type-cell {
    overflow-wrap: anywhere;
    word-break: normal;
}
.report-number-cell {
    white-space: nowrap;
}
.report-amount-cell {
    font-weight: 750;
}

@media (max-width: 900px) {
    .report-table-card { max-width: 100%; }
}
