:root {
    --ink: #101113;
    --muted: #61656d;
    --line: #d9dce1;
    --line-strong: #b7bbc2;
    --surface: #ffffff;
    --surface-soft: #f6f7f8;
    --surface-quiet: #eef0f2;
    --accent: #0d55a5;
    --accent-dark: #093d78;
    --accent-soft: #e9f2fc;
    --success: #17643a;
    --success-soft: #ebf8f0;
    --warning: #81540b;
    --warning-soft: #fff7e7;
    --danger: #a22828;
    --danger-soft: #fff0f0;
    --shadow: 0 18px 50px rgba(17, 24, 39, 0.08);
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--ink);
    background:
        radial-gradient(circle at 85% 3%, rgba(13, 85, 165, 0.08), transparent 26rem),
        #f3f4f6;
    font-family:
        Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        sans-serif;
    line-height: 1.45;
}

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

button {
    cursor: pointer;
}

code {
    padding: 2px 5px;
    border-radius: 5px;
    background: #e9ebee;
    font-size: 0.88em;
}

.topbar {
    position: relative;
    z-index: 10;
    border-bottom: 1px solid rgba(16, 17, 19, 0.12);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
}

.topbar__inner {
    width: min(1440px, calc(100% - 40px));
    min-height: 92px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 18px;
    color: inherit;
    text-decoration: none;
}

.brand__logo {
    width: 82px;
    height: 55px;
    flex: 0 0 auto;
    object-fit: contain;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.brand h1 {
    margin: 0;
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    letter-spacing: -0.025em;
}

.brand__subtitle {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 0.88rem;
}

.topbar__actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 9px 10px;
    border-radius: 9px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 750;
    text-decoration: none;
}

.nav-link:hover,
.nav-link--active {
    color: var(--ink);
    background: var(--surface-soft);
}

.page {
    width: min(1440px, calc(100% - 40px));
    margin: 0 auto;
    padding: 42px 0 72px;
}

.page--dashboard {
    width: min(1280px, calc(100% - 40px));
}

.intro {
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    align-items: end;
    gap: 48px;
}

