:root {
  --bg: #0a0c14;
  --bg-soft: #10131f;
  --panel: #12162494;
  --panel-solid: #12162a;
  --border: #23283d;
  --text: #eef0f8;
  --text-dim: #9198b5;
  --text-faint: #5c6288;
  --violet: #7c5cff;
  --cyan: #00d4ff;
  --gradient: linear-gradient(135deg, var(--violet), var(--cyan));
  --gradient-soft: linear-gradient(135deg, rgba(124, 92, 255, 0.16), rgba(0, 212, 255, 0.10));
  --ig-gradient: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  --radius: 14px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}

/* ================= LOGIN ================= */
.login-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 24px;
}

.login-page::before,
.login-page::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  z-index: 0;
}

.login-page::before {
  width: 480px;
  height: 480px;
  background: var(--violet);
  top: -160px;
  left: -140px;
  animation: float1 12s ease-in-out infinite;
}

.login-page::after {
  width: 420px;
  height: 420px;
  background: var(--cyan);
  bottom: -160px;
  right: -120px;
  animation: float2 14s ease-in-out infinite;
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.08); }
}

@keyframes float2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, -20px) scale(1.05); }
}

.login-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 50% 40%, rgba(0,0,0,0.9), transparent 70%);
  z-index: 0;
}

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  background: rgba(18, 20, 34, 0.72);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 44px 38px 36px;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  animation: rise 0.5s ease;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 30px;
  text-align: center;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  color: #fff;
  box-shadow: 0 8px 24px -6px rgba(124, 92, 255, 0.55);
  margin-bottom: 8px;
}

img.brand-mark {
  display: block;
  width: 76px;
  height: 76px;
  border-radius: 18px;
  object-fit: cover;
  background: #01060f;
  box-shadow: 0 10px 28px -8px rgba(41, 140, 255, 0.55);
}

.brand-name {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-tagline {
  font-size: 13px;
  color: var(--text-dim);
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap svg {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  color: var(--text-faint);
  pointer-events: none;
}

.input-wrap input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 14px 12px 40px;
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input-wrap input:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18);
}

.btn-primary {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 13px 16px;
  font-size: 14.5px;
  font-weight: 600;
  color: #fff;
  background: var(--gradient);
  cursor: pointer;
  margin-top: 6px;
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
  box-shadow: 0 10px 24px -8px rgba(124, 92, 255, 0.55);
}

.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.form-errors {
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.35);
  color: #ff8f8f;
  font-size: 13px;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 18px;
}

.login-footnote {
  text-align: center;
  color: var(--text-faint);
  font-size: 12px;
  margin-top: 24px;
}

.login-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 10px;
  font-size: 12px;
}

.login-links a {
  color: var(--text-dim);
}

.login-links a:hover {
  color: var(--text);
}

/* ================= PÁGINAS PÚBLICAS (privacidade, termos, exclusão) ================= */
.legal-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

.legal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 24px;
  margin-bottom: 24px;
}

.legal-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legal-brand img.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  box-shadow: none;
}

.legal-brand .brand-name {
  font-size: 18px;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.legal-nav a {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-dim);
  border: 1px solid transparent;
}

.legal-nav a:hover {
  color: var(--text);
}

.legal-nav a[aria-current="page"] {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.legal-card {
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 40px;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-dim);
}

.legal-card h1 {
  margin: 0;
  font-size: 26px;
  color: var(--text);
}

.legal-card h2 {
  margin: 32px 0 10px;
  font-size: 17px;
  color: var(--text);
}

.legal-card h3 {
  margin: 20px 0 6px;
  font-size: 14.5px;
  color: var(--text);
}

.legal-card p {
  margin: 0 0 12px;
}

.legal-card ul,
.legal-card ol {
  margin: 0 0 12px;
  padding-left: 22px;
}

.legal-card li + li {
  margin-top: 6px;
}

.legal-card strong {
  color: var(--text);
}

.legal-card a {
  color: var(--cyan);
}

.legal-card code {
  font-size: 13px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  overflow-wrap: anywhere;
}

