:root{
  --bg:#0D1117; --panel:#151B24; --panel2:#1B222D; --signal:#E4735C; --gold:#E9B75C;
  --ink:#EDEFF3; --muted:#AEB6C2; --border:#1F2733; --border2:#1A202B;
  --pill-wait-bg:#3A2E1A; --pill-ok-bg:#1B3324; --pill-ok-fg:#6FCF97; --pill-admin-bg:#3A1E1E; --pill-approb-bg:#1E2E3A; --pill-approb-fg:#5CA0E4; --pill-red-bg:#2A2A32;
  --modal-overlay:rgba(0,0,0,.55);
}

/* Automatic: follow the OS/browser preference when the user hasn't picked a mode. */
@media (prefers-color-scheme: light){
  :root:not([data-theme="dark"]){
    --bg:#F4F5F7; --panel:#FFFFFF; --panel2:#F0F1F4; --signal:#D9634C; --gold:#B5791F;
    --ink:#171B22; --muted:#5C6572; --border:#E2E5EA; --border2:#D8DBE2;
    --pill-wait-bg:#FBE9CF; --pill-ok-bg:#DBF2E3; --pill-ok-fg:#1F8A4C; --pill-admin-bg:#FADAD3; --pill-approb-bg:#DCE9F8; --pill-approb-fg:#2E68B0; --pill-red-bg:#E7E8EC;
    --modal-overlay:rgba(20,22,28,.4);
  }
}

/* Manual: an explicit choice always wins, overriding the OS preference. */
:root[data-theme="light"]{
  --bg:#F4F5F7; --panel:#FFFFFF; --panel2:#F0F1F4; --signal:#D9634C; --gold:#B5791F;
  --ink:#171B22; --muted:#5C6572; --border:#E2E5EA; --border2:#D8DBE2;
  --pill-wait-bg:#FBE9CF; --pill-ok-bg:#DBF2E3; --pill-ok-fg:#1F8A4C; --pill-admin-bg:#FADAD3; --pill-approb-bg:#DCE9F8; --pill-approb-fg:#2E68B0; --pill-red-bg:#E7E8EC;
  --modal-overlay:rgba(20,22,28,.4);
}
:root[data-theme="dark"]{
  --bg:#0D1117; --panel:#151B24; --panel2:#1B222D; --signal:#E4735C; --gold:#E9B75C;
  --ink:#EDEFF3; --muted:#AEB6C2; --border:#1F2733; --border2:#1A202B;
  --pill-wait-bg:#3A2E1A; --pill-ok-bg:#1B3324; --pill-ok-fg:#6FCF97; --pill-admin-bg:#3A1E1E; --pill-approb-bg:#1E2E3A; --pill-approb-fg:#5CA0E4; --pill-red-bg:#2A2A32;
  --modal-overlay:rgba(0,0,0,.55);
}

*{box-sizing:border-box;}
html,body{margin:0; padding:0; background:var(--bg); color:var(--ink); font-family:'Public Sans',Arial,sans-serif; font-size:14px; transition:background .15s ease, color .15s ease;}
h1,h2,h3{font-family:'Archivo',Arial,sans-serif; margin:0;}
button{font-family:inherit; cursor:pointer;}
a{color:var(--signal);}
.hidden{display:none !important;}

/* ---- Login screen ---- */
#login-screen{min-height:100vh; display:flex; align-items:center; justify-content:center;}
.login-card{max-width:420px; padding:34px; background:var(--panel); border:1px solid var(--border); border-radius:14px; text-align:center;}
.login-card .mark{height:52px; width:auto; margin:0 auto 16px; display:block;}
.login-card .login-logo{display:block; width:max-content; margin:0 auto;}
.login-card .back-link{display:block; width:max-content; margin:16px auto 0; font-size:12.5px; color:var(--muted); text-decoration:none;}
.login-card .back-link:hover{color:var(--ink); text-decoration:underline;}
.site-link{display:flex; align-items:center; gap:10px; padding:10px 12px; margin-top:8px; border-radius:8px; color:var(--muted); font-size:13px; font-weight:600; text-decoration:none;}
.site-link svg{flex:0 0 16px; width:16px; height:16px;}
.site-link:hover{background:var(--panel2); color:var(--ink);}
.login-card h1{font-size:19px; margin-bottom:8px;}
.login-card p{color:var(--muted); font-size:13px; margin-bottom:20px;}

