/**
 * ASRIC Dashboard Styles
 * !important tags are used to override theme styles
 */

/* Import Bootstrap Icons */
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.5/font/bootstrap-icons.css');
/* Import Google Font - Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
/* Import Animate.css */
@import url('https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css');

/* Base Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f3f4f6;
    margin: 0;
}

.asric-dashboard-container {
    margin: 0;
    padding: 0;
    max-width: 100%;
}

.asric-dashboard {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 250px;
    background-color: #ffffff;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
    transition: width 0.3s ease;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.25rem;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.sidebar-toggle:hover {
    background-color: #f3f4f6;
    color: #2563eb;
}

.sidebar.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

.sidebar-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2563eb;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.sidebar.collapsed .logo-text {
    display: none;
}

.sidebar-content {
    flex-grow: 1;
    padding: 1rem 0;
}

.sidebar-footer {
    padding: 1rem 0;
    border-top: 1px solid #f3f4f6;
}

.sidebar.collapsed .admin-label {
    display: none;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 0.5rem;
}

.sidebar-nav a, .sidebar-footer a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: #4b5563;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    margin: 0 0.5rem;
}

.sidebar-nav a:hover {
    background-color: #e0f2fe;
    color: #2563eb;
}

.sidebar-nav a.active {
    background-color: #2563eb;
    color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3), 0 2px 4px -1px rgba(59, 130, 246, 0.2);
}

.sidebar-nav a i {
    margin-right: 0.75rem;
    font-size: 1.25rem;
    min-width: 1.25rem;
    text-align: center;
}

.sidebar.collapsed .nav-text {
    display: none;
}

.sidebar.collapsed .sidebar-nav a {
    justify-content: center;
    padding: 0.75rem;
}

.sidebar.collapsed .sidebar-nav a i {
    margin-right: 0;
}

/* Main Content Styles */
.main-content {
    flex-grow: 1;
    padding: 2rem;
    overflow-y: auto;
    transition: margin-left 0.3s ease;
}

.content-section {
    display: none; /* Hidden by default */
    animation: fadeIn 0.5s ease-out;
}

.content-section.active {
    display: block;
}

/* Top Bar Styles */
.top-bar {
    background-color: #ffffff;
    padding: 1.5rem 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

/* Card Styles */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background-color: #ffffff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    position: relative;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px -3px rgba(0, 0, 0, 0.1);
}

.dashboard-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-card-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: #1f2937;
}

.dashboard-card-link {
    font-size: 0.875rem;
    color: #2563eb;
    font-weight: 600;
    margin-top: 1rem;
    display: inline-block;
    transition: color 0.2s ease;
    text-decoration: none;
}

.dashboard-card-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Comparison Metrics */
.comparison-metric {
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
}

.comparison-metric.positive {
    color: #10b981; /* green-600 */
}

.comparison-metric.negative {
    color: #ef4444; /* red-600 */
}

.comparison-metric.neutral {
    color: #6b7280; /* gray-600 */
}

.comparison-metric i {
    margin-right: 0.25rem;
}

