/* Streamya Dashboard — shared visual system */
:root {
  --rk-bg: #000000;
  --rk-surface: #0d0f14;
  --rk-surface-2: #11141b;
  --rk-line: #252833;
  --rk-text: #f3f4f6;
  --rk-muted: #a0a7b5;
  --rk-primary: #5425a0;
  --rk-primary-hover: #622db2;
  --rk-accent: #a78bfa;
  --rk-accent-soft: rgb(167 139 250 / .13);
  --rk-green: #4ade80;
}

html,
body {
  min-height: 100%;
  background: var(--rk-bg) !important;
  color: var(--rk-text);
}

.glass {
  background: var(--rk-surface) !important;
  border: 1px solid var(--rk-line) !important;
  border-radius: 13px !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.shell {
  width: 100%;
  max-width: none !important;
  min-height: 100vh;
  display: grid !important;
  grid-template-columns: 236px minmax(0, 1fr) !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.side {
  position: fixed !important;
  top: 0 !important;
  left: 0;
  width: 236px;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  max-height: none;
  align-self: start !important;
  z-index: 15;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  padding: 18px 12px 14px !important;
  border-width: 0 1px 0 0 !important;
  border-radius: 0 !important;
  background: var(--rk-surface) !important;
  display: flex;
  flex-direction: column;
  gap: 16px !important;
}

.shell>main {
  grid-column: 2;
}

.side>*,
.side .nav-section,
.side .brand,
.side .me {
  flex-shrink: 0;
}

.side .nav-icon,
.side .nav-icon svg {
  flex-shrink: 0;
}

.brand {
  min-height: 42px;
  padding: 0 8px 14px;
  border-bottom: 1px solid var(--rk-line);
  font-size: 1.02rem !important;
  letter-spacing: -.035em;
}

.brand img {
  width: 28px !important;
  height: 28px !important;
}

.side h2,
.nav h2,
.nav-section h2,
#servers-wrap h2 {
  margin: 6px 8px 7px !important;
  color: var(--rk-muted) !important;
  font-size: .66rem !important;
  font-weight: 700 !important;
  letter-spacing: .09em !important;
  text-transform: uppercase;
}

.nav,
.nav-section,
#servers-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-link {
  min-height: 37px;
  padding: 8px 10px !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  color: var(--rk-muted) !important;
  font-size: .82rem !important;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}

.nav-link::before {
  display: none !important;
}

.nav-link:hover {
  background: rgba(255, 255, 255, .045) !important;
  color: #fff !important;
  transform: none !important;
}

.nav-link[aria-current="page"],
.nav-link.active {
  color: #fff !important;
  background: var(--rk-accent-soft) !important;
  border-color: rgb(167 139 250 / .25) !important;
}

.nav-link .nav-icon {
  width: 18px;
  margin-right: 9px;
  color: var(--rk-muted);
  text-align: center;
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
}

.nav-icon svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.nav-link span:not(.nav-icon) {
  min-width: 0;
}

#servers-wrap {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rk-line);
}

#servers {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#servers a,
#servers button {
  border-radius: 8px;
}

.me {
  margin-top: auto;
  padding: 12px 8px 0;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #bfc4cf;
  font-size: 12px;
  min-width: 0;
}

.me #who {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-account-menu {
  position: relative;
  width: 100%;
}

.dashboard-account-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--rk-line);
  border-radius: 8px;
  background: var(--rk-surface-2);
  color: var(--rk-text);
  list-style: none;
  cursor: pointer;
}

.dashboard-account-trigger::-webkit-details-marker { display: none; }

.dashboard-account-trigger::after {
  content: "";
  flex: 0 0 14px;
  height: 14px;
  background: url("./select-chevron.svg?v=double") center / contain no-repeat;
}

.dashboard-account-links {
  display: grid;
  gap: 2px;
  position: absolute;
  z-index: 4;
  inset-inline: 0;
  bottom: calc(100% + 6px);
  padding: 4px;
  border: 1px solid var(--rk-line);
  border-radius: 8px;
  background: var(--rk-surface);
}

.me .dashboard-account-links a {
  justify-content: flex-start;
  padding: 10px;
  border: 0;
  color: var(--rk-text);
}

.me .dashboard-account-links a[href="/dashboard/logout"] {
  color: #ff9da8;
}

.dashboard-account-links svg {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-account-links a:is(:hover, [aria-current]) {
  background: var(--rk-surface-2);
}

.me a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  color: #aeb5c2;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px 8px;
  line-height: 1;
}

.me .nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.me .nav-icon svg {
  display: block;
  width: 16px;
  height: 16px;
}