.legal-updated {
  font-size: 12.5px;
  color: var(--text-faint);
  margin: 6px 0 24px !important;
}

.legal-status {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  margin-bottom: 22px;
  border-radius: 12px;
  border: 1px solid rgba(255, 107, 107, 0.35);
  background: rgba(255, 107, 107, 0.08);
}

.legal-status--ok {
  border-color: rgba(61, 220, 132, 0.35);
  background: rgba(61, 220, 132, 0.08);
}

.legal-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
}

.legal-footer a {
  color: var(--text-dim);
}

@media (max-width: 640px) {
  .legal-page {
    padding: 16px 16px 32px;
  }

  .legal-card {
    padding: 24px 20px;
    font-size: 14px;
  }

  .legal-card h1 {
    font-size: 22px;
  }
}

/* ================= APP LAYOUT ================= */
.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  flex-shrink: 0;
  transition: width 0.2s ease, transform 0.25s ease;
  z-index: 30;
  background: var(--bg-soft);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 22px 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand .brand-mark {
  width: 38px;
  height: 38px;
  font-size: 14px;
  border-radius: 10px;
  margin-bottom: 0;
}

.sidebar-brand .brand-name {
  font-size: 18px;
}

.sidebar-nav {
  flex: 1;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--text-faint);
  text-transform: uppercase;
  padding: 8px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  position: relative;
  transition: background 0.15s, color 0.15s;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.nav-item.active {
  background: var(--gradient-soft);
  color: #fff;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 4px;
  background: var(--gradient);
}

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-footer .user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-footer .user-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-footer .user-role {
  font-size: 11.5px;
  color: var(--text-faint);
}

.logout-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.logout-btn:hover {
  background: rgba(255, 60, 60, 0.12);
  color: #ff6b6b;
}

.logout-btn svg {
  width: 17px;
  height: 17px;
}

/* ---------- Main content ---------- */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 32px;
  border-bottom: 1px solid var(--border);
}

.topbar-title {
  flex: 1;
  min-width: 0;
}

.topbar h1 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.topbar p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-dim);
}

.content {
  flex: 1;
  padding: 32px;
}

.messages {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

.messages li {
  background: var(--gradient-soft);
  border: 1px solid rgba(124, 92, 255, 0.3);
  color: var(--text);
  font-size: 13.5px;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 10px;
}

/* ---------- Empty state / cards ---------- */
.empty-state {
  max-width: 460px;
  margin: 60px auto 0;
  text-align: center;
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 44px 36px;
  box-shadow: var(--shadow);
}

.empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ig-gradient);
}

.empty-icon svg {
  width: 36px;
  height: 36px;
  color: #fff;
}

.empty-state h2 {
  font-size: 18px;
  margin: 0 0 10px;
}

.empty-state p {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.6;
  margin: 0 0 26px;
}

.btn-instagram {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: none;
  border-radius: 10px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--ig-gradient);
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s;
  box-shadow: 0 10px 24px -8px rgba(220, 39, 67, 0.5);
}

.btn-instagram:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-instagram svg {
  width: 18px;
  height: 18px;
}

.card {
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3ddc84;
  box-shadow: 0 0 0 3px rgba(61, 220, 132, 0.15);
  display: inline-block;
  flex-shrink: 0;
}

/* ---------- Account chip (topbar) ---------- */
.account-chip {
  position: relative;
}

.account-chip summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s, background 0.15s;
}

.account-chip summary::-webkit-details-marker {
  display: none;
}

.account-chip--estatico summary {
  pointer-events: none;
}

.account-chip summary:hover,
.account-chip[open] summary {
  border-color: var(--text-faint);
  background: rgba(255, 255, 255, 0.04);
}

.account-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  padding: 2px;
  background: var(--ig-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.account-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bg);
  display: block;
}

.account-avatar--fallback svg {
  width: 15px;
  height: 15px;
  color: #fff;
}

.account-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.account-handle {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}

.account-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-faint);
}

.account-caret {
  width: 14px;
  height: 14px;
  color: var(--text-faint);
  transition: transform 0.15s;
}

