* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: #fafafa;
    color: #1a1a1a;
    overflow-x: hidden;
    line-height: 1.5;
}

/* === LAYOUT PRINCIPAL === */
.main-content {
    margin-left: 280px;
    padding: 2rem;
    transition: margin-left 0.3s ease;
}

.main-content.collapsed {
    margin-left: 80px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* === HEADER MOBILE === */
.mobile-header {
    display: none;
    background: #ffffff;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    align-items: center;
    gap: 1rem;
}

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

/* === BURGER MENU === */
.burger-menu {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
}

.burger-menu span {
    width: 25px;
    height: 3px;
    background-color: #374151;
    transition: 0.3s;
    border-radius: 2px;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* === OVERLAY === */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.overlay.active {
    display: block;
}

/* === SIDEBAR === */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    z-index: 1000;
    transition: transform 0.3s ease, width 0.3s ease;
    overflow-y: hidden;
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar.mobile-hidden {
    transform: translateX(-100%);
}

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

.sidebar-header h2 {
    color: #111827;
    font-size: 1.125rem;
    font-weight: 600;
}

.sidebar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    color: #6b7280;
    font-size: 1.25rem;
    transition: all 0.2s;
}

.sidebar-toggle:hover {
    background-color: #f9fafb;
    color: #374151;
}

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

.sidebar-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 80px); /* Hauteur totale moins le header */
    overflow: hidden; /* Empêcher le scroll */
}

.menu-section {
    margin-bottom: 2rem;
    flex-shrink: 0; /* Empêcher la compression des sections */
}

.menu-section:not(:last-child) {
    overflow-y: auto; /* Permettre le scroll seulement sur les sections du milieu si nécessaire */
}

.menu-section:last-child {
    margin-top: auto;
    margin-bottom: 10px;
    flex-shrink: 0; /* La section compte ne doit jamais se comprimer */
}

.menu-section h3 {
    color: #9ca3af;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    padding: 0 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.menu-list {
    list-style: none;
}

.menu-item {
    width: 100%;
    background: none;
    border: none;
    padding: 0.75rem;
    text-align: left;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 2px;
}

.menu-item:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.menu-icon {
    font-size: 1.125rem;
    width: 20px;
    text-align: center;
    color: #6b7280;
}

.menu-text {
    font-size: 0.875rem;
}

.sidebar.collapsed .menu-text,
.sidebar.collapsed .menu-section h3,
.sidebar.collapsed .sidebar-header h2 {
    display: none;
}

.desktop-only {
    display: block;
}

/* === MODAL === */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #ffffff;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid #e5e7eb;
}

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

.modal-header h2 {
    color: #111827;
    font-size: 1.125rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #9ca3af;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.modal-close:hover {
    color: #6b7280;
    background: #f9fafb;
}

.modal-body {
    padding: 1.5rem;
}

/* === DASHBOARD HEADER === */
.dashboard-header {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.motivation-section {
    flex: 1;
}

.dashboard-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    color: #111827;
}

.motivation-text {
    font-size: 1rem;
    margin: 0;
    color: #6b7280;
    font-weight: 400;
}

.period-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.date-picker-container {
    position: relative;
}

.date-picker-btn {
    background: #f4f6f8;
    border: 1px solid #f4f6f8;
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 200px;
}

.date-picker-btn:hover {
    color:  #0c70f2;
}

.calendar-icon {
    font-size: 1rem;
}

.date-text {
    flex: 1;
    text-align: left;
}

.dropdown-icon {
    font-size: 0.75rem;
    opacity: 0.8;
}

.shop-filter-select {
    background: #f4f6f8;
    border: 1px solid #f4f6f8;
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    color: #000;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 200px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.shop-filter-select:hover {
    color: #0c70f2;
}

.shop-filter-select:focus {
    outline: none;
    border-color: #0077ff;
    box-shadow: 0 0 0 3px rgba(0, 119, 255, 0.1);
}

.compare-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    transition: 0.3s;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .toggle-slider {
    background: rgba(255, 255, 255, 0.4);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-label {
    font-weight: 500;
    font-size: 1rem;
}

/* === CHART SECTION === */
.chart-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid #e5e7eb;
}

.chart-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.chart-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.25rem 0;
}

.chart-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.chart-container {
    position: relative;
    width: 100%;
}

.sales-chart {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    position: relative;
}

.sales-chart .loading-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

