/* Atelier Montage — base stylesheet (no build step) */
:root {
    --bg: #f5f6f8;
    --surface: #ffffff;
    --surface-2: #f9fafb;
    --border: #e2e5ea;
    --border-strong: #cdd2d9;
    --text: #161b22;
    --muted: #5d6876;
    --subtle: #8a94a3;
    --primary: #1c3550;
    --primary-hover: #132639;
    --primary-soft: #e9eef4;
    --accent: #0868b4;
    --accent-light: #6aaae4;
    --success: #1e7046;
    --success-soft: #e7f3ec;
    --warning: #8a5a00;
    --warning-soft: #fbf1dc;
    --danger: #b42318;
    --danger-soft: #fdecea;
    --info: #1d4f91;
    --info-soft: #e8eff9;
    --sidebar: #121c27;
    --sidebar-text: #b7c0cc;
    --radius: 8px;
    --radius-sm: 6px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .05);
    --shadow-md: 0 4px 16px rgba(16, 24, 40, .08);
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5;
    color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0 0 .75em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
.muted { color: var(--muted); }
.subtle { color: var(--subtle); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mono { font-variant-numeric: tabular-nums; }
.strong { font-weight: 600; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.layout-aside { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.hidden { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 36px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid transparent;
    font: 500 13.5px/1 var(--font); cursor: pointer; white-space: nowrap; text-decoration: none !important;
    transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); border-color: #b5bcc6; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--primary-soft); color: var(--text); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: #f0c5c0; }
.btn-danger:hover { background: var(--danger-soft); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #175a38; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--danger); }
.inline { display: inline; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .label { font-size: 12.5px; font-weight: 500; color: #333b46; }
.field .hint { font-size: 12px; color: var(--subtle); }
.input, .select, .textarea {
    width: 100%; height: 38px; padding: 0 11px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text); font: 14px var(--font); transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 90px; padding: 9px 11px; resize: vertical; }
.select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%235d6876' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(28, 53, 80, .12); }
.input-sm { height: 32px; font-size: 13px; padding: 0 9px; }
.select.input-sm { padding-right: 28px; }
.is-invalid { border-color: var(--danger) !important; }
.error { color: var(--danger); font-size: 12px; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--primary); }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 4px; flex-wrap: wrap; }
.fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.fieldset-title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 14px; }

.option-list { display: grid; gap: 8px; }
.option {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm); cursor: pointer; background: var(--surface); transition: border-color .15s, background .15s;
}
.option:hover { border-color: #aab2bd; }
.option input { accent-color: var(--primary); width: 16px; height: 16px; flex: none; }
.option .option-body { flex: 1; min-width: 0; }
.option .option-price { font-weight: 600; white-space: nowrap; }
.option:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }

/* ---------- Cards / surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-body { padding: 18px; }
.card-footer { padding: 12px 18px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.card-flush .table th:first-child, .card-flush .table td:first-child { padding-left: 18px; }

.stat { padding: 16px 18px; }
.stat-label { font-size: 12.5px; color: var(--muted); }
.stat-value { font-size: 22px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-foot { font-size: 12px; color: var(--subtle); margin-top: 2px; }

.dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 16px; margin: 0; }
.dl dt { color: var(--muted); font-size: 13px; }
.dl-compact { grid-template-columns: 105px minmax(0, 1fr); }
.dl dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* ---------- Tables ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fafbfc; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tfoot td { font-weight: 600; border-top: 1px solid var(--border-strong); border-bottom: 0; }
.table-edit td { padding: 8px 8px; }
.table-edit td:first-child .input { min-width: 220px; }
.thumb { width: 44px; height: 44px; border-radius: var(--radius-sm); object-fit: cover; background: var(--surface-2); border: 1px solid var(--border); }
.thumb-empty { display: inline-flex; align-items: center; justify-content: center; color: var(--subtle); font-size: 10px; }

/* ---------- Badges / alerts ---------- */
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; border: 1px solid transparent; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-neutral { background: #eef0f3; color: #3c4653; }
.badge-muted { background: transparent; color: var(--subtle); border-color: var(--border); }
.free { display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: 4px; background: var(--success); color: #fff; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; vertical-align: middle; }
.stat-value .free, .product-price .free { height: 26px; font-size: 13px; }
.count { display: inline-flex; min-width: 20px; height: 20px; padding: 0 6px; align-items: center; justify-content: center; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; margin-left: auto; }

.alert { padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid; font-size: 13.5px; margin-bottom: 16px; }
.alert-success { background: var(--success-soft); border-color: #bfdfcc; color: #14522f; }
.alert-error { background: var(--danger-soft); border-color: #f3c3bd; color: #8c1c13; }
.alert-info { background: var(--info-soft); border-color: #c5d6ef; color: #173f73; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }

.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--text); margin-bottom: 6px; }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--sidebar); color: var(--sidebar-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 20px 20px 18px; color: #fff; text-decoration: none !important; }
.brand-mark { width: 30px; height: 30px; border-radius: 7px; background: #fff; color: var(--sidebar); display: grid; place-items: center; font-weight: 700; font-size: 13px; letter-spacing: -.02em; flex: none; }
.brand-name { font-weight: 600; font-size: 15px; line-height: 1.2; }
.brand-sub { font-size: 11px; color: #7f8b99; text-transform: uppercase; letter-spacing: .08em; }
.nav { padding: 6px 12px 20px; display: flex; flex-direction: column; gap: 2px; }
.nav-section { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #6b7785; padding: 16px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--sidebar-text); font-size: 13.5px; text-decoration: none; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav a.active { background: rgba(255, 255, 255, .1); color: #fff; }
.nav svg { width: 17px; height: 17px; flex: none; opacity: .85; }
.sidebar-foot { margin-top: auto; padding: 14px 16px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 12.5px; }
.sidebar-foot .who { color: #fff; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 60px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; padding: 0 28px; position: sticky; top: 0; z-index: 20; }
.topbar .spacer { flex: 1; }
.menu-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: var(--radius-sm); width: 36px; height: 36px; cursor: pointer; align-items: center; justify-content: center; }
.content { padding: 28px; max-width: 1280px; width: 100%; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-header p { margin: 4px 0 0; color: var(--muted); }
.breadcrumb { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.breadcrumb a { color: var(--muted); }
.cart-link { position: relative; }
.cart-link .count { position: absolute; top: -6px; right: -8px; margin: 0; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.filters .field { min-width: 150px; }
.filters .field.grow { flex: 1; min-width: 200px; }

.backdrop { display: none; }

/* ---------- Shop ---------- */
.products { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.product-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: box-shadow .15s, border-color .15s; color: inherit; text-decoration: none !important; }
.product-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.product-media { aspect-ratio: 4 / 3; background: var(--surface-2); display: grid; place-items: center; border-bottom: 1px solid var(--border); overflow: hidden; }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-media .placeholder { color: var(--subtle); font-size: 12px; }
.product-info { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product-name { font-weight: 500; color: var(--text); }
.product-price { font-weight: 600; font-size: 15px; margin-top: auto; padding-top: 6px; }
.category-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 999px; font-size: 13px; color: var(--text); background: var(--surface); text-decoration: none !important; }
.chip:hover { border-color: #aab2bd; }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.gallery-main { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: rgba(255, 255, 255, .92); cursor: pointer; display: grid; place-items: center; }
.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.gallery-thumbs button { flex: none; width: 72px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; background: var(--surface-2); }
.gallery-thumbs button.active { border-color: var(--primary); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.qty { width: 80px; }

.image-manager { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.image-tile { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.image-tile.main { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.image-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.image-tile .tile-actions { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; font-size: 12px; gap: 6px; }

/* ---------- Prescription grid ---------- */
.rx { width: 100%; border-collapse: collapse; }
.rx th { font-size: 12px; font-weight: 500; color: var(--muted); padding: 0 4px 6px; text-align: left; }
.rx td { padding: 3px 4px; }
.rx td:first-child { font-weight: 600; width: 48px; color: var(--primary); }
.rx .input { height: 34px; padding: 0 8px; }

/* ---------- Toggle ---------- */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 36px; height: 20px; border-radius: 999px; background: #c9ced6; position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.switch input:checked + .track { background: var(--success); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px rgba(28, 53, 80, .2); }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 4px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--border); }
.pagination .pages { display: flex; gap: 4px; flex-wrap: wrap; }
.pagination a, .pagination span.page { display: inline-flex; min-width: 32px; height: 32px; padding: 0 8px; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-size: 13px; text-decoration: none; background: var(--surface); }
.pagination a:hover { border-color: var(--border-strong); }
.pagination .current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .disabled { color: var(--subtle); }

/* ---------- Public / auth ---------- */
.public-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
.public-header .inner { max-width: 1160px; margin: 0 auto; padding: 0 24px; height: 66px; display: flex; align-items: center; gap: 24px; }
.public-header .brand { padding: 0; color: var(--text); }
.public-header .brand-mark { background: var(--primary); color: #fff; }
.public-header .brand-sub { color: var(--subtle); }
.public-nav { display: flex; gap: 22px; margin-left: auto; }
.public-nav a { color: var(--muted); font-size: 14px; }
.public-nav a:hover { color: var(--text); text-decoration: none; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

.hero { background: var(--sidebar); color: #fff; }
.hero .wrap { padding-top: 88px; padding-bottom: 88px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); font-weight: 600; margin-bottom: 14px; }
.hero .eyebrow { color: var(--accent-light); }
.hero h1 { font-size: 42px; line-height: 1.12; letter-spacing: -.02em; font-weight: 600; }
.hero p.lead { font-size: 17px; color: #b9c3cf; margin: 18px 0 30px; max-width: 540px; }
.hero .btn-secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .3); }
.hero .btn-secondary:hover { background: rgba(255, 255, 255, .06); }
.hero .btn-primary { background: #fff; color: var(--sidebar); }
.hero .btn-primary:hover { background: #e9edf2; }
.hero-panel { border: 1px solid rgba(255, 255, 255, .12); border-radius: 12px; padding: 26px; background: rgba(255, 255, 255, .03); }
.hero-panel .step { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.hero-panel .step:last-child { border-bottom: 0; padding-bottom: 0; }
.hero-panel .step:first-child { padding-top: 0; }
.step-num { width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); display: grid; place-items: center; font-size: 12.5px; flex: none; color: var(--accent-light); font-weight: 600; }
.step h3 { font-size: 14.5px; color: #fff; }
.step p { margin: 3px 0 0; color: #98a4b3; font-size: 13.5px; }

.section { padding: 80px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 { font-size: 30px; letter-spacing: -.02em; }
.section-head p { color: var(--muted); font-size: 16px; margin-top: 10px; }
.service-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.service-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 26px; display: flex; flex-direction: column; }
.service-card h3 { font-size: 18px; }
.service-card .summary { color: var(--muted); margin: 10px 0 18px; }
.service-card ul { list-style: none; padding: 0; margin: 0 0 20px; border-top: 1px solid var(--border); }
.service-card li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.service-card li span:last-child { font-weight: 600; white-space: nowrap; }
.service-card li span:only-child { font-weight: 400; white-space: normal; }
.service-card .from { margin-top: auto; font-size: 13px; color: var(--muted); }
.features { display: grid; gap: 32px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.feature h3 { font-size: 16px; margin-bottom: 8px; }
.feature p { color: var(--muted); }
.feature .rule { width: 32px; height: 2px; background: var(--accent); margin-bottom: 16px; }
.contact-grid { display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.cta-band { background: var(--primary); color: #fff; border-radius: 12px; padding: 40px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { font-size: 24px; }
.cta-band p { color: #c6d1dd; margin: 6px 0 0; }
.cta-band .btn-primary { background: #fff; color: var(--primary); }
.public-footer { padding: 32px 0; color: var(--muted); font-size: 13px; border-top: 1px solid var(--border); background: var(--surface); }

.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.auth-side { background: var(--sidebar); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side .brand { padding: 0; }
.auth-side h2 { font-size: 28px; line-height: 1.2; letter-spacing: -.02em; max-width: 420px; }
.auth-side p { color: #98a4b3; max-width: 420px; margin-top: 12px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 24px; background: var(--surface); }
.auth-box { width: 100%; max-width: 440px; }
.auth-box.wide { max-width: 600px; }
.auth-box h1 { font-size: 24px; margin-bottom: 6px; }

/* ---------- Print documents ---------- */
.doc { max-width: 900px; margin: 24px auto; background: #fff; padding: 48px; border: 1px solid var(--border); }
.doc-toolbar { max-width: 900px; margin: 24px auto 0; display: flex; gap: 10px; justify-content: flex-end; }
.doc-head { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 24px; border-bottom: 2px solid var(--text); margin-bottom: 24px; }
.doc-title { font-size: 26px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.doc .table th { background: #f3f4f6; }
.doc-totals { margin-left: auto; width: 300px; margin-top: 16px; }
.doc-totals div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); }
.doc-totals div.grand { font-weight: 700; font-size: 16px; border-bottom: 2px solid var(--text); }
.signatures { margin-top: 40px; }
.signature-box { height: 90px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); margin-top: 6px; }
.doc-type { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .03em; border: 1px solid var(--border-strong); color: #333b46; background: var(--surface); white-space: nowrap; }
.doc-type.facture { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.doc-type.bl { border-color: #b9a37f; color: #6e5630; background: #f7f1e7; }
.stamp { display: inline-block; border: 2px solid; padding: 4px 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; transform: rotate(-4deg); }
.stamp.paid { color: var(--success); }
.stamp.unpaid { color: var(--danger); }
.stamp.cancelled { color: var(--subtle); }

@media print {
    body { background: #fff; }
    .no-print { display: none !important; }
    .doc { border: 0; margin: 0; padding: 0; max-width: none; }
    .table tbody tr:hover td { background: none; }
    .free { background: none; color: var(--success); border: 1.5px solid var(--success); }
    @page { margin: 14mm; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .layout-aside { grid-template-columns: minmax(0, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .app { grid-template-columns: minmax(0, 1fr); }
    .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
    body.nav-open .sidebar { transform: none; }
    body.nav-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(10, 15, 22, .45); z-index: 40; }
    .menu-toggle { display: inline-flex; }
    .topbar { padding: 0 16px; }
    .content { padding: 20px 16px; }
    .hero .wrap { grid-template-columns: minmax(0, 1fr); padding-top: 56px; padding-bottom: 56px; gap: 36px; }
    .hero h1 { font-size: 32px; }
    .features, .contact-grid, .grid-3 { grid-template-columns: minmax(0, 1fr); }
    .auth { grid-template-columns: minmax(0, 1fr); }
    .auth-side { display: none; }
    .public-nav { display: none; }
    .section { padding: 56px 0; }
}
@media (max-width: 640px) {
    .grid-2, .grid-4, .form-grid { grid-template-columns: minmax(0, 1fr); }
    .wrap, .public-header .inner { padding: 0 16px; }
    .dl { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
    .dl dd { margin-bottom: 8px; }
    .doc { padding: 20px; margin: 12px; }
    .doc-head { flex-direction: column; }
    .doc-totals { width: 100%; }
    .page-header h1 { font-size: 20px; }
    .cta-band { padding: 28px; }
    .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .filters .field { min-width: 0; flex: 1 1 140px; }
}

/* ---------- Brand images ---------- */
.brand-mark img { width: 22px; height: 22px; object-fit: contain; }
.brand-logo { height: 34px; width: auto; display: block; }
.auth-logo { height: 46px; width: auto; margin-bottom: 28px; }
.doc-logo { height: 46px; width: auto; display: block; margin-bottom: 10px; }
.hero-logo { background: #fff; border-radius: 14px; padding: 28px; display: grid; place-items: center; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.hero-logo img { width: 100%; max-width: 440px; height: auto; }
.steps { display: grid; gap: 20px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 48px; }
.steps .step { display: flex; gap: 14px; padding: 20px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; }
.steps .step-num { color: var(--accent); border-color: var(--border-strong); }
.steps .step h3 { font-size: 14.5px; }
.steps .step p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .steps { grid-template-columns: minmax(0, 1fr); } .brand-logo { height: 28px; } }
