@font-face {
  font-family: "AcolitosInter";
  src: url("/assets/fonts/Inter-Regular.ttf") format("truetype");
  font-weight: 100 449;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "AcolitosInter";
  src: url("/assets/fonts/Inter-Medium.ttf") format("truetype");
  font-weight: 450 649;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "AcolitosInter";
  src: url("/assets/fonts/Inter-SemiBold.ttf") format("truetype");
  font-weight: 650 1000;
  font-style: normal;
  font-display: swap;
}


:root {
  color-scheme: dark;

  --bg: #05060c;
  --bg-soft: #0d0f1a;
  --surface: rgba(18, 18, 28, .72);
  --surface-strong: rgba(18, 18, 28, .88);
  --surface-soft: rgba(255, 255, 255, .055);

  --text: #ffffff;
  --text-soft: #e7e2ee;
  --muted: #a9a2b8;
  --muted-2: #746c82;

  --border: rgba(255, 255, 255, .13);
  --border-strong: rgba(255, 255, 255, .22);

  --accent: #a855f7;
  --accent-2: #ec4899;
  --accent-3: #60a5fa;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;

  --shadow: 0 20px 80px rgba(0, 0, 0, .36);

  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;

  --header-h: 74px;

  --layout-max: 1390px;
  --layout-gutter: 19px;
  --layout-pad: max(var(--layout-gutter), calc((100vw - var(--layout-max)) / 2 + var(--layout-gutter)));

  --home-hero-bg-height: 835px;
  --home-hero-fade-height: 250px;
  --home-hero-image: url("/assets/brand/home-hero.webp");
  --home-hero-fallback-image: url("/assets/brand/home-hero.svg");
}

html[data-theme="light"] {
  color-scheme: light;

  --bg: #ebe8fc;
  --bg-soft: #fffaf7;
  --surface: rgba(255, 255, 255, .72);
  --surface-strong: rgba(255, 255, 255, .90);
  --surface-soft: rgba(20, 20, 32, .055);

  --text: #343360;
  --text-soft: #79749e;
  --muted: #79749e;
  --muted-2: #79749e;

  --border: rgba(34, 29, 47, .13);
  --border-strong: rgba(34, 29, 47, .22);

  --shadow: 0 22px 70px rgba(53, 39, 77, .15);
}


/* ==========================================================================
   2. Base
   ========================================================================== */

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 16% 12%, rgba(168, 85, 247, .23), transparent 28%),
    radial-gradient(circle at 90% 6%, rgba(96, 165, 250, .15), transparent 30%),
    var(--bg);
  font-family: "AcolitosInter", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}


button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  border: 0 !important;
  clip: rect(0 0 0 0) !important;
}

[hidden] {
  display: none !important;
}

.layout-container {
  width: min(100%, var(--layout-max));
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--layout-gutter);
  padding-right: var(--layout-gutter);
}


/* ==========================================================================
   3. Header
   ========================================================================== */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto minmax(140px, 1fr);
  align-items: center;
  gap: 18px;
  padding: 0 var(--layout-pad);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(9, 9, 14, .70), rgba(9, 9, 14, .34));
  backdrop-filter: blur(18px) saturate(1.2);
}

html[data-theme="light"] .site-header {
  background: linear-gradient(180deg, rgb(243 213 255 / 65%), rgb(226 250 255 / 35%));
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  text-decoration: none;
}

.brand-logo {
  width: auto;
  height: clamp(28px, 2.15vw, 38px);
  max-width: min(220px, 34vw);
  display: block;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-logo--light {
  display: none;
}

html[data-theme="light"] .brand-logo--dark {
  display: none;
}

html[data-theme="light"] .brand-logo--light {
  display: block;
}


.brand-mark {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  font-size: clamp(21px, 1.65vw, 29px);
  font-weight: 950;
  letter-spacing: -.055em;
  text-shadow: 0 10px 34px rgba(0, 0, 0, .28);
  transform: rotate(-3deg);
}

.main-nav {
  justify-self: center;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 34px;
}

.main-nav__link {
  position: relative;
  height: 100%;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 15px;
  font-weight: 850;
  text-decoration: none;
  transition: color .18s ease;
}

.main-nav__link:hover,
.main-nav__link--active {
  color: var(--text);
}

.main-nav__link--active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 52px;
  height: 4px;
  border-radius: 999px 999px 0 0;
  background: #4e8dff;
  transform: translateX(-50%);
}

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 20px;
}

.mobile-menu-button {
  width: 44px;
  height: 44px;
  display: none;
  place-items: center;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.theme-toggle {
  width: 78px;
  height: 40px;
  display: inline-grid;
  grid-template-columns: 1fr 30px 1fr;
  align-items: center;
  gap: 2px;
  padding: 4px;
  color: var(--text-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(63, 63, 99, .42), rgba(20, 20, 34, .42));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 12px 34px rgba(0, 0, 0, .20);
}

html[data-theme="light"] .theme-toggle {
  background: linear-gradient(180deg, rgba(255, 255, 255, .40), rgba(232, 228, 245, .40));
}

.theme-toggle__icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  font-size: 17px;
  opacity: .88;
  pointer-events: none;
}

.theme-toggle__knob {
  position: relative;
  z-index: 2;
  width: 30px;
  height: 30px;
  display: block;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff, #c9c4ff);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .28);
  transform: translateX(20px);
  transition: transform .22s ease;
  pointer-events: none;
}

html[data-theme="light"] .theme-toggle__knob {
  transform: translateX(-20px);
}

.profile-button {
  position: relative;
  width: 46px;
  height: 46px;
  padding: 0;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .68);
  border-radius: 50%;
  background: rgba(255, 255, 255, .09);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .24);
}

.profile-button__avatar {
  width: 100%;
  height: 100%;
  display: block;
}

.profile-button__initials {
  position: absolute;
  inset: auto 0 4px;
  display: none;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}


/* ==========================================================================
   4. Home / imagem de fundo inicial
   ========================================================================== */

.home-page {
  position: relative;
  min-height: 100vh;
  overflow: clip;
  isolation: isolate;
}

.home-page::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: var(--home-hero-bg-height);
  z-index: -3;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(0, 0, 0, .60) 0%, rgba(0, 0, 0, .30) 42%, rgba(0, 0, 0, .10) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, .10) 0%, rgba(0, 0, 0, .10) 55%, rgba(0, 0, 0, .30) 100%),
    var(--home-hero-image),
    var(--home-hero-fallback-image);
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
}

.home-page::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--home-hero-bg-height) - var(--home-hero-fade-height));
  height: var(--home-hero-fade-height);
  z-index: -2;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    transparent 0%,
    color-mix(in srgb, var(--bg) 78%, transparent) 62%,
    var(--bg) 100%
  );
}

html[data-theme="light"] .home-page::before {
  background-image:
    linear-gradient(90deg, rgba(190, 190, 190, 0.6) 0%, rgba(190, 190, 190, .30) 42%, rgba(190, 190, 190, .10) 100%),
    linear-gradient(180deg, rgba(190, 190, 190, .0) 0%, rgba(190, 190, 190, .0) 55%, rgba(190, 190, 190, .0) 100%),
    var(--home-hero-image),
    var(--home-hero-fallback-image);
}


