:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --ink: #0f172a;
  --muted: #475569;
  --border: #cbd5e1;
  --accent: #0f766e;
  --accent-ink: #ffffff;
  --danger: #b91c1c;
  --ok: #15803d;
  --warn: #b45309;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  color: var(--ink);
  background: #0d151b;
}

#app {
  height: 100%;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.auth-stage {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  place-content: center;
  gap: 16px;
  padding: 24px 16px;
  background: var(--bg);
}

.portal-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.portal-links a {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.auth-card {
  width: min(440px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.auth-card h1 {
  margin: 0 0 14px;
  font-size: 1.4rem;
}

.auth-mode-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.auth-mode-tabs [role="tab"] {
  position: relative;
  border: none;
  background: transparent;
  padding: 10px 12px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  color: var(--muted);
}

.auth-mode-tabs [role="tab"][aria-selected="true"] {
  color: var(--accent);
}

.auth-mode-tabs [role="tab"][aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  border-block-end: 3px solid var(--accent);
}

.auth-form,
.compact-form,
.form-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  font-size: 0.92rem;
}

label.toggle-inline,
label.day-chk {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

input,
select,
textarea {
  font: inherit;
  font-size: max(1rem, 1em);
  padding: 10px 12px;
  min-height: 44px;
  border: 1px solid #767676;
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
}

input:focus-visible,
select:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.btn,
button[type="submit"] {
  font: inherit;
  font-weight: 600;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  background: var(--accent);
  color: var(--accent-ink);
}

.btn.secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
}

.btn.danger {
  background: var(--danger);
  color: #ffffff;
}

.btn.accept {
  background: var(--ok);
  color: #ffffff;
}

.btn.text {
  background: transparent;
  color: var(--accent);
}

.btn.small {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 0.88rem;
}

.qr-frame {
  display: grid;
  place-items: center;
  margin: 14px 0;
}

.recovery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  list-style: none;
  padding: 0;
}

.recovery-grid li {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 8px;
  border-radius: 8px;
  text-align: center;
}

.auth-error,
.error-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--danger);
  padding: 10px 12px;
  border-radius: 10px;
}

.notice-banner,
.pin-banner {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 14px;
}

.pin-code {
  font-family: ui-monospace, monospace;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 2px;
  margin-inline: 10px;
}

.portal-shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 16px 20px 32px;
}

.portal-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.brand-lockup {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.brand-lockup strong {
  font-size: 1.25rem;
  color: var(--accent);
}

.topbar-actions,
.ws-controls,
.ws-identity,
.desk-actions,
.call-dialog-actions,
.row-actions,
.card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.shared-desktop-bar,
.credentials-scope-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
}

.desk-grid,
.family-grid,
.two-col {
  display: grid;
  grid-template-columns: minmax(290px, 380px) 1fr;
  gap: 16px;
}

.two-col {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

@media (max-width: 820px) {
  .desk-grid,
  .family-grid {
    grid-template-columns: 1fr;
  }
}

.queue-column,
.desk-column,
.card,
.family-session-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.column-head,
.desk-header,
.session-item-top,
.session-item-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.session-list,
.family-session-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.session-item {
  width: 100%;
  text-align: left;
  background: var(--surface-alt);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.session-item.selected {
  border-color: var(--accent);
  background: #f0fdfa;
}

.badge,
.status-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #e2e8f0;
  color: var(--ink);
}

.badge.ok {
  background: #dcfce7;
  color: var(--ok);
}

.badge.warn {
  background: #fef3c7;
  color: var(--warn);
}

.badge.accent {
  background: #ccfbf1;
  color: var(--accent);
}

.presence-dot.online {
  color: var(--ok);
  font-weight: 600;
}

.presence-dot.offline {
  color: var(--muted);
}

.chat-panel {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.chat-messages {
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: var(--surface-alt);
  border-radius: 10px;
  margin-bottom: 12px;
}

.chat-msg {
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.chat-msg.chat-call_event {
  background: #f0f9ff;
  border-color: #bae6fd;
  font-size: 0.9rem;
}

.chat-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
}

.chat-msg p {
  margin: 4px 0 0;
}

.chat-compose {
  display: flex;
  gap: 8px;
}

.chat-compose input {
  flex: 1;
}

.admin-nav,
.child-filters,
.conv-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 14px;
}

.nav-pill,
.pill-btn {
  flex: none;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.nav-pill.active,
.pill-btn.active {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-card strong {
  font-size: 1.5rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.weekdays-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}

.dir-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dir-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface-alt);
  border-radius: 8px;
}

.incoming-call-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ringing-badge {
  align-self: center;
  background: #dcfce7;
  color: var(--ok);
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 700;
}

.privacy-tip {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  font-size: 0.88rem;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

dialog:modal {
  overscroll-behavior: contain;
}
dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
}
dialog[open] {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 16px;
  padding: 24px;
  max-width: min(520px, calc(100vw - 32px));
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}
.toast-region {
  position: fixed;
  inset: auto 16px 16px auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(380px, calc(100vw - 32px));
  z-index: 1000;
}
.toast-item[popover="manual"] {
  position: static;
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transition-behavior: allow-discrete;
}
@media (prefers-reduced-motion: reduce) {
  .toast-item[popover="manual"] {
    transition: none;
  }
}
.inclusively-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.dev-quick-login {
  background: #f0fdfa;
  border: 1px dashed var(--accent);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 16px;
}

.dev-quick-title {
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dev-quick-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dev-btn {
  flex: 1 1 auto;
  text-align: left;
  justify-content: flex-start;
}

/* --- Academy360 Dark Teaching Desk Theme --- */
.portal-shell.a360-shell,
.a360-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #0d151b;
  color: #e6eff4;
}

.a360-topbar {
  flex: 0 0 50px;
  height: 50px;
  padding: 0 10px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #0d151b;
  border-bottom: 1px solid #1b2a34;
  user-select: none;
  -webkit-user-select: none;
}

.a360-topbar-left,
.a360-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.a360-topbar-actions {
  gap: 4px;
}

.a360-logo-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #41c1d3;
  color: #092027;
}

