* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    color: #252525;
}

.header {
    height: 64px;
    background: #639747;
    display: flex;
    align-items: center;
    padding: 0 28px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #ffffff;
}

.brand-logo {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.brand-name {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.hidden {
    display: none;
}

.back {
    display: inline-block;
    margin-bottom: 24px;
    color: #639747;
    text-decoration: none;
    font-size: 14px;
}

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

.subtitle {
    max-width: 760px;
    margin: 0 0 24px;
    color: #666666;
    font-size: 16px;
    line-height: 1.55;
}

.step {
    display: inline-block;
    margin-bottom: 22px;
    padding: 7px 11px;
    border-radius: 6px;
    background: #e9eee6;
    color: #527d3d;
    font-size: 13px;
    font-weight: 600;
}

.form-card {
    background: #ffffff;
    border: 1px solid #e0e3df;
    border-radius: 10px;
    padding: 26px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.section-title {
    margin: 0 0 22px;
    font-size: 21px;
    font-weight: 600;
}

.field {
    margin-bottom: 20px;
}

.field label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
}

.required {
    color: #b94a48;
}

input[type="text"],
input[type="password"],
select {
    width: 100%;
    min-height: 30px;
    padding: 7px 8px;
    border: 1px solid #cccccc;
    border-radius: 8px;
    background: #ffffff;
    color: #252525;
    font-size: 9px;
    outline: none;
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
    border-color: #639747;
    box-shadow: 0 0 0 2px rgba(99, 151, 71, 0.12);
}

.hint {
    margin-top: 8px;
    color: #777777;
    font-size: 13px;
    line-height: 1.45;
}

.actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

.button {
    min-height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.button-primary {
    background: #639747;
    color: #ffffff;
}

.button-primary:hover {
    background: #567f3d;
}

.button-secondary {
    background: #eef0ed;
    color: #444444;
}

.button-secondary:hover {
    background: #e2e5e0;
}

.login-error {
    margin-top: -6px;
    margin-bottom: 16px;
    color: #b94a48;
    font-size: 14px;
}

.summary {
    margin-bottom: 22px;
    background: #ffffff;
    border: 1px solid #e0e3df;
    border-radius: 10px;
    overflow: hidden;
}

.summary-row:last-child {
    border-bottom: 0;
}

.summary-label,
.summary-value {
    padding: 11px 14px;
    font-size: 14px;
}

.summary-label {
    color: #666666;
    background: #f7f8f6;
}

.summary-value {
    font-weight: 500;
}


/* ---------------------------------------------------------
   Окно №2 — четыре группы
   --------------------------------------------------------- */

.requirements-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}

.requirements-column {
    min-width: 0;
    border: 1px solid #dfe4dc;
    border-radius: 8px;
    background: #fbfcfa;
    overflow: hidden;
}

.requirements-column-header {
    min-height: 110px;
    padding: 16px;
    background: #f0f4ed;
    border-bottom: 1px solid #dfe4dc;
}

.requirements-column-header h3 {
    margin: 0 0 9px;
    color: #416b31;
    font-size: 16px;
    line-height: 1.3;
}

.requirements-column-header p {
    margin: 0;
    color: #6d716a;
    font-size: 12px;
    line-height: 1.45;
}

.requirements-column-content {
    padding: 12px;
}

.requirement-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.checkbox-item {
    display: flex !important;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 6px;
    margin: 0;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.35;
}

.checkbox-item:hover {
    background: #f0f3ee;
}

.checkbox-item input[type="checkbox"] {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 1px 0 0;
    accent-color: #639747;
}

.checkbox-item span {
    min-width: 0;
}

.requirement-subgroup-title {
    margin: 13px 6px 5px;
    padding-top: 9px;
    border-top: 1px solid #e1e5df;
    color: #6b7565;
    font-size: 11px;
    line-height: 1.3;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.25px;
}

.requirement-subgroup-title:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.requirements-hint {
    margin-top: 18px;
    margin-bottom: 20px;
}


/* ---------------------------------------------------------
   Файлы
   --------------------------------------------------------- */

.drop-zone {
    padding: 30px 20px;
    border: 2px dashed #c9d3c4;
    border-radius: 8px;
    background: #fafcf9;
    text-align: center;
    transition: 0.15s ease;
}

.drop-zone.dragover {
    border-color: #639747;
    background: #f0f6ed;
}

.drop-icon {
    margin-bottom: 8px;
    color: #639747;
    font-size: 28px;
    font-weight: 300;
}

.drop-title {
    margin-bottom: 5px;
    font-size: 16px;
    font-weight: 600;
}

.drop-description {
    margin-bottom: 16px;
    color: #777777;
    font-size: 13px;
}

.choose-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-height: 40px;
    padding: 0 16px;
    margin: 0 auto !important;
    border-radius: 6px;
    background: #639747;
    color: #ffffff;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer;
}

.choose-button:hover {
    background: #567f3d;
}

#fileInput {
    display: none;
}

.file-list {
    margin-top: 16px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid #e0e3df;
    border-radius: 6px;
    background: #fafbfa;
}

.file-info {
    min-width: 0;
}

.file-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}

.file-size {
    display: block;
    margin-top: 3px;
    color: #777777;
    font-size: 12px;
}

.remove-file {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #888888;
    font-size: 20px;
    line-height: 30px;
    cursor: pointer;
}

.remove-file:hover {
    background: #eeeeee;
    color: #444444;
}


/* ---------------------------------------------------------
   Адаптация
   --------------------------------------------------------- */

@media (max-width: 1050px) {

    .requirements-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 500px) {

    .header {
        padding: 0 18px;
    }

    .main {
        width: min(100% - 24px, 1180px);
        padding-top: 28px;
    }

    h1 {
        font-size: 28px;
    }

    .form-card {
        padding: 18px;
    }

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

    .requirements-column-header {
        min-height: auto;
    }

    .summary-row {
        grid-template-columns: 1fr;
    }

    .summary-label {
        padding-bottom: 5px;
    }

    .summary-value {
        padding-top: 5px;
    }

    .actions {
        flex-direction: column-reverse;
    }

    .button {
        width: 100%;
    }

}

