/* ============================================
   BENEFICIARIES FORMS - GLOBAL CSS
   Light Theme, Responsive Mobile & Desktop
   ============================================ */

/* ============================================
   1. BASE LAYOUT
   ============================================ */
.beneficiaries-form-wrapper {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    padding: 1.5rem 0;
}

/* ============================================
   2. PAGE HEADER
   ============================================ */
.beneficiaries-form-header {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.beneficiaries-form-header h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.beneficiaries-form-header p {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0;
}

/* ============================================
   3. FORM CARD
   ============================================ */
.beneficiaries-form-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.beneficiaries-form-card .card-body {
    padding: 1.5rem;
}

/* ============================================
   4. FORM SECTIONS
   ============================================ */
.beneficiaries-form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.beneficiaries-form-section:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.beneficiaries-form-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
}

.beneficiaries-form-section-title i {
    margin-right: 0.625rem;
    color: #007bff;
    font-size: 1rem;
}

/* ============================================
   5. FORM GROUPS & LABELS
   ============================================ */
.beneficiaries-form-group {
    margin-bottom: 1.25rem;
}

.beneficiaries-form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
    display: block;
}

.beneficiaries-form-label .text-danger {
    color: #dc3545;
}

/* ============================================
   6. FORM CONTROLS
   ============================================ */
.beneficiaries-form-control,
.beneficiaries-form-wrapper .form-control,
.beneficiaries-form-wrapper .form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    min-height: 44px;
    width: 100%;
    background-color: #fff;
    color: #2c3e50;
    font-weight: 500;
}

.beneficiaries-form-control:focus,
.beneficiaries-form-wrapper .form-control:focus,
.beneficiaries-form-wrapper .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.15);
    background-color: #fff;
    outline: none;
}

.beneficiaries-form-control::placeholder,
.beneficiaries-form-wrapper .form-control::placeholder {
    color: #6c757d;
    opacity: 0.7;
    font-style: italic;
    font-size: 0.875rem;
    font-weight: 400;
}

textarea.beneficiaries-form-control,
.beneficiaries-form-wrapper textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* ============================================
   7. FORM TEXT / HELPER
   ============================================ */
.beneficiaries-form-text,
.beneficiaries-form-wrapper .form-text {
    font-size: 0.8125rem;
    color: #6c757d;
    margin-top: 0.375rem;
    display: block;
}

/* ============================================
   8. FORM CHECK (CHECKBOXES)
   ============================================ */
.beneficiaries-form-check {
    padding-left: 1.75rem;
    margin-bottom: 0.75rem;
}

.beneficiaries-form-check-input {
    width: 1.125rem;
    height: 1.125rem;
    margin-left: -1.75rem;
    margin-top: 0.125rem;
    border: 2px solid #e9ecef;
    border-radius: 0.25rem;
    background-color: #fff;
    transition: all 0.3s ease;
}

.beneficiaries-form-check-input:checked {
    background-color: #007bff;
    border-color: #007bff;
}

.beneficiaries-form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.15);
}

.beneficiaries-form-check-label {
    font-weight: 500;
    color: #2c3e50;
    cursor: pointer;
    margin-left: 0.375rem;
    font-size: 0.9375rem;
}

/* ============================================
   9. INPUT GROUPS
   ============================================ */
.beneficiaries-input-group {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
    margin-bottom: 0.75rem;
}

.beneficiaries-input-group .form-control {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    margin-bottom: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.beneficiaries-input-group-append {
    display: flex;
}

.beneficiaries-input-group-append .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: 0;
    min-height: 44px;
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
}

.beneficiaries-input-group .form-control:focus {
    z-index: 3;
}

/* ============================================
   10. BUTTONS
   ============================================ */
.beneficiaries-form-btn,
.beneficiaries-form-wrapper .btn {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.9375rem;
    min-height: 44px;
}

.beneficiaries-form-wrapper .btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
    color: white;
}

.beneficiaries-form-wrapper .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.beneficiaries-form-wrapper .btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    color: white;
}

.beneficiaries-form-wrapper .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.beneficiaries-form-wrapper .btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.beneficiaries-form-wrapper .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

.beneficiaries-form-wrapper .btn-outline-secondary {
    border: 2px solid #6c757d;
    color: #6c757d;
    background: white;
}

.beneficiaries-form-wrapper .btn-outline-secondary:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-2px);
}

.beneficiaries-form-wrapper .btn-outline-primary {
    border: 2px solid #007bff;
    color: #007bff;
    background: white;
}

.beneficiaries-form-wrapper .btn-outline-primary:hover {
    background: #007bff;
    color: white;
    transform: translateY(-2px);
}

/* ============================================
   11. ACTION BUTTONS
   ============================================ */
.beneficiaries-action-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0 0 0;
    border-top: 2px solid #e9ecef;
    margin-top: 2rem;
    gap: 0.75rem;
}

.beneficiaries-action-buttons .btn {
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.9375rem;
    min-height: 44px;
    min-width: 120px;
}

.beneficiaries-action-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.beneficiaries-action-buttons .d-flex {
    gap: 0.75rem;
}

/* ============================================
   12. SELECTED CARD (Penduduk/Beneficiary)
   ============================================ */
.beneficiaries-selected-card {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: 2px solid #e1f5fe;
    border-radius: 8px;
    margin-top: 0.75rem;
}

.beneficiaries-selected-card .card-body {
    padding: 1.25rem;
    background: transparent;
}