.a360-brand-name {
  font-size: 1.05rem;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.a360-brand-name span {
  color: #41c1d3;
}

.a360-topbar-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: #9fb4c0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

.a360-topbar-icon-btn:hover,
.a360-topbar-icon-btn.active {
  background: #15242e;
  color: #41c1d3;
}

.a360-topbar-divider {
  width: 1px;
  height: 18px;
  background: #203340;
  margin: 0 6px;
}

.a360-window-controls {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.a360-win-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 32px;
  border: none;
  background: transparent;
  color: #9fb4c0;
  border-radius: 6px;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

.a360-win-btn:hover {
  background: #182833;
  color: #ffffff;
}

.a360-win-btn.a360-win-close:hover {
  background: #dc2626;
  color: #ffffff;
}

.a360-account-menu-wrap {
  position: relative;
}

.a360-account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  padding: 6px;
  border-radius: 12px;
  background: #132029;
  border: 1px solid #243845;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  display: none;
  z-index: 200;
}

.a360-account-menu.open {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.a360-account-menu-header {
  padding: 8px 10px;
  border-bottom: 1px solid #1f313d;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.a360-account-menu-header strong {
  font-size: 0.86rem;
  color: #ffffff;
}

.a360-account-menu-header span {
  font-size: 0.76rem;
  color: #8ba1ae;
}

.a360-account-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #dce8ee;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.a360-account-menu-item:hover {
  background: #182833;
}

.a360-account-menu-item.danger {
  color: #fda4af;
}

.a360-account-menu-item.danger:hover {
  background: rgba(220, 38, 38, 0.16);
  color: #fecdd3;
}

.a360-auth-titlebar {
  flex: 0 0 50px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.a360-notif-wrap {
  position: relative;
}

.a360-notif-wrap .a360-topbar-icon-btn {
  position: relative;
}

.a360-notif-dot {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #41c1d3;
  box-shadow: 0 0 0 2px #0d151b;
}

.a360-notif-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: -28px;
  width: 320px;
  max-width: calc(100vw - 24px);
  border-radius: 12px;
  background: #111c24;
  border: 1px solid #223542;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 250;
}

.a360-notif-popover.open {
  display: flex;
}

.a360-notif-header {
  padding: 14px 16px;
  border-bottom: 1px solid #1d2e3a;
}

.a360-notif-header strong {
  font-size: 0.96rem;
  color: #ffffff;
}

.a360-notif-body {
  max-height: 260px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.a360-notif-empty {
  margin: 0;
  padding: 26px 16px;
  text-align: center;
  font-size: 0.88rem;
  color: #8ea4b0;
}

.a360-notif-item {
  width: 100%;
  padding: 11px 16px;
  border: none;
  border-bottom: 1px solid #17252f;
  background: transparent;
  color: #e6eff4;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font: inherit;
}

.a360-notif-item:last-child {
  border-bottom: none;
}

.a360-notif-item:hover {
  background: #162530;
}

.a360-notif-item strong {
  font-size: 0.85rem;
  color: #ffffff;
}

.a360-notif-item span {
  font-size: 0.78rem;
  color: #8ea4b0;
}

.a360-notif-footer {
  border-top: 1px solid #1d2e3a;
  background: #0d161d;
  padding: 10px 16px;
  text-align: center;
}

.a360-notif-view-all {
  background: transparent;
  border: none;
  color: #41c1d3;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.a360-notif-view-all:hover {
  background: rgba(65, 193, 211, 0.1);
}

.teaching-as-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #132029;
  border: 1px solid #203340;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.84rem;
  color: #dce8ee;
}

.pill-prefix {
  color: #8ba1ae;
}

.inline-teacher-select {
  min-height: 28px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #27404e;
  background: #0f1a22;
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 600;
}

.ws-chip {
  font-size: 0.75rem;
  color: #8ba1ae;
  border-inline-start: 1px solid #243845;
  padding-inline-start: 8px;
}

.ws-chip.ok {
  color: #41c1d3;
}

.ws-chip.warn {
  color: #fbbf24;
}

.a360-ghost-btn,
.a360-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid #203340;
  color: #b7cad4;
  border-radius: 8px;
  min-height: 34px;
  padding: 4px 10px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.a360-icon-btn {
  padding: 4px 8px;
}

.a360-ghost-btn:hover,
.a360-icon-btn:hover,
.a360-icon-btn.active {
  background: #15242e;
  color: #41c1d3;
}

.a360-error-bar {
  margin: 0;
  padding: 10px 16px;
  background: #3f151b;
  color: #fecaca;
  border-bottom: 1px solid #7f1d1d;
}

.a360-workspace {
  flex: 1 1 0;
  display: grid;
  grid-template-columns: 52px 268px minmax(0, 1fr) 300px;
  min-height: 0;
  overflow: hidden;
}

.a360-workspace.settings-active {
  grid-template-columns: 52px minmax(0, 1fr);
}

.a360-mobile-back-btn,
.a360-mobile-info-btn,
.a360-mobile-inspector-bar {
  display: none;
}

.a360-mobile-back-btn,
.a360-mobile-info-btn {
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid #203340;
  border-radius: 8px;
  background: #132029;
  color: #b7cad4;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  flex: none;
}

.a360-mobile-back-btn:hover,
.a360-mobile-info-btn:hover {
  background: #182b37;
  color: #41c1d3;
}

.a360-mobile-inspector-bar {
  padding-bottom: 10px;
  border-bottom: 1px solid #1b2a34;
}

@media (max-width: 1080px) {
  .a360-workspace {
    grid-template-columns: 52px 240px minmax(0, 1fr);
  }
  .a360-workspace.settings-active {
    grid-template-columns: 52px minmax(0, 1fr);
  }
  .a360-inspector {
    display: none;
  }
  .a360-mobile-info-btn {
    display: inline-grid;
  }
  .a360-workspace[data-mobile-pane='info']:not(.settings-active) .a360-center {
    display: none;
  }
  .a360-workspace[data-mobile-pane='info']:not(.settings-active) .a360-inspector {
    display: flex;
    border-left: none;
  }
  .a360-workspace[data-mobile-pane='info']:not(.settings-active) .a360-mobile-inspector-bar {
    display: flex;
  }
  .a360-workspace[data-mobile-pane='info']:not(.settings-active) .a360-mobile-inspector-bar .a360-mobile-back-btn {
    display: inline-flex;
  }
}

@media (max-width: 780px) {
  .a360-topbar {
    padding: 0 10px;
    gap: 8px;
  }
  .a360-topbar-left {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    gap: 8px;
  }
  .teaching-as-pill {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 3px 10px;
    font-size: 0.78rem;
  }
  .teaching-as-pill strong,
  .inline-teacher-select {
    min-width: 0;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .a360-notif-popover {
    position: fixed;
    top: 56px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
  }
  .a360-workspace,
  .a360-workspace.settings-active {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) 54px;
    overflow: hidden;
  }
  .a360-sidebar,
  .a360-center,
  .a360-inspector {
    grid-row: 1;
    border-right: none;
    border-left: none;
  }
  .a360-rail {
    grid-row: 2;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    height: 54px;
    padding: 4px 12px;
    border-right: none;
    border-top: 1px solid #1b2a34;
    overflow: hidden;
  }
  .a360-workspace:not(.settings-active)[data-mobile-pane='list'] .a360-center,
  .a360-workspace:not(.settings-active)[data-mobile-pane='list'] .a360-inspector {
    display: none;
  }
  .a360-workspace:not(.settings-active)[data-mobile-pane='chat'] .a360-sidebar,
  .a360-workspace:not(.settings-active)[data-mobile-pane='chat'] .a360-inspector {
    display: none;
  }
  .a360-workspace:not(.settings-active)[data-mobile-pane='info'] .a360-sidebar,
  .a360-workspace:not(.settings-active)[data-mobile-pane='info'] .a360-center {
    display: none;
  }
  .a360-workspace:not(.settings-active)[data-mobile-pane='info'] .a360-inspector {
    display: flex;
  }
  .a360-mobile-back-btn {
    display: inline-flex;
  }
  .a360-center-header {
    padding: 10px 12px;
    gap: 10px;
  }
  .a360-center-body {
    padding: 14px 12px;
  }
  .a360-msg {
    max-width: 88%;
  }
  .a360-composer {
    padding: 10px 12px;
    gap: 8px;
  }
  .a360-composer input {
    min-height: 40px;
    font-size: 16px;
  }
  .a360-center-settings {
    padding: 16px 14px 24px;
  }
  .a360-calling-card {
    padding: 28px 18px 22px;
  }
}

@media (max-width: 560px) {
  .ws-chip,
  .pill-prefix {
    display: none;
  }
  .a360-center-actions .a360-btn-classroom,
  .a360-center-actions .a360-btn-call,
  .a360-center-actions .a360-btn-cancel,
  .a360-center-actions .a360-btn-danger {
    min-height: 36px;
    padding: 6px 11px;
    font-size: 0.8rem;
  }
}

@media (max-width: 420px) {
  .a360-brand-name {
    display: none;
  }
}

.a360-rail {
  background: #0d151b;
  border-right: 1px solid #1b2a34;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 6px;
  min-height: 0;
  overflow-y: auto;
}

.a360-rail-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #7d94a1;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.a360-rail-btn.active {
  background: #17363e;
  color: #41c1d3;
}