/* =========================================================
   InTre.Lab — окно авторизации
   ========================================================= */

.topbar {
    height: 64px;
    background: #639747;
    display: flex;
    align-items: center;
    padding: 0 28px;
}

.topbar-inner {
    width: 100%;
    display: flex;
    align-items: center;
}

.screen-center {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-card {
    width: 100%;
    max-width: 430px;
    background: #ffffff;
    border: 1px solid #e0e3df;
    border-radius: 12px;
    padding: 34px 36px 36px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}

.login-card h1 {
    margin: 0 0 8px;
    font-size: 30px;
    line-height: 1.2;
    font-weight: 600;
}

.login-card > p {
    margin: 0 0 30px;
    color: #666666;
    font-size: 15px;
    line-height: 1.5;
}

.login-card .form-group {
    margin-bottom: 18px;
}

.login-card .form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
}

.login-card input[type="text"],
.login-card input[type="password"] {
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    border: 1px solid #cfd4ce;
    border-radius: 7px;
    background: #ffffff;
    color: #252525;
    font-size: 15px;
    outline: none;
}

.login-card input[type="text"]:focus,
.login-card input[type="password"]:focus {
    border-color: #639747;
    box-shadow: 0 0 0 3px rgba(99, 151, 71, 0.12);
}

.login-card .button-primary {
    width: 100%;
    min-height: 46px;
    margin-top: 6px;
    border-radius: 7px;
    font-size: 15px;
}

.error-message {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 7px;
    background: #f9e8e7;
    color: #b94a48;
    font-size: 14px;
    line-height: 1.4;
}

@media (max-width: 600px) {
    .login-card {
        padding: 28px 22px 24px;
    }

    .screen-center {
        padding: 24px 16px;
    }
}

/* ---------------------------------------------------------
   Анализ проекта — исходные документы
   --------------------------------------------------------- */

.uploaded-sources {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.uploaded-source {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 14px;
    border: 1px solid #e2e5e0;
    border-radius: 8px;
    background: #fafbf9;
}

.uploaded-source-info {
    min-width: 0;
}

.uploaded-source-name {
    font-size: 15px;
    line-height: 1.4;
    word-break: break-word;
}

.uploaded-source-path {
    margin-top: 4px;
    color: #858a83;
    font-size: 13px;
}

.uploaded-source-status {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 7px;
    background: #e8f2e3;
    color: #639747;
    font-size: 13px;
    font-weight: 600;
}

.sources-loading,
.sources-empty {
    padding: 14px;
    border-radius: 8px;
    background: #f7f8f6;
    color: #858a83;
    font-size: 14px;
}

@media (max-width: 700px) {

    .uploaded-source {
        align-items: flex-start;
        flex-direction: column;
    }

    .uploaded-source-status {
        align-self: flex-start;
    }

}

/* =========================================================
   InTre.Lab — Анализ проекта
   ========================================================= */

.analysis-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin: 20px 0 24px;
}

.analysis-project {
    margin: 0;
    font-size: 32px;
    line-height: 1.2;
    font-weight: 600;
    color: #252525;
}

.analysis-meta {
    margin-top: 10px;
    color: #70756e;
    font-size: 14px;
    line-height: 1.5;
}

.analysis-status {
    flex: 0 0 auto;
    padding: 8px 12px;
    border-radius: 8px;
    background: #e8f2e3;
    color: #639747;
    font-size: 14px;
    font-weight: 600;
}

.analysis-card {
    margin-bottom: 20px;
    padding: 22px 24px;
    background: #ffffff;
    border: 1px solid #e0e3df;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.analysis-card-title {
    margin: 0 0 16px;
    font-size: 19px;
    line-height: 1.3;
    font-weight: 600;
    color: #252525;
}

.analysis-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.analysis-step {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    border-bottom: 1px solid #eeeeec;
}

.analysis-step:last-child {
    border-bottom: none;
}

.step-icon {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
}

.step-complete {
    background: #e8f2e3;
    color: #639747;
}

.step-name {
    font-size: 15px;
    color: #30332f;
}

.step-status {
    color: #858a83;
    font-size: 13px;
}

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

.result-item {
    padding: 16px;
    border: 1px solid #e0e3df;
    border-radius: 8px;
    background: #fafbf9;
}

.result-item.warning {
    background: #fffaf0;
    border-color: #ead9aa;
}

.result-dot {
    width: 9px;
    height: 9px;
    display: inline-block;
    margin-right: 7px;
    border-radius: 50%;
    background: #639747;
    vertical-align: middle;
}

.result-item.warning .result-dot {
    background: #d3a642;
}

.result-item-title {
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #30332f;
}

.result-text {
    color: #62675f;
    font-size: 14px;
    line-height: 1.5;
}

.questions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.question {
    padding: 14px 16px;
    border-left: 3px solid #639747;
    background: #f7f8f6;
    border-radius: 0 7px 7px 0;
}

.question-number {
    margin-bottom: 5px;
    color: #639747;
    font-size: 13px;
    font-weight: 600;
}

.question-text {
    color: #30332f;
    font-size: 14px;
    line-height: 1.5;
}

.analysis-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 24px 0 40px;
}

.analysis-actions .button {
    min-width: 180px;
}

.back {
    display: inline-block;
    color: #639747;
    text-decoration: none;
    font-size: 14px;
}

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

/* ---------------------------------------------------------
   Анализ проекта — исходные документы
   --------------------------------------------------------- */

