/* Modern stylesheet for Beauty Center Management System 
   Version 1.1.0 - With multi-language support and themes
*/

/* Base Variables - Default Theme */
:root {
    /* Core colors */
    --primary-color: #8e24aa;
    --primary-light: #c158dc;
    --primary-dark: #5c007a;
    --secondary-color: #ffab00;
    --secondary-light: #ffdd4b;
    --secondary-dark: #c67c00;
    
    /* Neutral colors */
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --bg-color: #f5f7fa;
    --text-color: #333;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    
    /* Status colors */
    --danger-color: #f44336;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --info-color: #2196f3;
    
    /* UI elements */
    --card-bg: #ffffff;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --hover-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    --header-bg: #ffffff;
    --sidebar-bg: linear-gradient(180deg, #8e24aa, #5c007a);
    --sidebar-text: #ffffff;
    --sidebar-active-bg: rgba(255, 255, 255, 0.15);
    --footer-bg: #ffffff;
    
    /* Typography */
    --font-family-sans-serif: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --font-family-arabic: 'Tajawal', sans-serif;
    --border-radius: 0.5rem;
    --border-radius-lg: 1rem;
    --transition-speed: 0.3s;
}

/* Typography */
html[lang="ar"] body {
    font-family: var(--font-family-arabic);
}

html:not([lang="ar"]) body {
    font-family: var(--font-family-sans-serif);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color var(--transition-speed) ease;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Common elements */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: var(--hover-shadow);
}

.navbar {
    background-color: var(--header-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 0.8rem 1rem;
}

.navbar-brand {
    font-weight: 600;
    color: var(--primary-color);
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: all var(--transition-speed) ease;
}

.nav-link:hover, .nav-link.active {
    background-color: rgba(142, 36, 170, 0.1);
    color: var(--primary-color);
}

.dropdown-menu {
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 0.7rem;
    padding: 0.8rem 0;
}

.dropdown-item {
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dropdown-item:hover, .dropdown-item.active {
    background-color: rgba(142, 36, 170, 0.1);
    color: var(--primary-color);
}

.btn {
    border-radius: 0.7rem;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-warning {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--dark-color);
}

.btn-warning:hover {
    background-color: var(--secondary-dark);
    border-color: var(--secondary-dark);
}

.form-control, .form-select {
    border-radius: var(--border-radius);
    padding: 0.6rem 1rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 0.25rem rgba(142, 36, 170, 0.15);
}

.badge {
    font-weight: 500;
    padding: 0.4em 0.8em;
    border-radius: 50rem;
}

/* Sidebar styles */
.sidebar {
    height: 100%;
    min-height: calc(100vh - 56px);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius);
    transition: all var(--transition-speed) ease;
    overflow-y: auto;
    z-index: 1030;
}

.sidebar .list-group-item {
    background-color: transparent;
    border: none;
    color: var(--sidebar-text);
    border-radius: 0.7rem;
    margin: 0.2rem 0.5rem;
    transition: all var(--transition-speed) ease;
    display: flex;
    align-items: center;
}

.sidebar .list-group-item:hover,
.sidebar .list-group-item.active {
    background-color: var(--sidebar-active-bg);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transform: translateX(5px);
}

.sidebar-header {
    font-weight: 600;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile sidebar */
@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        z-index: 1040;
        transition: left var(--transition-speed) ease;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    body.sidebar-open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.4);
        z-index: 1035;
    }
}

