/* ARGI Technologies: member area + admin. Loaded after ArgiCore's site.css on every signed-in page. */
:root { --accent: #6B35C8; --accent-ink: #4C1D95; --accent-soft: #F1EAFE; --ink: #140C26; --ink-2: #1E1438; }

/* Item rows editor (cards, FAQ, stats...) */
.items-editor .item-row { display: grid; grid-template-columns: 30px 110px 1fr 1.6fr 1fr 90px 112px; gap: .5rem; align-items: start; padding: .6rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-bottom: .5rem; }
.items-editor .item-row .handle { color: var(--muted); display: grid; place-items: center; height: 38px; }
.items-editor .item-row textarea { min-height: 38px; }
.items-editor .item-row .icon-preview { width: 22px; text-align: center; }
@media (max-width: 1199px) { .items-editor .item-row { grid-template-columns: 1fr 1fr; } .items-editor .item-row .handle { display: none; } }
.items-editor .col-head { display: grid; grid-template-columns: 30px 110px 1fr 1.6fr 1fr 90px 112px; gap: .5rem; font-size: .75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 0 .6rem .3rem; }
@media (max-width: 1199px) { .items-editor .col-head { display: none; } }

/* Rich text editor */
.rte { border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; overflow: hidden; }
.rte .bar { display: flex; flex-wrap: wrap; gap: 2px; padding: .35rem; border-bottom: 1px solid var(--line); background: var(--canvas); position: sticky; top: 0; z-index: 2; }
.rte .bar button { border: 0; background: none; border-radius: 6px; padding: .25rem .5rem; color: var(--text); font-size: .9rem; }
.rte .bar button:hover, .rte .bar button.on { background: #fff; box-shadow: 0 0 0 1px var(--line); }
.rte .area { min-height: 260px; padding: 1rem 1.1rem; outline: none; line-height: 1.65; }
.rte .area:focus { box-shadow: inset 0 0 0 2px var(--accent-soft); }
.rte .area img { max-width: 100%; border-radius: 8px; }
.rte .area h2 { font-size: 1.4rem; font-weight: 800; margin: 1.2rem 0 .5rem; }
.rte .area h3 { font-size: 1.15rem; font-weight: 700; margin: 1rem 0 .4rem; }
.rte textarea.code { display: none; width: 100%; min-height: 260px; border: 0; padding: 1rem; font-family: ui-monospace, monospace; font-size: .85rem; }
.rte.code-mode .area { display: none; }
.rte.code-mode textarea.code { display: block; }

/* Image field */
.img-field { display: flex; gap: .5rem; align-items: center; }
.img-field img.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--canvas); }

/* Admin page sections list */
.sec-list .sec { display: flex; align-items: center; gap: .8rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
.sec-list .sec:last-child { border-bottom: 0; }
.sec-list .sec .kind-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.sec-list .sec.hidden-sec { opacity: .5; }
.sec-list .sec .what { font-weight: 600; }
.sec-list .sec form { display: inline; }
.sec-list .sec .btn-icon { border: 0; background: none; color: var(--muted); padding: .25rem .4rem; border-radius: 6px; }
.sec-list .sec .btn-icon:hover { background: var(--canvas); color: var(--text); }
.kind-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.kind-picker button { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: .7rem; text-align: left; font-size: .88rem; font-weight: 600; }
.kind-picker button i { display: block; font-size: 1.2rem; color: var(--accent); margin-bottom: .25rem; }
.kind-picker button:hover { border-color: var(--accent); }

/* Traffic dashboard */
.kpi { padding: 1.1rem 1.2rem; }
.kpi .label { color: var(--muted); font-size: .82rem; font-weight: 600; }
.kpi .value { font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; letter-spacing: -.02em; line-height: 1.1; }
.kpi .delta { font-size: .8rem; font-weight: 700; }
.kpi .delta.up { color: var(--ok); } .kpi .delta.down { color: var(--bad); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 180px; padding-top: .5rem; }
.bars .b { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; position: relative; min-width: 4px; }
.bars .b span { display: block; border-radius: 3px 3px 0 0; }
.bars .b .v { background: var(--accent-soft); }
.bars .b .u { background: var(--accent); }
.bars .b:hover::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: .72rem; white-space: nowrap; padding: .25rem .45rem; border-radius: 6px; margin-bottom: 4px; z-index: 3; }
.bars-x { display: flex; justify-content: space-between; color: var(--muted); font-size: .72rem; margin-top: .3rem; }
.meter-row { display: grid; grid-template-columns: 1fr 70px; gap: .6rem; align-items: center; padding: .38rem 0; font-size: .9rem; }
.meter-row .track { position: relative; background: var(--canvas); border-radius: 6px; overflow: hidden; height: 28px; display: flex; align-items: center; }
.meter-row .track span.fill { position: absolute; inset: 0 auto 0 0; background: var(--accent-soft); }
.meter-row .track .t { position: relative; padding: 0 .6rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meter-row .n { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .3rem; vertical-align: -1px; }

/* ARGI monogram in the admin sidebar */
.brandmark .mark:has(> .bi-boxes) { background: url(/img/brand/mark.svg) center / 74% no-repeat, #fff; }
.brandmark .mark > .bi-boxes { visibility: hidden; }

/* Member accounts use ARGI purple, not a per-company colour. */
:root { --brand: #6B35C8 !important; }
