/* =========================================== */
/* === CABANG RQ UPLOAD FORM STYLES === */
/* =========================================== */

/* Upload Cabang Modal Styles */
#upload-cabang-modal .modal-content {
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
}

#upload-cabang-modal .modal-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

#upload-cabang-modal .modal-header h2 {
    color: #4CAF50;
    font-size: 1.8rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#upload-cabang-modal .modal-header h2 i {
    font-size: 1.6rem;
}

#upload-cabang-modal .modal-header p {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
}

/* Edit Cabang Modal Styles */
#edit-cabang-modal .modal-content {
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
}

#edit-cabang-modal .modal-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

#edit-cabang-modal .modal-header h2 {
    color: #2196F3;
    font-size: 1.8rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#edit-cabang-modal .modal-header h2 i {
    font-size: 1.6rem;
}

#edit-cabang-modal .modal-header p {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
}

/* Form Groups - Upload Modal */
#upload-cabang-modal .form-group {
    margin-bottom: 20px;
}

#upload-cabang-modal .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

#upload-cabang-modal .form-group label i {
    color: #4CAF50;
    margin-right: 5px;
    width: 20px;
    text-align: center;
}

/* Form Inputs - Upload Modal */
#upload-cabang-modal .form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

#upload-cabang-modal .form-input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

#upload-cabang-modal textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

#upload-cabang-modal select.form-input {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
    appearance: none;
}

#upload-cabang-modal small {
    color: #666;
    font-size: 0.85rem;
    display: block;
    margin-top: 5px;
}

/* Upload Modal Alert */
#upload-cabang-alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    display: none;
}

#upload-cabang-alert.success {
    background: #e8f5e9;
    color: #4CAF50;
    border-left: 4px solid #4caf50;
    display: block;
}

#upload-cabang-alert.error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
    display: block;
}

/* Info Box - Upload Modal */
#upload-cabang-modal .info-box {
    background: #e8f5e9;
    border-left: 4px solid #4CAF50;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

#upload-cabang-modal .info-box p {
    margin: 0;
    color: #4CAF50;
    font-size: 0.9rem;
}

#upload-cabang-modal .info-box i {
    margin-right: 8px;
    color: #4CAF50;
}

/* Form Actions - Upload Modal */
#upload-cabang-modal .form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

#upload-cabang-modal .btn-submit {
    flex: 1;
    padding: 14px 24px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#upload-cabang-modal .btn-submit:hover {
    background: #4CAF50;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

#upload-cabang-modal .btn-submit:active {
    transform: translateY(0);
}

#upload-cabang-modal .btn-cancel {
    flex: 1;
    padding: 14px 24px;
    background: #f5f5f5;
    color: #666;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#upload-cabang-modal .btn-cancel:hover {
    background: #eeeeee;
    border-color: #bdbdbd;
}

/* Kegiatan Items - Upload Modal */
#upload-cabang-modal .kegiatan-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

#upload-cabang-modal .kegiatan-item input {
    flex: 1;
}

#upload-cabang-modal .btn-remove-kegiatan {
    width: 40px;
    height: 40px;
    background: #ffebee;
    color: #f44336;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#upload-cabang-modal .btn-remove-kegiatan:hover {
    background: #f44336;
    color: white;
}

#upload-cabang-modal .btn-secondary {
    padding: 10px 20px;
    background: white;
    color: #4CAF50;
    border: 2px dashed #4CAF50;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

#upload-cabang-modal .btn-secondary:hover {
    background: #e8f5e9;
    border-style: solid;
}

/* Preview Images - Upload Modal */
#preview-foto {
    margin-top: 15px;
    display: none;
}

#preview-foto img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    border: 2px solid #4CAF50;
    object-fit: cover;
}

#preview-foto.show {
    display: block;
}

/* Form Groups - Edit Modal */
#edit-cabang-modal .form-group {
    margin-bottom: 20px;
}

#edit-cabang-modal .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

#edit-cabang-modal .form-group label i {
    color: #2196F3;
    margin-right: 5px;
    width: 20px;
    text-align: center;
}

/* Form Inputs - Edit Modal */
#edit-cabang-modal .form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

#edit-cabang-modal .form-input:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

#edit-cabang-modal textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

#edit-cabang-modal select.form-input {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
    appearance: none;
}

#edit-cabang-modal small {
    color: #666;
    font-size: 0.85rem;
    display: block;
    margin-top: 5px;
}

/* Edit Modal Alert */
#edit-cabang-alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    display: none;
}

#edit-cabang-alert.success {
    background: #e8f5e9;
    color: #4CAF50;
    border-left: 4px solid #4caf50;
    display: block;
}

#edit-cabang-alert.error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
    display: block;
}

/* Info Box - Edit Modal */
#edit-cabang-modal .info-box {
    background: #e3f2fd;
    border-left: 4px solid #2196F3;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

#edit-cabang-modal .info-box p {
    margin: 0;
    color: #1565c0;
    font-size: 0.9rem;
}