/* ==========================================================================
   5. Hero / criação de sala
   ========================================================================== */

.hero-section {
  position: relative;
  min-height: 760px;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 68px) var(--layout-pad) 150px;
  overflow: hidden;
  isolation: isolate;
  background: transparent;
}

.hero-section__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 72% 40%, rgba(168, 85, 247, .28), transparent 28%),
    radial-gradient(circle at 25% 70%, rgba(16, 185, 129, .14), transparent 34%);
}

.hero-content {
  position: relative;
  width: min(590px, 100%);
  margin-top: -40px;
}

.hero-kicker {
  margin: 0 0 10px 8px;
  color: rgba(255, 255, 255, .60);
  font-size: 8.5px;
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: .20em;
  text-transform: uppercase;
}

html[data-theme="light"] .hero-kicker {
  color: var(--muted);
}

.hero-content h1 {
  max-width: 590px;
  margin: 0;
  margin-left: 8px;
  color: #fff;
  font-size: clamp(36.5px, 4.25vw, 61px);
  line-height: .98;
  font-weight: 1000;
  letter-spacing: -.055em;
  text-shadow: 0 16px 55px rgba(0, 0, 0, .42);
}

html[data-theme="light"] .hero-content h1 {
  color: var(--text);
  text-shadow: 0 14px 38px rgba(255, 255, 255, .20);
}

.hero-subtitle {
  max-width: 580px;
  margin: 9px 0px 16px 8px;
  color: rgba(255, 255, 255, .93);
  font-size: clamp(16.2px, 1.49vw, 23.8px);
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: -.03em;
  text-shadow: 0 12px 40px rgba(0, 0, 0, .36);
}

html[data-theme="light"] .hero-subtitle {
  color: var(--text);
  text-shadow: none;
}

.hero-hint {
  width: min(590px, 100%);
  margin: 8px auto 0;
  color: rgba(255, 255, 255, .78);
  font-size: clamp(12px, .92vw, 14.5px);
  line-height: 1.35;
  font-weight: 620;
  text-align: center;
}

html[data-theme="light"] .hero-hint {
  color: var(--muted);
}

.create-room-card {
  width: min(590px, 100%);
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(17, 14, 18, .70);
  box-shadow: 0 18px 58px rgba(0, 0, 0, .28);
  backdrop-filter: blur(22px) saturate(1.15);
}
html[data-theme="light"] .create-room-card {
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 18px 48px rgba(58, 38, 78, .16);
}

.create-room-input {
  min-width: 0;
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 19px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .36);
}

html[data-theme="light"] .create-room-input {
  background: rgba(23, 17, 33, .07);
}

.create-room-input input {
  width: 100%;
  min-width: 0;
  color: #fff;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 16px;
  font-weight: 780;
}

html[data-theme="light"] .create-room-input input {
  color: var(--text);
}

.create-room-input input::placeholder {
  color: rgba(255, 255, 255, .66);
}

html[data-theme="light"] .create-room-input input::placeholder {
  color: rgba(44, 38, 56, .58);
}

#createBtn {
  min-height: 48px;
  padding: 0 24px;
  color: #fff;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #4e8dff, #862aff);
  font-size: 14px;
  font-weight: 950;
  transition: transform .16s ease, filter .16s ease, opacity .16s ease;
}

#createBtn:hover {
  filter: brightness(1.05);
  box-shadow: 0 14px 34px rgba(168, 85, 247, .36), inset 0 1px 0 rgba(255, 255, 255, .22);

}

#createBtn:disabled {
  cursor: wait;
  opacity: .70;
  transform: none;
}

.create-output {
  max-width: 590px;
  min-height: 0;
  margin: 14px 0 0;
  padding: 0;
  color: rgba(255, 255, 255, .86);
  background: transparent;
  border-radius: 0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
}

.create-output:empty,
.hero-bandwidth {
  display: none !important;
}


.create-room-success {
  display: grid;
  gap: 8px;
}

.create-room-success p {
  margin: 0;
}

.create-room-success a {
  color: #c7e0ff;
  font-weight: 850;
}

.create-room-success__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.create-room-success__actions button {
  min-height: 34px;
  padding: 0 14px;
  color: #fff;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #4e81ff, #bf2aff);
  font-weight: 850;
}


/* ==========================================================================
   6. Banda mensal no antigo espaço do painel Operação
   ========================================================================== */

.operation-panel.bandwidth-dock {
  position: relative;
  z-index: 2;
  width: min(760px, calc(100vw - (var(--layout-gutter) * 2)));
  margin: -78px auto 34px;
  padding: 0;
  border: 0;
  border-radius: 30px;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.operation-panel.bandwidth-dock[data-state="blocked"],
.operation-panel.bandwidth-dock[data-state="admin"] {
  border-color: transparent;
  background: transparent;
}

.operation-bandwidth--dock {
  width: 100%;
}

.bandwidth-card {
  padding: 14px 42px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 24px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .025)),
    rgba(11, 11, 18, .62);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(20px) saturate(1.2);
}

html[data-theme="light"] .bandwidth-card {
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 20px 60px rgba(43, 31, 59, .15);
}

.operation-panel.bandwidth-dock .bandwidth-card {
  position: relative;
  overflow: hidden;
  border-color: var(--border);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0));
  box-shadow: 0 18px 60px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, 0);
  backdrop-filter: blur(10px) saturate(1.25);
}

.operation-panel.bandwidth-dock .bandwidth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .72;
  background:
    radial-gradient(ellipse at 26% 52%, rgba(34, 197, 94, .26), transparent 28%),
    radial-gradient(ellipse at 54% 52%, rgba(234, 179, 8, .24), transparent 25%),
    radial-gradient(ellipse at 78% 52%, rgba(191, 42, 255, .20), transparent 28%),
    linear-gradient(90deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015));
}

.operation-panel.bandwidth-dock .bandwidth-card::after {
  content: "";
  position: absolute;
  left: 7%;
  right: 7%;
  top: 43%;
  height: 30px;
  pointer-events: none;
  opacity: .45;
  filter: blur(16px);
  background: linear-gradient(90deg, #22c55e 0%, #84cc16 32%, #eab308 58%, #f97316 78%, #ec4899 100%);
  transform: translateY(-50%);
}

.operation-panel.bandwidth-dock .bandwidth-card > * {
  position: relative;
  z-index: 1;
}

html[data-theme="light"] .operation-panel.bandwidth-dock .bandwidth-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, .34));
  box-shadow: 0 20px 60px rgba(53, 39, 77, .13), inset 0 1px 0 rgba(255, 255, 255, .70);
}

.bandwidth-card__label {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.bandwidth-card__track {
  position: relative;
  height: 8px;
  margin-top: 12px;
  margin-bottom: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .15);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .35);
}

