.wet-cspg-wrapper {
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px;
    font-family: Arial, sans-serif;
    color: #1f2937;
}

.wet-cspg-header {
    background: linear-gradient(135deg, #1B5378, #12384f);
    color: #fff;
    padding: 24px;
    border-radius: 14px;
    margin-bottom: 20px;
}

.wet-cspg-header h2 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 28px;
}

.wet-cspg-header p {
    margin: 0;
    color: #eaf6ff;
}

.wet-cspg-layout {
    display: grid;
    grid-template-columns: 42% 58%;
    gap: 22px;
    align-items: start;
}

.wet-cspg-form-panel,
.wet-cspg-preview-panel {
    background: #fff;
    border: 1px solid #d9e2ec;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.wet-cspg-label {
    display: block;
    font-weight: 700;
    margin: 12px 0 6px;
    font-size: 13px;
    color: #1B5378;
}

.wet-cspg-input,
.wet-cspg-textarea,
.wet-cspg-select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 9px 10px;
    font-size: 14px;
    box-sizing: border-box;
    background: #fff;
    color: #111827;
}

.wet-cspg-textarea {
    min-height: 78px;
    resize: vertical;
}

.wet-cspg-section-title {
    font-size: 17px;
    color: #1B5378;
    margin: 20px 0 10px;
    padding-bottom: 7px;
    border-bottom: 2px solid #e2e8f0;
}

.wet-cspg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.wet-cspg-full {
    grid-column: 1 / -1;
}

.wet-cspg-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.wet-cspg-btn {
    border: 0;
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
}

.wet-cspg-btn.primary {
    background: #1B5378;
    color: #fff;
}

.wet-cspg-btn.secondary {
    background: #e2e8f0;
    color: #111827;
}

.wet-cspg-items-wrap {
    margin-top: 14px;
}

.wet-cspg-items-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 10px 0;
    color: #1B5378;
}

.wet-cspg-small-btn {
    background: #1B5378;
    color: #fff;
    border: 0;
    border-radius: 7px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.wet-cspg-items-scroll {
    overflow-x: auto;
    margin-bottom: 12px;
}

.wet-cspg-items-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
    font-size: 13px;
}

.wet-cspg-items-table th,
.wet-cspg-items-table td {
    border: 1px solid #d8e1ea;
    padding: 7px;
    vertical-align: top;
}

.wet-cspg-items-table th {
    background: #eff6fb;
    color: #1B5378;
    text-align: left;
}

.wet-cspg-table-input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 7px;
    font-size: 13px;
    box-sizing: border-box;
    color: #111827;
}

.wet-cspg-remove-btn {
    background: #dc2626;
    color: #fff;
    border: 0;
    border-radius: 6px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.wet-cspg-preview {
    background: #fff;
    color: #111827;
    min-height: 700px;
    padding: 28px;
    border: 1px solid #e5e7eb;
    overflow-x: auto;
}

.wet-cspg-empty {
    color: #64748b;
    text-align: center;
    padding: 80px 20px;
}

.wet-cspg-print-page {
    background: #fff;
    color: #111827;
}

.wet-cspg-document-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 3px solid #1B5378;
    padding-bottom: 14px;
    margin-bottom: 18px;
}

.wet-cspg-document-header h1 {
    margin: 0 0 6px;
    color: #1B5378;
    font-size: 26px;
    line-height: 1.2;
}

.wet-cspg-small {
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
}

.wet-cspg-preview h3 {
    color: #1B5378;
    border-bottom: 1px solid #dbe4ee;
    padding-bottom: 5px;
    margin: 20px 0 8px;
    font-size: 17px;
}

.wet-cspg-preview p {
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 10px;
}

.wet-cspg-preview-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 13px;
}

.wet-cspg-preview-table th,
.wet-cspg-preview-table td {
    border: 1px solid #cbd5e1;
    padding: 8px;
    text-align: left;
    vertical-align: top;
}

.wet-cspg-preview-table th {
    background: #eff6fb;
    color: #1B5378;
}

.wet-cspg-sign-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-top: 40px;
}

.wet-cspg-sign-box {
    border-top: 1px solid #111827;
    padding-top: 8px;
    font-size: 13px;
}

@media (max-width: 900px) {
    .wet-cspg-wrapper {
        padding: 14px;
    }

    .wet-cspg-layout {
        grid-template-columns: 1fr;
    }

    .wet-cspg-grid {
        grid-template-columns: 1fr;
    }

    .wet-cspg-document-header {
        flex-direction: column;
    }

    .wet-cspg-sign-row {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .wet-cspg-header h2 {
        font-size: 22px;
    }
}

@media print {
    body * {
        visibility: hidden !important;
    }

    .wet-cspg-preview,
    .wet-cspg-preview * {
        visibility: visible !important;
    }

    .wet-cspg-wrapper,
    .wet-cspg-form-panel,
    .wet-cspg-preview-panel,
    .wet-cspg-preview {
        box-shadow: none !important;
        border: none !important;
        background: #fff !important;
    }

    .wet-cspg-preview {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        min-height: auto !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
    }

    .wet-cspg-print-page {
        width: 100% !important;
        max-width: 190mm !important;
        margin: 0 auto !important;
        padding: 0 !important;
        background: #fff !important;
    }

    .wet-cspg-document-header h1 {
        font-size: 22px !important;
    }

    .wet-cspg-preview h3 {
        font-size: 15px !important;
        margin-top: 14px !important;
    }

    .wet-cspg-preview p,
    .wet-cspg-small,
    .wet-cspg-sign-box {
        font-size: 12px !important;
    }

    .wet-cspg-preview-table {
        font-size: 11.5px !important;
    }

    .wet-cspg-preview-table th,
    .wet-cspg-preview-table td {
        padding: 6px !important;
    }

    @page {
        size: A4;
        margin: 12mm;
    }
}