/* Platform admin — the inbox's design (../styles.css) plus a few admin layouts. English only: Zelvai's own people. */
body { overflow: auto; }
.badge { font-family: var(--font); font-size: .7rem; font-weight: 700; letter-spacing: .04em; color: var(--sun-ink); background: var(--sun-soft); border-radius: 999px; padding: .15rem .55rem; margin-left: .3rem; }
.admin-view { padding: 1.5rem max(16px, env(safe-area-inset-right, 0px)) calc(2rem + var(--tabbar, 0px) + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 1rem; max-width: 1280px; width: 100%; margin: 0 auto; }
.view-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1rem; align-items: start; }
.tenant-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.tenant { width: 100%; text-align: left; border: 0; border-radius: 14px; padding: .8rem .9rem; background: transparent; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .1rem .8rem; font-weight: 500; }
.tenant:hover { background: color-mix(in srgb, var(--teal) 6%, transparent); }
.tenant.sel { background: var(--teal-soft); }
.tenant .face { grid-row: 1 / span 2; width: 2.5rem; height: 2.5rem; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 700; background: hsl(var(--hue, 186) 42% 44%); }
.tenant .n { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tenant .m { grid-column: 2 / -1; color: var(--mute); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tenant .stat { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: .85rem; align-self: center; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .7rem 1rem; align-items: start; }
.grid-form label, .detail-card label { display: grid; gap: .3rem; margin: 0; }
.form-actions { grid-column: 1 / -1; }
.detail-card { display: grid; gap: 1rem; position: sticky; top: 1rem; }
.detail-card h2 { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.detail-card fieldset { border: 1px solid var(--line); border-radius: 16px; padding: .9rem 1rem 1rem; margin: 0; display: grid; gap: .7rem; }
.detail-card legend { padding: 0 .4rem; font-weight: 700; }
.members { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; font-size: .9rem; }
.members li { display: flex; justify-content: space-between; gap: .6rem; padding: .35rem 0; border-bottom: 1px solid var(--line); }
.members li:last-child { border-bottom: 0; }
.words { width: 100%; border-collapse: collapse; font-size: .86rem; }
.words th, .words td { text-align: left; padding: .45rem .4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.words th { color: var(--mute); font-weight: 650; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.words code { font-size: .78rem; color: var(--mute); }
.words input { width: 100%; padding: .4rem .55rem; border-radius: 10px; font-size: .86rem; }
.words input:not(:placeholder-shown) { border-color: var(--teal); background: var(--teal-soft); }
.words td.def, .words th:first-child { width: 50%; }
.words td.def { color: var(--ink-2); }
.words-bar { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.detail-card .words-bar label, .words-bar label { display: flex; align-items: center; gap: .4rem; }
.words-bar input[type="search"] { flex: 1; min-width: 10rem; }
.words-scroll { overflow-x: auto; max-height: 60vh; overflow-y: auto; }
.pkg-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .9rem; }
.pkg { text-align: left; display: grid; gap: .35rem; padding: 1.1rem 1.2rem; border-radius: 20px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow-1); font-weight: 500; }
.pkg[aria-pressed="true"] { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.pkg strong { font-size: 1.1rem; }
.badge { white-space: nowrap; }
.who { margin-left: auto; }
@media (max-width: 900px) { .admin-grid { grid-template-columns: 1fr; } .detail-card { position: static; } }
.words tr.grp th { padding-top: .9rem; color: var(--ink); font-size: .78rem; }
.words select { width: 100%; padding: .4rem .55rem; border-radius: 10px; font-size: .86rem; }
.words select.changed { border-color: var(--teal); background: var(--teal-soft); }
.feats td:first-child { width: 62%; }
a.menuitem { text-decoration: none; color: inherit; }
.mail-form .wide { grid-column: 1 / -1; }
.mail-form .row input { flex: 1; min-width: 0; }
.from-row { flex-wrap: nowrap; }
.from-row input { flex: 1 1 8rem; }
.from-row select { flex: 1 1 10rem; min-width: 0; }
.from-row .at { color: var(--mute); font-weight: 650; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem 1rem; margin: 0; }
.facts dt { color: var(--mute); font-size: .78rem; font-weight: 650; }
.facts dd { margin: .15rem 0 0; font-weight: 600; }
