.wrap {
    max-width: 1120px;
    padding-top: 20px;
    padding-bottom: 40px;
}

.portal-inner {
    max-width: 1120px;
    min-height: 64px;
    padding: 8px 16px;
}

.brand-mini {
    min-width: 200px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    box-shadow: none;
}

.top-action,
.lang a,
.primary,
.ghost,
.add-row,
.small-danger {
    border-radius: 6px;
}

.top-action {
    padding: 8px 11px;
    background: #fff;
}

.top {
    min-height: 116px;
    margin-bottom: 14px;
    padding: 20px 22px;
    border-radius: 8px;
    box-shadow: 0 5px 18px rgba(15, 23, 42, .035);
}

.top h1 {
    font-size: 28px;
    letter-spacing: 0;
}

.top img,
.title-logo {
    width: 54px;
    height: 54px;
    border: 0;
    border-radius: 6px;
    box-shadow: none;
}

.hint {
    margin-top: 7px;
    line-height: 1.6;
    font-size: 14px;
}

.form-section-nav {
    position: sticky;
    top: 64px;
    z-index: 40;
    display: flex;
    gap: 5px;
    margin-bottom: 12px;
    padding: 6px;
    overflow-x: auto;
    background: rgba(245, 245, 245, .96);
    border: 1px solid var(--line);
    border-radius: 8px;
    backdrop-filter: blur(12px);
}

.form-section-nav:empty {
    display: none;
}

.form-section-nav button {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    font-family: inherit;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.form-section-nav button.active {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.section {
    margin-top: 12px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, .025);
    scroll-margin-top: 118px;
}

.section h3 {
    padding: 15px 20px;
    background: #fbfcfe;
    font-size: 17px;
}

.section > .grid,
.section > .repeat-list,
.section > .add-row {
    margin: 17px 20px;
}

.grid {
    gap: 14px 12px;
}

label {
    margin-bottom: 6px;
    font-size: 11px;
}

input,
select,
textarea {
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 7px;
    font-size: 14px;
}

input:hover,
select:hover,
textarea:hover {
    border-color: #dbe5f1;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}

textarea {
    min-height: 86px;
}

.wide-note {
    min-height: 74px;
}

.date-input {
    padding-inline-end: 48px;
}

.date-picker {
    inset-inline-end: 4px;
    bottom: 4px;
    width: 38px;
    height: 36px;
    border-radius: 5px;
}

.repeat-list {
    gap: 10px;
}

.repeat-row {
    padding: 13px;
    border-radius: 7px;
}

.repeat-head {
    margin-bottom: 10px;
}

.actions {
    position: sticky;
    bottom: 10px;
    z-index: 35;
    justify-content: flex-end;
    margin-top: 14px;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .1);
}

.actions button {
    min-width: 140px;
    padding: 11px 16px;
}

.progress-wrap {
    max-width: 400px;
}

.progress-label {
    margin-top: 5px;
    letter-spacing: 0;
    text-transform: none;
}

.section.is-current {
    border-color: #bfdbfe;
}

@media (max-width: 850px) {
    .wrap {
        padding: 12px 10px 28px;
    }

    .portal-inner {
        gap: 10px;
    }

    .brand-mini {
        min-width: 0;
    }

    .brand-title {
        font-size: 13px;
    }

    .top-actions {
        margin-inline-start: auto;
    }

    .top-action {
        font-size: 0;
        min-width: 38px;
    }

    .top-action::after {
        content: "HR";
        font-size: 11px;
    }

    .top {
        min-height: 0;
        padding: 16px;
    }

    .top h1 {
        font-size: 23px;
    }

    .title-row {
        gap: 9px;
    }

    .top img,
    .title-logo {
        width: 44px;
        height: 44px;
    }

    .form-section-nav {
        top: 98px;
        margin-inline: -2px;
    }

    .section {
        scroll-margin-top: 150px;
    }

    .section h3 {
        padding: 13px 15px;
        font-size: 16px;
    }

    .section > .grid,
    .section > .repeat-list,
    .section > .add-row {
        margin: 14px;
    }

    .actions {
        bottom: 4px;
    }
}

@media (min-width: 601px) and (max-width: 850px) {
    .grid > .col-2,
    .grid > .col-3,
    .grid > .col-4,
    .grid > .col-5,
    .grid > .col-6 {
        grid-column: span 6;
    }

    .grid > .col-7,
    .grid > .col-8,
    .grid > .col-9,
    .grid > .col-10,
    .grid > .col-11,
    .grid > .col-12 {
        grid-column: span 12;
    }
}

@media (max-width: 520px) {
    .lang {
        width: 100%;
    }

    .lang a {
        flex: 1;
        text-align: center;
    }

    .actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .actions button {
        min-width: 0;
    }
}

@media print {
    .form-section-nav {
        display: none !important;
    }
}