/* Action Bar Styles */
.action-bar {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.search-input {
    flex-grow: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Button Styles */
.btn-primary {
    background-color: #2563eb;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background-color: #f3f4f6;
    color: #374151;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
    box-shadow: 0 4px 8px rgba(107, 114, 128, 0.1);
}

.btn-primary.bg-red-600 {
    background-color: #dc2626;
    border-color: #dc2626;
}

.btn-primary.bg-red-600:hover,
.btn-primary.hover\:bg-red-700:hover {
    background-color: #b91c1c;
    border-color: #b91c1c;
}

/* Filter Panel Styles */
.filter-panel {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.filter-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.filter-group select,
.filter-group input[type="date"] {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background-color: #ffffff;
    transition: all 0.2s ease;
}

.filter-group select:focus,
.filter-group input[type="date"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Table Styles */
.table-container {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
    padding: 1.5rem;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem; /* Gap between rows */
}

thead th {
    background-color: #f9fafb;
    padding: 1rem 1.25rem;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 600;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

thead th:first-child {
    border-top-left-radius: 0.5rem;
    border-bottom-left-radius: 0.5rem;
}

thead th:last-child {
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

tbody tr {
    background-color: #ffffff;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    border-radius: 0.75rem;
}

tbody tr:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

tbody td {
    padding: 1rem 1.25rem;
    color: #374151;
    font-size: 0.9375rem;
    vertical-align: middle;
}

/* Status Badge Styles */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.status-approved {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.status-rejected {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* Action Buttons Styles */
.action-buttons button {
    background-color: #ffffff;
    color: #6b7280;
    padding: 0.5rem;
    border-radius: 0.5rem;
    font-size: 1.125rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border: none;
    cursor: pointer;
}

.action-buttons button:hover {
    background-color: #f3f4f6;
    color: #2563eb;
    transform: translateY(-1px);
}

.action-buttons button.delete-btn:hover {
    color: #ef4444;
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 1.5rem;
    gap: 0.5rem;
}

/* Notifications Additional Styles */
.notification-filter {
    background-color: #f3f4f6;
    color: #4b5563;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.notification-filter:hover {
    background-color: #e5e7eb;
    color: #1f2937;
}

.notification-filter.active {
    background-color: #dbeafe;
    color: #1e3a8a;
    font-weight: 500;
}

#all-notifications-list {
    margin-top: 1rem;
}

#notifications-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
    color: #4b5563;
    font-size: 0.875rem;
    transition: all 0.2s;
    cursor: pointer;
}

.pagination-btn:hover:not(.disabled) {
    border-color: #3b82f6;
    color: #3b82f6;
}

.pagination-btn.active {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button {
    background-color: #ffffff;
    color: #4b5563;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.pagination button.active {
    background-color: #2563eb;
    color: #ffffff;
}

.pagination button:hover:not(.active) {
    background-color: #e0f2fe;
    color: #2563eb;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

.modal-overlay.open {
    display: flex !important;
}

.modal-content {
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 28rem;
    margin: 1rem;
    overflow: hidden;
    animation: slideInDown 0.3s ease-out;
    max-height: 90vh;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.modal-body {
    padding: 1.5rem;
    max-height: 70vh; /* Limit height for scrollability */
    overflow-y: auto;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background-color: #f9fafb;
}

.modal-footer .btn-secondary {
    background-color: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    min-width: 100px;
}

.modal-footer .btn-secondary:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

.modal-footer .btn-primary {
    background-color: #2563eb;
    color: #ffffff;
    border: 1px solid #2563eb;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    min-width: 100px;
}

.modal-footer .btn-primary:hover {
    background-color: #2563eb;
    border-color: #2563eb;
}

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

.modal-body label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.modal-body input[type="text"],
.modal-body input[type="date"],
.modal-body select,
.modal-body input[type="password"],
.modal-body input[type="email"],
.modal-body input[type="number"],
.modal-body textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.modal-body input[type="text"]:focus,
.modal-body input[type="date"]:focus,
.modal-body select:focus,
.modal-body input[type="password"]:focus,
.modal-body input[type="email"]:focus,
.modal-body input[type="number"]:focus,
.modal-body textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* User Dropdown Menu */
.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 0.5rem 0;
    width: 200px;
    z-index: 10;
    margin-top: 0.5rem;
}

.user-dropdown-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.user-dropdown-menu li {
    padding: 0.5rem 1rem;
}

.user-dropdown-menu li:first-child {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.75rem;
    margin-bottom: 0.5rem;
}

.user-dropdown-menu a {
    display: flex;
    align-items: center;
    color: #4b5563;
    text-decoration: none;
    transition: color 0.2s ease;
}

.user-dropdown-menu a:hover {
    color: #2563eb;
}

.user-dropdown-menu a i {
    margin-right: 0.5rem;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.max-w-md {
    max-width: 28rem;
}

.close-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.close-button:hover {
    background-color: #f3f4f6;
}

.ml-auto {
    margin-left: auto;
}

.mr-2 {
    margin-right: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.text-center {
    text-align: center;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-end {
    justify-content: flex-end;
}

.space-x-4 > * + * {
    margin-left: 1rem;
}

.relative {
    position: relative;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .asric-dashboard {
        flex-direction: row;
    }
    
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transform: translateX(0);
        transition: transform 0.3s ease, width 0.3s ease;
    }
    
    .sidebar.collapsed {
        transform: translateX(-100%);
    }
    
    .main-content {
        width: 100%;
        margin-left: 0;
    }
    
    .sidebar-mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }
    
    .sidebar-mobile-overlay.active {
        display: block;
    }
    
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background-color: #ffffff;
        color: #4b5563;
        border: 1px solid #e5e7eb;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 1001;
        font-size: 1.5rem;
        cursor: pointer;
    }
}

@media (min-width: 1025px) {
    .mobile-menu-toggle {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .asric-dashboard.sidebar-expanded .main-content {
        margin-left: 0;
    }
    
    .asric-dashboard.sidebar-collapsed .main-content {
        margin-left: 0;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Header styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background-color: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.header-title h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Notification dropdown */
.notification-dropdown,
.notification-btn,
.notification-btn:hover,
.notification-badge {
    display: none !important;
}

/* User dropdown */
.user-dropdown {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
}

.user-btn:hover {
    background-color: #f3f4f6;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

/* Dropdown content */
.dropdown-content {
    position: absolute;
    right: 0;
    top: 70%;
    margin-top: 0.5rem;
    background-color: white;
    min-width: 280px;
    border-radius: 0.375rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 50;
    display: none;
}

.notification-dropdown:hover .dropdown-content,
.user-dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.dropdown-header span {
    font-weight: 600;
    color: #111827;
}

.dropdown-items {
    max-height: 320px;
    overflow-y: auto;
}

.dropdown-item {
    display: flex;
    padding: 0.75rem 1rem;
    color: #4b5563;
    text-decoration: none;
}

.dropdown-item:hover {
    background-color: #f9fafb;
}

.item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 0.75rem;
}

.item-content {
    flex: 1;
}

.item-title {
    font-weight: 500;
    color: #111827;
    margin-bottom: 0.25rem;
}

.item-desc {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.item-time {
    font-size: 0.75rem;
    color: #9ca3af;
}

.dropdown-footer {
    padding: 0.75rem 1rem;
    text-align: center;
    border-top: 1px solid #e5e7eb;
}

.dropdown-footer a {
    color: #2563eb;
    text-decoration: none;
    font-size: 0.875rem;
}

.dropdown-footer a:hover {
    text-decoration: underline;
}

.dropdown-divider {
    height: 1px;
    background-color: #e5e7eb;
    margin: 0.5rem 0;
}

/* Ghi đè CSS của theme với độ ưu tiên cao hơn */
.asric-dashboard button:hover,
.asric-dashboard html input[type="button"]:hover,
.asric-dashboard input[type="reset"]:hover,
.asric-dashboard input[type="submit"]:hover,
.asric-dashboard a.button:hover,
.asric-dashboard button:focus,
.asric-dashboard html input[type="button"]:focus,
.asric-dashboard input[type="reset"]:focus,
.asric-dashboard input[type="submit"]:focus,
.asric-dashboard a.button:focus,
.asric-dashboard a.wp-block-button__link:not(.has-background):active,
.asric-dashboard a.wp-block-button__link:not(.has-background):focus,
.asric-dashboard a.wp-block-button__link:not(.has-background):hover {
    background-color: inherit !important;
    color: inherit !important;
    box-shadow: none !important;
    transform: none !important;
    transition: all 0.2s ease !important;
    border-color: inherit !important;
    text-decoration: none !important;
    outline: none !important;
}

/* Khôi phục các button styles của plugin */
.asric-dashboard .btn-primary:hover,
.asric-dashboard .btn-primary:focus {
    background-color: #1d4ed8 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4) !important;
    transform: translateY(-1px) !important;
}

.asric-dashboard .btn-secondary:hover,
.asric-dashboard .btn-secondary:focus {
    background-color: #e5e7eb !important;
    color: #374151 !important;
    box-shadow: 0 4px 8px rgba(107, 114, 128, 0.1) !important;
    transform: translateY(-1px) !important;
}

/* Đảm bảo các nút trong modal hoạt động đúng */
#asricRecentActivitiesModal button:hover,
#asricRecentActivitiesModal button:focus {
    background-color: inherit !important;
    color: inherit !important;
}

#asricRecentActivitiesModalCloseBtn:hover,
#asricRecentActivitiesModalCloseBtn:focus {
    background-color: #4b5563 !important;
    color: #ffffff !important;
}

#asricRetryActivities:hover,
#asricRetryActivities:focus {
    background-color: #1d4ed8 !important;
    color: #ffffff !important;
}

/* Tăng độ ưu tiên cho các nút trong modal */
.asric-dashboard button.text-blue-500:hover,
.asric-dashboard button.text-blue-500:focus {
    color: #1d4ed8 !important;
    background-color: transparent !important;
}

/* Đảm bảo các nút action hoạt động đúng */
.asric-dashboard .action-buttons button:hover {
    background-color: #f3f4f6 !important;
    color: #2563eb !important;
    transform: translateY(-1px) !important;
}

.asric-dashboard .action-buttons button.delete-btn:hover {
    color: #ef4444 !important;
}

/* Đảm bảo các nút trong modal có style đúng */
#asricRecentActivitiesModal button#asricRecentActivitiesModalClose {
    background-color: transparent !important;
    border: none !important;
    padding: 0.5rem !important;
    border-radius: 0.25rem !important;
}

#asricRecentActivitiesModal button#asricRecentActivitiesModalCloseBtn {
    background-color: #4b5563 !important;
    color: white !important;
    padding: 0.5rem 1rem !important;
    border-radius: 0.375rem !important;
    font-weight: 500 !important;
}

#asricRecentActivitiesModal button#asricRetryActivities {
    background-color: #2563eb !important;
    color: white !important;
    padding: 0.5rem 1rem !important;
    border-radius: 0.375rem !important;
    font-weight: 500 !important;
}

/* Bank Dropdown Styles */
.bank-search-container {
    position: relative;
}

.bank-dropdown {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    max-height: 15rem;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 0.25rem;
    animation: dropdownFadeIn 0.15s ease-out;
    position: absolute;
    width: 100%;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bank-option {
    transition: all 0.15s ease;
    cursor: pointer;
    word-break: break-word;
    overflow-wrap: break-word;
}

.bank-option:hover,
.bank-option.active {
    background-color: #eff6ff !important;
    color: #1e40af;
}

.bank-option:hover .bi-building,
.bank-option.active .bi-building {
    color: #3b82f6 !important;
}

.bank-option:last-child {
    border-bottom: none !important;
}

.bank-no-results {
    padding: 1.5rem 1rem;
    text-align: center;
    color: #6b7280;
}

.bank-no-results .bi-search {
    display: block;
    margin: 0 auto 0.5rem;
    color: #9ca3af;
}

/* Dropdown arrow animation */
.dropdown-arrow {
    transition: transform 0.2s ease;
    pointer-events: auto !important;
    cursor: pointer;
}

/* Form validation styles */
.border-red-500 {
    border-color: #ef4444 !important;
}

.field-error {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Responsive styles for modals */
@media (max-width: 640px) {
    .modal-content {
        width: 95%;
        max-width: none;
    }
    
    .bank-dropdown {
        max-height: 10rem;
    }
}

/* Image Zoom Modal Styles */
#image-zoom-modal {
    z-index: 9999;
    animation: zoomFadeIn 0.3s ease-out;
}

#image-zoom-modal .close-button {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

#image-zoom-modal .close-button:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

@keyframes zoomFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Image Preview Buttons */
.zoom-image-btn,
.delete-image-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.zoom-image-btn:hover,
.delete-image-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Detail Modal Improvements */
.detail-group {
    margin-bottom: 1rem;
}

.detail-group:last-child {
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        margin: 1rem;
        max-height: 95vh;
    }
    
    .modal-body {
        max-height: 60vh;
    }
    
    #image-zoom-modal .relative {
        padding: 1rem;
    }
    
    #image-zoom-modal img {
        max-height: 80vh;
    }
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Hover Effects */
.group:hover .group-hover\:bg-opacity-20 {
    background-opacity: 0.2;
}

.group:hover .group-hover\:opacity-100 {
    opacity: 1;
}

/* Transition Effects */
.transition-opacity {
    transition-property: opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
}

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
}

.transition-colors {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
}

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

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

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

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

/* Activity History Styles */
#activity-history-container {
    max-height: 400px;
    overflow-y: auto;
}

#activity-history-container::-webkit-scrollbar {
    width: 6px;
}

#activity-history-container::-webkit-scrollbar-track {
    background-color: #f3f4f6;
    border-radius: 3px;
}

#activity-history-container::-webkit-scrollbar-thumb {
    background-color: #d1d5db;
    border-radius: 3px;
}