/* ---- Layout ---- */
.layout{display:flex; min-height:100vh;}
aside{width:244px; flex:0 0 244px; background:var(--panel); border-right:1px solid var(--border2); padding:20px 14px; display:flex; flex-direction:column;}
.brand{display:flex; align-items:center; gap:10px; padding:4px 8px 22px;}
.brand .mark{height:36px; width:auto; flex:0 0 auto;}
.brand .name{font-family:'Archivo',Arial,sans-serif; font-weight:700; font-size:15px;}
.brand .sub{font-size:11px; color:var(--muted);}
nav{display:flex; flex-direction:column; gap:3px; flex:1;}
.nav-item{display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:8px; border:none; background:transparent; color:var(--muted); font-size:13.5px; font-weight:600; text-align:left;}
.nav-item svg{flex:0 0 17px; width:17px; height:17px;}
.nav-item.active{background:var(--panel2); color:var(--ink);}
.nav-item:hover:not(.active){background:var(--panel2); color:var(--ink);}
.profile{display:flex; align-items:center; gap:9px; padding:10px; border-top:1px solid var(--border2); margin-top:10px;}
.avatar{width:30px; height:30px; border-radius:50%; background:var(--panel2); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; color:var(--gold);}
.profile .pname{font-size:12.5px; font-weight:600;}
.profile .prole{font-size:11px; color:var(--muted);}
.profile .logout{margin-left:auto; background:transparent; border:none; color:var(--muted); font-size:11px; text-decoration:underline;}
.theme-row{display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 10px; margin-top:4px;}
.theme-row .lbl{font-size:11px; color:var(--muted); font-weight:600;}
.theme-toggle{display:flex; gap:2px; background:var(--panel2); border:1px solid var(--border); border-radius:8px; padding:2px;}
.theme-toggle button{border:none; background:transparent; color:var(--muted); font-size:13px; line-height:1; padding:5px 8px; border-radius:6px; display:flex; align-items:center; justify-content:center;}
.theme-toggle button svg{width:14px; height:14px;}
.theme-toggle button.on{background:var(--panel); color:var(--gold); box-shadow:0 0 0 1px var(--border);}
main{flex:1; display:flex; flex-direction:column; min-width:0;}
header.top{padding:18px 28px; border-bottom:1px solid var(--border2); display:flex; align-items:center; justify-content:space-between;}
header.top .eyebrow{font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); font-weight:600;}
header.top h1{font-size:19px;}
.content{padding:24px 28px 60px; overflow-y:auto;}
.panel{display:none;}
.panel.active{display:block;}
.grid-kpi{display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:22px;}
@media(max-width:1000px){.grid-kpi{grid-template-columns:repeat(2,1fr);}}
.card{background:var(--panel); border:1px solid var(--border); border-radius:12px; padding:18px;}
details.card.collapsible{padding:0;}
details.card.collapsible > summary.section-title{padding:18px; margin-bottom:0; cursor:pointer; list-style:none; user-select:none;}
details.card.collapsible > summary.section-title::-webkit-details-marker{display:none;}
details.card.collapsible > summary.section-title::after{content:'\25BE'; color:var(--muted); font-size:12px; transition:transform .15s ease; margin-left:10px;}
details.card.collapsible[open] > summary.section-title::after{transform:rotate(180deg);}
details.card.collapsible > summary.section-title:hover{color:var(--signal);}
details.card.collapsible > *:not(summary){padding-left:18px; padding-right:18px;}
details.card.collapsible > *:last-child{padding-bottom:18px;}
details.card.collapsible[open] > summary.section-title{border-bottom:1px solid var(--border); padding-bottom:14px; margin-bottom:14px;}
.kpi .n{font-family:'Archivo',Arial,sans-serif; font-size:28px; font-weight:800;}
.kpi .lbl{font-size:12.5px; color:var(--muted); margin-top:3px;}
.kpi .ctx{font-size:11px; color:var(--gold); margin-top:7px;}
.two-col{display:grid; grid-template-columns:1.4fr 1fr; gap:16px;}
@media(max-width:1000px){.two-col{grid-template-columns:1fr;}}
.section-title{font-size:13.5px; font-weight:700; margin-bottom:12px; display:flex; align-items:center; justify-content:space-between;}
table{width:100%; border-collapse:collapse; font-size:12.8px;}
th{text-align:left; color:var(--muted); font-weight:600; font-size:11px; text-transform:uppercase; letter-spacing:.03em; padding:7px 10px; border-bottom:1px solid var(--border);}
/* Column headers stay visible while a long table scrolls (desktop; on narrow screens tables become stacked cards). */
.card table thead th{position:sticky; top:0; z-index:2; background:var(--panel); box-shadow:0 1px 0 var(--border);}
td{padding:9px 10px; border-bottom:1px solid var(--border2); vertical-align:middle;}
tr:last-child td{border-bottom:none;}
.dot{display:inline-block; width:7px; height:7px; border-radius:50%; margin-right:7px;}
.dot.c-soumission{background:#5CA0E4;} .dot.c-decision{background:#6FCF97;} .dot.c-roles{background:var(--gold);}
.dot.c-contact{background:#B88CE8;} .dot.c-rapport{background:var(--signal);} .dot.c-guide{background:#8CE8D4;}
.btn{padding:8px 15px; border-radius:7px; font-size:12.8px; font-weight:600; border:1px solid var(--border); background:var(--panel2); color:var(--ink);}
.btn:hover{border-color:var(--signal);}
.btn-primary{background:var(--signal); border-color:var(--signal); color:#1A0E0A;}
.btn-primary:hover{opacity:.9;}
.btn-outline{background:transparent;}
.btn-sm{padding:5px 11px; font-size:12px;}
.btn-danger{background:transparent; border-color:#6b2c2c; color:#E89090;}
.btn[disabled]{opacity:.5; cursor:default;}
.pill{display:inline-block; padding:2px 9px; border-radius:99px; font-size:11px; font-weight:700;}
.pill-wait{background:var(--pill-wait-bg); color:var(--gold);} .pill-ok{background:var(--pill-ok-bg); color:var(--pill-ok-fg);}
.pill-admin{background:var(--pill-admin-bg); color:var(--signal);} .pill-approb{background:var(--pill-approb-bg); color:var(--pill-approb-fg);}
.pill-red{background:var(--pill-red-bg); color:var(--muted);}
.pill-masque{background:var(--panel2); color:var(--muted); border:1px dashed var(--border);}
.pill-suppr{background:var(--pill-red-bg); color:var(--signal);}
.chip-row{display:flex; gap:8px; margin-bottom:16px; flex-wrap:wrap;}
.chip{padding:6px 13px; border-radius:99px; font-size:12px; font-weight:600; border:1px solid var(--border); background:var(--panel2); color:var(--muted);}
.chip.on{background:var(--signal); color:#1A0E0A; border-color:var(--signal);}
.row-actions{display:flex; gap:6px;}
.appr-card{display:flex; align-items:center; justify-content:space-between; padding:13px 15px; border:1px solid var(--border); border-radius:10px; margin-bottom:9px; background:var(--panel2); gap:12px; flex-wrap:wrap;}
.appr-left{display:flex; flex-direction:column; gap:3px;}
.appr-title{font-weight:700; font-size:13.5px;}
.appr-meta{font-size:11.5px; color:var(--muted);}
input,select,textarea{background:var(--panel2); border:1px solid var(--border); color:var(--ink); border-radius:7px; padding:8px 10px; font-size:12.8px; font-family:inherit; width:100%;}
label{font-size:11.5px; color:var(--muted); display:block; margin-bottom:4px; font-weight:600;}
.form-grid{display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:12px;}
.form-grid.cols3{grid-template-columns:1fr 1fr 1fr;}
.muted{color:var(--muted);}
.empty{color:var(--muted); font-size:12.8px; padding:16px 0; text-align:center;}
.status-msg{font-size:12.5px; margin-top:10px; min-height:16px;}
.status-msg.ok{color:#6FCF97;} .status-msg.err{color:#E89090;}
.modal-bg{display:none; position:fixed; inset:0; background:var(--modal-overlay); align-items:center; justify-content:center; z-index:50;}
.modal-bg.open{display:flex;}
.modal{background:var(--panel); border:1px solid var(--border); border-radius:12px; padding:20px; width:380px; max-width:92vw; max-height:88vh; overflow-y:auto;}
.modal.wide{width:560px;}
.modal h3{font-size:15px; margin-bottom:14px;}
.modal .actions{display:flex; justify-content:flex-end; gap:8px; margin-top:16px;}
.spin{display:inline-block; width:12px; height:12px; border:2px solid rgba(255,255,255,.25); border-top-color:#fff; border-radius:50%; animation:sp .7s linear infinite; vertical-align:middle; margin-right:6px;}
@keyframes sp{to{transform:rotate(360deg);}}

/* ---- Image thumbnails (grid rows + "current image" previews in forms) ---- */
.thumb{width:28px; height:28px; object-fit:cover; border-radius:5px; border:1px solid var(--border); vertical-align:middle; margin-right:8px; background:var(--panel2);}
.thumb-lg{display:block; width:120px; height:80px; object-fit:cover; border-radius:8px; border:1px solid var(--border); margin:6px 0; background:var(--panel2);}

/* ---- Article preview (approximates the public site's layout) ---- */
.ap-article{max-width:640px;}
.ap-tag{display:inline-block; padding:3px 10px; border-radius:99px; background:var(--pill-admin-bg); color:var(--signal); font-size:11px; font-weight:700; margin-bottom:10px;}
.ap-title{font-size:22px; line-height:1.25; margin-bottom:14px;}
.ap-hero{width:100%; max-height:320px; object-fit:cover; border-radius:10px; margin-bottom:14px; background:var(--panel2);}
.ap-hero.ap-hero-default{object-fit:contain; height:150px; padding:18px; background:#fff; border:1px solid var(--border);}
.ap-desc{font-size:14.5px; color:var(--muted); font-weight:600; margin-bottom:18px; line-height:1.5;}
.ap-body p{font-size:13.5px; line-height:1.7; margin:0 0 10px;}
.ap-block{margin-bottom:18px;}
.ap-block.ap-full img{width:100%; max-height:280px; object-fit:cover; border-radius:8px; margin-bottom:10px;}
.ap-block.ap-left::after,.ap-block.ap-right::after{content:""; display:table; clear:both;}
.ap-block.ap-left img{float:left; width:42%; max-width:220px; border-radius:8px; margin:0 14px 8px 0;}
.ap-block.ap-right img{float:right; width:42%; max-width:220px; border-radius:8px; margin:0 0 8px 14px;}
.ap-block figure{margin:0 0 10px;}
.ap-block figcaption{font-size:11.5px; color:var(--muted); margin-top:5px; line-height:1.4;}
.ap-block.ap-full figure img{width:100%; max-height:280px; object-fit:cover; border-radius:8px; display:block;}
.ap-block.ap-banner figure img{width:100%; aspect-ratio:21/9; object-fit:cover; border-radius:8px; display:block;}
.ap-block.ap-medium figure{width:60%; margin:0 auto 12px;}
.ap-block.ap-medium figure img{width:100%; border-radius:8px; display:block;}
.ap-block.ap-half{display:flex; gap:14px; align-items:flex-start;}
.ap-block.ap-half .ap-half-img,.ap-block.ap-half .ap-half-text{flex:1 1 50%; min-width:0;}
.ap-block.ap-half .ap-half-img img{width:100%; border-radius:8px; display:block; aspect-ratio:4/3; object-fit:cover;}
.ap-block.ap-half .ap-half-text p{margin:0;}
.ap-block.ap-half-right{flex-direction:row-reverse;}
.ap-block.ap-two .ap-two-row{display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-bottom:6px;}
.ap-block.ap-two .ap-two-row img{width:100%; aspect-ratio:4/3; object-fit:cover; border-radius:8px; display:block;}
.ap-block.ap-overlay{position:relative; border-radius:8px; overflow:hidden;}
.ap-block.ap-overlay img{width:100%; min-height:200px; max-height:300px; object-fit:cover; display:block;}
.ap-block.ap-overlay .ap-overlay-text{position:absolute; left:0; right:0; bottom:0; padding:28px 14px 12px; background:linear-gradient(transparent, rgba(0,0,0,.78));}
.ap-block.ap-overlay .ap-overlay-text p{color:#fff; margin:0; font-weight:600;}
.ap-block.ap-quote blockquote{margin:0; padding:6px 0 6px 14px; border-left:4px solid var(--signal); font-size:16px; font-style:italic; line-height:1.5; font-weight:600;}
.block-extras{margin:6px 0 4px;}
.block-hint{font-size:11.5px;}

/* =====================================================================
   Responsive / mobile
   Desktop layout above 900px is unchanged. At 900px and below the sidebar
   becomes a slide-in drawer opened from a hamburger in the header; forms
   stack, tables scroll sideways inside their card, and modals become
   bottom sheets. Inputs are 16px on phones so iOS Safari doesn't zoom the
   page when a field is focused.
   ===================================================================== */
html{-webkit-text-size-adjust:100%; text-size-adjust:100%;}
body{overflow-x:hidden;}
.row-actions{flex-wrap:wrap;}

/* Hidden on desktop; shown in the small-screen block below. */
.menu-btn{display:none; align-items:center; justify-content:center; width:42px; height:42px; flex:0 0 42px; border-radius:10px; border:1px solid var(--border); background:var(--panel); color:var(--ink); padding:0;}
.menu-btn svg{width:21px; height:21px;}
.drawer-backdrop{display:none;}
header.top .head-left{display:flex; align-items:center; gap:12px; min-width:0;}
header.top .head-titles{min-width:0;}
header.top h1{overflow-wrap:anywhere;}

@media (max-width:900px){
  .layout{min-height:100vh; min-height:100dvh;}

  /* Sidebar -> off-canvas drawer */
  aside{
    position:fixed; top:0; left:0; bottom:0; z-index:60;
    width:290px; max-width:86vw; flex:none; overflow-y:auto;
    padding:calc(18px + env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom));
    transform:translateX(-102%); visibility:hidden;
    transition:transform .22s ease, visibility 0s linear .22s;
  }
  .layout.nav-open aside{transform:none; visibility:visible; transition:transform .22s ease, visibility 0s; box-shadow:0 0 44px rgba(0,0,0,.55);}
  .drawer-backdrop{
    display:block; position:fixed; inset:0; z-index:55;
    background:var(--modal-overlay); opacity:0; pointer-events:none; transition:opacity .2s ease;
  }
  .layout.nav-open .drawer-backdrop{opacity:1; pointer-events:auto;}
  body.nav-lock{overflow:hidden;}
  .nav-item{padding:13px 12px; font-size:15px;} /* comfortable tap targets */
  .site-link{padding:13px 12px; font-size:15px;}
  .nav-item svg{flex-basis:19px; width:19px; height:19px;}

  /* Header: sticky, with the hamburger */
  .menu-btn{display:inline-flex;}
  header.top{
    position:sticky; top:0; z-index:40; background:var(--bg);
    padding:10px 14px; padding-top:calc(10px + env(safe-area-inset-top));
    padding-left:calc(14px + env(safe-area-inset-left)); padding-right:calc(14px + env(safe-area-inset-right));
  }
  header.top h1{font-size:18px;}
  #profEmail{display:none;} /* already shown in the drawer's profile block */

  .content{padding:16px calc(14px + env(safe-area-inset-right)) calc(56px + env(safe-area-inset-bottom)) calc(14px + env(safe-area-inset-left));}
  .card{padding:15px; overflow-x:auto;}   /* wide tables scroll inside the card (tablet widths) */
  .card table{min-width:540px;}
  details.card.collapsible{overflow-x:visible;}
  .two-col{gap:14px;}
}

@media (max-width:700px){
  /* Forms: one column */
  .form-grid,.form-grid.cols3{grid-template-columns:1fr;}
  input,select,textarea{font-size:16px; padding:11px 12px;}
  input[type="file"]{font-size:14px; padding:9px 10px;}
  label{font-size:12px;}

  /* Tap targets */
  .btn{min-height:42px; padding:10px 16px; font-size:14px;}
  .btn-sm{min-height:38px; padding:8px 13px; font-size:13px;}
  .chip{padding:9px 14px; font-size:13px;}
  .theme-toggle button{padding:8px 12px;}

  /* KPI tiles stay 2-up but tighter */
  .grid-kpi{gap:10px; margin-bottom:16px;}
  .kpi .n{font-size:24px;}

  /* Approval / submission cards: info on top, full-width action row below */
  .appr-card{flex-direction:column; align-items:stretch; gap:10px;}
  .appr-card .row-actions{display:grid; grid-template-columns:1fr 1fr; gap:8px;}
  .appr-card .row-actions .btn:first-child:nth-last-child(odd){grid-column:1 / -1;}
  .appr-card .row-actions .btn:only-child{grid-column:1 / -1;}

  /* Modals become bottom sheets */
  .modal-bg{align-items:flex-end;}
  .modal,.modal.wide{
    width:100%; max-width:100%; max-height:92vh; max-height:92dvh;
    border-radius:16px 16px 0 0; border-bottom:none;
    padding:18px 16px calc(18px + env(safe-area-inset-bottom));
  }
  .modal .actions{position:sticky; bottom:calc(-18px - env(safe-area-inset-bottom)); background:var(--panel); padding:12px 0 2px; margin-top:12px;}
  .modal .actions .btn{flex:1;}
  .ap-title{font-size:20px;}
  .ap-block.ap-left img,.ap-block.ap-right img{width:38%;}

  /* Login */
  #login-screen{padding:20px;}
  .login-card{width:100%; padding:28px 20px;}
  .login-card .btn{display:block; width:100%; text-align:center; text-decoration:none; padding:13px 16px;}
}

@media (max-width:380px){
  .grid-kpi{grid-template-columns:1fr;}
}

@media (prefers-reduced-motion:reduce){
  aside,.drawer-backdrop{transition:none !important;}
}

/* ---- Phones: tables become stacked, labeled rows ----------------------
   Each <td> gets a data-label (the column header text) from a small script
   in dashboard.js, so a row reads as a card:  LABEL ........ value.
   Nothing is hidden behind sideways scrolling, so the action buttons on
   Programme / Articles / Rôles are always reachable. */
@media (max-width:700px){
  .card table{min-width:0;}
  .card table thead{display:none;}
  .card table,.card table tbody,.card table tr,.card table td{display:block; width:100%;}
  .card table tr{padding:12px 0; border-bottom:1px solid var(--border2);}
  .card table tr:first-child{padding-top:2px;}
  .card table tr:last-child{border-bottom:none; padding-bottom:2px;}
  .card table td{
    display:flex; align-items:baseline; justify-content:space-between; gap:14px;
    border:none; padding:4px 0; text-align:right; overflow-wrap:anywhere;
  }
  .card table td::before{
    content:attr(data-label); flex:0 0 auto; max-width:42%; text-align:left;
    color:var(--muted); font-size:10.5px; font-weight:700; letter-spacing:.04em; text-transform:uppercase;
  }
  .card table td[data-label=""]::before{display:none;}
  .card table td[colspan]{display:block; text-align:center;}
  .card table td[colspan]::before{display:none;}
  .card table td.row-actions{justify-content:flex-start; flex-wrap:wrap; gap:8px; padding-top:10px; text-align:left;}
  .card table td > input,.card table td > select{flex:1; min-width:0; text-align:left;}
}

/* ---- Light theme: the red "danger"/error text was tuned for dark mode and
   was too pale on white. ------------------------------------------------ */
@media (prefers-color-scheme: light){
  :root:not([data-theme="dark"]) .btn-danger{color:#B3402F; border-color:#E3B3AA;}
  :root:not([data-theme="dark"]) .status-msg.err{color:#B3402F;}
}
:root[data-theme="light"] .btn-danger{color:#B3402F; border-color:#E3B3AA;}
:root[data-theme="light"] .status-msg.err{color:#B3402F;}

@media (max-width:700px){
  .ap-block.ap-medium figure{width:84%;}
  .ap-block.ap-half{flex-direction:column!important;}
}

.en-box{border:1px dashed var(--border);border-radius:8px;padding:8px 12px;margin:4px 0 12px;background:rgba(0,0,0,.015)}
.en-box summary{cursor:pointer;font-size:12.5px;font-weight:600;color:var(--muted,#667)}

.lang-btn{border:1px solid var(--border); background:var(--panel2); color:var(--ink); font:inherit; font-size:12.5px; font-weight:600; padding:6px 12px; border-radius:8px; cursor:pointer;}
.lang-btn:hover{border-color:var(--gold);}
.login-card .lang-btn{margin-top:14px;}
@media (max-width:900px){.lang-btn{padding:9px 14px;}}

.lang-btn{--globe:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M2.5 12h19M12 2.5c2.8 2.8 4.2 6 4.2 9.5s-1.4 6.7-4.2 9.5c-2.8-2.8-4.2-6-4.2-9.5S9.2 5.3 12 2.5z'/%3E%3C/svg%3E");}
.lang-btn::before{content:"";display:inline-block;width:14px;height:14px;margin-right:6px;vertical-align:-2px;background:currentColor;-webkit-mask:var(--globe) center/contain no-repeat;mask:var(--globe) center/contain no-repeat;}
@media (max-width:900px){
  .lang-btn{padding:10px 16px; font-size:14px; min-height:42px;}
  .theme-row{margin-top:8px;}
  /* Drawer: brand + footer stay put, only the menu list scrolls (no clipped logo). */
  aside{overflow:hidden; display:flex; flex-direction:column;}
  aside nav{flex:1 1 auto; min-height:0; overflow-y:auto;}
}
@media (max-width:900px) and (max-height:760px){ .nav-item{padding:10px 12px;} }

.send-row{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap;padding:10px 0;border-top:1px solid var(--border,#2a3140)}
.send-actions{display:flex;gap:8px;flex-wrap:wrap}
@media(max-width:600px){.send-actions{width:100%}.send-actions .btn{flex:1}}
.rcpt{display:grid;grid-template-columns:auto 1fr auto;gap:8px;align-items:center;padding:0 0 12px}
.rcpt label{margin:0}.rcpt-hint{grid-column:1/-1;font-size:12px}
@media(max-width:600px){.rcpt{grid-template-columns:1fr}.rcpt .btn{width:100%}}
.send-preview{margin-top:12px;border:1px solid var(--border,#2a3140);border-radius:10px;padding:12px 14px;font-size:13px}
.send-preview .pv-title{font-weight:700;margin-bottom:6px}.send-preview .pv-line{margin:4px 0}
.send-preview pre{white-space:pre-wrap;word-break:break-word;font:12.5px/1.45 inherit;margin:8px 0 0;max-height:320px;overflow:auto}
.send-preview .pv-bad{color:#b91c1c}
.ai-draft{display:none}.ai-on .ai-draft{display:inline-block}

.dos-search{display:flex;gap:8px;flex-wrap:wrap}.dos-search input{flex:1;min-width:160px}
.dos-item{display:flex!important;gap:10px;align-items:flex-start;padding:10px 0;border-top:1px solid var(--border,#2a3140);margin:0;cursor:pointer;text-transform:none;letter-spacing:0;font-size:inherit;font-weight:400}
.dos-item input[type=checkbox]{width:18px!important;height:18px;margin:3px 0 0;flex:none;padding:0}
.dos-item>span{flex:1;min-width:0}.dos-item .t{font-weight:600;font-size:14px}
.dos-item .m{font-size:12px;color:var(--muted,#6b7280);margin-top:2px}.dos-item .x{font-size:12.5px;margin-top:3px}
.dos-pill{display:inline-block;font-size:11px;font-weight:700;padding:1px 7px;border-radius:99px;margin-left:6px}
.dos-pill.free{background:#dcfce7;color:#14532d}.dos-pill.nd{background:#fef3c7;color:#92400e}.dos-pill.prot{background:#fee2e2;color:#7f1d1d}
.copyright-note{background:#fef3c7;color:#92400e;border-radius:8px;padding:8px 10px;font-size:12.5px;margin:0 0 12px}
.ai-off-note{display:inline}.ai-on .ai-off-note{display:none}
#dosResultCard textarea,#dosNotes{width:100%;box-sizing:border-box}

.ap-sources{border:1px solid var(--border); border-radius:10px; background:var(--panel2); padding:0; font-size:13px;}
.ap-sources summary{cursor:pointer; padding:10px 14px; font-weight:700; list-style:none;}
.ap-sources summary::-webkit-details-marker{display:none;}
.ap-sources summary::after{content:"▾"; float:right; transition:transform .15s;}
.ap-sources[open] summary::after{transform:rotate(180deg);}
.ap-sources ul{margin:0; padding:0 14px 12px 32px;}
.ap-sources li{margin:5px 0; line-height:1.4; overflow-wrap:anywhere;}
.ap-src-label{padding:4px 14px 0; font-weight:700; color:var(--signal);}
.quota-pill{font-size:11.5px; padding:3px 10px; border-radius:99px; background:var(--panel2); border:1px solid var(--border); white-space:nowrap;}
.quota-pill:empty{display:none!important}
.quota-pill.q-low{border-color:#d9a300; color:#b88700}
.quota-pill.q-out{border-color:#c0392b; color:#c0392b}
.quota-pill b{font-variant-numeric:tabular-nums}
.ap-block p{white-space:pre-line}
.ap-src-note{margin:0; padding:2px 14px 10px; font-size:11px; font-style:italic; opacity:.7}
.nav-group{font-size:10.5px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); opacity:.7; padding:14px 12px 4px;}

/* ---- Phone polish (review of 2026-10-03) ---- */
.more-menu{position:relative; display:inline-block;}
.more-menu > summary{display:inline-flex; align-items:center; justify-content:center; list-style:none; cursor:pointer; min-width:44px; text-align:center; letter-spacing:.1em;}
.more-menu > summary::-webkit-details-marker{display:none;}
.more-list{position:absolute; right:0; top:calc(100% + 4px); z-index:30; min-width:210px; display:flex; flex-direction:column; gap:6px;
  padding:8px; background:var(--panel); border:1px solid var(--border); border-radius:10px; box-shadow:0 8px 28px rgba(0,0,0,.35);}
.more-list .btn{width:100%; text-align:left; justify-content:flex-start;}

.act-list .act{padding:10px 0; border-bottom:1px solid var(--border2);}
.act-list .act:last-child{border-bottom:none;}
.act-top{font-size:13.5px;} .act-ref{font-size:13px; overflow-wrap:anywhere; margin-top:2px;} .act-meta{font-size:11.5px; margin-top:2px;}
.kpi .ctx:empty{display:none;}

.guide-role{padding:10px 0;} .guide-role > summary{cursor:pointer; list-style:none;}
.guide-role > summary::-webkit-details-marker{display:none;}
.guide-role > summary::after{content:"▾"; float:right; opacity:.6;}
.guide-role[open] > summary::after{transform:rotate(180deg);}

.tabbar{display:none;}
@media (max-width:900px){
  .tabbar{
    display:flex; position:fixed; left:0; right:0; bottom:0; z-index:45;
    background:var(--panel); border-top:1px solid var(--border2);
    padding:6px calc(6px + env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) calc(6px + env(safe-area-inset-left));
  }
  .tb-item{flex:1; min-width:0; display:flex; flex-direction:column; align-items:center; gap:3px; padding:6px 2px;
    border:none; background:transparent; color:var(--muted); font-size:10.5px; font-weight:600; border-radius:8px;}
  .tb-item svg{width:22px; height:22px;}
  .tb-item span::before{content:attr(data-t);}
  .tb-item span{max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
  .tb-item.active{color:var(--signal);}
  .content{padding-bottom:calc(92px + env(safe-area-inset-bottom));}
  .modal-bg{z-index:70;}
}
@media (max-width:700px){
  td.cell-empty{display:none !important;}
  .dos-search #dosRefreshBtn{flex:0 0 auto;}
  .dos-search input{flex:1 1 100%;}
  .dos-search .btn{flex:1;}
  input[type="date"]{display:block; width:100%; min-height:44px; -webkit-appearance:none; appearance:none; text-align:left;}
  input[type="date"]::-webkit-date-and-time-value{text-align:left; min-height:1.4em;}
  #progAddToggle{width:100%;}
}
/* The menu opens in place (a floating one would be clipped by the card's scroll area). */
.more-list{position:static; box-shadow:none; margin-top:6px; min-width:0;}
.more-menu[open]{flex-basis:100%; display:block;}

/* ---- Extra article blocks (4 to 12) ---- */
.xblocks{margin-top:12px;}
.xb{border:1px solid var(--border); border-radius:12px; background:var(--panel2); margin-bottom:10px; overflow:hidden;}
.xb-head{display:flex; align-items:center; gap:8px; padding:10px 12px; cursor:pointer;}
.xb-num{font-weight:700; font-size:13px; white-space:nowrap;}
.xb-sum{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px;}
.xb-tools{display:flex; gap:6px; margin-left:auto;}
.xb-tools .btn{min-width:40px; padding-left:10px; padding-right:10px;}
.xb-body{padding:4px 12px 14px; border-top:1px solid var(--border2);}
.xb-closed .xb-body{display:none;}
.xb-body textarea{width:100%;}
.xb-bar{display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin:4px 0 12px;}

.slot-title{display:flex; align-items:center; justify-content:space-between; gap:10px;}

/* ---- Desktop (wider than a tablet) ---- */
@media (min-width:901px){
  .content{max-width:1220px;}
  .card table td{padding:7px 10px;}
  .card table tbody tr:hover td{background:var(--panel2);}
  .card table thead th[data-dir]{color:var(--ink);}
  .card #articlesTable thead th:not(:last-child), .card #progTable thead th:not(:last-child), .card #journalTable thead th{cursor:pointer; user-select:none;}
  .card #articlesTable thead th[data-dir="asc"]::after, .card #progTable thead th[data-dir="asc"]::after, .card #journalTable thead th[data-dir="asc"]::after{content:" ▲"; font-size:9px;}
  .card #articlesTable thead th[data-dir="desc"]::after, .card #progTable thead th[data-dir="desc"]::after, .card #journalTable thead th[data-dir="desc"]::after{content:" ▼"; font-size:9px;}
  td.row-actions{white-space:nowrap; display:table-cell;}
  .more-menu[open]{display:inline-block; flex-basis:auto; vertical-align:top;}
}

/* Press review: sources and articles on the left, the draft to review on the right. */
@media (min-width:1180px){
  #panel-dossiers.active{display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:16px; grid-template-rows:auto 1fr; align-items:start;}
  #panel-dossiers.active > .card{margin-bottom:0 !important;}
  #panel-dossiers.active > .card:not(#dosResultCard){grid-column:1;}
  #panel-dossiers.active > #dosResultCard{grid-column:2; grid-row:1 / span 2; position:sticky; top:16px; max-height:calc(100vh - 32px); overflow-y:auto;}
  /* no draft yet: the list can use the full width */
  #panel-dossiers.active:not(.has-draft) > .card:not(#dosResultCard){grid-column:1 / -1;}
}

/* Shown only while we check the sign-in (a sleeping server can take a few seconds); fades in late so quick loads never flash it. */
#boot-splash{position:fixed; inset:0; display:flex; align-items:center; justify-content:center; background:var(--bg); z-index:80; opacity:0; animation:splashIn .3s ease .6s forwards;}
#boot-splash img{height:56px; width:auto; opacity:.85;}
#boot-splash.done{display:none;}
@keyframes splashIn{to{opacity:1;}}

/* ---- Inactivity sign-out ---- */
.idle-banner{position:fixed; left:50%; transform:translateX(-50%); top:calc(10px + env(safe-area-inset-top)); z-index:90; width:min(520px, calc(100vw - 24px));
  display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px; border-radius:12px;
  background:var(--panel); border:1px solid var(--gold); box-shadow:0 10px 32px rgba(0,0,0,.35); font-size:13.5px;}
.idle-banner b{font-variant-numeric:tabular-nums;}
.login-notice{background:var(--pill-wait-bg); border-radius:8px; padding:10px 12px; font-size:13px !important;}

/* ---- Bannière ---- */
.bn-preview-wrap{border:1px dashed var(--border); border-radius:10px; padding:10px; background:var(--panel2);}
.bn-preview{display:flex; align-items:center; gap:10px; padding:9px 12px; border-radius:8px; background:#12294d; color:#fff; font-size:13.5px; line-height:1.35;}
.bn-preview.bn-urgent{background:#b3261e;}
.bn-preview i{opacity:.8; font-style:normal;}
.bn-tag{flex:0 0 auto; font-size:10.5px; font-weight:800; letter-spacing:.06em; padding:3px 8px; border-radius:99px; background:rgba(255,255,255,.18); color:#fff;}
.bn-tag-sm{background:#12294d; font-size:10px; vertical-align:middle;}
.bn-tag-sm.bn-tag-urgent{background:#b3261e;}

.ai-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:6px;}
.ai-n{display:inline-flex;align-items:center;gap:6px;font-size:13px;margin:0;}
.ai-n-sel{width:auto;padding:6px 8px;}
.ai-notes{width:100%;box-sizing:border-box;margin:0 0 4px;}
.dos-blk{margin-bottom:10px;}

/* Long-text fields: always roomy, resizable vertically, on phone and desktop. */
textarea{min-height:84px; resize:vertical; line-height:1.5; display:block; box-sizing:border-box;}
textarea[id$="Texte"], textarea.xb-text{min-height:150px;}
textarea[id$="TexteEn"], textarea.xb-en{min-height:110px;}
@media (min-width:901px){
  textarea[id$="Texte"], textarea.xb-text{min-height:190px; font-size:13.5px;}
  textarea[id$="TexteEn"], textarea.xb-en{min-height:130px; font-size:13.5px;}
  .form-grid.cols3 > div:has(textarea){grid-column:1 / -1;}
}

/* Messages du site */
.msg-card{border:1px solid var(--border); border-radius:10px; margin-bottom:10px; background:var(--panel2); padding:13px 15px;}
.msg-head{display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; align-items:baseline;}
.msg-who{font-weight:700; font-size:13.5px; overflow-wrap:anywhere;}
.msg-meta{font-size:11.5px; color:var(--muted); margin-top:3px; overflow-wrap:anywhere;}
.msg-body{margin:10px 0; font-size:13.5px; line-height:1.55; white-space:pre-wrap; overflow-wrap:anywhere;}
.msg-more{background:none; border:0; color:var(--signal); cursor:pointer; padding:0; font:inherit; font-size:12px;}
.msg-card .row-actions{flex-wrap:wrap;}
.msg-route{display:grid; grid-template-columns:200px 1fr auto; gap:8px; align-items:center; margin-bottom:8px;}
.msg-route label{margin:0;}
@media(max-width:600px){.msg-route{grid-template-columns:1fr;} .msg-card .row-actions{display:grid; grid-template-columns:1fr 1fr; gap:8px;}}

.ai-web{display:inline-flex; align-items:center; gap:6px; font-size:12.5px; margin:0 10px; cursor:pointer; white-space:nowrap;}
.ai-web input{width:auto; margin:0;}
.ai-sources{font-size:11.5px; color:var(--muted); margin-top:4px; overflow-wrap:anywhere;}
.ai-sources a{color:var(--signal);}

/* Overview — role-specific */
.ov-hello{font-size:17px;margin:0 0 14px;}
.ov-hello b{font-family:'Archivo',Arial,sans-serif;font-weight:800;}
.ov-hello .pill{vertical-align:middle;margin-left:6px;}
.kpi.click{cursor:pointer;transition:border-color .15s;}
.kpi.click:hover,.kpi.click:focus-visible{border-color:var(--gold);outline:none;}
.kpi.warn .n{color:var(--gold);}
.todo{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;text-align:left;background:none;border:0;border-bottom:1px solid var(--border);padding:12px 2px;color:inherit;font:inherit;font-size:13.5px;cursor:pointer;}
.todo:last-child{border-bottom:0;}
.todo:hover .todo-t{text-decoration:underline;}
.todo-sub{display:block;font-size:11.5px;color:var(--gold);margin-top:2px;}
.todo-n{min-width:26px;text-align:center;font-weight:800;font-family:'Archivo',Arial,sans-serif;}
.todo.warn .todo-n{color:var(--gold);}
.todo-note{font-size:12.5px;padding:8px 10px;margin:4px 0 8px;border-left:3px solid var(--gold);background:rgba(255,255,255,.03);}

/* Manual (Guide page) */
.manual-sec{border-top:1px solid var(--border);padding:10px 0;}
.manual-sec:first-of-type{margin-top:10px;}
.manual-sec>summary{cursor:pointer;font-weight:700;font-size:14px;padding:4px 0;}
.manual-intro{font-size:13px;color:var(--muted);margin:8px 0;}
.manual-steps{margin:8px 0 8px 20px;padding:0;font-size:13px;line-height:1.7;}
.manual-steps li{margin-bottom:4px;}
.manual-note{font-size:12.5px;margin:8px 0;padding:8px 10px;border-left:3px solid var(--gold);background:rgba(255,255,255,.03);}
.manual-tag{font-weight:800;color:var(--gold);margin-right:4px;}
.manual-sec .btn{margin-top:6px;}

/* Actions groupées, menu ⋯ unifié, notifications */
.bk-col{width:34px; padding-right:0 !important;}
.bk-col input, input.bk, .bk-all{width:17px; height:17px; accent-color:var(--signal); cursor:pointer; vertical-align:middle; margin:0;}
.bk-tools{margin:0 0 8px;} .bk-selall{display:inline-flex; align-items:center; gap:8px; font-size:12.5px; color:var(--muted); cursor:pointer;}
.bulkbar{position:sticky; top:8px; z-index:20; display:flex; align-items:center; flex-wrap:wrap; gap:8px 10px; padding:9px 12px; margin:0 0 10px;
  background:var(--panel); border:1px solid var(--border); border-left:3px solid var(--signal); border-radius:10px; box-shadow:0 6px 20px rgba(0,0,0,.25);}
.bulkbar .bk-count{font-size:13px; font-weight:600; margin-right:4px;}
.bulkbar .bk-acts{display:flex; flex-wrap:wrap; gap:6px; flex:1;}
.bk-n{display:inline-block; min-width:18px; padding:0 6px; border-radius:9px; background:var(--panel2); border:1px solid var(--border); font-size:11px; line-height:17px; text-align:center;}
.btn-primary .bk-n, .btn-danger .bk-n{background:rgba(255,255,255,.18); border-color:transparent; color:inherit;}
.appr-pick{display:flex; align-items:flex-start; gap:10px;}
.appr-pick > input.bk{margin-top:3px; flex:none;}
.msg-who input.bk{margin-right:6px;}
.more-list .btn[disabled]{opacity:.45; cursor:not-allowed;}
.toast{position:fixed; right:18px; bottom:18px; z-index:90; max-width:min(440px, calc(100vw - 36px)); padding:11px 15px; border-radius:10px; font-size:13px;
  background:var(--panel); color:var(--ink); border:1px solid var(--border); box-shadow:0 8px 28px rgba(0,0,0,.4);}
.toast.ok{border-left:3px solid var(--pill-ok-fg);} .toast.err{border-left:3px solid var(--signal);}
@media (max-width:700px){
  .bulkbar{top:0; border-radius:0 0 10px 10px;}
  .bulkbar .bk-acts .btn{flex:1 1 calc(50% - 6px);}
  .card table td.bk-col{padding:2px 0 6px; justify-content:flex-start;}
  .card table td.bk-col > input{flex:none; width:19px; height:19px;}
}

/* Schedule table styles */
.schedule-table td { padding:10px 8px; border-bottom:1px solid var(--border,#2a3140); }
.schedule-table tr:hover { background:var(--bg-hover,rgba(255,255,255,.02)); }
.schedule-table .schedule-label { font-weight:500; }
.schedule-table .schedule-time { white-space:nowrap; }
.schedule-table input[type="time"], .schedule-table select {
  padding:4px 6px; border:1px solid var(--border,#2a3140); border-radius:4px;
  background:var(--panel2); color:var(--ink); font-size:13px; color-scheme:dark;
}
:root[data-theme="light"] .schedule-table input[type="time"], :root[data-theme="light"] .schedule-table select { color-scheme:light; }
@media (prefers-color-scheme: light){ :root:not([data-theme="dark"]) .schedule-table input[type="time"], :root:not([data-theme="dark"]) .schedule-table select { color-scheme:light; } }
.schedule-table input[type="time"]:disabled, .schedule-table select:disabled { opacity:.55; }
.schedule-table input[type="time"]:focus, .schedule-table select:focus {
  outline:none; border-color:var(--primary,#58a6ff); box-shadow:0 0 0 2px rgba(88,166,255,.2);
}
.schedule-table .mode-group { display:flex; gap:8px; align-items:center; }
.schedule-table .mode-group label { display:flex; align-items:center; gap:4px; cursor:pointer; font-size:12px; }
.schedule-table .mode-group input[type="radio"] { cursor:pointer; }
.schedule-table .schedule-time-group { display:flex; gap:4px; align-items:center; }
.schedule-table .tz-hint { font-size:11px; color:var(--text-muted,#7d8590); white-space:nowrap; }

/* Planification des envois on a phone: "GitHub" / "Ici" stay on one line each (the generic stacked-card rule breaks words
   anywhere), the time field is readable in both themes and big enough to tap, and the e-mail name leads each card. */
@media (max-width:700px){
  .schedule-table td{overflow-wrap:normal; word-break:normal;}
  .schedule-table td.schedule-label{justify-content:flex-start; text-align:left; font-size:15px; font-weight:700; padding-bottom:8px;}
  .schedule-table td.schedule-label::before{display:none;}
  .schedule-table .mode-group{flex-wrap:wrap; justify-content:flex-end; gap:6px 18px;}
  .schedule-table .mode-group label{white-space:nowrap; font-size:14px; gap:6px; padding:4px 0;}
  .schedule-table .mode-group input[type="radio"]{width:20px; height:20px; margin:0;}
  .schedule-table input[type="time"], .schedule-table select{font-size:16px; min-height:40px; padding:6px 10px;}
  .schedule-table .schedule-time-group{justify-content:flex-end;}
}

/* Cases de droits (Accès) : libellés sur une seule ligne, sur téléphone aussi */
.perm-boxes{display:flex; flex-wrap:wrap; gap:8px 16px;}
.perm-boxes label{white-space:nowrap; overflow-wrap:normal; word-break:normal; width:auto; flex:0 0 auto;}
.perm-boxes input[type="checkbox"]{width:18px; height:18px; min-height:0; margin:0; flex:0 0 auto;}
@media (max-width:700px){
  .perm-boxes{justify-content:flex-end;}
  .perm-boxes label{font-size:14px; padding:4px 0;}
}
/* Articles without bulk actions (a role that cannot decide): no tick-box column. */
#articlesTable.no-bulk .bk-col{display:none;}
/* Access table: many columns. Keep the name and role readable; the card scrolls if the screen is narrow. */
@media (min-width:701px){
  #rolesCard{overflow-x:auto;}
  #rolesTable th, #rolesTable td{padding-left:6px; padding-right:6px;}
  #rolesTable .nom-input{min-width:120px;}
  #rolesTable td:nth-child(3) select{min-width:150px;}
  #rolesTable td:nth-child(5) select{min-width:96px;}
  #rolesTable td:nth-child(6) select{min-width:72px;}
  #rolesTable td.row-actions{display:table-cell;}
  #rolesTable td.row-actions .btn{display:block; width:100%; margin:3px 0; white-space:nowrap;}
}

/* Sponsors */
.sp-sub{font-size:11.5px; line-height:1.45; margin-top:3px; overflow-wrap:anywhere;}
.sp-text{overflow-wrap:anywhere; min-width:130px;}
.sp-price{white-space:nowrap; font-weight:700;}
.sp-paybox{display:flex; flex-direction:column; gap:5px; min-width:140px; align-items:stretch;}
@media (min-width:701px){
  #spListCard{overflow-x:auto;}
  #spTable th, #spTable td{padding-left:8px; padding-right:8px;}
  #spTable td.row-actions{display:table-cell;}
  #spTable td.row-actions .btn{display:block; width:100%; margin:3px 0; white-space:nowrap;}
}
@media (max-width:700px){
  #spTable td.sp-text{min-width:0;}
  #spTable td > div{min-width:0; text-align:right;}
  #spTable .sp-paybox{text-align:left;}
}
