/* Custom CSS for Anahtar Health */

/* Import Google Fonts for better typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Cairo:wght@300;400;500;600;700;800&display=swap');

/* Root Variables */
:root {
    --primary-color: #7B0F1A;
    --secondary-color: #0F4C81;
    --accent-color: #E8B4B8;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e9ecef;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --border-radius: 0.5rem;
    --border-radius-lg: 0.75rem;
    --transition: all 0.3s ease;
}

/* Typography System */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Arabic Typography */
[dir="rtl"] body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] h6 {
    font-family: 'Cairo', sans-serif;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.025em;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
}

h5 {
    font-size: 1.125rem;
    font-weight: 600;
}

h6 {
    font-size: 1rem;
    font-weight: 600;
}

/* Display Classes */
.display-1, .display-2, .display-3, .display-4 {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

[dir="rtl"] .display-1, [dir="rtl"] .display-2, [dir="rtl"] .display-3, [dir="rtl"] .display-4 {
    font-family: 'Cairo', sans-serif;
}

/* Enhanced RTL Support */
[dir="rtl"] {
    text-align: right;
    direction: rtl;
}

[dir="rtl"] .text-start {
    text-align: right !important;
}

[dir="rtl"] .text-end {
    text-align: left !important;
}

[dir="rtl"] .me-1, [dir="rtl"] .me-2, [dir="rtl"] .me-3, [dir="rtl"] .me-4, [dir="rtl"] .me-5 {
    margin-right: 0 !important;
    margin-left: 0.25rem !important;
}

[dir="rtl"] .ms-1, [dir="rtl"] .ms-2, [dir="rtl"] .ms-3, [dir="rtl"] .ms-4, [dir="rtl"] .ms-5 {
    margin-left: 0 !important;
    margin-right: 0.25rem !important;
}

[dir="rtl"] .pe-1, [dir="rtl"] .pe-2, [dir="rtl"] .pe-3, [dir="rtl"] .pe-4, [dir="rtl"] .pe-5 {
    padding-right: 0 !important;
    padding-left: 0.25rem !important;
}

[dir="rtl"] .ps-1, [dir="rtl"] .ps-2, [dir="rtl"] .ps-3, [dir="rtl"] .ps-4, [dir="rtl"] .ps-5 {
    padding-left: 0 !important;
    padding-right: 0.25rem !important;
}

/* RTL Flexbox Support */
[dir="rtl"] .d-flex {
    flex-direction: row-reverse;
}

[dir="rtl"] .flex-row {
    flex-direction: row-reverse !important;
}

[dir="rtl"] .flex-row-reverse {
    flex-direction: row !important;
}

/* RTL Navigation */
[dir="rtl"] .navbar-nav {
    flex-direction: row-reverse;
}

[dir="rtl"] .dropdown-menu {
    right: 0;
    left: auto;
}

[dir="rtl"] .dropdown-menu-end {
    right: auto;
    left: 0;
}

/* RTL Form Elements */
[dir="rtl"] .form-control {
    text-align: right;
}

[dir="rtl"] .form-label {
    text-align: right;
}

[dir="rtl"] .input-group {
    flex-direction: row-reverse;
}

[dir="rtl"] .input-group-text {
    border-left: 0;
    border-right: 1px solid #ced4da;
}

[dir="rtl"] .input-group .form-control {
    border-right: 0;
    border-left: 1px solid #ced4da;
}

/* RTL Buttons */
[dir="rtl"] .btn-group {
    flex-direction: row-reverse;
}

[dir="rtl"] .btn-group .btn:first-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

[dir="rtl"] .btn-group .btn:last-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

/* RTL Cards */
[dir="rtl"] .card-header {
    text-align: right;
}

[dir="rtl"] .card-body {
    text-align: right;
}

/* RTL Tables */
[dir="rtl"] .table {
    text-align: right;
}

[dir="rtl"] .table th,
[dir="rtl"] .table td {
    text-align: right;
}

/* RTL Lists */
[dir="rtl"] .list-group-item {
    text-align: right;
}

/* RTL Alerts */
[dir="rtl"] .alert {
    text-align: right;
}

/* RTL Breadcrumbs */
[dir="rtl"] .breadcrumb {
    flex-direction: row-reverse;
}

[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
    content: "\\";
    transform: scaleX(-1);
}

/* RTL Pagination */
[dir="rtl"] .pagination {
    flex-direction: row-reverse;
}

/* RTL Modal */
[dir="rtl"] .modal-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .modal-footer {
    flex-direction: row-reverse;
}

/* RTL Offcanvas */
[dir="rtl"] .offcanvas-start {
    right: 0;
    left: auto;
    transform: translateX(100%);
}

[dir="rtl"] .offcanvas-end {
    left: 0;
    right: auto;
    transform: translateX(-100%);
}

/* RTL Carousel */
[dir="rtl"] .carousel-control-prev {
    right: 0;
    left: auto;
}

[dir="rtl"] .carousel-control-next {
    left: 0;
    right: auto;
}

/* RTL Accordion */
[dir="rtl"] .accordion-button {
    text-align: right;
}

[dir="rtl"] .accordion-button::after {
    margin-left: 0;
    margin-right: auto;
    transform: scaleX(-1);
}

/* RTL Tabs */
[dir="rtl"] .nav-tabs {
    flex-direction: row-reverse;
}

[dir="rtl"] .nav-pills {
    flex-direction: row-reverse;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    /* Mobile Navigation */
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .navbar-brand img {
        height: 40px !important;
        min-width: 35px !important;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
    
    /* Mobile Hero Section */
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 2rem !important;
        line-height: 1.2;
    }
    
    .hero-section p {
        font-size: 1rem !important;
        margin-bottom: 1.5rem;
    }
    
    .hero-section .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Mobile Cards */
    .card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Mobile Forms */
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
    
    /* Mobile Tables */
    .table-responsive {
        font-size: 0.875rem;
    }
    
    /* Mobile Modals */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-content {
        border-radius: 0.5rem;
    }
    
    /* Mobile Sidebar */
    .sidebar {
        width: 100%;
        position: static;
        height: auto;
        transform: none !important;
    }
    
    .sidebar .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .sidebar .nav-link i {
        font-size: 1.1rem;
    }
    
    .sidebar .nav-link span {
        font-size: 0.85rem;
    }
    
    /* Mobile Dashboard */
    .dashboard-stats .col-md-3 {
        margin-bottom: 1rem;
    }
    
    .dashboard-stats .card {
        text-align: center;
    }
    
    /* Mobile Doctor Cards */
    .doctor-card {
        margin-bottom: 1rem;
    }
    
    .doctor-card .card-body {
        padding: 1rem;
    }
    
    /* Mobile Appointment Cards */
    .appointment-card {
        margin-bottom: 1rem;
    }
    
    /* Mobile Profile */
    .profile-avatar {
        width: 80px;
        height: 80px;
        margin: 0 auto 1rem;
    }
    
    /* Mobile Settings */
    .settings-form .form-group {
        margin-bottom: 1rem;
    }
    
    /* Mobile Activity Logs */
    .activity-log-item {
        padding: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    /* Mobile Footer */
    .footer {
        text-align: center;
        padding: 2rem 0;
    }
    
    .footer .row > div {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    /* Extra Small Mobile */
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .hero-section h1 {
        font-size: 1.75rem !important;
    }
    
    .hero-section p {
        font-size: 0.9rem !important;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar-brand img {
        height: 35px !important;
        min-width: 30px !important;
    }
    
    /* Mobile Forms */
    .form-label {
        font-size: 0.875rem;
    }
    
    .form-control {
        font-size: 14px;
        padding: 0.5rem 0.75rem;
    }
    
    /* Mobile Tables */
    .table {
        font-size: 0.8rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
    }
    
    /* Mobile Modals */
    .modal-dialog {
        margin: 0.25rem;
    }
    
    .modal-header {
        padding: 0.75rem 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 0.75rem 1rem;
    }
    
    /* Mobile Sidebar */
    .sidebar .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    /* Mobile Dashboard */
    .dashboard-stats .card-body {
        padding: 0.75rem;
    }
    
    .dashboard-stats h3 {
        font-size: 1.5rem;
    }
    
    .dashboard-stats p {
        font-size: 0.875rem;
    }
    
    /* Mobile Doctor Cards */
    .doctor-card .card-title {
        font-size: 1.1rem;
    }
    
    .doctor-card .card-text {
        font-size: 0.875rem;
    }
    
    /* Mobile Profile */
    .profile-avatar {
        width: 60px;
        height: 60px;
    }
    
    /* Mobile Settings */
    .settings-form .form-control {
        font-size: 14px;
    }
    
    /* Mobile Activity Logs */
    .activity-log-item {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
}

/* RTL Mobile Specific */
@media (max-width: 768px) {
    [dir="rtl"] .navbar-nav {
        text-align: right;
    }
    
    [dir="rtl"] .dropdown-menu {
        right: 0;
        left: auto;
    }
    
    [dir="rtl"] .hero-section .d-flex {
        flex-direction: column-reverse;
    }
    
    [dir="rtl"] .hero-section .btn {
        text-align: center;
    }
    
    [dir="rtl"] .card-body {
        text-align: right;
    }
    
    [dir="rtl"] .form-control {
        text-align: right;
    }
    
    [dir="rtl"] .table th,
    [dir="rtl"] .table td {
        text-align: right;
    }
    
    [dir="rtl"] .modal-header {
        flex-direction: row-reverse;
    }
    
    [dir="rtl"] .modal-footer {
        flex-direction: row-reverse;
    }
    
    [dir="rtl"] .sidebar .nav-link {
        text-align: right;
    }
    
    [dir="rtl"] .dashboard-stats .card {
        text-align: right;
    }
    
    [dir="rtl"] .doctor-card {
        text-align: right;
    }
    
    [dir="rtl"] .appointment-card {
        text-align: right;
    }
    
    [dir="rtl"] .profile-avatar {
        margin: 0 auto 1rem;
    }
    
    [dir="rtl"] .settings-form {
        text-align: right;
    }
    
    [dir="rtl"] .activity-log-item {
        text-align: right;
    }
    
    [dir="rtl"] .footer {
        text-align: right;
    }
}

/* Touch-friendly elements */
@media (max-width: 768px) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .form-control {
        min-height: 44px;
    }
    
    .dropdown-toggle {
        min-height: 44px;
    }
    
    .card {
        border-radius: 0.5rem;
    }
    
    .modal-content {
        border-radius: 0.5rem;
    }
    
    .alert {
        border-radius: 0.5rem;
    }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        padding: 1rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.5rem !important;
    }
    
    .hero-section p {
        font-size: 0.9rem !important;
    }
    
    .navbar {
        padding: 0.25rem 0;
    }
    
    .modal-dialog {
        margin: 0.25rem;
    }
}

/* Text Utilities */
.text-primary {
    color: var(--primary-color) !important;
    font-weight: 600;
}

.text-secondary {
    color: var(--secondary-color) !important;
    font-weight: 500;
}

.text-muted {
    color: var(--text-muted) !important;
    font-weight: 400;
}

.text-small {
    font-size: 0.875rem;
    line-height: 1.5;
}

.text-large {
    font-size: 1.125rem;
    line-height: 1.6;
}

/* Font Weights */
.fw-light { font-weight: 300 !important; }
.fw-normal { font-weight: 400 !important; }
.fw-medium { font-weight: 500 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }
.fw-bolder { font-weight: 800 !important; }

/* Card Typography */
.card-title {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

[dir="rtl"] .card-title {
    font-family: 'Cairo', sans-serif;
}

.card-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.card-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-primary);
}

/* Button Typography */
.btn {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
    text-transform: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

[dir="rtl"] .btn {
    font-family: 'Cairo', sans-serif;
}

.btn-lg {
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
}

.btn-sm {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
}

/* Form Typography */
.form-label {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

[dir="rtl"] .form-label {
    font-family: 'Cairo', sans-serif;
}

.form-control, .form-select {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
}

[dir="rtl"] .form-control, [dir="rtl"] .form-select {
    font-family: 'Cairo', sans-serif;
}

.form-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Navigation Typography */
.navbar-brand {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.025em;
}

[dir="rtl"] .navbar-brand {
    font-family: 'Cairo', sans-serif;
}

.nav-link {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
}

[dir="rtl"] .nav-link {
    font-family: 'Cairo', sans-serif;
}

/* Table Typography */
.table {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    border-collapse: separate;
    border-spacing: 0;
}

[dir="rtl"] .table {
    font-family: 'Cairo', sans-serif;
}

.table thead th {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: var(--bg-light);
    border-bottom: 2px solid var(--border-color);
    padding: 1rem 0.75rem;
    vertical-align: middle;
}

.table tbody td {
    font-weight: 400;
    color: var(--text-primary);
    padding: 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background-color: rgba(123, 15, 26, 0.05);
}

/* Custom table header styling */
.table-light thead th {
    background-color: #f8f9fa;
    color: var(--text-primary);
    border-bottom: 2px solid var(--primary-color);
    font-weight: 700;
}

/* RTL table adjustments */
[dir="rtl"] .table thead th {
    text-align: right;
}

[dir="rtl"] .table tbody td {
    text-align: right;
}

/* Badge Typography */
.badge {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

[dir="rtl"] .badge {
    font-family: 'Cairo', sans-serif;
}

/* Alert Typography */
.alert {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.875rem;
    line-height: 1.5;
}

[dir="rtl"] .alert {
    font-family: 'Cairo', sans-serif;
}

.alert-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* Breadcrumb Typography */
.breadcrumb {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
}

[dir="rtl"] .breadcrumb {
    font-family: 'Cairo', sans-serif;
}

.breadcrumb-item {
    color: var(--text-muted);
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 600;
}

/* Timeline styles for admin dashboard */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-marker {
    position: absolute;
    left: -22px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #dee2e6;
}

.timeline-content {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.timeline-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #495057;
}

.timeline-text {
    font-size: 12px;
    margin-bottom: 0;
}

/* Custom button styles */
.btn-outline-primary-custom {
    color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
    letter-spacing: 0.025em;
    transition: var(--transition);
}

.btn-outline-primary-custom:hover {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-primary-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
    letter-spacing: 0.025em;
    transition: var(--transition);
}

.btn-primary-custom:hover {
    background-color: #5a0b13;
    border-color: #5a0b13;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-secondary-custom {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    font-weight: 600;
    letter-spacing: 0.025em;
    transition: var(--transition);
}

.btn-secondary-custom:hover {
    background-color: #0a3a5c;
    border-color: #0a3a5c;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* Card hover effects */
.card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

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

.card-header {
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.025em;
}

.card-footer {
    background-color: var(--bg-light);
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
}

/* Stats card animations */
.stats-card {
    transition: transform 0.2s ease-in-out;
}

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

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Custom pagination */
.pagination .page-link {
    color: var(--primary-color);
    border-color: #dee2e6;
}

.pagination .page-link:hover {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Badge customizations */
.badge {
    font-size: 0.75em;
}

/* Form control focus */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(123, 15, 26, 0.25);
    font-weight: 500;
}

.form-control,
.form-select {
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(123, 15, 26, 0.25);
}

/* Input group styling */
.input-group-text {
    background-color: var(--bg-light);
    border-color: var(--border-color);
    font-weight: 500;
    font-size: 0.875rem;
}

/* Alert customizations */
.alert {
    border: none;
    border-radius: var(--border-radius-lg);
    font-weight: 500;
    letter-spacing: 0.025em;
}

.alert-success {
    background-color: #d1edff;
    color: #0c5460;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* RTL Alert adjustments */
[dir="rtl"] .alert-success,
[dir="rtl"] .alert-danger,
[dir="rtl"] .alert-warning,
[dir="rtl"] .alert-info {
    border-left: none;
    border-right: 4px solid;
}

/* RTL Support */
[dir="rtl"] .timeline {
    padding-left: 0;
    padding-right: 30px;
}

[dir="rtl"] .timeline::before {
    left: auto;
    right: 15px;
}

[dir="rtl"] .timeline-marker {
    left: auto;
    right: -22px;
}

[dir="rtl"] .timeline-content {
    border-left: none;
    border-right: 3px solid var(--primary-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .timeline {
        padding-left: 20px;
    }
    
    .timeline::before {
        left: 10px;
    }
    
    .timeline-marker {
        left: -17px;
        width: 10px;
        height: 10px;
    }
    
    [dir="rtl"] .timeline {
        padding-right: 20px;
    }
    
    [dir="rtl"] .timeline::before {
        right: 10px;
    }
    
    [dir="rtl"] .timeline-marker {
        right: -17px;
    }
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a0b13;
}

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

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.fade-in {
    animation: fadeIn 0.4s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

/* RTL Animation adjustments */
[dir="rtl"] .slide-in-right {
    animation: slideInLeft 0.5s ease-out;
}

[dir="rtl"] .slide-in-left {
    animation: slideInRight 0.5s ease-out;
}

/* Additional Typography Enhancements */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.letter-spacing-wide {
    letter-spacing: 0.1em;
}

.letter-spacing-tight {
    letter-spacing: -0.025em;
}

/* Professional spacing utilities */
.mb-section {
    margin-bottom: 4rem;
}

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

.py-section {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

/* Enhanced focus states */
.focus-ring:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Professional shadows */
.shadow-professional {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.shadow-elegant {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Admin Dashboard Enhancements */
.welcome-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    position: relative;
    overflow: hidden;
}

.welcome-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.stats-card {
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.stats-card:nth-child(1) {
    border-left-color: var(--primary-color);
}

.stats-card:nth-child(2) {
    border-left-color: #17a2b8;
}

.stats-card:nth-child(3) {
    border-left-color: #28a745;
}

.stats-card:nth-child(4) {
    border-left-color: #ffc107;
}

.stats-icon {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stats-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.stats-card:hover .stats-icon::before {
    left: 100%;
}

.quick-actions .btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.quick-actions .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.quick-actions .btn:hover::before {
    left: 100%;
}

.quick-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.system-status {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
}

.recent-appointments .table {
    margin-bottom: 0;
}

.recent-appointments .table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
    font-weight: 600;
    color: var(--text-primary);
    padding: 1rem 0.75rem;
}

.recent-appointments .table td {
    padding: 0.75rem;
    vertical-align: middle;
    border-color: #f1f3f4;
}

.recent-appointments .table tbody tr:hover {
    background-color: #f8f9fa;
}

/* RTL Enhancements */
[dir="rtl"] .welcome-header .text-end {
    text-align: left !important;
}

[dir="rtl"] .stats-card {
    border-left: none;
    border-right: 4px solid transparent;
}

[dir="rtl"] .stats-card:nth-child(1) {
    border-right-color: var(--primary-color);
}

[dir="rtl"] .stats-card:nth-child(2) {
    border-right-color: #17a2b8;
}

[dir="rtl"] .stats-card:nth-child(3) {
    border-right-color: #28a745;
}

[dir="rtl"] .stats-card:nth-child(4) {
    border-right-color: #ffc107;
}

/* Animation for loading states */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

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

/* Enhanced badges */
.badge {
    font-weight: 500;
    letter-spacing: 0.5px;
}

.badge.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%) !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%) !important;
}

.badge.bg-info {
    background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%) !important;
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .card-header {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
}

/* Logo Styling */
.navbar-brand img {
    transition: all 0.3s ease;
    filter: brightness(1.2) contrast(1.1);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.1);
    padding: 8px;
    backdrop-filter: blur(10px);
}

.navbar-brand:hover img {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    filter: brightness(1.3) contrast(1.2);
}

.sidebar img {
    transition: all 0.3s ease;
    filter: brightness(1.2) contrast(1.1);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.1);
    padding: 8px;
    backdrop-filter: blur(10px);
}

.sidebar:hover img {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    filter: brightness(1.3) contrast(1.2);
}

/* Logo preview in settings */
.logo-preview img {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.logo-preview img:hover {
    border-color: var(--primary-color);
    transform: scale(1.02);
}

/* Large Logo Styling for better visibility */
.navbar-brand {
    min-height: 80px;
    padding: 10px 0;
}

.navbar-brand img {
    object-fit: contain;
    max-width: none;
}

/* Sidebar logo container */
.sidebar .d-flex.align-items-center {
    min-height: 80px;
    padding: 10px 0;
}

.sidebar img {
    object-fit: contain;
    max-width: none;
}

/* Responsive logo sizing */
@media (max-width: 768px) {
    .navbar-brand img {
        height: 60px !important;
        min-width: 50px !important;
    }
    
    .sidebar img {
        height: 55px !important;
        min-width: 45px !important;
    }
}

@media (max-width: 576px) {
    .navbar-brand img {
        height: 50px !important;
        min-width: 40px !important;
    }
    
    .sidebar img {
        height: 45px !important;
        min-width: 35px !important;
    }
}
