/* ============================================
   style.css - Complete Form Styling
   PDF Design - Arif Habib REC Registration
   ============================================ */

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Times New Roman', Times, serif;
    background: #e8e8e8;
    padding: 30px 20px;
}

/* ===== PDF CONTAINER ===== */
.pdf-container {
    max-width: 900px;
    margin: 0 auto;
    background: #ffffff;
    padding: 50px 60px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
    position: relative;
}

/* ===== HEADER ===== */
.header {
   text-align: center;
    border-bottom: 2px solid #1a2a4a;
    padding-bottom: 15px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 20px;
}

.header h1 {
    font-size: 22px;
    color: #1a2a4a;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 700;
    background-color: #F1DCD9;
}

.header .sub {
    font-size: 14px;
    color: #333;
    letter-spacing: 2px;
    margin-top: 3px;
}

/* ===== FORM FIELDS - PDF STYLE ===== */
.form-group {
    display: flex;
    align-items: baseline;
    margin-bottom: 10px;
    border-bottom: 1px dotted #ccc;
    padding-bottom: 6px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #1a2a4a;
    min-width: 200px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group .field-value {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    flex: 1;
    border: none;
    border-bottom: 1px solid #999;
    padding: 4px 8px;
    font-size: 14px;
    font-family: 'Times New Roman', Times, serif;
    background: transparent;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-bottom-color: #1a2a4a;
    background: #f9f9f9;
}

.form-group textarea {
    min-height: 50px;
    resize: vertical;
    border: 1px solid #ccc;
    padding: 6px 10px;
}

/* ===== NOTE SECTION ===== */
.note-box {
    background: #f8f0e0;
    border-left: 4px solid #c0392b;
    padding: 12px 18px;
    margin: 20px 0;
    font-size: 13px;
    font-style: italic;
    color: #555;
}

.note-box i {
    color: #c0392b;
    margin-right: 8px;
}

/* ===== TERMS & CONDITIONS ===== */
.terms-section {
    margin: 25px 0;
}

.terms-section h3 {
    font-size: 16px;
    color: #1a2a4a;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #1a2a4a;
    padding-bottom: 5px;
    margin-bottom: 12px;
}

.terms-section .terms-intro {
    font-size: 13px;
    color: #555;
    margin-bottom: 10px;
    line-height: 1.6;
}

.terms-list {
    list-style: decimal;
    padding-left: 25px;
    margin-top: 10px;
}

.terms-list li {
    font-size: 13px;
    line-height: 1.7;
    padding: 4px 0;
    color: #333;
}

/* ===== SIGNATURE SECTION ===== */
.signature-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    margin: 30px 0 20px 0;
}

.signature-box {
    border-top: 1px solid #1a2a4a;
    padding-top: 8px;
    text-align: center;
    font-size: 12px;
    color: #555;
}

.signature-box label {
    display: block;
    font-weight: 600;
    font-size: 12px;
    color: #1a2a4a;
    margin-bottom: 4px;
}

.signature-box input[type="text"],
.signature-box input[type="file"],
.signature-box input[type="date"] {
    border: none;
    border-bottom: 1px solid #999;
    width: 100%;
    padding: 4px 6px;
    text-align: center;
    font-size: 13px;
    font-family: 'Times New Roman', Times, serif;
    background: transparent;
}

.signature-box input:focus {
    outline: none;
    border-bottom-color: #1a2a4a;
}

.signature-box input[type="file"] {
    border: none;
    padding: 4px 0;
    text-align: center;
}

/* ===== COMMISSION SECTION ===== */
.commission-section {
    margin: 25px 0;
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #1a2a4a;
}

.commission-section h3 {
    font-size: 15px;
    color: #1a2a4a;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.commission-section p {
    font-size: 13px;
    line-height: 1.7;
    color: #333;
}

.commission-section .highlight {
    font-size: 13px;
    font-weight: 600;
    color: #1a2a4a;
    margin-top: 6px;
}

.commission-section .highlight i {
    color: #27ae60;
}