.bandwidth-card__track::before {
  content: "";
  position: absolute;
  inset: -9px -4px;
  opacity: .42;
  filter: blur(10px);
  background: linear-gradient(90deg, #22c55e 0%, #84cc16 32%, #eab308 58%, #f97316 78%, #ec4899 100%);
}

.bandwidth-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 8px;
  color: rgba(231, 226, 238, .84);
  font-size: 13px;
  line-height: 1.35;
}

.bandwidth-card__usage {
  min-width: 0;
  font-weight: 620;
}

.bandwidth-card__reset {
  color: rgba(231, 226, 238, .84);
  font-weight: 850;
  text-align: right;
}

html[data-theme="light"] .bandwidth-card__track {
  background: rgba(28, 23, 39, .13);
}

html[data-theme="light"] .bandwidth-card__meta,
html[data-theme="light"] .bandwidth-card__reset {
  color: rgba(121, 116, 158, .78);
}

.bandwidth-card__bar {
  position: relative;
  z-index: 1;
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
  transition: width .35s ease, background .35s ease, box-shadow .35s ease;
}

.bandwidth-card__bar--green {
  background: #22c55e;
  box-shadow: 0 0 13px rgba(34, 197, 94, .35);
}

.bandwidth-card__bar--lime {
  background: #84cc16;
  box-shadow: 0 0 13px rgba(132, 204, 22, .35);
}

.bandwidth-card__bar--yellow {
  background: #eab308;
  box-shadow: 0 0 13px rgba(234, 179, 8, .35);
}

.bandwidth-card__bar--orange {
  background: #f97316;
  box-shadow: 0 0 13px rgba(249, 115, 22, .35);
}

.bandwidth-card__bar--red {
  background: #ef4444;
  box-shadow: 0 0 13px rgba(239, 68, 68, .35);
}

.operation-bandwidth--error,
.operation-panel.bandwidth-dock .operation-bandwidth--error {
  padding: 14px 18px;
  color: #fff2c7;
  border: 1px solid rgba(245, 158, 11, .35);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(9, 9, 14, .70), rgba(9, 9, 14, .34));
  box-shadow: 0 18px 60px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(18px) saturate(1.2);
}


/* ==========================================================================
   7. Seções da home
   ========================================================================== */

.home-section {
  position: relative;
  z-index: 1;
  width: min(100%, var(--layout-max));
  margin: 0 auto;
  padding: 40px var(--layout-gutter);
}

.section-heading {
  max-width: 620px;
  margin-bottom: 20px;
}

.section-kicker {
  margin: 0 0 8px;
  color: var(--accent-2);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(26px, 2.4vw, 40px);
  line-height: 1;
  font-weight: 1000;
  letter-spacing: -.055em;
}

.section-heading p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}


/* ==========================================================================
   8. Salas ativas / salas fechadas
   ========================================================================== */

.operation-panel__rooms {
  min-height: 108px;
}

.bandwidth-card--loading .bandwidth-card__track--loading::after,
.operation-room-item.operation-room-item--loading::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,.10) 38%, transparent 72%);
  transform: translateX(-100%);
  animation: homeLoadingSweep 1.35s ease-in-out infinite;
}

.bandwidth-card--loading .bandwidth-card__track--loading {
  overflow: hidden;
}

.bandwidth-card__loading-line {
  opacity: .72;
}

.bandwidth-card__loading-line--short {
  opacity: .58;
}

.operation-room-list--loading,
.closed-room-list--loading {
  min-height: 300px;
}

.closed-room-list--loading {
  min-height: 220px;
}

.operation-room-item.operation-room-item--loading {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  cursor: default;
  pointer-events: none;
  background: rgba(11, 20, 33, .80);
}

.operation-room-item.operation-room-item--loading::before {
  z-index: 0;
  opacity: .52;
}

.operation-room-item.operation-room-item--loading::after {
  z-index: 0;
  background-image:
    radial-gradient(circle at 50% 45%, rgba(255,255,255,.055), transparent 28%),
    linear-gradient(135deg, rgba(7, 8, 16, .14), rgba(7, 8, 16, .44));
}

.operation-room-item.operation-room-item--loading:hover,
.operation-room-item.operation-room-item--loading:focus-visible {
  border-color: var(--border);
  box-shadow: var(--shadow);
  filter: none;
  transform: none;
}

.closed-room-list .operation-room-item.operation-room-item--loading {
  min-height: 220px;
}

.home-loading-spinner {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  border: 7px solid rgba(255,255,255,.24);
  border-top-color: rgba(255,255,255,.88);
  border-radius: 999px;
  animation: homeLoadingSpin .86s linear infinite;
}

.home-loading-text {
  position: relative;
  z-index: 1;
  color: rgba(255,255,255,.68);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

html[data-theme="light"] .operation-room-item.operation-room-item--loading {
  background: rgba(255,255,255,.70);
}

html[data-theme="light"] .home-loading-spinner {
  border-color: rgba(52, 51, 96, .18);
  border-top-color: rgba(52, 51, 96, .62);
}

html[data-theme="light"] .home-loading-text {
  color: rgba(52, 51, 96, .62);
}

@keyframes homeLoadingSpin {
  to { transform: rotate(360deg); }
}

@keyframes homeLoadingSweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.operation-room-empty,
.closed-room-placeholder {
  min-height: 112px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.operation-room-empty__icon,
.closed-room-placeholder__icon {
  width: 48px;
  height: 48px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  border-radius: 18px;
  background: linear-gradient(90deg, #4e8dff, #862aff);
}

.closed-room-placeholder strong,
.operation-room-empty strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 15px;
}

.closed-room-placeholder span,
.operation-room-empty span {
  display: block;
  line-height: 1.45;
}

.operation-room-list,
.closed-room-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.operation-room-item {
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .03)),
    radial-gradient(circle at 20% 0%, rgba(168, 85, 247, .30), transparent 35%),
    radial-gradient(circle at 100% 60%, rgba(96, 165, 250, .20), transparent 32%);
  box-shadow: var(--shadow);
  isolation: isolate;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, filter .18s ease;
}

.closed-room-item {
  min-height: 220px;
  cursor: default;
}

.closed-room-item::before {
  filter: saturate(.42) brightness(.56);
}

.closed-room-item::after {
  background-image:
    linear-gradient(135deg, rgba(7, 8, 16, .38), rgba(7, 8, 16, .82)),
    linear-gradient(180deg, rgba(0, 0, 0, .18), rgba(0, 0, 0, .56));
}

.closed-room-item:hover,
.closed-room-item:focus-visible {
  border-color: var(--border);
  box-shadow: var(--shadow);
  filter: none;
  transform: none;
}

.operation-room-item:hover,
.operation-room-item:focus-visible {
  border-color: rgba(255, 255, 255, .26);
  box-shadow: 0 24px 90px rgba(0, 0, 0, .42);
  filter: brightness(1.04);
  transform: translateY(-2px);
}

.operation-room-item:focus-visible {
  outline-offset: 3px;
}

