/* Mainstage · Plataforma: estruturas de página (shells) */

/* ---------- faixa de demonstração ---------- */
.demo-bar {
  position: sticky; top: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  height: var(--demo-h); padding: 0 12px;
  background: #1C1C20; color: rgba(255,255,255,.78);
  font-size: 11px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.demo-bar__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px rgba(224,36,36,.22); }
.demo-bar__sep { opacity: .35; }
.demo-bar__btn {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; margin-left: 6px;
  border: 1px solid rgba(255,255,255,.2); border-radius: 5px; background: transparent; color: #fff;
  font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.demo-bar__btn:hover { border-color: #fff; }
.demo-bar__btn .i { width: 13px; height: 13px; }
@media (max-width: 640px) { .demo-bar__long { display: none; } }

/* ---------- marca ---------- */
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand__symbol { width: 34px; height: auto; }
.brand__sign { height: 15px; width: auto; }
.brand__divider { width: 1px; height: 22px; background: var(--line-dark-2); }
.brand__area { color: var(--on-dark-2); font-size: 12px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }

/* ---------- shell público (entrar, cadastro) ---------- */
.shell-public { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: calc(100vh - var(--demo-h)); }
.public-stage {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(28px, 4vw, 56px); overflow: hidden; color: #fff; background: var(--night);
}
.public-stage__photo { position: absolute; inset: 0; background-size: cover; background-position: 62% 40%; transform: scale(1.03); animation: settle 1.6s var(--ease) both; }
.public-stage::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,11,13,.70) 0%, rgba(11,11,13,.15) 38%, rgba(11,11,13,.86) 100%), linear-gradient(90deg, rgba(11,11,13,.45), transparent 60%); }
.public-stage > *:not(.public-stage__photo) { position: relative; z-index: 1; }
.public-stage__title { font-size: clamp(40px, 5vw, 72px); max-width: 12ch; }
.public-stage__title em { font-style: normal; color: var(--red); }
.public-stage__text { max-width: 42ch; margin-top: 18px; color: var(--on-dark-2); font-size: 16px; line-height: 1.6; }
.public-stage__foot { display: flex; flex-wrap: wrap; gap: 10px 24px; color: var(--on-dark-3); font-size: 12px; font-weight: 650; }
@keyframes settle { from { transform: scale(1.09); opacity: .4; } }