/* ===== ANNEXURE-A ===== */
.annexure {
    margin: 30px 0;
    padding: 20px;
    border: 1px solid #ccc;
    background: #fafafa;
}

.annexure h3 {
    font-size: 16px;
    color: #1a2a4a;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.annexure h4 {
    text-align: center;
    font-size: 14px;
    color: #1a2a4a;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.annexure p {
    font-size: 13px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 8px;
}

.annexure p strong {
    color: #1a2a4a;
}

.annexure .important-notice {
    margin-top: 15px;
    padding: 10px;
    background: #fce9e6;
    border-left: 4px solid #c0392b;
}

.annexure .important-notice p {
    font-size: 13px;
    font-weight: 600;
    color: #922b21;
    margin-bottom: 0;
}

.annexure .important-notice i {
    margin-right: 8px;
}

/* ===== RECOMMENDATION ===== */
.recommendation {
    margin: 25px 0;
    padding: 20px;
    border: 1px solid #1a2a4a;
    background: #f9fafc;
}

.recommendation h4 {
    font-size: 15px;
    color: #1a2a4a;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.recommendation p {
    font-size: 14px;
    color: #333;
    line-height: 1.8;
}

.recommendation .rec-name {
    font-weight: 600;
}

.recommendation .sig-line {
    display: inline-block;
    width: 200px;
    border-bottom: 1px solid #1a2a4a;
    margin: 0 10px;
    padding: 0 10px;
}

.recommendation .prep-approve {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.recommendation .prep-approve label {
    font-size: 13px;
    font-weight: 600;
    color: #1a2a4a;
    display: block;
    margin-bottom: 4px;
}

.recommendation .prep-approve input {
    border: none;
    border-bottom: 1px solid #999;
    width: 100%;
    padding: 4px 6px;
    font-family: 'Times New Roman', Times, serif;
    background: transparent;
}

.recommendation .prep-approve input:focus {
    outline: none;
    border-bottom-color: #1a2a4a;
}

.recommendation .prep-approve .bracket {
    font-size: 12px;
    color: #999;
    display: block;
    margin-top: 3px;
}

/* ============================================
   CAL SECTION - EXACT AS PER IMAGE
   ============================================ */

.cal-section {
    margin: 30px 0;
    padding: 25px 30px;
    border: 2px solid #1a2a4a;
    background: #ffffff;
}

.cal-section h3 {
    text-align: center;
    font-size: 20px;
    color: #1a2a4a;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    font-weight: 700;
    background-color: #C4BC96;
    padding: 10px;
}

/* To & Date */
.cal-to-date {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 18px;
    font-size: 14px;
    color: #1a2a4a;
}

.cal-to {
    font-weight: 600;
}

.cal-date {
    font-weight: 600;
}

.cal-date input {
    border: none;
    border-bottom: 1px solid #1a2a4a;
    padding: 2px 10px;
    font-size: 14px;
    font-family: 'Times New Roman', Times, serif;
    background: transparent;
    width: 150px;
    text-align: center;
}

.cal-date input:focus {
    outline: none;
    border-bottom-color: #c0392b;
}

/* Introduction */
.cal-intro {
    font-size: 14px;
    color: #1a2a4a;
    line-height: 2;
    margin-bottom: 20px;
}

.cal-input {
    border: none;
    border-bottom: 1px solid #1a2a4a;
    padding: 2px 8px;
    font-size: 14px;
    font-family: 'Times New Roman', Times, serif;
    background: transparent;
    min-width: 180px;
}

.cal-input:focus {
    outline: none;
    border-bottom-color: #c0392b;
}

/* Customer Section */
.cal-customer {
    margin: 5px 0;
    padding: 10px 15px;
    background: #fafbfc;
    border-left: 3px solid #1a2a4a;
}

.cal-customer-name {
    font-size: 15px;
    color: #1a2a4a;
    margin-bottom: 6px;
}

.cal-field-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 4px 0;
    padding-left: 15px;
}

