/* Aspire — admin panel */
:root {
  --navy: #15284f; --navy-dark: #10203f; --green: #8cc63f; --green-dark: #5d8a1f; --green-light: #e9f4d7;
  --orange: #f6a623; --red: #c8372d; --bg: #f4f5f0; --white: #fff; --border: #e3e6dc; --muted: #5b6478;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.55 "Poppins", system-ui, sans-serif; color: var(--navy); background: var(--bg); }
a { color: var(--navy); }
h1 { font-size: 24px; margin: 0 0 18px; }
h2 { font-size: 17px; margin: 0 0 12px; }

/* Sidebar: fixed to the screen; menu scrolls on its own; the bottom block is always pinned at the bottom. */
.shell { min-height: 100vh; padding-left: 240px; }
.side {
  position: fixed; inset: 0 auto 0 0; width: 240px; z-index: 40;
  background: var(--navy); color: #dfe4ee; padding: 18px 12px 0;
  display: flex; flex-direction: column; height: 100vh; height: 100dvh;
}
.side .logo { display: flex; gap: 10px; align-items: center; color: #fff; text-decoration: none; font-weight: 800; letter-spacing: .12em; margin: 0 6px 18px; flex-shrink: 0; }
.side .logo small { display: block; font-size: 10px; letter-spacing: 0; color: var(--green); font-weight: 500; }
.side__nav { flex: 1; min-height: 0; overflow-y: auto; display: grid; align-content: start; gap: 2px; margin: 0 -4px; padding: 0 4px 12px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.side a, .side button { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: #dfe4ee; text-decoration: none; font: inherit; background: none; border: 0; cursor: pointer; width: 100%; text-align: left; }
.side a svg, .side button svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }
.side .label { flex: 1; }
.side a:hover, .side button:hover { background: rgba(255,255,255,.07); }
.side a.active { background: var(--green); color: var(--navy); font-weight: 600; }
.side a.active svg { opacity: 1; }
.side .count { background: var(--orange); color: var(--navy); border-radius: 999px; font-size: 11px; font-weight: 700; padding: 0 8px; }
.side .bottom { flex-shrink: 0; border-top: 1px solid rgba(255,255,255,.12); padding: 10px 0 calc(12px + env(safe-area-inset-bottom)); display: grid; gap: 2px; background: var(--navy); }
.side .bottom a, .side .bottom button { color: #c9d2e6; padding: 7px 12px; }
.side .bottom form { margin: 0; }
.who { display: flex; gap: 10px; align-items: center; padding: 6px 12px 10px; min-width: 0; }
.who > span:last-child { min-width: 0; }
.who strong { display: block; color: #fff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who small { display: block; color: #9fb0cf; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who__avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: var(--navy); font-weight: 800; display: grid; place-items: center; flex-shrink: 0; }
.main { padding: 28px 32px 60px; min-width: 0; }

/* Mobile-only parts (hidden on larger screens) */
.mtop, .mbar, .scrim { display: none; }
.topline { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.topline h1 { margin: 0; }

.card { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.card + .card { margin-top: 18px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; }
.stat strong { display: block; font-size: 28px; }
.stat span { color: var(--muted); font-size: 13px; }
.stat:first-child { background: var(--navy); color: #fff; border-color: var(--navy); }
.stat:first-child strong { color: var(--green); }
.stat:first-child span { color: #c9d2e6; }
.cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px; border-bottom: 1px solid var(--border); }
td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.unread td { font-weight: 600; }
.table-wrap { overflow-x: auto; }
.muted { color: var(--muted); font-size: 12.5px; }

.badge { display: inline-block; border-radius: 999px; padding: 1px 10px; font-size: 12px; font-weight: 600; }
.badge--new { background: #fdeccc; color: #a8650a; }
.badge--contacted { background: #e2ecfb; color: #2a5bb5; }
.badge--admitted { background: var(--green-light); color: var(--green-dark); }
.badge--closed { background: #eceef1; color: var(--muted); }
.badge--draft { background: #eceef1; color: var(--muted); }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px; border: 1px solid transparent; font: 600 13px "Poppins", sans-serif; cursor: pointer; text-decoration: none; }
.btn--primary { background: var(--green); color: var(--navy); }
.btn--navy { background: var(--navy); color: #fff; }
.btn--ghost { background: #fff; border-color: var(--border); color: var(--navy); }
.btn--danger { background: #fff; border-color: #f0c4bf; color: var(--red); }
.btn--sm { padding: 5px 10px; font-size: 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
form.inline { display: inline; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
input, select, textarea { font: 14px "Poppins", sans-serif; padding: 8px 11px; border: 1px solid #d6d9cf; border-radius: 8px; background: #fff; color: var(--navy); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--green); outline-offset: 0; border-color: var(--green); }
textarea { width: 100%; min-height: 110px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.field { display: grid; gap: 5px; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 13px; }
.field input:not([type=checkbox]):not([type=file]), .field select { width: 100%; }
.field .error { color: var(--red); font-size: 12px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.hint { color: var(--muted); font-size: 12px; }
.thumb { width: 100%; max-width: 220px; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.img-field { display: grid; gap: 6px; align-content: start; }
fieldset { border: 0; padding: 0; margin: 0; }
.save-bar { position: sticky; bottom: 0; background: var(--bg); padding: 14px 0; margin-top: 18px; border-top: 1px solid var(--border); }

.flash { background: var(--green-light); color: var(--green-dark); border: 1px solid #cfe6ac; border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; }
.dl { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 500; }
.message-body { white-space: pre-wrap; background: var(--bg); border-radius: 8px; padding: 14px; margin-top: 14px; }
.bars { display: grid; gap: 8px; }
.bar { display: grid; grid-template-columns: 110px 1fr 30px; gap: 10px; align-items: center; font-size: 13px; }
.bar div { height: 8px; background: var(--green-light); border-radius: 99px; overflow: hidden; }
.bar div span { display: block; height: 100%; background: var(--green); }
.pager { display: flex; justify-content: space-between; margin-top: 14px; }
.pager .disabled { color: #b0b5c0; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; background: var(--navy); padding: 20px; }
.login .card { width: 100%; max-width: 380px; padding: 30px; }
.login .logo { display: flex; gap: 10px; align-items: center; margin-bottom: 20px; font-weight: 800; letter-spacing: .12em; }
.login .logo img { width: 30px; }
.login .field { margin-bottom: 14px; }
.login .btn { width: 100%; justify-content: center; padding: 11px; }

@media (max-width: 900px) {
  /* Sidebar becomes a slide-in drawer; its bottom block stays pinned to the bottom. */
  .shell { padding-left: 0; }
  .side { width: min(290px, 86vw); transform: translateX(-100%); transition: transform .25s ease; z-index: 60; box-shadow: 8px 0 30px rgba(0,0,0,.25); }
  .drawer-open .side { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(16,32,63,.45); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
  .drawer-open .scrim { opacity: 1; pointer-events: auto; }
  .drawer-open { overflow: hidden; }

  /* Top bar */
  .mtop { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; top: 0; z-index: 30; background: var(--navy); color: #fff; padding: 8px 10px; padding-top: calc(8px + env(safe-area-inset-top)); }
  .mtop__logo { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 700; font-size: 15px; }
  .mtop__logo img { width: 30px; background: #fff; border-radius: 7px; padding: 2px; }
  .mtop__btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.08); border: 0; color: #fff; cursor: pointer; }
  .mtop__btn svg { width: 22px; height: 22px; }

  /* Bottom bar, fixed to the bottom of the screen */
  .mbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: #fff; border-top: 1px solid var(--border); box-shadow: 0 -4px 18px rgba(16,32,63,.08);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mbar a, .mbar button { position: relative; display: grid; justify-items: center; gap: 2px; padding: 8px 2px 7px; color: var(--muted); text-decoration: none; font: 500 11px "Poppins", sans-serif; background: none; border: 0; cursor: pointer; }
  .mbar svg { width: 22px; height: 22px; }
  .mbar .active { color: var(--navy); font-weight: 700; }
  .mbar .active svg { color: var(--green-dark); }
  .mbar b { position: absolute; top: 4px; left: calc(50% + 6px); background: var(--orange); color: var(--navy); border-radius: 999px; font-size: 10px; line-height: 16px; min-width: 16px; padding: 0 4px; }

  .main { padding: 20px 16px calc(84px + env(safe-area-inset-bottom)); }
  .stats { grid-template-columns: 1fr 1fr; }
  .cols, .form-grid { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 1fr; }
}
.side .logo img { width: 36px; background: #fff; border-radius: 8px; padding: 2px; }
.login .logo { justify-content: center; }
.login .logo img { width: 240px; max-width: 100%; }

/* People, gallery, users */
.avatar-sm { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; }
.avatar-sm--empty { background: var(--green-light); color: var(--navy); font-weight: 700; font-size: 13px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.gallery-item { border: 1px solid var(--border); border-radius: 10px; padding: 8px; display: grid; gap: 8px; background: #fff; }
.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; display: block; }
.gallery-item input:not([type=checkbox]) { width: 100%; }
.gallery-item .actions { margin-top: 6px; }
.gallery-item--hidden img { opacity: .4; }
.slide-list { display: grid; gap: 14px; }
.slide-item { display: grid; grid-template-columns: 260px 1fr auto; gap: 16px; align-items: start; border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: #fff; }
.slide-item img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; border-radius: 6px; display: block; }
.slide-item--hidden img { opacity: .4; }
@media (max-width: 900px) { .slide-item { grid-template-columns: 1fr; } }
.flash--err { background: #fdecea; color: var(--red); border-color: #f5c6c1; }
.cols > .card + .card, .cols > form.card { margin-top: 0; }
.manage { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.manage a { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; text-decoration: none; display: grid; gap: 2px; transition: border-color .15s ease; }
.manage a:hover { border-color: var(--green); }
.manage strong { font-size: 14px; }
.manage span { font-size: 12px; color: var(--muted); }
.perm-list { display: grid; gap: 6px; }
.perm-list:disabled { opacity: .5; }
@media (max-width: 900px) { .manage { grid-template-columns: 1fr 1fr; } }

/* Dashboard */
.stats--5 { grid-template-columns: repeat(5, 1fr); }
a.stat { text-decoration: none; color: inherit; transition: border-color .15s ease, transform .15s ease; }
a.stat:hover { border-color: var(--green); transform: translateY(-1px); }
.stat:nth-child(2) strong { color: #a8650a; }
.cols + .cols { margin-top: 18px; }
.cols > div > .card + .card { margin-top: 18px; }
a.bar { text-decoration: none; color: inherit; }
.list-row { display: flex; justify-content: space-between; gap: 10px; margin: 0 0 10px; }
.list-row .muted { flex-shrink: 0; }
.chart { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; align-items: end; height: 200px; padding-top: 10px; }
.chart__col { display: grid; grid-template-rows: 18px 1fr 18px; height: 100%; text-align: center; }
.chart__col > .chart__bar { align-self: end; background: var(--green); border-radius: 5px 5px 0 0; min-height: 3px; }
.chart__bar--today { background: var(--orange) !important; }
.chart__val { font-size: 11px; font-weight: 700; color: var(--navy); }
.chart__label { font-size: 11px; color: var(--muted); padding-top: 4px; }
@media (max-width: 1100px) { .stats--5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .stats--5 { grid-template-columns: 1fr 1fr; } .chart { gap: 3px; } }
@media (max-width: 900px) { .save-bar { bottom: calc(62px + env(safe-area-inset-bottom)); } }

/* ---- Chat messages (Team chat + Live chat pages) ---- */
@keyframes chat-pop { from { transform: scale(.4); } to { transform: scale(1); } }


.chat__list { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 12px; background: var(--bg); display: flex; flex-direction: column; gap: 8px; }
.chat__empty { margin: auto; color: var(--muted); font-size: 13px; text-align: center; }
.chat__date { align-self: center; font-size: 11px; color: var(--muted); background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 1px 10px; margin: 6px 0 2px; }
.chat__msg { display: flex; gap: 8px; align-items: flex-end; max-width: 88%; }
.chat__msg--mine { align-self: flex-end; }
.chat__avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--green-light); color: var(--navy); font-size: 12px; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
.chat__bubble { background: #fff; border: 1px solid var(--border); border-radius: 14px 14px 14px 4px; padding: 7px 11px 5px; min-width: 0; }
.chat__msg--mine .chat__bubble { background: var(--green); border-color: var(--green); border-radius: 14px 14px 4px 14px; }
.chat__bubble strong { display: block; font-size: 11.5px; color: var(--green-dark); }
.chat__bubble p { margin: 0; font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat__bubble time { display: block; text-align: right; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.chat__msg--mine .chat__bubble time { color: rgba(21,40,79,.65); }

.chat__form { display: flex; gap: 8px; align-items: flex-end; padding: 10px; border-top: 1px solid var(--border); background: #fff; }
.chat__form textarea { flex: 1; min-height: 40px; max-height: 120px; resize: none; padding: 9px 12px; border-radius: 20px; line-height: 1.4; }
.chat__form button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--navy); color: #fff; cursor: pointer; display: grid; place-items: center; flex-shrink: 0; }
.chat__form button:disabled { opacity: .5; }
.chat__form button svg { width: 18px; height: 18px; }
.chat__error { margin: 0; padding: 6px 12px 10px; font-size: 12px; color: var(--red); background: #fff; }


/* ---- Live chat inbox ---- */
.inbox { display: grid; grid-template-columns: 320px 1fr; height: calc(100vh - 150px); min-height: 460px; background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.inbox__list { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.inbox__tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--border); }
.inbox__tabs button { border: 0; background: none; padding: 12px; font: 600 13px "Poppins", sans-serif; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.inbox__tabs button.active { color: var(--navy); border-bottom-color: var(--green); }
.inbox__items { flex: 1; overflow-y: auto; }
.inbox__empty { padding: 20px; text-align: center; }
.inbox__item { display: flex; gap: 10px; align-items: center; width: 100%; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--border); background: #fff; text-align: left; cursor: pointer; font: inherit; color: var(--navy); }
.inbox__item:hover { background: var(--bg); }
.inbox__item.active { background: var(--green-light); }
.inbox__item.unread strong, .inbox__item.unread .inbox__preview { font-weight: 700; color: var(--navy); }
.inbox__item .count { background: var(--orange); color: var(--navy); border-radius: 999px; font-size: 11px; font-weight: 700; padding: 0 7px; }
.inbox__avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
.inbox__text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.inbox__top { display: flex; justify-content: space-between; gap: 8px; }
.inbox__top strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox__top small { flex-shrink: 0; font-size: 11px; }
.inbox__preview { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox__thread { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.inbox__placeholder { margin: auto; text-align: center; color: var(--muted); }
.inbox__placeholder svg { width: 56px; height: 56px; opacity: .4; }
.inbox__placeholder[hidden], .inbox__body[hidden] { display: none; }
.inbox__body { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.inbox__head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.inbox__who { flex: 1; min-width: 160px; }
.inbox__who strong { display: block; }
.inbox__who small { display: block; color: var(--muted); font-size: 12px; }
.inbox__head form { display: inline; margin: 0; }
.inbox__back { display: none; border: 0; background: var(--bg); width: 34px; height: 34px; border-radius: 8px; font-size: 18px; cursor: pointer; }
.inbox__messages { flex: 1; min-height: 0; }

.live-toast { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 95; background: var(--navy); color: #fff; text-decoration: none; padding: 12px 18px; border-radius: 12px; box-shadow: 0 12px 36px rgba(16,32,63,.35); max-width: min(440px, 92vw); display: grid; gap: 2px; border-left: 4px solid var(--green); animation: chat-pop .3s ease; }
.live-toast strong { color: var(--green); font-size: 13px; }
.live-toast span { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-toast[hidden] { display: none; }

@media (max-width: 900px) {
  .inbox { grid-template-columns: 1fr; height: calc(100vh - 230px); height: calc(100dvh - 230px); }
  .inbox__thread { display: none; }
  .inbox--thread .inbox__list { display: none; }
  .inbox--thread .inbox__thread { display: flex; }
  .inbox__back { display: grid; place-items: center; }
  .inbox__head .actions { width: 100%; }
}
.stats--6 { grid-template-columns: repeat(6, 1fr); }
.stats--6 .stat:nth-child(3) strong { color: var(--green-dark); }
@media (max-width: 1300px) { .stats--6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .stats--6 { grid-template-columns: 1fr 1fr; } }
.live-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; }
.live-row:last-child { border-bottom: 0; }
.live-row__text { flex: 1; min-width: 0; display: grid; }
.live-row__text strong { font-size: 13.5px; }
.live-row__text .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.count-pill { background: var(--orange); color: var(--navy); border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 8px; }

.count--red { background: var(--red) !important; color: #fff !important; }
.mtop__btn { position: relative; }
.mtop__btn b { position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--red); color: #fff; font-size: 10px; line-height: 17px; text-align: center; }
.mtop__btn b[hidden] { display: none; }

/* ---- Team chat page ---- */
.team { display: grid; grid-template-columns: 1fr 260px; gap: 18px; height: calc(100vh - 150px); min-height: 460px; }
.team__room { display: flex; flex-direction: column; min-height: 0; background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.team__head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.team__head strong { display: block; }
.team__head small { display: block; font-size: 12px; color: var(--muted); }
.team__icon { width: 40px; height: 40px; border-radius: 12px; background: var(--green-light); color: var(--navy); display: grid; place-items: center; }
.team__icon svg { width: 22px; height: 22px; }
.team__list { flex: 1; min-height: 0; padding: 18px; }
.team .chat__msg { max-width: min(640px, 80%); }
.team .chat__bubble p { font-size: 14px; }
.team .chat__form textarea { min-height: 44px; }
.team .chat__form button { width: 44px; height: 44px; background: var(--green); color: var(--navy); }
.team__members { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 16px; overflow-y: auto; }
.team__members h2 { font-size: 15px; margin-bottom: 10px; }
.team__members ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.team__member { display: flex; align-items: center; gap: 10px; }
.team__avatar { position: relative; width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
.team__dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #b9bfca; border: 2px solid #fff; }
.team__member.online .team__dot { background: #2fb344; }
.team__mtext { min-width: 0; }
.team__mtext strong { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team__mtext small { display: block; font-size: 11.5px; color: var(--muted); }
.team__member.online small { color: #2a8a3a; }

@media (max-width: 1000px) {
  .team { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: auto; }
  .team__members { order: -1; padding: 10px 12px; }
  .team__members h2, .team__members .btn { display: none; }
  .team__members ul { display: flex; gap: 14px; overflow-x: auto; }
  .team__member { flex-direction: column; gap: 4px; text-align: center; min-width: 56px; }
  .team__mtext small { display: none; }
  .team__mtext strong { font-size: 11px; max-width: 64px; }
  .team__room { height: calc(100vh - 330px); height: calc(100dvh - 330px); min-height: 360px; }
}

/* Print / Save as PDF: plain report on white paper with a letterhead */
.print-head, .print-only { display: none; }
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; font-size: 11px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .side, .scrim, .mtop, .mbar, .flash, .live-toast, .filters, .pager, .no-print,
  .btn, .actions, form { display: none !important; }
  .shell { padding-left: 0; }
  .main { padding: 0; }
  .print-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 2px solid var(--navy); padding-bottom: 8px; margin-bottom: 14px; }
  .print-head img { height: 42px; }
  .print-head div { text-align: right; }
  .print-head strong { display: block; font-size: 15px; }
  .print-head span { color: var(--muted); font-size: 10px; }
  p.print-only { display: block; margin: 0 0 10px; color: var(--muted); }
  dt.print-only, dd.print-only { display: block; }
  h1 { font-size: 18px; }
  .card, .stat { border-color: #ccc; box-shadow: none; break-inside: avoid; }
  .card { padding: 12px; }
  .table-wrap { overflow: visible; }
  thead { display: table-header-group; }
  tr { break-inside: avoid; }
  th, td { padding: 5px 6px; border-bottom-color: #ccc; }
  a { color: inherit; text-decoration: none; }
  .stats, .stats--6 { grid-template-columns: repeat(3, 1fr); }
  .cols { grid-template-columns: 1fr 1fr; }
  .cols:has(> .no-print) { grid-template-columns: 1fr; }
}

/* Admin → Mobile app */
.stats--app strong { font-size: 24px; }
.app-alert { background: #fdecea; border: 1px solid #f0c4bf; color: #8a2a21; border-radius: 10px; padding: 10px 14px; margin: 0 0 16px; }
.app-alert p { margin: 2px 0; }
#uploadForm .app-alert { margin: 12px 0 0; }
.app-progress { margin-top: 12px; height: 26px; border-radius: 13px; background: #eef1f6; position: relative; overflow: hidden; }
.app-progress i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--green, #8cc63f); transition: width .2s; }
.app-progress span { position: relative; display: block; text-align: center; font: 600 12.5px/26px inherit; color: var(--navy, #15284f); }
.app-releases { display: grid; gap: 12px; }
.app-rel { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.app-rel--current { border-color: var(--green, #8cc63f); box-shadow: 0 0 0 3px rgba(140,198,63,.15); }
.app-rel__head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.app-rel__btns { display: flex; gap: 6px; flex-wrap: wrap; }
.app-rel__btns form { margin: 0; }
.app-rel details { margin-top: 8px; }
.app-rel summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--navy, #15284f); }
.app-rel .small { font-size: 12.5px; margin-top: 2px; }
.app-rel .badge { margin-left: 6px; }
.app-steps { margin: 0 0 10px 18px; display: grid; gap: 6px; font-size: 14px; }
@media (max-width: 760px) { .stats--app { grid-template-columns: 1fr 1fr; } }

/* Campaigns */
[hidden] { display: none !important; }
.tpl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tpl { position: relative; display: grid; gap: 6px; align-content: start; border: 2px solid var(--border); border-radius: 12px; padding: 12px; cursor: pointer; background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
.tpl:hover { border-color: #c9dca8; }
.tpl:has(input:checked) { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-light); }
.tpl input { position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; accent-color: var(--green-dark); }
.tpl strong { font-size: 14px; }
.tpl__form { font-size: 11.5px; color: var(--green-dark); }
/* Mini wireframe of each template's layout */
.tpl__preview { display: grid; gap: 4px; height: 116px; padding: 8px; border-radius: 8px; background: var(--bg); overflow: hidden; }
.tpl__preview i { display: block; border-radius: 3px; background: #d9ddd2; }
.tpl__preview--admission { grid-template: 10px 14px 1fr / 1.1fr 1fr; background: var(--navy); }
.tpl__preview--admission .a { background: var(--orange); width: 50%; }
.tpl__preview--admission .b { grid-column: 1; grid-row: 2; background: var(--green); }
.tpl__preview--admission .c { grid-column: 1; grid-row: 3; background: rgba(255,255,255,.25); }
.tpl__preview--admission .d { grid-column: 2; grid-row: 1 / 4; background: #fff; }
.tpl__preview--admission .e { display: none; }
.tpl__preview--event { grid-template: 46px 16px 1fr / 1fr 1fr 1fr; }
.tpl__preview--event .a { grid-column: 1 / -1; background: linear-gradient(135deg, #3b5584, var(--navy)); }
.tpl__preview--event .b, .tpl__preview--event .c, .tpl__preview--event .d { background: #fff; border: 1px solid var(--border); }
.tpl__preview--event .e { grid-column: 1 / -1; background: var(--green); opacity: .6; }
.tpl__preview--scholarship { grid-template: 10px 14px 18px 1fr / repeat(4, 1fr); background: linear-gradient(160deg, var(--navy), #24406f); justify-items: center; }
.tpl__preview--scholarship .a { grid-column: 2 / 4; width: 100%; background: var(--orange); }
.tpl__preview--scholarship .b { grid-column: 1 / -1; width: 80%; background: #fff; }
.tpl__preview--scholarship .c { grid-column: 1 / -1; width: 70%; background: rgba(255,255,255,.3); }
.tpl__preview--scholarship .d { grid-column: 1 / 3; width: 90%; background: var(--green); }
.tpl__preview--scholarship .e { grid-column: 3 / 5; width: 90%; background: var(--green); }
.tpl__preview--simple { grid-template: 40px 10px 8px 1fr / 1fr; padding: 8px 22%; }
.tpl__preview--simple .a { background: #c6ccbd; }
.tpl__preview--simple .b { background: var(--navy); width: 80%; }
.tpl__preview--simple .c { width: 60%; }
.tpl__preview--simple .d { background: #fff; border: 1px solid var(--border); }
.tpl__preview--simple .e { display: none; }
@media (max-width: 1100px) { .tpl-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .tpl-grid { grid-template-columns: 1fr; } }

.share { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; background: var(--green-light); border-color: #cfe6ac; }
.share > div { display: grid; }
.share input { flex: 1; min-width: 220px; font-weight: 600; }
.prefix-input { display: flex; border: 1px solid #d6d9cf; border-radius: 8px; overflow: hidden; background: #fff; }
.prefix-input span { background: var(--bg); color: var(--muted); font-size: 12.5px; padding: 9px 8px 9px 10px; white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.prefix-input input { border: 0; border-radius: 0; flex: 1; min-width: 0; }

.fb { display: grid; gap: 10px; }
.fb__row { display: grid; grid-template-columns: 1.4fr 1fr 1.4fr auto auto; gap: 10px 12px; align-items: end; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: #fbfcf8; }
.fb__row .field label { font-size: 12px; }
.fb__req { padding-bottom: 9px; white-space: nowrap; }
.fb__tools { display: flex; gap: 4px; padding-bottom: 2px; }
.fb__options[hidden] + .fb__req { grid-column: 4; }
@media (max-width: 1000px) { .fb__row { grid-template-columns: 1fr 1fr; } .fb__options { grid-column: 1 / -1; } }

.signup-status { display: flex; gap: 6px; flex-wrap: wrap; min-width: 220px; }
.signup-status select { padding: 5px 8px; font-size: 12.5px; }
.signup-status input { flex: 1; min-width: 110px; padding: 5px 8px; font-size: 12.5px; }
.cmp-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 14px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; }
.cmp-row:last-child { border-bottom: 0; }
.cmp-row b { font-size: 18px; text-align: right; min-width: 36px; }
.cmp-row small { display: block; color: var(--muted); font-size: 11.5px; }
