:root {
    --primary: #2563EB;            /* Cobalt Blue */
    --primary-light: #3B82F6;      /* Bright Azure */
    --primary-dark: #1D4ED8;       /* Deep Cobalt */
    --primary-border: #1E40AF;     /* Strong 2px Delineated Border */
    --secondary: #DBEAFE;          /* Soft Azure Tint */
    --bg: #E0F2FE;                 /* Dynamic Sky/Azure Tint */
    --bg-gradient: linear-gradient(135deg, #E0F2FE 0%, #BAE6FD 50%, #E0F2FE 100%);
    --surface: #FFFFFF;
    --text-main: #0F172A;          /* Slate Dark (High Contrast) */
    --text-muted: #475569;         /* Slate Muted */
    --danger: #DC2626;
    --danger-border: #991B1B;
    --success: #16A34A;            /* Clinical Green */
    --success-border: #14532D;
    --border: #BAE6FD;             /* Crisp Azure Border */
    --border-strong: #93C5FD;
    --border-dark: #60A5FA;
    --radius: 16px;                /* Clean modern card radius */
    --radius-pill: 100px;          /* Pill shape */
    --radius-btn: 12px;            /* Well-defined tactile buttons */
    --shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
    --shadow-lg: 0 10px 25px rgba(37, 99, 235, 0.15);
    --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    --bg-body: var(--bg);
    --bg-card: var(--surface);
    --hover-bg: rgba(37, 99, 235, 0.06);
    --card-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    --input-bg: #FFFFFF;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', 'Outfit', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #E0F2FE 0%, #BAE6FD 50%, #E0F2FE 100%);
    background-attachment: fixed;
    color: var(--text-main);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

#app {
    display: flex;
    width: 100%;
    height: 100%;
    flex: 1;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 260px;
    height: 100vh;
    background-color: #FFFFFF;
    border-right: 2px solid #BAE6FD;
    display: flex;
    flex-direction: column;
    padding: 16px 0 0 0;
    z-index: 10;
    overflow: hidden;
    box-shadow: 4px 0 20px rgba(37, 99, 235, 0.06);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px 20px;
    color: var(--primary);
    flex-shrink: 0;
}

.logo h1 {
    font-size: 22px;
    font-weight: 700;
}

.logo-icon {
    font-size: 30px;
}

nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 10px 16px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 120, 212, 0.25) transparent;
}

/* Custom modern subtle scrollbar for sidebar nav */
nav::-webkit-scrollbar {
    width: 5px;
}

nav::-webkit-scrollbar-track {
    background: transparent;
}

nav::-webkit-scrollbar-thumb {
    background: rgba(0, 120, 212, 0.2);
    border-radius: 10px;
}

nav::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 120, 212, 0.45);
}


/* === SIDEBAR NAV ITEMS — Circle Icon + Tooltip === */
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    text-decoration: none;
    color: #475569;
    font-weight: 600;
    font-size: 13.5px;
    border: 1.5px solid transparent;
    border-radius: 12px;
    transition: var(--transition);
    position: relative;
}

.nav-item:hover {
    background-color: #EFF6FF;
    border-color: #BAE6FD;
    color: #1D4ED8;
}