.uploaded-sources {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.uploaded-source {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 14px;
    border: 1px solid #e2e5e0;
    border-radius: 8px;
    background: #fafbf9;
}

.uploaded-source-info {
    min-width: 0;
}

.uploaded-source-name {
    font-size: 15px;
    line-height: 1.4;
    word-break: break-word;
}

.uploaded-source-path {
    margin-top: 4px;
    color: #858a83;
    font-size: 13px;
}

.uploaded-source-status {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 7px;
    background: #e8f2e3;
    color: #639747;
    font-size: 13px;
    font-weight: 600;
}

.sources-loading,
.sources-empty {
    padding: 14px;
    border-radius: 8px;
    background: #f7f8f6;
    color: #858a83;
    font-size: 14px;
}

@media (max-width: 800px) {
    .analysis-header {
        flex-direction: column;
    }

    .analysis-status {
        align-self: flex-start;
    }

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

@media (max-width: 700px) {
    .analysis-project {
        font-size: 28px;
    }

    .analysis-card {
        padding: 18px;
    }

    .analysis-step {
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .step-status {
        grid-column: 2;
        padding-bottom: 10px;
    }

    .uploaded-source {
        align-items: flex-start;
        flex-direction: column;
    }

    .uploaded-source-status {
        align-self: flex-start;
    }

    .analysis-actions {
        flex-direction: column-reverse;
    }

    .analysis-actions .button {
        width: 100%;
    }
}


/* =========================================================
   InTre.Lab — Анализ проекта
   ========================================================= */

.analysis-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin: 20px 0 24px;
}

.analysis-project {
    margin: 0;
    font-size: 32px;
    line-height: 1.2;
    font-weight: 600;
    color: #252525;
}

.analysis-meta {
    margin-top: 10px;
    color: #70756e;
    font-size: 14px;
    line-height: 1.5;
}

.analysis-status {
    flex: 0 0 auto;
    padding: 8px 12px;
    border-radius: 8px;
    background: #e8f2e3;
    color: #639747;
    font-size: 14px;
    font-weight: 600;
}

.analysis-card {
    margin-bottom: 20px;
    padding: 22px 24px;
    background: #ffffff;
    border: 1px solid #e0e3df;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.analysis-card-title {
    margin: 0 0 16px;
    font-size: 19px;
    line-height: 1.3;
    font-weight: 600;
    color: #252525;
}

.analysis-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.analysis-step {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    border-bottom: 1px solid #eeeeec;
}

.analysis-step:last-child {
    border-bottom: none;
}

.step-icon {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
}

.step-complete {
    background: #e8f2e3;
    color: #639747;
}

.step-name {
    font-size: 15px;
    color: #30332f;
}

.step-status {
    color: #858a83;
    font-size: 13px;
}

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

.result-item {
    padding: 16px;
    border: 1px solid #e0e3df;
    border-radius: 8px;
    background: #fafbf9;
}

.result-item.warning {
    background: #fffaf0;
    border-color: #ead9aa;
}

.result-dot {
    width: 9px;
    height: 9px;
    display: inline-block;
    margin-right: 7px;
    border-radius: 50%;
    background: #639747;
    vertical-align: middle;
}

.result-item.warning .result-dot {
    background: #d3a642;
}

.result-item-title {
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #30332f;
}

.result-text {
    color: #62675f;
    font-size: 14px;
    line-height: 1.5;
}

.questions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.question {
    padding: 14px 16px;
    border-left: 3px solid #639747;
    background: #f7f8f6;
    border-radius: 0 7px 7px 0;
}

.question-number {
    margin-bottom: 5px;
    color: #639747;
    font-size: 13px;
    font-weight: 600;
}

.question-text {
    color: #30332f;
    font-size: 14px;
    line-height: 1.5;
}

.analysis-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 24px 0 40px;
}

.analysis-actions .button {
    min-width: 180px;
}

.back {
    display: inline-block;
    color: #639747;
    text-decoration: none;
    font-size: 14px;
}

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

/* ---------------------------------------------------------
   Анализ проекта — исходные документы
   --------------------------------------------------------- */

.uploaded-sources {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.uploaded-source {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 14px;
    border: 1px solid #e2e5e0;
    border-radius: 8px;
    background: #fafbf9;
}

.uploaded-source-info {
    min-width: 0;
}

.uploaded-source-name {
    font-size: 15px;
    line-height: 1.4;
    word-break: break-word;
}

.uploaded-source-path {
    margin-top: 4px;
    color: #858a83;
    font-size: 13px;
}

.uploaded-source-status {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 7px;
    background: #e8f2e3;
    color: #639747;
    font-size: 13px;
    font-weight: 600;
}

.sources-loading,
.sources-empty {
    padding: 14px;
    border-radius: 8px;
    background: #f7f8f6;
    color: #858a83;
    font-size: 14px;
}

@media (max-width: 800px) {
    .analysis-header {
        flex-direction: column;
    }

    .analysis-status {
        align-self: flex-start;
    }

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

@media (max-width: 700px) {
    .analysis-project {
        font-size: 28px;
    }

    .analysis-card {
        padding: 18px;
    }

    .analysis-step {
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .step-status {
        grid-column: 2;
        padding-bottom: 10px;
    }

    .uploaded-source {
        align-items: flex-start;
        flex-direction: column;
    }

    .uploaded-source-status {
        align-self: flex-start;
    }

    .analysis-actions {
        flex-direction: column-reverse;
    }

    .analysis-actions .button {
        width: 100%;
    }
}


/* Выплывающее меню инженерных разделов */
.engineering-group {
    position: relative;
}

.engineering-group-title {
    position: relative;
    cursor: pointer;
}

.engineering-submenu {
    position: absolute;
    z-index: 100;
    top: 0;
    left: calc(100% + 8px);
    width: 320px;
    display: none;
    padding: 8px;
    border: 1px solid #d9dde3;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    box-sizing: border-box;
}

.engineering-group:hover .engineering-submenu,
.engineering-group:focus-within .engineering-submenu {
    display: block;
}

.engineering-submenu .checkbox-item {
    margin: 0;
    padding: 8px;
    border-radius: 6px;
}

.engineering-submenu .checkbox-item:hover {
    background: #f5f6f8;
}

/* =========================================================
   INTRE.LAB — ГЛАВНЫЙ ЭКРАН ВЫБОРА
   ========================================================= */

.home-screen {
    position: relative;
    min-height: calc(100vh - 64px);
    overflow-x: hidden;
    overflow-y: auto;
    background:
        radial-gradient(
            circle at 50% 48%,
            rgba(99, 151, 71, 0.08) 0,
            rgba(99, 151, 71, 0.025) 30%,
            rgba(255, 255, 255, 0) 65%
        ),
        #ffffff;
}


/* Архитектурная сетка справа */

.home-screen::before {
    content: "";
    position: absolute;
    width: 850px;
    height: 850px;
    right: -360px;
    top: 70px;

    border: 1px solid rgba(99, 151, 71, 0.08);

    transform: rotate(-28deg);

    background:
        repeating-linear-gradient(
            90deg,
            transparent 0,
            transparent 54px,
            rgba(99, 151, 71, 0.045) 55px,
            transparent 56px
        ),
        repeating-linear-gradient(
            0deg,
            transparent 0,
            transparent 54px,
            rgba(99, 151, 71, 0.045) 55px,
            transparent 56px
        );

    pointer-events: none;
}


/* Мягкая зелёная зона слева */

.home-screen::after {
    content: "";
    position: absolute;
    width: 700px;
    height: 700px;
    left: -450px;
    top: 160px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(99, 151, 71, 0.055) 0,
            rgba(99, 151, 71, 0.015) 48%,
            transparent 70%
        );

    pointer-events: none;
}


/* ---------------------------------------------------------
   Кнопка Выйти
   --------------------------------------------------------- */

.home-logout {
    position: absolute;
    top: 30px;
    right: 48px;
    z-index: 5;

    display: flex;
    align-items: center;
    gap: 9px;

    color: #68736b;
    text-decoration: none;

    font-size: 16px;
    font-weight: 500;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}


.home-logout:hover {
    color: #639747;
    transform: translateX(2px);
}

.home-logout-icon {
    font-size: 25px;
    line-height: 1;
    transform: rotate(180deg);
}


/* ---------------------------------------------------------
   Центральный блок
   --------------------------------------------------------- */

.home-content {
    position: relative;
    z-index: 2;

    min-height: calc(45vh - 64px);

    display: flex;
    flex-direction: column;
    align-items: center;

    padding-top: 50px;
    padding-bottom: 10px;
}


/* Верхний слоган */

.home-eyebrow {
    margin-bottom: 14px;

    color: rgba(99, 151, 71, 0.58);

    font-size: 15px;
    font-weight: 500;

    letter-spacing: 4px;
    text-align: center;
}


/* Логотип */

.home-logo {
    display: none;
    margin: 0;

    color: #172a1c;

    font-size: clamp(56px, 6vw, 82px);
    line-height: 0.95;

    font-weight: 700;
    letter-spacing: -3px;
}

.home-logo span {
    color: #639747;
}


/* Подзаголовок */

.home-subtitle {
    margin: 20px 0 44px;

    color: #637067;

    font-size: 22px;
    line-height: 1.4;

    text-align: center;
}


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

.home-cards {
    display: flex;
    justify-content: center;
    gap: 24px;

    width: 100%;
    max-width: 900px;
}


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

.home-card {
    position: relative;

    width: 160px;
    height: 160px;

    margin-bottom: 26px;

    display: flex;
    flex-direction: column;
    align-items: center;

    border: 1px solid rgba(99, 151, 71, 0.17);
    border-radius: 24px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.98),
            rgba(248, 252, 247, 0.96)
        );

    box-shadow:
        0 15px 45px rgba(34, 59, 40, 0.07),
        0 3px 10px rgba(34, 59, 40, 0.035);

    cursor: pointer;

    font-family: inherit;
    text-align: center;

    transition:
        transform 0.28s ease,
        box-shadow 0.28s ease,
        border-color 0.28s ease,
        background 0.28s ease;

    appearance: none;
    -webkit-appearance: none;
}

.home-card:hover {
    transform: translateY(-7px);

    border-color: rgba(99, 151, 71, 0.35);

    background:
        linear-gradient(
            145deg,
            #ffffff,
            #f5faf3
        );

    box-shadow:
        0 25px 60px rgba(34, 59, 40, 0.11),
        0 6px 16px rgba(34, 59, 40, 0.055);
}

.home-card:active {
    transform: translateY(-3px);
}


/* ---------------------------------------------------------
   Иконка
   --------------------------------------------------------- */

.home-card-icon {

width: 65px;
height: 65px;

    display: flex;
    align-items: center;
    justify-content: center;

margin-top: 14px;
    margin-bottom: 14px;

    border-radius: 25px;

    color: #639747;

    background:
        linear-gradient(
            145deg,
            #f0f7ed,
            #e3f0df
        );

    box-shadow:
        inset 0 0 0 1px rgba(99, 151, 71, 0.06);

    transition:
        transform 0.28s ease,
        background 0.28s ease;
}

.home-card:hover .home-card-icon {
    transform: scale(1.04);

    background:
        linear-gradient(
            145deg,
            #edf6e9,
            #dcecd7
        );
}

.home-card-icon svg {
    width: 66px;
    height: 66px;
}


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

.home-card-title {
    width: 120px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #172a1c;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 650;
    margin-bottom: 10px;
    text-align: center;
}


/* ---------------------------------------------------------
   Описание
   --------------------------------------------------------- */

.home-card-description {
    width: 120px;
    max-width: 170px;
   /* margin-top: 20px;*/
    color: #647268;
    font-size: 10px;
    line-height: 1.55;
    font-weight: 400;
    text-align: center;
}


/* ---------------------------------------------------------
   Стрелка
   --------------------------------------------------------- */

.home-card-arrow {
    position: absolute;

    bottom: 32px;

    width: 54px;
    height: 54px;

   /* display: flex;*/
display:none;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    color: #ffffff;
    background: #639747;

    font-size: 30px;
    font-weight: 300;
    line-height: 1;

    box-shadow:
        0 8px 20px rgba(99, 151, 71, 0.22);

    transition:
        transform 0.25s ease,
        background 0.25s ease;
}

.home-card:hover .home-card-arrow {
    transform: translateX(4px);
    background: #527f3a;
}


/* ---------------------------------------------------------
   Нижний слоган
   --------------------------------------------------------- */

.home-footer {
    display: flex;
    align-items: center;
    gap: 20px;

    margin-top: 58px;

    color: rgba(99, 151, 71, 0.55);

    font-size: 13px;
    font-weight: 500;

    letter-spacing: 3px;
    text-align: center;
}

.home-footer span {
    display: block;

    width: 105px;
    height: 1px;

    background: rgba(99, 151, 71, 0.18);
}


/* ---------------------------------------------------------
   Версия
   --------------------------------------------------------- */

.home-version {
    position: absolute;

    right: 48px;
    bottom: 24px;

    z-index: 5;

    color: #8b978e;

    font-size: 13px;
}


/* ---------------------------------------------------------
   Планшет
   --------------------------------------------------------- */

@media (max-width: 900px) {

    .home-content {
        padding-top: 55px;
    }

    .home-cards {
        gap: 18px;
        padding: 0 20px;
    }

    .home-card {
        width: 45%;
        height: 400px;

        padding-left: 25px;
        padding-right: 25px;
    }
}


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

@media (max-width: 700px) {

    .home-logout {
        right: 22px;
        top: 22px;
    }

    .home-content {
        padding-top: 75px;
    }

    .home-logo {
        font-size: 54px;
    }

    .home-eyebrow {
        font-size: 11px;
        letter-spacing: 2.5px;
    }

    .home-subtitle {
        font-size: 18px;
        margin-bottom: 30px;
    }

    .home-cards {
        flex-direction: column;
        align-items: center;
    }

    .home-card {
        width: min(390px, calc(100vw - 40px));
        height: 370px;
    }

    .home-footer {
        display: none;
    }

    .home-version {
        right: 20px;
        bottom: 15px;
    }
}

/* =========================================================
   СОСТАВИТЬ КП
   ========================================================= */

.kp-back {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0 0 58px;

    color: #68736b;
    font: inherit;
    font-size: 16px;
    font-weight: 500;

    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

.kp-back:hover {
    color: #639747;
    transform: translateX(-2px);
}

.kp-header {
    text-align: left;
    margin-bottom: 48px;
}

.kp-eyebrow {
    margin-bottom: 14px;

    color: rgba(99, 151, 71, 0.58);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.kp-title {
    margin: 0;

    color: #172a1c;
    font-size: clamp(40px, 5vw, 34px);
    line-height: 1;
    font-weight: 700;
    letter-spacing: -2px;
}

.kp-subtitle {
    margin: 18px auto 0 0px;
    max-width: 600px;

    color: #637067;
    font-size: 18px;
    line-height: 1.5;
    text-align: left;
}

.kp-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.kp-field {
    display: flex;
    flex-direction: column;
}

.kp-field label {
    margin-bottom: 7px;

    color: #172a1c;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 650;
}

.kp-hint {
    margin-bottom: 10px;

    color: #647268;
    font-size: 13px;
    line-height: 1.5;
}

.kp-field input,
.kp-field select,
.kp-field textarea {
    width: 66.6667%;
    min-height: 52px;
    box-sizing: border-box;

    padding: 13px 16px;

    border: 1px solid rgba(99, 151, 71, 0.17);
    border-radius: 14px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.98),
            rgba(248, 252, 247, 0.96)
        );

    color: #172a1c;
    font: inherit;
    font-size: 16px;

    outline: none;

    box-shadow:
        0 8px 24px rgba(34, 59, 40, 0.035),
        inset 0 0 0 1px rgba(99, 151, 71, 0.025);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.kp-field textarea {
    height: 52px;
    resize: none;
    overflow-y: hidden;
    line-height: 1.5;
}

.kp-field input:hover,
.kp-field select:hover,
.kp-field textarea:hover {
    border-color: rgba(99, 151, 71, 0.30);
}

.kp-field input:focus,
.kp-field select:focus,
.kp-field textarea:focus {
    border-color: rgba(99, 151, 71, 0.55);

    box-shadow:
        0 10px 30px rgba(34, 59, 40, 0.06),
        0 0 0 3px rgba(99, 151, 71, 0.08);
}

.kp-field select {
    cursor: pointer;
}

.kp-number-wrap {
    position: relative;
    width: 66.6667%;
}

.kp-number-wrap input {
    width: 100%;
}

.kp-number-wrap input {
    padding-right: 60px;
}

.kp-number-wrap span {
    position: absolute;
    right: 17px;
    top: 50%;
    transform: translateY(-50%);

    color: #647268;
    font-size: 14px;

    pointer-events: none;
}

.kp-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-top: 20px;
    padding-top: 12px;
}

.kp-actions-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.kp-button-secondary,
.kp-button-primary {
min-height: 42px;
    padding: 0 18px;

    border-radius: 6px;

    font: inherit;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.kp-button-secondary {
    border: 1px solid rgba(99, 151, 71, 0.20);
    background: transparent;
    color: #68736b;
}

.kp-button-secondary:hover {
    border-color: rgba(99, 151, 71, 0.38);
    color: #639747;
    transform: translateY(-2px);
}

.kp-button-primary {
    border: 0;
    background: #639747;
    color: #fff;

    box-shadow: 0 8px 20px rgba(99, 151, 71, 0.20);
}

.kp-button-primary:hover {
    background: #527f3a;
    transform: translateY(-3px);

    box-shadow: 0 12px 26px rgba(99, 151, 71, 0.25);
}

.kp-button-primary:active,
.kp-button-secondary:active {
    transform: translateY(-1px);
}


/* =========================================================
   СОСТАВИТЬ КП — СОСТАВ ПРОЕКТИРОВАНИЯ
   ========================================================= */

.kp-composition {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}

.kp-composition .requirements-column {
    min-width: 0;
    border: 1px solid #dfe4dc;
    border-radius: 8px;
    background: #fbfcfa;
    overflow: hidden;
}

.kp-composition .requirements-column-header {
    min-height: 90px;
    padding: 16px;
    box-sizing: border-box;

    display: flex;
    align-items: flex-start;

    background: #f0f4ed;
    border-bottom: 1px solid #dfe4dc;
}

.kp-composition .requirements-column-header h3 {
    margin: 0;

    color: #416b31;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 600;
}

.kp-composition .requirements-column-content {
    padding: 10px;
    background: #fbfcfa;
}

.kp-composition .kp-service-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;

    margin: 0;
    padding: 8px 6px;

    border-radius: 5px;

    color: #333a35;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 400;

    cursor: pointer;

    transition:
        background 0.15s ease,
        color 0.15s ease;
}

.kp-composition .kp-service-item:hover {
    background: #f0f3ee;
}

.kp-composition .kp-service-item input[type="checkbox"] {
    flex: 0 0 auto;

    width: 16px;
    height: 16px;

    margin: 1px 0 0;

    accent-color: #639747;
    cursor: pointer;
}

.kp-composition .kp-service-name {
    min-width: 0;
    display: block;
}

.kp-composition .kp-empty-services {
    padding: 10px 6px;

    color: #7a817b;
    font-size: 13px;
    line-height: 1.4;
}

/* Подгруппы состава проектирования */

.kp-composition .services-subgroup-title {
    margin: 13px 6px 5px;
    padding-top: 9px;

    border-top: 1px solid #e1e5df;

    color: #6b7565;
    font-size: 11px;
    line-height: 1.3;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.25px;
}

.kp-composition .services-subgroup-title:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

/* Скрытые элементы старой карточной стилистики,
   если они ещё используются в составе КП */

.kp-composition .kp-check {
    position: relative;

    display: flex;
    align-items: center;
    gap: 8px;

    min-height: 0;
    padding: 8px 6px;

    box-sizing: border-box;

    border: 0;
    border-radius: 5px;

    background: transparent;

    color: #333a35;

    cursor: pointer;

    box-shadow: none;

    transition: background 0.15s ease;
}

.kp-composition .kp-check:hover {
    transform: none;
    border-color: transparent;
    background: #f0f3ee;
    box-shadow: none;
}

.kp-composition .kp-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.kp-composition .kp-check-box {
    flex: 0 0 16px;

    width: 16px;
    height: 16px;

    box-sizing: border-box;

    border: 1px solid rgba(99, 151, 71, 0.38);
    border-radius: 4px;

    background: #fff;
}

.kp-composition .kp-check-text {
    font-size: 13px;
    line-height: 1.35;
    font-weight: 400;
}

/* Адаптив */

@media (max-width: 1100px) {
    .kp-composition {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .kp-composition {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .kp-composition .requirements-column-header {
        min-height: auto;
    }

    .kp-composition .requirements-column-content {
        padding: 10px;
    }
}

@media (max-width: 700px) {

    .kp-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .kp-actions-right {
        order: 1;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        gap: 10px;
        width: 100%;
    }

    .kp-actions > .kp-button-secondary:first-child {
        order: 2;
        width: 100%;
        box-sizing: border-box;
    }

    .kp-actions-right .kp-button-secondary,
    .kp-actions-right .kp-button-primary {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

}

/* =========================================================
   СОСТАВИТЬ КП — ГЛАВНОЕ МЕНЮ МОДУЛЯ
   ========================================================= */

.kp-module-page {
    min-height: calc(100vh - 60px);
}

.kp-module-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;

    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.kp-module-card {
    position: relative;

    min-height: 220px;
    padding: 34px 34px 30px;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;

    border: 1px solid rgba(99, 151, 71, 0.17);
    border-radius: 24px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.98),
            rgba(248, 252, 247, 0.96)
        );

    box-shadow:
        0 15px 45px rgba(34, 59, 40, 0.07),
        0 3px 10px rgba(34, 59, 40, 0.035);

    color: #172a1c;
    font-family: inherit;
    text-align: left;

    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;

    transition:
        transform 0.28s ease,
        box-shadow 0.28s ease,
        border-color 0.28s ease,
        background 0.28s ease;
}

.kp-module-card:hover {
    transform: translateY(-7px);

    border-color: rgba(99, 151, 71, 0.35);

    background:
        linear-gradient(
            145deg,
            #ffffff,
            #f5faf3
        );

    box-shadow:
        0 25px 60px rgba(34, 59, 40, 0.11),
        0 6px 16px rgba(34, 59, 40, 0.055);
}

.kp-module-card:active {
    transform: translateY(-3px);
}

.kp-module-card-title {
    margin-bottom: 16px;

    color: #172a1c;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 650;
}

.kp-module-card-description {
    max-width: 360px;

    color: #647268;
    font-size: 15px;
    line-height: 1.6;
    font-weight: 400;
}

.kp-module-card-arrow {
    position: absolute;

    right: 28px;
    bottom: 26px;

    width: 48px;
    height: 48px;

   /* display: flex;*/
display: none;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    color: #ffffff;
    background: #639747;

    font-size: 25px;
    font-weight: 300;
    line-height: 1;

    box-shadow:
        0 8px 20px rgba(99, 151, 71, 0.22);

    transition:
        transform 0.25s ease,
        background 0.25s ease;
}

.kp-module-card:hover .kp-module-card-arrow {
    transform: translateX(4px);
    background: #527f3a;
}

@media (max-width: 700px) {

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

    .kp-module-card {
        min-height: 190px;
    }

}

/* ---------------------------------------------------------
   DASHBOARD — АДМИНИСТРИРОВАНИЕ
   --------------------------------------------------------- */

.home-admin {
    margin-top: 40px;
    width: 100%;
    text-align: center;
}

.home-admin-title {
    margin-bottom: 22px;
    font-family: "Open Sans", Arial, Helvetica, sans-serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.18em;
    color: #777777;
}

.home-admin-cards {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 24px;
    flex-wrap: wrap;
}

.home-admin-card {
    box-sizing: border-box;
    width: 160px;
    height: 160px;
    padding: 18px 16px;
    border: 1px solid #dddddd;
    border-radius: 2px;
    background: #fafafa;
    color: #111111;
    font-family: "Open Sans", Arial, Helvetica, sans-serif;
    font-weight: 300;
    text-align: center;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.home-admin-card:hover:not(:disabled) {
    border-color: #bdbdbd;
    background: #ffffff;
    transform: translateY(-2px);
}

.home-admin-card:focus-visible {
    outline: 2px solid #999999;
    outline-offset: 3px;
}

.home-admin-card-icon {
    width: 52px;
    height: 52px;
    margin: 4px auto 12px;
}

.home-admin-card-icon svg {
    width: 100%;
    height: 100%;
}

.home-admin-card-title {
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
}

.home-admin-card-description {
    font-size: 10px;
    line-height: 1.45;
    color: #777777;
}

.home-admin-card-disabled {
    cursor: default;
    opacity: 0.55;
}

.home-admin-card-disabled:hover {
    transform: none;
}

@media (max-width: 600px) {

    .home-admin {
        margin-top: 48px;
    }

    .home-admin-cards {
        gap: 16px;
    }

    .home-admin-card {
        width: 150px;
        height: 150px;
    }

}


.kp-top-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 42px;
    margin-bottom: 0;
}

.kp-top-row .kp-back {
    margin-bottom: 0;
}

.kp-top-row .kp-quote-number {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.kp-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.kp-quote-number {
    flex: 0 0 auto;
    color: #172a1c;
    font-size: 18px;
    line-height: 1;
    font-weight: 600;
    white-space: nowrap;
}

@media (max-width: 430px) {
    .kp-quote-number {
        display: none;
    }

    .kp-title-row {
        display: block;
    }
}


/* Кнопка добавления услуги в составе проектирования */

.kp-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
}

.kp-add-service-button {
    min-height: 40px;
    margin-top: 30px;
    padding: 0 18px;
    border: 1px solid #639747;
    border-radius: 2px;
    background: #639747;
    color: #ffffff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.kp-add-service-button:hover {
    background: #557f3d;
    border-color: #557f3d;
}

@media (max-width: 700px) {
    .kp-header-top {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
    }

    .kp-add-service-button {
        margin-top: 0;
        width: 100%;
        box-sizing: border-box;
    }
}

/* =========================================================
   СОСТАВ КП — ФОРМА ДОБАВЛЕНИЯ УСЛУГИ
   ========================================================= */

#kp-service-form.service-form {
    margin: 0 0 38px 0;
    padding: 24px;
    border: 1px solid #dddddd;
    background: #fafafa;
    box-sizing: border-box;
}

#kp-service-form.service-form.hidden {
    display: none;
}

