
:root {
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: #202124;
    background: #fafafa;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    line-height: 1.5;
}

/* Общая шапка */

header {
    background: #702C78;
    color: white;
    border-bottom: none;
    padding: 15px 0;
}

header strong {
    font-size: 18px;
    font-weight: 650;
    letter-spacing: -0.4px;
}

.wrap {
    max-width: 1100px;
    margin: auto;
    padding: 0 22px;
}

.bar, .heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.who {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
    color: #666;
}

/* Карточки */

.panel {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 24px;
    margin: 18px 0;
    box-shadow: none;
}

.login {
    max-width: 430px;
    margin: 65px auto;
}

/* Заголовки */

h1 {
    font-size: 26px;
    font-weight: 650;
    letter-spacing: -0.6px;
    margin: 30px 0 15px;
}

h2 {
    font-size: 21px;
    font-weight: 600;
    letter-spacing: -0.4px;
}

/* Формы */

.fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.fields button,
.fields p {
    grid-column: 1 / -1;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin: 12px 0;
}

input, select, textarea {
    width: 100%;
    border: 1px solid #dedede;
    border-radius: 8px;
    padding: 12px;
    font: inherit;
    margin-top: 6px;
    background: white;
    color: #202124;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #555;
    box-shadow: 0 0 0 3px #0000000a;
}

/* Кнопки */

button, .button {
    display: inline-block;
    background: #702C78;
    color: #ffffff;
    border: 1px solid #702C78;
    border-radius: 8px;
    padding: 11px 16px;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    margin: 4px 5px 4px 0;
    transition: background 0.15s;
}

button:hover, .button:hover {
    background: #592360;
}
.secondary {
    background: #f3f3f3;
    border-color: #e6e6e6;
    color: #333;
}

.secondary:hover {
    background: #e9e9e9;
}

.danger {
    background: #b93838;
    border-color: #b93838;
    color: white;
}

.danger:hover {
    background: #982e2e;
}

.plain {
    background: transparent;
    color: #555;
    border: 1px solid #e2e2e2;
}

.plain:hover {
    background: #f3f3f3;
}

/* Статусы и сообщения */

.status {
    font-size: 12px;
    background: #f0f0f0;
    color: #555;
    padding: 5px 10px;
    border-radius: 20px;
}

.notice {
    background: #fff8e7;
    border: 1px solid #f1e4c2;
    border-radius: 8px;
    padding: 12px;
    margin: 15px 0;
}

.muted {
    color: #777;
    font-size: 13px;
}

.inline {
    display: inline;
}

/* Предприятия */

.enterprise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.enterprise-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    min-height: 175px;
    padding: 22px;
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    color: #202124;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s;
}

.enterprise-card:hover {
    border-color: #aaa;
    background: #fcfcfc;
}

.enterprise-icon {
    font-size: 30px;
}

.enterprise-name {
    font-size: 18px;
    font-weight: 650;
}

.enterprise-description {
    font-size: 13px;
    color: #777;
    text-align: left;
}

/* Телефоны */

@media (max-width: 520px) {
    .wrap {
        padding: 0 16px;
    }

    .who {
        font-size: 11px;
    }

    .panel {
        padding: 16px;
    }

    h1 {
        font-size: 23px;
    }

    .enterprise-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .enterprise-card {
        min-height: 150px;
        padding: 15px;
    }

    .enterprise-name {
        font-size: 16px;
    }

    .enterprise-description {
        font-size: 12px;
    }
}

/* Фирменные цвета Standlab */

:root {
    --brand: #702C78;
    --brand-hover: #592360;
    --brand-light: #F6EAF5;
}

/* Шапка и выход */

.who {
    color: white;
}

.plain {
    background: transparent;
    color: white;
    border: 1px solid #B98DBF;
}

.plain:hover {
    background: #ffffff20;
}

/* Карточки предприятий */

.enterprise-card:hover {
    border-color: var(--brand);
    background: #FCF8FC;
}

.enterprise-icon {
    color: var(--brand);
}

/* Поля ввода */

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px #702C7815;
}