.a360-sidebar {
  background: #0f1920;
  border-right: 1px solid #1b2a34;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
}

.a360-search-input,
.a360-filter-select {
  width: 100%;
  min-height: 38px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid #233643;
  background: #0c141a;
  color: #e6eff4;
  font-size: 0.88rem;
}

.a360-explore-check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 500;
  color: #b7cad4;
  padding: 2px 2px;
}

.a360-explore-check input {
  min-height: auto;
  width: 15px;
  height: 15px;
  accent-color: #41c1d3;
}

.a360-class-scroll {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.a360-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #7d94a1;
  padding: 6px 4px 2px;
}

.a360-class-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.a360-class-item {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: #dce8ee;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.a360-class-item:hover {
  background: #14222c;
}

.a360-class-item.selected {
  background: #17363e;
  border-color: #24505b;
}

.a360-class-row,
.a360-class-subrow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.a360-class-family {
  font-weight: 700;
  font-size: 0.92rem;
  color: #ffffff;
}

.a360-class-time {
  font-size: 0.78rem;
  color: #41c1d3;
  font-weight: 600;
}

.a360-class-title {
  font-size: 0.8rem;
  color: #8ea4b0;
}

.a360-online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex: none;
}

.a360-center {
  display: flex;
  flex-direction: column;
  background: #0d151b;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.a360-center-header {
  flex: 0 0 auto;
  padding: 12px 20px;
  border-bottom: 1px solid #1b2a34;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.a360-center-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 180px;
}