.operation-room-item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(135deg, rgba(7, 8, 16, .18), rgba(7, 8, 16, .84)),
    radial-gradient(circle at 20% 20%, rgba(191, 42, 255, .28), transparent 32%),
    radial-gradient(circle at 80% 25%, rgba(96, 165, 250, .22), transparent 34%);
}

.operation-room-item--artwork::before {
  background-image:
    var(--room-artwork);
  background-position: center;
  background-size: cover;
}

.operation-room-item::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(135deg, rgba(7, 8, 16, .10), rgba(7, 8, 16, .50));
}

.operation-room-info {
  position: relative;
  z-index: 1;
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 6px;
}

.operation-room-title {
  max-width: 88%;
  color: #fff;
  font-size: 24px;
  line-height: 1.08;
  font-weight: 1000;
  letter-spacing: -.04em;
  text-shadow: 0 5px 20px rgba(0, 0, 0, .66);
  word-break: break-word;
}

.operation-room-meta {
  color: rgba(255, 255, 255, .78);
  font-size: 14px;
  line-height: 1.35;
  font-weight: 650;
}

.operation-room-id {
  color: rgba(255, 255, 255, .65);
  font-size: 11px;
}

.operation-room-link {
  position: absolute;
  z-index: 2;
  right: 15px;
  bottom: 15px;
  flex: 0 0 auto;
  padding: 8px 13px;
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(78, 129, 255, .88), rgba(191, 42, 255, .88));
  box-shadow: 0 12px 28px rgba(168, 85, 247, .28);
  font-size: 12px;
  font-weight: 950;
}

.operation-room-link:hover,
.operation-room-link:focus-visible {
  outline: none;
  filter: brightness(1.05);
}


/* ==========================================================================
   9. Overlays
   ========================================================================== */

.access-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(16px);
}

.access-overlay[data-visible="true"] {
  display: flex;
}

.access-card {
  width: min(470px, calc(100vw - 32px));
  padding: 28px;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--surface-strong);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .48);
  backdrop-filter: blur(22px) saturate(1.2);
}

.access-card h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 24px;
  letter-spacing: -.04em;
}

.access-card p {
  color: var(--muted);
  line-height: 1.45;
}

.access-card label {
  display: block;
  margin: 14px 0 7px;
  color: var(--text-soft);
  font-weight: 850;
}

.access-card input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-soft);
  outline: none;
}

.access-card button,
.source-actions button {
  min-height: 46px;
  margin-top: 14px;
  padding: 0 18px;
  color: #fff;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #4e81ff, #bf2aff);
  font-weight: 950;
}

.access-error {
  min-height: 18px;
  margin-top: 10px;
  color: #ffcf70;
  white-space: pre-wrap;
}

.source-overlay {
  background:
    radial-gradient(circle at 50% 38%, rgba(78, 129, 255, .14), transparent 32%),
    radial-gradient(circle at 72% 62%, rgba(191, 42, 255, .10), transparent 34%),
    rgba(2, 2, 8, .78);
  backdrop-filter: blur(18px) saturate(1.08);
}

.source-card {
  width: min(760px, calc(100vw - 32px));
  padding: 30px 34px 28px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 32px;
  background: rgba(12, 11, 20, .94);
  box-shadow:
    0 28px 92px rgba(0, 0, 0, .52),
    inset 0 1px 0 rgba(255, 255, 255, .06);
}

.source-card__header {
  max-width: 640px;
}

.source-card .source-card__eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 1000;
  line-height: 1;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.source-card h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3vw, 34px);
  line-height: .96;
  font-weight: 1000;
  letter-spacing: -.055em;
}

.source-card p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 680;
  line-height: 1.45;
}

.source-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 18px 0 14px;
  padding: 7px 11px;
  color: color-mix(in srgb, var(--text) 72%, transparent);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 999px;
  background: rgba(255, 255, 255, .055);
  font-size: 12px;
  font-weight: 850;
}

.source-list {
  display: grid;
  gap: 12px;
  margin-top: 0;
}

.source-option {
  position: relative;
  width: 100%;
  min-height: 82px;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 15px;
  margin: 0;
  padding: 12px 15px 12px 12px;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 22px;
  background: rgba(255, 255, 255, .075);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .07),
    0 14px 34px rgba(0, 0, 0, .16);
  text-align: left;
  transition:
    transform .18s ease,
    border-color .18s ease,
    background .18s ease,
    box-shadow .18s ease,
    filter .18s ease;
}

.source-option:hover,
.source-option:focus-visible {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, .24);
  background: rgba(255, 255, 255, .105);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .10),
    0 18px 44px rgba(0, 0, 0, .22);
}

.source-option__icon {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  color: #dfe8ff;
  border: 1px solid rgba(96, 165, 250, .22);
  border-radius: 18px;
  background: rgba(96, 165, 250, .105);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  font-size: 14px;
  font-weight: 1000;
  line-height: .95;
  letter-spacing: -.04em;
  text-align: center;
}

.source-option--premium .source-option__icon {
  color: #ffe6a3;
  border-color: rgba(245, 158, 11, .26);
  background: rgba(245, 158, 11, .105);
  font-size: 16px;
  letter-spacing: -.02em;
}

.source-option__copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.source-option__title {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 17px;
  font-weight: 1000;
  line-height: 1.14;
  letter-spacing: -.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-option__description {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-option__badges,
.source-option__quality,
.source-option__admin {
  display: none !important;
}

.source-option__arrow {
  color: color-mix(in srgb, var(--text) 34%, transparent);
  font-size: 27px;
  font-weight: 650;
  line-height: 1;
  transition: transform .18s ease, color .18s ease;
}

.source-option:hover .source-option__arrow,
.source-option:focus-visible .source-option__arrow {
  color: color-mix(in srgb, var(--text) 66%, transparent);
  transform: translateX(2px);
}

.source-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.source-actions button {
  min-height: 42px;
  margin: 0;
  padding: 0 18px;
  color: var(--text-soft);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .055);
  box-shadow: none;
  font-weight: 900;
}

.source-actions button:hover,
.source-actions button:focus-visible {
  color: var(--text);
  outline: none;
  background: rgba(255, 255, 255, .09);
}

html[data-theme="light"] .source-overlay {
  background:
    radial-gradient(circle at 50% 38%, rgba(78, 129, 255, .12), transparent 32%),
    radial-gradient(circle at 72% 62%, rgba(191, 42, 255, .08), transparent 34%),
    rgba(235, 232, 252, .68);
}

html[data-theme="light"] .source-card {
  border-color: rgba(34, 29, 47, .10);
  background: rgba(255, 255, 255, .92);
  box-shadow:
    0 24px 72px rgba(58, 38, 78, .16),
    inset 0 1px 0 rgba(255, 255, 255, .78);
}

html[data-theme="light"] .source-status {
  color: #6d688e;
  border-color: rgba(34, 29, 47, .10);
  background: rgba(255, 255, 255, .60);
}

html[data-theme="light"] .source-option {
  border-color: rgba(34, 29, 47, .12);
  background: rgba(255, 255, 255, .76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .78),
    0 14px 30px rgba(53, 39, 77, .08);
}

html[data-theme="light"] .source-option:hover,
html[data-theme="light"] .source-option:focus-visible {
  border-color: rgba(78, 129, 255, .22);
  background: rgba(255, 255, 255, .92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .86),
    0 18px 42px rgba(53, 39, 77, .12);
}

html[data-theme="light"] .source-option__icon {
  color: #315fcf;
  border-color: rgba(37, 99, 235, .16);
  background: rgba(96, 165, 250, .12);
}

html[data-theme="light"] .source-option--premium .source-option__icon {
  color: #9a5a00;
  border-color: rgba(217, 119, 6, .20);
  background: rgba(245, 158, 11, .13);
}

html[data-theme="light"] .source-actions button {
  background: rgba(255, 255, 255, .58);
}

html[data-theme="light"] .source-actions button:hover,
html[data-theme="light"] .source-actions button:focus-visible {
  background: rgba(255, 255, 255, .86);
}

.source-card .source-option {
  min-height: 82px;
  margin: 0;
  padding: 12px 15px 12px 12px;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 22px;
  background: rgba(255, 255, 255, .075);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .07),
    0 14px 34px rgba(0, 0, 0, .16);
  text-align: left;
}

