:root {
    --color-red: #f81006;
    --color-black: #000000;
    --color-canvas: #ffffff;
    --color-white: #ffffff;
    --font: "Mulish", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--color-canvas);
    color: var(--color-black);
    font-family: var(--font);
}

.login {
    width: min(26rem, calc(100% - 2rem));
    min-height: 100vh;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.75rem;
    padding: 2rem 0;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 1.5rem;
    border-bottom: 4px solid var(--color-red);
}

.topbar__brand {
    display: block;
    line-height: 0;
}

.topbar__logo {
    display: block;
    width: auto;
    height: 3.25rem;
}

.topbar__tools {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.topbar__nav {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.topbar__nav a {
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    color: var(--color-black);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-decoration: none;
    text-transform: uppercase;
}

.topbar__nav a[aria-current="page"] {
    background: var(--color-black);
    color: var(--color-white);
}

.topbar__nav a:hover {
    color: var(--color-red);
}

.topbar__nav a[aria-current="page"]:hover {
    color: var(--color-white);
}

.topbar__logout {
    padding: 0.7rem 1.2rem;
    border-radius: 999px;
    background: var(--color-red);
    color: var(--color-white);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
}

.topbar__logout:hover {
    background: #d80e06;
}

.topbar__logout:focus-visible {
    outline: 2px solid var(--color-black);
    outline-offset: 3px;
}

.home {
    min-height: calc(100vh - 5.45rem);
    padding: 1.25rem 1.75rem 2.5rem;
    background: #f6f4f1;
}

.home__head {
    margin-bottom: 1rem;
}

.home__title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.home__lead {
    margin: 0.25rem 0 0;
    color: #3b3b3a;
    font-size: 0.95rem;
    font-weight: 600;
}

.home__board {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 0.85rem 1rem;
    align-items: start;
}

.home__mail {
    display: block;
}

.home__kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.kpi {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    padding: 0.95rem 1rem 0.85rem;
    background: #fff;
    border-top: 4px solid var(--color-red);
    border-radius: 1rem;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 8px 24px rgb(0 0 0 / 5%);
}

.kpi:hover {
    background: #fff5f4;
}

.kpi--muted {
    border-top-color: #d9d3cc;
}

.kpi--muted:hover {
    background: #fff;
}

.kpi__value {
    overflow: hidden;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kpi__label {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.kpi__meta {
    color: #6d6862;
    font-size: 0.78rem;
    font-weight: 600;
}

.panel {
    min-width: 0;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgb(0 0 0 / 5%);
}

.panel__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid #e6e1da;
}

.panel__title {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.panel__link {
    color: var(--color-red);
    font-size: 0.8rem;
    font-weight: 800;
    text-decoration: none;
}

.panel__link:hover {
    text-decoration: underline;
}

.feed-block {
    padding: 0.85rem 1.1rem 0.35rem;
}

.feed-block h3 {
    margin: 0 0 0.35rem;
    color: #6d6862;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.feed-empty {
    margin: 0;
    padding: 0.9rem 1.1rem 1.1rem;
    color: #6d6862;
    font-size: 0.92rem;
}

.feed-block .feed-empty {
    padding: 0.15rem 0 0.75rem;
}

.feed-item,
.activity-row {
    display: grid;
    gap: 0.12rem;
    padding: 0.65rem 0;
    border-top: 1px solid #f0ece7;
    color: inherit;
    text-decoration: none;
}

.feed-item:hover .feed-item__title,
.activity-row:hover .activity-row__title {
    color: var(--color-red);
}

.feed-item__line,
.activity-row__line {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.feed-item__title,
.activity-row__title,
.feed-item__detail,
.activity-row__detail {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feed-item__title,
.activity-row__title {
    flex: 1;
    font-weight: 800;
}

.feed-item__detail,
.activity-row__detail {
    color: #3b3b3a;
    font-size: 0.86rem;
}

.feed-item__date,
.activity-row time {
    flex: none;
    color: #6d6862;
    font-size: 0.75rem;
    font-weight: 700;
}

.activity-row__end {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
    font-size: 0.82rem;
    font-weight: 800;
}

.year-summary {
    display: grid;
    gap: 0.45rem;
    padding: 0.85rem 1.1rem 1rem;
    border-top: 1px solid #e6e1da;
}

.year-summary p {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.75rem;
    align-items: center;
    margin: 0;
    font-size: 0.86rem;
}

@media (max-width: 900px) {
    .home {
        padding-inline: 1rem;
    }

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

.login__logo {
    width: min(17.5rem, 100%);
    height: auto;
}

.login__card {
    width: 100%;
    padding: 2rem 1.75rem 1.5rem;
    background: var(--color-white);
    border-top: 4px solid var(--color-red);
    border-radius: 1.75rem;
    box-shadow: 0 18px 40px rgb(0 0 0 / 8%);
}

.login__title {
    margin: 0 0 1.35rem;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.field + .field {
    margin-top: 0.85rem;
}

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

.field__input {
    width: 100%;
    padding: 1rem 1.1rem;
    border: 0;
    border-radius: 0.9rem;
    background: var(--color-black);
    color: var(--color-white);
    font: inherit;
    font-size: 1rem;
}

.field__input::placeholder {
    color: rgb(255 255 255 / 72%);
}

.field__input:focus {
    outline: 2px solid var(--color-red);
    outline-offset: 2px;
}

.field__input:-webkit-autofill {
    -webkit-text-fill-color: var(--color-white);
    box-shadow: 0 0 0 1000px var(--color-black) inset;
}

.login__form > ul,
.field ul {
    margin: 0.45rem 0 0;
    padding: 0;
    list-style: none;
    color: var(--color-red);
    font-size: 0.85rem;
    font-weight: 600;
}

.login__form > ul {
    margin: 0 0 0.85rem;
}

.login__submit {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.15rem;
}

.login__button {
    padding: 0.85rem 1.6rem;
    border: 0;
    border-radius: 999px;
    background: var(--color-red);
    color: var(--color-white);
    font: inherit;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
}

.login__button:hover {
    background: #d80e06;
}

.login__button:focus-visible {
    outline: 2px solid var(--color-black);
    outline-offset: 3px;
}
