/* Style CSS pour le système de transport de marchandises */

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

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1f2937;
    --light-color: #f3f4f6;
    --white: #ffffff;
    --border-color: #e5e7eb;
    --text-color: #374151;
    --sidebar-width: 260px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.3), transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(99, 102, 241, 0.2), transparent 50%);
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.login-container {
    width: 100%;
    max-width: 480px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: fadeInUp 0.6s ease-out;
}

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

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-header h1 {
    font-size: 32px;
    color: var(--dark-color);
    margin-bottom: 8px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    color: #6b7280;
    font-size: 15px;
    font-weight: 500;
}

.login-form .form-group {
    margin-bottom: 24px;
}

.login-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 14px;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.8);
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: var(--white);
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 20px;
    user-select: none;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.toggle-password:hover {
    opacity: 0.7;
}

.toggle-password:active {
    transform: translateY(-50%) scale(0.95);
}

.login-info {
    text-align: center;
    margin-top: 20px;
    color: #6b7280;
}

.login-info p {
    margin: 5px 0;
}

.login-info a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.3s;
}

.login-info a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.login-form .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    padding: 16px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    margin-top: 10px;
}

.login-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.login-form .btn-primary:active {
    transform: translateY(0);
}

/* Wrapper */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    color: var(--white);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}

.sidebar-header {
    padding: 24px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.sidebar-header h2 {
    font-size: 17px;
    font-weight: 700;
    margin-top: 10px;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: rgba(255, 255, 255, 0.98);
}

.sidebar-logo {
    max-width: 120px;
    max-height: 56px;
    width: auto;
    height: auto;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: block;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    margin: 2px 10px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
}

.nav-item.active {
    background: rgba(37, 99, 235, 0.35);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.nav-item .icon {
    margin-right: 12px;
    font-size: 18px;
    opacity: 0.9;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

.user-info {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
}

.user-name {
    font-weight: 600;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.95);
}

.user-role {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    text-transform: capitalize;
    margin-top: 2px;
}

.btn-logout {
    display: block;
    width: 100%;
    padding: 10px 14px;
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-logout:hover {
    background: var(--danger-color);
    color: var(--white);
    border-color: var(--danger-color);
}

/* Indicateur de connexion (en ligne / hors ligne) */
.connection-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.connection-status .connection-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success-color);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
    animation: connection-pulse-online 2s ease-in-out infinite;
}

.connection-status.offline .connection-dot {
    background: #94a3b8;
    box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.3);
    animation: none;
}

.connection-status.offline .connection-label {
    color: #94a3b8;
}

@keyframes connection-pulse-online {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3); }
    50% { opacity: 0.85; box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2); }
}

.connection-status-sidebar {
    margin-bottom: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
}

.connection-status-sidebar .connection-label {
    color: rgba(255, 255, 255, 0.8);
}

.connection-status-sidebar.offline .connection-dot {
    background: #f87171;
    box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.3);
}

.connection-status-sidebar.offline .connection-label {
    color: rgba(255, 255, 255, 0.6);
}

.connection-status-header {
    margin-right: 16px;
    padding: 6px 12px;
    background: #f1f5f9;
    border-radius: 20px;
}

.connection-status-header .connection-label {
    color: #475569;
}

.connection-status-header.offline {
    background: #fee2e2;
}

.connection-status-header.offline .connection-label {
    color: #991b1b;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.top-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    padding: 20px 32px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    min-height: 72px;
}

.top-header h1 {
    font-size: 24px;
    color: var(--dark-color);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.current-date {
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 14px;
    background: var(--light-color);
    border-radius: 20px;
}

.content {
    padding: 28px 32px 40px;
    flex: 1;
    background: #f8fafc;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark-color);
    letter-spacing: -0.02em;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--white);
    padding: 24px;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.25s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.stat-info h3 {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.stat-info .stat-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--dark-color);
    letter-spacing: -0.02em;
}

.stat-info small {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
    display: block;
}

.stat-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    border-radius: 14px;
    flex-shrink: 0;
}