.source-card .source-option:hover,
.source-card .source-option:focus-visible {
  outline: none;
  border-color: rgba(255, 255, 255, .24);
  background: rgba(255, 255, 255, .105);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .10),
    0 18px 44px rgba(0, 0, 0, .22);
}

html[data-theme="light"] .source-card .source-option {
  border-color: rgba(34, 29, 47, .12);
  background: rgba(255, 255, 255, .76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .78),
    0 14px 30px rgba(53, 39, 77, .08);
}

html[data-theme="light"] .source-card .source-option:hover,
html[data-theme="light"] .source-card .source-option:focus-visible {
  border-color: rgba(78, 129, 255, .22);
  background: rgba(255, 255, 255, .92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .86),
    0 18px 42px rgba(53, 39, 77, .12);
}

@media (max-width: 680px) {
  .source-card {
    padding: 24px 18px 20px;
    border-radius: 26px;
  }

  .source-option {
    grid-template-columns: 54px minmax(0, 1fr) 18px;
    gap: 12px;
    padding: 12px;
  }

  .source-option__icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    font-size: 10px;
  }

  .source-option--premium .source-option__icon {
    font-size: 15px;
  }

  .source-option__arrow {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
  }

  .source-option__title,
  .source-option__description {
    white-space: normal;
  }
}


.compatibility-mode-card {
  width: min(520px, calc(100vw - 32px));
}

.compatibility-mode-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.compatibility-mode-actions button {
  margin-top: 0;
}

.compatibility-mode-secondary {
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  background: rgba(255, 255, 255, .08) !important;
}

html[data-theme="light"] .compatibility-mode-secondary {
  background: rgba(15, 23, 42, .06) !important;
}


/* ==========================================================================
   9.1 Perfil / avatares
   ========================================================================== */

.profile-overlay {
  padding: 18px;
}

.profile-card {
  position: relative;
  width: min(390px, calc(100vw - 32px));
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 28px 26px 30px;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 34px;
  background: rgba(17, 14, 18, .70);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .46), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(22px) saturate(1.15);
}

.profile-overlay--avatar-picker-open .profile-card {
  overflow: hidden;
}

html[data-theme="light"] .profile-card {
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 24px 72px rgba(58, 38, 78, .18), inset 0 1px 0 rgba(255, 255, 255, .72);
}

.profile-close-button {
  position: absolute;
  top: 13px;
  right: 15px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--text-soft);
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-soft);
  font-size: 22px;
  line-height: 1;
}

.profile-close-button[hidden] {
  display: none !important;
}

.profile-title {
  margin: 0 0 28px;
  color: var(--text);
  font-size: 21px;
  line-height: 1;
  font-weight: 1000;
  text-align: center;
  letter-spacing: -.035em;
}

.profile-avatar-button {
  position: relative;
  width: 118px;
  height: 118px;
  display: block;
  margin: 0 auto 14px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.profile-avatar-image {
  width: 100%;
  height: 100%;
  display: block;
  border: 4px solid rgba(255, 255, 255, .82);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .24);
}

.profile-avatar-edit-icon {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, .82);
  border-radius: 50%;
  background: #4e8dff;
  font-size: 15px;
  font-weight: 950;
}

.profile-display-name {
  max-width: 100%;
  margin: 0 auto 34px;
  color: var(--text);
  font-size: 28px;
  line-height: 1.05;
  font-weight: 1000;
  letter-spacing: -.045em;
  text-align: center;
  overflow-wrap: anywhere;
}

.profile-section-title {
  margin: 0 0 20px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.1;
  font-weight: 1000;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.profile-field {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: 0 0 20px;
}

.profile-field[hidden] {
  display: none;
}

.profile-field__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: rgb(0 170 164);
  box-shadow: none;
  font-size: 0;
  overflow: hidden;
}

.profile-field__icon::before {
  content: "";
  width: var(--profile-field-icon-size, 20px);
  height: var(--profile-field-icon-size, 20px);
  display: block;
  background: currentColor;
  -webkit-mask-image: var(--profile-field-icon-url);
  mask-image: var(--profile-field-icon-url);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.profile-field__icon--profile {
  --profile-field-icon-url: url("/assets/icons/profile.svg");
  --profile-field-icon-size: 18px;
}

.profile-field__icon--secret {
  --profile-field-icon-url: url("/assets/icons/padlock.svg");
  --profile-field-icon-size: 19px;
}

.profile-field__content {
  min-width: 0;
  display: grid;
  gap: 9px;
}

.profile-field__label {
  color: var(--text);
  font-size: 13px;
  line-height: 1;
  font-weight: 1000;
  letter-spacing: .02em;
  text-transform: none;
}

.profile-field__input-wrap {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 17px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .36);
}

html[data-theme="light"] .profile-field__input-wrap {
  background: rgba(23, 17, 33, .07);
}

.profile-field__input-wrap input {
  width: 100%;
  min-width: 0;
  color: #fff;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 16px;
  font-weight: 780;
}

html[data-theme="light"] .profile-field__input-wrap input {
  color: var(--text);
}

.profile-field__input-wrap input::placeholder {
  color: rgba(255, 255, 255, .60);
}

html[data-theme="light"] .profile-field__input-wrap input::placeholder {
  color: rgba(44, 38, 56, .48);
}

.profile-error {
  min-height: 20px;
  margin: 0 0 10px;
  color: #ffcf70;
  font-size: 13px;
  text-align: center;
}

.profile-save-button,
.profile-secondary-button,
.profile-danger-button {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 30px;
  border-radius: 999px;
  font-weight: 950;
}