.a360-center-person > div {
  min-width: 0;
}

.a360-avatar {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #183a44;
  color: #41c1d3;
  font-weight: 700;
  font-size: 0.88rem;
}

.a360-center-family {
  margin: 0;
  font-size: 1rem;
  color: #ffffff;
}

.a360-center-sub {
  margin: 0;
  font-size: 0.8rem;
  color: #8ea4b0;
}

.a360-center-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.a360-btn-call,
.a360-btn-classroom,
.a360-btn-cancel,
.a360-btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 10px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.a360-btn-call {
  background: #41c1d3;
  color: #082026;
  border: 1px solid transparent;
}

.a360-btn-classroom {
  background: #142b33;
  color: #6ee0ef;
  border: 1px solid #25515e;
}

.a360-btn-cancel {
  background: #131f27;
  color: #e6eff4;
  border: 1px solid #2b3f4c;
}

.a360-btn-danger {
  background: #991b1b;
  color: #ffffff;
  border: 1px solid transparent;
}

.a360-center-body {
  flex: 1 1 0;
  min-height: 0;
  padding: 20px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
}

.a360-center-body,
.a360-class-scroll,
.a360-inspector,
.a360-center-settings,
.a360-notif-body,
.a360-rail,
.a360-admin-nav,
.a360-admin-main {
  scrollbar-width: thin;
  scrollbar-color: #243845 transparent;
}

.a360-center-body::-webkit-scrollbar,
.a360-class-scroll::-webkit-scrollbar,
.a360-inspector::-webkit-scrollbar,
.a360-center-settings::-webkit-scrollbar,
.a360-notif-body::-webkit-scrollbar,
.a360-rail::-webkit-scrollbar,
.a360-admin-nav::-webkit-scrollbar,
.a360-admin-main::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.a360-center-body::-webkit-scrollbar-track,
.a360-class-scroll::-webkit-scrollbar-track,
.a360-inspector::-webkit-scrollbar-track,
.a360-center-settings::-webkit-scrollbar-track,
.a360-notif-body::-webkit-scrollbar-track,
.a360-rail::-webkit-scrollbar-track,
.a360-admin-nav::-webkit-scrollbar-track,
.a360-admin-main::-webkit-scrollbar-track {
  background: transparent;
}