/* === STATS GRID === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    position: relative;
}

.stat-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.stat-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.stat-icon {
    font-size: 1.25rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f9fafb;
    color: #6b7280;
}

.stat-info h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.125rem 0;
}

.stat-period {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.stat-change {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    background: #f9fafb;
}

.stat-change.positive {
    color: #059669;
    background: #ecfdf5;
}

.stat-change.negative {
    color: #dc2626;
    background: #fef2f2;
}

.stat-change.neutral {
    color: #6b7280;
    background: #f9fafb;
}

/* === RECENT ORDERS SECTION === */
.recent-orders-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #e5e7eb;
}

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

.section-title h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.25rem 0;
}

.section-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.orders-count-badge {
    background: #f4f6f8;
    color: #000;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-align: center;
}

.badge-number {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

.badge-text {
    font-size: 0.75rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.orders-grid {
    display: grid;
    gap: 1rem;
}

.order-card {
    background: #ffffff;
    border: 1px solid #f3f4f6;
    border-radius: 8px;
    padding: 1.25rem;
    transition: all 0.2s ease;
    border-left: 3px solid #0077ff;
}

.order-card:hover {
    border-color: #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.order-amount {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
}

.order-datetime {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 400;
}

.order-shop {
    margin-top: 0.5rem;
}

.order-shop a {
    color: #0077ff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.order-shop a:hover {
    background: #f0f8ff;
    color: #0066e6;
}

.order-shop a::after {
    content: '↗';
    font-size: 0.75rem;
}

.loading-container {
    display: flex;
    justify-content: center;
    padding: 2rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

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

/* Style pour masquer le spinner une fois les données chargées */
.loaded .loading-spinner {
    display: none;
}
.order-datetime {
    width: 40%;
}

.order-amount {
    width: 30%;
}

.order-shop {
    width: 30%;
    text-align: right;
}

/* === FORMULAIRE === */
.add-shop-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.2s;
    background: #ffffff;
}

.form-group input:focus {
    outline: none;
    border-color: #0077ff;
    box-shadow: 0 0 0 3px rgba(0, 119, 255, 0.1);
}

.submit-btn {
    background-color: #0077ff;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    height: fit-content;
}

.submit-btn:hover {
    background-color: #0066e6;
}

.submit-btn:disabled {
    background-color: #d1d5db;
    cursor: not-allowed;
}

.message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 500;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* === PERFORMANCES PAGE === */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    color: #111827;
    font-size: 1.875rem;
    font-weight: 700;
}

.refresh-btn {
    background: #0077ff;
    border: 1px solid #0077ff;
    border-radius: 8px;
    padding: 0.75rem;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.refresh-btn:hover {
    background: #0066e6;
    border-color: #0066e6;
    transform: rotate(180deg);
}

/* === PERFORMANCES SECTION === */
.performances-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #e5e7eb;
}

.shops-count-badge {
    background: #f4f6f8;
    color: #000;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-align: center;
}

.section-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
}

.section-subtitle span {
    font-weight: 600;
    color: #0077ff;
}

.performances-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.performance-card {
    background: #ffffff;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.performance-card:hover {
    border-color: #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.performance-card.top-performer {
    border-color: #0077ff;
    border-width: 2px;
}

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

.shop-rank {
    font-size: 1.5rem;
    font-weight: 700;
    margin-right: 0.75rem;
    min-width: 40px;
}

.performance-header h3 {
    color: #111827;
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.shop-link {
    text-decoration: none;
    font-size: 1rem;
    color: #0077ff;
    transition: color 0.2s;
}

.shop-link:hover {
    color: #0066e6;
}

.error-message {
    color: #e74c3c;
    font-weight: 500;
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
}

.performance-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #f3f4f6;
}

.stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.stat-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 10px;
}

.stat-count {
    font-size: 0.75rem;
    color: #9ca3af;
}

.stat-item.growth {
    position: relative;
}

.stat-item.primary {
    background: #f8fafc;
    border-color: #0077ff;
}