/* Dashboard cards */
.stats-card {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: all var(--transition-speed) ease;
    box-shadow: var(--card-shadow);
    height: 100%;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.stats-card .card-header {
    font-weight: 600;
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stats-card .card-header i {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.2);
}

.stats-card.revenue .card-header {
    background-color: var(--secondary-color);
    color: var(--dark-color);
}

.stats-card.expenses .card-header {
    background-color: var(--primary-color);
    color: white;
}

.stats-card.profit .card-header {
    background-color: var(--success-color);
    color: white;
}

.stats-card .card-body {
    padding: 1.5rem;
    text-align: center;
}

.stats-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

/* Appointment status tags */
.appointment-status {
    padding: 0.35rem 0.8rem;
    border-radius: 50rem;
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.status-scheduled {
    background-color: var(--info-color);
    color: white;
}

.status-completed {
    background-color: var(--success-color);
    color: white;
}

.status-cancelled {
    background-color: var(--danger-color);
    color: white;
}

.status-noshow {
    background-color: var(--warning-color);
    color: var(--dark-color);
}

/* Tables */
.table {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
}

.table th {
    background-color: rgba(142, 36, 170, 0.08);
    color: var(--primary-color);
    font-weight: 600;
    letter-spacing: 0.5px;
    border-top: none;
    padding: 1rem 1.2rem;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.table td {
    padding: 1rem 1.2rem;
    vertical-align: middle;
    border-color: rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease;
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(142, 36, 170, 0.02);
}

.table tr:hover td {
    background-color: rgba(142, 36, 170, 0.05);
}

/* Dashboard widgets */
.dashboard-widget {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: var(--card-shadow);
}

.dashboard-widget .widget-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-widget .widget-header i {
    font-size: 1.2rem;
}

.dashboard-widget .widget-body {
    padding: 1.5rem;
    background-color: var(--card-bg);
}

/* Charts container */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    margin-bottom: 20px;
}

/* Tab navigation styles - تصميم شريط التبويبات */
.nav-tabs {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.nav-tabs .nav-item {
    margin-bottom: -1px;
}

.nav-tabs .nav-link {
    border: 1px solid var(--border-color);
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
    color: var(--dark-color);
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    text-shadow: none;
    background-color: rgba(0, 0, 0, 0.05);
    margin-right: 0.25rem;
    /* تحسين وضوح الرابط */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    display: flex;
    align-items: center;
}

.nav-tabs .nav-link:hover {
    border-color: var(--border-color) var(--border-color) transparent;
    background-color: rgba(0, 0, 0, 0.1);
    color: var(--primary-color);
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    background-color: var(--card-bg);
    border-color: var(--border-color) var(--border-color) var(--card-bg);
    box-shadow: 0 -3px 0 var(--primary-color) inset, 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ضمان وضوح الأيقونات داخل التبويبات */
.nav-tabs .nav-link i {
    margin-left: 0.4rem;
    margin-right: 0.4rem;
    font-size: 1.1em;
    /* ضمان وضوح الأيقونات في المظاهر الفاتحة */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Footer */
.footer {
    background-color: var(--footer-bg);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    margin-top: 3rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
    background-color: var(--primary-dark);
    box-shadow: 0 5px 15px rgba(142, 36, 170, 0.3);
}

.language-switcher a {
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.language-switcher a:hover,
.language-switcher a.active {
    color: var(--primary-color);
    transform: scale(1.05);
}

/* Page headers */
.page-header {
    margin-bottom: 2rem;
    border-bottom: 2px solid rgba(142, 36, 170, 0.1);
    padding-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-header h1 {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0;
}

.page-header h1 i {
    margin-right: 0.5rem;
    font-size: 1.75rem;
}

.page-header .btn-group {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border-radius: 0.7rem;
    overflow: hidden;
}

/* Login page */
.login-container {
    max-width: 450px;
    margin: 100px auto;
}

.login-container .card {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.login-container .card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    text-align: center;
    padding: 2.5rem 1.5rem;
    font-weight: 700;
}

.login-container .card-header h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.login-container .card-body {
    padding: 2.5rem;
}

/* Notification Toasts */
#notification-container {
    z-index: 1060;
}

.toast {
    backdrop-filter: blur(5px);
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 1rem;
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Dropdown submenu for theme selector */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-menu {
    display: none;
    left: 100%;
    top: 0;
}

/* Theme selector styling */
.theme-selector .dropdown-item {
    display: flex;
    align-items: center;
    padding: 8px 20px;
    transition: all 0.2s ease;
}

.theme-selector .dropdown-item:hover {
    transform: translateX(5px);
}

html[dir="rtl"] .theme-selector .dropdown-item:hover {
    transform: translateX(-5px);
}

.theme-selector .theme-dot {
    margin-right: 10px;
    font-size: 12px;
    filter: drop-shadow(0 0 2px rgba(0,0,0,0.2));
}

html[dir="rtl"] .theme-selector .theme-dot {
    margin-right: 0;
    margin-left: 10px;
}

.theme-selector .dropdown-header {
    font-weight: 600;
    color: var(--primary-color);
    padding: 8px 20px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.theme-selector .dropdown-divider {
    margin: 0.25rem 0;
}

.theme-selector .active {
    background-color: rgba(0,0,0,0.05);
    font-weight: 600;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(142, 36, 170, 0.5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(142, 36, 170, 0.7);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .sidebar {
        min-height: auto;
    }
    
    .stats-value {
        font-size: 2rem;
    }
    
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .page-header .btn-group {
        margin-top: 1rem;
    }
    
    .stats-card {
        margin-bottom: 1rem;
    }
    
    .stats-value {
        font-size: 1.8rem;
    }
    
    .login-container {
        margin: 50px auto;
        padding: 0 15px;
    }
    
    .table-responsive {
        border-radius: var(--border-radius);
    }
}

/* Print styles */
@media print {
    .sidebar, .navbar, .footer, .btn-print, .btn-back, .dropdown-menu {
        display: none !important;
    }
    
    .col-lg-10 {
        width: 100%;
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd;
    }
    
    body {
        background-color: white !important;
    }
    
    .stats-value {
        color: var(--primary-color) !important;
        -webkit-text-fill-color: var(--primary-color) !important;
    }
}

/* Enhanced Badge Styles */
.bg-success-light {
    background-color: rgba(76, 175, 80, 0.1);
}

.bg-danger-light {
    background-color: rgba(244, 67, 54, 0.1);
}

.bg-primary-light {
    background-color: rgba(142, 36, 170, 0.1);
}

.bg-warning-light {
    background-color: rgba(255, 152, 0, 0.1);
}

.bg-info-light {
    background-color: rgba(33, 150, 243, 0.1);
}

/* System Info Card Styling */
.system-info-card .info-item {
    border-radius: 0.5rem;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.system-info-card .info-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
    transform: translateX(5px);
}

html[dir="rtl"] .system-info-card .info-item:hover {
    transform: translateX(-5px);
}

.system-info-card .info-label {
    font-weight: 500;
    color: var(--text-muted);
}

.system-info-card .info-value {
    font-weight: 600;
    color: var(--text-color);
}

.system-info-card .stat-card {
    transition: all 0.3s ease;
    border-radius: var(--border-radius);
}

.system-info-card .stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.system-info-card .stat-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.system-info-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-color);
}

.system-info-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* تحسين وضوح التبويبات في صفحات الموظفين والإعدادات والمالية */
.staff-page .nav-tabs .nav-link,
.settings-page .nav-tabs .nav-link,
.finances-page .nav-tabs .nav-link {
    background-color: #222e3a;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    color: #fffbfb;
    position: relative;
    overflow: hidden;
}

.staff-page .nav-tabs .nav-link i,
.settings-page .nav-tabs .nav-link i,
.finances-page .nav-tabs .nav-link i {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    font-size: 1.1em;
    color: var(--primary-color);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}

.staff-page .nav-tabs .nav-link:hover,
.settings-page .nav-tabs .nav-link:hover,
.finances-page .nav-tabs .nav-link:hover {
    background-color: rgba(0, 0, 0, 0.15);
    color: var(--primary-color);
}

.staff-page .nav-tabs .nav-link.active,
.settings-page .nav-tabs .nav-link.active,
.finances-page .nav-tabs .nav-link.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.staff-page .nav-tabs .nav-link.active i,
.settings-page .nav-tabs .nav-link.active i,
.finances-page .nav-tabs .nav-link.active i {
    color: white;
}

/* ضمان وضوح الأيقونات في جميع السمات */
.card-header i, .btn i, .badge i, .nav-link i {
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

/* تحسين تباين الأيقونات والنصوص في الخلفيات الفاتحة */
.badge-light, .btn-light, .card-light {
    color: var(--dark-color) !important;
    text-shadow: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* تعديل أنماط لظهور التبويبات بشكل أفضل في المظاهر المختلفة */
.nav-pills .nav-link {
    background-color: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    margin: 0 5px;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.05);
}

/* خيارات تخصيص الشعار */
/* -------------- */
.logo-text {
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0;
}

.logo-image {
    height: auto;
    width: 120px; /* الحجم المتوسط الافتراضي */
}

.logo-sm {
    width: 80px !important;
}

.logo-md {
    width: 120px !important;
}

.logo-lg {
    width: 160px !important;
}

/* معاينة الشعار */
.logo-preview {
    padding: 15px;
    background-color: var(--header-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* أنماط البطاقات */
/* ------------ */
.card-flat {
    box-shadow: none !important;
    border: 1px solid var(--border-color) !important;
}

.card-shadow {
    border: none !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15) !important;
}

.card-bordered {
    border: 2px solid var(--primary-color) !important;
    box-shadow: none !important;
}

.card-rounded {
    border-radius: 16px !important;
}

/* أنماط الأزرار */
/* ----------- */
.btn-rounded {
    border-radius: 50px !important;
}

.btn-flat {
    border-radius: 0 !important;
    box-shadow: none !important;
}

.btn-gradient {
    background-image: linear-gradient(to right, var(--primary-color), var(--primary-dark)) !important;
    border: none !important;
    color: white !important;
}

.btn-gradient:hover {
    background-image: linear-gradient(to right, var(--primary-dark), var(--primary-color)) !important;
    color: white !important;
}

.btn-3d {
    transform: translateY(0);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.2s !important;
}

.btn-3d:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 10px rgba(0, 0, 0, 0.2) !important;
}

.btn-3d:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

/* أنماط الهيدر */
/* ---------- */
.header-gradient {
    background-image: linear-gradient(to right, var(--primary-color), var(--primary-dark)) !important;
}

.header-gradient .navbar-brand,
.header-gradient .nav-link {
    color: white !important;
}

.header-transparent {
    background-color: transparent !important;
    box-shadow: none !important;
}

.header-colored {
    background-color: var(--primary-color) !important;
    color: white !important;
}

.header-colored .navbar-brand,
.header-colored .nav-link {
    color: white !important;
}

.header-compact {
    padding: 0.25rem 1rem !important;
}

.header-extended {
    padding: 1rem !important;
}

/* معاينة الخطوط */
.font-preview {
    padding: 15px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    min-height: 100px;
}

.font-preview h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: 600;
}

.font-preview p {
    margin-bottom: 0;
    font-size: 16px;
}

/* أمثلة للخطوط */
.cairo-font {
    font-family: 'Cairo', sans-serif;
}

.tajawal-font {
    font-family: 'Tajawal', sans-serif;
}

.almarai-font {
    font-family: 'Almarai', sans-serif;
}

.droid-font {
    font-family: 'Droid Arabic Kufi', sans-serif;
}

.markazi-font {
    font-family: 'Markazi Text', serif;
}

.changa-font {
    font-family: 'Changa', sans-serif;
}