.a360-center-body::-webkit-scrollbar-thumb,
.a360-class-scroll::-webkit-scrollbar-thumb,
.a360-inspector::-webkit-scrollbar-thumb,
.a360-center-settings::-webkit-scrollbar-thumb,
.a360-notif-body::-webkit-scrollbar-thumb,
.a360-rail::-webkit-scrollbar-thumb,
.a360-admin-nav::-webkit-scrollbar-thumb,
.a360-admin-main::-webkit-scrollbar-thumb {
  background: #233846;
  border-radius: 999px;
}

.a360-center-body::-webkit-scrollbar-thumb:hover,
.a360-class-scroll::-webkit-scrollbar-thumb:hover,
.a360-inspector::-webkit-scrollbar-thumb:hover,
.a360-center-settings::-webkit-scrollbar-thumb:hover,
.a360-notif-body::-webkit-scrollbar-thumb:hover,
.a360-rail::-webkit-scrollbar-thumb:hover,
.a360-admin-nav::-webkit-scrollbar-thumb:hover,
.a360-admin-main::-webkit-scrollbar-thumb:hover {
  background: #355468;
}

.a360-stage-empty {
  flex: 1;
  display: grid;
  place-items: center;
  color: #7d94a1;
  font-size: 0.94rem;
}

.a360-calling-stage {
  flex: 1;
  display: grid;
  place-items: center;
}

.a360-calling-card {
  position: relative;
  width: min(460px, 100%);
  background: #111b22;
  border: 1px solid #20323e;
  border-radius: 16px;
  padding: 36px 28px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.a360-icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #2b3f4c;
  background: #15232c;
  color: #b7cad4;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.a360-mute-btn {
  position: absolute;
  top: 14px;
  right: 14px;
}

.a360-calling-badge-circle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #14323a;
  color: #41c1d3;
  display: grid;
  place-items: center;
}

.a360-calling-badge-circle.small {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.a360-calling-kicker {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #41c1d3;
  margin-top: 6px;
}

.a360-calling-names {
  margin: 0;
  font-size: 1.25rem;
  color: #ffffff;
}

.a360-calling-meta {
  margin: 0;
  font-size: 0.9rem;
  color: #8ea4b0;
}

.a360-outside-label {
  margin: 2px 0 6px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #41c1d3;
}

.a360-calling-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.a360-chat-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.a360-msg {
  padding: 10px 14px;
  border-radius: 12px;
  background: #131f27;
  border: 1px solid #20323e;
  max-width: 78%;
  overflow-wrap: anywhere;
}

.a360-msg-role-teacher {
  align-self: flex-end;
  background: #17363e;
  border-color: #24505b;
}

.a360-msg-call_event {
  align-self: center;
  max-width: 100%;
  background: #101b22;
  color: #8ea4b0;
  font-size: 0.84rem;
  text-align: center;
}

.a360-msg-call_event p {
  margin: 0;
}

.a360-msg-call_event .a360-msg-meta {
  margin-top: 3px;
}

.a360-msg-meta {
  display: block;
  font-size: 0.72rem;
  color: #7d94a1;
}

.a360-msg p {
  margin: 4px 0 0;
  color: #e6eff4;
}

.a360-composer {
  flex: 0 0 auto;
  padding: 12px 20px;
  border-top: 1px solid #1b2a34;
  display: flex;
  align-items: center;
  gap: 10px;
}

.a360-composer input {
  flex: 1;
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid #243744;
  background: #111b22;
  color: #ffffff;
  padding: 8px 16px;
}

.a360-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #243744;
  background: #15232c;
  color: #8ea4b0;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.a360-send-btn:hover {
  background: #17363e;
  color: #41c1d3;
}

.a360-inspector {
  background: #0d151b;
  border-left: 1px solid #1b2a34;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.a360-inspector-heading {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #7d94a1;
  margin-bottom: 8px;
}

.a360-next-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #11232b;
  border: 1px solid #1e3d48;
}

.a360-next-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #41c1d3;
  color: #082026;
  display: grid;
  place-items: center;
  flex: none;
}

.a360-next-time {
  font-weight: 700;
  font-size: 0.92rem;
  color: #41c1d3;
}

.a360-next-meta {
  font-size: 0.78rem;
  color: #8ea4b0;
}

.a360-guidance-card {
  border-radius: 12px;
  background: #111b22;
  border: 1px solid #1e2e38;
  overflow: hidden;
}

