.employee-home {
    --page-content-max: 1640px;
    display: grid;
    gap: 18px;
    min-width: 0;
}

.employee-home h1,
.employee-home h2,
.employee-home h3,
.employee-home p {
    margin-top: 0;
}

.employee-home__heading {
    margin-bottom: 0;
}

.employee-home__heading h1 {
    font-size: var(--text-3xl);
    letter-spacing: -0.04em;
    margin-bottom: 4px;
}

.employee-home__heading .stariz-module-header__description {
    max-width: 720px;
}

.employee-home__block {
    display: grid;
    gap: 10px;
}

.employee-home__section-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.employee-home__section-heading h2,
.employee-home__card-heading h2,
.employee-home__manager h2 {
    color: var(--text);
    font-size: var(--text-lg);
    letter-spacing: -0.02em;
    margin: 0;
}

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

.employee-home__access-card {
    align-items: center;
    background: var(--stariz-glass-surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    display: grid;
    gap: 11px;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    min-height: 96px;
    padding: 13px 14px;
    text-decoration: none;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--text) 6%, transparent);
}

.employee-home__access-card:hover {
    border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
}

.employee-home__access-card:focus-visible,
.employee-home__status-card:focus-visible,
.employee-home__news-item:focus-visible,
.employee-home__document-open:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--primary) 26%, transparent);
    outline-offset: 2px;
}

.employee-home__access-card--disabled {
    cursor: not-allowed;
    opacity: 0.72;
}

.employee-home__access-icon,
.employee-home__status-icon,
.employee-home__news-icon,
.employee-home__manager-icon {
    align-items: center;
    background: color-mix(in srgb, var(--primary) 10%, var(--panel));
    border-radius: 50%;
    color: var(--primary);
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
}

.employee-home__access-icon {
    height: 46px;
    width: 46px;
}

.employee-home__access-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.employee-home__access-copy strong {
    font-size: var(--text-sm);
    line-height: 1.25;
}

.employee-home__access-copy small {
    color: var(--muted);
    display: -webkit-box;
    font-size: var(--text-2xs);
    line-height: 1.35;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.employee-home__access-arrow {
    color: var(--muted);
    font-size: var(--text-xl);
}

.employee-home__access-status {
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: var(--text-2xs);
    font-weight: var(--weight-bold);
    padding: 5px 7px;
    white-space: nowrap;
}

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

.employee-home__status-card {
    align-items: center;
    background: var(--stariz-glass-surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    display: grid;
    gap: 13px;
    grid-template-columns: 48px minmax(0, 1fr);
    min-height: 91px;
    padding: 13px 15px;
    text-decoration: none;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--text) 5%, transparent);
}

.employee-home__status-card > span:last-child {
    display: grid;
    gap: 2px;
}

.employee-home__status-icon {
    height: 46px;
    width: 46px;
}

.employee-home__status-icon--vacation {
    background: color-mix(in srgb, #f7c948 24%, var(--panel));
}

.employee-home__status-icon--attendance {
    background: color-mix(in srgb, #34c77b 18%, var(--panel));
}

.employee-home__status-icon--shift {
    background: color-mix(in srgb, var(--primary) 12%, var(--panel));
}

.employee-home__status-card small {
    color: var(--muted);
    font-size: var(--text-2xs);
}

.employee-home__status-card strong {
    font-size: var(--text-xl);
    letter-spacing: -0.035em;
}

.employee-home__status-card em {
    color: var(--muted);
    font-size: var(--text-2xs);
    font-style: normal;
    line-height: 1.25;
}

.employee-home__primary-grid,
.employee-home__secondary-grid {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.employee-home__primary-grid {
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.9fr);
}

.employee-home__secondary-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr);
}

.employee-home__calendar,
.employee-home__communications,
.employee-home__documents,
.employee-home__manager {
    background: var(--stariz-glass-surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    min-width: 0;
    padding: 15px;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--text) 5%, transparent);
}

.employee-home__calendar,
.employee-home__communications,
.employee-home__documents {
    display: grid;
    gap: 12px;
}

.employee-home__card-heading,
.employee-home__card-title {
    align-items: center;
    display: flex;
}

.employee-home__card-heading {
    gap: 12px;
    justify-content: space-between;
}

.employee-home__card-title {
    color: var(--primary);
    gap: 8px;
    min-width: 0;
}

.employee-home__card-title h2 {
    color: var(--text);
}

.employee-home__text-link,
.employee-home__news-footer-link {
    color: var(--primary);
    font-size: var(--text-2xs);
    font-weight: var(--weight-bold);
    text-decoration: none;
}

.employee-home__calendar-nav {
    align-items: center;
    display: grid;
    gap: 12px;
    grid-template-columns: 32px auto 32px;
    justify-content: center;
}

.employee-home__calendar-nav strong {
    font-size: var(--text-md);
    min-width: 130px;
    text-align: center;
}