.intro h2 {
    max-width: 850px;
    margin: 0;
    font-size: clamp(1.85rem, 3.3vw, 3.25rem);
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.intro--dashboard h2 {
    max-width: 700px;
}

.intro--form h2 {
    max-width: 760px;
}

.intro__copy {
    margin: 0;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.7;
}

.alert {
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: #40434a;
    background: #fff;
    font-size: 0.86rem;
}

.alert--success {
    border-color: rgba(23, 100, 58, 0.22);
    color: var(--success);
    background: var(--success-soft);
}

.alert--error {
    border-color: rgba(162, 40, 40, 0.22);
    color: var(--danger);
    background: var(--danger-soft);
}

.alert--warning {
    border-color: rgba(129, 84, 11, 0.25);
    color: var(--warning);
    background: var(--warning-soft);
}

.setup-card {
    padding: 32px;
    border: 1px solid rgba(16, 17, 19, 0.11);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: #fff;
    box-shadow: var(--shadow);
}

.setup-card__icon {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: var(--ink);
    font-weight: 900;
}

.setup-card h3,
.setup-card p {
    margin: 0;
}

.setup-card h3 {
    margin-bottom: 8px;
    font-size: 1.25rem;
}

.setup-card p:last-child {
    max-width: 760px;
    color: var(--muted);
    line-height: 1.7;
}

.stat-grid {
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.stat-card {
    min-height: 118px;
    padding: 22px;
    border: 1px solid rgba(16, 17, 19, 0.11);
    border-radius: 16px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    background: #fff;
}

.stat-card span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.stat-card strong {
    font-size: 2.1rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.stat-card--pending {
    border-color: rgba(129, 84, 11, 0.2);
    background: linear-gradient(145deg, #fff, var(--warning-soft));
}

.stat-card--settled {
    border-color: rgba(23, 100, 58, 0.2);
    background: linear-gradient(145deg, #fff, var(--success-soft));
}

.list-panel,
.panel,
.summary {
    border: 1px solid rgba(16, 17, 19, 0.11);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: 0 8px 30px rgba(17, 24, 39, 0.04);
}

.list-panel {
    overflow: hidden;
}

.list-panel__heading {
    padding: 24px 26px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.list-panel h3 {
    margin: 0;
    font-size: 1.18rem;
}

.filters {
    padding: 18px 26px;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 180px auto auto;
    align-items: end;
    gap: 12px;
    background: var(--surface-soft);
}

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

.reports-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.reports-table th {
    padding: 13px 16px;
    color: var(--muted);
    background: #fff;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.reports-table td {
    padding: 16px;
    border-top: 1px solid var(--line);
    vertical-align: middle;
}

.reports-table tbody tr:hover {
    background: #fafbfc;
}

.reports-table td > strong,
.reports-table td > span {
    display: block;
}

.reports-table td > span:not(.status) {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.73rem;
}

.reports-table__actions {
    text-align: right !important;
}

.number-cell {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.status {
    width: fit-content;
    padding: 5px 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    font-weight: 850;
    white-space: nowrap;
}

.status::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    content: "";
    background: currentColor;
}

.status--pending {
    color: var(--warning);
    background: var(--warning-soft);
}

.status--settled {
    color: var(--success);
    background: var(--success-soft);
}

.row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    white-space: nowrap;
}

.row-actions a,
.row-actions button {
    padding: 6px 8px;
    border: 0;
    border-radius: 7px;
    color: var(--accent-dark);
    background: transparent;
    font-size: 0.72rem;
    font-weight: 800;
    text-decoration: none;
}

.row-actions a:hover,
.row-actions button:hover {
    background: var(--accent-soft);
}

.row-actions form {
    margin: 0;
}

.empty-state {
    min-height: 340px;
    padding: 54px 24px;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.empty-state__icon {
    width: 60px;
    height: 60px;
    margin-bottom: 16px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--ink);
    font-size: 0.76rem;
    font-weight: 900;
}

.empty-state h4,
.empty-state p {
    margin: 0;
}

.empty-state h4 {
    font-size: 1.08rem;
}

.empty-state p {
    max-width: 450px;
    margin: 7px 0 18px;
    color: var(--muted);
    font-size: 0.84rem;
}

.pagination {
    padding: 16px 24px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    color: var(--muted);
    font-size: 0.76rem;
}

.pagination a {
    color: var(--accent-dark);
    font-weight: 800;
    text-decoration: none;
}

.workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: start;
    gap: 24px;
}

.form-column {
    min-width: 0;
    display: grid;
    gap: 20px;
}

.panel {
    padding: 26px;
}

.panel__heading {
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.panel__heading--action {
    justify-content: space-between;
    gap: 22px;
}

.panel__title-group {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.step {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: #fff;
    background: var(--ink);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.panel h3,
.summary h3 {
    margin: 2px 0 3px;
    font-size: 1.05rem;
    letter-spacing: -0.018em;
}

.panel__heading p {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.field-grid {
    display: grid;
    gap: 17px;
}

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

.field {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 7px;
}

.field--wide {
    grid-column: 1 / -1;
}

.field > span,
.time-group legend {
    color: #33363b;
    font-size: 0.78rem;
    font-weight: 750;
}

.field small,
.time-group small {
    color: #7a7e85;
    font-size: 0.72rem;
    font-weight: 500;
}

.field > small {
    margin-top: -2px;
}

.lookup-status--success {
    color: var(--success) !important;
}

.lookup-status--error {
    color: var(--danger) !important;
}

.lookup-status--loading {
    color: var(--accent) !important;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--ink);
    background: var(--surface);
    outline: none;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease;
}

input,
select {
    min-height: 44px;
    padding: 9px 12px;
}

textarea {
    min-height: 86px;
    padding: 11px 12px;
    line-height: 1.5;
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: #a0a4aa;
}

input:hover,
textarea:hover,
select:hover {
    border-color: var(--line-strong);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(13, 85, 165, 0.12);
}

input[readonly] {
    color: #4d5158;
    background: var(--surface-quiet);
}

.records {
    display: grid;
    gap: 14px;
}

.record-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-soft);
}

.record-card__heading {
    min-height: 47px;
    padding: 10px 15px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #eceef0;
    font-size: 0.84rem;
}

.remove-button {
    padding: 6px 9px;
    border: 0;
    border-radius: 8px;
    color: var(--danger);
    background: transparent;
    font-size: 0.76rem;
    font-weight: 750;
}

.remove-button:hover,
.remove-button:focus-visible {
    background: var(--danger-soft);
}

.record-grid {
    padding: 16px;
    display: grid;
    gap: 15px;
}

.record-grid--overtime {
    grid-template-columns: minmax(170px, 1fr) minmax(140px, 1fr) minmax(140px, 1fr) minmax(210px, 1.2fr);
    grid-auto-rows: minmax(0, auto);
}

.record-grid--compensation {
    grid-template-columns: minmax(160px, 1fr) 130px 130px;
}

.record-grid--overtime > * {
    min-width: 0;
}

.record-grid--overtime .time-group {
    grid-column: span 2;
}

.record-grid--overtime .field--reason {
    grid-column: 1 / -1;
}

.time-group {
    min-width: 0;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    background: #fff;
}

.time-group legend {
    padding: 0 5px;
}

.field--reason {
    grid-column: span 2;
}

.button {
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
    transition:
        transform 150ms ease,
        border-color 150ms ease,
        background-color 150ms ease,
        color 150ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button:focus-visible,
.remove-button:focus-visible,
.dialog-close:focus-visible {
    outline: 3px solid rgba(13, 85, 165, 0.2);
    outline-offset: 2px;
}

.button:disabled {
    cursor: wait;
    opacity: 0.55;
    transform: none;
}

.button--compact {
    min-height: 38px;
    padding: 8px 11px;
}

.button--primary {
    color: #fff;
    background: var(--accent);
    box-shadow: 0 10px 24px rgba(13, 85, 165, 0.2);
}

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

.button--secondary {
    flex: 0 0 auto;
    border-color: var(--line-strong);
    color: var(--ink);
    background: #fff;
}

.button--secondary:hover {
    border-color: #8f949b;
    background: var(--surface-soft);
}

.button--ghost {
    border-color: rgba(13, 85, 165, 0.25);
    color: var(--accent-dark);
    background: var(--accent-soft);
}

.button--text {
    min-height: 35px;
    color: var(--muted);
    background: transparent;
}

.button--full {
    width: 100%;
}

.summary {
    position: sticky;
    top: 20px;
    padding: 24px;
}

.summary__header {
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.summary-list {
    margin: 8px 0 22px;
}

.summary-list > div {
    min-height: 47px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.summary-list dt {
    color: var(--muted);
    font-size: 0.78rem;
}

.summary-list dd {
    margin: 0;
    font-size: 0.91rem;
    font-weight: 850;
    font-variant-numeric: tabular-nums;
}

.document-chip {
    margin-bottom: 18px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface-soft);
}

.document-chip__icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: #fff;
    background: var(--ink);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.05em;
}

.document-chip strong,
.document-chip span {
    display: block;
}

.document-chip strong {
    font-size: 0.79rem;
}

.document-chip div > span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.7rem;
}

.privacy-note {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 0.74rem;
    line-height: 1.55;
}

.summary .button + .button {
    margin-top: 9px;
}

.installer-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 5%, rgba(13, 85, 165, 0.12), transparent 28rem),
        #f3f4f6;
}

.installer-shell {
    width: min(1080px, calc(100% - 40px));
    margin: 0 auto;
    padding: 42px 0 64px;
}

.installer-brand {
    margin-bottom: 26px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.installer-brand img {
    width: 82px;
    height: 58px;
    object-fit: contain;
}

.installer-brand h1,
.installer-brand p {
    margin: 0;
}

.installer-brand h1 {
    font-size: clamp(1.55rem, 3vw, 2.3rem);
    letter-spacing: -0.04em;
}

.installer-brand p:last-child {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.88rem;
}

.installer-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    align-items: start;
    gap: 20px;
}

.installer-card,
.installer-guide {
    border: 1px solid rgba(16, 17, 19, 0.11);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: 0 12px 35px rgba(17, 24, 39, 0.05);
}

.installer-card {
    padding: 26px;
}

.installer-card--message {
    min-height: 260px;
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.installer-card--message h2 {
    margin: 0 0 8px;
}

.installer-card--message p:not(.eyebrow) {
    max-width: 650px;
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.65;
}

.installer-card__heading {
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.installer-card__heading h2 {
    margin: 0;
    font-size: 1.2rem;
}

.requirement {
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 850;
    white-space: nowrap;
}

.requirement--ok {
    color: var(--success);
    background: var(--success-soft);
}

.requirement--error {
    color: var(--danger);
    background: var(--danger-soft);
}

.installer-section {
    min-width: 0;
    margin: 0 0 22px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 13px;
}

.installer-section legend {
    padding: 0 6px;
    font-size: 0.78rem;
    font-weight: 850;
}

.installer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(150px, 0.5fr);
    gap: 15px;
}

.installer-grid__host {
    min-width: 190px;
}

.check-field {
    margin-top: 16px;
    padding: 12px;
    border-radius: 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--surface-soft);
    cursor: pointer;
}

.check-field input {
    width: 17px;
    min-height: 17px;
    margin: 2px 0 0;
    accent-color: var(--accent);
}

.check-field span,
.check-field small {
    display: block;
}

.check-field span {
    font-size: 0.76rem;
    font-weight: 750;
}

.check-field small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.69rem;
    font-weight: 500;
}

.installer-guide {
    position: sticky;
    top: 20px;
    padding: 23px;
}

.installer-guide ol {
    margin: 18px 0 20px;
    padding: 0;
    list-style: none;
    counter-reset: install-step;
}

.installer-guide li {
    position: relative;
    min-height: 58px;
    padding: 0 0 17px 42px;
    counter-increment: install-step;
}

.installer-guide li:not(:last-child)::after {
    position: absolute;
    top: 29px;
    bottom: 1px;
    left: 15px;
    width: 1px;
    content: "";
    background: var(--line);
}

.installer-guide li::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    content: counter(install-step);
    color: #fff;
    background: var(--ink);
    font-size: 0.7rem;
    font-weight: 850;
}

.installer-guide strong,
.installer-guide span {
    display: block;
}

.installer-guide strong {
    padding-top: 2px;
    font-size: 0.78rem;
}

.installer-guide span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.7rem;
    line-height: 1.45;
}