.account-chip[open] .account-caret {
  transform: rotate(180deg);
}

.account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 190px;
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  box-shadow: var(--shadow);
  z-index: 20;
}

.account-menu form {
  margin: 0;
}

.account-menu button {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 13px;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.account-menu button:hover {
  background: rgba(255, 60, 60, 0.1);
  color: #ff6b6b;
}

/* ---------- Dashboard ---------- */
.dash {
  max-width: 1000px;
  margin: 0 auto;
}

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

.dash-head .section-title {
  margin: 0;
}

.dash-head-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dash-head-hint {
  font-size: 12px;
  color: var(--text-faint);
}

.followers-total {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-faint);
}

.followers-total strong {
  color: var(--text-dim);
  font-weight: 600;
}

.followers-total svg {
  width: 14px;
  height: 14px;
}

.period-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}

.period-filter select,
.period-filter input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 999px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 12px;
  outline: none;
  cursor: pointer;
  color-scheme: dark;
  transition: border-color 0.15s, color 0.15s;
}

.period-filter select {
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239198b5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 13px;
}

.period-filter select option {
  background: var(--panel-solid);
  color: var(--text);
}

.period-filter select:hover,
.period-filter input[type="date"]:hover,
.period-filter select:focus,
.period-filter input[type="date"]:focus {
  border-color: var(--text-faint);
  color: var(--text);
}

.period-range {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.period-sep {
  font-size: 12px;
  color: var(--text-faint);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.stat-card {
  --accent: var(--violet);
  --accent-soft: rgba(124, 92, 255, 0.14);
  position: relative;
  overflow: hidden;
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px 16px;
  transition: border-color 0.2s, transform 0.2s;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.08;
  filter: blur(30px);
  pointer-events: none;
}

.stat-card:hover {
  border-color: var(--text-faint);
  transform: translateY(-2px);
}

.stat-card--likes {
  --accent: #f5426f;
  --accent-soft: rgba(245, 66, 111, 0.14);
}

.stat-card--views {
  --accent: #f5a524;
  --accent-soft: rgba(245, 165, 36, 0.14);
}

.stat-card--comments {
  --accent: var(--cyan);
  --accent-soft: rgba(0, 212, 255, 0.12);
}

.stat-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.stat-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 14px;
  height: 14px;
}

.stat-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.1;
  color: var(--text);
}

.stat-value.is-up {
  color: #3ddc84;
}

.stat-value.is-down {
  color: #ff6b6b;
}

.stat-value--muted {
  color: var(--text-faint);
}

.stat-period {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 8px;
}

.stat-compare {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-top: 8px;
  font-size: 12px;
}

.stat-compare-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px 2px 6px;
  border-radius: 999px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.stat-compare-pill svg {
  width: 12px;
  height: 12px;
}

.stat-compare--up .stat-compare-pill {
  color: #3ddc84;
  background: rgba(61, 220, 132, 0.12);
}

.stat-compare--down .stat-compare-pill {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.12);
}

.stat-compare--equal .stat-compare-pill {
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.06);
}

.stat-compare-label {
  color: var(--text-faint);
  white-space: nowrap;
}

.section-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 16px;
}

/* ---------- Gráficos de barras ---------- */
.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 40px;
}

.chart-card {
  --bar: var(--violet);
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px 14px;
  min-width: 0;
}

.chart-card--curtidas {
  --bar: #f5426f;
}

.chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.chart-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.chart-sub {
  font-size: 12px;
  color: var(--text-faint);
}

@media (max-width: 520px) {
  .chart-head {
    flex-wrap: wrap;
    gap: 2px 12px;
  }

  .chart-title {
    white-space: nowrap;
  }
}

.chart-empty {
  margin: 0;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-faint);
}

.chart-plot {
  position: relative;
  height: 180px;
  margin-left: 40px;
}

