﻿@font-face {
    font-family: Roboto;
    src: url(../_fonts/roboto-v29-latin-ext_latin-regular.woff);
}

@font-face {
    font-family: Roboto-Medium;
    src: url(../_fonts/Roboto-Medium.woff);
}

html,
body {
    background: url(../_img/bg.jpg) no-repeat center center fixed;
    background-size: cover;
    font-family: Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 15px;
    line-height: 1.6;
    color: #1f2937;
    min-height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background-color: #f3f4f6;
}

a {
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

p {
    margin-top: 0;
    margin-bottom: 0.9rem;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: Roboto-Medium, Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 500;
    color: #111827;
    margin: 0;
}

h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

h2 {
    font-size: 1.45rem;
}

h3 {
    font-size: 1.05rem;
}

.page-shell {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 16px;
}

.page-card {
    max-width: 960px;
    background: rgba(255, 255, 255, 0.96);
    padding: 36px 36px 28px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(2px);
}

.page-header,
.content-section {
    width: 100%;
}

.logo-row {
    text-align: right;
}

.header-logo {
    width: 72px !important;
    min-width: 72px;
    max-width: 72px;
    height: auto !important;
    display: inline-block;
}

.kicker {
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.intro,
.section-intro,
.intro-note {
    display: block;
    width: 100%;
    max-width: none;
}

.intro-note,
.helper-text,
.status-inline {
    color: #4b5563;
}

.intro-note {
    margin-bottom: 0;
}

.content-section {
    margin-bottom: 36px;
}

.section-heading {
    margin-top: 22px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.section-intro {
    margin-bottom: 18px;
}

.config-panel,
.table-card {
    padding: 18px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
}

.table-card {
    padding: 0;
}

.form-label-column {
    padding-top: 6px;
}

.field-label {
    font-family: Roboto-Medium, Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #111827;
    margin-bottom: 0;
}

.form-control-narrow {
    max-width: 160px;
}

.numeric-stepper-column .input-group {
    width: 100%;
    max-width: 160px;
    flex-wrap: nowrap;
}

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

.checkbox-grid-wide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-check {
    margin-bottom: 0;
}

.procedure-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.procedure-step {
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    background: #ffffff;
    padding: 14px;
}

.procedure-step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}

.procedure-step-title {
    font-family: Roboto-Medium, Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #111827;
}

.procedure-step textarea {
    min-height: 38px;
    resize: vertical;
}

.procedure-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.action-bar-results {
    margin-bottom: 18px;
}

.action-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.preview-card {
    overflow: hidden;
}

.resource-section {
    margin-top: 28px;
}

.resource-card {
    padding: 20px 24px;
}

.resource-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.resource-item h3 {
    margin-bottom: 6px;
}

.resource-item p {
    margin-bottom: 0;
}

.resource-actions {
    flex-shrink: 0;
}

.section-heading .bi,
.resource-item h3 .bi {
    color: #1d4ed8;
}

.preview-tabs {
    padding: 0 16px;
    background: #eef2f7;
    border-bottom: 1px solid #d8dee8;
}

.preview-tabs .nav-link {
    color: #334155;
}

.preview-tabs .nav-link.active {
    font-family: Roboto-Medium, Roboto, "Helvetica Neue", Arial, sans-serif;
}

.preview-pdf {
    min-height: 1120px;
    background: #ffffff;
}

.preview-pdf iframe,
.preview-pdf embed,
.preview-pdf object {
    width: 100% !important;
    height: 1120px !important;
    min-height: 1120px !important;
    border: 0;
}

.preview-pdf-frame {
    width: 100%;
    height: 1120px;
    border: 0;
    display: block;
}

.pdf-export-host {
    position: fixed;
    left: -10000px;
    top: 0;
    width: 840px;
    z-index: -1;
    opacity: 0;
    pointer-events: none;
}

.pdf-export-shell {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    background: #ffffff !important;
}

.pdf-document section,
.pdf-document h2,
.pdf-document .preview-two-column,
.pdf-document .preview-signature {
    break-inside: avoid;
    page-break-inside: avoid;
}

.preview-html {
    margin: 24px;
    padding: 48px;
    border: 1px solid #dbe3ee;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.preview-document {
    max-width: 760px;
    margin: 0 auto;
    color: #111827;
}

.preview-document h1 {
    font-size: 2.05rem;
    margin-bottom: 1.2rem;
}

.preview-document h2 {
    font-size: 1.2rem;
    margin-top: 2rem;
    margin-bottom: 0.7rem;
}

.preview-document p,
.preview-document li,
.preview-document td,
.preview-document th {
    font-size: 0.98rem;
    line-height: 1.55;
}

.preview-document ul,
.preview-document ol {
    padding-left: 1.4rem;
    margin-bottom: 1rem;
}

.preview-document .intro-list {
    margin-top: 0.8rem;
}

.preview-two-column,
.signature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: 1rem;
}

.preview-two-column h3 {
    margin-bottom: 0.4rem;
}

.preview-contact-line {
    margin-bottom: 0.18rem;
    line-height: 1.25;
}

.preview-signature {
    margin-top: 1.3rem;
}

.signature-line {
    margin-top: 2.4rem;
    padding-top: 0.4rem;
    border-top: 1px solid #475569;
}

.preview-checklist {
    list-style: none;
    padding-left: 0;
}

.preview-checklist li {
    display: grid;
    grid-template-columns: 15px 1fr;
    align-items: start;
    column-gap: 10px;
    margin-bottom: 0.6rem;
}

.preview-checkbox {
    width: 15px;
    height: 15px;
    border: 1.4px solid #111827;
    margin-top: 4px;
    display: block;
}

.alert {
    margin-bottom: 0;
}

.is-invalid-manual {
    border-color: #dc3545 !important;
}

.invalid-feedback {
    display: none;
}

.site-footer {
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
    font-size: 0.92rem;
}

.site-footer p {
    margin-bottom: 12px;
}

.site-footer code {
    white-space: normal;
}

.was-validated .form-control:invalid,
.was-validated .form-control.is-invalid-manual,
.was-validated .form-select:invalid,
.was-validated .form-select.is-invalid-manual,
.form-control.is-invalid-manual,
.form-select.is-invalid-manual {
    border-color: #dc3545;
}

.was-validated .form-control:invalid ~ .invalid-feedback,
.was-validated .form-select:invalid ~ .invalid-feedback,
.form-control.is-invalid-manual ~ .invalid-feedback,
.form-select.is-invalid-manual ~ .invalid-feedback {
    display: block;
}

@media print {
    html,
    body {
        background: white !important;
        font-size: 13pt !important;
    }

    .page-shell,
    .page-card,
    .preview-html {
        padding: 0;
        margin: 0;
        box-shadow: none;
        background: white;
        border: none;
    }
}

@media only screen and (max-width: 991px) {
    .checkbox-grid-wide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media only screen and (max-width: 768px) {
    .page-shell {
        padding: 20px 0;
    }

    .page-card {
        padding: 24px 18px;
        border-radius: 0 !important;
    }

    .checkbox-grid,
    .checkbox-grid-wide,
    .preview-two-column,
    .signature-grid {
        grid-template-columns: 1fr;
    }

    .preview-html {
        margin: 12px;
        padding: 20px;
    }

    .preview-pdf {
        min-height: 760px;
    }

    .preview-pdf iframe,
    .preview-pdf embed,
    .preview-pdf object {
        height: 760px !important;
        min-height: 760px !important;
    }

    .preview-pdf-frame {
        height: 760px;
    }

    .action-bar,
    .procedure-actions {
        align-items: stretch;
    }

    .action-group {
        width: 100%;
    }

    .resource-item {
        flex-direction: column;
        align-items: flex-start;
    }
}