#kp-service-form .service-form-title {
    margin-bottom: 22px;
    font-size: 18px;
    font-weight: 400;
}

#kp-service-form .service-form-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 18px;
}

#kp-service-form .service-form-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: #68736b;
    font-size: 12px;
}

#kp-service-form .service-form-field input,
#kp-service-form .service-form-field select {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #cccccc;
    border-radius: 2px;
    outline: none;
    background: #ffffff;
    color: #111111;
    font-family: inherit;
    font-size: 14px;
    font-weight: 300;
    box-sizing: border-box;
}

#kp-service-form .service-form-field input:focus,
#kp-service-form .service-form-field select:focus {
    border-color: #639747;
}

#kp-service-form .service-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

#kp-service-form .service-form-cancel,
#kp-service-form .service-form-save {
    min-height: 38px;
    padding: 0 18px;
    border-radius: 2px;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
}

#kp-service-form .service-form-cancel {
    border: 1px solid #cccccc;
    background: #ffffff;
    color: #555555;
}

#kp-service-form .service-form-save {
    border: 1px solid #639747;
    background: #639747;
    color: #ffffff;
}

#kp-service-form .service-form-error {
    min-height: 18px;
    margin-top: 12px;
    color: #b33a3a;
    font-size: 12px;
}

@media (max-width: 700px) {
    #kp-service-form.service-form {
        padding: 18px;
    }

    #kp-service-form .service-form-fields {
        grid-template-columns: 1fr;
    }

    #kp-service-form .service-form-actions {
        justify-content: stretch;
    }

    #kp-service-form .service-form-cancel,
    #kp-service-form .service-form-save {
        flex: 1;
    }
}