.chart-gridline {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.chart-gridline.is-zero {
  border-top-color: rgba(255, 255, 255, 0.16);
}

.chart-tick {
  position: absolute;
  right: calc(100% + 8px);
  top: -7px;
  font-size: 11px;
  line-height: 14px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.chart-bars {
  position: absolute;
  inset: 0;
  display: flex;
}

.chart-slot {
  position: relative;
  flex: 1;
  min-width: 0;
  border-radius: 6px;
  outline: none;
}

.chart-slot:hover,
.chart-slot:focus-visible {
  background: rgba(255, 255, 255, 0.035);
}

.chart-bar {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: min(24px, 62%);
  background: var(--bar);
  border-radius: 4px 4px 0 0;
}

.chart-bar.is-neg {
  border-radius: 0 0 4px 4px;
}

.chart-tip {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  flex-direction: column;
  gap: 2px;
  min-width: 120px;
  padding: 8px 10px;
  background: #1b2036;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  pointer-events: none;
}

.chart-tip strong {
  color: var(--text);
  font-weight: 600;
}

.chart-tip-title {
  color: var(--text-faint);
  font-size: 11px;
}

.chart-tip-note {
  color: var(--text-faint);
  font-size: 11px;
}

.chart-slot:first-child .chart-tip {
  left: 0;
  transform: none;
}

.chart-slot:last-child .chart-tip {
  left: auto;
  right: 0;
  transform: none;
}

.chart-slot:hover .chart-tip,
.chart-slot:focus-visible .chart-tip {
  display: flex;
}

.chart-xaxis {
  display: flex;
  margin: 8px 0 0 40px;
}

.chart-xaxis span {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 11px;
  color: var(--text-faint);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .chart-xaxis span.so-desktop {
    visibility: hidden;
  }
}

@media (max-width: 1100px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .chart-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .stat-grid {
    gap: 10px;
  }

  .stat-card {
    padding: 14px 14px 12px;
  }

  .stat-card:hover {
    transform: none;
  }

  .stat-top {
    gap: 8px;
    margin-bottom: 10px;
  }

  .stat-icon {
    width: 24px;
    height: 24px;
    border-radius: 7px;
  }

  .stat-icon svg {
    width: 12px;
    height: 12px;
  }

  .stat-label {
    font-size: 12px;
  }

  .stat-value {
    font-size: 22px;
  }

  .stat-compare {
    font-size: 11px;
    gap: 4px 6px;
  }

  .stat-compare-label {
    white-space: normal;
  }
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

@media (max-width: 1100px) {
  .media-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 860px) {
  .media-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

.media-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: -4px 0 14px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-dim);
}

.media-notice svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--text-faint);
}

.media-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel-solid);
  transition: transform 0.15s, border-color 0.15s;
}

.media-card:hover {
  transform: translateY(-2px);
  border-color: var(--text-faint);
}

.media-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-soft);
}

