/* =========================================================
   CHARGESHEET SOLUTION PAGE
   ========================================================= */

.chargesheet-page-section {
    padding-top: 36px;
    padding-bottom: 55px;
}

.chargesheet-page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: start;
}

.chargesheet-form-card,
.chargesheet-sidebar,
.chargesheet-page-grid > * {
    min-width: 0;
}

.chargesheet-page-section *,
#chargesheet_solution * {
    box-sizing: border-box;
}

/* =========================================================
   HERO
   ========================================================= */

.chargesheet-page-hero {
    padding: 54px 0;
    background: linear-gradient(
        135deg,
        #f4f8fd,
        #eef8f4
    );
}

.chargesheet-page-hero h1 {
    margin: 0 0 12px;
    color: #10243e;
    line-height: 1.2;
}

.chargesheet-page-hero p {
    max-width: 780px;
    margin: 0;
    color: #475569;
    line-height: 1.7;
}

.hero-kicker,
.section-kicker {
    display: block;
    margin-bottom: 8px;
    color: #1f6b55;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* =========================================================
   CARD
   ========================================================= */

.detail-card {
    width: 100%;
    padding: 24px;
    border: 1px solid #e3e8ef;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.chargesheet-form-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
}

.chargesheet-form-heading h2 {
    margin: 0 0 8px;
}

.mandatory-note {
    margin: 0;
    color: #64748b;
    white-space: nowrap;
}

.mandatory-note strong,
.red-req {
    color: #dc2626;
}

/* =========================================================
   FIELDSET
   ========================================================= */

#chargesheet_solution fieldset {
    min-width: 0;
    margin: 0 0 28px;
    padding: 22px;
    border: 1px solid #dce3eb;
    border-radius: 13px;
    background: #ffffff;
}

#chargesheet_solution legend {
    width: auto;
    max-width: calc(100% - 20px);
    margin: 0;
    padding: 0 10px;
    color: #123b63;
    background: #ffffff;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.4;
}

/* =========================================================
   GRID
   ========================================================= */

#chargesheet_solution .form-row,
#chargesheet_solution .row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -10px;
    margin-left: -10px;
}

#chargesheet_solution .form-row > [class*="col-"],
#chargesheet_solution .row > [class*="col-"] {
    min-width: 0;
    padding-right: 10px;
    padding-left: 10px;
}

#chargesheet_solution .form-group {
    margin-bottom: 19px;
}

#chargesheet_solution .form-group > label:not(.radio-card) {
    display: block;
    margin-bottom: 8px;
    color: #172033;
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1.45;
}

/* =========================================================
   INPUTS
   ========================================================= */

#chargesheet_solution .form-control {
    display: block;
    width: 100%;
    min-width: 0;
    height: 45px;
    margin: 0;
    padding: 10px 13px;
    border: 1px solid #cdd6e1;
    border-radius: 9px;
    outline: none;
    background: #ffffff;
    color: #172033;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.4;
    box-shadow: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

#chargesheet_solution select.form-control {
    padding-right: 38px;
    cursor: pointer;
}

#chargesheet_solution textarea.form-control {
    min-height: 105px;
    height: auto;
    resize: vertical;
}

#chargesheet_solution .form-control:focus {
    border-color: #1f6b55;
    box-shadow: 0 0 0 3px rgba(31, 107, 85, 0.12);
}

#chargesheet_solution .form-control:disabled {
    cursor: not-allowed;
    background: #f1f5f9;
    color: #64748b;
}

#chargesheet_solution input[type="date"] {
    min-height: 45px;
}

/* =========================================================
   RADIO GROUPS
   ========================================================= */

#chargesheet_solution .radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

#chargesheet_solution .radio-group label,
#chargesheet_solution .role-options label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    margin: 0 !important;
    padding: 10px 14px;
    border: 1px solid #d7dee8;
    border-radius: 9px;
    background: #ffffff;
    color: #172033;
    font-weight: 600;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

#chargesheet_solution .radio-group label:hover,
#chargesheet_solution .role-options label:hover {
    border-color: #7da99c;
    background: #f8fcfa;
}

#chargesheet_solution .radio-group label.is-selected,
#chargesheet_solution .role-options label.is-selected {
    border-color: #1f6b55;
    background: #f4fbf8;
    box-shadow: 0 0 0 3px rgba(31, 107, 85, 0.1);
}

#chargesheet_solution input[type="radio"],
#chargesheet_solution input[type="checkbox"] {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: #1f6b55;
}