.beneficiaries-selected-card .card-title {
    color: #1976d2;
    font-weight: 600;
    margin-bottom: 0.875rem;
    font-size: 1rem;
}

.beneficiaries-selected-card h6 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 0.375rem;
    font-size: 0.9375rem;
}

.beneficiaries-selected-card p {
    color: #6c757d;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

/* ============================================
   13. BADGES
   ============================================ */
.beneficiaries-form-wrapper .badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.beneficiaries-form-wrapper .badge-info {
    background: linear-gradient(135deg, #17a2b8 0%, #007bff 100%);
    color: white;
}

.beneficiaries-form-wrapper .badge-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

/* ============================================
   14. RESPONSIVE - MOBILE (< 576px)
   ============================================ */
@media (max-width: 575.98px) {
    .beneficiaries-form-wrapper {
        padding: 0.75rem 0;
    }
    
    .beneficiaries-form-header {
        padding: 1rem;
        margin-bottom: 1rem;
        border-radius: 8px;
    }
    
    .beneficiaries-form-header h4 {
        font-size: 1.125rem;
    }
    
    .beneficiaries-form-header p {
        font-size: 0.8125rem;
    }
    
    .beneficiaries-form-card .card-body {
        padding: 1rem;
    }
    
    .beneficiaries-form-section {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }
    
    .beneficiaries-form-section-title {
        font-size: 1rem;
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
    }
    
    .beneficiaries-form-section-title i {
        font-size: 0.875rem;
        margin-right: 0.5rem;
    }
    
    .beneficiaries-form-group {
        margin-bottom: 1rem;
    }
    
    .beneficiaries-form-label {
        font-size: 0.875rem;
        margin-bottom: 0.375rem;
    }
    
    .beneficiaries-form-control,
    .beneficiaries-form-wrapper .form-control,
    .beneficiaries-form-wrapper .form-select {
        font-size: 0.875rem;
        padding: 0.625rem 0.875rem;
        min-height: 40px;
    }
    
    .beneficiaries-form-wrapper .btn {
        font-size: 0.875rem;
        padding: 0.625rem 1.25rem;
        min-height: 40px;
    }
    
    .beneficiaries-action-buttons {
        flex-direction: column;
        gap: 0.625rem;
        align-items: stretch;
        padding: 1.25rem 0 0 0;
        margin-top: 1.5rem;
    }
    
    .beneficiaries-action-buttons .btn {
        width: 100%;
        min-width: auto;
    }
    
    .beneficiaries-action-buttons .d-flex {
        flex-direction: column;
        gap: 0.625rem;
        width: 100%;
    }
    
    .beneficiaries-action-buttons .d-flex .btn {
        width: 100%;
    }
    
    .beneficiaries-input-group {
        flex-direction: column;
    }
    
    .beneficiaries-input-group .form-control {
        border-radius: 8px;
        margin-bottom: 0.5rem;
    }
    
    .beneficiaries-input-group-append {
        margin-top: 0;
    }
    
    .beneficiaries-input-group-append .btn {
        border-radius: 8px;
        border-left: 2px solid #007bff;
        width: 100%;
    }
    
    textarea.beneficiaries-form-control,
    .beneficiaries-form-wrapper textarea.form-control {
        min-height: 80px;
    }
    
    .beneficiaries-selected-card .card-body {
        padding: 1rem;
    }
    
    .beneficiaries-selected-card .card-title {
        font-size: 0.9375rem;
        margin-bottom: 0.75rem;
    }
    
    .beneficiaries-selected-card h6 {
        font-size: 0.875rem;
    }
    
    .beneficiaries-selected-card p {
        font-size: 0.8125rem;
    }
}

/* ============================================
   15. RESPONSIVE - TABLET (576px - 767px)
   ============================================ */
@media (min-width: 576px) and (max-width: 767.98px) {
    .beneficiaries-form-wrapper {
        padding: 1rem 0;
    }
    
    .beneficiaries-form-header {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
    }
    
    .beneficiaries-form-card .card-body {
        padding: 1.25rem;
    }
    
    .beneficiaries-action-buttons {
        flex-wrap: wrap;
    }
    
    .beneficiaries-action-buttons .btn {
        flex: 1;
        min-width: 140px;
    }
}

/* ============================================
   16. RESPONSIVE - DESKTOP (≥ 768px)
   ============================================ */
@media (min-width: 768px) {
    .beneficiaries-form-wrapper {
        padding: 2rem 0;
    }
    
    .beneficiaries-form-header {
        padding: 1.75rem 2rem;
        margin-bottom: 1.75rem;
    }
    
    .beneficiaries-form-card .card-body {
        padding: 2rem;
    }
    
    .beneficiaries-form-section {
        margin-bottom: 2.5rem;
    }
}

/* ============================================
   17. LARGE DESKTOP (≥ 1200px)
   ============================================ */
@media (min-width: 1200px) {
    .beneficiaries-form-card .card-body {
        padding: 2.5rem;
    }
}

/* ============================================
   18. UTILITIES
   ============================================ */
.beneficiaries-form-wrapper .text-danger {
    color: #dc3545 !important;
}

.beneficiaries-form-wrapper .text-success {
    color: #28a745 !important;
}

.beneficiaries-form-wrapper .text-warning {
    color: #ffc107 !important;
}

.beneficiaries-form-wrapper .text-info {
    color: #17a2b8 !important;
}

.beneficiaries-form-wrapper .text-muted {
    color: #6c757d !important;
}