.a360-guidance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #1b2a34;
  font-size: 0.84rem;
}

.a360-guidance-row span {
  color: #8ea4b0;
}

.a360-guidance-row strong {
  color: #e6eff4;
}

.a360-guidance-foot {
  padding: 10px 12px;
  font-size: 0.8rem;
  color: #6b8290;
}

.a360-last-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 12px;
  border-radius: 12px;
  border: 1px dashed #243744;
  color: #7d94a1;
  font-size: 0.82rem;
}

.a360-empty-side {
  color: #7d94a1;
  font-size: 0.84rem;
}

dialog.a360-dialog[open] {
  background: #131f27;
  color: #e6eff4;
  border: 1px solid #263946;
  border-radius: 16px;
  padding: 24px;
  max-width: min(440px, calc(100vw - 32px));
}

.a360-dialog-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.a360-dialog-head h1 {
  margin: 0;
  font-size: 1.15rem;
  color: #ffffff;
}

.a360-dialog-body {
  margin: 0 0 20px;
  font-size: 0.92rem;
  color: #9cb2be;
}

.a360-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.a360-center-settings {
  overflow-y: auto;
  padding: 24px;
}

.a360-settings-page {
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.a360-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.a360-settings-header h1 {
  margin: 0;
  font-size: 1.3rem;
  color: #ffffff;
}

.a360-settings-grid {
  display: grid;
  gap: 16px;
}

.a360-settings-card {
  background: #111b22;
  border: 1px solid #20323e;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.a360-settings-card h2 {
  margin: 0;
  font-size: 1.05rem;
  color: #ffffff;
}

.a360-settings-desc {
  margin: 0;
  font-size: 0.9rem;
  color: #8ea4b0;
}

.a360-settings-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #0d151b;
  border: 1px solid #1b2a34;
  font-size: 0.9rem;
}

.text-cyan {
  color: #41c1d3;
}

.text-warn {
  color: #fbbf24;
}

.a360-settings-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* --- Academy360 Family Portal Dark Theme Extensions --- */
.a360-child-filters,
.a360-conv-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.a360-conv-bar {
  padding: 10px 20px;
  border-bottom: 1px solid #1b2a34;
  background: #0f1920;
}

.a360-filter-pill {
  min-height: 30px;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid #243744;
  background: #0c141a;
  color: #b7cad4;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.a360-filter-pill:hover {
  background: #14222c;
  color: #e6eff4;
}

.a360-filter-pill.active {
  background: #17363e;
  border-color: #41c1d3;
  color: #41c1d3;
}

.a360-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #132029;
  border: 1px solid #243845;
  color: #8ea4b0;
  font-size: 0.78rem;
  font-weight: 700;
}

.a360-status-badge.status-completed {
  color: #4ade80;
  border-color: #166534;
  background: #0d2619;
}

.a360-status-badge.status-ringing {
  color: #41c1d3;
  border-color: #25515e;
  background: #142b33;
}

.family-portal .a360-msg-role-teacher {
  align-self: flex-start;
  background: #131f27;
  border-color: #20323e;
}

.family-portal .a360-msg-role-family {
  align-self: flex-end;
  background: #17363e;
  border-color: #24505b;
}

.a360-incoming-dialog-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.a360-privacy-tip {
  margin: 4px 0 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #0d151b;
  border: 1px solid #1f323d;
  color: #8ea4b0;
  font-size: 0.82rem;
  line-height: 1.45;
}

.a360-qr-frame {
  align-self: flex-start;
  padding: 12px;
  border-radius: 12px;
  background: #ffffff;
}

.a360-mfa-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.a360-mfa-form input {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #243744;
  background: #0c141a;
  color: #ffffff;
  font: inherit;
  width: 210px;
}

.a360-recovery-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

.a360-shell button[type="submit"].a360-btn-call {
  background: #41c1d3;
  color: #082026;
}

.a360-shell button[type="submit"].a360-send-btn {
  background: #15232c;
  color: #8ea4b0;
  border-color: #243744;
  min-height: 40px;
  padding: 0;
  border-radius: 50%;
}

.a360-recovery-grid li {
  padding: 8px 10px;
  border-radius: 8px;
  background: #0d151b;
  border: 1px solid #20323e;
  text-align: center;
}

/* --- Academy360 Admin Operations Console Dark Theme --- */
.a360-admin-workspace {
  flex: 1 1 0;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.a360-admin-nav {
  background: #0f1920;
  border-right: 1px solid #1b2a34;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.a360-admin-nav-btn {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: #b7cad4;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
}

.a360-admin-nav-btn:hover {
  background: #14222c;
  color: #ffffff;
}

.a360-admin-nav-btn.active {
  background: #17363e;
  border-color: #25515e;
  color: #41c1d3;
}

.a360-admin-nav-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.a360-nav-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: #132029;
  border: 1px solid #243845;
  color: #8ea4b0;
}