.profile-save-button {
  width: max-content;
  min-width: 142px;
  margin: 18px auto 0;
  color: #fff;
  border: 0;
  background: linear-gradient(90deg, #4e8dff, #862aff);
  }

.profile-secondary-button {
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.profile-danger-button {
  color: #fff;
  border: 0;
  background: linear-gradient(90deg, #ef4444, #ec4899);
}

.profile-delete-panel p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.45;
  text-align: center;
}

.profile-delete-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.avatar-picker-panel {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 178px;
  bottom: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 22px 18px 24px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-bottom: 0;
  border-radius: 30px 30px 0 0;
  background: rgba(17, 14, 18, .78);
  box-shadow: 0 -18px 80px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .10);
  backdrop-filter: blur(22px) saturate(1.15);
  --avatar-option-size: 80px;
}

.avatar-picker-panel[hidden] {
  display: none;
}

html[data-theme="light"] .avatar-picker-panel {
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 26px 68px rgba(58, 38, 78, .22), inset 0 1px 0 rgba(255, 255, 255, .78);
}

.avatar-picker-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, var(--avatar-option-size));
  justify-content: center;
  justify-items: center;
  align-content: start;
  gap: 17px 20px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 10px 6px 4px;
}

.avatar-option {
  width: var(--avatar-option-size);
  height: var(--avatar-option-size);
  min-width: 0;
  min-height: 0;
  display: block;
  flex: 0 0 auto;
  padding: 0;
  border: 3px solid transparent;
  border-radius: 50%;
  background: transparent;
  overflow: hidden;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.avatar-option:hover,
.avatar-option:focus-visible {
  outline: none;
  transform: translateY(-1px);
  border-color: rgba(168, 85, 247, .52);
}

.avatar-option--selected {
  border-color: #a855f7;
  box-shadow: 0 0 0 4px rgba(168, 85, 247, .20), 0 16px 32px rgba(168, 85, 247, .22);
}

.avatar-option img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}

.avatar-picker-save {
  flex: 0 0 auto;
  display: flex;
  margin-top: 22px;
}

.profile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: auto;
  z-index: 95;
  min-width: 178px;
  max-width: calc(100vw - 24px);
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(17, 14, 18, .72);
  box-shadow: 0 22px 68px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(18px) saturate(1.2);
}

html[data-theme="light"] .profile-menu {
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 18px 54px rgba(58, 38, 78, .18), inset 0 1px 0 rgba(255, 255, 255, .70);
}

.profile-menu button {
  width: 100%;
  display: block;
  padding: 11px 12px;
  color: var(--text);
  border: 0;
  border-radius: 12px;
  background: transparent;
  font-size: 14px;
  font-weight: 850;
  text-align: left;
}

.profile-menu button:hover,
.profile-menu button:focus-visible {
  outline: none;
  background: var(--surface-soft);
}


.profile-overlay--edit .avatar-picker-panel {
  top: 128px;
}



.avatar-picker-grid {
  scrollbar-width: thin;
  scrollbar-color: rgba(191, 42, 255, .78) transparent;
  scrollbar-gutter: auto;
}

.avatar-picker-grid::-webkit-scrollbar {
  width: 10px;
}