#activity-history-container::-webkit-scrollbar-thumb:hover {
    background-color: #9ca3af;
}

.activity-item {
    transition: all 0.2s ease;
}

.activity-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.activity-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-changes {
    margin-top: 8px;
    padding-left: 16px;
    border-left: 2px solid #e5e7eb;
}

.activity-change-item {
    font-size: 12px;
    margin-bottom: 4px;
    padding: 2px 4px;
    border-radius: 4px;
}

.activity-change-create {
    color: #059669;
    background-color: #ecfdf5;
}

.activity-change-update {
    color: #2563eb;
    background-color: #eff6ff;
}

.activity-change-status {
    color: #7c3aed;
    background-color: #f3e8ff;
}

.activity-change-note {
    color: #4b5563;
    background-color: #f9fafb;
}

.activity-skeleton {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.activity-skeleton-item {
    display: flex;
    align-items: start;
    space-x: 12px;
    padding: 12px;
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-bottom: 12px;
}

.activity-skeleton-icon {
    width: 32px;
    height: 32px;
    background-color: #e5e7eb;
    border-radius: 50%;
    flex-shrink: 0;
}

.activity-skeleton-content {
    flex: 1;
    min-width: 0;
}

.activity-skeleton-title {
    height: 16px;
    background-color: #e5e7eb;
    border-radius: 4px;
    margin-bottom: 8px;
    width: 70%;
}

.activity-skeleton-subtitle {
    height: 12px;
    background-color: #f3f4f6;
    border-radius: 4px;
    width: 50%;
}

.activity-skeleton-time {
    height: 12px;
    background-color: #f3f4f6;
    border-radius: 4px;
    width: 80px;
    margin-left: auto;
}

#load-more-activities button {
    transition: all 0.2s ease;
}

