/* Календарь титрации GLP-1 — печать A4, предпросмотр */
.g1c-wrapper {
    max-width: 720px;
    margin: 0 auto;
    padding: 1.25rem 0 2.5rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1d1d1f;
}

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

.g1c-disclaimer {
    margin-bottom: 1.25rem;
    padding: 14px 16px;
    background: #fff8e6;
    border: 1px solid #f0d78c;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.45;
    color: #5c4a1a;
}

.g1c-disclaimer-title {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #8a6d1f;
}

.g1c-disclaimer p:last-child {
    margin: 0;
}

.g1c-form {
    padding: 1.25rem 1.25rem 1.5rem;
    background: #fff;
    border: 1px solid #e5e5ea;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.g1c-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
    margin-bottom: 1.25rem;
}

.g1c-field-full {
    grid-column: 1 / -1;
}

@media (max-width: 520px) {
    .g1c-form-grid {
        grid-template-columns: 1fr;
    }
}

.g1c-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.g1c-field label {
    font-size: 13px;
    font-weight: 600;
    color: #3a3a3c;
}

.g1c-field-hint,
.g1c-phases-note {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: #6e6e73;
}

.g1c-optional {
    font-weight: 400;
    color: #8e8e93;
}

.g1c-field input,
.g1c-field select {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    font-size: 16px;
    line-height: 1.4;
    background: #fff;
    color: #111;
}

.g1c-field input:focus,
.g1c-field select:focus {
    outline: none;
    border-color: #4e73df;
    box-shadow: 0 0 0 3px rgba(78, 115, 223, 0.14);
}

.g1c-phases-wrap {
    margin-bottom: 1.25rem;
}

.g1c-phases-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.g1c-phases-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.g1c-phases-add {
    min-height: 36px;
    padding: 6px 14px;
    border: 1px solid #e5e5ea;
    border-radius: 999px;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.g1c-phases-add:hover {
    border-color: #4e73df;
    color: #4e73df;
}

.g1c-phases-note {
    margin-bottom: 10px;
}

.g1c-phases-table-wrap {
    overflow-x: auto;
    border: 1px solid #e5e5ea;
    border-radius: 12px;
}

.g1c-phases-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.g1c-phases-table th,
.g1c-phases-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.g1c-phases-table th {
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #6e6e73;
    background: #f9f9fb;
}

.g1c-phases-table tr:last-child td {
    border-bottom: none;
}

.g1c-phases-table input {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
}

.g1c-phases-table td:first-child {
    width: 72px;
}

.g1c-phase-remove {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: #f2f2f7;
    color: #666;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.g1c-phase-remove:hover {
    background: #ffe5e5;
    color: #c00;
}

.g1c-submit {
    display: block;
    width: 100%;
    min-height: 52px;
    padding: 14px 20px;
    border: none;
    border-radius: 14px;
    background: #4e73df;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
}

.g1c-submit:hover {
    background: #3d5fc7;
}

.g1c-a4-hint,
.g1c-print-tip {
    margin: 0 0 0.5rem;
    font-size: 13px;
    color: #6e6e73;
}

.g1c-print-tip {
    margin-bottom: 0.75rem;
    font-size: 12px;
}

.g1c-preview-wrap {
    margin-top: 1.5rem;
}

.g1c-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1rem;
}

.g1c-action {
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid #e5e5ea;
    border-radius: 12px;
    background: #fff;
    color: #333;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.g1c-preview {
    padding: 1rem 0;
    background: #f2f2f7;
    border: 1px solid #e5e5ea;
    border-radius: 16px;
    overflow-x: auto;
}

/* ——— A4 ——— */
.g1c-a4-document {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 8px 0 12px;
}

.g1c-a4-page {
    width: 210mm;
    height: 297mm;
    max-width: 100%;
    padding: 12mm 14mm 14mm;
    box-sizing: border-box;
    background: #fff;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.g1c-theme-sheet.g1c-a4-page {
    border: 2px double #2c3e50;
    padding: 14mm 16mm 16mm;
}

.g1c-sheet-title {
    margin: 0 0 4mm;
    text-align: center;
    font-size: 15pt;
    font-weight: 700;
    line-height: 1.3;
    color: #1a1a1a;
}

.g1c-sheet-sub {
    margin: 0 0 5mm;
    text-align: center;
    font-size: 8pt;
    line-height: 1.35;
    color: #666;
}

.g1c-sheet-foot {
    margin: auto 0 0;
    padding-top: 4mm;
    text-align: center;
    font-size: 7.5pt;
    line-height: 1.3;
    color: #888;
}

.g1c-schedule {
    width: 100%;
    border-collapse: collapse;
    font-size: 10pt;
    flex: 1 1 auto;
}

.g1c-schedule th,
.g1c-schedule td {
    border: 1.5px solid #1a1a1a;
    padding: 2.5mm 2mm;
    text-align: left;
    vertical-align: middle;
}

.g1c-theme-minimal .g1c-schedule th,
.g1c-theme-minimal .g1c-schedule td {
    border-width: 1px;
    border-color: #666;
}

.g1c-schedule th {
    font-size: 9pt;
    font-weight: 700;
    background: #f5f5f5;
    text-align: center;
}

.g1c-schedule .g1c-num {
    width: 8%;
    text-align: center;
    font-weight: 700;
}

.g1c-schedule .g1c-date {
    width: 26%;
    white-space: nowrap;
}

.g1c-wd {
    color: #666;
    font-size: 9pt;
}

.g1c-schedule .g1c-dose {
    width: 22%;
    font-weight: 600;
}

.g1c-schedule .g1c-note {
    width: 28%;
    font-size: 9pt;
    color: #444;
}

.g1c-mark {
    width: 10%;
    min-width: 12mm;
    height: 10mm;
    text-align: center;
    font-weight: 700;
    font-size: 14pt;
    cursor: pointer;
    user-select: none;
    background: #fff;
}

.g1c-done {
    background: #bbf7d0 !important;
    border-color: #16a34a !important;
    color: #14532d !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

@media (max-width: 800px) {
    .g1c-preview {
        overflow-x: hidden;
        padding-left: 12px;
        padding-right: 12px;
    }

    .g1c-a4-document {
        align-items: center;
        width: 100%;
    }

    .g1c-a4-page {
        width: 210mm;
        height: 297mm;
        max-width: none;
        transform-origin: top center;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 10mm;
    }

    html,
    body {
        margin: 0;
        padding: 0;
        background: #fff !important;
    }

    .g1c-a4-document {
        gap: 0;
        padding: 0;
        display: block;
    }

    .g1c-a4-page {
        width: 100%;
        height: auto;
        min-height: 0;
        margin: 0 auto;
        padding: 10mm 12mm 12mm;
        box-shadow: none !important;
        page-break-after: always;
        break-after: page;
    }

    .g1c-a4-page:last-child {
        page-break-after: auto;
    }

    .g1c-theme-sheet.g1c-a4-page {
        border: 2px double #000;
    }

    .g1c-schedule th,
    .g1c-schedule td {
        border-color: #000 !important;
    }

    .g1c-done {
        background: #bbf7d0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
