/* Mandi Munim — VMAT admin panel (extends app.css). */
body.env-admin { background: #F2F4F1; }
.env-admin .top { background: #123524; }
.env-admin main { max-width: 1080px; }

.adm-nav { display: flex; gap: .35rem; overflow-x: auto; padding: .5rem 1rem; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.adm-nav .chip { flex: none; }

.adm-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; margin-bottom: 1.1rem; }
.adm-stat { position: relative; text-align: left; border: 0; cursor: pointer; font: inherit; color: inherit; }
.adm-stat.warn .stat-value { color: #a16207; }
.adm-stat.bad .stat-value { color: var(--red); }
.adm-stat.good .stat-value { color: var(--green); }
.adm-money { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .6rem; margin-bottom: 1.1rem; }

.adm-search { display: flex; gap: .5rem; margin-bottom: .5rem; }
.adm-search input { flex: 1; min-width: 0; }

.state { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.state-trial { background: #E8F0FE; color: #174EA6; }
.state-paid { background: var(--green-soft); color: var(--green-dark); }
.state-grace { background: var(--saffron-soft); color: #7A4F00; }
.state-trial_over, .state-expired { background: var(--red-soft); color: #8A1C14; }
.state-suspended, .state-closed { background: #37474F; color: #fff; }

.firm-row .row-title { white-space: normal; }
.firm-side { display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; text-align: right; font-size: .85rem; flex: none; }

.adm-grid { display: grid; grid-template-columns: 1fr; gap: 0 1rem; }
@media (min-width: 860px) { .adm-grid { grid-template-columns: 1fr 1fr; } }

.lic-big { font-size: 1.25rem; font-weight: 800; margin: .3rem 0; }
.adm-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .5rem; margin-top: .8rem; }
.adm-actions .btn { width: 100%; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.adm-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.adm-table th, .adm-table td { padding: .5rem .45rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.adm-table th { color: var(--muted); font-weight: 700; white-space: nowrap; }
.adm-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.adm-table tr.cancelled td { opacity: .55; text-decoration: line-through; }
.adm-table tr.cancelled td.keep { text-decoration: none; opacity: 1; }
.adm-table input { min-height: 40px; width: 7rem; padding: .3rem .45rem; }
.adm-table input.narrow { width: 4.5rem; }

.adm-log { display: flex; flex-direction: column; gap: .35rem; }
.log-row { border-bottom: 1px solid var(--line); padding: .45rem 0; font-size: .92rem; }
.log-row .log-what { font-weight: 700; }
.log-row .log-detail { color: var(--muted); word-break: break-word; }

.pin-show { font-size: 2.4rem; font-weight: 900; letter-spacing: .3em; text-align: center; margin: .6rem 0; font-variant-numeric: tabular-nums; }
.adm-notes { width: 100%; min-height: 110px; }
.pager { display: flex; justify-content: space-between; gap: .5rem; margin-top: .8rem; }
.quick { display: flex; flex-wrap: wrap; gap: .4rem; margin: -.3rem 0 .8rem; }
.adm-month { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .8rem; }
.adm-month strong { font-size: 1.1rem; }
.modal .card.wide { max-width: 520px; max-height: 92vh; overflow-y: auto; }
.adm-table td { white-space: nowrap; }          /* phones scroll the table sideways instead of squeezing it */
.adm-table td .small { white-space: normal; max-width: 16rem; }
#toast:not(.show) { visibility: hidden; transition: transform .25s ease, visibility 0s .25s; }
.bar .grow { flex: 1; min-width: 0; }
.bar .grow h1 { white-space: normal; }
.pin-field { font-size: 1.3rem; letter-spacing: .25em; text-align: center; }
.small-pin { font-size: 1.6rem; margin: 0; letter-spacing: .2em; }
