/* 2026-09-25: Фирменные стили NiceAparts для входа, смены пароля и закрытой рабочей области. */
@font-face {
    font-family: 'Manrope';
    src: url('fonts/manrope-regular.woff2') format('woff2');
    font-display: swap;
    font-weight: 400;
}

@font-face {
    font-family: 'Montserrat-Medium';
    src: url('fonts/Montserrat-Medium.woff2') format('woff2');
    font-display: swap;
    font-weight: 500;
}

@font-face {
    font-family: 'AMAGROBold';
    src: url('fonts/Amagro.woff2') format('woff2');
    font-display: swap;
}

:root {
    color-scheme: light;
    font-family: 'Manrope', Arial, sans-serif;
    color: #24312c;
    background: #eef3f1;
    --green: #38725d;
    --green-light: #4b9c80;
    --cream: #ffecc0;
    --line: #c3d1cc;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 18%, rgba(255, 236, 192, 0.72), transparent 31%),
        radial-gradient(circle at 88% 82%, rgba(65, 144, 117, 0.18), transparent 33%),
        #eef3f1;
}

.auth-page {
    display: grid;
    place-items: center;
    padding: 28px 18px;
}

.auth-card {
    width: min(100%, 570px);
    overflow: hidden;
    border: 1px solid rgba(56, 114, 93, 0.14);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(32, 63, 52, 0.16);
}

.brand-panel,
.app-header {
    color: #ffffff;
    background-color: var(--green);
    background-image:
        linear-gradient(120deg, rgba(20, 70, 53, 0.2), rgba(56, 114, 93, 0.05)),
        url('images/bgbg26.jpg');
    background-position: center;
    background-size: cover;
}

.brand-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 22px 28px;
}

.brand-logo {
    display: block;
    width: 104px;
    height: auto;
    flex: 0 0 auto;
    filter: drop-shadow(0 5px 11px rgba(12, 45, 34, 0.26));
}

.brand-copy {
    min-width: 0;
    text-align: center;
}

.brand-name {
    color: var(--cream);
    font-family: 'AMAGROBold', Georgia, serif;
    font-size: clamp(27px, 7vw, 40px);
    line-height: 1;
    letter-spacing: 0.02em;
}

.brand-underline {
    display: block;
    width: min(100%, 245px);
    height: 13px;
    margin: -1px auto 4px;
    object-fit: fill;
}

.brand-description {
    margin: 0;
    font-family: 'Montserrat-Medium', Arial, sans-serif;
    font-size: 12px;
    line-height: 1.35;
}

.auth-content {
    padding: 30px 34px 34px;
}

h1,
h2 {
    color: #264c3e;
    font-family: 'Montserrat-Medium', Arial, sans-serif;
}

h1 {
    margin: 0 0 10px;
    font-size: clamp(24px, 5vw, 30px);
    text-align: center;
}

h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.description {
    margin: 0 0 22px;
    color: #5a6762;
    line-height: 1.5;
    text-align: center;
}

label {
    display: block;
    margin: 14px 0 6px;
    font-weight: 700;
}

input {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #b7c8c1;
    border-radius: 12px;
    background: #fbfdfc;
    font: inherit;
}

input:focus {
    outline: 3px solid rgba(65, 144, 117, 0.22);
    border-color: var(--green-light);
}

button,
.button-link {
    min-height: 46px;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(180deg, var(--green-light), var(--green));
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(56, 114, 93, 0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.auth-content button {
    width: 100%;
    margin-top: 22px;
}

button:hover,
.button-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 11px 24px rgba(56, 114, 93, 0.27);
}

button:active,
.button-link:active {
    transform: translateY(0);
}

.message {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 10px;
    line-height: 1.45;
}

.message-error {
    background: #fbeae7;
    color: #72281d;
}

.message-success,
.message-info {
    background: #e9f4ef;
    color: #245f4b;
}

.captcha-block {
    margin-top: 18px;
    padding: 3px 14px 15px;
    border: 1px solid #d6c89e;
    border-radius: 13px;
    background: #fff9e9;
}

.app-header {
    min-height: 74px;
    padding: 12px 28px;
}

.app-header-inner,
.page-shell {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.app-header-inner {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-brand img {
    width: 54px;
    height: auto;
}

.header-brand-name {
    color: var(--cream);
    font-family: 'AMAGROBold', Georgia, serif;
    font-size: 28px;
    line-height: 1;
}

.header-user {
    text-align: right;
}

.header-user strong,
.header-user span {
    display: block;
}

.header-user span {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
}

.page-shell {
    padding: 34px 22px 60px;
}

.page-title {
    margin-bottom: 24px;
    text-align: left;
}

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

.panel {
    padding: 24px;
    border: 1px solid rgba(56, 114, 93, 0.14);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(32, 63, 52, 0.09);
}

.panel p {
    margin: 8px 0;
    line-height: 1.55;
}

.role-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.role-badge {
    padding: 7px 11px;
    border-radius: 999px;
    background: #e9f4ef;
    color: #245f4b;
    font-size: 13px;
    font-weight: 700;
}

.logout-form {
    margin: 24px 0 0;
}

.logout-form button {
    width: auto;
    padding: 0 22px;
}

@media (max-width: 700px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .app-header {
        padding: 10px 16px;
    }

    .header-brand-name {
        font-size: 23px;
    }

    .header-user span {
        display: none;
    }
}

@media (max-width: 520px) {
    .auth-page {
        padding: 14px 10px;
    }

    .auth-card {
        border-radius: 18px;
    }

    .brand-panel {
        gap: 10px;
        padding: 17px 15px;
    }

    .brand-logo {
        width: 78px;
    }

    .brand-description {
        font-size: 10px;
    }

    .auth-content {
        padding: 24px 18px 26px;
    }

    .header-brand img {
        width: 44px;
    }
}