/* ---------------------------------------------------------
   DASHBOARD — ЕДИНЫЙ СТИЛЬ КАРТОЧЕК АДМИНИСТРИРОВАНИЯ
   --------------------------------------------------------- */

.home-admin-card {
    border: 1px solid rgba(99, 151, 71, 0.17);
    border-radius: 24px;
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.98),
        rgba(248, 252, 247, 0.96)
    );
    box-shadow:
        0 15px 45px rgba(34, 59, 40, 0.07),
        0 3px 10px rgba(34, 59, 40, 0.035);
    color: #172a1c;
    font-family: inherit;
    transition:
        transform 0.28s ease,
        box-shadow 0.28s ease,
        border-color 0.28s ease,
        background 0.28s ease;
}

.home-admin-card:hover:not(:disabled) {
    border-color: rgba(99, 151, 71, 0.35);
    background: linear-gradient(145deg, #ffffff, #f5faf3);
    box-shadow:
        0 25px 60px rgba(34, 59, 40, 0.11),
        0 6px 16px rgba(34, 59, 40, 0.055);
    transform: translateY(-7px);
}

.home-admin-card:active:not(:disabled) {
    transform: translateY(-3px);
}

.home-admin-card:focus-visible {
    outline: 2px solid #639747;
    outline-offset: 3px;
}

.home-admin-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    color: #639747;
    background: linear-gradient(145deg, #f0f7ed, #e3f0df);
    box-shadow: inset 0 0 0 1px rgba(99, 151, 71, 0.06);
    transition: transform 0.28s ease, background 0.28s ease;
}

.home-admin-card:hover:not(:disabled) .home-admin-card-icon {
    transform: scale(1.04);
    background: linear-gradient(145deg, #edf6e9, #dcecd7);
}

.home-admin-card-title {
    color: #172a1c;
    font-weight: 650;
}

.home-admin-card-description {
    color: #647268;
}

@media (max-width: 600px) {
    .home-admin-card {
        border-radius: 22px;
    }
}


/* =========================================================
   INTRE.LAB — ЕДИНЫЙ СТИЛЬ ГЛАВНОГО ЭКРАНА
   ========================================================= */

/* Общая палитра и поведение карточек */
.home-screen {
    color: #172a1c;
}

.home-card,
.home-admin-card {
    box-sizing: border-box;
    font-family: inherit;
    border: 1px solid rgba(99, 151, 71, 0.17);
    border-radius: 24px;
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.98),
        rgba(248, 252, 247, 0.96)
    );
    box-shadow:
        0 15px 45px rgba(34, 59, 40, 0.07),
        0 3px 10px rgba(34, 59, 40, 0.035);
    color: #172a1c;
    transition:
        transform 0.28s ease,
        box-shadow 0.28s ease,
        border-color 0.28s ease,
        background 0.28s ease;
}