.a360-nav-badge.alert {
  background: #422006;
  border-color: #b45309;
  color: #fbbf24;
}

.a360-admin-main {
  min-width: 0;
  min-height: 0;
  padding: 20px 24px 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.a360-admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.a360-admin-title {
  margin: 0 0 2px;
  font-size: 1.32rem;
  color: #ffffff;
}

.a360-notice-bar {
  padding: 10px 14px;
  border-radius: 10px;
  background: #0d2619;
  border: 1px solid #166534;
  color: #86efac;
  font-size: 0.88rem;
}

.a360-admin-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.a360-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.a360-kpi-card {
  background: #111b22;
  border: 1px solid #20323e;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.a360-kpi-card span {
  font-size: 0.78rem;
  color: #8ea4b0;
}

.a360-kpi-card strong {
  font-size: 1.55rem;
  color: #ffffff;
}

.a360-admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.a360-admin-search-box {
  width: min(300px, 100%);
}

.a360-table-wrap {
  background: #111b22;
  border: 1px solid #20323e;
  border-radius: 12px;
  overflow-x: auto;
}

.a360-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.a360-table th {
  text-align: left;
  padding: 11px 14px;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7d94a1;
  background: #0f1920;
  border-bottom: 1px solid #1b2a34;
}

.a360-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #1b2a34;
  color: #e6eff4;
  vertical-align: top;
}

.a360-table tr:last-child td {
  border-bottom: none;
}

.a360-table-sub {
  margin-top: 2px;
  font-size: 0.78rem;
  color: #8ea4b0;
}

.a360-table-select {
  margin-top: 6px;
  min-height: 30px;
  padding: 3px 8px;
  border-radius: 8px;
  border: 1px solid #243744;
  background: #0c141a;
  color: #dce8ee;
  font: inherit;
  font-size: 0.78rem;
}

.a360-table-actions,
.a360-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.a360-btn-mini,
.small-btn {
  min-height: 32px;
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 0.78rem;
}

.a360-btn-mini {
  border: 1px solid #2b3f4c;
  background: #131f27;
  color: #dce8ee;
  font-weight: 600;
  cursor: pointer;
}

.a360-btn-mini:hover {
  background: #17363e;
  border-color: #41c1d3;
  color: #41c1d3;
}

.a360-status-badge.status-warn {
  background: #422006;
  border-color: #b45309;
  color: #fbbf24;
}

.a360-pin-banner {
  padding: 14px 18px;
  border-radius: 12px;
  background: #11232b;
  border: 1px solid #25515e;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.a360-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.a360-admin-card {
  background: #111b22;
  border: 1px solid #20323e;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.a360-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.a360-card-top h3 {
  margin: 0;
  font-size: 1rem;
  color: #ffffff;
}

.a360-card-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.84rem;
}

.a360-card-meta div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.a360-card-meta span {
  color: #8ea4b0;
}

.a360-admin-only-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 6px;
  background: #31173b;
  border: 1px solid #7e22ce;
  color: #e9d5ff;
  font-size: 0.72rem;
  font-weight: 700;
  margin-inline-end: 4px;
}

dialog.a360-dialog.a360-admin-dialog[open] {
  max-width: min(560px, calc(100vw - 32px));
  width: 100%;
}

.a360-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.a360-modal-head h1 {
  margin: 0;
  font-size: 1.15rem;
  color: #ffffff;
}

.a360-modal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.a360-modal-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.a360-modal-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 10px;
}

.a360-form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.a360-form-field label,
.a360-weekdays-box legend {
  font-size: 0.82rem;
  font-weight: 600;
  color: #b7cad4;
}

.a360-form-field input,
.a360-form-field select {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #243744;
  background: #0c141a;
  color: #ffffff;
  font: inherit;
  font-size: 0.9rem;
}

.a360-weekdays-box {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  border: 1px solid #243744;
  border-radius: 10px;
  padding: 10px 12px;
}

.a360-weekdays-box .day-chk {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  color: #dce8ee;
  font-size: 0.84rem;
}

.a360-weekdays-box input {
  min-height: auto;
  accent-color: #41c1d3;
}

@media (max-width: 860px) {
  .a360-admin-workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
  }
  .a360-admin-nav {
    flex-direction: row;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid #1b2a34;
    padding: 10px;
  }
  .a360-admin-nav-btn {
    width: auto;
    flex: 1 1 auto;
    min-height: 36px;
    padding: 6px 10px;
  }
  .a360-admin-main {
    padding: 16px 14px 24px;
  }
}