.nav-item.active {
    background: linear-gradient(135deg, #DBEAFE 0%, #EFF6FF 100%);
    border-color: #3B82F6;
    color: #1D4ED8;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

/* Circle icon wrapper inside each nav-item */
.nav-icon-circle {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: var(--transition);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.nav-item:hover .nav-icon-circle,
.nav-item.active .nav-icon-circle {
    box-shadow: 0 3px 10px rgba(0,0,0,0.14);
    transform: scale(1.08);
}

/* Tooltip on hover — shows nav label */
.nav-item .nav-tooltip {
    position: absolute;
    left: 58px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-dark);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

.nav-item .nav-tooltip::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: var(--primary-dark);
}

/* Only show tooltip when sidebar is in icon-only mode */
.sidebar.icon-only .nav-item:hover .nav-tooltip {
    opacity: 1;
}

/* Nav item label (the text next to icon) */
.nav-label {
    white-space: nowrap;
    overflow: hidden;
    font-size: 13.5px;
    font-weight: 600;
}

/* Per-icon gradient colors */
.nav-icon-dashboard   { background: linear-gradient(135deg, #1565C0, #42A5F5); color: white; }
.nav-icon-clients     { background: linear-gradient(135deg, #00695C, #26A69A); color: white; }
.nav-icon-patients    { background: linear-gradient(135deg, #2E7D32, #66BB6A); color: white; }
.nav-icon-consult     { background: linear-gradient(135deg, #1976D2, #64B5F6); color: white; }
.nav-icon-prescrit    { background: linear-gradient(135deg, #6A1B9A, #AB47BC); color: white; }
.nav-icon-inventaire  { background: linear-gradient(135deg, #E65100, #FFA726); color: white; }
.nav-icon-commandes   { background: linear-gradient(135deg, #AD1457, #EC407A); color: white; }
.nav-icon-grossistes  { background: linear-gradient(135deg, #F57F17, #FFEE58); color: #5D4037; }
.nav-icon-campagnes   { background: linear-gradient(135deg, #00838F, #26C6DA); color: white; }
.nav-icon-avicoles    { background: linear-gradient(135deg, #558B2F, #9CCC65); color: white; }
.nav-icon-compta      { background: linear-gradient(135deg, #0078d4, #00a2ed); color: white; }
.nav-icon-messagerie  { background: linear-gradient(135deg, #283593, #5C6BC0); color: white; }
.nav-icon-settings    { background: linear-gradient(135deg, #37474F, #78909C); color: white; }
.nav-icon-admin       { background: linear-gradient(135deg, #B71C1C, #EF5350); color: white; }
.nav-icon-fournisseur { background: linear-gradient(135deg, #4527A0, #7E57C2); color: white; }
.nav-icon-agenda      { background: linear-gradient(135deg, #1A237E, #5C6BC0); color: white; }

/* === AGENDA CALENDAR STYLES === */
.agenda-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.agenda-day-header {
    text-align: center;
    font-weight: 700;
    font-size: 12px;
    color: var(--text-muted);
    padding: 8px 0;
    text-transform: uppercase;
}

.agenda-day-cell {
    min-height: 50px;
    border-radius: 10px;
    padding: 6px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    position: relative;
}

.agenda-day-cell:hover {
    background: var(--secondary);
    border-color: var(--primary-light);
}

.agenda-day-cell.today {
    background: var(--secondary);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 800;
}

.agenda-day-cell.has-rdv::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
}

.agenda-day-cell.has-rdv-many::after {
    background: #E65100;
}

.agenda-day-cell.other-month {
    color: var(--border);
}

.agenda-rdv-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
}

.agenda-rdv-item:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.status-indicator {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--success);
    font-size: 14px;
    font-weight: 500;
    border-top: 1px solid var(--border);
    margin-top: auto;
    flex-shrink: 0;
    background-color: var(--surface);
}


/* Skype Avatar Presence Style */
.skype-avatar-container {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--secondary);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
    border: 1px solid rgba(0, 120, 212, 0.15);
}

.skype-presence {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 11px;
    height: 11px;
    background-color: var(--success);
    border: 2px solid var(--surface);
    border-radius: 50%;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: transparent;
}

header {
    height: 72px;
    background-color: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 2px solid #BAE6FD;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.05);
}

header h2 {
    font-weight: 600;
    font-size: 24px;
}

.page-container {
    padding: 32px;
    overflow-y: auto;
    flex: 1;
}

/* Buttons — Délimités & Tactiles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 20px;
    border: 2px solid transparent;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    user-select: none;
    letter-spacing: 0.2px;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: linear-gradient(180deg, #2563EB 0%, #1D4ED8 100%) !important;
    color: #FFFFFF !important;
    border: 2px solid #1E40AF !important;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #3B82F6 0%, #2563EB 100%) !important;
    border-color: #1D4ED8 !important;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
    transform: translateY(-1px);
}

.btn-outline {
    background-color: #FFFFFF !important;
    border: 2px solid #2563EB !important;
    color: #1D4ED8 !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.08);
}

.btn-outline:hover {
    background-color: #EFF6FF !important;
    border-color: #1D4ED8 !important;
    color: #1E40AF !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #F8FAFC !important;
    border: 2px solid #94A3B8 !important;
    color: #334155 !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.04);
}

.btn-secondary:hover {
    background-color: #F1F5F9 !important;
    border-color: #64748B !important;
    color: #0F172A !important;
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(180deg, #EF4444 0%, #DC2626 100%) !important;
    border: 2px solid #B91C1C !important;
    color: #FFFFFF !important;
    box-shadow: 0 3px 10px rgba(220, 38, 38, 0.35);
}

.btn-danger:hover {
    background: linear-gradient(180deg, #F87171 0%, #EF4444 100%) !important;
    border-color: #991B1B !important;
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(180deg, #16A34A 0%, #15803D 100%) !important;
    border: 2px solid #166534 !important;
    color: #FFFFFF !important;
    box-shadow: 0 3px 10px rgba(22, 163, 74, 0.35);
}

.btn-success:hover {
    background: linear-gradient(180deg, #22C55E 0%, #16A34A 100%) !important;
    border-color: #14532D !important;
    transform: translateY(-1px);
}

/* Cards */
.card {
    background-color: #FFFFFF;
    border-radius: var(--radius);
    padding: 24px;
    border: 2px solid #BAE6FD;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    transition: var(--transition);
}

.card:hover {
    border-color: #60A5FA;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
}

/* Grid Layouts */
.grid-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

@media (min-width: 1100px) {
    .grid-stats {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

.comptabilite-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
}
@media (min-width: 992px) {
    .comptabilite-layout {
        grid-template-columns: 2fr 1fr;
    }
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    padding: 28px 20px !important;
    border-radius: 20px !important;
    border: none !important;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

/* Subtle shine effect on gradient cards */
.stat-card::after {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.22) !important;
    filter: brightness(1.06);
}

.stat-icon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(255,255,255,0.22);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transition: var(--transition);
    border: 2px solid rgba(255,255,255,0.3);
}

.stat-card:hover .stat-icon {
    transform: scale(1.10);
    background: rgba(255,255,255,0.32);
}

.stat-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stat-info h3 {
    font-size: 28px;
    font-weight: 800;
    color: white;
    text-shadow: 0 1px 4px rgba(0,0,0,0.18);
}

.stat-info p {
    font-size: 12.5px;
    color: rgba(255,255,255,0.88);
    font-weight: 600;
    line-height: 1.3;
}


/* Tables */
.table-container {
    background: #FFFFFF;
    border-radius: var(--radius);
    border: 2px solid #BAE6FD;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    margin-top: 16px;
}

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

th, td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid #E2E8F0;
}

th {
    background-color: #EFF6FF;
    border-bottom: 2px solid #BAE6FD;
    font-weight: 700;
    color: #1E40AF;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background-color: #F8FAFC;
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-clinic { background-color: #E1F5FE; color: #0288D1; }
.badge-rural { background-color: #E8F5E9; color: #388E3C; }

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(23, 37, 42, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 1;
    transition: var(--transition);
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal {
    background-color: var(--surface);
    width: 100%;
    max-width: 600px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.modal.modal-sm {
    max-width: 450px;
}
.modal.modal-md {
    max-width: 650px;
}
.modal.modal-lg {
    max-width: 900px;
}
.modal.modal-xl {
    max-width: 1200px;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 20px;
}

.btn-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 11px 16px;
    border: 2px solid #CBD5E1;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14.5px;
    background-color: #FFFFFF;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: #2563EB;
    background-color: #FFFFFF;
    box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.18);
}

.form-row {
    display: flex;
    gap: 16px;
}
.form-row > .form-group {
    flex: 1;
}

/* ==========================================
   AUTH PAGES — Login & Registration
   ========================================== */

@keyframes authBgShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #DBEAFE 0%, #BAE6FD 50%, #93C5FD 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    z-index: 1000;
    transition: opacity 0.6s ease;
    padding: 20px;
}

#login-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    display: none !important;
    visibility: hidden !important;
}

.login-card {
    background: #FFFFFF;
    border: 2.5px solid #60A5FA;
    padding: 44px 38px;
    border-radius: 22px;
    box-shadow: 
        0 25px 60px -12px rgba(30, 58, 138, 0.25),
        0 8px 24px rgba(37, 99, 235, 0.15);
    width: 100%;
    max-width: 440px;
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
    margin: auto;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--primary);
    margin-bottom: 12px;
}

.login-logo h1 {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #2B7A78, #3AAFA9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-logo .material-icons-outlined {
    font-size: 40px;
    color: var(--primary);
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 32px;
    font-weight: 400;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    margin-bottom: 28px;
    border-radius: 14px;
    background: #EFF6FF;
    border: 2px solid #BFDBFE;
    padding: 4px;
    gap: 4px;
}

.auth-tab {
    flex: 1;
    padding: 10px 16px;
    border: 1.5px solid transparent;
    background: transparent;
    color: #475569;
    font-family: inherit;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.auth-tab.active {
    background: #2563EB;
    border-color: #1D4ED8;
    color: white;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.35);
}

.auth-tab:not(.active):hover {
    background: rgba(43, 122, 120, 0.1);
    color: var(--primary);
}

/* Auth Forms */
.auth-form {
    display: none;
    text-align: left;
}

.auth-form.active {
    display: block;
    animation: fadeInUp 0.4s ease-out;
}

.auth-form .form-group {
    margin-bottom: 18px;
}

.auth-form .form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
    display: block;
    letter-spacing: 0.3px;
}

.auth-form .form-control {
    padding: 12px 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    font-size: 15px;
    transition: var(--transition);
    background: white;
}

.auth-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.12);
}

.auth-form .form-row {
    display: flex;
    gap: 12px;
}

.auth-form .form-row > .form-group {
    flex: 1;
}

/* Auth Buttons */
.btn-auth-submit {
    width: 100%;
    padding: 14px 20px;
    border: 1px solid var(--primary-dark);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    font-family: inherit;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
}

.btn-auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(43, 122, 120, 0.4);
}

.btn-auth-submit:active {
    transform: translateY(0);
}

.btn-auth-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-auth-submit .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.btn-auth-submit.loading .spinner {
    display: inline-block;
}

.btn-auth-submit.loading .btn-text {
    display: none;
}

/* Auth Error */
#auth-error {
    color: #D32F2F;
    background-color: #FFEBEE;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    display: none;
    text-align: center;
    border: 1px solid #FFCDD2;
    animation: fadeInUp 0.3s ease;
}

#auth-error.visible {
    display: block;
}

/* Auth Success */
.auth-success {
    color: #388E3C;
    background-color: #E8F5E9;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    border: 1px solid #C8E6C9;
    display: none;
}

.auth-success.visible {
    display: block;
    animation: fadeInUp 0.3s ease;
}

/* Auth Footer */
.auth-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-footer a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

/* Version badge */
.auth-version {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1px;
}

/* Responsive Auth */
@media (max-width: 480px) {
    .login-card {
        padding: 32px 24px;
        border-radius: 16px;
    }
    .login-logo h1 {
        font-size: 26px;
    }
    .auth-form .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Print Styles for Invoice */
@media print {
    body {
        background-color: white;
    }
    .sidebar, header, .no-print, .actions, .grid-stats {
        display: none !important;
    }
    .main-content {
        overflow: visible;
        display: block;
    }
    .page-container {
        padding: 0;
        overflow: visible;
    }
    .modal-overlay {
        position: absolute;
        top: 0;
        left: 0;
        background: white;
        backdrop-filter: none;
        width: 100%;
        height: 100%;
        align-items: flex-start;
        justify-content: center;
        padding: 0;
    }
    .modal {
        box-shadow: none;
        max-width: 100%;
        width: 100%;
        border-radius: 0;
    }
    .modal-header {
        display: none;
    }
    .modal-body {
        padding: 0;
        overflow: visible;
    }
}

/* Order Panel Styles */
.order-layout {
    display: flex;
    gap: 24px;
    margin-top: 20px;
    align-items: flex-start;
}

.order-catalog {
    flex: 2;
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.order-cart-panel {
    flex: 1;
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    position: sticky;
    top: 24px;
}

.cart-items-list {
    margin: 16px 0;
    padding: 0;
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.cart-item-info {
    flex: 1;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-qty-btn {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
}

.cart-qty-btn:hover {
    background: var(--bg);
}

/* CSV Upload Drag & Drop Area */
.csv-upload-zone {
    border: 2px dashed var(--primary);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    background: #F4FAF8;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 24px;
}

.csv-upload-zone:hover, .csv-upload-zone.dragover {
    background: #E8F5E9;
    border-color: #388E3C;
}

.csv-upload-icon {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 12px;
}

.csv-preview-table-container {
    max-height: 250px;
    overflow-y: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin: 16px 0;
}

.csv-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.csv-preview-table th, .csv-preview-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.csv-preview-table th {
    background: var(--bg);
    position: sticky;
    top: 0;
    font-weight: 600;
}

/* Supplier product badge or store status */
.badge-order-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status-en-attente {
    background-color: #FFF3E0;
    color: #E65100;
}

.status-confirmee {
    background-color: #E8EAF6;
    color: #3F51B5;
}

.status-expediee {
    background-color: #E0F7FA;
    color: #00838F;
}

.status-livree {
    background-color: #E8F5E9;
    color: #2E7D32;
}

.status-annulee {
    background-color: #FFEBEE;
    color: #C62828;
}

/* Product Thumbnails */
.product-thumbnail {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    flex-shrink: 0;
}

.product-thumbnail-fallback {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Badge for Notice Link */
.badge-notice {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(43, 122, 120, 0.08);
    color: var(--primary);
    border: 1px solid rgba(43, 122, 120, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 4px;
    font-family: inherit;
}

.badge-notice:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 6px rgba(43, 122, 120, 0.2);
}

/* Medical Leaflet (Notice View) */
.medical-leaflet {
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--text-main);
    line-height: 1.6;
}

.medical-leaflet-header {
    border-bottom: 2px solid var(--primary);
    padding-bottom: 12px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.medical-leaflet-header h2 {
    margin: 0;
    font-size: 20px;
    color: var(--primary);
    font-weight: 700;
}

.medical-leaflet-section {
    margin-bottom: 16px;
}

.medical-leaflet-section h4 {
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.medical-leaflet-section p {
    margin: 0;
    font-size: 13.5px;
    color: var(--text-muted);
}

/* ==========================================
   ANIMATIONS & OVERLAYS (Welcome & Thank You)
   ========================================== */

/* Welcome Overlay */
.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(23, 37, 42, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: opacity 0.5s ease-in-out;
}

.welcome-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.welcome-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    padding: 40px 32px;
    width: 90%;
    max-width: 460px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    transform: scale(0.9);
    animation: welcomeCardEnter 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes welcomeCardEnter {
    to {
        transform: scale(1);
    }
}

.welcome-icon-container {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--surface) 100%);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 8px 16px rgba(43, 122, 120, 0.12);
}

.welcome-icon-container .material-icons-outlined {
    font-size: 40px;
    animation: welcomeSunSpin 12s linear infinite;
}

@keyframes welcomeSunSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.welcome-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
    opacity: 0;
    animation: welcomeFadeInUp 0.6s ease 0.2s forwards;
}

.welcome-subtitle {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 28px;
    opacity: 0;
    animation: welcomeFadeInUp 0.6s ease 0.4s forwards;
}

@keyframes welcomeFadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-btn {
    padding: 12px 32px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    font-weight: 700;
    border: 1px solid var(--primary-dark);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(43, 122, 120, 0.3);
    transition: all 0.2s;
    font-size: 15px;
    font-family: inherit;
    opacity: 0;
    animation: welcomeFadeInUp 0.6s ease 0.6s forwards;
}

.welcome-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(43, 122, 120, 0.4);
}

/* Thank You & Confetti Overlay */
.thankyou-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(23, 37, 42, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2500;
    transition: opacity 0.4s ease-in-out;
}

.thankyou-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.thankyou-modal {
    background: var(--surface);
    border-radius: 24px;
    padding: 40px 32px;
    width: 90%;
    max-width: 440px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    animation: thankyouEnter 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.2) forwards;
    position: relative;
}

@keyframes thankyouEnter {
    to {
        transform: scale(1);
    }
}

/* SVG Success Checkmark Animation */
.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
}

.success-checkmark .check-icon {
    width: 80px;
    height: 80px;
    position: relative;
    border-radius: 50%;
    box-sizing: content-box;
    border: 4px solid rgba(39, 174, 96, .2);
}

.success-checkmark .check-icon::after {
    top: 4px;
    left: 4px;
    width: 72px;
    height: 72px;
    position: absolute;
    border-radius: 50%;
    content: "";
}

.success-checkmark .check-icon .icon-line {
    height: 5px;
    background-color: var(--success);
    display: block;
    border-radius: 2px;
    position: absolute;
    z-index: 10;
}

.success-checkmark .check-icon .icon-line.line-tip {
    top: 46px;
    left: 14px;
    width: 25px;
    transform: rotate(45deg);
    animation: icon-line-tip 0.75s;
}

.success-checkmark .check-icon .icon-line.line-long {
    top: 38px;
    right: 8px;
    width: 47px;
    transform: rotate(-45deg);
    animation: icon-line-long 0.75s;
}

.success-checkmark .check-icon .icon-circle {
    top: -4px;
    left: -4px;
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid var(--success);
    box-sizing: content-box;
    z-index: 2;
}

@keyframes icon-line-tip {
    0% {
        width: 0;
        left: 1px;
        top: 19px;
    }
    54% {
        width: 0;
        left: 1px;
        top: 19px;
    }
    70% {
        width: 50px;
        left: -8px;
        top: 37px;
    }
    84% {
        width: 17px;
        left: 21px;
        top: 48px;
    }
    100% {
        width: 25px;
        left: 14px;
        top: 46px;
    }
}

@keyframes icon-line-long {
    0% {
        width: 0;
        right: 46px;
        top: 54px;
    }
    65% {
        width: 0;
        right: 46px;
        top: 54px;
    }
    84% {
        width: 55px;
        right: 0px;
        top: 35px;
    }
    100% {
        width: 47px;
        right: 8px;
        top: 38px;
    }
}

.thankyou-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
}

.thankyou-subtitle {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 24px;
}

.thankyou-badge {
    display: inline-block;
    padding: 6px 16px;
    background: #E8F5E9;
    color: var(--success);
    border-radius: 30px;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 24px;
    border: 1px solid rgba(39, 174, 96, 0.2);
}

.thankyou-btn {
    padding: 10px 24px;
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text-main);
    font-weight: 600;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-family: inherit;
}

.thankyou-btn:hover {
    background: var(--border);
}

/* Confetti CSS Explosion */
.confetti-particle {
    position: fixed;
    z-index: 2600;
    pointer-events: none;
    opacity: 0;
    animation: confetti-explode 2.5s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes confetti-explode {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translate3d(var(--x), var(--y), 0) rotate(var(--r));
    }
}

/* ==========================================
   FLOATING DROPLET TOAST NOTIFICATIONS
   ========================================== */

.droplet-toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: none;
}

.droplet-toast {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(43, 122, 120, 0.25);
    border-radius: 20px;
    padding: 16px 20px 16px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 
        0 10px 30px rgba(43, 122, 120, 0.12),
        inset 0 0 12px rgba(255, 255, 255, 0.6);
    max-width: 360px;
    animation: 
        droplet-pop-in 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards,
        droplet-float 4s ease-in-out infinite 0.6s;
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
}

.droplet-toast:hover {
    transform: scale(1.02) translateY(-3px);
    box-shadow: 0 15px 35px rgba(43, 122, 120, 0.2);
    background: rgba(255, 255, 255, 0.95);
}

/* Liquid droplet shape */
.droplet-shape {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 10px rgba(43, 122, 120, 0.25);
    flex-shrink: 0;
    position: relative;
}

/* Droplet shiny specular highlight */
.droplet-shape::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 10px;
    width: 8px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    transform: rotate(-15deg);
}

.droplet-shape .material-icons-outlined {
    font-size: 22px;
}

.droplet-info {
    flex: 1;
}

.droplet-title {
    font-weight: 700;
    color: var(--primary);
    font-size: 14px;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.droplet-desc {
    font-size: 13px;
    color: var(--text-main);
    font-weight: 600;
    line-height: 1.4;
}

.droplet-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.droplet-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s;
    align-self: flex-start;
    margin-top: -4px;
    margin-right: -8px;
}

.droplet-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-main);
}

@keyframes droplet-pop-in {
    0% {
        transform: scale(0.5) translateY(100px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes droplet-float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Sidebar navigation badge */
.sidebar-badge {
    background-color: var(--danger);
    color: white;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    margin-left: auto;
    display: inline-block;
    box-shadow: 0 2px 5px rgba(231, 76, 60, 0.3);
}

/* Splash Screen Styles */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #e6f5fc 0%, #ffffff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 1;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.splash-screen.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -99999 !important;
}

.splash-content {
    text-align: center;
    animation: splashFadeIn 1s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

.splash-logo {
    width: 100px;
    height: 100px;
    border-radius: 24px;
    box-shadow: 0 8px 24px rgba(0, 120, 212, 0.15);
    margin-bottom: 20px;
    object-fit: cover;
    animation: pulseLogo 2s infinite ease-in-out;
}

.splash-title {
    font-size: 38px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.splash-slogan {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 30px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.4;
}

.splash-loader {
    display: flex;
    justify-content: center;
    align-items: center;
}

.splash-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(0, 120, 212, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spinLoader 0.8s linear infinite;
}

@keyframes splashFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulseLogo {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 24px rgba(0, 120, 212, 0.15);
    }
    50% {
        transform: scale(1.04);
        box-shadow: 0 12px 30px rgba(0, 120, 212, 0.25);
    }
}

@keyframes spinLoader {
    to {
        transform: rotate(360deg);
    }
}

/* Messaging Layout Skype Theme */
.messaging-container {
    display: flex;
    height: calc(100vh - 120px);
    background-color: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.messaging-sidebar {
    width: 300px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    background-color: var(--surface);
    flex-shrink: 0;
}

.messaging-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: 18px;
    color: var(--primary);
}

.messaging-search-wrapper {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
}

.messaging-contact-list {
    flex: 1;
    overflow-y: auto;
}

.messaging-contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, 0.02);
    transition: var(--transition);
}

.messaging-contact-item:hover {
    background-color: rgba(0, 120, 212, 0.03);
}

.messaging-contact-item.active {
    background-color: var(--secondary);
}

.messaging-contact-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: white;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.messaging-contact-info {
    flex: 1;
    min-width: 0;
}

.messaging-contact-name {
    font-weight: 700;
    font-size: 14.5px;
    color: var(--text-main);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.messaging-contact-lastmsg {
    font-size: 12.5px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.messaging-contact-badge {
    background-color: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    padding: 2px 7px;
    min-width: 18px;
    text-align: center;
    margin-left: auto;
}

.messaging-chat-window {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #f7f9fb;
}

.messaging-chat-header {
    padding: 16px 24px;
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.messaging-chat-header-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-main);
}

.messaging-chat-header-status {
    font-size: 12px;
    color: var(--success);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.messaging-chat-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.messaging-chat-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    gap: 12px;
}

.messaging-chat-empty span {
    font-size: 48px;
    color: rgba(0, 120, 212, 0.2);
}

.message-bubble-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 70%;
}

.message-bubble-wrapper.sent {
    align-self: flex-end;
    align-items: flex-end;
}

.message-bubble-wrapper.received {
    align-self: flex-start;
    align-items: flex-start;
}

.message-bubble {
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 14.5px;
    line-height: 1.4;
    word-break: break-word;
}

.message-bubble-wrapper.sent .message-bubble {
    background-color: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 120, 212, 0.15);
}

.message-bubble-wrapper.received .message-bubble {
    background-color: var(--surface);
    color: var(--text-main);
    border-bottom-left-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border);
}

.message-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.messaging-chat-input-area {
    padding: 16px 24px;
    background-color: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.messaging-chat-input-wrapper {
    flex: 1;
    position: relative;
}

.messaging-chat-btn-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0, 120, 212, 0.15);
}

.messaging-chat-btn-send:hover {
    background-color: var(--primary-light);
    transform: scale(1.05);
}

.messaging-chat-btn-send:active {
    transform: scale(0.95);
}

/* === Notification Bell System === */
.notification-bell {
    position: relative;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.notification-bell:hover {
    background: var(--bg-hover, rgba(0,0,0,0.05));
    transform: scale(1.1);
}
.notification-bell .material-icons-outlined {
    font-size: 26px;
    color: var(--text-main);
}
.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #EF4444;
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 1px 4px rgba(239,68,68,0.4);
    animation: notif-pulse 2s infinite;
}
@keyframes notif-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}
.notification-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-height: 400px;
    overflow-y: auto;
    background: var(--card-bg, #fff);
    border-radius: var(--radius, 12px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
    z-index: 1000;
    border: 1px solid var(--border);
    padding: 0;
}
.notification-dropdown-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: 14px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}
.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.notification-item:last-child {
    border-bottom: none;
}
.notification-item:hover {
    background: var(--bg-hover, rgba(0,0,0,0.03));
}
.notification-item .notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #FEF3C7;
    color: #D97706;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.notification-item .notif-icon .material-icons-outlined {
    font-size: 20px;
}
.notification-item .notif-content {
    flex: 1;
}
.notification-item .notif-content .notif-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-main);
    margin-bottom: 2px;
}
.notification-item .notif-content .notif-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}
.notification-item .notif-action {
    flex-shrink: 0;
    align-self: center;
}
.notification-empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

@keyframes pulse-alert {
    0% {
        box-shadow: 0 4px 12px rgba(230, 81, 0, 0.15);
    }
    50% {
        box-shadow: 0 4px 20px rgba(230, 81, 0, 0.3);
    }
    100% {
        box-shadow: 0 4px 12px rgba(230, 81, 0, 0.15);
    }
}

@keyframes key-bounce {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-4px);
    }
}






/* ==========================================================================
   DRAWER / PANNEAU LATÉRAL MODERNE (VETOASIS)
   ========================================================================== */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    z-index: 1200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.drawer-panel {
    position: fixed;
    top: 0;
    right: -550px;
    width: 520px;
    max-width: 90vw;
    height: 100vh;
    background: #ffffff;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.12);
    z-index: 1201;
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-overlay.active .drawer-panel {
    right: 0;
}

.drawer-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fafbfc;
}

.drawer-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.drawer-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.drawer-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    background: #fafbfc;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-drawer-close {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-muted);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.btn-drawer-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}
/* =========================================================================
   FOURNISSEUR STORE & SHOPPING CART STYLES (E-COMMERCE & B2B)
   ========================================================================= */

.store-hero-card {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    color: #FFFFFF;
    border-radius: 16px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.2);
    margin-bottom: 24px;
}

.store-hero-badge-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.store-badge-item {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #F1F5F9;
}

.store-badge-item .material-icons-outlined {
    font-size: 16px;
    color: #38BDF8;
}

.store-product-card {
    background: #FFFFFF;
    border-radius: 14px;
    border: 1px solid #E2E8F0;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    position: relative;
}

.store-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px -6px rgba(0, 120, 212, 0.12);
    border-color: #93C5FD;
}

.store-qty-stepper {
    display: flex;
    align-items: center;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    background: #F8FAFC;
    overflow: hidden;
}

.store-qty-stepper button {
    border: none;
    background: transparent;
    width: 32px;
    height: 32px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.store-qty-stepper button:hover {
    background: #E2E8F0;
    color: #0078D4;
}

.store-qty-stepper input {
    width: 44px;
    border: none;
    background: transparent;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    color: #0F172A;
}

/* Cart Drawer Styles */
.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(3px);
    z-index: 99998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-drawer-overlay.active {
    display: block;
    opacity: 1;
}

.cart-drawer-content {
    position: fixed;
    top: 0;
    right: -480px;
    width: 460px;
    max-width: 95vw;
    height: 100vh;
    background: #FFFFFF;
    z-index: 99999;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.cart-drawer-content.active {
    right: 0;
}

.cart-franco-bar-container {
    background: #F1F5F9;
    border-radius: 10px;
    height: 10px;
    overflow: hidden;
    margin: 8px 0;
}

.cart-franco-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #F59E0B, #10B981);
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* =========================================================================
   MOBILE & TABLET RESPONSIVE STYLES
   ========================================================================= */

/* --- Hamburger Menu Button (hidden on desktop) --- */
.btn-mobile-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    padding: 6px;
    border-radius: 10px;
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
}
.btn-mobile-menu:hover,
.btn-mobile-menu:active {
    background: var(--secondary);
    color: var(--primary);
}
.btn-mobile-menu .material-icons-outlined {
    font-size: 28px;
}

/* --- Mobile Sidebar Overlay Backdrop --- */
.mobile-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9;
    opacity: 0;
    transition: opacity 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}
.mobile-sidebar-overlay.active {
    opacity: 1;
}

/* ===================== TABLET  (≤ 1024px) ===================== */
@media (max-width: 1024px) {

    /* Sidebar becomes narrow on tablets */
    .sidebar {
        width: 220px;
    }

    header {
        padding: 0 20px;
        height: 64px;
    }
    header h2 {
        font-size: 20px;
    }

    .page-container {
        padding: 20px;
    }

    /* Stat cards stack 2 cols */
    .grid-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }

    /* Forms go column on tablet */
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    /* Smaller modal */
    .modal {
        max-width: 95vw;
    }
    .modal.modal-lg {
        max-width: 95vw;
    }
    .modal.modal-xl {
        max-width: 98vw;
    }

    /* Order layout stack */
    .order-layout {
        flex-direction: column;
    }
    .order-cart-panel {
        position: relative;
        top: 0;
    }

    /* Table cells smaller padding */
    th, td {
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* ===================== MOBILE (≤ 768px) ===================== */
@media (max-width: 768px) {

    /* Body allows scroll on mobile */
    body {
        flex-direction: column;
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
    }

    /* Show hamburger */
    .btn-mobile-menu {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Sidebar is off-screen by default, slides in */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        height: 100dvh;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: none;
    }
    .sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: 8px 0 30px rgba(0, 0, 0, 0.15);
    }

    /* Mobile overlay is visible */
    .mobile-sidebar-overlay {
        display: block;
        pointer-events: none;
    }
    .mobile-sidebar-overlay.active {
        pointer-events: auto;
    }

    /* Main content takes full width */
    .main-content {
        width: 100%;
    }

    /* Header compact */
    header {
        height: 56px;
        padding: 0 12px;
        gap: 8px;
    }
    header h2 {
        font-size: 17px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 200px;
    }

    /* Header actions compact */
    .actions {
        gap: 6px !important;
    }
    .actions .btn {
        padding: 7px 12px;
        font-size: 12px;
    }
    /* Hide button text on mobile, show only icon */
    .actions .btn .material-icons-outlined {
        font-size: 18px;
    }
    #btn-new-consult .btn-text-label,
    #btn-vente-comptoir span:not(.material-icons-outlined) {
        display: none;
    }

    /* Page content */
    .page-container {
        padding: 14px;
    }

    /* Cards */
    .card {
        padding: 16px;
        border-radius: 14px;
    }

    /* Stat grid — 2 cols on mobile */
    .grid-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
        margin-bottom: 16px;
    }
    .stat-card {
        padding: 18px 12px !important;
        border-radius: 14px !important;
    }
    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }
    .stat-info h3 {
        font-size: 20px;
    }
    .stat-info p {
        font-size: 11px;
    }

    /* Tables: horizontally scrollable */
    .table-container {
        border-radius: 14px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    table {
        min-width: 600px;
    }
    th, td {
        padding: 10px 12px;
        font-size: 12.5px;
        white-space: nowrap;
    }

    /* Modal full screen on mobile */
    .modal-overlay {
        align-items: flex-end;
        padding: 0;
    }
    .modal {
        max-width: 100% !important;
        width: 100% !important;
        border-radius: 20px 20px 0 0;
        max-height: 95vh;
        max-height: 95dvh;
    }
    .modal-header {
        padding: 16px 18px;
    }
    .modal-header h3 {
        font-size: 17px;
    }
    .modal-body {
        padding: 16px 18px;
    }

    /* Drawer full width on mobile */
    .drawer-panel {
        width: 100vw !important;
        max-width: 100vw !important;
    }
    .drawer-header {
        padding: 14px 16px;
    }
    .drawer-body {
        padding: 16px;
    }

    /* Cart drawer full width */
    .cart-drawer-content {
        width: 100vw !important;
        max-width: 100vw !important;
    }

    /* Buttons touch-friendly */
    .btn {
        min-height: 44px;
        padding: 10px 20px;
        font-size: 13.5px;
    }

    /* Form controls touch-friendly */
    .form-control {
        padding: 12px 14px;
        font-size: 16px; /* prevents zoom on iOS */
        border-radius: 12px;
    }
    select.form-control {
        font-size: 16px;
    }

    /* Form rows stack */
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    /* Notification dropdown */
    .notification-dropdown {
        right: -20px !important;
        width: 90vw !important;
        max-width: 360px;
    }

    /* User status footer in sidebar */
    .status-indicator {
        padding: 10px 14px;
        font-size: 13px;
    }

    /* Agenda calendar */
    .agenda-calendar-grid {
        gap: 2px;
    }
    .agenda-day-cell {
        min-height: 36px;
        padding: 4px;
        font-size: 11.5px;
        border-radius: 8px;
    }

    /* Login card */
    .login-card {
        padding: 28px 20px;
        border-radius: 16px;
        max-width: 100%;
    }

    /* Inline grid overrides for JS-generated grids */
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
    }

    /* Comptabilité layout stack */
    .comptabilite-layout {
        grid-template-columns: 1fr !important;
    }

    /* Store hero card */
    .store-hero-card {
        padding: 16px !important;
    }

    /* Badge smaller */
    .badge {
        font-size: 10.5px;
        padding: 3px 8px;
    }
}

/* ===================== SMALL PHONE (≤ 480px) ===================== */
@media (max-width: 480px) {

    /* Sidebar narrower on small phones */
    .sidebar {
        width: 260px;
    }

    /* Header even more compact */
    header {
        height: 50px;
        padding: 0 10px;
    }
    header h2 {
        font-size: 15px;
        max-width: 150px;
    }

    /* Hide "Vente Comptoir" button text entirely on small phones */
    #btn-vente-comptoir {
        padding: 6px 10px !important;
        font-size: 0 !important;
    }
    #btn-vente-comptoir .material-icons-outlined {
        font-size: 20px !important;
    }
    #btn-new-consult {
        padding: 6px 10px !important;
        font-size: 0 !important;
    }
    #btn-new-consult .material-icons-outlined {
        font-size: 20px !important;
    }

    .page-container {
        padding: 10px;
    }

    /* Stat cards 1 col on very small screens */
    .grid-stats {
        grid-template-columns: 1fr !important;
    }

    /* Grids single column */
    .grid {
        grid-template-columns: 1fr !important;
    }

    /* Login */
    .login-card {
        padding: 24px 16px;
    }
    .login-logo h1 {
        font-size: 26px;
    }

    /* Auth form adjustments */
    .auth-tabs {
        flex-direction: column;
        gap: 4px;
    }
    .auth-tab {
        padding: 10px;
        font-size: 13px;
    }

    /* Modal */
    .modal {
        border-radius: 16px 16px 0 0;
        max-height: 100vh;
        max-height: 100dvh;
    }

    /* Nav items */
    .nav-item {
        font-size: 13px;
        padding: 5px 8px;
    }
    .nav-icon-circle {
        width: 34px;
        height: 34px;
        min-width: 34px;
        font-size: 17px;
    }
}