.home-card:hover:not(:disabled),
.home-admin-card:hover:not(:disabled) {
    border-color: rgba(99, 151, 71, 0.35);
    background: linear-gradient(145deg, #ffffff, #f5faf3);
    box-shadow:
        0 25px 60px rgba(34, 59, 40, 0.11),
        0 6px 16px rgba(34, 59, 40, 0.055);
    transform: translateY(-7px);
}

.home-card:active:not(:disabled),
.home-admin-card:active:not(:disabled) {
    transform: translateY(-3px);
}

.home-card:focus-visible,
.home-admin-card:focus-visible {
    outline: 2px solid #639747;
    outline-offset: 3px;
}

/* Единое оформление иконок */
.home-card-icon,
.home-admin-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    color: #639747;
    background: linear-gradient(145deg, #f0f7ed, #e3f0df);
    box-shadow: inset 0 0 0 1px rgba(99, 151, 71, 0.06);
    transition: transform 0.28s ease, background 0.28s ease;
}

.home-card:hover:not(:disabled) .home-card-icon,
.home-admin-card:hover:not(:disabled) .home-admin-card-icon {
    transform: scale(1.04);
    background: linear-gradient(145deg, #edf6e9, #dcecd7);
}

/* Единая типографика */
.home-card-title,
.home-admin-card-title {
    color: #172a1c;
    font-weight: 650;
}

.home-card-description,
.home-admin-card-description {
    color: #647268;
    font-weight: 400;
}

/* Административный блок */
.home-admin {
    margin-top: 40px;
}

.home-admin-title {
    color: #647268;
    font-family: inherit;
    font-weight: 500;
    letter-spacing: 0.18em;
}

.home-admin-card {
    border-radius: 24px;
}

.home-admin-card-title {
    font-size: 14px;
    line-height: 1.3;
}

.home-admin-card-description {
    font-size: 10px;
    line-height: 1.55;
}

/* Кнопка выхода и версия */
.home-logout {
    color: #647268;
    transition: color 0.2s ease, transform 0.2s ease;
}

.home-logout:hover {
    color: #639747;
}

.home-version {
    color: #8b978e;
}

/* Мобильная версия */
@media (max-width: 700px) {
    .home-admin-card {
        border-radius: 22px;
    }

    .home-admin {
        margin-top: 40px;
    }
}

/* Учитываем настройку уменьшения анимации */
@media (prefers-reduced-motion: reduce) {
    .home-card,
    .home-admin-card,
    .home-card-icon,
    .home-admin-card-icon,
    .home-logout {
        transition: none;
    }
}


/* =========================================================
   INTRE.LAB — ВОССТАНОВЛЕНИЕ КРУПНОГО ДИЗАЙНА ГЛАВНОГО ЭКРАНА
   ========================================================= */

.home-screen {
    background:
        radial-gradient(ellipse at 50% 38%, rgba(99, 151, 71, 0.12), transparent 58%),
        linear-gradient(145deg, #f8fbf6 0%, #ffffff 55%, #f0f6ec 100%);
}

.home-content {
    width: 100%;
    box-sizing: border-box;
    padding: 65px 32px 30px;
}

.home-eyebrow {
    margin-bottom: 18px;
    font-size: 14px;
    letter-spacing: 4px;
    color: #638f4e;
}

.home-subtitle {
    margin: 18px 0 48px;
    font-size: clamp(22px, 2.2vw, 30px);
    line-height: 1.4;
    color: #526453;
}

.home-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 0;
}

.home-card {
    width: 100%;
    height: 340px;
    min-width: 0;
    margin: 0;
    padding: 36px 34px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    border-radius: 28px;
    text-align: center;
}

.home-card-icon {
    width: 88px;
    height: 88px;
    flex: 0 0 88px;
    border-radius: 24px;
}

.home-card-icon svg {
    width: 64px;
    height: 64px;
}

.home-card-title {
    font-size: clamp(22px, 2vw, 28px);
    line-height: 1.3;
    font-weight: 650;
}

.home-card-description {
    max-width: 300px;
    font-size: 16px;
    line-height: 1.65;
}

.home-card-arrow {
    font-size: 28px;
    line-height: 1;
    color: #639747;
}

.home-admin {
    width: 100%;
    max-width: 980px;
    margin: 48px auto 0;
}

.home-admin-title {
    margin-bottom: 22px;
    font-size: 13px;
    letter-spacing: 3px;
    text-align: center;
}

.home-admin-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.home-admin-card {
    width: 100%;
    min-height: 170px;
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border-radius: 24px;
}

.home-admin-card-icon {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
}

.home-admin-card-icon svg {
    width: 42px;
    height: 42px;
}

.home-admin-card-title {
    font-size: 18px;
    line-height: 1.4;
    text-align: center;
}

.home-admin-card-description {
    max-width: 340px;
    font-size: 14px;
    line-height: 1.55;
    text-align: center;
}

.home-footer {
    margin-top: 48px;
    font-size: 12px;
    letter-spacing: 2px;
}

.home-logout {
    z-index: 10;
}

@media (max-width: 700px) {
    .home-content {
        padding: 85px 20px 28px;
    }

    .home-subtitle {
        margin-bottom: 32px;
        font-size: 21px;
    }

    .home-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .home-card {
        height: auto;
        min-height: 280px;
        padding: 30px 24px;
    }

    .home-admin {
        margin-top: 36px;
    }

    .home-admin-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .home-admin-card {
        min-height: 150px;
    }

    .home-footer {
        margin-top: 36px;
        font-size: 10px;
        letter-spacing: 1px;
    }

    .home-footer span {
        width: 24px;
    }

    .home-version {
        right: 18px;
        bottom: 12px;
    }
}

@media (min-width: 701px) and (max-width: 1000px) {
    .home-cards,
    .home-admin {
        max-width: 860px;
    }

    .home-card {
        height: 310px;
        padding: 28px 22px;
    }
}



/* =========================================================
   KP PRICE — полноэкранный контейнер
   Основной рабочий интерфейс на мобильном
   ========================================================= */

#screen-kp-price {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}
