/* /assets/css/dreamspos-custom.css */
:root {
    --primary-color: #00b4d8; /* Bleu moderne DreamsPOS */
    --primary-hover: #0096c7;
    --secondary-color: #6c757d;
    --success-color: #00c853;
    --danger-color: #ff5252;
    --warning-color: #ffab00;
    --info-color: #33b5e5;
    --bg-body: #f5f6fa;
    --bg-card: #ffffff;
    --text-main: #1f1f1f;
    --text-muted: #878b90;
    --border-color: #f0f1f3;
    --sidebar-width: 260px;
    --header-height: 70px;
    --border-radius: 12px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
}

body {
    font-family: 'Inter', 'Roboto', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    font-size: 14px;
}

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header .logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.sidebar-menu {
    padding: 20px 0;
    list-style: none;
    margin: 0;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    color: var(--primary-color);
    background: rgba(0, 180, 216, 0.05);
    border-left-color: var(--primary-color);
}

.sidebar-menu li a i {
    margin-right: 12px;
    font-size: 18px;
    width: 24px;
    text-align: center;
}

/* --- Main Content --- */
.main-wrapper {
    margin-left: var(--sidebar-width);
    transition: all 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Header --- */
.header {
    height: var(--header-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: var(--shadow-sm);
}

.header-left h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: var(--text-main);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background 0.2s;
}

.user-profile:hover {
    background: var(--bg-body);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

/* --- Cards --- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    transition: box-shadow 0.3s ease;
}

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

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3, .card-header h4, .card-header h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
}

.card-body {
    padding: 20px;
}

/* --- Stats Cards --- */
.stat-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: flex-start;
    gap: 15px;
    border: 1px solid var(--border-color);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.bg-primary-light { background: rgba(0, 180, 216, 0.1); color: var(--primary-color); }
.stat-icon.bg-success-light { background: rgba(0, 200, 83, 0.1); color: var(--success-color); }
.stat-icon.bg-warning-light { background: rgba(255, 171, 0, 0.1); color: var(--warning-color); }
.stat-icon.bg-danger-light { background: rgba(255, 82, 82, 0.1); color: var(--danger-color); }

.stat-info h4 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: var(--text-main);
}

.stat-info p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

/* --- Forms & Custom Checkboxes --- */
.form-control, .form-select {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    transition: all 0.2s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.15);
}

/* Custom Checkbox / Switch style DreamsPOS */
.form-check-input {
    width: 38px;
    height: 20px;
    border-radius: 20px;
    background-color: #e0e0e0;
    border: none;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--primary-color);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.2);
}

/* --- Buttons --- */
.btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
    border: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

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

/* --- Tables --- */
.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8f9fa;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
    padding: 14px 16px;
}

.table tbody td {
    padding: 14px 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

/* --- Badges --- */
.badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 12px;
}

.badge.bg-primary { background-color: rgba(0, 180, 216, 0.1) !important; color: var(--primary-color) !important; }
.badge.bg-success { background-color: rgba(0, 200, 83, 0.1) !important; color: var(--success-color) !important; }
.badge.bg-warning { background-color: rgba(255, 171, 0, 0.1) !important; color: var(--warning-color) !important; }
.badge.bg-danger { background-color: rgba(255, 82, 82, 0.1) !important; color: var(--danger-color) !important; }

/* --- Responsive --- */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-wrapper {
        margin-left: 0;
    }
}