/* custom css */

/* Button */

.btn-mini {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.75rem !important;
}

/* Dashboard Stat Cards */
.stat-card {
    transition: all 0.3s ease;
    border-top: 4px solid transparent;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12) !important;
}

.stat-card .avatar-lg {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-card .avatar-initial {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

/* Chart Cards */
.chart-card {
    transition: all 0.3s ease;
}

.chart-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12) !important;
}

.chart-card .card-header {
    border-bottom: 1px solid #f0f0f0;
}

.chart-card .card-header h5 {
    color: #333;
    font-size: 1.1rem;
}

/* Table Enhancement */
.table-sm thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    color: #495057;
    font-size: 0.875rem;
}

.table-sm tbody tr {
    transition: background-color 0.2s ease;
}

.table-sm tbody tr:hover {
    background-color: #f5f5f5;
}

.table-sm tbody td {
    vertical-align: middle;
    font-size: 0.9rem;
}

/* Image preview */
.image-preview {
    max-width: 100%;
    max-height: 200px;
}

.image-preview-div {
    display: flex;
    justify-content: center;
    align-items: center;
}

.apt-space {
    padding: 3rem 0rem;
}

.apt-image {
    max-width: 170px;
    max-height: 170px;
    margin-bottom: 20px;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-align-vertical {
    padding-top: 5px;
}

.w-23 {
    width: 15%;
}

.text-justify {
    text-align: justify !important;
}

/* Responsive Dashboard */
@media (max-width: 1200px) {
    .stat-card {
        margin-bottom: 10px;
    }
}

@media (max-width: 767px) {

    .apt-space {
        padding: 0rem 0rem;
    }

    .apt-image {
        max-width: 120px;
        max-height: 120px;
    }

    .apt-text{
        font-size: 1.2rem;
        text-align: left!important;
        padding-top: 2.5rem;
    }

}

/* DTS */

.tbl-padding-1 td, th{
    padding: 1px!important;
}

.tbl-padding-2 td, th{
    padding: 2px!important;
}

.tbl-padding-3 td, th{
    padding: 3px!important;
}

.tbl-padding-4 td, th{
    padding: 4px!important;
}

.tbl-padding-5 td, th{
    padding: 5px!important;
}

.fixed-group {
    position: fixed;
    top: 50px;
    width: 100%;
    z-index: 1030;
}

.search-result {
    border: 1px solid #ccc;
    max-height: 150px;
    overflow-y: auto;
    display: none;
    position: absolute;
    width: 100%;
    background-color: #fff;
    z-index: 1000;
}
.search-result div {
    padding: 10px;
    cursor: pointer;
}
.search-result div:hover {
    background-color: #f1f1f1;
}

.img-signature{
    height: 75px;
    width: 200px;
}

#searchResults {
    max-height: 200px;
    overflow-y: auto;
    position: absolute;
    z-index: 1000;
}
.dropdown-item {
    cursor: pointer;
}
.dropdown-item:hover {
    background-color: #f8f9fa;
}

/* Mobile Responsive Enhancements */
@media (max-width: 576px) {
    .img-signature {
        height: 60px;
        width: 150px;
    }

    .card-header {
        padding: 0.75rem 0.5rem !important;
    }

    .btn-sm {
        padding: 0.35rem 0.5rem !important;
        font-size: 0.8rem !important;
    }

    .table-sm th,
    .table-sm td {
        padding: 0.4rem !important;
        font-size: 0.85rem !important;
    }

    .form-label {
        font-size: 0.9rem !important;
        margin-bottom: 0.3rem !important;
    }

    .form-control,
    .form-select {
        font-size: 0.95rem !important;
        padding: 0.4rem 0.6rem !important;
    }

    h4, h5, h6 {
        font-size: 1rem !important;
    }

    .d-flex {
        flex-direction: column !important;
    }

    .gap-2 {
        gap: 0.5rem !important;
    }

    .btn-lg {
        padding: 0.5rem 1rem !important;
        font-size: 0.95rem !important;
    }

    .alert {
        padding: 0.6rem !important;
    }

    .p-3 {
        padding: 1rem !important;
    }

    .m-3 {
        margin: 0.75rem !important;
    }
}

@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.9rem;
    }

    .text-nowrap {
        white-space: normal !important;
    }

    .d-flex.justify-content-lg-center {
        justify-content: center !important;
    }
}

/* Form Enhancements */
.form-control:focus,
.form-select:focus {
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25) !important;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

.bg-gradient {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%) !important;
}

.border-3 {
    border-width: 3px !important;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05) !important;
}

/* Document Cards Styling */
.documents-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.document-item {
    background: white;
    border: 2px solid #e8eef5;
    transition: all 0.3s ease;
}

.document-item:hover {
    border-color: #0d6efd;
    box-shadow: 0 0.5rem 1rem rgba(13, 110, 253, 0.15) !important;
}

.document-item .form-label {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.document-item .form-control,
.document-item .form-select {
    font-size: 0.95rem;
    border-radius: 0.4rem;
}

.document-item .badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

.document-item .btn {
    border-radius: 0.4rem;
}

/* Badge styling */
.badge {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    border-radius: 0.35rem;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Responsive document cards */
@media (max-width: 576px) {
    .document-item {
        padding: 1.5rem !important;
    }

    .document-item .row {
        row-gap: 1rem !important;
    }

    .document-item .form-control,
    .document-item .form-select {
        font-size: 0.9rem !important;
    }

    .document-item .btn-sm {
        padding: 0.3rem 0.6rem !important;
        font-size: 0.75rem !important;
    }
}

/* Search Results Dropdown */
.search-result-dropdown {
    max-height: 300px;
    overflow-y: auto;
    position: absolute;
    z-index: 1000;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.4rem;
    width: 100%;
    display: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.search-result-dropdown.show {
    display: block;
}

.result-item {
    padding: 0.8rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item:hover {
    background-color: #f8f9fa;
}