.employee-home__calendar-arrow {
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.employee-home__calendar-arrow:disabled {
    cursor: default;
    opacity: 0.45;
}

.employee-home__calendar-grid {
    border-left: 1px solid var(--line);
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.employee-home__calendar-weekday,
.employee-home__calendar-day {
    border-bottom: 1px solid var(--line);
    border-right: 1px solid var(--line);
}

.employee-home__calendar-weekday {
    color: var(--muted);
    font-size: var(--text-2xs);
    font-weight: var(--weight-bold);
    padding: 8px 4px;
    text-align: center;
}

.employee-home__calendar-day {
    align-items: flex-start;
    background: var(--panel);
    color: var(--text);
    display: flex;
    font-size: var(--text-2xs);
    justify-content: space-between;
    min-height: 47px;
    padding: 7px;
    position: relative;
}

.employee-home__calendar-day i {
    border-radius: 50%;
    height: 6px;
    margin-top: 3px;
    width: 6px;
}

.employee-home__calendar-day--outside {
    color: color-mix(in srgb, var(--muted) 60%, transparent);
}

.employee-home__calendar-day--today span {
    align-items: center;
    background: var(--primary);
    border-radius: 50%;
    color: var(--primary-contrast, #fff);
    display: inline-flex;
    height: 25px;
    justify-content: center;
    margin: -3px 0 0 -3px;
    width: 25px;
}

.employee-home__calendar-day--shift i,
.employee-home__legend-dot--shift {
    background: #54b978;
}

.employee-home__calendar-day--vacation {
    background: color-mix(in srgb, #f3c85e 20%, var(--panel));
}

.employee-home__calendar-day--vacation i,
.employee-home__legend-dot--vacation {
    background: #e5b43a;
}

.employee-home__calendar-day--absence {
    background: color-mix(in srgb, #ef7373 16%, var(--panel));
}

.employee-home__calendar-day--absence i,
.employee-home__legend-dot--absence {
    background: #e76666;
}

.employee-home__calendar-day--leave {
    background: color-mix(in srgb, #a882e8 17%, var(--panel));
}

.employee-home__calendar-day--leave i,
.employee-home__legend-dot--leave {
    background: #9872d6;
}

.employee-home__calendar-day--permission {
    background: color-mix(in srgb, #65b9e8 17%, var(--panel));
}

.employee-home__calendar-day--permission i,
.employee-home__legend-dot--permission {
    background: #58aad8;
}

.employee-home__legend {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 15px;
}

.employee-home__legend span {
    align-items: center;
    color: var(--muted);
    display: inline-flex;
    font-size: var(--text-2xs);
    gap: 6px;
}

.employee-home__legend-dot {
    border-radius: 4px;
    display: inline-block;
    height: 10px;
    width: 10px;
}

.employee-home__calendar-loading,
.employee-home__communications-loading,
.employee-home__inline-state {
    align-items: center;
    color: var(--muted);
    display: flex;
    font-size: var(--text-2xs);
    justify-content: center;
    min-height: 110px;
    text-align: center;
}

.employee-home__news-list {
    display: grid;
}

.employee-home__news-item {
    align-items: flex-start;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    display: grid;
    gap: 10px;
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 10px 0;
    text-decoration: none;
}

.employee-home__news-item:first-child {
    padding-top: 2px;
}

.employee-home__news-icon {
    height: 34px;
    width: 34px;
}

.employee-home__news-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.employee-home__news-copy strong {
    font-size: var(--text-xs);
    line-height: 1.3;
}

.employee-home__news-copy small {
    color: var(--muted);
    display: -webkit-box;
    font-size: var(--text-2xs);
    line-height: 1.35;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.employee-home__news-copy time {
    color: var(--muted);
    font-size: var(--text-2xs);
}

.employee-home__news-footer-link {
    justify-self: end;
}

.employee-home__documents-table {
    display: grid;
}

.employee-home__documents-row {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: grid;
    font-size: var(--text-2xs);
    gap: 8px;
    grid-template-columns: minmax(0, 2fr) minmax(85px, 0.8fr) minmax(90px, 0.8fr) 46px;
    min-height: 39px;
    padding: 4px 8px;
}

.employee-home__documents-row--header {
    background: color-mix(in srgb, var(--panel) 93%, var(--muted));
    color: var(--muted);
    font-size: var(--text-2xs);
    font-weight: var(--weight-bold);
}

.employee-home__documents-row strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.employee-home__document-status {
    background: color-mix(in srgb, #45b97c 16%, var(--panel));
    border-radius: 999px;
    color: color-mix(in srgb, #218653 82%, var(--text));
    display: inline-block;
    font-size: var(--text-2xs);
    font-style: normal;
    font-weight: var(--weight-bold);
    padding: 4px 7px;
}

.employee-home__document-open {
    align-items: center;
    color: var(--text);
    display: inline-flex;
    justify-content: center;
    text-decoration: none;
}

.employee-home__manager {
    align-items: center;
    display: grid;
    gap: 13px;
    grid-template-columns: 58px minmax(0, 1fr);
}

.employee-home__manager-icon {
    grid-row: 1 / span 2;
    height: 56px;
    width: 56px;
}

.employee-home__manager-copy p {
    color: var(--muted);
    font-size: var(--text-2xs);
    line-height: 1.45;
    margin: 6px 0 0;
}

.employee-home__manager-button {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    grid-column: 2;
    justify-content: center;
    min-height: 38px;
}

.employee-home__manager-button:disabled {
    cursor: not-allowed;
    opacity: 0.58;
}

@media (max-width: 1220px) {
    .employee-home__access-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .employee-home__primary-grid,
    .employee-home__secondary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .employee-home__status-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .employee-home__access-grid {
        grid-template-columns: 1fr;
    }

    .employee-home__access-card {
        grid-template-columns: 46px minmax(0, 1fr);
    }

    .employee-home__access-arrow,
    .employee-home__access-status {
        display: none;
    }

    .employee-home__calendar-day {
        min-height: 39px;
        padding: 5px;
    }

    .employee-home__documents-row {
        grid-template-columns: minmax(0, 1fr) 72px 42px;
    }

    .employee-home__documents-row > :nth-child(2),
    .employee-home__documents-row--header > :nth-child(2) {
        display: none;
    }

    .employee-home__manager {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .employee-home__manager-icon {
        height: 46px;
        width: 46px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .employee-home * {
        scroll-behavior: auto;
        transition: none;
    }
}