/* ===================== LANDSCAPE PHONE ===================== */
@media (max-height: 500px) and (orientation: landscape) {
    .sidebar {
        padding-top: 8px;
    }
    .logo {
        padding-bottom: 10px !important;
    }
    .nav-item {
        padding: 4px 8px;
    }
    .nav-icon-circle {
        width: 30px;
        height: 30px;
        min-width: 30px;
        font-size: 16px;
    }
    header {
        height: 44px;
    }
    .page-container {
        padding: 10px;
    }
    .modal {
        max-height: 100vh;
    }
}

/* ===================== SAFE AREA (NOTCH) ===================== */
@supports (padding: env(safe-area-inset-top)) {
    .sidebar {
        padding-top: calc(16px + env(safe-area-inset-top));
    }
    header {
        padding-left: calc(12px + env(safe-area-inset-left));
        padding-right: calc(12px + env(safe-area-inset-right));
    }
    .page-container {
        padding-bottom: calc(14px + env(safe-area-inset-bottom));
    }
    .modal {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* ===================== TOUCH & HOVER STATES ===================== */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .stat-card:hover {
        transform: none;
        filter: none;
    }
    .card:hover {
        box-shadow: var(--shadow);
    }
    tr:hover {
        background-color: transparent;
    }
    .btn-primary:hover {
        transform: none;
    }
    .btn-outline:hover {
        transform: none;
    }
    .nav-item:hover {
        background-color: transparent;
        border-color: transparent;
        color: var(--text-muted);
    }
    .nav-item.active:hover {
        background-color: var(--secondary);
        border-color: var(--primary);
        color: var(--primary);
    }
    /* Active/pressed states for touch */
    .btn:active {
        transform: scale(0.97);
        opacity: 0.85;
    }
    .nav-item:active {
        background-color: rgba(0, 120, 212, 0.08);
    }
    .card:active {
        box-shadow: var(--shadow-lg);
    }
}


/* =========================================================================
   ENHANCED MODULES: AGENDA, PATIENT RECORD & DASHBOARD
   ========================================================================= */

/* Agenda Calendar & RDV items */
.agenda-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-top: 10px;
}
.agenda-day-header {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    padding: 4px 0;
}
.agenda-day-cell {
    min-height: 48px;
    padding: 6px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    transition: var(--transition);
}
.agenda-day-cell:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}
.agenda-day-cell.today {
    border-color: var(--primary);
    background: rgba(0, 120, 212, 0.05);
}
.agenda-day-cell.other-month {
    opacity: 0.35;
    background: var(--bg);
}
.agenda-day-cell.has-rdv {
    border-color: var(--primary-light);
}
.agenda-day-cell.has-rdv-many {
    background: rgba(0, 120, 212, 0.1);
}

