/* The admin panel (js/admin.js): the owner's workspace. Same colours, fonts and Iraqi background as the site,
   laid out for work: a side menu on wide screens, a sliding strip of tabs on phones. */
.adm { min-block-size: 100vh; display: grid; grid-template-rows: auto 1fr; }
.adm-top { position: sticky; top: 0; z-index: 20; background: rgb(255 255 255 / .92); backdrop-filter: blur(12px); border-block-end: 1px solid var(--line); }
.adm-top-row { display: flex; align-items: center; gap: 12px; min-block-size: 64px; padding-inline: clamp(12px, 3vw, 28px); }
.adm-tag { padding: 3px 12px; border-radius: 99px; background: #173b34; color: #c9f26c; font-size: .82rem; font-weight: 600; white-space: nowrap; }
.adm-top-side { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.adm-quiet { display: inline-flex; align-items: center; gap: 6px; min-block-size: 40px; padding: 6px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: .9rem; font-weight: 500; cursor: pointer; }
.adm-quiet:hover { border-color: #173b34; }
.adm-quiet[hidden] { display: none; }
.adm-quiet .icon { inline-size: 18px; block-size: 18px; }

.adm-body { display: grid; grid-template-columns: 252px minmax(0, 1fr); align-items: start; gap: clamp(16px, 2.5vw, 32px); inline-size: 100%; max-inline-size: 1280px; margin-inline: auto; padding: clamp(14px, 2.5vw, 28px); }
.adm-nav { position: sticky; top: 88px; display: grid; gap: 4px; padding: 10px; border-radius: 20px; background: rgb(255 255 255 / .9); border: 1px solid var(--line); }
.adm-nav[hidden] { display: none; }
.adm-link { white-space: nowrap; display: flex; align-items: center; gap: 10px; min-block-size: 44px; padding: 8px 12px; border-radius: 12px; color: var(--muted); font-weight: 500; text-decoration: none; }
.adm-link .icon { inline-size: 20px; block-size: 20px; flex: none; }
.adm-link:hover { background: rgb(15 29 43 / .05); color: var(--ink); }
.adm-link.is-current { background: #173b34; color: #fff; }
.adm-link.is-current .icon { color: #c9f26c; }
.adm-badge { margin-inline-start: auto; min-inline-size: 24px; padding: 0 7px; border-radius: 99px; background: #e8590c; color: #fff; font-size: .8rem; line-height: 24px; text-align: center; }
.adm-badge[hidden] { display: none; }

.adm-main { display: grid; gap: 18px; min-inline-size: 0; padding-block-end: 60px; }
.adm-head h1 { font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.3; }
.adm-head p { color: var(--muted); }
.adm-main .panel { background: rgb(255 255 255 / .94); }
.adm-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.adm-stats .stat { text-decoration: none; color: inherit; background: rgb(255 255 255 / .94); }
.adm-stats a.stat:hover { border-color: #173b34; }
.adm-stats a.stat:first-child b { color: #e8590c; }

.adm-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.adm-tabs button { min-block-size: 40px; padding: 6px 16px; border: 1.5px solid var(--line); border-radius: 99px; background: var(--surface); font: inherit; font-weight: 500; cursor: pointer; color: var(--muted); }
.adm-tabs button[aria-selected="true"] { background: #173b34; border-color: #173b34; color: #fff; }

.adm-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.adm-warn { padding: 10px 14px; border-radius: 12px; background: #fff3cd; color: #6b4e00; font-weight: 500; margin: 0; }
.adm-main .btn .icon { inline-size: 18px; block-size: 18px; }

.adm-table { display: grid; gap: 6px; }
.adm-tr { display: grid; grid-template-columns: 1.6fr 1.2fr repeat(3, .6fr) 1.2fr; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--bg); }
.adm-th { background: none; color: var(--muted); font-size: .85rem; font-weight: 600; padding-block: 2px; }
.adm-tr small { color: var(--muted); }
.adm-codes .adm-tr { grid-template-columns: 1.4fr 1.1fr repeat(4, .55fr) 1fr 1fr auto; }
.adm-offers .adm-tr { grid-template-columns: 1.4fr .6fr .8fr 1fr 1fr auto; }
.adm-log { grid-template-columns: 170px 130px 1fr; }
.adm-user { grid-template-columns: 1.3fr .9fr .9fr auto; }
.adm-user select.text-input { inline-size: auto; min-block-size: 44px; padding-block: 4px; }
.adm-pill { justify-self: start; padding: 2px 12px; border-radius: 99px; background: #173b34; color: #c9f26c; font-size: .85rem; }

@media (max-width: 900px) {
 .adm-body { grid-template-columns: minmax(0, 1fr); gap: 14px; }
 .adm-nav { position: sticky; top: 64px; z-index: 15; display: flex; overflow-x: auto; gap: 6px; padding: 8px; border-radius: 16px; scrollbar-width: none; margin-inline: -4px; }
 .adm-link { flex: none; white-space: nowrap; }
 .adm-tag { display: none; }
 .adm-quiet span { display: none; }
 .adm-top-side .lang-select { max-inline-size: 110px; }
 .adm-tr, .adm-codes .adm-tr, .adm-offers .adm-tr, .adm-log, .adm-user, .adm-main .admin-row { grid-template-columns: 1fr 1fr; }
 .adm-th { display: none; }
 .adm-stats { grid-template-columns: 1fr 1fr; }
 .adm-main .panel { padding: 18px 14px; }
}

/* part 2: lessons running now, and one teacher's page */
.adm-badge-live { background: #1a7f4e; }
.adm-live { display: grid; gap: 10px; }
.adm-live-card { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--bg); border-inline-start: 5px solid #e8a100; }
.adm-live-card.is-full { border-inline-start-color: #1a7f4e; background: #eef8dc; }
.adm-live-card strong, .adm-live-card small { display: block; } .adm-live-card small { color: var(--muted); }
.adm-dots { display: grid; gap: 4px; }
.adm-dot { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--muted); white-space: nowrap; }
.adm-dot::before { content: ""; inline-size: 10px; block-size: 10px; border-radius: 50%; background: #c9c6ba; }
.adm-dot.is-on { color: #14633d; font-weight: 600; } .adm-dot.is-on::before { background: #1a7f4e; box-shadow: 0 0 0 4px rgb(26 127 78 / .18); }
.adm-stamp { color: var(--muted); }
.adm-next { grid-template-columns: 1.4fr 1fr auto; }
.adm-name { font-weight: 700; color: #173b34; text-decoration: underline; text-decoration-color: #9cc83c; text-underline-offset: 4px; }
.adm-name:hover { text-decoration-thickness: 2px; }
.adm-hint { margin: 0; color: var(--muted); font-size: .95rem; }
.adm-main-inner { display: grid; gap: 18px; }
.adm-back { color: var(--muted); font-size: .95rem; text-decoration: none; } .adm-back:hover { color: var(--ink); }
.adm-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.adm-facts small, .adm-facts strong { display: block; } .adm-facts small { color: var(--muted); }
.adm-about { margin: 0; white-space: pre-wrap; }
.adm-stats .stat.is-alert b { color: #c92a2a; }
.adm-review { padding: 12px 14px; border-radius: 12px; background: var(--bg); } .adm-review b { color: #e8a100; } .adm-review p { margin: 4px 0; } .adm-review small { color: var(--muted); }
@media (max-width: 900px) { .adm-live-card, .adm-next { grid-template-columns: 1fr; } }

/* part 3: the admin team and permissions */
.adm-link[hidden] { display: none; }
.adm-team { display: grid; gap: 10px; }
.adm-member { border: 1px solid var(--line); border-radius: 16px; background: var(--bg); padding: 4px 14px; }
.adm-member[open] { padding-block-end: 14px; }
.adm-member summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; min-block-size: 52px; cursor: pointer; }
.adm-member summary small { color: var(--muted); }
.adm-member > .row { margin-block-start: 12px; flex-wrap: wrap; }
.adm-pill.is-off { background: #c92a2a; color: #fff; }
.adm-perms { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-block-start: 10px; }
.adm-perms fieldset { margin: 0; padding: 10px 14px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); display: grid; gap: 6px; align-content: start; }
.adm-perms legend { padding-inline: 6px; font-weight: 700; font-size: .92rem; color: #173b34; }
.adm-check { display: flex; align-items: center; gap: 10px; min-block-size: 36px; cursor: pointer; font-size: .95rem; }
.adm-check input { inline-size: 20px; block-size: 20px; accent-color: #173b34; flex: none; }
.adm-cred { padding: 18px 20px; border-radius: 18px; background: #fff8e1; border: 2px solid #e8a100; display: grid; gap: 10px; }
.adm-cred[hidden] { display: none; }
.adm-cred h3 { margin: 0; font-size: 1.1rem; }
.adm-cred dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; align-items: baseline; }
.adm-cred dt { color: var(--muted); font-size: .9rem; }
.adm-cred dd { margin: 0; font-family: ui-monospace, Consolas, monospace; font-size: 1.05rem; font-weight: 700; user-select: all; overflow-wrap: anywhere; text-align: start; }
.adm-cred p { margin: 0; font-size: .92rem; color: #6b4e00; }

/* part 4: supervising a live lesson */
.adm-live-card { grid-template-columns: 1.4fr 1fr auto auto; }
.adm-dot.is-watch { color: #8a4b00; font-weight: 600; } .adm-dot.is-watch::before { display: none; }
.adm-watch { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.adm-watch-tile { margin: 0; border-radius: 18px; overflow: hidden; background: #0f1714; display: grid; }
.adm-watch-tile video { inline-size: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #0f1714; display: block; }
.adm-watch-tile figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; padding: 10px 14px; background: #173b34; color: #fff; }
.adm-watch-state { color: #cfe0d4; font-size: .9rem; } .adm-watch-state[data-state="watchOn"] { color: #c9f26c; font-weight: 600; }
.adm-watch-chat { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-block-size: 240px; overflow: auto; }
.adm-watch-chat li { padding: 8px 12px; border-radius: 12px; background: var(--bg); } .adm-watch-chat .is-empty { color: var(--muted); background: none; padding: 0; }
@media (max-width: 900px) { .adm-watch { grid-template-columns: 1fr; } .adm-live-card { grid-template-columns: 1fr; } }
/* visits (3 Dec 2026) */
.adm-vbars { display: flex; align-items: flex-end; gap: 6px; block-size: 140px; padding-block: 8px 0; }
.adm-vbars > div { flex: 1; display: grid; grid-template-rows: 1fr auto auto; justify-items: center; block-size: 100%; }
.adm-vbars i { align-self: end; inline-size: 70%; border-radius: 6px 6px 0 0; background: #173b34; }
.adm-vbars small { color: #556270; font-size: .72rem; } .adm-vbars b { font-size: .78rem; }
.adm-vgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-block-start: 16px; }
.adm-vgrid h3 { font-size: .95rem; margin-block-end: 6px; }
.adm-vlist { display: grid; gap: 4px; }
.adm-vlist li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 8px; border-radius: 8px; background: rgb(15 29 43 / .04); }