/* =========================================================
   CONDITIONAL BLOCKS
   ========================================================= */

#relation_field,
#relation_details,
#other_relation_field,
#advocate_details,
#other_solution_field {
    width: 100%;
}

.is-hidden,
.hidden {
    display: none !important;
}

.conditional-panel {
    margin-top: 14px;
    padding: 18px;
    border: 1px solid #dce3eb;
    border-radius: 11px;
    background: #f8fafc;
}

/* =========================================================
   SPEECH INPUT
   ========================================================= */

#chargesheet_solution .input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
}

#chargesheet_solution .input-group .form-control {
    flex: 1 1 auto;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

#chargesheet_solution .input-group-append {
    display: flex;
}

#chargesheet_solution .input-group-append .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    min-width: 48px;
    padding: 0;
    border: 1px solid #cdd6e1;
    border-left: 0;
    border-radius: 0 9px 9px 0;
    background: #f8fafc;
    color: #145da0;
    cursor: pointer;
}

#chargesheet_solution .input-group-append .btn:hover {
    background: #eaf2f8;
}

#chargesheet_solution .input-group-append .btn.is-listening {
    background: #fee2e2;
    color: #b91c1c;
}

/* =========================================================
   FILE INPUTS
   ========================================================= */

#chargesheet_solution input[type="file"].form-control {
    min-height: 46px;
    height: auto;
    padding: 7px;
    color: #475569;
}

#chargesheet_solution input[type="file"]::file-selector-button {
    margin-right: 10px;
    padding: 8px 12px;
    border: 0;
    border-radius: 6px;
    background: #e8f2ef;
    color: #155e4b;
    font-weight: 700;
    cursor: pointer;
}

.file-help {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 0.8rem;
}

/* =========================================================
   DECLARATION
   ========================================================= */

#chargesheet_solution > .form-check,
.chargesheet-declaration {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 24px;
    padding: 14px;
    border: 1px solid #dce3eb;
    border-radius: 10px;
    background: #f8fafc;
}

#chargesheet_solution > .form-check .form-check-input,
.chargesheet-declaration input {
    flex: 0 0 auto;
    margin-top: 3px;
}

#chargesheet_solution > .form-check .form-check-label,
.chargesheet-declaration label {
    margin: 0;
    color: #334155;
    font-weight: 500;
    line-height: 1.6;
}

/* =========================================================
   OTP
   ========================================================= */

.chargesheet-otp-section {
    margin-top: 24px;
    padding: 20px;
    border: 1px solid #dce3eb;
    border-radius: 12px;
    background: #f8fafc;
}

.btn_get_otp,
.otp_resend_btn,
.verify-otp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid #145da0;
    border-radius: 8px;
    background: #ffffff;
    color: #145da0;
    font-weight: 700;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        opacity 0.2s ease;
}

.btn_get_otp {
    margin: 0 auto;
}

.btn_get_otp:hover,
.otp_resend_btn:hover {
    background: #145da0;
    color: #ffffff;
}

.btn_get_otp:disabled,
.otp_resend_btn:disabled,
.verify-otp-btn:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.verify-otp-btn {
    width: 100%;
    border-color: #1f6b55;
    background: #1f6b55;
    color: #ffffff;
}

.verify-otp-btn:hover {
    background: #155746;
}

.otp_block {
    display: block;
    width: 100%;
    margin-top: 14px;
}

.otp-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

#progress {
    grid-column: 1 / -1;
    width: 100%;
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: #dbe4ee;
}

#progress .myprogress {
    width: 0;
    height: 100% !important;
    background: #145da0 !important;
    transition: width 0.3s ease;
}

/* =========================================================
   BUTTONS
   ========================================================= */

#chargesheet_solution .btn {
    min-height: 44px;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 700;
}

#chargesheet_solution .btn.primary,
#chargesheet_solution .btn-primary {
    border: 1px solid #145da0;
    background: #145da0;
    color: #ffffff;
}

#chargesheet_solution .btn.primary:hover,
#chargesheet_solution .btn-primary:hover {
    background: #0f4f89;
}

#chargesheet_solution button.is-loading {
    cursor: wait;
    opacity: 0.72;
}

/* =========================================================
   SIDEBAR
   ========================================================= */

.chargesheet-sidebar {
    display: grid;
    gap: 18px;
    position: sticky;
    top: 90px;
}