.media-type {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(10, 12, 20, 0.6);
  backdrop-filter: blur(6px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-type svg {
  width: 13px;
  height: 13px;
}

.media-stats {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.media-stats span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.media-stats svg {
  width: 13px;
  height: 13px;
  color: var(--text-faint);
}

@media (max-width: 860px) {
  .media-stats {
    gap: 8px;
    padding: 8px 10px;
    font-size: 11.5px;
  }

  .media-stats span {
    gap: 3px;
  }

  .media-stats svg {
    width: 12px;
    height: 12px;
  }
}

@media (max-width: 520px) {
  .media-stats {
    justify-content: space-between;
    gap: 4px;
    padding: 7px 8px;
    font-size: 11px;
  }

  .media-stats span {
    gap: 2px;
  }

  .media-stats svg {
    width: 11px;
    height: 11px;
  }

  .media-type {
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
  }
}

/* ---------- Público ---------- */
.aud-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.aud-card {
  min-width: 0;
  padding: 18px 20px;
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.aud-title {
  min-height: 28px;
  display: flex;
  align-items: center;
  margin: 0 0 12px;
  font-size: 13.5px;
  font-weight: 600;
}

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

.aud-head .aud-title {
  margin: 0;
}

.segmented {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}

.segmented-btn {
  padding: 4px 10px;
  border: none;
  border-radius: 999px;
  background: none;
  color: var(--text-faint);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.segmented-btn:hover {
  color: var(--text);
}

.segmented-btn[aria-pressed="true"] {
  background: rgba(124, 92, 255, 0.18);
  color: var(--text);
}

.aud-empty {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-faint);
}

.aud-count {
  font-size: 11.5px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.hbar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hbar-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 13px;
}

.hbar-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-dim);
}

.hbar-value {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.hbar-value strong {
  font-weight: 600;
  color: var(--text);
}

.hbar-track {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.hbar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--violet);
}

.gender-bar {
  display: flex;
  gap: 2px;
  height: 12px;
  margin-bottom: 18px;
  border-radius: 6px;
  overflow: hidden;
}

.gender-seg--f {
  background: #f5426f;
}

.gender-seg--m {
  background: var(--violet);
}

.gender-seg--u {
  background: #5c6288;
}

.gender-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gender-legend li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.gender-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.gender-name {
  flex: 1;
  color: var(--text-dim);
}

.gender-legend strong {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1100px) {
  .aud-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Usuários ---------- */
.access-legend {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 12.5px;
  color: var(--text-faint);
}

.access-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.role-badge--admin {
  background: rgba(124, 92, 255, 0.18);
  color: #b9a8ff;
}

.role-badge--editor {
  background: rgba(0, 212, 255, 0.14);
  color: #7fe6ff;
}

.role-badge--visualizador {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-dim);
}

.user-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.user-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
}

.user-row + .user-row {
  border-top: 1px solid var(--border);
}

.user-row-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.user-row-name {
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.user-row-you {
  margin-left: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-faint);
}

.user-row-login {
  font-size: 12px;
  color: var(--text-faint);
}

.icon-btn-placeholder {
  width: 28px;
  flex-shrink: 0;
}

.role-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.role-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--text-faint);
  cursor: pointer;
}

.role-option:has(input:checked) {
  border-color: var(--violet);
  background: rgba(124, 92, 255, 0.08);
}

.role-option input {
  margin-top: 2px;
  accent-color: var(--violet);
}

.role-option span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.role-option strong {
  font-size: 13px;
  color: var(--text);
}

.field-error {
  margin: 0;
  font-size: 12px;
  color: #ff8f8f;
}

/* ---------- Campos e botões compartilhados ---------- */
.field {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  color-scheme: dark;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field::placeholder {
  color: var(--text-faint);
}

.field:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18);
}

.btn-sm {
  width: auto;
  margin-top: 0;
  padding: 10px 16px;
  font-size: 13px;
  box-shadow: none;
  white-space: nowrap;
}

.icon-btn {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border: none;
  background: none;
  color: var(--text-faint);
  border-radius: 7px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.icon-btn:hover {
  background: rgba(255, 60, 60, 0.1);
  color: #ff6b6b;
}

.icon-btn--neutral:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.icon-btn svg {
  width: 15px;
  height: 15px;
}

/* ---------- Programação (calendário) ---------- */
.agenda {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}

.cal,
.day-panel {
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}

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

.cal-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.cal-nav {
  display: flex;
  gap: 6px;
}

.cal-btn {
  height: 32px;
  min-width: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-dim);
  transition: border-color 0.15s, color 0.15s;
}

.cal-btn:hover {
  border-color: var(--text-faint);
  color: var(--text);
}

.cal-btn svg {
  width: 16px;
  height: 16px;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.cal-weekday {
  padding: 2px 0 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--text-faint);
}

.cal-day {
  min-height: 98px;
  min-width: 0;
  padding: 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.015);
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
}

.cal-day:hover {
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--border);
}

.cal-day.is-outside {
  opacity: 0.35;
}

.cal-day.is-selected {
  border-color: var(--violet);
  background: rgba(124, 92, 255, 0.08);
}

.cal-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.cal-day.is-today .cal-num {
  background: var(--gradient);
  color: #fff;
}

.cal-chip {
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(124, 92, 255, 0.16);
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-chip.is-done {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-faint);
  text-decoration: line-through;
}