.agenda-rdv-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
}

/* Dashboard Shortcuts Bar */
.dashboard-shortcuts-bar button {
    transition: all 0.2s ease;
}
.dashboard-shortcuts-bar button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Patient Quick Actions */
.patient-action-bar button:hover {
    transform: translateY(-1px);
}

/* ==========================================================================
   RTL & ARABIC SUPPORT (VetOasis Multilingual System)
   ========================================================================== */
html[dir="rtl"], body.rtl-mode {
    font-family: 'Cairo', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .sidebar {
    border-left: 2px solid #BAE6FD;
    border-right: none;
    box-shadow: -4px 0 20px rgba(37, 99, 235, 0.06);
}

html[dir="rtl"] .logo {
    flex-direction: row;
}

html[dir="rtl"] .nav-item {
    text-align: right;
    flex-direction: row;
}

html[dir="rtl"] .nav-dot {
    margin-left: 0;
    margin-right: auto;
}

html[dir="rtl"] .main-content {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .top-bar {
    direction: rtl;
}

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

html[dir="rtl"] .table-container table th:last-child,
html[dir="rtl"] .table-container table td:last-child {
    text-align: left;
}

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

html[dir="rtl"] .modal-content {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .modal-header .btn-close,
html[dir="rtl"] .modal-close {
    margin-left: 0;
    margin-right: auto;
}

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

html[dir="rtl"] input,
html[dir="rtl"] select,
html[dir="rtl"] textarea {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] input[type="tel"],
html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="password"] {
    direction: ltr;
    text-align: left;
}


