:root {
    --sidebar-w: 240px;
    --brand: #1f6f5c;
    --brand-dark: #16503f;
    --bg: #f4f6f5;
}
body { background: var(--bg); font-size: .925rem; }
.app { display: flex; min-height: 100vh; }

/* Barre latérale */
.sidebar {
    width: var(--sidebar-w); background: var(--brand-dark); color: #fff;
    position: fixed; top: 0; bottom: 0; left: 0; overflow-y: auto; z-index: 1030;
    transition: transform .2s;
}
.sidebar .brand { padding: 1.1rem 1rem; font-weight: 600; font-size: 1.05rem; display: flex; gap: .5rem; align-items: center; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar .nav-link { color: rgba(255,255,255,.8); padding: .6rem 1rem; display: flex; gap: .6rem; align-items: center; border-left: 3px solid transparent; }
.sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.sidebar .nav-link.active { color: #fff; background: rgba(255,255,255,.1); border-left-color: #8fd3b6; }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar { background: #fff; padding: .75rem 1.25rem; display: flex; align-items: center; gap: 1rem; border-bottom: 1px solid #e3e7e5; position: sticky; top: 0; z-index: 1020; }
.content { padding: 1.25rem; }

@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; }
}

/* Cartes & tableaux */
.card { border: 1px solid #e3e7e5; box-shadow: none; }
.card-header { background: #fff; font-weight: 600; }
.table th { font-weight: 600; font-size: .8rem; text-transform: uppercase; color: #5b6b65; white-space: nowrap; }
.table td { vertical-align: middle; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.btn-brand { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-brand:hover { background: var(--brand-dark); color: #fff; }

/* Indicateurs du tableau de bord */
.kpi { padding: 1rem; }
.kpi .label { color: #5b6b65; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.kpi .value { font-size: 1.45rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi .icon { font-size: 1.6rem; color: var(--brand); opacity: .8; }

/* Point de vente */
.pos-grid { display: grid; grid-template-columns: 1fr 420px; gap: 1rem; }
@media (max-width: 1199.98px) { .pos-grid { grid-template-columns: 1fr; } }
.pos-articles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; max-height: 65vh; overflow-y: auto; }
.pos-article { background: #fff; border: 1px solid #e3e7e5; border-radius: .5rem; padding: .7rem; cursor: pointer; text-align: left; transition: border-color .1s; }
.pos-article:hover { border-color: var(--brand); }
.pos-article .nom { font-weight: 600; font-size: .85rem; line-height: 1.2; min-height: 2.1em; }
.pos-article .prix { color: var(--brand); font-weight: 700; }
.pos-article.rupture { opacity: .45; }
.pos-panier { max-height: 40vh; overflow-y: auto; }
.pos-total { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Page de connexion */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--brand-dark); }
.login-card { width: 100%; max-width: 380px; }

/* Impression depuis les pages de l'application */
@media print {
    .sidebar, .topbar, .d-print-none, .btn, .pagination { display: none !important; }
    .main { margin-left: 0; }
    .content { padding: 0; }
    .card { border: none; }
    body { background: #fff; }
}