#load-more-activities button:hover {
    background-color: #f3f4f6;
    color: #374151;
    transform: translateY(-1px);
}

.activity-empty-state {
    text-align: center;
    padding: 48px 24px;
}

.activity-empty-state i {
    font-size: 48px;
    color: #d1d5db;
    margin-bottom: 16px;
}

.activity-empty-state p {
    color: #6b7280;
    font-size: 14px;
}

.activity-error-state {
    text-align: center;
    padding: 48px 24px;
}

.activity-error-state i {
    font-size: 48px;
    color: #fca5a5;
    margin-bottom: 16px;
}

.activity-error-state p {
    color: #dc2626;
    font-size: 14px;
}

/* Background colors for activity types */
.bg-blue-100 { background-color: #dbeafe; }
.bg-yellow-100 { background-color: #fef3c7; }
.bg-green-100 { background-color: #dcfce7; }
.bg-red-100 { background-color: #fee2e2; }
.bg-gray-100 { background-color: #f3f4f6; }

/* Text colors for activity types */
.text-blue-500 { color: #3b82f6; }
.text-yellow-500 { color: #eab308; }
.text-green-500 { color: #22c55e; }
.text-red-500 { color: #ef4444; }
.text-gray-500 { color: #6b7280; }
.text-gray-400 { color: #9ca3af; }
.text-gray-600 { color: #4b5563; }
.text-gray-800 { color: #1f2937; }

/* Text sizes */
.text-xl { font-size: 1.25rem; }
.text-5xl { font-size: 3rem; }

/* Font weights */
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }

/* Spacing */
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }

/* Responsive adjustments for activity history */
@media (max-width: 768px) {
    #activity-history-container {
        max-height: 300px;
    }
    
    .activity-changes {
        padding-left: 12px;
        margin-top: 6px;
    }
    
    .activity-change-item {
        font-size: 11px;
    }
}

/* Scrollable list for recent activities (dashboard & popup) */
.asric-scroll-list {
    max-height: 320px;
    overflow-y: auto;
    padding-right: 2px;
}
.asric-scroll-list::-webkit-scrollbar {
    width: 6px;
}
.asric-scroll-list::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 4px;
}
.asric-scroll-list::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}
@media (min-width: 768px) {
    .asric-scroll-list {
        max-height: 320px;
    }
}

.user-dropdown .dropdown-content i, .sidebar-footer a i {
    padding-right: 10px;
}

/* Custom pagination controls */
.pagination-per-page {
    padding: 0.375rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background-color: #ffffff;
    font-size: 0.875rem;
    margin-right: 0.5rem;
    cursor: pointer;
}
.pagination-input {
    width: 3rem;
    padding: 0.25rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    text-align: center;
    font-size: 0.875rem;
    margin: 0 0.25rem;
}
.pagination-info {
    margin-left: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Dashboard form controls - unify styles and override theme */
.asric-dashboard input[type="text"],
.asric-dashboard input[type="email"],
.asric-dashboard input[type="url"],
.asric-dashboard input[type="password"],
.asric-dashboard input[type="search"],
.asric-dashboard input[type="tel"],
.asric-dashboard input[type="number"],
.asric-dashboard textarea,
.asric-dashboard select {
    padding: 0.75rem 1rem !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0.5rem !important;
    background-color: #ffffff !important;
    font-size: 0.875rem !important;
    color: #374151 !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}
.asric-dashboard input[type="text"]:focus,
.asric-dashboard input[type="email"]:focus,
.asric-dashboard input[type="url"]:focus,
.asric-dashboard input[type="password"]:focus,
.asric-dashboard input[type="search"]:focus,
.asric-dashboard input[type="tel"]:focus,
.asric-dashboard input[type="number"]:focus,
.asric-dashboard textarea:focus,
.asric-dashboard select:focus {
    outline: none !important;
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
}

input#current-page-input {
    width: 70px;
}

/* Filter loading indicator */
.filter-loading {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #3b82f6;
    font-size: 0.875rem;
    pointer-events: none;
}

.filter-group {
    position: relative;
}

.rotation-controls button {
    transition: all 0.2s ease;
}
.rotation-controls button:hover {
    transform: scale(1.1);
    background-color: rgba(0, 0, 0, 0.8) !important;
}
.rotation-controls button:active {
    transform: scale(0.95);
}
#zoomed-image, #edit-zoomed-image {
    transition: transform 0.3s ease;
    transform-origin: center center;
}