main {
  min-width: 0;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 30px clamp(20px, 3.5vw, 54px) 56px !important;
}

.top {
  align-items: center !important;
  margin: 0 0 24px !important;
}

h1 {
  font-size: clamp(1.45rem, 2vw, 1.8rem) !important;
  letter-spacing: -.045em !important;
}

.sub,
.hint {
  color: var(--rk-muted) !important;
}

.card,
.preview,
.center {
  border-radius: 12px !important;
}

.card {
  padding: 20px !important;
}

.card h3,
.preview h3 {
  font-size: .96rem;
  letter-spacing: -.02em;
}

.btn.ghost {
  background: var(--rk-surface-2) !important;
  border: 1px solid var(--rk-line) !important;
}

#bar.bar.glass {
  --save-bar-radius: 20px;
  --save-bar-padding: 12px;
  padding-block: var(--save-bar-padding);
  padding-inline-end: var(--save-bar-padding);
  border-radius: var(--save-bar-radius) !important;
}

#bar.bar > .btn {
  border-radius: max(0px, calc(var(--save-bar-radius) - var(--save-bar-padding)));
}

.dashboard-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--rk-line);
  border-radius: 7px;
  background-color: #111318;
  color: var(--rk-text);
  font: inherit;
  text-decoration: none;
}

.dashboard-button[hidden] { display: none; }
button.dashboard-button:not(:disabled) { cursor: pointer; }
.dashboard-button:disabled { opacity: .55; }
.dashboard-button:hover:not(:disabled) { background-color: #1a1d24; }

.dashboard-button svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-button--navigate::after {
  content: "";
  width: 18px;
  height: 18px;
  flex: none;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14m-6-6 6 6-6 6' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.top #guild-invite { margin-top: 12px; }

.pill {
  border-radius: 7px !important;
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 206px minmax(0, 1fr) !important;
  }

  .side {
    width: 206px;
  }

  main {
    padding: 24px 20px 44px !important;
  }
}

@media (max-width: 680px) {
  .shell {
    display: block !important;
  }

  .side {
    position: relative !important;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 10px 12px !important;
    border-width: 0 0 1px !important;
    overflow-y: visible;
    z-index: auto;
  }

  .side .brand {
    padding-bottom: 8px;
  }

  .side .nav,
  .side .nav-section,
  .side #servers-wrap {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
  }

  .side h2 {
    grid-column: 1 / -1;
  }

  .me {
    margin-top: 0 !important;
  }

  main {
    padding: 22px 14px 36px !important;
  }
}

/* Plano e cobrança: destaque permanente e estado Premium ativo */
#premium-nav-link,
a.nav-link[href="/dashboard/subscribe"] {
  color: #e5ddff !important;
  background: rgb(167 139 250 / .10) !important;
  border-color: rgb(167 139 250 / .22) !important;
  font-weight: 600 !important;
}

#premium-nav-link:hover,
a.nav-link[href="/dashboard/subscribe"]:hover {
  color: #fff !important;
  background: rgb(167 139 250 / .17) !important;
  border-color: rgb(167 139 250 / .34) !important;
}

#premium-nav-link.premium-active,
a.nav-link[href="/dashboard/subscribe"].premium-active {
  color: #bbf7d0 !important;
  background: rgba(34, 197, 94, .10) !important;
  border-color: rgba(34, 197, 94, .28) !important;
}

#premium-nav-link.premium-active #premium-label,
a.nav-link[href="/dashboard/subscribe"].premium-active #premium-label {
  color: #bbf7d0 !important;
}

#premium-nav-link.premium-active .nav-icon svg {
  fill: var(--rk-green) !important;
}

#premium-nav-link.premium-active::after,
a.nav-link[href="/dashboard/subscribe"].premium-active::after {
  content: "●";
  margin-left: auto;
  padding-left: 8px;
  color: var(--rk-green);
  font-size: .62rem;
}
.tiktok-badge {
    border: 1px solid #626272;
    border-radius: 999px;
    padding: 2px 8px;
    background: #30303b;
    color: #e4e4e9;
    font-size: .72rem;
    white-space: nowrap;
}

textarea.field#message {
    font: inherit;
    color: inherit;
    resize: vertical;
    scrollbar-width: thin;
    scrollbar-color: var(--rk-muted) transparent;
}

@supports not (scrollbar-color: auto) {
    textarea.field#message::-webkit-scrollbar {
        width: 8px;
    }

    textarea.field#message::-webkit-scrollbar-thumb {
        background: var(--rk-muted);
        border: 2px solid transparent;
        border-radius: 8px;
        background-clip: padding-box;
    }
}

.dc #pv-msg {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