.public-form { display: flex; flex-direction: column; justify-content: center; padding: clamp(28px, 5vw, 72px); background: var(--paper); }
.public-form__inner { width: min(440px, 100%); margin: 0 auto; }
.public-form__title { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.public-form__sub { margin-top: 8px; color: var(--text-3); font-size: 15px; }
.public-form__alt { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 14px; }

@media (max-width: 900px) {
  .shell-public { grid-template-columns: 1fr; }
  .public-stage { min-height: 280px; }
  .public-stage__title { font-size: 40px; }
  .public-stage__text, .public-stage__foot { display: none; }
}

/* ---------- shell superior (fã e comunidade) ---------- */
.shell-top { min-height: calc(100vh - var(--demo-h)); display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: var(--demo-h); z-index: 150;
  background: rgba(11,11,13,.94); color: #fff;
  -webkit-backdrop-filter: saturate(140%) blur(14px); backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line-dark);
}
.topbar__inner { display: flex; align-items: center; gap: 28px; height: var(--header-h); width: min(var(--content-max), calc(100% - 2 * var(--gutter))); margin: 0 auto; }
.topnav { display: flex; align-items: center; gap: 4px; height: 100%; }
.topnav a {
  position: relative; display: inline-flex; align-items: center; height: 100%; padding: 0 12px;
  color: var(--on-dark-2); font-size: 13.5px; font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: color var(--t-fast);
}
.topnav a:hover { color: #fff; }
.topnav a[aria-current="page"] { color: #fff; }
.topnav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: var(--red); }
.topbar__end { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.shell-top main { flex: 1; }
.page { width: min(var(--content-max), calc(100% - 2 * var(--gutter))); margin: 0 auto; padding: 36px 0 72px; }
.page--narrow { width: min(820px, calc(100% - 2 * var(--gutter))); }
.page--mid { width: min(1040px, calc(100% - 2 * var(--gutter))); }

.bottomnav { display: none; }
@media (max-width: 860px) {
  .topnav { display: none; }
  .topbar__inner { gap: 12px; }
  .bottomnav {
    position: fixed; z-index: 150; left: 0; right: 0; bottom: 0;
    display: grid; grid-template-columns: repeat(var(--n, 4), 1fr);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: rgba(11,11,13,.97); border-top: 1px solid var(--line-dark);
  }
  .bottomnav a {
    display: grid; justify-items: center; gap: 4px; min-height: 52px; padding: 6px 2px;
    border-radius: 10px; color: var(--on-dark-3); font-size: 11px; font-weight: 750; text-decoration: none; text-align: center;
  }
  .bottomnav a .i { width: 22px; height: 22px; }
  .bottomnav a[aria-current="page"] { color: #fff; }
  .bottomnav a[aria-current="page"] .i { color: var(--red); }
  .shell-top main { padding-bottom: 76px; }
  .page { padding-top: 24px; }
}

/* ---------- contexto e conta ---------- */
.ctx-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px 0 6px;
  border: 1px solid var(--line-dark-2); border-radius: 10px; background: transparent; color: #fff;
  font-size: 13px; font-weight: 700; max-width: 280px;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.ctx-btn:hover { border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.04); }
.ctx-btn__badge { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--red); flex: 0 0 auto; }
.ctx-btn__badge .i { width: 16px; height: 16px; }
.ctx-btn__text { display: grid; text-align: left; line-height: 1.15; min-width: 0; }
.ctx-btn__kind { color: var(--on-dark-3); font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ctx-btn__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx-btn > .i { color: var(--on-dark-3); width: 16px; height: 16px; }
.ctx-btn--light { border-color: var(--line); color: var(--text); background: var(--surface); }
.ctx-btn--light:hover { border-color: var(--text); background: var(--surface); }
.ctx-btn--light .ctx-btn__kind, .ctx-btn--light > .i { color: var(--text-3); }

.user-btn { display: inline-flex; align-items: center; gap: 8px; padding: 3px; border: 0; border-radius: 99px; background: transparent; color: inherit; }
.user-btn:hover .avatar { box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: 10px; background: transparent; color: var(--on-dark-2);
}
.icon-btn:hover { background: rgba(255,255,255,.06); color: #fff; }
.icon-btn--light { color: var(--text-2); }
.icon-btn--light:hover { background: rgba(16,16,19,.05); color: var(--text); }
.icon-btn__dot { position: absolute; top: 9px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--night); }

@media (max-width: 860px) {
  .ctx-btn__text { display: none; }
  .ctx-btn { padding: 0 8px 0 5px; }
}

/* ---------- shell lateral (equipe, gravadora, parceiro, Mainstage) ---------- */
.shell-side { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: calc(100vh - var(--demo-h)); }
.sidebar {
  position: sticky; top: var(--demo-h); height: calc(100vh - var(--demo-h));
  display: flex; flex-direction: column; overflow-y: auto;
  background: var(--night); color: #fff; border-right: 1px solid var(--line-dark);
}
.sidebar__brand { display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 20px; border-bottom: 1px solid var(--line-dark); }
.sidebar__ctx { padding: 16px 14px 8px; }
.sidebar__ctx .ctx-btn { width: 100%; max-width: none; height: 52px; padding-left: 8px; }
.sidebar__ctx .ctx-btn__badge { width: 34px; height: 34px; border-radius: 8px; }
.sidebar__ctx .ctx-btn__text { display: grid; }
.sidebar__scope { margin: 6px 14px 4px; padding: 10px 12px; border-radius: 8px; background: rgba(255,255,255,.04); color: var(--on-dark-3); font-size: 12px; font-weight: 600; line-height: 1.45; }
.sidebar__scope strong { color: var(--on-dark-2); font-weight: 750; }
.sidenav { display: grid; gap: 2px; padding: 12px 10px; }
.sidenav__label { padding: 14px 12px 6px; color: var(--on-dark-3); font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.sidenav a {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px;
  border-radius: 8px; color: var(--on-dark-2); font-size: 14px; font-weight: 650; text-decoration: none;
  transition: background var(--t-fast), color var(--t-fast);
}
.sidenav a .i { color: var(--on-dark-3); transition: color var(--t-fast); }
.sidenav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.sidenav a[aria-current="page"] { background: var(--red); color: #fff; }
.sidenav a[aria-current="page"] .i { color: #fff; }
.sidenav__count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 99px; background: rgba(255,255,255,.1); color: #fff; font-size: 11.5px; font-weight: 800; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.sidenav a[aria-current="page"] .sidenav__count { background: rgba(0,0,0,.22); }
.sidebar__foot { margin-top: auto; padding: 14px; border-top: 1px solid var(--line-dark); }
.sidebar__user { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; border-radius: 10px; background: transparent; color: #fff; text-align: left; }
.sidebar__user:hover { background: rgba(255,255,255,.05); }
.sidebar__user-name { font-size: 13.5px; font-weight: 750; line-height: 1.2; }
.sidebar__user-role { color: var(--on-dark-3); font-size: 12px; font-weight: 600; }

.workbar {
  position: sticky; top: var(--demo-h); z-index: 120;
  display: flex; align-items: center; gap: 16px; height: 60px; padding: 0 clamp(16px, 3vw, 36px);
  background: rgba(242,242,242,.9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.workbar__menu { display: none; }
.workbar__logo { display: none; width: 30px; height: auto; }
@media (max-width: 1080px) { .workbar__logo { display: block; } }
.workbar__end { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.workspace { padding: 32px clamp(16px, 3vw, 36px) 72px; max-width: 1320px; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 24px; margin-bottom: 28px; }
.page-head__text { min-width: 0; }
.page-head__text > * + * { margin-top: 8px; }
.page-head__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.page-head__actions .select { width: auto; min-width: 280px; max-width: 100%; }
.field .segmented { justify-self: start; }

@media (max-width: 1080px) {
  .shell-side { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; z-index: 400; top: 0; left: 0; bottom: 0; width: min(300px, 86vw); height: 100vh;
    transform: translateX(-102%); transition: transform var(--t) var(--ease); box-shadow: var(--shadow-pop);
  }
  .shell-side.is-nav-open .sidebar { transform: none; }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 390; background: rgba(11,11,13,.5); animation: fade var(--t); }
  .workbar__menu { display: inline-grid; }
}
@media (max-width: 640px) {
  .workspace { padding-top: 22px; }
  .workbar .crumbs { display: none; }
}
