/* Custom styles */
:root {
    --primary-color: rgb(110, 165, 162);
    --primary-color-dark: rgb(95, 150, 147);
    --primary-color-light: rgb(125, 180, 177);
    --secondary-color: rgb(110, 165, 162);
    --success-color: rgb(110, 165, 162);
    --danger-color: rgb(110, 165, 162);
    --warning-color: rgb(110, 165, 162);
    --info-color: rgb(110, 165, 162);
    --light-color: #F5F5F5;
    --dark-color: #263238;
    --sidebar-width: 250px;
    --background-color: #FFFFFF;
    --card-background: #FFFFFF;
    --border-color: rgba(110, 165, 162, 0.1);
    --text-color: #37474F;
    --text-secondary: #546E7A;
    --gradient-primary: rgb(110, 165, 162);
    --gradient-light: rgba(110, 165, 162, 0.1);
}

/* Global styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--gradient-light);
    background-attachment: fixed;
}

/* Top header styles */
.top-header {
    padding: 1rem;
    margin-bottom: 1.5rem;
    background: rgba(110, 165, 162, 0.1);
    border-radius: 0.5rem;
    position: relative;
    z-index: 999;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    background: rgba(110, 165, 162, 0.9);
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(110, 165, 162, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.header-content:hover {
    box-shadow: 0 4px 8px rgba(110, 165, 162, 0.15);
    transform: translateY(-2px);
}

/* Page title styles */
.page-title {
    width: 100%;
    padding: 1rem 1.5rem;
    background: #f7f7f7;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(110, 165, 162, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.page-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
    transition: all 0.4s ease;
}

.page-title::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    z-index: 2;
}

.page-title h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: rgb(110, 165, 162);
    margin: 0;
    white-space: normal;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    z-index: 3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.page-title h4 i {
    font-size: 1.75rem;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)) brightness(1.2);
    opacity: 1;
}

.page-title:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 8px 25px rgba(110, 165, 162, 0.3);
    background: rgb(110, 165, 162);
}

.page-title:hover::before {
    background: rgba(255, 255, 255, 0.2);
}

.page-title:hover h4 {
    transform: translateX(5px);
}

.page-title:hover h4 i {
    transform: scale(1.2) rotate(5deg);
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4)) brightness(1.3);
    opacity: 1;
}

.page-title:active {
    transform: translateY(-1px) scale(0.99);
    box-shadow: 0 4px 15px rgba(110, 165, 162, 0.2);
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.page-title.loading {
    position: relative;
    overflow: hidden;
}

.page-title.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
    z-index: 4;
}

.page-title i {
    color: var(--primary-color);
    font-size: 1.5rem;
    transition: all 0.3s ease;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-title:hover i {
    transform: scale(1.1) rotate(5deg);
}

/* Responsive styles */
@media (max-width: 768px) {
    .top-header {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }

    .header-content {
        padding: 0.75rem;
        flex-direction: column;
        gap: 0.75rem;
    }

    .page-title {
        padding: 0.75rem 1.25rem;
    }

    .page-title h4 {
        font-size: 1.1rem;
    }
    
    .page-title h4 i {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .top-header {
        padding: 0.5rem;
    }

    .header-content {
        padding: 2.5rem;
        gap: 0.5rem;
    }

    .page-title {
        padding: 0.75rem 1.5rem;
    }

    .page-title h4 {
        font-size: 1rem;
    }
    
    .page-title h4 i {
        font-size: 1.3rem;
    }
}

/* User profile styles */
.user-profile {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
    border-radius: 1rem;
    background: rgba(110, 165, 162, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(110, 165, 162, 0.1);
}

.user-profile:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 123, 255, 0.1);
    background: rgba(255, 255, 255, 1);
}

.clinic-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: var(--gradient-primary);
    border-radius: 2rem;
    color: #fff;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(110, 165, 162, 0.2);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.clinic-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(110, 165, 162, 0.3);
}

.clinic-badge i {
    font-size: 1.1rem;
    color: #fff;
}

.user-info {
    position: relative;
}

.user-info > a {
    text-decoration: none;
    color: var(--text-color);
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    background: rgba(110, 165, 162, 0.03);
}

.user-info > a:hover {
    background: rgba(110, 165, 162, 0.08);
    transform: translateX(3px);
}

.user-avatar {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    box-shadow: 0 4px 12px rgba(110, 165, 162, 0.2);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(110, 165, 162, 0.3);
}