.cal-more {
  padding-left: 2px;
  font-size: 10.5px;
  color: var(--text-faint);
}

.cal-dot {
  display: none;
}

.day-panel {
  position: sticky;
  top: 20px;
}

.day-title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
}

.day-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.day-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.day-item form {
  margin: 0;
  display: flex;
}

.check {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1.5px solid var(--text-faint);
  border-radius: 5px;
  background: transparent;
  color: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.check:hover {
  border-color: var(--violet);
}

.check svg {
  width: 12px;
  height: 12px;
}

.check--estatico {
  cursor: default;
}

.check--estatico:hover {
  border-color: var(--text-faint);
}

.day-item.is-done .check {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
}

.day-item-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.day-item-title {
  font-size: 13.5px;
  overflow-wrap: anywhere;
}

.day-item.is-done .day-item-title {
  color: var(--text-faint);
  text-decoration: line-through;
}

.day-item-time {
  font-size: 11.5px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.day-empty {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--text-faint);
}

.day-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.day-form-row {
  display: flex;
  gap: 8px;
}

.day-form-row .field {
  flex: 1;
  min-width: 0;
}

@media (max-width: 1000px) {
  .agenda {
    grid-template-columns: 1fr;
  }

  .day-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .cal {
    padding: 14px 10px;
  }

  .cal-grid {
    gap: 2px;
  }

  .cal-day {
    min-height: 46px;
    padding: 4px 2px;
    align-items: center;
  }

  .cal-chip,
  .cal-more {
    display: none;
  }

  .cal-dot {
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--violet);
  }
}

/* ---------- Tarefas (quadro) ---------- */
.board {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
}

.board-list {
  --cor-lista: var(--violet);
  position: relative;
  flex: 0 0 280px;
  max-height: calc(100vh - 190px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.board-list::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 4px;
  border-radius: 14px 14px 0 0;
  background: var(--cor-lista);
}

.board-list.is-dragging {
  opacity: 0.45;
}

.board-list--new {
  flex-basis: 220px;
  background: transparent;
  border-style: dashed;
}

.board-list--new::before {
  display: none;
}

.board-list form {
  margin: 0;
}

.board-list-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.board-list-name {
  flex: 1;
  min-width: 0;
}

.board-list-title {
  width: 100%;
  padding: 4px 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  outline: none;
}

.board-list-title:hover {
  background: rgba(255, 255, 255, 0.04);
}

.board-list-title:focus {
  border-color: var(--violet);
  background: rgba(255, 255, 255, 0.03);
}

.board-count {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.board-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 8px;
  overflow-y: auto;
}

.board-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 10px 6px 10px 12px;
  overflow: hidden;
  background: #1a1f36;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: grab;
  transition: border-color 0.15s;
}

.board-card:hover {
  border-color: var(--text-faint);
}

.board-card--leitura {
  cursor: pointer;
}

span.board-list-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

span.board-list-title:hover {
  background: transparent;
}

.board-card.is-dragging {
  opacity: 0.35;
  border-style: dashed;
}

.board-card-title {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
  font-size: 13.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.board-add-btn {
  width: 100%;
  padding: 9px 12px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text-faint);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.board-add-btn:hover {
  border-color: var(--text-faint);
  color: var(--text);
}

.board-grip {
  width: 16px;
  height: 24px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--text-faint);
  cursor: grab;
}

.board-grip:hover {
  color: var(--text);
}

.board-grip svg {
  width: 14px;
  height: 14px;
}

.board-card-cover {
  display: block;
  width: calc(100% + 18px);
  margin: -10px -6px 8px -12px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 9px 9px 0 0;
  background: var(--bg-soft);
}

.board-card-cover--video {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 12px;
}

.board-card-cover--video svg {
  width: 18px;
  height: 18px;
}

.board-card-caption {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-faint);
  white-space: pre-line;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Janelas (modal) ---------- */
.modal {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel-solid);
  color: var(--text);
  box-shadow: var(--shadow);
}

