.auth, body.shell {
  background:
    radial-gradient(760px 460px at 14% -8%, rgba(52, 199, 89, 0.1), transparent 55%),
    radial-gradient(720px 520px at 90% 6%, rgba(10, 132, 255, 0.08), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}

.auth { min-height: 100%; display: grid; place-items: center; padding: 1.5rem; }
.card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(30px) saturate(1.3);
  -webkit-backdrop-filter: blur(30px) saturate(1.3);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 2.25rem;
  box-shadow: var(--shadow-2), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.card .brand { margin-bottom: 1.5rem; }
.card h1 { margin-bottom: 0.4rem; }
.card > p.muted { margin: 0 0 1.7rem; }
.card form { margin-top: 0.25rem; }
.card label { margin-bottom: 1rem; }
.card input { padding: 0.72rem 0.85rem; }
.card .btn { margin-top: 0.6rem; }

.topbar-app {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0.7rem 1.25rem;
  background: rgba(11, 11, 15, 0.62);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  border-bottom: 1px solid var(--line);
}
.tb-left { justify-self: start; }
.tb-center { justify-self: center; font-size: 0.9rem; color: var(--muted); white-space: nowrap; }
.tb-center strong { color: var(--text); font-weight: 600; margin-left: 0.15rem; }
.tb-right { justify-self: end; display: flex; align-items: center; gap: 0.55rem; }
.topbtn {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--t);
}
.topbtn:hover { background: rgba(255, 255, 255, 0.1); text-decoration: none; }

.ava {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  background: radial-gradient(circle at 38% 32%, #5b6472, #2c313c);
}

.wrap { max-width: 880px; margin: 2.75rem auto; padding: 0 1.25rem; display: grid; gap: 1.75rem; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.page-head h1 { font-size: 2.1rem; font-weight: 650; letter-spacing: -0.035em; }
.page-head p { margin: 0.45rem 0 0; color: var(--muted); font-size: 1.02rem; }

.panel {
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.4rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.panel h2 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); font-weight: 600; }

.formrow { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.formrow input, .formrow select { width: auto; flex: 1 1 160px; margin-top: 0; }
.formrow .btn { flex: 0 0 auto; }
.inline { display: inline; }

.btn.disabled { background: rgba(255, 255, 255, 0.05); color: var(--faint); cursor: default; border-color: var(--line); }
.btn.disabled:hover { background: rgba(255, 255, 255, 0.05); }

.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 1rem; }
.room-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1.45rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  transition: background var(--t), transform var(--t), border-color var(--t);
}
.room-card:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.18); transform: translateY(-2px); }
.rc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.6rem; }
.rc-name { font-weight: 600; font-size: 1.2rem; letter-spacing: -0.018em; }
.rc-icons { display: flex; gap: 0.22rem; flex: 0 0 auto; }
.rc-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: none; background: transparent; color: var(--muted); cursor: pointer; transition: background var(--t), color var(--t); }
.rc-icon:hover { background: rgba(255, 255, 255, 0.09); color: var(--text); }
.rc-icon svg { width: 18px; height: 18px; }
.rc-icon.on { color: var(--green); }
.rc-icon.danger:hover { color: var(--red); }
.rc-meta { display: flex; align-items: center; gap: 0.5rem; font-size: 0.86rem; color: var(--muted); flex-wrap: wrap; }
.rc-meta .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.rc-meta .dot.on { background: var(--green); box-shadow: 0 0 8px var(--green); animation: livepulse 1.8s var(--t) infinite; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.5); } 100% { box-shadow: 0 0 0 8px rgba(52, 199, 89, 0); } }
.rc-actions { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.3rem; }
.rc-actions .btn { flex: 1; padding: 0.62rem 1rem; font-size: 0.92rem; }
.chip { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.1rem 0.45rem; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); }
.chip.owner { color: var(--green); border-color: rgba(52, 199, 89, 0.4); }

.modal {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--bg-1);
  color: var(--text);
  padding: 0;
  max-width: 400px;
  width: calc(100% - 2rem);
  box-shadow: var(--shadow-2);
}
.modal::backdrop { background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(4px); }
.modal-form { padding: 1.5rem; }
.modal-form h2 { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; color: var(--text); text-transform: none; margin-bottom: 1rem; }
.modal-form label { margin-bottom: 1rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 0.5rem; }

.people { display: grid; gap: 0.6rem; }
.user-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
}
.u-meta { display: flex; flex-direction: column; gap: 0.1rem; margin-right: auto; min-width: 0; }
.u-name { font-weight: 550; }
.u-sub { font-size: 0.78rem; color: var(--muted); }
.u-actions { display: flex; gap: 0.85rem; }

@media (max-width: 620px) {
  .room-grid { grid-template-columns: 1fr; }
  .formrow input, .formrow select { flex-basis: 100%; }
  .tb-left { display: none; }
  .tb-center { font-size: 0.8rem; }
  .topbtn { padding: 0.4rem 0.75rem; font-size: 0.8rem; }
}