.user-avatar i {
    font-size: 1.6rem;
    color: #fff;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-name {
    font-weight: 600;
    color: var(--text-color);
    font-size: 1rem;
    letter-spacing: 0.3px;
    position: relative;
    padding-left: 1.5rem;
}

.user-name::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

/* Role-based styling */
.user-name[data-role="superadmin"]::before {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.user-name[data-role="admin"]::before {
    background: linear-gradient(135deg, #FF6B6B, #FF4757);
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.user-name[data-role="clinic_manager"]::before {
    background: linear-gradient(135deg, #4ECDC4, #45B7AF);
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.5);
}

.user-name[data-role="dentist"]::before {
    background: linear-gradient(135deg, #6C5CE7, #5B4BC4);
    box-shadow: 0 0 10px rgba(108, 92, 231, 0.5);
}

.user-name[data-role="receptionist"]::before {
    background: linear-gradient(135deg, #00B894, #00A884);
    box-shadow: 0 0 10px rgba(0, 184, 148, 0.5);
}

.user-name[data-role="staff"]::before {
    background: linear-gradient(135deg, #74B9FF, #0984E3);
    box-shadow: 0 0 10px rgba(116, 185, 255, 0.5);
}

.user-role {
    color: var(--text-secondary);
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    display: inline-block;
    transition: all 0.3s ease;
}

/* Role-based badge styling */
.user-role[data-role="superadmin"] {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 165, 0, 0.1));
    color: #FFA500;
    border: 1px solid rgba(255, 165, 0, 0.2);
}

.user-role[data-role="admin"] {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(255, 71, 87, 0.1));
    color: #FF4757;
    border: 1px solid rgba(255, 71, 87, 0.2);
}

.user-role[data-role="clinic_manager"] {
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1), rgba(69, 183, 175, 0.1));
    color: #45B7AF;
    border: 1px solid rgba(69, 183, 175, 0.2);
}

.user-role[data-role="dentist"] {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(91, 75, 196, 0.1));
    color: #6C5CE7;
    border: 1px solid rgba(108, 92, 231, 0.2);
}

.user-role[data-role="receptionist"] {
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.1), rgba(0, 168, 132, 0.1));
    color: #00B894;
    border: 1px solid rgba(0, 184, 148, 0.2);
}

.user-role[data-role="staff"] {
    background: linear-gradient(135deg, rgba(116, 185, 255, 0.1), rgba(9, 132, 227, 0.1));
    color: #0984E3;
    border: 1px solid rgba(9, 132, 227, 0.2);
}

/* Hover effects for role badges */
.user-role[data-role="superadmin"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.2);
}

.user-role[data-role="admin"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.2);
}

.user-role[data-role="clinic_manager"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(69, 183, 175, 0.2);
}

.user-role[data-role="dentist"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.2);
}

.user-role[data-role="receptionist"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.2);
}

.user-role[data-role="staff"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(9, 132, 227, 0.2);
}

.dropdown-menu {
    margin-top: 0.75rem;
    border: none;
    box-shadow: 0 8px 24px rgba(110, 165, 162, 0.15);
    border-radius: 0.75rem;
    min-width: 220px;
    padding: 0.75rem;
    border: 1px solid rgba(110, 165, 162, 0.1);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.98);
}

.dropdown-item {
    padding: 0.75rem 1rem;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.2s;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.25rem 0;
}

.dropdown-item:hover {
    background-color: rgba(110, 165, 162, 0.08);
    color: var(--primary-color);
    transform: translateX(5px);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    color: var(--primary-color);
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.dropdown-item:hover i {
    transform: scale(1.1);
}

.dropdown-divider {
    margin: 0.75rem 0;
    opacity: 0.1;
}

/* Global container styles */
.container,
.container-fluid {
    width: calc(100% - var(--sidebar-width)) !important;
    max-width: calc(100% - var(--sidebar-width)) !important;
    margin-left: var(--sidebar-width) !important;
    padding: 20px !important;
    transition: all 0.3s;
}

/* Module styles */
.module-container {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(110, 165, 162, 0.1);
    margin-bottom: 1.5rem;
}

.module-content {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(110, 165, 162, 0.1);
}

/* Form module styles */
.form-module {
    max-width: 100%;
}

/* Table module styles */
.table-module {
    width: 100%;
    overflow-x: auto;
}

/* List module styles */
.list-module {
    width: 100%;
}

/* Card module styles */
.card-module {
    width: 100%;
}

/* Search module styles */
.search-module {
    width: 100%;
}

/* Filter module styles */
.filter-module {
    width: 100%;
}

/* Responsive styles */
@media (max-width: 991.98px) {
    .container,
    .container-fluid {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        padding: 1rem;
    }

    .module-container {
        padding: 1rem;
    }
    
    .module-content {
        padding: 1rem;
    }

    .card {
        margin-bottom: 1rem;
    }

    .table-responsive {
        margin-bottom: 1rem;
    }
}

.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(110, 165, 162, 0.1);
    background-color: var(--card-background);
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    overflow: hidden;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(110, 165, 162, 0.15);
}

