/* Modern Professional Form Styles */

/* Form Group Styling */
.modal-body .form-group {
    margin-bottom: 1.5rem;
}

.modal-body .form-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.95rem;
}

.modal-body .form-group label i {
    margin-right: 0.5rem;
    color: #6c757d;
    width: 18px;
}

.modal-body .form-group label .text-danger {
    color: #dc3545 !important;
    font-weight: 700;
}

/* Input Styling */
.modal-body .form-control {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: #fff;
}

.modal-body .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15);
    outline: none;
}

.modal-body .form-control:hover:not(:focus) {
    border-color: #c0c0c0;
}

.modal-body .form-control::placeholder {
    color: #adb5bd;
    font-style: italic;
}

.modal-body .form-control-lg {
    padding: 1rem 1.25rem;
    font-size: 1rem;
}

/* Select2 Styling */
.modal-body .select2-container--default .select2-selection--single,
.modal-body .select2-container--bootstrap4 .select2-selection--single,
.select2-container--default .select2-selection--single,
.select2-container--bootstrap4 .select2-selection--single {
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px !important;
    height: calc(2.25rem + 4px);
    padding: 0;
    transition: all 0.3s ease;
    background-color: #fff !important;
    display: flex;
    align-items: center;
}

.modal-body .select2-container--default .select2-selection--single:focus,
.modal-body .select2-container--default.select2-container--focus .select2-selection--single,
.modal-body .select2-container--bootstrap4 .select2-selection--single:focus,
.modal-body .select2-container--bootstrap4.select2-container--focus .select2-selection--single,
.select2-container--default .select2-selection--single:focus,
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--bootstrap4 .select2-selection--single:focus,
.select2-container--bootstrap4.select2-container--focus .select2-selection--single {
    border-color: #007bff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15) !important;
}

.modal-body .select2-container--default .select2-selection--single:hover:not(:focus),
.modal-body .select2-container--bootstrap4 .select2-selection--single:hover:not(:focus),
.select2-container--default .select2-selection--single:hover:not(:focus),
.select2-container--bootstrap4 .select2-selection--single:hover:not(:focus) {
    border-color: #c0c0c0 !important;
}

.modal-body .select2-container--default .select2-selection--single .select2-selection__rendered,
.modal-body .select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered,
.select2-container--default .select2-selection--single .select2-selection__rendered,
.select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered {
    line-height: calc(2.25rem + 4px);
    padding-left: 0.75rem;
    padding-right: 20px;
    display: flex;
    align-items: center;
    height: 100%;
}

.modal-body .select2-container--default .select2-selection--single .select2-selection__arrow,
.modal-body .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow,
.select2-container--default .select2-selection--single .select2-selection__arrow,
.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow {
    height: calc(2.25rem + 4px);
    right: 8px;
}

/* Regular Select Inputs */
select,
select.form-control,
select.select2 {
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    background-color: #fff;
}

select:focus,
select.form-control:focus,
select.select2:focus {
    border-color: #007bff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15);
    outline: none;
}

select:hover:not(:focus) {
    border-color: #c0c0c0;
}

/* Select2 Container Border - Applied everywhere */
.modal-body .select2-container .select2-selection--single,
.select2-container--default .select2-selection--single,
.select2-container--bootstrap4 .select2-selection--single {
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px !important;
}

.modal-body .select2-container.select2-container--focus .select2-selection--single,
.modal-body .select2-container .select2-selection--single:focus,
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default .select2-selection--single:focus,
.select2-container--bootstrap4.select2-container--focus .select2-selection--single,
.select2-container--bootstrap4 .select2-selection--single:focus {
    border-color: #007bff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15) !important;
}

/* Textarea Styling */
.modal-body textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* Modal Styling */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 2px solid #e9ecef;
    padding: 1.25rem 1.5rem;
    border-radius: 12px 12px 0 0;
}