.chargesheet-sidebar .detail-card {
    padding: 20px;
}

.chargesheet-sidebar h3 {
    margin-top: 0;
    margin-bottom: 12px;
}

.chargesheet-sidebar p,
.chargesheet-sidebar li {
    color: #475569;
    line-height: 1.65;
}

.check-list {
    margin: 0;
    padding-left: 20px;
}

.check-list li {
    margin: 8px 0;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1000px) {
    .chargesheet-page-grid {
        grid-template-columns: minmax(0, 1fr) 270px;
    }
}

@media (max-width: 900px) {
    .chargesheet-page-grid {
        grid-template-columns: 1fr;
    }

    .chargesheet-sidebar {
        position: static;
    }

    .chargesheet-form-heading {
        display: block;
    }

    .mandatory-note {
        margin-top: 10px;
        white-space: normal;
    }
}

@media (max-width: 767px) {
    .chargesheet-page-hero {
        padding: 38px 0;
    }

    .detail-card {
        padding: 18px;
        border-radius: 12px;
    }

    #chargesheet_solution fieldset {
        padding: 16px;
    }

    #chargesheet_solution .form-row,
    #chargesheet_solution .row {
        display: block;
        margin-right: 0;
        margin-left: 0;
    }

    #chargesheet_solution .form-row > [class*="col-"],
    #chargesheet_solution .row > [class*="col-"] {
        width: 100%;
        max-width: 100%;
        padding-right: 0;
        padding-left: 0;
    }

    #chargesheet_solution .radio-group {
        display: grid;
        grid-template-columns: 1fr;
    }

    #chargesheet_solution .radio-group label {
        width: 100%;
    }

    .otp-actions {
        grid-template-columns: 1fr;
    }

    .btn_get_otp,
    .otp_resend_btn,
    .verify-otp-btn {
        width: 100%;
    }
}

/* =========================================================
   PRINT
   ========================================================= */

@media print {
    .page-hero,
    .chargesheet-sidebar,
    .chargesheet-otp-section,
    header,
    footer {
        display: none !important;
    }

    .chargesheet-page-grid {
        display: block;
    }

    .detail-card {
        border: 0;
        padding: 0;
        box-shadow: none;
    }
}

/* =========================================================
   TEXTAREA + MICROPHONE FIX
   ========================================================= */

#chargesheet_solution .input-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px;
    align-items: stretch;
    width: 100%;
}

#chargesheet_solution .input-group textarea.form-control {
    grid-column: 1;
    width: 100%;
    min-height: 125px;
    margin: 0;
    border-radius: 9px 0 0 9px;
    resize: vertical;
}

#chargesheet_solution .input-group-append {
    display: flex;
    grid-column: 2;
    width: 48px;
}

#chargesheet_solution .input-group-append .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    min-width: 48px;
    height: 100%;
    min-height: 125px;
    margin: 0;
    padding: 0;
    border: 1px solid #cdd6e1;
    border-left: 0;
    border-radius: 0 9px 9px 0;
    background: #f8fafc;
    color: #145da0;
    cursor: pointer;
}

#chargesheet_solution .input-group-append .btn:hover {
    background: #eaf2f8;
}

#chargesheet_solution .input-group-append .btn.is-listening {
    background: #fee2e2;
    color: #b91c1c;
}

/* =========================================================
   DECLARATION CHECKBOX FIX
   ========================================================= */

#chargesheet_solution .chargesheet-declaration {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    margin: 0 0 24px;
    padding: 14px;
    border: 1px solid #dce3eb;
    border-radius: 10px;
    background: #f8fafc;
}

#chargesheet_solution .chargesheet-declaration input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 3px 0 0;
    padding: 0;
}

#chargesheet_solution .chargesheet-declaration label {
    display: block;
    flex: 1;
    margin: 0;
    color: #334155;
    font-weight: 500;
    line-height: 1.55;
    cursor: pointer;
}

/* Remove conflicting old Bootstrap-style spacing */

#chargesheet_solution .chargesheet-declaration .form-check-input {
    position: static;
    margin-left: 0;
}

#chargesheet_solution .chargesheet-declaration .form-check-label {
    padding-left: 0;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {
    #chargesheet_solution .input-group {
        grid-template-columns: minmax(0, 1fr) 44px;
    }

    #chargesheet_solution .input-group-append {
        width: 44px;
    }

    #chargesheet_solution .input-group-append .btn {
        width: 44px;
        min-width: 44px;
    }
}