/* Второстепенные кнопки */

.secondary {
    background: var(--brand-light);
    border-color: var(--brand-light);
    color: var(--brand);
}

.secondary:hover {
    background: #EED8EC;
}

/* Статусы */

.status {
    background: var(--brand-light);
    color: var(--brand);
}

/* Сохраняем красный цвет опасных действий */

.danger,
.danger:hover {
    color: white;
}

.photo-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.photo-gallery a {
    display: block;
}

.photo-gallery img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #ddd;
    cursor: pointer;
}

.photo-gallery img:hover {
    opacity: 0.85;
}
.brand-link {
    color: inherit;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
}

.brand-link:hover {
    color: #702C78;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    margin-bottom: 16px;
    border: 1px solid #702C78;
    border-radius: 9px;
    color: #702C78;
    background: transparent;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.back-link:hover {
    background: #f5edf6;
}
/* Кнопки возврата STANDLAB ОТК */

a.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 11px 18px;
    margin-bottom: 20px;

    background-color: #702C78;
    color: #ffffff !important;

    border: 1px solid #702C78;
    border-radius: 10px;

    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;

    transition: background-color 0.2s ease;
}

a.back-link:hover {
    background-color: #57215e;
    border-color: #57215e;
    color: #ffffff !important;
}
/* Переключатели Активные акты / Архив */

.acts-navigation {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 20px;
}

.acts-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 11px 18px;
    border: 1px solid #702C78;
    border-radius: 10px;

    background: #ffffff;
    color: #702C78 !important;

    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;

    transition: 0.2s ease;
}

.acts-nav-link:hover {
    background: #f5edf6;
}

.acts-nav-link.active {
    background: #702C78;
    color: #ffffff !important;
}
/* Карточки разделов БЕНТ */

.section-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    margin: 16px 0;

    background: #ffffff;
    border: 1px solid #e5d9e8;
    border-left: 4px solid #702C78;
    border-radius: 14px;

    text-decoration: none !important;
    color: #26202a !important;

    transition: 0.2s ease;
}

.section-card:hover {
    background: #f8f2f9;
    border-color: #702C78;
    transform: translateY(-2px);
}

.section-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    width: 52px;
    height: 52px;

    background: #702C78;
    color: #ffffff;
    border-radius: 12px;
    font-size: 28px;
}

.section-card-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 0;
}

.section-card-content strong {
    font-size: 16px;
}

.section-card-content small {
    font-size: 13px;
    color: #77717a;
}

.section-card-arrow {
    font-size: 30px;
    color: #702C78;
}
/* Заголовок предприятия */

.company-heading {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 12px 0 26px;
}

.company-heading-line {
    width: 5px;
    height: 58px;
    flex-shrink: 0;
    background: #702C78;
    border-radius: 8px;
}

.company-heading h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 750;
    color: #29212c;
    letter-spacing: 0.3px;
}

.company-heading p {
    margin: 5px 0 0;
    font-size: 13px;
    color: #77717a;
}

@media (max-width: 600px) {
    .company-heading h1 {
        font-size: 26px;
    }
}
/* Полная карточка архивного акта */

.archive-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin: 16px 0 28px;
}

.archive-photos img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #e5d9e8;
}

.archive-history {
    margin: 16px 0 28px;
    border-left: 3px solid #702C78;
    padding-left: 18px;
}

.archive-history-item {
    padding: 12px 16px;
    margin-bottom: 12px;
    background: #f8f3f9;
    border-radius: 10px;
}

.archive-history-item strong {
    color: #702C78;
}

.archive-history-item small {
    display: block;
    margin-top: 5px;
    color: #77717a;
}

.archive-history-item p {
    margin-bottom: 0;
}
/* Ссылки на архивные акты */

.archive-act-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;

    background: #f5edf6;
    color: #702C78 !important;
    border: 1px solid #e5d9e8;
    border-radius: 8px;

    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
}

.archive-act-link:hover {
    background: #702C78;
    color: #ffffff !important;
    border-color: #702C78;
}