.installer-note {
    padding: 13px;
    border: 1px solid rgba(13, 85, 165, 0.2);
    border-radius: 11px;
    color: var(--accent-dark);
    background: var(--accent-soft);
    font-size: 0.72rem;
    line-height: 1.55;
}

.help-dialog {
    width: min(860px, calc(100% - 32px));
    max-height: min(820px, calc(100vh - 32px));
    padding: 0;
    border: 0;
    border-radius: 20px;
    color: var(--ink);
    background: #fff;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.25);
}

.help-dialog::backdrop {
    background: rgba(15, 18, 22, 0.64);
    backdrop-filter: blur(4px);
}

.help-dialog__header {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 22px 24px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    background: rgba(255, 255, 255, 0.97);
}

.help-dialog__header h2 {
    margin: 0;
    font-size: 1.35rem;
}

.dialog-close {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--muted);
    background: #fff;
    font-size: 1.45rem;
    line-height: 1;
}

.help-dialog__content {
    padding: 24px;
}

.help-dialog__content > section {
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 14px;
}

.help-dialog__content > section:first-child {
    padding-top: 0;
}

.help-number {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--ink);
    font-size: 0.72rem;
    font-weight: 850;
}

.help-dialog h3 {
    margin: 5px 0 13px;
    font-size: 1rem;
}

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

