/* Finance & Caisse */
.fin-tabs { flex-wrap: wrap; }
.seg { display: inline-flex; background: #eef1f5; border-radius: 8px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 6px; font: inherit; font-size: 13px; font-weight: 600; color: #3b4658; cursor: pointer; }
.seg button.on { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.fin-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.fin-kpi { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; border-top: 3px solid var(--k); box-shadow: 0 2px 8px rgba(15, 25, 45, .05); }
.fin-kpi[data-go] { cursor: pointer; } .fin-kpi[data-go]:hover { box-shadow: 0 6px 16px rgba(15, 25, 45, .1); }
.fin-kpi > svg { position: absolute; right: 14px; top: 14px; opacity: .8; }
.fin-kpi span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.fin-kpi b { font-size: 23px; color: var(--k); font-family: var(--cond); letter-spacing: .2px; }
.fin-kpi em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.fin-alert { border-left: 4px solid #e11d24; }
.fin-alert .list-row { gap: 10px; }
.pos { color: #1b7f3b; } .neg { color: #c62828; }
.fin-sum { display: flex; gap: 18px; align-items: center; padding: 10px 16px; background: #f6f8fa; border-bottom: 1px solid var(--line); font-size: 13px; }
.fin-sum b { font-size: 15px; }
.bars30 { display: flex; align-items: flex-end; gap: 3px; height: 150px; margin-top: 10px; border-bottom: 1px solid var(--line); }
.bars30 div { flex: 1; display: flex; gap: 1px; align-items: flex-end; height: 100%; }
.bars30 i { flex: 1; border-radius: 2px 2px 0 0; min-height: 1px; }
.bars30 i.in, .legend i.in { background: #1b9e4b; } .bars30 i.out, .legend i.out { background: #e74c3c; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 6px; } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; }
.hbar { display: grid; grid-template-columns: 150px 1fr 110px; align-items: center; gap: 10px; font-size: 13px; margin: 8px 0; }
.hbar > div { height: 12px; background: #eef1f5; border-radius: 6px; overflow: hidden; }
.hbar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #2f7de1, #1f4f9a); transition: width .6s; }
.hbar i.m-especes { background: #1b9e4b; } .hbar i.m-cib { background: #1f63c9; } .hbar i.m-edahabia { background: #f0a020; } .hbar i.m-cheque { background: #8e44ad; } .hbar i.m-virement { background: #14223b; }
.hbar b { text-align: right; }
tr.striked td { opacity: .5; text-decoration: line-through; }
.audit-row { font-size: 12.5px; padding: 6px 0; border-bottom: 1px dashed var(--line); }

/* caisses : cartes avec tiroir animé */
.cash-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.cash-card { background: linear-gradient(180deg, #13223b, #0b1526); color: #fff; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 10px 24px rgba(10, 20, 40, .25); position: relative; overflow: hidden; }
.cash-card .cc-head { display: flex; justify-content: space-between; align-items: flex-start; }
.cash-card .cc-head b { display: block; font-size: 16px; } .cash-card .cc-head span { font-size: 11.5px; color: #9aa6b8; }
.cc-drawer { height: 54px; border-radius: 8px; background: linear-gradient(180deg, #24344f, #1a2840); display: flex; align-items: center; justify-content: center; position: relative; box-shadow: inset 0 -6px 0 #0b1526; transition: transform .6s cubic-bezier(.3, 1.4, .5, 1); }
.cash-card.st-ouverte .cc-drawer { transform: translateY(8px); box-shadow: inset 0 -6px 0 #0b1526, 0 10px 18px rgba(46, 204, 113, .25); }
.cc-led { position: absolute; left: 12px; top: 12px; width: 9px; height: 9px; border-radius: 50%; background: #5a667a; }
.st-ouverte .cc-led { background: #2ecc71; box-shadow: 0 0 10px #2ecc71; animation: ledPulse 1.6s infinite; }
.st-a_valider .cc-led { background: #f39c12; box-shadow: 0 0 10px #f39c12; animation: ledBlink 1s steps(2) infinite; }
.cc-amounts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cc-amounts div { background: rgba(255, 255, 255, .06); border-radius: 8px; padding: 8px 10px; }
.cc-amounts span { display: block; font-size: 11px; color: #9aa6b8; } .cc-amounts b { font-size: 17px; font-family: var(--cond); }
.cc-actions { display: flex; gap: 8px; } .cc-actions .btn { flex: 1; justify-content: center; }

/* encaissement mixte */
.pay-head { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pay-head > div { background: #f6f8fa; border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; } .pay-head span { font-size: 11.5px; } .pay-head b.due { color: #c62828; font-size: 17px; }
.pay-line { position: relative; border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fcfdfe; }
.pay-methods { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.pay-methods button { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; color: #3b4658; cursor: pointer; }
.pay-methods button.on { background: #14223b; color: #fff; border-color: #14223b; }
.pay-line .amount { border: 0; outline: 0; width: 100%; padding: 0 10px; font-size: 17px; font-weight: 700; background: transparent; }
.pay-del { position: absolute; right: 10px; top: 10px; }
.pay-total { display: flex; justify-content: space-between; padding: 10px 12px; background: #f6f8fa; border-radius: 8px; font-size: 14px; }
.pay-total .ok { color: #1b7f3b; font-weight: 700; } .pay-total .warn { color: #e67e22; font-weight: 700; } .pay-total .bad { color: #c62828; font-weight: 700; }
.pay-hist .striked { text-decoration: line-through; opacity: .6; }

/* arrêté de caisse */
.flowline { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 16px; }
.flowline span { position: relative; background: #eef1f5; color: #6b7688; font-size: 12px; font-weight: 700; padding: 7px 14px 7px 18px; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%); }
.flowline span.done { background: #1b9e4b; color: #fff; } .flowline span.cur { background: #e11d24; color: #fff; }
.arr-table td { padding: 7px 10px; font-size: 13.5px; }
.arr-table tr.grp td { background: #f6f8fa; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: #3b4658; }
.arr-table tr.total td, .count-table tr.total td { font-weight: 800; font-size: 15px; background: #14223b; color: #fff; }
.count-table td { padding: 5px 8px; font-size: 13.5px; } .count-table .qty { width: 80px; text-align: right; font-weight: 700; }
.count-table .den { font-weight: 700; } .count-table .den.note::before { content: ''; display: inline-block; width: 18px; height: 11px; margin-right: 8px; border-radius: 2px; background: linear-gradient(135deg, #3d8b5a, #2b6b43); vertical-align: middle; }
.count-table .den.coin::before { content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 8px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #f5d77a, #b8912d); vertical-align: middle; }
.gapbox { margin-top: 12px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.gap-row { display: flex; justify-content: space-between; padding: 8px 12px; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.gap-row.big { font-size: 17px; font-weight: 800; } .gap-row.big.ok { background: #e5f6ea; color: #1b7f3b; } .gap-row.big.neg { background: #fdeaea; color: #c62828; } .gap-row.big.pos { background: #fff4e0; color: #b86e00; }
.gapbox > .muted { padding: 6px 12px; }
.valid-box { margin-top: 12px; padding: 12px; border-radius: 10px; background: #fff7e8; border: 1px solid #f8d7ae; font-size: 13.5px; display: flex; flex-direction: column; gap: 8px; }
.valid-box.ok { background: #e5f6ea; border-color: #bfe5ca; }
.chain { display: flex; gap: 6px; flex-wrap: wrap; } .chain span { padding: 4px 10px; border-radius: 12px; background: #eef1f5; font-size: 12px; font-weight: 700; }
.chain span.done { background: #1b9e4b; color: #fff; } .chain span.cur { background: #e11d24; color: #fff; } .chain span.skip { opacity: .45; }
@media print { .fin-tabs, .cc-actions, .flowline { display: none !important; } }
.fin-cockpit { overflow: hidden; } .fin-cockpit .fc-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; background: linear-gradient(90deg, #14223b, #1f3558); }
.fin-cockpit .fc-head h2 { color: #fff; } .fin-cockpit .fc-head .btn { background: #fff; }
.fc-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.fc-kpis > div { background: #fff; padding: 12px 16px; display: flex; flex-direction: column; } .fc-kpis span { font-size: 12px; color: var(--muted); font-weight: 600; } .fc-kpis b { font-size: 22px; font-family: var(--cond); color: var(--navy); }
.fc-kpis b.pos { color: #1b7f3b; } .fc-kpis b.neg { color: #c62828; }
.bars30 div { max-width: 34px; }
