/* ============================================================================
   Super Pharm — design system (enterprise)
   Aligned with the Desktop (WPF) app palette — see Ressources/Colors/Brushes.xaml
   ============================================================================ */
@font-face {
    font-family: "Poppins";
    src: url("/fonts/Poppins/Poppins-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Poppins";
    src: url("/fonts/Poppins/Poppins-Medium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Poppins";
    src: url("/fonts/Poppins/Poppins-SemiBold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Poppins";
    src: url("/fonts/Poppins/Poppins-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Poppins";
    src: url("/fonts/Poppins/Poppins-ExtraBold.ttf") format("truetype");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Brand green scale — matches Desktop's Brushes.xaml green800…green100 */
    --sp-900: #011C08;
    --sp-800: #013911;   /* dark green — "Super" / headings */
    --sp-700: #025519;
    --sp-600: #027222;   /* Desktop rail (nav background) */
    --sp-500: #038E2A;   /* primary — Desktop flyout / primary green */
    --sp-400: #35A555;
    --sp-300: #68BB7F;   /* lime accent */
    --sp-200: #9AD2AA;
    --sp-100: #CFEED8;
    --sp-50:  #E7F7EA;
    --sp-gradient: linear-gradient(135deg, #013911 0%, #038E2A 52%, #68BB7F 100%);
    --sp-gradient-soft: linear-gradient(135deg, #F2FBF3 0%, #E7F6E9 100%);

    /* Neutrals */
    --ink: #0F1B14;
    --text: #1F2A24;
    --muted: #5C6B62;
    --faint: #8A968E;
    --line: #E4EAE6;
    --line-soft: #EFF3F0;
    --bg: #FFFFFF;
    --bg-soft: #F5F8F6;
    --bg-mint: #EDF7F0;

    /* Semantic */
    --danger: #C0392B;
    --danger-bg: #FCECEA;
    --warn: #B7791F;
    --warn-bg: #FBF3E2;
    --ok: var(--sp-500);
    --ok-bg: var(--sp-50);

    /* Elevation */
    --shadow-xs: 0 1px 2px rgba(16, 40, 25, .06);
    --shadow-sm: 0 2px 6px rgba(16, 40, 25, .07);
    --shadow: 0 6px 22px rgba(16, 40, 25, .09);
    --shadow-lg: 0 20px 48px rgba(16, 40, 25, .14);
    --shadow-brand: 0 14px 34px rgba(20, 130, 60, .28);

    /* Shape — matches Desktop's corner-radius scale (6/10/13/16) */
    --r-sm: 6px;
    --r: 10px;
    --r-lg: 13px;
    --r-xl: 16px;
    --r-pill: 999px;

    --font: "Poppins", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --container: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: var(--sp-600); text-decoration: none; }
a:hover { color: var(--sp-800); }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .6rem; }
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
code { font-family: "Cascadia Code", "Consolas", ui-monospace, monospace; font-size: .88em; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }

/* ---------- Brand logo ---------- */
.brand-logo { display: inline-flex; align-items: center; text-decoration: none; }
.brand-logo img { height: 40px; width: auto; display: block; }

/* ============================================================================
   Buttons
   ============================================================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .68rem 1.35rem; border-radius: var(--r-pill);
    border: 1.5px solid transparent; font: inherit; font-weight: 650; font-size: .96rem;
    cursor: pointer; text-decoration: none; transition: transform .12s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--sp-gradient); color: #fff; box-shadow: var(--shadow-brand); }
.btn-primary:hover { color: #fff; filter: brightness(1.05); box-shadow: 0 18px 40px rgba(20,130,60,.34); }
.btn-outline { border-color: var(--sp-300); color: var(--sp-700); background: #fff; }
.btn-outline:hover { border-color: var(--sp-500); color: var(--sp-800); background: var(--sp-50); }
.btn-ghost { color: var(--text); background: transparent; }
.btn-ghost:hover { background: var(--bg-soft); color: var(--sp-800); }
.btn-block { width: 100%; }
.btn-sm { padding: .45rem .9rem; font-size: .85rem; }
.btn.danger { color: var(--danger); border-color: transparent; }
.btn.danger:hover { background: var(--danger-bg); }

.link-button { background: none; border: none; padding: 0; font: inherit; color: var(--sp-600); cursor: pointer; }
.link-button:hover { color: var(--sp-800); text-decoration: underline; }
.link-button.danger { color: var(--danger); }
.inline-form { display: inline; }

/* ============================================================================
   Public / marketing shell
   ============================================================================ */
.site-header {
    position: sticky; top: 0; z-index: 40;
    background: rgba(255,255,255,.82); backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line);
}
.site-header .nav { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a { color: var(--text); font-weight: 550; font-size: .95rem; }
.nav-links a:hover { color: var(--sp-700); }

.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 2.5rem 0; color: var(--muted); font-size: .9rem; margin-top: 4rem; }
.site-footer .foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }

.main { min-height: 60vh; }

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden;
    background: radial-gradient(1200px 500px at 15% -10%, #EAF7EC 0%, rgba(234,247,236,0) 60%),
                radial-gradient(900px 500px at 100% 0%, #E4F5EA 0%, rgba(228,245,234,0) 55%), #fff;
    padding: 4.5rem 0 3.5rem;
}
.hero::before {
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(30,158,72,.10) 1px, transparent 1px);
    background-size: 22px 22px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%); mask-image: linear-gradient(180deg, #000, transparent 70%);
    opacity: .5; pointer-events: none;
}
.hero .container { position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 2.5rem; align-items: center; }
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .85rem; border-radius: var(--r-pill);
    background: #fff; border: 1px solid var(--sp-200); color: var(--sp-700); font-weight: 650; font-size: .82rem; box-shadow: var(--shadow-xs);
}
.hero-eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sp-400); box-shadow: 0 0 0 4px var(--sp-100); }
.hero h1 { margin: 1.1rem 0 .8rem; }
.hero h1 .grad { background: var(--sp-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 1.18rem; color: var(--muted); max-width: 34ch; margin-bottom: 1.8rem; }
.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-trust { margin-top: 1.6rem; color: var(--faint); font-size: .85rem; display: flex; align-items: center; gap: .5rem; }

/* Hero visual — real brand splash */
.hero-visual {
    position: relative; border-radius: var(--r-xl); overflow: hidden;
    border: 1px solid var(--line); box-shadow: var(--shadow-lg); background: #fff;
}
.hero-visual img { display: block; width: 100%; height: auto; }

/* ============================================================================
   Sections / feature grid
   ============================================================================ */
section.block { padding: 4rem 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 2.5rem; }
.section-head .kicker { color: var(--sp-600); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; }
.section-head h2 { margin-top: .4rem; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.feature-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.6rem;
    transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--sp-200); }