.help-list > div {
    padding: 12px;
    border-radius: 10px;
    background: var(--surface-soft);
}

.help-list dt {
    margin-bottom: 3px;
    font-size: 0.76rem;
    font-weight: 850;
}

.help-list dd {
    margin: 0;
    color: var(--muted);
    font-size: 0.74rem;
    line-height: 1.55;
}

.auto-note {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid rgba(13, 85, 165, 0.2);
    border-radius: 12px;
    color: var(--accent-dark);
    background: var(--accent-soft);
    font-size: 0.8rem;
    line-height: 1.6;
}

.help-dialog__footer {
    position: sticky;
    bottom: 0;
    padding: 16px 24px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: flex-end;
    background: rgba(255, 255, 255, 0.97);
}

.footer {
    padding: 24px 20px 34px;
    color: #73777e;
    text-align: center;
    font-size: 0.75rem;
}

@media (max-width: 1100px) {
    .workspace {
        grid-template-columns: minmax(0, 1fr) 290px;
    }

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

    .time-group {
        grid-column: span 1;
    }

    .record-grid--overtime .time-group {
        grid-column: span 1;
    }
}

@media (max-width: 860px) {
    .topbar__inner,
    .page,
    .page--dashboard {
        width: min(100% - 28px, 720px);
    }

    .topbar__inner {
        padding: 12px 0;
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar__actions {
        width: 100%;
        overflow-x: auto;
    }

    .intro {
        grid-template-columns: 1fr;
        gap: 16px;
    }

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

    .summary {
        position: static;
        order: -1;
    }

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

    .filters {
        grid-template-columns: minmax(0, 1fr) minmax(150px, 0.45fr);
    }

    .filters .button {
        width: 100%;
    }

    .reports-table {
        min-width: 940px;
    }

    .installer-layout {
        grid-template-columns: 1fr;
    }

    .installer-guide {
        position: static;
    }
}

@media (max-width: 620px) {
    .brand {
        gap: 12px;
    }

    .brand__logo {
        width: 62px;
        height: 44px;
    }

    .brand__subtitle {
        display: none;
    }

    .nav-link {
        display: none;
    }

    .page {
        padding-top: 28px;
    }

    .intro h2 {
        font-size: 2rem;
    }

    .panel,
    .summary,
    .list-panel {
        border-radius: 15px;
    }

    .panel,
    .summary {
        padding: 18px;
    }

    .list-panel__heading {
        padding: 18px;
        align-items: stretch;
        flex-direction: column;
    }

    .filters {
        padding: 16px 18px;
        grid-template-columns: 1fr;
    }

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

    .stat-card {
        min-height: 90px;
    }

    .setup-card {
        padding: 22px;
        flex-direction: column;
    }

    .panel__heading,
    .panel__title-group {
        gap: 11px;
    }

    .panel__heading--action {
        align-items: stretch;
        flex-direction: column;
    }

    .panel__heading--action .button {
        width: 100%;
    }

    .field-grid--two,
    .record-grid--overtime,
    .record-grid--compensation,
    .summary-list,
    .help-list {
        grid-template-columns: 1fr;
    }

    .field--wide,
    .field--reason,
    .time-group,
    .record-grid--overtime .time-group,
    .record-grid--overtime .field--reason {
        grid-column: auto;
    }

    .time-group {
        grid-template-columns: 1fr 1fr;
    }

    .help-dialog {
        width: calc(100% - 18px);
        max-height: calc(100vh - 18px);
        border-radius: 15px;
    }

    .help-dialog__header,
    .help-dialog__content,
    .help-dialog__footer {
        padding-left: 17px;
        padding-right: 17px;
    }

    .help-dialog__content > section {
        grid-template-columns: 1fr;
    }

    .installer-shell {
        width: min(100% - 24px, 620px);
        padding-top: 24px;
    }

    .installer-brand {
        align-items: flex-start;
    }

    .installer-brand img {
        width: 62px;
        height: 46px;
    }

    .installer-card,
    .installer-guide {
        padding: 18px;
        border-radius: 15px;
    }

    .installer-card__heading,
    .installer-card--message {
        flex-direction: column;
    }

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

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