.stat-item.secondary {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.stat-item.growth.positive {
    background: #ecfdf5;
    border-color: #10b981;
}

.stat-item.growth.positive .stat-value {
    color: #059669;
}

.stat-item.growth.negative {
    background: #fef2f2;
    border-color: #ef4444;
}

.stat-item.growth.negative .stat-value {
    color: #dc2626;
}

.stat-item.growth.neutral {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.stat-item.growth.neutral .stat-value {
    color: #6b7280;
}

.error-container {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.retry-btn {
    background-color: #0077ff;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 1rem;
    transition: all 0.2s;
}

.retry-btn:hover {
    background-color: #0066e6;
}

/* === MANAGE SHOPS PAGE === */
.shops-container {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
}

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

.shops-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.shops-count {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
}

.shops-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.shop-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s;
    background: #ffffff;
}

.shop-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.shop-item.active {
    border-color: #10b981;
    background: #f0fdf4;
}

.shop-item.error {
    border-color: #ef4444;
    background: #fef2f2;
}

.shop-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.shop-main-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.shop-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.shop-url {
    font-size: 0.875rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
}

.shop-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.status-indicator {
    font-size: 0.875rem;
    font-weight: 500;
}

.shop-item.active .status-indicator {
    color: #059669;
}

.shop-item.error .status-indicator {
    color: #dc2626;
}

.error-detail {
    font-size: 0.75rem;
    color: #dc2626;
    font-style: italic;
}

.shop-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.shop-link-btn, .delete-shop-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s;
    text-decoration: none;
}

.shop-link-btn {
    background-color: #0077ff;
    color: white;
}

.shop-link-btn:hover {
    background-color: #0066e6;
    transform: scale(1.05);
}

.delete-shop-btn {
    background-color: #ef4444;
    color: white;
}

.delete-shop-btn:hover {
    background-color: #dc2626;
    transform: scale(1.05);
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.empty-state p:first-child {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* === MODAL DE SUPPRESSION === */
.delete-confirmation {
    text-align: center;
    margin-bottom: 1.5rem;
}

.delete-confirmation p {
    margin-bottom: 1rem;
}

.shop-to-delete {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.shop-to-delete strong {
    display: block;
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.shop-to-delete small {
    color: #666;
    font-family: monospace;
}

.warning-text {
    color: #ef4444;
    font-weight: 500;
    font-size: 0.875rem;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.cancel-btn, .delete-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.cancel-btn {
    background-color: #6b7280;
    color: white;
}

.cancel-btn:hover {
    background-color: #4b5563;
}

.delete-btn {
    background-color: #ef4444;
    color: white;
}

.delete-btn:hover {
    background-color: #dc2626;
}

.delete-btn:disabled {
    background-color: #d1d5db;
    cursor: not-allowed;
}

/* === EXPORT CSV === */
.export-btn {
    background: #10b981;
    border: 1px solid #10b981;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: white;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.export-btn:hover {
    background: #059669;
    border-color: #059669;
}

.export-btn:disabled {
    background-color: #d1d5db;
    border-color: #d1d5db;
    cursor: not-allowed;
}

.export-options h3 {
    color: #111827;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.columns-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s;
    padding: 0.5rem;
    border-radius: 6px;
}

.checkbox-item:hover {
    background: #ffffff;
    color: #111827;
}

.checkbox-item input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.checkbox-item input[type="checkbox"]:checked {
    background: #0077ff;
    border-color: #0077ff;
}

.checkbox-item input[type="checkbox"]:checked::after {
    content: "✓";
    color: white;
    font-size: 12px;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.checkbox-item input[type="checkbox"]:hover {
    border-color: #0077ff;
}

.export-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.selection-controls {
    display: flex;
    gap: 0.5rem;
}

.select-all-btn, .deselect-all-btn {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    color: #374151;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
}

.select-all-btn:hover {
    background: #e5e7eb;
    color: #111827;
}

.deselect-all-btn:hover {
    background: #e5e7eb;
    color: #111827;
}

.export-download-btn {
    background: #0077ff;
    border: 1px solid #0077ff;
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    color: white;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.export-download-btn:hover {
    background: #0066e6;
    border-color: #0066e6;
}

.export-download-btn:disabled {
    background-color: #d1d5db;
    border-color: #d1d5db;
    cursor: not-allowed;
}

/* === MENU ACTIF === */
.menu-item.active {
    background-color: #0077ff;
    color: white;
}

.menu-item.active .menu-icon {
    color: white;
}

.menu-item.active:hover {
    background-color: #0066e6;
}

/* === RESPONSIVE === */
@media only screen and (max-width: 768px) {
    .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-top: 80px;
    }
    
    .main-content.collapsed {
        margin-left: 0;
    }
    
    .mobile-header {
        display: flex;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.mobile-visible {
        transform: translateX(0);
    }
    
    .desktop-only {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
        padding: 1.5rem;
    }
    
    .dashboard-title {
        font-size: 2rem;
    }
    
    .period-controls {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .date-picker-btn, .shop-filter-select {
        min-width: auto;
        width: 100%;
    }
    
    .chart-section {
        padding: 1rem;
    }
    
    .sales-chart {
        height: 300px;
    }
    
    .order-item {
        gap: 20px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .performances-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .performance-card {
        padding: 1rem;
    }
    
    .stat-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .stat-item {
        padding: 0.75rem;
    }
    
    .stat-value {
        font-size: 1.1rem;
    }
    
    /* Manage shops responsive */
    .shops-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .shop-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
    }
    
    .shop-main-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .shop-actions {
        align-self: flex-end;
        gap: 1rem;
    }
    
    .modal-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .cancel-btn, .delete-btn {
        width: 100%;
    }
    
    /* Period selector responsive */
    .period-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .date-inputs {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .date-range {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .apply-period-btn {
        width: 100%;
        margin-top: 1rem;
    }

    /* Export CSV responsive */
    .export-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }

    .export-btn svg {
        width: 14px;
        height: 14px;
    }

    .columns-selection {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .export-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .selection-controls {
        justify-content: center;
    }

    .export-download-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Styles pour la modal d'ajout de domaine */
.add-domain-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.domain-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.domain-input-group label {
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.domain-input-group input {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.domain-input-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.domain-submit-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.domain-submit-btn:hover {
    background: #2563eb;
}

.domain-submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.domain-icon {
    color: #3b82f6;
}

.domain-success-action {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #d1fae5;
    text-align: center;
}

.domain-open-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.875rem;
}

.domain-open-btn:hover {
    background: #059669;
    color: white;
    text-decoration: none;
}

/* Styles pour la section d'import dans la modal de domaine */
.domain-import-section {
    margin-top: 1rem;
}

.import-divider {
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
}

.import-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

.import-divider span {
    background: white;
    padding: 0 1rem;
    color: #6b7280;
    font-size: 0.875rem;
    position: relative;
    z-index: 1;
}

.domain-import-btn {
    width: 100%;
    background: #f8fafc;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.domain-import-btn:hover {
    background: #f1f5f9;
    border-color: #3b82f6;
    color: #1e40af;
}

.domain-import-btn svg {
    width: 18px;
    height: 18px;
}

.message:empty {
    display: none;
  }

/* === STYLES POUR L'IMPORT CSV === */
.import-step {
    margin-bottom: 2rem;
}

.import-step h3 {
    color: #374151;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.file-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f9fafb;
}

.file-upload-area:hover {
    border-color: #3b82f6;
    background: #f0f9ff;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: #6b7280;
}

.upload-placeholder svg {
    color: #9ca3af;
}

.upload-placeholder p {
    font-weight: 500;
    color: #374151;
}

.upload-placeholder small {
    font-size: 0.75rem;
    color: #6b7280;
}

.file-info {
    background: #f0f9ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
}

.file-info p {
    margin: 0.25rem 0;
    color: #1e40af;
    font-size: 0.875rem;
}

.column-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.column-selection .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.column-selection label {
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.column-selection select {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    background: white;
    transition: border-color 0.2s;
}

.column-selection select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.preview-table {
    margin-top: 1.5rem;
}

.preview-table h4 {
    color: #374151;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.table-container {
    max-height: 300px;
    overflow: auto;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

#previewTableContent {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

#previewTableContent th,
#previewTableContent td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

#previewTableContent th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    position: sticky;
    top: 0;
}

#previewTableContent td {
    color: #6b7280;
}

.import-progress {
    margin-bottom: 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background: #3b82f6;
    transition: width 0.3s ease;
    width: 0%;
}

#progressText {
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
}

.import-results {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
}

.result-item.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.result-item.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.result-icon {
    font-size: 1rem;
    font-weight: bold;
}

.error-list {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
}

.error-list h4 {
    color: #dc2626;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

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

.error-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #fecaca;
    font-size: 0.875rem;
    color: #991b1b;
}

.error-list li:last-child {
    border-bottom: none;
}

/* Responsive pour l'import CSV */
@media (max-width: 768px) {
    .column-selection {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .import-results {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .file-upload-area {
        padding: 1.5rem 1rem;
    }
}