.feature-card .ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--sp-gradient); color: #fff; margin-bottom: 1rem; box-shadow: var(--shadow-brand); }
.feature-card h3 { margin-bottom: .3rem; }
.feature-card p { color: var(--muted); margin: 0; font-size: .95rem; }

/* ---------- Plans ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.4rem; max-width: 980px; margin: 0 auto; }
.plan-card {
    position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); padding: 2rem 1.8rem;
    display: flex; flex-direction: column; transition: transform .18s ease, box-shadow .2s ease;
}
.plan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.plan-card.featured { border: none; background: var(--sp-gradient); color: #fff; box-shadow: var(--shadow-lg); }
.plan-card.featured h3, .plan-card.featured .plan-price { color: #fff; }
.plan-card.featured .plan-period, .plan-card.featured .plan-features li { color: rgba(255,255,255,.9); }
.plan-card.featured .plan-features li::before { color: #fff; }
.plan-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--sp-800); color: #fff; padding: .3rem .9rem; border-radius: var(--r-pill); font-size: .72rem; font-weight: 700; letter-spacing: .04em; }
.plan-card h3 { font-size: 1.3rem; }
.plan-price { font-size: 2.3rem; font-weight: 820; color: var(--ink); margin: .3rem 0 .2rem; letter-spacing: -.02em; }
.plan-price .cur { font-size: 1rem; font-weight: 600; color: var(--muted); }
.plan-period { color: var(--muted); font-size: .9rem; margin-bottom: 1.4rem; }
.plan-features { list-style: none; padding: 0; margin: 0 0 1.8rem; flex: 1; }
.plan-features li { padding: .5rem 0 .5rem 1.7rem; position: relative; border-bottom: 1px solid var(--line-soft); font-size: .94rem; }
.plan-card.featured .plan-features li { border-color: rgba(255,255,255,.18); }
.plan-features li::before { content: "✓"; position: absolute; left: 0; color: var(--sp-500); font-weight: 800; }
.plan-card.featured .btn-outline { border-color: rgba(255,255,255,.6); color: #fff; background: rgba(255,255,255,.12); }
.plan-card.featured .btn-outline:hover { background: #fff; color: var(--sp-800); }

/* ---------- Videos ---------- */
.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.4rem; }
.video-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.1rem; background: #fff; box-shadow: var(--shadow-xs); }
.video-card h3 { font-size: 1.05rem; }
.video-card video { width: 100%; border-radius: var(--r); background: #000; display: block; }
.video-frame { position: relative; padding-bottom: 56.25%; height: 0; border-radius: var(--r); overflow: hidden; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ============================================================================
   Auth cards
   ============================================================================ */
.auth-wrap { min-height: calc(100vh - 70px); display: grid; place-items: center; padding: 3rem 1.5rem; background: var(--sp-gradient-soft); }
.auth-card {
    width: 100%; max-width: 430px; background: #fff; border: 1px solid var(--line);
    border-radius: var(--r-xl); padding: 2.4rem; box-shadow: var(--shadow-lg);
}
.auth-card.auth-card-large { max-width: 560px; }
.auth-card h1 { font-size: 1.6rem; margin-bottom: .4rem; }
.auth-card .auth-sub { color: var(--muted); margin-bottom: 1.6rem; }
.auth-brand { display: flex; justify-content: center; margin-bottom: 1.2rem; }
.auth-brand .mark { width: 64px; height: auto; }

/* ---------- Relais photo téléphone → PC ---------- */
.or-sep { display: flex; align-items: center; text-align: center; color: var(--faint); margin: 1.2rem 0; font-size: .85rem; }
.or-sep::before, .or-sep::after { content: ""; flex: 1; border-bottom: 1px solid var(--line); }
.or-sep span { padding: 0 .8rem; }
.phone-panel { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.2rem; margin: 1rem 0; text-align: center; background: var(--bg-soft); }
.phone-qr { display: flex; justify-content: center; margin: 0 auto .6rem; }
.phone-qr svg { width: 200px; height: 200px; }
.phone-received { max-width: 100%; max-height: 240px; border-radius: var(--r); border: 1px solid var(--line); margin-top: .5rem; }

/* Page mobile de capture */
.capture-mobile { max-width: 460px; margin: 0 auto; padding: 2rem 1.3rem; text-align: center; }
.capture-mobile .cm-mark { width: 56px; height: auto; margin-bottom: .6rem; }
.capture-mobile h1 { font-size: 1.5rem; }
.cm-shoot {
    display: block; margin: 1.5rem 0; padding: 2.2rem 1rem; border: 2px dashed var(--sp-300);
    border-radius: var(--r-lg); color: var(--sp-700); font-weight: 700; font-size: 1.15rem;
    background: var(--sp-50); cursor: pointer;
}
.cm-shoot:active { background: var(--sp-100); }
.cm-preview { max-width: 100%; border-radius: var(--r-lg); border: 1px solid var(--line); margin: 1rem 0; }
.cm-status { color: var(--muted); min-height: 1.4rem; }

/* ============================================================================
   Forms
   ============================================================================ */
label { display: block; margin: 1rem 0 .35rem; font-weight: 600; font-size: .9rem; color: var(--ink); }
input, select, textarea {
    width: 100%; padding: .7rem .85rem; border: 1.5px solid var(--line); border-radius: var(--r-sm);
    font: inherit; font-size: .96rem; color: var(--text); background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sp-400); box-shadow: 0 0 0 3px var(--sp-100); }
textarea { resize: vertical; min-height: 90px; }
.checkbox { display: flex; align-items: center; gap: .5rem; font-weight: 500; margin: .8rem 0; }
.checkbox input { width: auto; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1.25rem; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.5rem 1.6rem; margin: 1.2rem 0 2rem; box-shadow: var(--shadow-xs); }
.form-card h3 { margin-top: 0; }
details.form-card summary { cursor: pointer; font-weight: 650; }
form .btn { margin-top: 1.4rem; }

.validation-errors { color: var(--danger); background: var(--danger-bg); border: 1px solid #f3c9c3; border-radius: var(--r-sm); padding: .7rem .9rem; margin-bottom: 1rem; font-size: .9rem; }
.validation-errors ul { margin: 0; padding-left: 1.1rem; }
.field-error { color: var(--danger); font-size: .82rem; display: block; margin-top: .25rem; }

/* ============================================================================
   Notices
   ============================================================================ */
.notice { border-radius: var(--r); padding: .85rem 1.1rem; margin: 1rem 0; font-size: .95rem; border: 1px solid var(--warn-bg); background: var(--warn-bg); color: #7a5312; }
.notice.success { background: var(--ok-bg); border-color: var(--sp-200); color: var(--sp-800); }
.notice.danger { background: var(--danger-bg); border-color: #f3c9c3; color: var(--danger); }

/* ============================================================================
   Enterprise dashboard shell (admin + client)
   ============================================================================ */
.app-shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.app-sidebar {
    background: linear-gradient(180deg, #027222 0%, #038E2A 100%); color: #d3f2de;
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 1.2rem 0;
}
.app-sidebar .side-brand { display: flex; align-items: center; gap: .6rem; padding: .4rem 1.3rem 1.4rem; text-decoration: none; }
.app-sidebar .side-brand .chip { width: 38px; height: 38px; background: #fff; border-radius: 10px; display: grid; place-items: center; flex: none; box-shadow: var(--shadow-sm); }
.app-sidebar .side-brand .chip img { width: 28px; height: auto; }
.app-sidebar .side-brand b { color: #fff; font-size: 1.12rem; font-weight: 800; letter-spacing: -.01em; }
.app-sidebar .side-brand b .p { color: #9be0a3; }
.side-nav { display: flex; flex-direction: column; gap: 2px; padding: .5rem .8rem; flex: 1; overflow-y: auto; }
.side-nav .grp { color: #8fc79c; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; padding: 1rem .7rem .35rem; }
.side-nav a {
    display: flex; align-items: center; gap: .7rem; padding: .6rem .7rem; border-radius: 10px;
    color: #cfe8d5; font-weight: 550; font-size: .92rem; transition: background .15s ease, color .15s ease;
}
.side-nav a .ic { width: 18px; height: 18px; flex: none; opacity: .9; }
.side-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-nav a.active { background: rgba(255,255,255,.14); color: #fff; box-shadow: inset 3px 0 0 var(--sp-300); }
.app-sidebar .side-foot { padding: 1rem 1.3rem 0; border-top: 1px solid rgba(255,255,255,.1); margin: .5rem .8rem 0; }
.app-sidebar .side-foot a { color: #a9d6b4; font-size: .85rem; }

.app-main { display: flex; flex-direction: column; min-width: 0; background: var(--bg-soft); }
.app-topbar {
    height: 64px; background: rgba(255,255,255,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
    display: flex; align-items: center; justify-content: space-between; padding: 0 1.8rem; position: sticky; top: 0; z-index: 20;
}
.app-topbar .title { font-weight: 750; color: var(--ink); font-size: 1.05rem; }
.app-topbar .user { display: flex; align-items: center; gap: .7rem; font-size: .9rem; color: var(--muted); }
.app-topbar .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--sp-gradient); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.app-content { padding: 2rem 1.8rem; max-width: 1200px; width: 100%; }
.app-content > h1 { font-size: 1.7rem; margin-bottom: 1.2rem; }
.page-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.2rem; }

/* KPI / cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.1rem; }
.card {
    display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.3rem 1.4rem;
    text-decoration: none; color: var(--text); box-shadow: var(--shadow-xs); transition: transform .16s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--sp-200); color: var(--text); }
.card h3 { color: var(--sp-800); margin-bottom: .3rem; display: flex; align-items: center; gap: .5rem; }
.card p { margin: 0; color: var(--muted); font-size: .9rem; }
.card.disabled { opacity: .55; pointer-events: none; }
.card .ic { width: 34px; height: 34px; border-radius: 9px; background: var(--sp-50); color: var(--sp-600); display: grid; place-items: center; }

/* ============================================================================
   Tables
   ============================================================================ */
.table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-xs); margin: 1rem 0 1.5rem; }
.table th, .table td { text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--line-soft); font-size: .92rem; }
.table thead th { background: var(--bg-soft); color: var(--muted); font-weight: 650; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--sp-50); }
/* Ligne de totaux (sous-total de la page) — épinglée en bas du journal. */
.table tbody tr.ligne-totaux td { background: var(--bg-soft); font-weight: 700; border-top: 2px solid var(--line); border-bottom: none; white-space: nowrap; }
.table tbody tr.ligne-totaux:hover td { background: var(--bg-soft); }
.table tbody tr.ligne-totaux .totaux-label { color: var(--muted); text-transform: uppercase; font-size: .78rem; letter-spacing: .04em; font-weight: 650; }
.actions { white-space: nowrap; display: flex; gap: .8rem; align-items: center; }
.danger { color: var(--danger); }
.row-deleted { opacity: .5; text-decoration: line-through; }
.machine-id { font-size: .76rem; word-break: break-all; color: var(--muted); }
.release-note { white-space: pre-wrap; font-family: inherit; margin: 0; }

/* Badges / pills */
.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .7rem; border-radius: var(--r-pill); background: var(--sp-50); color: var(--sp-800); border: 1px solid var(--sp-200); font-size: .8rem; font-weight: 600; }
.badge.warn { background: var(--warn-bg); border-color: #f0d9a8; color: #8a5a12; }
.badge.danger { background: var(--danger-bg); border-color: #f0c8c2; color: var(--danger); }
.badge.info { background: #EAF2FC; border-color: #C5DBF5; color: #1C4E8A; }
.badge.muted { background: #F1F3F5; border-color: #DEE2E6; color: #6B7280; }

/* Bordereau CHIFA — rapprochement paiement/rejets (miroir du poste) */
.volet-rejets { margin-top: 1.4rem; }
.volet-rejets .entete-volet { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.volet-rejets .entete-volet h2 { margin: 0; }
.table-rejets th.num, .table-rejets td.num { text-align: right; white-space: nowrap; }
.table-rejets td.ecart { font-weight: 600; color: var(--danger); }
.rejet-detail td { padding-top: 0; border-top: 0; color: #6B7280; font-size: .82rem; }
.rejet-detail .paiement { color: #6B7280; }
.rejet-meds { margin: .3rem 0 .1rem 1.1rem; display: grid; gap: .12rem; }
.rejet-meds .med { display: grid; grid-template-columns: 1.1rem 1fr 3.2rem 6rem; gap: .4rem; align-items: baseline; }
.rejet-meds .med.refuse { color: var(--danger); font-weight: 600; }
.rejet-meds .med .q { text-align: center; color: #6B7280; }
.rejet-meds .med .m { text-align: right; color: #6B7280; }
.statut-cnas { display: inline-flex; flex-wrap: wrap; gap: .35rem .55rem; }
.statut-cnas .seg { background: var(--warn-bg); border: 1px solid #f0d9a8; color: #8a5a12; border-radius: var(--r-pill); padding: .18rem .6rem; font-size: .78rem; font-weight: 600; }

.actions-row { display: flex; gap: .75rem; margin-top: 1rem; flex-wrap: wrap; }
.pager { display: flex; align-items: center; gap: 1rem; margin: 1.2rem 0; }

/* ============================================================================
   Responsive
   ============================================================================ */
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual { order: -1; }
    .feature-grid { grid-template-columns: 1fr; }
    .app-shell { grid-template-columns: 1fr; }
    .app-sidebar { position: fixed; left: -280px; z-index: 60; transition: left .2s ease; width: 264px; }
    .app-sidebar.open { left: 0; }
    .nav-links a:not(.btn) { display: none; }
    .pillars { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================================
   Journal officine — habillage « journal du poste » (scope .journal-sp)
   Palette du SpDataGrid desktop (SuperPharm.Core.UI/Grid/SpDataGrid.cs) :
   entête #FBFCFF / #081C42 semi-gras, cellules 13px #333, lignes alternées
   #FBFCFE, survol #F3F7FF, filets #F2F4F7, séparateur d'entête #E2E2E2,
   accent sélection #1E54B7. Zone de filtres = zone de recherche du
   JournalUserControl (blue50 #EFF3FE / blue100 #D4E2FC, rayon 6).
   ============================================================================ */

/* ---- Zone de filtres (recherche du poste) ---- */
.journal-sp .journal-filtres {
    display: flex; gap: .5rem; flex-wrap: wrap; align-items: center;
    background: #EFF3FE; border: 1px solid #D4E2FC; border-radius: var(--r-sm);
    padding: .7rem .8rem; margin: 1rem 0 1.2rem; box-shadow: none;
}
.journal-sp .journal-filtres input,
.journal-sp .journal-filtres select {
    width: auto; padding: .45rem .65rem; font-size: .9rem;
    background: #fff; border: 1.5px solid #D4E2FC; border-radius: var(--r-sm); color: #333333;
}
.journal-sp .journal-filtres input:focus,
.journal-sp .journal-filtres select:focus { border-color: #276EF1; box-shadow: 0 0 0 3px #D4E2FC; }
.journal-sp .journal-filtres .filtre-q { flex: 1; min-width: 180px; }
.journal-sp .journal-filtres .btn { margin-top: 0; }

/* ---- Grille (SpDataGrid) ---- */
.journal-sp .table-scroll { overflow-x: auto; }
.journal-sp .table {
    border: 1px solid #E2E2E2; border-radius: var(--r);
    box-shadow: none; margin: .6rem 0 1rem;
}
.journal-sp .table th,
.journal-sp .table td { padding: .5rem .9rem; font-size: .85rem; border-bottom: 1px solid #F2F4F7; }
.journal-sp .table thead th {
    background: #FBFCFF; color: #081C42; font-weight: 600; font-size: .8rem;
    letter-spacing: 0; text-transform: none; border-bottom: 1px solid #E2E2E2; white-space: nowrap;
}
.journal-sp .table td { color: #333333; }
.journal-sp .table tbody tr:nth-child(even) td { background: #FBFCFE; }
.journal-sp .table tbody tr:hover td { background: #F3F7FF; }
.journal-sp .table a { color: #276EF1; font-weight: 600; }
.journal-sp .table a:hover { color: #1E54B7; }

/* Colonnes numériques par journal — alignées à droite en chiffres tabulaires,
   comme les GridNumericColumn du poste. Les positions suivent l'ordre des <th>. */
.journal-sp .table-ventes th:nth-child(6), .journal-sp .table-ventes td:nth-child(6),
.journal-sp .table-ventes th:nth-child(7), .journal-sp .table-ventes td:nth-child(7),
.journal-sp .table-ventes th:nth-child(8), .journal-sp .table-ventes td:nth-child(8),
.journal-sp .table-ventes th:nth-child(9), .journal-sp .table-ventes td:nth-child(9),
.journal-sp .table-instances th:nth-child(5), .journal-sp .table-instances td:nth-child(5),
.journal-sp .table-instances th:nth-child(6), .journal-sp .table-instances td:nth-child(6),
.journal-sp .table-rejets th:nth-child(7), .journal-sp .table-rejets td:nth-child(7),
.journal-sp .table-rejets th:nth-child(8), .journal-sp .table-rejets td:nth-child(8),
.journal-sp .table-rejets th:nth-child(9), .journal-sp .table-rejets td:nth-child(9),
.journal-sp .table-rejets th:nth-child(10), .journal-sp .table-rejets td:nth-child(10),
.journal-sp .table-entrees th:nth-child(5), .journal-sp .table-entrees td:nth-child(5),
.journal-sp .table-entrees th:nth-child(6), .journal-sp .table-entrees td:nth-child(6),
.journal-sp .table-entrees th:nth-child(8), .journal-sp .table-entrees td:nth-child(8),
.journal-sp .table-reclamations th:nth-child(7), .journal-sp .table-reclamations td:nth-child(7),
.journal-sp .table-clients th:nth-child(7), .journal-sp .table-clients td:nth-child(7),
.journal-sp .table-lignes-vente th:nth-child(4), .journal-sp .table-lignes-vente td:nth-child(4),
.journal-sp .table-lignes-vente th:nth-child(5), .journal-sp .table-lignes-vente td:nth-child(5),
.journal-sp .table-lignes-vente th:nth-child(6), .journal-sp .table-lignes-vente td:nth-child(6),
.journal-sp .table-lignes-vente th:nth-child(7), .journal-sp .table-lignes-vente td:nth-child(7),
.journal-sp .table-lignes-entree th:nth-child(4), .journal-sp .table-lignes-entree td:nth-child(4),
.journal-sp .table-lignes-entree th:nth-child(5), .journal-sp .table-lignes-entree td:nth-child(5),
.journal-sp .table-lignes-entree th:nth-child(6), .journal-sp .table-lignes-entree td:nth-child(6),
.journal-sp .table-lignes-entree th:nth-child(7), .journal-sp .table-lignes-entree td:nth-child(7),
.journal-sp .table-lignes-entree th:nth-child(8), .journal-sp .table-lignes-entree td:nth-child(8),
.journal-sp .table-lignes-entree th:nth-child(9), .journal-sp .table-lignes-entree td:nth-child(9) {
    text-align: right; font-variant-numeric: tabular-nums;
}

/* Colonnes numériques — journaux Contracts 1.5 (mêmes règles, positions par table). */
.journal-sp .table-lots-sorties th:nth-child(8), .journal-sp .table-lots-sorties td:nth-child(8),
.journal-sp .table-lots-sorties th:nth-child(9), .journal-sp .table-lots-sorties td:nth-child(9),
.journal-sp .table-lots-sorties th:nth-child(10), .journal-sp .table-lots-sorties td:nth-child(10),
.journal-sp .table-peremption th:nth-child(5), .journal-sp .table-peremption td:nth-child(5),
.journal-sp .table-peremption th:nth-child(6), .journal-sp .table-peremption td:nth-child(6),
.journal-sp .table-peremption th:nth-child(7), .journal-sp .table-peremption td:nth-child(7),
.journal-sp .table-factures-vente th:nth-child(5), .journal-sp .table-factures-vente td:nth-child(5),
.journal-sp .table-factures-vente th:nth-child(6), .journal-sp .table-factures-vente td:nth-child(6),
.journal-sp .table-factures-vente th:nth-child(7), .journal-sp .table-factures-vente td:nth-child(7),
.journal-sp .table-factures-vente th:nth-child(8), .journal-sp .table-factures-vente td:nth-child(8),
.journal-sp .table-factures-vente th:nth-child(9), .journal-sp .table-factures-vente td:nth-child(9),
.journal-sp .table-preparations th:nth-child(7), .journal-sp .table-preparations td:nth-child(7),
.journal-sp .table-ordonnancier th:nth-child(1), .journal-sp .table-ordonnancier td:nth-child(1),
.journal-sp .table-achats th:nth-child(5), .journal-sp .table-achats td:nth-child(5),
.journal-sp .table-achats th:nth-child(6), .journal-sp .table-achats td:nth-child(6),
.journal-sp .table-achats th:nth-child(7), .journal-sp .table-achats td:nth-child(7),
.journal-sp .table-achats th:nth-child(8), .journal-sp .table-achats td:nth-child(8),
.journal-sp .table-retours th:nth-child(5), .journal-sp .table-retours td:nth-child(5),
.journal-sp .table-retours th:nth-child(6), .journal-sp .table-retours td:nth-child(6),
.journal-sp .table-regularisations th:nth-child(4), .journal-sp .table-regularisations td:nth-child(4),
.journal-sp .table-regularisations th:nth-child(5), .journal-sp .table-regularisations td:nth-child(5),
.journal-sp .table-inventaires th:nth-child(4), .journal-sp .table-inventaires td:nth-child(4),
.journal-sp .table-transferts th:nth-child(5), .journal-sp .table-transferts td:nth-child(5),
.journal-sp .table-achats-client th:nth-child(4), .journal-sp .table-achats-client td:nth-child(4),
.journal-sp .table-achats-client th:nth-child(5), .journal-sp .table-achats-client td:nth-child(5),
.journal-sp .table-pertes th:nth-child(3), .journal-sp .table-pertes td:nth-child(3),
.journal-sp .table-pertes th:nth-child(4), .journal-sp .table-pertes td:nth-child(4),
.journal-sp .table-echanges th:nth-child(4), .journal-sp .table-echanges td:nth-child(4),
.journal-sp .table-echanges th:nth-child(5), .journal-sp .table-echanges td:nth-child(5),
.journal-sp .table-soldes-echanges th:nth-child(3), .journal-sp .table-soldes-echanges td:nth-child(3),
.journal-sp .table-creances th:nth-child(3), .journal-sp .table-creances td:nth-child(3),
.journal-sp .table-creances th:nth-child(4), .journal-sp .table-creances td:nth-child(4),
.journal-sp .table-soldes-fournisseurs th:nth-child(2), .journal-sp .table-soldes-fournisseurs td:nth-child(2),
.journal-sp .table-soldes-fournisseurs th:nth-child(3), .journal-sp .table-soldes-fournisseurs td:nth-child(3),
.journal-sp .table-soldes-fournisseurs th:nth-child(4), .journal-sp .table-soldes-fournisseurs td:nth-child(4),
.journal-sp .table-sessions th:nth-child(5), .journal-sp .table-sessions td:nth-child(5),
.journal-sp .table-sessions th:nth-child(6), .journal-sp .table-sessions td:nth-child(6),
.journal-sp .table-sessions th:nth-child(7), .journal-sp .table-sessions td:nth-child(7),
.journal-sp .table-sessions th:nth-child(8), .journal-sp .table-sessions td:nth-child(8),
.journal-sp .table-produits th:nth-child(5), .journal-sp .table-produits td:nth-child(5),
.journal-sp .table-stock th:nth-child(4), .journal-sp .table-stock td:nth-child(4),
.journal-sp .table-stock th:nth-child(5), .journal-sp .table-stock td:nth-child(5),
.journal-sp .table-stock th:nth-child(6), .journal-sp .table-stock td:nth-child(6),
.journal-sp .table-credits-clients th:nth-child(5), .journal-sp .table-credits-clients td:nth-child(5),
.journal-sp .table-credits-clients th:nth-child(6), .journal-sp .table-credits-clients td:nth-child(6),
.journal-sp .table-operations th:nth-child(6), .journal-sp .table-operations td:nth-child(6),
.journal-sp .table-operations th:nth-child(7), .journal-sp .table-operations td:nth-child(7),
.journal-sp .table-chifa-factures th:nth-child(7), .journal-sp .table-chifa-factures td:nth-child(7),
.journal-sp .table-chifa-factures th:nth-child(8), .journal-sp .table-chifa-factures td:nth-child(8),
.journal-sp .table-chifa-factures th:nth-child(9), .journal-sp .table-chifa-factures td:nth-child(9),
.journal-sp .table-chifa-factures th:nth-child(10), .journal-sp .table-chifa-factures td:nth-child(10),
.journal-sp .table-chifa-bordereaux th:nth-child(4), .journal-sp .table-chifa-bordereaux td:nth-child(4),
.journal-sp .table-chifa-bordereaux th:nth-child(6), .journal-sp .table-chifa-bordereaux td:nth-child(6),
.journal-sp .table-chifa-bordereaux th:nth-child(7), .journal-sp .table-chifa-bordereaux td:nth-child(7),
.journal-sp .table-chifa-beneficiaires th:nth-child(5), .journal-sp .table-chifa-beneficiaires td:nth-child(5),
.journal-sp .table-chifa-cm th:nth-child(8), .journal-sp .table-chifa-cm td:nth-child(8),
.journal-sp .table-chifa-cm th:nth-child(9), .journal-sp .table-chifa-cm td:nth-child(9),
.journal-sp .table-chifa-medicaments th:nth-child(6), .journal-sp .table-chifa-medicaments td:nth-child(6),
.journal-sp .table-chifa-medicaments th:nth-child(7), .journal-sp .table-chifa-medicaments td:nth-child(7),
.journal-sp .table-lignes-chifa th:nth-child(3), .journal-sp .table-lignes-chifa td:nth-child(3),
.journal-sp .table-lignes-chifa th:nth-child(4), .journal-sp .table-lignes-chifa td:nth-child(4),
.journal-sp .table-lignes-chifa th:nth-child(5), .journal-sp .table-lignes-chifa td:nth-child(5),
.journal-sp .table-lignes-chifa th:nth-child(6), .journal-sp .table-lignes-chifa td:nth-child(6),
.journal-sp .table-factures-bord th:nth-child(5), .journal-sp .table-factures-bord td:nth-child(5),
.journal-sp .table-factures-bord th:nth-child(6), .journal-sp .table-factures-bord td:nth-child(6),
.journal-sp .table-factures-benef th:nth-child(4), .journal-sp .table-factures-benef td:nth-child(4),
.journal-sp .table-factures-benef th:nth-child(5), .journal-sp .table-factures-benef td:nth-child(5),
.journal-sp .table-attestations th:nth-child(2), .journal-sp .table-attestations td:nth-child(2),
.journal-sp .table-lignes-cm th:nth-child(2), .journal-sp .table-lignes-cm td:nth-child(2),
.journal-sp .table-lignes-cm th:nth-child(3), .journal-sp .table-lignes-cm td:nth-child(3),
.journal-sp .table-lignes-cm th:nth-child(4), .journal-sp .table-lignes-cm td:nth-child(4),
.journal-sp .table-lignes-cm th:nth-child(5), .journal-sp .table-lignes-cm td:nth-child(5),
.journal-sp .table-lignes-cm th:nth-child(6), .journal-sp .table-lignes-cm td:nth-child(6),
.journal-sp .table-tarifs th:nth-child(3), .journal-sp .table-tarifs td:nth-child(3) {
    text-align: right; font-variant-numeric: tabular-nums;
}

/* ============================================================================
   Statistiques CHIFA (scope .chifa-stats) — tuiles KPI + barres horizontales.
   Largeurs de barres posées via CSSOM par chifa-stats.js (la CSP bloque style=).
   ============================================================================ */
.chifa-stats .kpi-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: .7rem; margin: .6rem 0 1rem;
}
.chifa-stats .kpi {
    background: #FBFCFF; border: 1px solid #E2E2E2; border-radius: var(--r);
    padding: .7rem .9rem;
}
.chifa-stats .kpi h3 {
    margin: 0 0 .3rem; font-size: .72rem; font-weight: 600; letter-spacing: .02em;
    text-transform: uppercase; color: #6B7A99;
}
.chifa-stats .kpi .kpi-val { margin: 0; font-size: 1.35rem; font-weight: 700; color: #081C42; font-variant-numeric: tabular-nums; }
.chifa-stats .kpi .kpi-sub { margin: .15rem 0 0; font-size: .78rem; color: #6B7A99; }
.chifa-stats .kpi.vert   .kpi-val { color: #1F9254; }
.chifa-stats .kpi.orange .kpi-val { color: #C46A17; }
.chifa-stats .kpi.bleu   .kpi-val { color: #1E54B7; }
.chifa-stats .kpi.rouge  .kpi-val { color: #C0362C; }

.chifa-stats .titre-sous { margin: .8rem 0 .4rem; font-size: .95rem; color: #081C42; }

/* Deux colonnes côte à côte (retombe en pile sous 900px). */
.chifa-stats .stats-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 900px) { .chifa-stats .stats-2col { grid-template-columns: 1fr; } }

/* Barres horizontales : libellé | piste | valeur. */
.chifa-stats .barres { margin: .3rem 0 1rem; }
.chifa-stats .barre-ligne {
    display: grid; grid-template-columns: minmax(120px, 34%) 1fr auto;
    gap: .6rem; align-items: center; padding: .18rem 0;
}
.chifa-stats .barre-label {
    font-size: .82rem; color: #333333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chifa-stats .barre-emoji { margin-right: .3rem; }
.chifa-stats .barre-piste { background: #EFF3FE; border-radius: 5px; overflow: hidden; height: 18px; }
.chifa-stats .barre-rempli { height: 100%; background: #276EF1; border-radius: 5px; min-width: 2px; transition: width .2s; }
.chifa-stats .barre-rempli.vert   { background: #2FA96A; }
.chifa-stats .barre-rempli.orange { background: #E38A2E; }
.chifa-stats .barre-rempli.bleu   { background: #1E54B7; }
.chifa-stats .barre-rempli.rouge  { background: #D6564A; }
.chifa-stats .barre-val {
    font-size: .8rem; color: #333333; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums;
}

/* Colonnes numériques des tables top N (mêmes règles que les journaux). */
.chifa-stats .table-top-meds th:nth-child(4), .chifa-stats .table-top-meds td:nth-child(4),
.chifa-stats .table-top-meds th:nth-child(5), .chifa-stats .table-top-meds td:nth-child(5),
.chifa-stats .table-top-meds th:nth-child(6), .chifa-stats .table-top-meds td:nth-child(6),
.chifa-stats .table-top-clients th:nth-child(4), .chifa-stats .table-top-clients td:nth-child(4),
.chifa-stats .table-top-clients th:nth-child(5), .chifa-stats .table-top-clients td:nth-child(5),
.chifa-stats .table-top-clients th:nth-child(6), .chifa-stats .table-top-clients td:nth-child(6),
.chifa-stats .table-top-presc th:nth-child(3), .chifa-stats .table-top-presc td:nth-child(3),
.chifa-stats .table-top-presc th:nth-child(4), .chifa-stats .table-top-presc td:nth-child(4) {
    text-align: right; font-variant-numeric: tabular-nums;
}

/* Cases à cocher des filtres et fiches détail (remplacent les styles inline, bloqués par la CSP). */
.journal-sp .filtre-check { display: flex; align-items: center; gap: .3rem; margin: 0; font-weight: 500; }
.journal-sp .filtre-check input { width: auto; }
.journal-sp .fiche-montant { font-size: 1.2rem; }
.journal-sp .titre-volet { margin-top: 1.5rem; }
.journal-sp .table-fiche { max-width: 520px; }
.journal-sp .table-fiche th { text-align: left; background: #FBFCFF; color: #081C42; font-weight: 600; }

/* ---- Pagination (SpDataPager) ---- */
.journal-sp .pager { gap: .35rem; justify-content: center; }
.journal-sp .pager .btn {
    border-radius: var(--r-sm); padding: .3rem .7rem; font-size: .85rem; font-weight: 600;
    background: #fff; color: #374151; border: 1px solid transparent; box-shadow: none;
}
.journal-sp .pager .btn:hover { background: #EFF3FE; color: #374151; border-color: #9AC0F4; filter: none; }
.journal-sp .pager .btn-outline { border-color: #E2E2E2; }
.journal-sp .pager .btn-primary { background: #1E54B7; color: #fff; border-color: #1E54B7; }
.journal-sp .pager .btn-primary:hover { background: #1E54B7; color: #fff; }

/* ── Champ typeahead (lookups admin : marque, DCI, fabricant) ───────────────── */
.typeahead { position: relative; }
.typeahead .ta-list {
    position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 2px);
    margin: 0; padding: 4px; list-style: none;
    background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
    box-shadow: var(--shadow-xs); max-height: 260px; overflow-y: auto;
}
.typeahead .ta-item { padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: .95rem; }
.typeahead .ta-item:hover, .typeahead .ta-item.active { background: var(--bg-soft); }
.typeahead .ta-empty { padding: 7px 10px; color: var(--muted); font-size: .9rem; }

/* ============================================================================
   Page Tarifs (/tarifs) — catalogue "tout inclus" + tableau des limites d'usage
   ============================================================================ */
.tf-hero { text-align: center; max-width: 720px; margin: 0 auto 2.5rem; }
.tf-hero .kicker { color: var(--sp-600); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; }
.tf-hero h1 { margin: .5rem 0; }
.tf-hero .grad { background: var(--sp-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.tf-hero p { color: var(--muted); font-size: 1.08rem; }

.tf-band { display: flex; align-items: center; gap: .8rem; background: var(--sp-50); border: 1px solid var(--sp-100);
           border-radius: var(--r); padding: .9rem 1.2rem; color: var(--sp-800); font-weight: 600; font-size: .96rem; margin: 0 auto 2rem; max-width: 980px; }
.tf-band .inf { font-size: 1.3rem; line-height: 1; color: var(--sp-500); }
.tf-band b { color: var(--ink); }

.tf-catalog { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.tf-cgroup { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.2rem; box-shadow: var(--shadow-xs); }
.tf-cgroup h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--sp-700); margin: 0 0 .7rem;
                display: flex; align-items: center; gap: .5rem; }
.tf-cgroup h3::before { content: ""; width: 5px; height: 15px; border-radius: 3px; background: var(--sp-gradient); }
.tf-cgroup ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.tf-cgroup li { position: relative; padding-left: 1.35rem; font-size: .88rem; color: var(--text); line-height: 1.35; }
.tf-cgroup li::before { content: "✓"; position: absolute; left: 0; color: var(--sp-500); font-weight: 800; }

.tf-usage-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.tf-usage { border-collapse: collapse; width: 100%; min-width: 620px; background: var(--bg); }
.tf-usage thead th { background: var(--sp-800); color: #fff; font-weight: 600; padding: .85rem 1.1rem; text-align: center; font-size: .92rem; }
.tf-usage thead th:first-child { text-align: left; }
.tf-usage thead th small { display: block; font-weight: 400; opacity: .8; font-size: .74rem; }
.tf-usage td { padding: .8rem 1.1rem; border-top: 1px solid var(--line-soft); text-align: center; font-weight: 700; color: var(--ink); }
.tf-usage td:first-child { text-align: left; font-weight: 500; color: var(--text); }
.tf-usage tbody tr:hover td { background: var(--bg-soft); }
.tf-usage .inf { color: var(--sp-600); }
.tf-usage .prem { background: color-mix(in srgb, var(--sp-100) 40%, transparent); }

.tf-calc { border-collapse: collapse; width: 100%; background: var(--bg); border-radius: var(--r); overflow: hidden;
           box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.tf-calc thead th { background: var(--sp-800); color: #fff; font-weight: 600; padding: .8rem 1.1rem; text-align: right; font-size: .9rem; }
.tf-calc thead th:first-child { text-align: left; }
.tf-calc td { padding: .75rem 1.1rem; border-top: 1px solid var(--line-soft); text-align: right; font-variant-numeric: tabular-nums; }
.tf-calc td:first-child { text-align: left; font-weight: 600; }
.tf-calc tbody tr:nth-child(even) td { background: var(--bg-soft); }

.tf-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.tf-info { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 1.2rem 1.4rem; box-shadow: var(--shadow-xs); }
.tf-info h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 .8rem; }
.tf-kv { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-top: 1px solid var(--line-soft); font-size: .92rem; }
.tf-kv:first-of-type { border-top: none; }
.tf-kv .k { color: var(--muted); }
.tf-kv .v { font-weight: 700; color: var(--ink); text-align: right; white-space: nowrap; }
.tf-cta { text-align: center; margin-top: 2.2rem; }

@media (max-width: 860px) {
    .tf-catalog { grid-template-columns: 1fr; }
    .tf-info-grid { grid-template-columns: 1fr; }
}