.card-header {
    background-color: rgba(110, 165, 162, 0.05);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
    background: rgba(110, 165, 162, 0.1);
}

.btn {
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: #fff;
}

.btn-primary:hover {
    background: rgb(110, 165, 162);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(110, 165, 162, 0.2);
}

.table {
    border-radius: 0.5rem;
    overflow: hidden;
}

.table th {
    background-color: rgba(110, 165, 162, 0.05);
    color: var(--text-color);
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    padding: 1rem;
}

.table td {
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    padding: 1rem;
}

.alert {
    border-radius: 0.5rem;
    border: none;
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border-left: 4px solid #28a745;
}

.alert-success::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: rgb(110, 165, 162);
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.alert-dismissible {
    padding-right: 3rem;
}

.alert-dismissible .btn-close {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.alert-dismissible .btn-close:hover {
    opacity: 1;
}

.alert-danger {
    background-color: rgba(229, 57, 53, 0.1);
    color: var(--danger-color);
}

.alert-warning {
    background-color: rgba(255, 160, 0, 0.1);
    color: var(--warning-color);
}

.alert-info {
    background-color: rgba(3, 155, 229, 0.1);
    color: var(--info-color);
}

/* Main content wrapper */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 20px;
    transition: all 0.3s;
}

@media (max-width: 991.98px) {
    .main-content {
        margin-left: 0;
        padding: 15px;
    }
}

/* Dashboard specific styles */
.dashboard-card {
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(110, 165, 162, 0.15);
}

.dashboard-card .card-title {
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.dashboard-card .card-text {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0;
}

/* Login page styles */
.login-container {
    max-width: 400px;
    margin: 100px auto;
}

.login-card {
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(110, 165, 162, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dashboard-card .card-text {
        font-size: 1.5rem;
    }
    
    .login-container {
        margin: 50px auto;
        padding: 0 15px;
    }
}

/* Badge styles */
.badge {
    padding: 0.5em 0.75em;
    border-radius: 0.25rem;
    font-weight: 500;
}

.bg-success {
    background-color: var(--success-color) !important;
}

.bg-warning {
    background-color: var(--warning-color) !important;
}

.bg-danger {
    background-color: var(--danger-color) !important;
}

.bg-info {
    background-color: var(--info-color) !important;
}

/* Form styles */
.form-control {
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(110, 165, 162, 0.25);
    background: #fff;
}

/* Animation effects */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Tắt hiệu ứng validation của Bootstrap */
.form-control.is-valid {
    background-image: none;
    padding-right: 0.75rem;
}

.form-control.is-valid:focus {
    border-color: var(--border-color);
    box-shadow: 0 0 0 0.2rem rgba(110, 165, 162, 0.25);
}

.was-validated .form-control:valid {
    background-image: none;
    padding-right: 0.75rem;
}

.was-validated .form-control:valid:focus {
    border-color: var(--border-color);
    box-shadow: 0 0 0 0.2rem rgba(110, 165, 162, 0.25);
}

/* Audit log money highlight styles */
.audit-log-row {
    transition: all 0.3s ease;
}

.audit-log-row.money-change {
    background: linear-gradient(90deg, rgba(255, 255, 0, 0.1), rgba(255, 255, 0, 0.05));
    border-left: 4px solid #FFD700;
    animation: moneyHighlight 2s ease-in-out;
}

.audit-log-row.money-change:hover {
    background: linear-gradient(90deg, rgba(255, 255, 0, 0.15), rgba(255, 255, 0, 0.1));
    transform: translateX(5px);
}

@keyframes moneyHighlight {
    0% {
        background: rgba(255, 255, 0, 0.2);
    }
    100% {
        background: linear-gradient(90deg, rgba(255, 255, 0, 0.1), rgba(255, 255, 0, 0.05));
    }
} 