#edit-cabang-modal .info-box i {
    margin-right: 8px;
    color: #2196F3;
}

/* Form Actions - Edit Modal */
#edit-cabang-modal .form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

#edit-cabang-modal .btn-submit {
    flex: 1;
    padding: 14px 24px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#edit-cabang-modal .btn-submit:hover {
    background: #2196F3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

#edit-cabang-modal .btn-submit:active {
    transform: translateY(0);
}

#edit-cabang-modal .btn-cancel {
    flex: 1;
    padding: 14px 24px;
    background: #f5f5f5;
    color: #666;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#edit-cabang-modal .btn-cancel:hover {
    background: #eeeeee;
    border-color: #bdbdbd;
}

/* Kegiatan Items - Edit Modal */
#edit-cabang-modal .kegiatan-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

#edit-cabang-modal .kegiatan-item input {
    flex: 1;
}

#edit-cabang-modal .btn-remove-kegiatan {
    width: 40px;
    height: 40px;
    background: #ffebee;
    color: #f44336;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#edit-cabang-modal .btn-remove-kegiatan:hover {
    background: #f44336;
    color: white;
}

#edit-cabang-modal .btn-secondary {
    padding: 10px 20px;
    background: white;
    color: #2196F3;
    border: 2px dashed #2196F3;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

#edit-cabang-modal .btn-secondary:hover {
    background: #e3f2fd;
    border-style: solid;
}

/* Preview Images - Edit Modal */
#edit-preview-foto {
    margin-top: 15px;
    display: none;
}

#edit-preview-foto img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    border: 2px solid #2196F3;
    object-fit: cover;
}

#edit-preview-foto.show {
    display: block;
}



/* Form Inputs */
#upload-cabang-modal .form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: inherit;
    box-sizing: border-box;
}

#upload-cabang-modal .form-input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

#upload-cabang-modal textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

#upload-cabang-modal input[type="file"].form-input {
    padding: 10px;
    cursor: pointer;
    border-style: dashed;
}

/* Image Preview */
#preview-foto {
    margin-top: 15px;
    text-align: center;
    display: none;
}

#preview-foto-img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 12px;
    border: 3px solid #4CAF50;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    display: inline-block;
}

/* Kegiatan Dynamic Fields */
.kegiatan-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    animation: slideInLeft 0.3s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.kegiatan-item input {
    flex: 1;
}

.btn-remove-kegiatan {
    background: #f44336;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
}

.btn-remove-kegiatan:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

/* Secondary Button (Add Kegiatan) */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

/* Info Box */
.info-box {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 4px solid #2196F3;
}

.info-box p {
    margin: 0;
    color: #1565C0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.info-box i {
    color: #2196F3;
    margin-right: 8px;
    font-size: 1.1rem;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.btn-submit {
    flex: 1;
    padding: 14px 28px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-cancel {
    padding: 14px 28px;
    background: #f5f5f5;
    color: #333;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-cancel:hover {
    background: #e8e8e8;
    transform: translateY(-2px);
}

/* Small Text */
small {
    font-size: 0.85rem;
    color: #666;
    display: block;
    margin-top: 5px;
}

/* Modal Alert */
.modal-alert {
    padding: 14px 18px;
    margin-bottom: 20px;
    border-radius: 10px;
    display: none;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    animation: slideDown 0.4s ease;
    font-weight: 500;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-alert.success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.modal-alert.error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.modal-alert i {
    font-size: 1.2rem;
}

/* Scrollbar Styling for Modal */
#upload-cabang-modal .modal-content::-webkit-scrollbar {
    width: 8px;
}

#upload-cabang-modal .modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#upload-cabang-modal .modal-content::-webkit-scrollbar-thumb {
    background: #4CAF50;
    border-radius: 10px;
}

#upload-cabang-modal .modal-content::-webkit-scrollbar-thumb:hover {
    background: #45a049;
}

/* Responsive Design */
@media (max-width: 768px) {
    #upload-cabang-modal .modal-content {
        max-width: 95%;
        padding: 20px;
    }
    
    #upload-cabang-modal .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-submit, .btn-cancel {
        width: 100%;
    }
    
    .kegiatan-item {
        flex-direction: column;
    }
    
    .btn-remove-kegiatan {
        width: 100%;
    }
}

/* =========================================== */
/* === CARD ACTION BUTTONS (EDIT/DELETE) === */
/* =========================================== */

.card-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #f0f0f0;
}

.btn-edit-card,
.btn-delete-card {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-edit-card {
    background: #2196F3;
    color: white;
}

.btn-edit-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.btn-delete-card {
    background: #f44336;
    color: white;
}

.btn-delete-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

.btn-edit-card i,
.btn-delete-card i {
    font-size: 1rem;
}

/* Animation for card deletion */
.branch-card {
    transition: all 0.5s ease;
}

.branch-card.deleting {
    opacity: 0;
    transform: scale(0.8);
}