.modal::backdrop {
  background: rgba(5, 6, 12, 0.7);
  backdrop-filter: blur(3px);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px;
}

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

.modal-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.modal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.modal-foot-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.field-label {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
}

.field-hint {
  margin: 0;
  font-size: 11.5px;
  color: var(--text-faint);
}

textarea.field {
  resize: vertical;
  min-height: 96px;
  line-height: 1.5;
}

.field-file {
  padding: 8px;
  font-size: 12.5px;
  color: var(--text-dim);
}

.field-file::file-selector-button {
  margin-right: 10px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
}

.midia-preview img,
.midia-preview video {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--bg-soft);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-dim);
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.swatch {
  position: relative;
  cursor: pointer;
}

.swatch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.swatch span {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  box-shadow: 0 0 0 2px var(--panel-solid) inset;
}

.swatch input:checked + span {
  border-color: var(--text);
}

.swatch input:focus-visible + span {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.btn-ghost {
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--text-faint);
  color: var(--text);
}

.btn-ghost:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-text-danger {
  padding: 8px 0;
  border: none;
  background: none;
  color: #ff6b6b;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}

.btn-text-danger:hover {
  text-decoration: underline;
}

/* ---------- Menu lateral: recolher no computador, abrir por cima no celular ---------- */
.menu-btn,
.sidebar-close {
  display: none;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
}

.menu-btn svg,
.sidebar-close svg {
  width: 20px;
  height: 20px;
}

.sidebar-close {
  margin-left: auto;
  border: none;
  background: none;
  color: var(--text-dim);
}

.sidebar-toggle {
  position: absolute;
  top: 29px;
  right: -13px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: color 0.15s, border-color 0.15s, transform 0.2s;
}

.sidebar-toggle:hover {
  color: var(--text);
  border-color: var(--text-faint);
}

.sidebar-toggle svg {
  width: 14px;
  height: 14px;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(3, 5, 12, 0.6);
  backdrop-filter: blur(2px);
}

@media (min-width: 861px) {
  .menu-recolhido .sidebar {
    width: 76px;
  }

  .menu-recolhido .sidebar-toggle {
    transform: rotate(180deg);
  }

  .menu-recolhido .sidebar-brand .brand-name,
  .menu-recolhido .nav-item span,
  .menu-recolhido .nav-label,
  .menu-recolhido .sidebar-footer .user-info {
    display: none;
  }

  .menu-recolhido .sidebar-brand,
  .menu-recolhido .nav-item {
    justify-content: center;
  }

  .menu-recolhido .sidebar-brand {
    padding-left: 0;
    padding-right: 0;
  }

  .menu-recolhido .sidebar-footer {
    flex-direction: column;
    padding: 14px 0;
  }
}

@media (max-width: 860px) {
  .menu-btn,
  .sidebar-close {
    display: flex;
  }

  .sidebar-toggle {
    display: none;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    height: 100dvh;
    width: min(280px, 84vw);
    z-index: 60;
    transform: translateX(-100%);
    box-shadow: none;
  }

  .menu-aberto .sidebar {
    transform: none;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.6);
  }

  .menu-aberto body {
    overflow: hidden;
  }

  .sidebar-nav {
    overflow-y: auto;
  }

  .nav-item {
    padding: 12px;
    font-size: 15px;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    padding: 12px 16px;
    background: rgba(10, 12, 20, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .topbar h1 {
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar p {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .content {
    padding: 18px 16px 32px;
  }

  .account-meta {
    display: none;
  }
}

@media (max-width: 860px) {
  .board {
    margin: 0 -16px;
    padding: 0 16px 12px;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 16px;
    -webkit-overflow-scrolling: touch;
  }

  .board-list {
    flex-basis: min(300px, 82vw);
    max-height: calc(100dvh - 150px);
    scroll-snap-align: start;
  }

  .board-list--new {
    flex-basis: min(240px, 70vw);
  }
}

/* No iPhone, campo com letra menor que 16px faz a página dar zoom ao tocar. */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 860px) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
    select,
    textarea {
      font-size: 16px !important;
    }
  }
}
