/* Custom Renue Gradient Colors */
:root {
    --renue-blue: #3083DE;
    --renue-green: #63D471;
}

/* Gradient Background */
.bg-gradient-renue {
    background: linear-gradient(135deg, #3083DE 0%, #63D471 100%);
}

.bg-gradient-renue-horizontal {
    background: linear-gradient(90deg, #3083DE 0%, #63D471 100%);
}

.bg-gradient-renue-vertical {
    background: linear-gradient(180deg, #3083DE 0%, #63D471 100%);
}

/* Button Gradient */
.btn-gradient-renue {
    background: linear-gradient(90deg, #3083DE 0%, #63D471 100%);
    border: none;
    color: white;
    transition: all 0.3s ease;
}

.btn-gradient-renue:hover {
    background: linear-gradient(90deg, #2569b8 0%, #4fb85d 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(48, 131, 222, 0.4);
    color: white;
}

/* Card Header Gradient */
.card-header-gradient-renue {
    background: linear-gradient(90deg, #3083DE 0%, #63D471 100%);
}

/* Text Gradient */
.text-gradient-renue {
    background: linear-gradient(90deg, #3083DE 0%, #63D471 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Active Nav Link */
.nav-link.active-renue {
    background: linear-gradient(90deg, #3083DE 0%, #63D471 100%);
    color: white !important;
}

/* Icon Background */
.icon-gradient-renue {
    background: linear-gradient(135deg, #3083DE 0%, #63D471 100%);
}

/* Mask/Overlay Gradient */
.mask-gradient-renue {
    background: linear-gradient(135deg, rgba(48, 131, 222, 0.8) 0%, rgba(99, 212, 113, 0.8) 100%);
}

/* Form Styling */
.form-control, .form-select {
    border: 1px solid #d2d6da !important;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    background-color: #fff;
}

.form-control:focus, .form-select:focus {
    border-color: #3083DE !important;
    box-shadow: 0 0 0 0.2rem rgba(48, 131, 222, 0.25);
    outline: 0;
}

.form-control.is-invalid, .form-select.is-invalid {
    border-color: #ea0606 !important;
}

.form-control.is-valid, .form-select.is-valid {
    border-color: #63D471 !important;
}

.form-label {
    font-weight: 600;
    color: #344767;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.input-group {
    margin-bottom: 1rem;
}

.input-group-outline {
    position: relative;
}

.input-group-outline .form-control {
    border: 1px solid #d2d6da !important;
    background-color: transparent;
}

.input-group-outline .form-control:focus {
    border-color: #3083DE !important;
    border-width: 2px;
}

.input-group-outline .form-control.is-invalid {
    border-color: #ea0606 !important;
}

.input-group-outline .form-select {
    border: 1px solid #d2d6da !important;
    background-color: #fff;
}

.input-group-outline .form-select:focus {
    border-color: #3083DE !important;
    border-width: 2px;
}

/* Fix select dropdown display - remove double arrow */
.form-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 16px 12px !important;
    padding-right: 2.5rem !important;
    height: auto !important;
    min-height: 42px !important;
    border: 1px solid #d2d6da !important;
    border-radius: 0.5rem !important;
    padding: 0.625rem 2.5rem 0.625rem 1rem !important;
    line-height: 1.5 !important;
    overflow: visible !important;
    text-overflow: ellipsis !important;
}

/* Form Filter Section */
.card-body .row.g-2 {
    margin: 0;
    align-items: end;
}

.card-body .row.g-2 > [class*="col-"] {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin-bottom: 0;
}

.card-body .row.g-2 .input-group {
    margin-bottom: 0;
    width: 100%;
}

.card-body .row.g-2 .btn {
    margin-bottom: 0;
    height: auto !important;
    min-height: 42px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1rem !important;
    line-height: 1.5 !important;
}

.card-body .row.g-2 .form-control {
    height: auto !important;
    min-height: 42px !important;
    margin-bottom: 0;
    padding: 0.625rem 1rem !important;
    line-height: 1.5 !important;
}

.card-body .row.g-2 .form-select {
    height: auto !important;
    min-height: 42px !important;
    margin-bottom: 0;
    padding: 0.625rem 2.5rem 0.625rem 1rem !important;
    border: 1px solid #d2d6da !important;
    border-radius: 0.5rem !important;
    background-color: #fff !important;
    line-height: 1.5 !important;
    overflow: visible !important;
    white-space: nowrap !important;
}

/* Responsive Form */
@media (max-width: 768px) {
    .form-control, .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    .card-body .row.g-2 > [class*="col-"] {
        margin-bottom: 0.5rem;
    }
    
    .row .col-md-6,
    .row .col-md-3,
    .row .col-md-4,
    .row .col-md-5 {
        margin-bottom: 1rem;
    }
}

@media (min-width: 992px) {
    .card-body .row.g-2 > [class*="col-lg-"] {
        margin-bottom: 0;
    }
    
    .card-body .row.g-2 {
        align-items: center;
    }
}

/* Ensure card body has proper bottom padding */
.card-body {
    padding-bottom: 1rem !important;
    min-height: auto;
}

.card-body.px-0 {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Pagination section styling */
.card-body .px-3.pt-4.pb-4 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
    min-height: 60px;
}

.card-body .px-3.pt-4.pb-4 p {
    margin-bottom: 0.5rem !important;
    line-height: 1.8 !important;
}

/* Custom Renue Pagination Styling */
.pagination-renue {
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
}

.pagination-renue .page-item {
    margin: 0;
    display: flex;
    align-items: center;
}

.pagination-renue .page-link {
    border: 1px solid #d2d6da;
    border-radius: 0.5rem;
    color: #344767;
    background-color: #fff;
    padding: 0.5rem;
    min-width: 42px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    line-height: 1.5;
    white-space: nowrap;
}

.pagination-renue .page-link:hover:not(.disabled) {
    color: #3083DE;
    background-color: #f8f9fa;
    border-color: #3083DE;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(48, 131, 222, 0.2);
}

.pagination-renue .page-item.active .page-link {
    background: linear-gradient(90deg, #3083DE 0%, #63D471 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 12px rgba(48, 131, 222, 0.3);
    font-weight: 600;
}

.pagination-renue .page-item.active .page-link:hover {
    background: linear-gradient(90deg, #2569b8 0%, #4fb85d 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(48, 131, 222, 0.4);
}

.pagination-renue .page-item.disabled {
    opacity: 0.5;
}

.pagination-renue .page-item.disabled .page-link {
    color: #adb5bd !important;
    background-color: #fff !important;
    border-color: #e9ecef !important;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-renue .page-item.disabled .page-link:hover {
    transform: none !important;
    box-shadow: none !important;
    background-color: #fff !important;
    border-color: #e9ecef !important;
    color: #adb5bd !important;
}

.pagination-renue .page-link i {
    font-size: 18px;
    line-height: 1;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    margin: 0 0.125rem;
}

.pagination-renue .page-link > span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.pagination-renue .page-link {
    gap: 0.25rem;
}

/* Add extra margin to card for better spacing */
.card {
    margin-bottom: 2rem;
}

/* Ensure table has proper spacing */
.table-responsive {
    margin-bottom: 1rem;
}

/* Ensure consistent button heights */
.btn-sm {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Dashboard KPI Cards Styling */
.card .card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.card .card-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background-color: transparent;
}

.icon-lg {
    width: 64px;
    height: 64px;
}

.icon-md {
    width: 48px;
    height: 48px;
}

/* Dashboard responsive improvements */
@media (max-width: 768px) {
    .card-header .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .card-header .icon {
        margin-top: 0.5rem;
        align-self: flex-end;
    }
}

/* Button spacing */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-1 {
    gap: 0.25rem;
}

/* Responsive button text */
@media (max-width: 576px) {
    .btn-sm {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .btn-sm .material-symbols-rounded {
        font-size: 14px !important;
    }
}

/* Dropdown Menu Styling */
.dropdown-menu {
    border: none;
    box-shadow: 0 8px 26px -4px rgba(20, 27, 201, 0.15), 0 8px 9px -5px rgba(20, 27, 201, 0.06);
    border-radius: 0.75rem;
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
    border-radius: 0.5rem;
    margin: 0.25rem 0.5rem;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #3083DE;
}

.dropdown-item .icon {
    width: 32px;
    height: 32px;
    border-radius: 0.5rem;
    background-color: #f8f9fa;
}

.dropdown-item:hover .icon {
    background-color: rgba(48, 131, 222, 0.1);
}

.dropdown-item:hover .icon i {
    color: #3083DE !important;
}

/* Error messages */
.text-danger.text-xs {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}

.text-muted.text-xs {
    font-size: 0.75rem;
    color: #6c757d;
}

/* Alert Styling */
.alert {
    border: none;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.alert-success {
    background: linear-gradient(90deg, #63D471 0%, #4fb85d 100%);
    color: #fff;
}

.alert-danger {
    background: linear-gradient(90deg, #f5365c 0%, #e91e63 100%);
    color: #fff;
}

.alert-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.alert-text {
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.5;
}

.alert-close-btn {
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
    opacity: 0.9;
}

.alert-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    opacity: 1;
    transform: scale(1.1);
}

.alert-close-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.alert-close-btn i {
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert ul {
    margin-bottom: 0;
}

.alert ul li {
    margin-bottom: 0.25rem;
}

.alert ul li:last-child {
    margin-bottom: 0;
}