.modal-header.bg-primary {
    background: linear-gradient(135deg, #001f3f 0%, #26415c 100%) !important;
    border-bottom: none;
}

.modal-header.bg-primary .modal-title {
    font-weight: 600;
    font-size: 1.25rem;
    color: #ffffff !important;
}

.modal-header.bg-primary .close {
    color: #ffffff !important;
    opacity: 0.9;
}

.modal-header.bg-primary .close:hover {
    opacity: 1;
}

.modal-body {
    padding: 1.5rem;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.modal-footer {
    border-top: 2px solid #e9ecef;
    padding: 1rem 1.5rem;
    border-radius: 0 0 12px 12px;
}

.modal-footer.bg-light {
    background-color: #f8f9fa !important;
}

/* Button Styling */
.modal-footer .btn {
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.modal-footer .btn-primary {
    background: linear-gradient(135deg, #001f3f 0%, #26415c 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 31, 63, 0.4);
    color: #ffffff;
}

.modal-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 31, 63, 0.5);
    background: linear-gradient(135deg, #002d5c 0%, #2d4f6e 100%);
}

.modal-footer .btn-secondary {
    background-color: #6c757d;
    border: none;
}

.modal-footer .btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}

.modal-footer .btn i {
    margin-right: 0.5rem;
}

/* Row Spacing */
.modal-body .row {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

.modal-body .row > [class*="col-"] {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* Input Group Icons */
.input-group-text {
    background-color: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-right: none;
    border-radius: 8px 0 0 8px;
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 8px 8px 0;
}

/* Validation States */
.modal-body .form-control.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 3.6 .4.4.4-.4'/%3e%3cpath d='m6 8.5v-4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.modal-body .form-control.is-valid {
    border-color: #28a745;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.98-.98-.98-.98L1.3 4.77l.98.98-.98.98zm1.4-3.46L2.3 2.3l.98-.98.98.98-.98.98z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
    font-weight: 500;
}

.valid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #28a745;
    font-weight: 500;
}

/* Scrollbar for Modal Body */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Icon-only Action Buttons */
.btn-sm i {
    font-size: 14px;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    min-width: 32px;
    text-align: center;
}

.btn-sm i.fa {
    margin: 0;
}

/* Action buttons spacing */
table .btn-sm {
    margin-right: 0.25rem;
}

table .btn-sm:last-child {
    margin-right: 0;
}

/* Professional Delete Confirmation Modal */
.delete-confirm-modal {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.delete-confirm-modal .modal-header {
    background: linear-gradient(135deg, #001f3f 0%, #26415c 100%) !important;
    border-bottom: none;
    padding: 1rem 1.25rem;
}

.delete-confirm-modal .modal-body {
    padding: 2rem 1.5rem;
}

.delete-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.delete-icon-wrapper i {
    font-size: 2.5rem;
    color: #ff9800;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.delete-confirm-modal .modal-body h5 {
    color: #343a40;
    font-size: 1.25rem;
}

.delete-confirm-modal .modal-body p {
    font-size: 0.95rem;
    line-height: 1.6;
}

.delete-confirm-modal .modal-footer {
    border-top: 2px solid #e9ecef;
    padding: 1rem 1.25rem;
}

.delete-confirm-modal .btn {
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 100px;
}

.delete-confirm-modal .btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.delete-confirm-modal .btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.delete-confirm-modal .btn-secondary {
    background-color: #6c757d;
    border: none;
}

.delete-confirm-modal .btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}

.delete-confirm-modal .btn-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.delete-confirm-modal .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-body .form-group {
        margin-bottom: 1rem;
    }
}

/* Sidebar User Avatar with Initials - Enhanced Design */
.sidebar-user-avatar {
    width: 3.5rem;
    height: 3.5rem;
    min-width: 3.5rem;
    min-height: 3.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #001f3f 0%, #26415c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 15px rgba(0, 31, 63, 0.4), 
                0 0 0 1px rgba(255, 255, 255, 0.1) inset,
                0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.sidebar-user-avatar::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-user-avatar:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 31, 63, 0.5), 
                0 0 0 1px rgba(255, 255, 255, 0.2) inset,
                0 4px 8px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.sidebar-user-avatar:hover::before {
    opacity: 1;
}

.sidebar-avatar-initials {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.user-panel .image {
    display: inline-block;
    padding-left: 0.8rem;
    align-self: center;
}

.user-panel .sidebar-user-avatar {
    width: 3.5rem;
    height: 3.5rem;
    min-width: 3.5rem;
    min-height: 3.5rem;
}

/* Ensure user panel aligns properly with larger avatar */
.user-panel {
    align-items: center;
}

.user-panel .info {
    padding: 5px 5px 5px 15px;
}

