/* Layout estilo Discord. Carregado depois do style.css: só sobrescreve a casca. */
:root { --rail: #050810; --side: #0b101e; --main: #0e1424; --bar: #080c18; }
html, body { height: 100%; }
body { min-height: 0; overflow: hidden; background: var(--main); }

.dc { display: grid; grid-template-columns: 72px 264px minmax(0, 1fr); height: 100vh; }

/* Barra de servidores */
.dc-rail { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 0; background: var(--rail); }
.dc-server { width: 48px; height: 48px; display: grid; place-items: center; overflow: hidden; background: var(--panel-raised); border-radius: 24px; transition: border-radius .2s, background .2s; }
.dc-server img { width: 30px; height: 30px; }
.dc-server:hover, .dc-server.active { border-radius: 16px; background: var(--accent); }
.dc-rail-sep { width: 30px; height: 2px; background: var(--line); border-radius: 2px; }

/* Lateral: entrar + canais */
.dc-side { display: flex; flex-direction: column; min-height: 0; background: var(--side); border-right: 1px solid var(--line); }
.dc-side-head { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(0,0,0,.25); }
.dc-side-head strong { font: 700 1rem "Space Grotesk", sans-serif; letter-spacing: .04em; }
.dc-side-head small { color: var(--muted); font-size: .68rem; }
.dc-side-body { flex: 1; overflow-y: auto; padding: 12px 10px; }

.dc-side .join-card { max-width: none; margin: 0 0 14px; padding: 4px 4px 0; background: none; border: 0; border-radius: 0; box-shadow: none; animation: none; }
.dc-side .join-card::before { display: none; }
.dc-side .join-fields { flex-direction: column; align-items: stretch; gap: 12px; }
.dc-side .field, .dc-side .field.grow { flex: none; gap: 6px; }
.dc-side .input-wrap input { height: 40px; }
.dc-side .primary-action { height: 42px; gap: 10px; }
.dc-side .invite-action { width: 100%; margin-top: 10px; }

.dc-channels { display: none; }
body.in-room .dc-channels { display: block; }
.dc-cat { margin: 14px 8px 6px; color: var(--muted); font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.dc-channel { width: 100%; display: flex; align-items: center; gap: 8px; padding: 7px 10px; color: var(--muted-strong); background: none; border-radius: 7px; font-size: .86rem; text-align: left; }
.dc-channel span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.dc-channel:hover, .dc-channel.active { color: var(--text); background: rgba(255,255,255,.07); }
.dc-members { display: flex; flex-direction: column; gap: 2px; padding: 4px 0 0 22px; }
.dc-member { display: flex; align-items: center; gap: 8px; padding: 4px 8px; color: var(--muted-strong); border-radius: 6px; font-size: .8rem; }
.dc-member > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-mav { flex: none; width: 24px; height: 24px; display: grid; place-items: center; color: #fff; border-radius: 50%; font-size: .58rem; font-weight: 700; box-shadow: 0 0 0 2px transparent; transition: box-shadow .15s; }
.dc-member.speaking .dc-mav { box-shadow: 0 0 0 2px var(--accent); }

/* Área principal */
.dc-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--main); }
.dc-top { display: flex; align-items: center; gap: 14px; height: 48px; padding: 0 16px; border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(0,0,0,.2); }
.dc-title { display: flex; align-items: center; gap: 8px; }
.dc-title strong { font-size: .95rem; }
.dc-top .status { flex: 1; min-width: 0; overflow: hidden; color: var(--muted); font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.dc-top .chat-toggle { position: relative; inset: auto; width: 36px; height: 36px; flex: none; color: var(--muted-strong); background: rgba(255,255,255,.05); border: 0; border-radius: 9px; box-shadow: none; font-size: 1rem; }
.dc-top .chat-toggle:hover { color: var(--text); background: rgba(255,255,255,.12); transform: none; }

.dc-stage { flex: 1; display: flex; min-height: 0; }
.dc-center { flex: 1; min-width: 0; overflow-y: auto; padding: 16px; }
body.in-room .dc .grid { max-width: none; margin: 0; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.dc .card:hover { transform: none; }

.dc-welcome { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 12vh; color: var(--muted); text-align: center; }
.dc-welcome h1 { color: var(--text); font: 700 1.6rem "Space Grotesk", sans-serif; }
.dc-welcome p { max-width: 340px; font-size: .86rem; line-height: 1.5; }
body.in-room .dc-welcome { display: none; }

/* Chat encaixado à direita (antes era flutuante) */
.dc .chat-panel { position: static; width: 320px; max-width: none; height: auto; max-height: none; flex: none; border: 0; border-left: 1px solid var(--line); border-radius: 0; box-shadow: none; animation: none; background: var(--side); }

/* Barra de controles da chamada */
.dc-callbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; background: var(--bar); border-top: 1px solid var(--line); }
.dc-callbar button { padding: 9px 13px; color: var(--muted-strong); background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 10px; font-size: .76rem; white-space: nowrap; transition: background .2s, color .2s; }
.dc-callbar button:hover { color: var(--text); background: rgba(255,255,255,.11); }
.dc-callbar button.active { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.dc-callbar button:disabled { cursor: not-allowed; opacity: .45; }
.dc-callbar button.danger { color: #fff; background: var(--danger); border-color: var(--danger); }
.dc-callbar button.danger:hover { filter: brightness(1.1); }
.dc-callbar .quality-control { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: .72rem; }
.dc-callbar select { padding: 7px 8px; color: var(--text); background: rgba(6,10,20,.7); border: 1px solid var(--line); border-radius: 8px; }

@media (max-width: 820px) {
  body { overflow: auto; }
  .dc { display: flex; flex-direction: column; height: auto; min-height: 100vh; }
  .dc-rail { display: none; }
  .dc-side { border-right: 0; border-bottom: 1px solid var(--line); }
  .dc-main { min-height: 70vh; }
  .dc-stage { flex-direction: column; }
  .dc .chat-panel { width: auto; height: 300px; border-left: 0; border-top: 1px solid var(--line); }
}

.dc-member.clickable { cursor: pointer; }
.dc-member.clickable:hover { color: var(--text); background: rgba(255,255,255,.07); }

/* Menu de contexto (botão direito) */
.dc-ctx { position: fixed; z-index: 10000; width: 244px; padding: 6px; background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.dc-ctx-title { padding: 6px 10px 4px; color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-ctx-sep { height: 1px; margin: 5px 4px; background: var(--line); }
.dc-ctx-vol { padding: 6px 10px 8px; }
.dc-ctx-volhead { display: flex; justify-content: space-between; margin-bottom: 6px; color: var(--muted-strong); font-size: .8rem; }
.dc-ctx-volhead span:last-child { color: var(--accent); font-weight: 600; }
.dc-ctx-vol input { width: 100%; accent-color: var(--accent); }
.dc-ctx-item { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; color: var(--muted-strong); background: none; border-radius: 6px; font-size: .84rem; text-align: left; }
.dc-ctx-item:hover { color: var(--text); background: rgba(255,255,255,.09); }
.dc-ctx-item.danger { color: var(--danger); }
.dc-ctx-item.danger:hover { color: #fff; background: var(--danger); }
.dc-check { width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid var(--muted); border-radius: 4px; color: var(--accent-ink); font-size: .72rem; font-weight: 800; }
.dc-check.on { background: var(--accent); border-color: var(--accent); }