.cal-label {
    font-size: 13px;
    font-weight: 600;
    color: #1a2a4a;
    min-width: 160px;
}

.cal-field-row .cal-input {
    flex: 1;
    min-width: 150px;
}

/* Witness Grid */
.cal-witness-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 20px 0;
}

.cal-witness-box {
    padding: 12px 5px;
    background: #f4f6f9;
    border: 1px solid #dce1e8;
}

.cal-witness-box p {
    font-size: 13px;
    font-weight: 600;
    color: #1a2a4a;
    margin-bottom: 8px;
}

.cal-witness-box .cal-field-row {
    padding-left: 5px;
}

.cal-witness-box .cal-label {
    min-width: 130px;
    font-size: 12px;
}

/* Notes */
.cal-notes {
    margin-top: 20px;
    padding: 15px 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.cal-notes p {
    font-size: 14px;
    font-weight: 700;
    color: #1a2a4a;
    margin-bottom: 8px;
}

.cal-notes ol {
    list-style: decimal;
    padding-left: 25px;
}

.cal-notes ol li {
    font-size: 12.5px;
    line-height: 1.7;
    color: #444;
    margin-bottom: 3px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .cal-to-date {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .cal-date input {
        width: 100%;
    }

    .cal-field-row {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 0;
        gap: 3px;
    }

    .cal-label {
        min-width: auto;
        font-size: 12px;
    }

    .cal-witness-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .cal-customer {
        padding: 10px;
    }

    .cal-input {
        width: 100%;
        min-width: auto;
    }

    .cal-section {
        padding: 15px;
    }

    .cal-witness-box .cal-label {
        min-width: auto;
    }
}

/* ===== PRINT ===== */
@media print {
    .cal-section {
        border: 2px solid #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .cal-customer {
        background: #fafbfc !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .cal-witness-box {
        background: #f4f6f9 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .cal-notes {
        background: #f8f9fa !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .cal-input {
        border-bottom: 1px solid #000 !important;
    }
}

/* ===== BUTTONS ===== */
.btn-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px double #1a2a4a;
}

.btn {
    padding: 12px 40px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Times New Roman', Times, serif;
    border-radius: 3px;
}

.btn-primary {
    background: #1a2a4a;
    color: #fff;
}

.btn-primary:hover {
    background: #0f1a30;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(26, 42, 74, 0.3);
}

.btn-danger {
    background: #c0392b;
    color: #fff;
}

.btn-danger:hover {
    background: #a93226;
    transform: translateY(-2px);
}

.btn i {
    margin-right: 8px;
}

/* ===== ALERTS ===== */
.alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 15px;
    border-left: 5px solid;
}

.alert-success {
    background: #d5f5e3;
    color: #1a7a3a;
    border-color: #27ae60;
}

.alert-danger {
    background: #fadbd8;
    color: #922b21;
    border-color: #e74c3c;
}

.alert i {
    margin-right: 10px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .pdf-container {
        padding: 20px 15px;
    }

    .form-group {
        flex-direction: column;
        align-items: stretch;
        border-bottom: none;
        margin-bottom: 12px;
    }

    .form-group label {
        min-width: auto;
        font-size: 12px;
        margin-bottom: 3px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        border: 1px solid #ccc;
        padding: 8px 10px;
        border-radius: 3px;
    }

    .signature-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .cal-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .cal-witness {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .header h1 {
        font-size: 16px;
    }

    .btn-group {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .recommendation .prep-approve {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .recommendation .sig-line {
        display: block;
        width: 100%;
        margin: 5px 0;
    }

    .cal-section .cal-intro input {
        width: 100%;
    }

    .cal-section .cal-intro input.property-input {
        width: 100%;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .btn-group {
        display: none !important;
    }

    .pdf-container {
        box-shadow: none !important;
        padding: 30px !important;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        border-bottom: 1px solid #333 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .note-box,
    .annexure .important-notice,
    .commission-section {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body {
        background: #fff;
        padding: 10px;
    }
}