/* ===== LOGAN STATISTICS PAGE STYLES ===== */

/* Content Area */
.pagedb-content {
    padding: 10px;
}

/* Statistics Filter Form */
.statistics-filter {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.form-group.field-statisticform-fromdate {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.control-label {
    font-weight: 600;
    color: #495057;
    font-size: 1rem;
    white-space: nowrap;
}

.form-control.hasDatepicker {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    min-width: 160px;
}

.form-control.hasDatepicker:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
}

.btn-filter.btn.btn-danger {
    background: linear-gradient(45deg, #dc3545, #c82333);
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.btn-filter.btn.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
    background: linear-gradient(45deg, #c82333, #a71e2a);
}

/* Statistics Summary */
.statistics-summary {
    margin-bottom: 20px;
}

.statistics-summary h2.bg_red.pad10-5 {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    padding: 10px;
    margin: 0;
    border-radius: 10px;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
}

/* Filter Numbers Section */
.filter-numbers-section {
    background: linear-gradient(135deg, #f1f3f4, #e8eaf6);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 25px;
    border: 1px solid #e1e5e9;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.textarea.mb-2.mt-2 {
    width: 100%;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    resize: vertical;
    transition: all 0.3s ease;
    background: white;
    height: 108px;
}

.textarea.mb-2.mt-2:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
}

.form-select.mb-2 {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-select.mb-2:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
}

/* Statistics Table */
.statistics-table-wrapper {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.statistics-table {
    width: 100%;
    border-collapse: collapse;
}

.statistics-table thead {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
}

.statistics-table thead th {
    padding: 6px;
    text-align: center;
    font-weight: 600;
    text-transform: uppercase;
    position: relative;
}

.statistics-table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #f8f9fa;
}

.statistics-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.statistics-table tbody tr:hover {
    background: linear-gradient(45deg, #e3f2fd, #bbdefb);
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.statistics-table tbody tr.no-appearance {
    color: #c62828;
}

.statistics-table tbody tr.no-appearance:hover {
    background: linear-gradient(45deg, #ffcdd2, #ef9a9a);
}

.statistics-table td {
    padding: 6px;
    text-align: center;
    font-size: 1rem;
    border-right: 1px solid #e9ecef;
}

.statistics-table td:last-child {
    border-right: none;
}

.statistics-table td.clred {
    color: #e74c3c;
    font-weight: 600;
}

.statistics-table td.text-center {
    text-align: center;
}

.statistics-table td strong {
    font-weight: 700;
}

.statistics-table td.long-absence {
    background: linear-gradient(45deg, #fff3e0, #ffe0b2);
    color: #ef6c00;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
   
    .page-title {
        font-size: 2rem;
    }
        
    .form-group.field-statisticform-fromdate {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-control.hasDatepicker {
        min-width: auto;
        width: 100%;
    }
    
    .statistics-table thead th,
    .statistics-table td {
        font-size: 0.9rem;
    }
    
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.5rem;
    }
    
    .statistics-filter,
    .filter-numbers-section {
        padding: 15px;
    }
    
    .statistics-summary h2.bg_red.pad10-5 {
        font-size: 1.2rem;
    }
}

/* Animation cho loading */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.statistics-table tbody tr {
    animation: fadeInUp 0.5s ease forwards;
}

.statistics-table tbody tr:nth-child(1) { animation-delay: 0.1s; }
.statistics-table tbody tr:nth-child(2) { animation-delay: 0.2s; }
.statistics-table tbody tr:nth-child(3) { animation-delay: 0.3s; }
.statistics-table tbody tr:nth-child(4) { animation-delay: 0.4s; }
.statistics-table tbody tr:nth-child(5) { animation-delay: 0.5s; }

/* Province Select Dropdown Styling */
.drp-container {
    margin-bottom: 15px;
}

.drp-container label {
    display: block;
    font-weight: 600;
    color: #495057;
    font-size: 1rem;
    margin-bottom: 8px;
}

#selectProvince.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 40px;
}

#selectProvince.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
}

#selectProvince.form-control:hover {
    border-color: #80bdff;
    background-color: #f8f9fa;
}

/* Option styling */
#selectProvince.form-control option {
    padding: 10px;
    font-size: 1rem;
    background: white;
    color: #495057;
}

#selectProvince.form-control option:hover {
    background: #e9ecef;
}

#selectProvince.form-control option:checked {
    background: #007bff;
    color: white;
}

/* Responsive design for province select */
@media (max-width: 768px) {
    #selectProvince.form-control {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 14px 15px;
    }
}

/* Enhanced styling for better UX */
.drp-container:hover #selectProvince.form-control {
    border-color: #80bdff;
}

/* Loading state (optional) */
#selectProvince.form-control.loading {
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="20" fill="none" stroke="%23007bff" stroke-width="4" stroke-dasharray="31.416" stroke-dashoffset="31.416"><animate attributeName="stroke-dasharray" dur="2s" values="0 31.416;15.708 15.708;0 31.416" repeatCount="indefinite"/><animate attributeName="stroke-dashoffset" dur="2s" values="0;-15.708;-31.416" repeatCount="indefinite"/></circle></svg>');
    background-size: 20px;
    background-position: right 15px center;
}
/* ... existing code ... */

/* Selector Container for TK Đặc Biệt Gan */
.tkgdblaura-container {
    margin-bottom: 25px;
}

.selector {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.selector:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.selector .title-bold {
    font-size: 1.2rem;
    font-weight: 700;
    color: #495057;
    margin-bottom: 15px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.radio-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.radio-list > div {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #0070ea;
    border-radius: 10px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    min-width: 120px;
    justify-content: center;
}

.radio-list > div:hover {
    border-color: #007bff;
    background: linear-gradient(45deg, #e3f2fd, #bbdefb);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}

.radio-list input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    margin: 0;
}

.radio-list label {
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    font-size: 1rem;
    margin: 0;
    text-align: center;
    transition: all 0.3s ease;
    user-select: none;
}

/* Checked state styling */
.radio-list input[type="radio"]:checked + label {
    color: white;
}

.radio-list input[type="radio"]:checked ~ label,
.radio-list div:has(input[type="radio"]:checked) {
    background: linear-gradient(45deg, #007bff, #0056b3);
    border-color: #0056b3;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
}

.radio-list div:has(input[type="radio"]:checked) label {
    color: white;
}

/* Active state */
.radio-list > div:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive design for radio buttons */
@media (max-width: 768px) {
    .radio-list {
        flex-direction: column;
        gap: 10px;
    }
    
    .radio-list > div {
        width: 100%;
        min-width: auto;
        padding: 15px 20px;
    }
    
    .selector .title-bold {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .selector {
        padding: 15px;
    }
    
    .selector .title-bold {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .radio-list > div {
        padding: 12px 15px;
    }
    
    .radio-list label {
        font-size: 0.9rem;
    }
}

/* Animation for radio selection */
@keyframes radioSelect {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.radio-list input[type="radio"]:checked ~ label,
.radio-list div:has(input[type="radio"]:checked) {
    animation: radioSelect 0.3s ease;
}

/* Fallback for browsers that don't support :has() */
@supports not selector(:has(*)) {
    .radio-list > div.selected {
        background: linear-gradient(45deg, #007bff, #0056b3);
        border-color: #0056b3;
        color: white;
        box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
    }
    
    .radio-list > div.selected label {
        color: white;
    }
}