.stat-card.primary { border-left: 4px solid var(--primary-color); }
.stat-card.primary .stat-icon { background: rgba(37, 99, 235, 0.12); }
.stat-card.success { border-left: 4px solid var(--success-color); }
.stat-card.success .stat-icon { background: rgba(16, 185, 129, 0.12); }
.stat-card.warning { border-left: 4px solid var(--warning-color); }
.stat-card.warning .stat-icon { background: rgba(245, 158, 11, 0.12); }
.stat-card.danger { border-left: 4px solid var(--danger-color); }
.stat-card.danger .stat-icon { background: rgba(239, 68, 68, 0.12); }
.stat-card.info { border-left: 4px solid #3b82f6; }
.stat-card.info .stat-icon { background: rgba(59, 130, 246, 0.12); }

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

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

.btn-success:hover {
    background: #059669;
}

.btn-warning {
    background: var(--warning-color);
    color: var(--white);
}

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

.btn-secondary {
    background: #6b7280;
    color: var(--white);
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Onglets Stocks & Entrepôts */
.stocks-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 0 1.5rem 0;
    margin-bottom: -1px;
    border-bottom: 2px solid var(--border-color);
    background: var(--light-color);
    border-radius: 8px 8px 0 0;
}
.stocks-tabs .tab-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    border: none;
    background: transparent;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
    border-radius: 6px 6px 0 0;
}
.stocks-tabs .tab-item:hover {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary-color);
}
.stocks-tabs .tab-item.active {
    background: var(--white);
    box-shadow: 0 -2px 4px rgba(0,0,0,0.04);
}
/* Couleurs par onglet */
.stocks-tabs .tab-item.tab-stocks { border-left: 3px solid #2563eb; }
.stocks-tabs .tab-item.tab-stocks:hover { background: rgba(37, 99, 235, 0.1); color: #1d4ed8; }
.stocks-tabs .tab-item.tab-stocks.active { color: #2563eb; border-bottom-color: #2563eb; }

.stocks-tabs .tab-item.tab-entrepots { border-left: 3px solid #0d9488; }
.stocks-tabs .tab-item.tab-entrepots:hover { background: rgba(13, 148, 136, 0.1); color: #0f766e; }
.stocks-tabs .tab-item.tab-entrepots.active { color: #0d9488; border-bottom-color: #0d9488; }

.stocks-tabs .tab-item.tab-articles { border-left: 3px solid #ea580c; }
.stocks-tabs .tab-item.tab-articles:hover { background: rgba(234, 88, 12, 0.1); color: #c2410c; }
.stocks-tabs .tab-item.tab-articles.active { color: #ea580c; border-bottom-color: #ea580c; }

.stocks-tabs .tab-item.tab-mouvement { border-left: 3px solid #7c3aed; }
.stocks-tabs .tab-item.tab-mouvement:hover { background: rgba(124, 58, 237, 0.1); color: #6d28d9; }
.stocks-tabs .tab-item.tab-mouvement.active { color: #7c3aed; border-bottom-color: #7c3aed; }

.stocks-tabs .tab-item .tab-icon {
    font-size: 1.1em;
    opacity: 0.9;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

table thead {
    background: var(--light-color);
}

table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 14px;
    border-bottom: 2px solid var(--border-color);
}

table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

table tbody tr:hover {
    background: var(--light-color);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-color: var(--success-color);
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-color: var(--danger-color);
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-color: var(--primary-color);
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-color: var(--warning-color);
}

/* Filter Section */
.filter-section {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

/* Actions */
.actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    background: transparent;
}

.action-btn-edit {
    background: #dbeafe;
    color: #1e40af;
}

.action-btn-edit:hover {
    background: var(--primary-color);
    color: var(--white);
}

.action-btn-delete {
    background: #fee2e2;
    color: #991b1b;
}

.action-btn-delete:hover {
    background: var(--danger-color);
    color: var(--white);
}

.action-btn-view {
    background: #d1fae5;
    color: #065f46;
}

.action-btn-view:hover {
    background: var(--success-color);
    color: var(--white);
}

.actions-cell .action-btn {
    margin-right: 6px;
}
.actions-cell .action-btn:last-child {
    margin-right: 0;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 25px;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: var(--white);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.pagination .active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    padding: 25px 0;
}

.quick-action-btn {
    background: linear-gradient(135deg, var(--white) 0%, #f8fafc 100%);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 30px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.quick-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.quick-action-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.2);
    text-decoration: none;
    color: inherit;
    background: linear-gradient(135deg, var(--white) 0%, #f1f5f9 100%);
}

.quick-action-btn:hover::before {
    transform: scaleX(1);
}

.quick-action-btn:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.15);
}

.quick-action-icon {
    font-size: 56px;
    margin-bottom: 15px;
    opacity: 0.9;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.quick-action-text h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 10px;
    line-height: 1.2;
}

.quick-action-text p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
    font-weight: 400;
}

/* Styles spécifiques pour les liens directs */
.quick-action-btn[href] {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-color: #cbd5e1;
}

.quick-action-btn[href]:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    border-color: var(--primary-color);
}

.quick-action-btn[href] .quick-action-text h3 {
    color: var(--primary-color);
}

.quick-action-btn[href] .quick-action-text p {
    color: #64748b;
}

/* ========== Dashboard - Design amélioré ========== */
.dashboard-page .dashboard-welcome {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border-left: 4px solid #2563eb;
}

.dashboard-page .dashboard-welcome-icon {
    font-size: 22px;
    opacity: 0.9;
    flex-shrink: 0;
}

.dashboard-page .dashboard-welcome p {
    font-size: 15px;
    color: #475569;
    margin: 0;
    line-height: 1.5;
    font-weight: 500;
}

.dashboard-live-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 10px 14px;
    background: rgba(16, 185, 129, 0.08);
    border-radius: 10px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.dashboard-live-bar span:first-child {
    font-size: 13px;
    color: #059669;
    font-weight: 500;
}

.dashboard-live-bar #dashboard-last-update {
    font-size: 12px;
    color: #64748b;
}

.dashboard-page .card:first-of-type {
    margin-bottom: 28px;
}

.dashboard-page .quick-actions {
    gap: 20px;
    padding: 20px 0;
}

.dashboard-page .quick-action-btn {
    border-radius: 14px;
    padding: 24px 20px;
    border: 1px solid var(--border-color);
}

.dashboard-page .quick-action-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.dashboard-page .quick-action-text h3 {
    font-size: 17px;
}

.dashboard-page table thead {
    background: #f8fafc;
}

.dashboard-page table th {
    padding: 14px 16px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.dashboard-page table td {
    padding: 14px 16px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: var(--white);
    margin: 50px auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px 25px;
    background: var(--light-color);
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.modal-body {
    padding: 25px;
}

.close {
    color: #6b7280;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: var(--dark-color);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 80px;
    }
    
    .sidebar-header h2,
    .nav-item span:not(.icon),
    .user-info,
    .sidebar-footer {
        display: none;
    }
    
    .sidebar-logo {
        width: 60px;
        height: 40px;
        padding: 5px;
    }
    
    .sidebar-header {
        min-height: auto;
        padding: 15px 10px;
    }
    
    .main-content {
        margin-left: 80px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px 0;
    }
    
    .quick-action-btn {
        padding: 25px 20px;
        border-radius: 12px;
    }
    
    .quick-action-icon {
        font-size: 48px;
        margin-bottom: 12px;
    }
    
    .quick-action-text h3 {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .quick-action-text p {
        font-size: 13px;
    }
    
    .login-container {
        max-width: 100%;
        padding: 10px;
    }
    
    .login-box {
        padding: 25px;
    }
}

/* Print Styles */
@media print {
    @page {
        margin: 2cm;
    }
    
    body {
        background: white;
    }
    
    .sidebar,
    .top-header,
    .filter-section,
    .actions,
    .btn,
    .action-btn,
    .btn-group {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid var(--border-color);
        page-break-inside: avoid;
    }
    
    /* En-tête d'impression avec logo */
    .print-header {
        display: block !important;
        text-align: center;
        padding: 20px 0;
        border-bottom: 3px solid var(--primary-color);
        margin-bottom: 30px;
    }
    
    .print-logo {
        width: 250px;
        height: 120px;
        object-fit: contain;
        margin: 0 auto 15px;
        display: block;
    }
    
    .print-company-name {
        font-size: 24px;
        font-weight: bold;
        color: var(--dark-color);
        margin: 10px 0;
    }
    
    .print-company-info {
        font-size: 12px;
        color: #666;
    }
    
    .print-date {
        text-align: right;
        font-size: 11px;
        color: #666;
        margin-top: 10px;
    }
    
    /* Pied de page d'impression */
    .print-footer {
        display: block !important;
        text-align: center;
        padding-top: 20px;
        margin-top: 30px;
        border-top: 2px solid #ddd;
        font-size: 10px;
        color: #666;
    }
    
    .badge {
        border: 1px solid #333;
        padding: 3px 8px;
    }
    
    /* Amélioration des tableaux à l'impression */
    table {
        font-size: 11px;
    }
    
    table th {
        background: #f3f4f6 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .stat-card {
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    /* Masquer les éléments non pertinents pour l'impression */
    a[href]:after {
        content: none !important;
    }
}