.desktop-server-config {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
}

.desktop-server-config summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 600;
}

.desktop-server-config .compact-form {
  margin-top: 10px;
}

.a360-server-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.a360-server-form input {
  flex: 1 1 220px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #243744;
  background: #0c141a;
  color: #ffffff;
  font: inherit;
  font-size: 0.9rem;
}

.a360-shell button[type="submit"].a360-btn-cancel {
  background: #131f27;
  color: #e6eff4;
  border-color: #2b3f4c;
  min-height: 40px;
  padding: 8px 16px;
}

@keyframes a360-ring-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(65, 193, 211, 0.55), 0 0 0 0 rgba(65, 193, 211, 0.3);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(65, 193, 211, 0), 0 0 0 26px rgba(65, 193, 211, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(65, 193, 211, 0), 0 0 0 0 rgba(65, 193, 211, 0);
  }
}

.a360-incoming-dialog[open] {
  position: relative;
  overflow: hidden;
  background: #252429;
  border: 1px solid #3e3d45;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.65);
}

.a360-incoming-dialog .a360-incoming-dialog-body {
  position: relative;
  z-index: 1;
}

.a360-incoming-backdrop-initials {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 11rem;
  font-weight: 800;
  color: #286f79;
  opacity: 0.35;
  filter: blur(28px);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.a360-incoming-subline {
  margin: 0;
  font-size: 0.98rem;
  color: #e2e5ec;
}

.a360-btn-teams-accept {
  background: #5b5fc7;
  color: #ffffff;
  border-color: #6d71d8;
}

.a360-btn-teams-accept:hover {
  background: #6d71d8;
}

.a360-btn-teams-decline {
  background: #c4314b;
  color: #ffffff;
  border-color: #d63e59;
}

.a360-btn-teams-decline:hover {
  background: #d63e59;
}

.a360-incoming-avatar-ring {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(65, 193, 211, 0.12);
  border: 2px solid rgba(65, 193, 211, 0.45);
  margin: 4px 0 6px;
  animation: a360-ring-pulse 1.8s ease-out infinite;
}

.a360-incoming-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #1b6f7c, #41c1d3);
  color: #081217;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

.a360-calling-ringing-pulse {
  animation: a360-ring-pulse 1.8s ease-out infinite;
}

.a360-calling-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.a360-call-timer-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(65, 193, 211, 0.16);
  border: 1px solid rgba(65, 193, 211, 0.32);
  color: #8ce7f3;
  font-size: 0.74rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.a360-btn-accept-pulse {
  animation: a360-ring-pulse 2.2s ease-out infinite;
}

.a360-kbd-hint {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-family: ui-monospace, monospace;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.18);
  opacity: 0.85;
}

.a360-alerts-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
}

.a360-alerts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.a360-alerts-head h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #ffffff;
}

.a360-alerts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.a360-alert-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #111b22;
  border: 1px solid #20323e;
}

.a360-alert-item strong {
  color: #e6eff4;
  font-size: 0.94rem;
}

.a360-alert-meta {
  font-size: 0.82rem;
  color: #8ea4b0;
  margin-top: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .a360-incoming-avatar-ring,
  .a360-calling-ringing-pulse,
  .a360-btn-accept-pulse {
    animation: none;
  }
}

.a360-update-banner {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 950;
  width: min(560px, calc(100vw - 32px));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #131f27;
  color: #e6eff4;
  border: 1px solid #2d5866;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.48);
}

.a360-update-banner-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  min-width: 0;
  flex: 1 1 260px;
}

.a360-update-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(65, 193, 211, 0.16);
  border: 1px solid rgba(65, 193, 211, 0.4);
  color: #8ce7f3;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.a360-update-banner-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.a360-update-banner-text strong {
  font-size: 0.94rem;
  color: #ffffff;
}

.a360-update-banner-text span {
  font-size: 0.82rem;
  color: #9cb2be;
  overflow-wrap: anywhere;
}

.a360-update-banner-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.a360-update-dismiss-btn {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid #263946;
  background: transparent;
  color: #9cb2be;
  cursor: pointer;
}

.a360-update-dismiss-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #e6eff4;
}

.a360-update-admin-hint {
  font-size: 0.82rem;
  color: #8ce7f3;
}

dialog.a360-update-dialog[open] {
  border-color: #2d5866;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
}

.a360-update-versions {
  margin-bottom: 12px;
}

.a360-update-notes {
  margin: 0 0 18px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #0d161d;
  border: 1px solid #20323e;
  color: #c3d4de;
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.a360-update-dialog .btn.secondary {
  background: #1b2c37;
  color: #e6eff4;
  border-color: #2c4352;
}

.a360-update-dialog .btn.secondary:hover {
  background: #233846;
}