.avatar-picker-grid::-webkit-scrollbar-track {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.avatar-picker-grid::-webkit-scrollbar-thumb {
  min-height: 48px;
  border: 2px solid transparent;
  border-radius: 999px;
  background:
    linear-gradient(180deg, #7c3aed 0%, #ec4899 100%) padding-box;
  box-shadow: 0 0 14px rgba(168, 85, 247, .28);
}

.avatar-picker-grid::-webkit-scrollbar-thumb:hover {
  background:
    linear-gradient(180deg, #8b5cf6 0%, #f472b6 100%) padding-box;
}

.avatar-picker-grid::-webkit-scrollbar-button:single-button {
  width: 10px;
  height: 13px;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 9px 9px;
}

.avatar-picker-grid::-webkit-scrollbar-button:single-button:vertical:decrement {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 3L10 8H2Z' fill='%23c084fc'/%3E%3C/svg%3E");
}

.avatar-picker-grid::-webkit-scrollbar-button:single-button:vertical:increment {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 9L2 4H10Z' fill='%23c084fc'/%3E%3C/svg%3E");
}

.avatar-picker-grid::-webkit-scrollbar-corner {
  background: transparent;
}

html[data-theme="light"] .avatar-picker-grid {
  scrollbar-color: rgba(168, 85, 247, .70) transparent;
}

html[data-theme="light"] .avatar-picker-grid::-webkit-scrollbar-thumb {
  background:
    linear-gradient(180deg, #7c3aed 0%, #ec4899 100%) padding-box;
  box-shadow: 0 0 12px rgba(168, 85, 247, .18);
}


/* ==========================================================================
   10. Menu mobile lateral
   ========================================================================== */

.mobile-drawer-backdrop,
.mobile-drawer {
  display: none;
}

body.mobile-drawer-open {
  overflow: hidden;
}


/* ==========================================================================
   10. Responsivo
   ========================================================================== */

@media (max-width: 860px) {
  :root {
      --header-h: 64px;
      --home-hero-bg-height: 748px;
      --home-hero-fade-height: 220px;
    }

    .site-header {
      grid-template-columns: 46px 1fr 46px;
      padding: 0 var(--layout-gutter);
    }

    .mobile-menu-button {
      display: grid;
      grid-column: 1;
      grid-row: 1;
    }

    .brand {
      grid-column: 2;
      justify-self: center;
    }

    .brand-logo {
      height: 34px;
      max-width: min(190px, 56vw);
    }

    .brand-mark {
      font-size: 22px;
    }

    .main-nav,
    .theme-toggle {
      display: none;
    }

    .header-actions {
      grid-column: 3;
    }

    .mobile-menu-button,
    .profile-button {
      width: 40px;
      height: 40px;
      border-radius: 14px;
    }

    .profile-button {
      border-radius: 50%;
    }

    .profile-button__avatar {
      border-radius: 50%;
      object-fit: cover;
    }

    .mobile-drawer-backdrop {
      position: fixed;
      inset: 0;
      z-index: 70;
      background: rgba(0, 0, 0, .38);
      backdrop-filter: blur(10px);
      opacity: 0;
      transition: opacity .22s ease;
    }

    .mobile-drawer-backdrop[data-visible="true"] {
      display: block;
      opacity: 1;
    }

    html[data-theme="light"] .mobile-drawer-backdrop {
      background: rgba(52, 51, 96, .18);
    }

    .mobile-drawer {
      position: fixed;
      top: 0;
      bottom: 0;
      left: 0;
      z-index: 75;
      width: min(86vw, 342px);
      max-width: calc(100vw - 42px);
      display: flex;
      flex-direction: column;
      gap: 24px;
      padding: calc(env(safe-area-inset-top, 0px) + 22px) 18px 22px;
      color: var(--text);
      border-right: 1px solid var(--border);
      border-radius: 0 28px 28px 0;
      background: linear-gradient(180deg, rgba(9, 9, 14, .82), rgba(9, 9, 14, .54));
      box-shadow: 24px 0 80px rgba(0, 0, 0, .36), inset -1px 0 0 rgba(255, 255, 255, .06);
      backdrop-filter: blur(20px) saturate(1.22);
      overflow-y: auto;
      transform: translateX(-108%);
      transition: transform .24s ease;
    }

    .mobile-drawer[data-visible="true"] {
      display: flex;
      transform: translateX(0);
    }

    html[data-theme="light"] .mobile-drawer {
      background: linear-gradient(180deg, rgb(243 213 255 / 82%), rgb(226 250 255 / 62%));
      box-shadow: 24px 0 76px rgba(58, 38, 78, .22), inset -1px 0 0 rgba(255, 255, 255, .58);
    }

    .mobile-drawer__top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
    }

    .mobile-drawer__title {
      color: var(--text);
      font-size: 20px;
      line-height: 1;
      font-weight: 1000;
      letter-spacing: -.04em;
    }

    .mobile-drawer__close {
      width: 38px;
      height: 38px;
      display: grid;
      place-items: center;
      color: var(--text-soft);
      border: 1px solid var(--border);
      border-radius: 14px;
      background: var(--surface-soft);
      font-size: 24px;
      line-height: 1;
    }

    .mobile-drawer__theme {
      display: flex;
      justify-content: center;
    }

    .mobile-drawer .theme-toggle {
      display: inline-grid;
    }

    .mobile-drawer__section {
      display: grid;
      gap: 12px;
    }

    .mobile-drawer__section h3 {
      margin: 0;
      color: var(--text);
      font-size: 13px;
      line-height: 1;
      font-weight: 1000;
      letter-spacing: .06em;
      text-transform: uppercase;
    }

    .mobile-drawer__list {
      display: grid;
      gap: 10px;
    }

    .mobile-drawer__room,
    .mobile-drawer__empty {
      min-height: 44px;
      display: flex;
      align-items: center;
      padding: 11px 13px;
      color: var(--text);
      border: 1px solid var(--border);
      border-radius: 16px;
      background: rgba(255, 255, 255, .075);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
      font-size: 14px;
      font-weight: 850;
      line-height: 1.2;
      text-decoration: none;
    }

    html[data-theme="light"] .mobile-drawer__room,
    html[data-theme="light"] .mobile-drawer__empty {
      background: rgba(255, 255, 255, .46);
    }

    .mobile-drawer__room--active {
      background: linear-gradient(90deg, rgba(78, 129, 255, .24), rgba(191, 42, 255, .18));
      border-color: rgba(191, 42, 255, .30);
    }

    .mobile-drawer__room--closed {
      opacity: .72;
      filter: saturate(.62);
    }

    .mobile-drawer__empty {
      color: var(--muted);
      font-weight: 750;
    }

    .hero-section {
      min-height: 690px;
      align-items: flex-start;
      padding: calc(var(--header-h) + 44px) var(--layout-gutter) 132px;
    }

    .hero-content {
      margin-top: 28px;
    }

    .hero-content h1 {
      font-size: clamp(32px, 10.2vw, 49px);
    }

    .hero-subtitle {
      font-size: clamp(16px, 5.1vw, 23px);
      line-height: 1.24;
    }

    .hero-hint {
      margin-bottom: 22px;
      font-size: 12px;
      line-height: 1.35;
    }

    .create-room-card {
      grid-template-columns: 1fr;
      padding: 10px;
      border-radius: 24px;
    }

    .create-room-input {
      height: 48px;
    }

    #createBtn {
      width: 100%;
    }

    .operation-panel.bandwidth-dock {
      width: calc(100vw - (var(--layout-gutter) * 2));
      margin: -72px auto 26px;
    }

    .operation-panel.bandwidth-dock .bandwidth-card,
    .bandwidth-card {
      padding: 14px;
      border-radius: 20px;
    }

    .home-section {
      width: min(100%, var(--layout-max));
      padding: 32px var(--layout-gutter);
    }

    .operation-room-list,
    .closed-room-list {
      grid-template-columns: 1fr;
    }

    .operation-room-item {
      min-height: 180px;
      display: block;
    }

    .operation-room-item.operation-room-item--loading {
      display: grid;
      min-height: 180px;
    }

    .closed-room-item,
    .closed-room-list .operation-room-item.operation-room-item--loading {
      min-height: 170px;
    }

    .operation-room-link {
      position: absolute;
      right: 15px;
      bottom: 15px;
      width: max-content;
      margin-top: 0;
    }
}

@media (max-width: 520px) {
  :root {
      --home-hero-bg-height: 712px;
      --home-hero-fade-height: 210px;
    }

    .hero-section {
      min-height: 650px;
    }

    .hero-subtitle {
      max-width: 100%;
    }

    .create-room-input input {
      font-size: 14px;
    }

    .bandwidth-card__meta {
      align-items: flex-start;
      flex-direction: column;
      gap: 2px;
    }

    .bandwidth-card__reset {
      text-align: left;
    }

    .operation-room-empty,
    .closed-room-placeholder {
      flex-direction: column;
      align-items: flex-start;
    }

  .profile-card {
      width: min(390px, calc(100vw - 20px));
      padding: 24px 18px 26px;
      border-radius: 28px;
    }

    .profile-avatar-button {
      width: 104px;
      height: 104px;
    }

    .profile-display-name {
      font-size: 25px;
      margin-bottom: 28px;
    }

    .profile-field {
      grid-template-columns: 38px minmax(0, 1fr);
      gap: 11px;
    }

    .profile-field__icon {
      width: 38px;
      height: 38px;
    }

    .avatar-picker-panel {
      left: 10px;
      right: 10px;
      top: 154px;
      bottom: 0;
      padding: 18px 12px 22px;
      border-radius: 26px 26px 0 0;
      --avatar-option-size: 74px;
    }

    .avatar-picker-grid {
      gap: 14px 16px;
      padding-right: 6px;
    }

  .profile-overlay--edit .avatar-picker-panel {
      top: 118px;
    }
}

@media (max-width: 360px) {
  .avatar-picker-panel {
      --avatar-option-size: 66px;
      padding-left: 10px;
      padding-right: 10px;
    }

    .avatar-picker-grid {
      gap: 12px 12px;
    }

  .profile-overlay--edit .avatar-picker-panel {
      top: 108px;
    }
}

.plex-search-panel {
  position: absolute;
  z-index: 2147483000;
  top: var(--plex-search-top, 100px);
  left: var(--plex-search-left, var(--layout-pad));
  right: auto;
  width: var(--plex-search-width, min(590px, calc(100vw - 24px)));
  max-width: calc(100vw - 24px);
  box-sizing: border-box;
  max-height: var(--plex-search-max-height, min(390px, calc(100vh - 150px)));
  margin: 0;
  padding: 12px;
  border-radius: 20px;
  background: rgba(14, 12, 20, .94);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .54);
  backdrop-filter: blur(24px) saturate(1.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overscroll-behavior: contain;
  text-align: left;
}

html[data-theme="light"] .plex-search-panel {
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 22px 56px rgba(54, 36, 80, .16);
}

.plex-search-panel[hidden] {
  display: none !important;
}

.plex-search-title,
.plex-search-header__title {
  color: rgba(255, 255, 255, .72);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: .13em;
  text-transform: uppercase;
}

html[data-theme="light"] .plex-search-title,
html[data-theme="light"] .plex-search-header__title {
  color: rgba(41, 35, 58, .58);
}

.plex-result-list,
.plex-episode-list {
  min-height: 0;
  display: grid;
  gap: 8px;
  margin-top: 10px;
  margin-right: -12px;
  padding-right: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(156, 122, 255, .54) transparent;
}

@supports selector(::-webkit-scrollbar) {
  .plex-result-list,
  .plex-episode-list {
    padding-right: 2px;
  }
}

.plex-result-list::-webkit-scrollbar,
.plex-episode-list::-webkit-scrollbar {
  width: 8px;
}

.plex-result-list::-webkit-scrollbar-track,
.plex-episode-list::-webkit-scrollbar-track {
  background: transparent;
}

.plex-result-list::-webkit-scrollbar-thumb,
.plex-episode-list::-webkit-scrollbar-thumb {
  min-height: 42px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(156, 122, 255, .50);
  background-clip: content-box;
}

.plex-result-list {
  max-height: max(150px, calc(var(--plex-search-max-height, 390px) - 48px));
}

.plex-search-header + .plex-episode-list {
  max-height: max(150px, calc(var(--plex-search-max-height, 390px) - 76px));
}

.plex-season-tabs + .plex-episode-list {
  max-height: max(150px, calc(var(--plex-search-max-height, 390px) - 118px));
}

.plex-result {
  margin: 1px;
  width: 100%;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 16px;
  color: #fff;
  background: rgba(255, 255, 255, .055);
  text-align: left;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.plex-result:hover,
.plex-result:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(154, 122, 255, .58);
  background: rgba(154, 122, 255, .16);
  outline: none;
}

.plex-result:disabled {
  cursor: not-allowed;
  opacity: .55;
  transform: none;
}

html[data-theme="light"] .plex-result {
  color: var(--text);
  border-color: rgba(48, 38, 70, .10);
  background: rgba(56, 45, 78, .055);
}

html[data-theme="light"] .plex-result:hover,
html[data-theme="light"] .plex-result:focus-visible {
  border-color: rgba(114, 82, 220, .34);
  background: rgba(114, 82, 220, .10);
}

.plex-result__poster {
  width: 48px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .72);
  font-size: 20px;
}

.plex-result--episode .plex-result__poster {
  height: 42px;
  border-radius: 9px;
}

.plex-result__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

html[data-theme="light"] .plex-result__poster {
  background: rgba(42, 35, 58, .08);
  color: rgba(42, 35, 58, .55);
}

.plex-result__body {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.plex-result__title {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 15px;
  font-weight: 880;
  line-height: 1.16;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plex-result__meta,
.plex-result__action {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, .62);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plex-result__action {
  color: rgba(179, 153, 255, .95);
}

html[data-theme="light"] .plex-result__meta,
html[data-theme="light"] .plex-result__action {
  color: rgba(43, 35, 58, .62);
}

html[data-theme="light"] .plex-result__action {
  color: rgba(103, 70, 206, .92);
}

.plex-search-message {
  padding: 12px 14px;
  border-radius: 16px;
  color: rgba(255, 255, 255, .76);
  background: rgba(255, 255, 255, .055);
  font-size: 13px;
  font-weight: 720;
  line-height: 1.35;
}

.plex-search-message--error {
  color: #ffd3d3;
  background: rgba(255, 76, 96, .12);
}

.plex-search-message--loading {
  color: rgba(218, 208, 255, .95);
}

html[data-theme="light"] .plex-search-message {
  color: rgba(43, 35, 58, .72);
  background: rgba(43, 35, 58, .06);
}

html[data-theme="light"] .plex-search-message--error {
  color: #9c1c2f;
  background: rgba(219, 35, 96, .10);
}

.plex-search-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.plex-season-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: -2px 0 10px;
}

.plex-season-tabs__label {
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  font-weight: 860;
  line-height: 1;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.plex-season-tab {
  min-width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 9px;
  color: rgba(255, 255, 255, .82);
  background: rgba(255, 255, 255, .08);
  font-size: 13px;
  font-weight: 880;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}

.plex-season-tab:hover,
.plex-season-tab:focus-visible {
  border-color: rgba(154, 122, 255, .52);
  background: rgba(154, 122, 255, .18);
  outline: none;
}

.plex-season-tab.is-active {
  color: #fff;
  border-color: rgba(154, 122, 255, .62);
  background: linear-gradient(135deg, rgba(117, 104, 255, .55), rgba(191, 42, 255, .40));
}

html[data-theme="light"] .plex-season-tabs__label {
  color: rgba(41, 35, 58, .58);
}

html[data-theme="light"] .plex-season-tab {
  color: rgba(42, 35, 58, .78);
  border-color: rgba(42, 35, 58, .12);
  background: rgba(42, 35, 58, .055);
}

html[data-theme="light"] .plex-season-tab:hover,
html[data-theme="light"] .plex-season-tab:focus-visible {
    border-color: rgb(114 82 220 / 59%);
    background: rgb(195 214 255 / 83%);
}

html[data-theme="light"] .plex-season-tab.is-active {
  color: #fff;
  border-color: rgba(114, 82, 220, .40);
  background: linear-gradient(135deg, #6d78ff, #bf2aff);
}

.plex-search-back {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  color: rgba(255, 255, 255, .86);
  background: rgba(255, 255, 255, .075);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

html[data-theme="light"] .plex-search-back {
  color: rgba(42, 35, 58, .78);
  border-color: rgba(42, 35, 58, .12);
  background: rgba(42, 35, 58, .055);
}

@media (max-width: 720px) {
  .plex-search-panel {
    left: max(10px, var(--plex-search-left, 10px));
    width: min(var(--plex-search-width, calc(100vw - 20px)), calc(100vw - 20px));
    max-height: var(--plex-search-max-height, min(330px, calc(100vh - 128px)));
    border-radius: 20px;
  }

  .plex-result-list {
    max-height: max(135px, calc(var(--plex-search-max-height, 330px) - 46px));
  }

  .plex-search-header + .plex-episode-list {
    max-height: max(135px, calc(var(--plex-search-max-height, 330px) - 74px));
  }

  .plex-season-tabs + .plex-episode-list {
    max-height: max(135px, calc(var(--plex-search-max-height, 330px) - 112px));
  }

  .plex-season-tabs {
    gap: 7px;
  }

  .plex-season-tab {
    min-width: 28px;
    height: 28px;
    padding: 0 9px;
  }

  .plex-result {
    grid-template-columns: 42px minmax(0, 1fr);
    border-radius: 14px;
  }

  .plex-result__poster {
    width: 42px;
    height: 62px;
  }
}
