
    :root {
      --bg: #0a0d14;
      --surface: #111520;
      --surface2: #171d2e;
      --border: #1e2840;
      --border2: #252f4a;
      --accent: #4f8cff;
      --accent2: #7c3aed;
      --green: #10d98b;
      --amber: #f59e0b;
      --red: #ef4444;
      --text: #e8edf8;
      --text2: #b0b9d4;
      --text3: #6b7b9c;

      /* Tipografia - Tamanhos base */
      --font-size-base: 14px;
      --font-scale: 1;
      --font-size-xs: calc(11px * var(--font-scale));
      --font-size-sm: calc(12px * var(--font-scale));
      --font-size-md: calc(14px * var(--font-scale));
      --font-size-lg: calc(16px * var(--font-scale));
      --font-size-xl: calc(18px * var(--font-scale));
      --font-size-2xl: calc(20px * var(--font-scale));
      --font-size-3xl: calc(24px * var(--font-scale));
      --font-size-4xl: calc(28px * var(--font-scale));

      /* Espaçamento */
      --space-xs: 4px;
      --space-sm: 8px;
      --space-md: 16px;
      --space-lg: 24px;
      --space-xl: 32px;

      /* Line heights */
      --line-tight: 1.2;
      --line-normal: 1.5;
      --line-relaxed: 1.7;
    }

    /* ──────────────────────────────────────────────────────────
       FORMATAÇÃO DE DATAS - PADRÃO dd-MM-yyyy
       ────────────────────────────────────────────────────────── */
    /* Estilo para inputs de data no formato dd-MM-yyyy */
    input[type="text"].date-input-ddmmyyyy {
      font-family: 'DM Mono', monospace;
      font-size: 13px;
      letter-spacing: 0.5px;
    }

    /* Placeholder para inputs de data */
    input[type="text"].date-input-ddmmyyyy::placeholder {
      color: var(--text3);
      font-family: 'DM Mono', monospace;
    }

    /* Estilo de foco para inputs de data */
    input[type="text"].date-input-ddmmyyyy:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.08);
    }

    /* Input inválido (data mal formatada) */
    input[type="text"].date-input-ddmmyyyy.invalid {
      border-color: var(--red);
      background: rgba(239, 68, 68, 0.05);
    }

    /* Contêiner de input de data com botão de calendário */
    .date-input-wrapper {
      position: relative;
      display: inline-block;
      width: 100%;
    }

    .date-input-wrapper .date-input-icon {
      position: absolute;
      right: 10px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--text3);
      pointer-events: none;
      font-size: 14px;
    }

    /* Tooltip de erro de data */
    .date-error-tooltip {
      display: none;
      position: absolute;
      background: var(--red);
      color: white;
      padding: 4px 8px;
      border-radius: 4px;
      font-size: 11px;
      white-space: nowrap;
      z-index: 1000;
      bottom: calc(100% + 4px);
      left: 0;
    }

    .date-error-tooltip.show {
      display: block;
    }

    .date-input-wrapper:hover .date-input-icon {
      color: var(--text);
    }


    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box
    }

    body {
      font-family: 'Inter', sans-serif;
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
      overflow-x: hidden;
      font-size: var(--font-size-md);
      line-height: var(--line-normal);
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }

    /* Controles de tipografia */
    .typography-controls {
      display: flex;
      align-items: center;
      gap: 4px;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 2px;
    }

    .typography-controls .btn-icon {
      width: 32px;
      height: 32px;
      border: none;
      background: transparent;
      color: var(--text2);
      border-radius: 6px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 16px;
      transition: all 0.2s;
    }

    .typography-controls .btn-icon:hover {
      background: var(--surface);
      color: var(--text);
    }

    .typography-controls .btn-icon.active {
      background: var(--accent);
      color: white;
    }

    .typography-controls .font-size-indicator {
      min-width: 40px;
      text-align: center;
      font-size: 12px;
      color: var(--text2);
      font-family: 'JetBrains Mono', monospace;
    }

    /* Melhorias de tipografia */
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
      font-family: 'Outfit', sans-serif;
      font-weight: 600;
      line-height: var(--line-tight);
      letter-spacing: -0.02em;
    }

    .stat-value {
      font-family: 'Outfit', sans-serif;
      font-size: var(--font-size-3xl);
      font-weight: 700;
      letter-spacing: -0.02em;
      line-height: 1.2;
    }

    .stat-label {
      font-size: var(--font-size-xs);
      font-family: 'JetBrains Mono', monospace;
      text-transform: uppercase;
      letter-spacing: 0.03em;
      color: var(--text3);
      margin-bottom: 6px;
    }

    .table-title {
      font-family: 'Outfit', sans-serif;
      font-size: var(--font-size-lg);
      font-weight: 600;
      letter-spacing: -0.01em;
    }

    .page-title {
      font-family: 'Outfit', sans-serif;
      font-size: var(--font-size-xl);
      font-weight: 700;
      letter-spacing: -0.02em;
    }

    .nav-item span:not(.nav-icon) {
      font-size: var(--font-size-sm);
      font-weight: 500;
      letter-spacing: -0.01em;
    }

    .badge,
    .plat {
      font-family: 'JetBrains Mono', monospace;
      font-size: var(--font-size-xs);
      letter-spacing: 0;
    }

    td {
      font-size: var(--font-size-sm);
      line-height: var(--line-normal);
    }

    th {
      font-family: 'JetBrains Mono', monospace;
      font-size: var(--font-size-xs);
      letter-spacing: 0.03em;
      text-transform: uppercase;
      color: var(--text3);
      font-weight: 500;
    }

    .filter-label {
      font-size: var(--font-size-xs);
      letter-spacing: 0.03em;
    }

    .login-logo {
      text-align: center;
      margin-bottom: 16px;
    }

    .login-logo img {
      max-width: 100%;
      height: auto;
    }

    /* Melhor contraste */
    .text-muted {
      color: var(--text3);
    }

    .text-secondary {
      color: var(--text2);
    }

    /* Melhor espaçamento */
    .content {
      padding: var(--space-lg) var(--space-xl);
    }

    /* ============================================
   ESTILIZAÇÃO DE TODOS OS INPUTS DE DATA
   ============================================ */

    /* Estilos comuns para todos os inputs de data */
    input[type="date"],
    input[type="month"],
    input[type="datetime-local"],
    input[type="week"],
    input[type="time"],
    input[type="text"].date-input-ddmmyyyy {
      position: relative;
      background-repeat: no-repeat;
      background-position: right 10px center;
      background-size: 16px;
      padding-right: 36px;
    }

    /* Ícone padrão (calendário) para date, month, datetime-local, week e text.date-input-ddmmyyyy */
    input[type="date"],
    input[type="month"],
    input[type="datetime-local"],
    input[type="week"],
    input[type="text"].date-input-ddmmyyyy {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23e8edf8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
    }

    /* Ícone específico para time (relógio) */
    input[type="time"] {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23e8edf8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");
    }

    /* Remove o ícone padrão do WebKit (Chrome, Safari, Edge) para todos os tipos */
    input[type="date"]::-webkit-calendar-picker-indicator,
    input[type="month"]::-webkit-calendar-picker-indicator,
    input[type="datetime-local"]::-webkit-calendar-picker-indicator,
    input[type="week"]::-webkit-calendar-picker-indicator,
    input[type="time"]::-webkit-calendar-picker-indicator {
      opacity: 0;
      position: absolute;
      right: 0;
      width: 30px;
      height: 100%;
      cursor: pointer;
    }

    /* Estilização para o Firefox */
    @-moz-document url-prefix() {

      input[type="date"],
      input[type="month"],
      input[type="datetime-local"],
      input[type="week"],
      input[type="time"],
      input[type="text"].date-input-ddmmyyyy {
        color-scheme: dark;
      }
    }

    /* Hover - ícone mais claro */
    input[type="date"]:hover,
    input[type="month"]:hover,
    input[type="datetime-local"]:hover,
    input[type="week"]:hover,
    input[type="text"].date-input-ddmmyyyy:hover {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
    }

    input[type="time"]:hover {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");
    }

    /* Focus - ícone na cor de destaque */
    input[type="date"]:focus,
    input[type="month"]:focus,
    input[type="datetime-local"]:focus,
    input[type="week"]:focus,
    input[type="text"].date-input-ddmmyyyy:focus {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%234f8cff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
      border-color: var(--accent);
    }

    input[type="time"]:focus {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%234f8cff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cpolyline points='12 6 12 12 16 14'%3E%3C/polyline%3E%3C/svg%3E");
      border-color: var(--accent);
    }

    /* Estados desabilitados */
    input[type="date"]:disabled,
    input[type="month"]:disabled,
    input[type="datetime-local"]:disabled,
    input[type="week"]:disabled,
    input[type="time"]:disabled,
    input[type="text"].date-input-ddmmyyyy:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    input[type="date"]:disabled::-webkit-calendar-picker-indicator,
    input[type="month"]:disabled::-webkit-calendar-picker-indicator,
    input[type="datetime-local"]:disabled::-webkit-calendar-picker-indicator,
    input[type="week"]:disabled::-webkit-calendar-picker-indicator,
    input[type="time"]:disabled::-webkit-calendar-picker-indicator {
      cursor: not-allowed;
    }

    /* Ajuste específico para o placeholder em inputs de data */
    input[type="month"]::-webkit-datetime-edit,
    input[type="date"]::-webkit-datetime-edit,
    input[type="datetime-local"]::-webkit-datetime-edit,
    input[type="week"]::-webkit-datetime-edit,
    input[type="time"]::-webkit-datetime-edit {
      color: var(--text);
      font-family: 'DM Mono', monospace;
      font-size: 12px;
    }

    input[type="month"]::-webkit-datetime-edit-fields-wrapper,
    input[type="date"]::-webkit-datetime-edit-fields-wrapper,
    input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper,
    input[type="week"]::-webkit-datetime-edit-fields-wrapper,
    input[type="time"]::-webkit-datetime-edit-fields-wrapper {
      padding: 0;
    }

    input[type="month"]::-webkit-datetime-edit-text,
    input[type="date"]::-webkit-datetime-edit-text,
    input[type="datetime-local"]::-webkit-datetime-edit-text,
    input[type="week"]::-webkit-datetime-edit-text,
    input[type="time"]::-webkit-datetime-edit-text {
      color: var(--text3);
    }

    /* Estilização do dropdown de calendário nativo (quando abre) */
    ::-webkit-datetime-edit {
      padding: 0;
    }

    ::-webkit-calendar-picker-indicator {
      background: transparent;
    }

    /* Para garantir que o texto do mês/ano fique visível */
    input[type="month"] {
      color: var(--text);
    }

    /* ============================================
   FIM - ESTILIZAÇÃO DOS INPUTS DE DATA
   ============================================ */

    @media (max-width: 768px) {
      .content {
        padding: var(--space-md);
      }
    }

    .stat-card {
      padding: var(--space-lg);
    }

    .table-wrap td,
    .table-wrap th {
      padding: var(--space-md) var(--space-lg);
    }

    /* Melhor legibilidade em listas */
    .rank-name {
      font-weight: 600;
      font-size: var(--font-size-sm);
    }

    .rank-plat {
      font-size: var(--font-size-xs);
      color: var(--text3);
    }

    /* Melhor hierarquia visual */
    .chart-title {
      font-family: 'Outfit', sans-serif;
      font-size: var(--font-size-md);
      font-weight: 600;
      letter-spacing: -0.01em;
      margin-bottom: var(--space-md);
    }

    /* Restante do CSS permanece igual ao original */
    /* ── LAYOUT ─────────────────────────────── */
    .layout {
      display: flex;
      min-height: 100vh
    }

    #loginScreen {
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 100vh;
      background: var(--bg);
      padding: 20px;
    }

    #appScreen {
      display: none;
      width: 100%
    }

    /* ── LOGIN ──────────────────────────────── */
    .login-card {
      background: var(--surface);
      border: 1px solid var(--border2);
      border-radius: 20px;
      padding: 44px 40px;
      width: 100%;
      max-width: 400px;
      box-shadow: 0 32px 80px rgba(0, 0, 0, .6)
    }

    @media (max-width: 480px) {
      .login-card {
        padding: 30px 20px;
      }
    }

    .login-sub {
      font-size: var(--font-size-sm);
      color: var(--text3);
      margin-bottom: 32px;
      font-family: 'JetBrains Mono', monospace;
      text-align: center;
    }

    .login-hint {
      font-size: var(--font-size-xs);
      color: var(--text3);
      margin-top: 16px;
      text-align: center;
      line-height: var(--line-relaxed)
    }

    .login-hint b {
      color: var(--text2)
    }

    .password-wrap {
      position: relative;
      display: flex;
      align-items: center;
      width: 100%;
    }

    .password-wrap .fi {
      width: 100%;
      padding-right: 50px;
      box-sizing: border-box;
    }

    .toggle-pass {
      position: absolute;
      right: 10px;
      top: 50%;
      transform: translateY(-50%);
      width: 32px;
      height: 32px;
      background: transparent;
      border: none;
      color: #8ea0c9;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 3;
    }

    .toggle-pass:hover {
      color: #ffffff;
    }

    .toggle-pass svg {
      width: 20px;
      height: 20px;
    }


    /* ── SIDEBAR ────────────────────────────── */
    .sidebar {
      width: 240px;
      height: 100vh;
      overflow-y: auto;
      background: var(--surface);
      border-right: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      position: fixed;
      top: 0;
      left: 0;
      z-index: 100
    }

    .sidebar-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.5);
      backdrop-filter: blur(2px);
      z-index: 99;
      display: none;
      opacity: 0;
      transition: opacity 0.3s ease;
    }

    .sidebar-overlay.open {
      display: block;
      opacity: 1;
    }

    .btn-hamburger {
      display: none;
      background: transparent;
      border: none;
      color: var(--text);
      font-size: 24px;
      cursor: pointer;
      margin-right: 12px;
      padding: 5px;
      min-height: 44px;
      min-width: 44px;
      align-items: center;
      justify-content: center;
    }

    @media (max-width: 768px) {
      .btn-hamburger {
        display: flex;
      }
    }

    @media (max-width: 768px) {
      .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        width: 260px;
        box-shadow: 4px 0 24px rgba(0,0,0,0.5);
      }

      .sidebar.open {
        transform: translateX(0);
      }

      .main {
        margin-left: 0;
        width: 100%;
      }

      .topbar {
        left: 0;
      }
    }

    .sidebar-logo {
      padding: 22px 20px 18px;
      border-bottom: 1px solid var(--border)
    }

    .logo-mark {
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      display: flex;
      justify-content: center;
      align-items: center;
      text-align: center;
      width: 100%;
    }

    .logo-sub {
      font-size: var(--font-size-xs);
      color: var(--text3);
      font-family: 'JetBrains Mono', monospace;
      margin-top: 2px;
      letter-spacing: 1px;
      text-transform: uppercase;
      text-align: center;
    }

    .sidebar-section {
      padding: 14px 12px 6px
    }

    .sidebar-section-label {
      font-size: 10px;
      font-family: 'JetBrains Mono', monospace;
      color: var(--text3);
      text-transform: uppercase;
      letter-spacing: 1.5px;
      padding: 0 8px 8px
    }

    .nav-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 9px 12px;
      border-radius: 8px;
      cursor: pointer;
      transition: all .2s;
      color: var(--text2);
      margin-bottom: 2px;
      border: 1px solid transparent
    }

    .nav-item:hover {
      background: var(--surface2);
      color: var(--text)
    }

    .nav-item.active {
      background: linear-gradient(135deg, rgba(79, 140, 255, .15), rgba(124, 58, 237, .1));
      color: var(--accent);
      border-color: rgba(79, 140, 255, .2)
    }

    .nav-icon {
      width: 15px;
      height: 15px;
      flex-shrink: 0
    }

    .sidebar-footer {
      margin-top: auto;
      padding: 14px;
      border-top: 1px solid var(--border)
    }

    .user-badge {
      display: flex;
      align-items: center;
      gap: 10px
    }

    .avatar {
      width: 32px;
      height: 32px;
      border-radius: 8px;
      background: linear-gradient(135deg, var(--accent), var(--accent2));
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      color: #fff;
      flex-shrink: 0
    }

    .user-info .uname {
      font-weight: 600;
    }

    .user-info .urole {
      font-size: 10px;
      color: var(--text3);
      font-family: 'JetBrains Mono', monospace;
      text-transform: uppercase
    }

    .logout-btn {
      margin-left: auto;
      width: 28px;
      height: 28px;
      border-radius: 7px;
      border: 1px solid var(--border2);
      background: transparent;
      color: var(--text3);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      transition: all .2s
    }

    .logout-btn:hover {
      background: rgba(239, 68, 68, .1);
      color: var(--red);
      border-color: rgba(239, 68, 68, .3)
    }

    /* ── MAIN ───────────────────────────────── */
    .main {
      margin-left: 240px;
      flex: 1;
      width: calc(100% - 240px);
    }

    @media (max-width: 768px) {
      .main {
        margin-left: 0;
        width: 100%;
      }
    }

    .topbar {
      position: sticky;
      top: 0;
      z-index: 90;
      background: rgba(10, 13, 20, .9);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid var(--border);
      padding: 0 28px;
      height: 58px;
      display: flex;
      align-items: center;
      justify-content: flex-start
    }

    @media (max-width: 768px) {
      .topbar {
        padding: 10px 15px;
        height: auto;
        flex-wrap: wrap;
      }

      .topbar .page-title {
        font-size: 16px;
      }

      .topbar-right {
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
        justify-content: flex-end;
        gap: 8px;
      }

      .topbar-right .btn,
      .topbar-right .fsel {
        flex: 1;
        justify-content: center;
      }

      .typography-controls {
        display: none !important;
      }
    }

    .topbar-right {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-left: auto;
    }

    /* ── BUTTONS ────────────────────────────── */
    .btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 8px 16px;
      border-radius: 8px;
      border: none;
      cursor: pointer;
      font-weight: 600;
      font-family: 'Inter', sans-serif;
      transition: all .2s;
      min-height: 44px;
    }

    .btn-primary {
      background: linear-gradient(135deg, var(--accent), var(--accent2));
      color: #fff
    }

    .btn-primary:hover {
      opacity: .9;
      transform: translateY(-1px);
      box-shadow: 0 4px 16px rgba(79, 140, 255, .3)
    }

    .btn-primary:disabled {
      opacity: .4;
      cursor: not-allowed;
      transform: none
    }

    .btn-ghost {
      background: transparent;
      border: 1px solid var(--border2);
      color: var(--text2)
    }

    .btn-ghost:hover {
      background: var(--surface2);
      color: var(--text)
    }

    .btn-sm {
      padding: 5px 12px;
      font-size: 12px
    }

    .btn-danger {
      background: rgba(239, 68, 68, .12);
      border: 1px solid rgba(239, 68, 68, .25);
      color: var(--red)
    }

    .btn-danger:hover {
      background: rgba(239, 68, 68, .22)
    }

    /* ── FILTER BAR ─────────────────────────── */
    .filter-bar {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      align-items: center;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 12px 16px;
      margin-bottom: 20px
    }

    @media (max-width: 640px) {
      .filter-bar {
        flex-direction: column;
        align-items: stretch;
      }

      .filter-bar .filter-label {
        margin-bottom: 5px;
      }
    }

    .filter-label {
      font-size: 10px;
      color: var(--text3);
      font-family: 'JetBrains Mono', monospace;
      text-transform: uppercase;
      letter-spacing: 1px
    }

    .fsel,
    .finp {
      background: var(--surface2);
      border: 1px solid var(--border2);
      color: var(--text);
      border-radius: 7px;
      padding: 6px 10px;
      font-family: 'Inter', sans-serif;
      outline: none
    }

    .fsel:focus,
    .finp:focus {
      border-color: var(--accent)
    }

    /* ── STATS GRID (DASHBOARD) ─────────────────────────── */
    .stats-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 14px;
      margin-bottom: 20px
    }

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

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

    .stat-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 13px;
      position: relative;
      overflow: hidden
    }

    .stat-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 2px;
      background: var(--ac, linear-gradient(90deg, var(--accent), var(--accent2)))
    }

    .stat-sub {
      color: var(--text2);
      margin-top: 3px
    }

    /* ── CHARTS GRID ──────────────────────────────── */
    .charts-grid {
      display: grid;
      grid-template-columns: 2fr 1fr;
      gap: 14px;
      margin-bottom: 20px
    }

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

    .chart-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 13px;
      padding: 18px
    }

    .bar-chart {
      display: flex;
      align-items: flex-end;
      gap: 6px;
      height: 160px;
      padding: 0 2px
    }

    @media (max-width: 480px) {
      .bar-chart {
        gap: 3px;
      }

      .bar-label {
        font-size: 7px;
      }
    }

    .bar-col {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
      height: 100%;
      justify-content: flex-end
    }

    .bar-fill {
      width: 100%;
      border-radius: 4px 4px 0 0;
      background: linear-gradient(180deg, var(--accent), var(--accent2));
      min-height: 2px;
      transition: height .4s ease
    }

    .bar-fill:hover {
      filter: brightness(1.2)
    }

    .bar-label {
      font-size: 9px;
      color: var(--text3);
      font-family: 'JetBrains Mono', monospace;
      white-space: nowrap
    }

    .bar-val {
      font-size: 9px;
      color: var(--text2);
      font-family: 'JetBrains Mono', monospace
    }

    /* ── DONUT ───────────────────────────────── */
    .donut-legend {
      margin-top: 10px
    }

    .leg-item {
      display: flex;
      align-items: center;
      gap: 7px;
      padding: 5px 0;
      border-bottom: 1px solid var(--border)
    }

    .leg-item:last-child {
      border: none
    }

    .leg-dot {
      width: 9px;
      height: 9px;
      border-radius: 3px;
      flex-shrink: 0
    }

    .leg-label {
      flex: 1;
      color: var(--text2)
    }

    .leg-val {
      font-family: 'JetBrains Mono', monospace;
      font-weight: 500;
      color: var(--text)
    }

    /* ── RANKING E ÚLTIMOS LANÇAMENTOS GRID ─────────────────────────────── */
    .dashboard-bottom-grid {
      display: grid;
      grid-template-columns: 1fr 2fr;
      gap: 14px;
    }

    @media (max-width: 768px) {
      .dashboard-bottom-grid {
        grid-template-columns: 1fr;
      }
    }

    /* ── TABLE ──────────────────────────────── */
    .table-wrap {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 13px;
      overflow: hidden;
      margin-bottom: 20px;
      overflow-x: auto;
    }

    .table-wrap table {
      min-width: 100%;
    }

    @media (max-width: 768px) {
      .table-wrap table {
        min-width: 100%;
      }
      
      .table-wrap table, 
      .table-wrap thead, 
      .table-wrap tbody, 
      .table-wrap th, 
      .table-wrap td, 
      .table-wrap tr {
        display: block;
      }
      
      .table-wrap thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
      }
      
      .table-wrap tbody tr {
        margin-bottom: 15px;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: var(--bg);
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
        padding: 5px 0;
      }
      
      .table-wrap tbody tr:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
      }
      
      .table-wrap tbody td {
        border-bottom: 1px solid var(--border2);
        padding: 10px 15px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
        gap: 10px;
      }
      
      .table-wrap tbody td:last-child {
        border-bottom: none;
      }
      
      .table-wrap tbody td::before {
        content: attr(data-label);
        font-family: 'JetBrains Mono', monospace;
        font-size: 11px;
        color: var(--text3);
        text-transform: uppercase;
        font-weight: 600;
        text-align: left;
        flex-shrink: 0;
      }

      .table-wrap tbody td:empty {
        display: none;
      }

      .table-wrap tbody td.empty-state {
        display: block;
        text-align: center;
        padding: 40px 20px;
      }
      
      .table-wrap tbody td.empty-state::before {
        display: none;
      }

      /* Fix actions alignment */
      .action-row {
        justify-content: flex-end;
      }
    }

    .table-header {
      padding: 16px 20px;
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: space-between
    }

    .table-sub {
      color: var(--text3);
      margin-top: 2px
    }

    table {
      width: 100%;
      border-collapse: collapse
    }

    thead th {
      text-align: left;
      padding: 10px 16px;
      border-bottom: 1px solid var(--border);
      background: rgba(255, 255, 255, .02)
    }

    tbody tr {
      border-bottom: 1px solid var(--border);
      transition: all .25s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
    }

    tbody tr:last-child {
      border-bottom: none
    }

    tbody tr:hover {
      background: rgba(79, 140, 255, 0.05);
      /* Slight accent color highlight */
      transform: translateY(-2px) scale(1.002);
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
      z-index: 10;
    }

    tbody td {
      padding: 12px 16px;
      vertical-align: middle
    }

    tfoot .total-row {
      background: linear-gradient(90deg, rgba(79, 140, 255, 0.1), rgba(0, 242, 234, 0.05));
      font-weight: 700;
      border-top: 2px solid var(--border);
      color: var(--text);
    }

    tfoot .total-row td {
      padding: 14px 16px;
      vertical-align: middle;
    }

    .mono {
      font-family: 'JetBrains Mono', monospace;
    }

    /* ── BADGES ─────────────────────────────── */
    .badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 3px 9px;
      border-radius: 20px;
      font-weight: 600;
      font-family: 'JetBrains Mono', monospace
    }

    .badge.active {
      background: rgba(16, 217, 139, .12);
      color: var(--green);
      border: 1px solid rgba(16, 217, 139, .25)
    }

    .badge.inactive {
      background: rgba(239, 68, 68, .1);
      color: var(--red);
      border: 1px solid rgba(239, 68, 68, .2)
    }

    .badge.warn {
      background: rgba(245, 158, 11, .12);
      color: var(--amber);
      border: 1px solid rgba(245, 158, 11, .25)
    }

    .dot {
      width: 5px;
      height: 5px;
      border-radius: 50%;
      background: currentColor
    }

    .plat {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 2px 8px;
      border-radius: 5px;
      font-weight: 600;
      font-family: 'JetBrains Mono', monospace
    }

    .p-yt {
      background: rgba(255, 0, 0, .1);
      color: #ff4444;
      border: 1px solid rgba(255, 0, 0, .2)
    }

    .p-tt {
      background: rgba(0, 242, 234, .1);
      color: #00f2ea;
      border: 1px solid rgba(0, 242, 234, .2)
    }

    .p-ig {
      background: rgba(214, 36, 159, .1);
      color: #d6249f;
      border: 1px solid rgba(214, 36, 159, .2)
    }

    .p-fb {
      background: rgba(66, 103, 178, .15);
      color: #6b9bff;
      border: 1px solid rgba(66, 103, 178, .3)
    }

    .p-kw {
      background: rgba(255, 140, 0, .1);
      color: #ff8c00;
      border: 1px solid rgba(255, 140, 0, .2)
    }

    .p-ou {
      background: rgba(128, 128, 128, .1);
      color: #aaa;
      border: 1px solid rgba(128, 128, 128, .2)
    }

    /* Platform badges - for platBadge() function */
    .badge.youtube {
      background: rgba(255, 0, 0, .12);
      color: #ff4444;
      border: 1px solid rgba(255, 0, 0, .25)
    }

    .badge.tiktok {
      background: rgba(0, 242, 234, .12);
      color: #00f2ea;
      border: 1px solid rgba(0, 242, 234, .25)
    }

    .badge.instagram {
      background: rgba(214, 36, 159, .12);
      color: #d6249f;
      border: 1px solid rgba(214, 36, 159, .25)
    }

    .badge.facebook {
      background: rgba(66, 103, 178, .15);
      color: #6b9bff;
      border: 1px solid rgba(66, 103, 178, .3)
    }

    .badge.kwai {
      background: rgba(255, 140, 0, .12);
      color: #ff8c00;
      border: 1px solid rgba(255, 140, 0, .25)
    }

    .tipo-rec {
      background: rgba(16, 217, 139, .1);
      color: var(--green);
      border: 1px solid rgba(16, 217, 139, .2)
    }

    .tipo-aj {
      background: rgba(245, 158, 11, .1);
      color: var(--amber);
      border: 1px solid rgba(245, 158, 11, .2)
    }

    /* ── ACTION BUTTONS ─────────────────────── */
    .action-row {
      display: flex;
      gap: 5px
    }

    .icon-btn {
      width: 29px;
      height: 29px;
      border-radius: 7px;
      border: 1px solid var(--border2);
      background: transparent;
      color: var(--text3);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all .2s
    }

    @media (max-width: 768px) {
      .icon-btn {
        width: 44px;
        height: 44px;
      }
    }

    .icon-btn:hover {
      background: var(--surface2);
      color: var(--text);
      border-color: var(--accent)
    }

    .icon-btn.del:hover {
      background: rgba(239, 68, 68, .1);
      color: var(--red);
      border-color: rgba(239, 68, 68, .3)
    }

    /* ── PROGRESS ────────────────────────────── */
    .prog {
      height: 5px;
      background: var(--border);
      border-radius: 3px;
      overflow: hidden;
      margin-top: 3px
    }

    .prog-fill {
      height: 100%;
      border-radius: 3px;
      background: linear-gradient(90deg, var(--accent), var(--accent2))
    }

    .prog-fill.green {
      background: linear-gradient(90deg, var(--green), #0fa06a)
    }

    .prog-fill.amber {
      background: linear-gradient(90deg, var(--amber), #d97706)
    }

    .prog-fill.purple {
      background: linear-gradient(90deg, var(--accent2), #a78bfa)
    }

    /* ── MODAL ───────────────────────────────── */
    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, .72);
      backdrop-filter: blur(4px);
      z-index: 200;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }

    .modal-overlay.open {
      display: flex
    }

    .modal {
      background: var(--surface);
      border: 1px solid var(--border2);
      border-radius: 16px;
      width: 540px;
      max-width: 100%;
      max-height: 92vh;
      overflow-y: auto;
      box-shadow: 0 24px 80px rgba(0, 0, 0, .7);
      animation: slideUp .28s ease
    }

    .modal.wide {
      width: 680px
    }

    @keyframes slideUp {
      from {
        transform: translateY(16px);
        opacity: 0
      }

      to {
        transform: translateY(0);
        opacity: 1
      }
    }

    .modal-head {
      padding: 22px 22px 16px;
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      position: sticky;
      top: 0;
      background: var(--surface);
      z-index: 1
    }

    .modal-title {
      font-family: 'Outfit', sans-serif;
      font-weight: 700;
      letter-spacing: -0.01em;
    }

    .modal-sub {
      color: var(--text3);
      margin-top: 2px
    }

    .modal-close {
      width: 30px;
      height: 30px;
      border-radius: 7px;
      border: 1px solid var(--border2);
      background: transparent;
      color: var(--text3);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0
    }

    .modal-close:hover {
      background: var(--surface2);
      color: var(--text)
    }

    .modal-body {
      padding: 18px 22px
    }

    .modal-footer {
      padding: 14px 22px;
      border-top: 1px solid var(--border);
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      position: sticky;
      bottom: 0;
      background: var(--surface)
    }

    /* ── FORM ────────────────────────────────── */
    .fg {
      margin-bottom: 14px
    }

    .fl {
      display: block;
      font-weight: 600;
      color: var(--text2);
      margin-bottom: 5px;
      text-transform: uppercase;
      letter-spacing: .5px;
      font-family: 'JetBrains Mono', monospace
    }

    .fi,
    .fs,
    .ft {
      width: 100%;
      background: var(--bg);
      border: 1px solid var(--border2);
      color: var(--text);
      border-radius: 8px;
      padding: 9px 11px;
      min-height: 44px;
      font-family: 'Inter', sans-serif;
      outline: none;
      transition: border-color .2s
    }

    .fi:focus,
    .fs:focus,
    .ft:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(79, 140, 255, .08)
    }

    .ft {
      resize: vertical;
      min-height: 70px
    }

    .fhint {
      font-size: smaller;
      color: var(--text3);
      margin-top: 3px
    }

    .frow {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px
    }

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

    .fdiv {
      height: 1px;
      background: var(--border);
      margin: 16px 0
    }

    .prefix-wrap {
      display: flex;
      align-items: center
    }

    .prefix {
      padding: 9px 10px 9px 11px;
      background: var(--surface2);
      border: 1px solid var(--border2);
      border-right: none;
      border-radius: 8px 0 0 8px;
      color: var(--text3);
      font-family: 'JetBrains Mono', monospace;
      white-space: nowrap
    }

    .prefix+.fi {
      border-radius: 0 8px 8px 0
    }

    /* ── ALERTS ──────────────────────────────── */
    .alert {
      padding: 10px 14px;
      border-radius: 8px;
      margin-bottom: 12px;
      display: flex;
      align-items: flex-start;
      gap: 8px;
      line-height: var(--line-relaxed)
    }

    .alert-info {
      background: rgba(79, 140, 255, .1);
      border: 1px solid rgba(79, 140, 255, .22);
      color: var(--accent)
    }

    .alert-warn {
      background: rgba(245, 158, 11, .1);
      border: 1px solid rgba(245, 158, 11, .22);
      color: var(--amber)
    }

    .alert-success {
      background: rgba(16, 217, 139, .1);
      border: 1px solid rgba(16, 217, 139, .22);
      color: var(--green)
    }

    .alert-err {
      background: rgba(239, 68, 68, .1);
      border: 1px solid rgba(239, 68, 68, .22);
      color: var(--red)
    }

    /* ── CALC BOX ────────────────────────────── */
    .calc-box {
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 14px
    }

    .calc-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 4px 0;
    }

    .calc-row.total {
      border-top: 1px solid var(--border);
      margin-top: 8px;
      padding-top: 10px
    }

    .calc-row.total .cv {
      font-family: 'Outfit', sans-serif;
      font-weight: 800;
      color: var(--green)
    }

    .clabel {
      color: var(--text3)
    }

    .cv {
      font-family: 'JetBrains Mono', monospace;
      font-weight: 500
    }

    .cv.neg {
      color: var(--red)
    }

    .split-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 5px 0;
      border-bottom: 1px solid var(--border);
    }

    .split-row:last-child {
      border: none
    }

    /* ── PERCENTUAL INPUT ────────────────────── */
    .pct-row {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 8px
    }

    @media (max-width: 480px) {
      .pct-row {
        flex-wrap: wrap;
      }
    }

    .pct-name {
      font-weight: 500;
      flex: 1;
      color: var(--text)
    }

    .pct-inp {
      width: 80px;
      text-align: right;
      padding: 7px 10px
    }

    @media (max-width: 480px) {
      .pct-inp {
        width: 100%;
      }
    }

    .pct-sym {
      color: var(--text3);
    }

    .pct-total {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: 12px;
      padding-top: 10px;
      border-top: 1px solid var(--border)
    }

    .pct-total-v {
      font-family: 'JetBrains Mono', monospace;
      font-weight: 700
    }

    .pct-valid {
      color: var(--green)
    }

    .pct-invalid {
      color: var(--red)
    }

    /* ── RANKING ─────────────────────────────── */
    .rank-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 0;
      border-bottom: 1px solid var(--border)
    }

    .rank-item:last-child {
      border: none
    }

    .rank-num {
      font-family: 'JetBrains Mono', monospace;
      color: var(--text3);
      width: 18px;
      flex-shrink: 0
    }

    .rank-info {
      flex: 1
    }

    .rank-plat {
      color: var(--text3);
      margin-top: 1px
    }

    .rank-val {
      font-family: 'JetBrains Mono', monospace;
      font-weight: 600;
      color: var(--green)
    }

    /* ── AUDIT ───────────────────────────────── */
    .audit-row {
      display: grid;
      grid-template-columns: 120px 80px 1fr 70px;
      gap: 10px;
      padding: 10px 0;
      border-bottom: 1px solid var(--border);
      align-items: start
    }

    .audit-row:last-child {
      border: none
    }

    .audit-time {
      font-family: 'JetBrains Mono', monospace;
      color: var(--text3);
    }

    .audit-user {
      color: var(--accent);
      font-weight: 600
    }

    .audit-action {
      color: var(--text2);
      line-height: var(--line-relaxed)
    }

    .audit-badge {
      padding: 2px 6px;
      border-radius: 4px;
      font-family: 'JetBrains Mono', monospace;
      text-align: center
    }

    .ab-cr {
      background: rgba(16, 217, 139, .12);
      color: var(--green)
    }

    .ab-up {
      background: rgba(245, 158, 11, .12);
      color: var(--amber)
    }

    .ab-dl {
      background: rgba(239, 68, 68, .12);
      color: var(--red)
    }

    .ab-vw {
      background: rgba(79, 140, 255, .12);
      color: var(--accent)
    }

    /* ── VIGÊNCIA ────────────────────────────── */
    .vig-tag {
      padding: 2px 7px;
      border-radius: 4px;
      background: rgba(79, 140, 255, .12);
      color: var(--accent);
      font-family: 'JetBrains Mono', monospace;
      border: 1px solid rgba(79, 140, 255, .2)
    }

    .vig-old {
      padding: 2px 7px;
      border-radius: 4px;
      background: rgba(128, 128, 128, .1);
      color: var(--text3);
      font-family: 'JetBrains Mono', monospace;
      border: 1px solid var(--border)
    }

    /* ── PAGE SECTIONS ───────────────────────── */
    .page-section {
      display: none
    }

    .page-section.active {
      display: block
    }

    /* ── MISC ────────────────────────────────── */
    ::-webkit-scrollbar {
      width: 5px;
      height: 5px
    }

    ::-webkit-scrollbar-track {
      background: var(--bg)
    }

    ::-webkit-scrollbar-thumb {
      background: var(--border2);
      border-radius: 3px
    }

    .flex-between {
      display: flex;
      align-items: center;
      justify-content: space-between
    }

    .mb3 {
      margin-bottom: 12px
    }

    .text-green {
      color: var(--green)
    }

    .text-red {
      color: var(--red)
    }

    .text-amber {
      color: var(--amber)
    }

    .text-accent {
      color: var(--accent)
    }

    .text-muted {
      color: var(--text3)
    }

    .font-mono {
      font-family: 'JetBrains Mono', monospace
    }

    .spin {
      animation: spin 1s linear infinite;
      display: inline-block
    }

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

    .loading-text {
      color: var(--text3);
      text-align: center;
      padding: 40px
    }

    .empty-state {
      text-align: center;
      padding: 40px;
      color: var(--text3)
    }

    .empty-state .big {
      font-size: 32px;
      margin-bottom: 8px
    }

    /* ── TOAST ───────────────────────────────── */
    .toast {
      position: fixed;
      bottom: 22px;
      right: 22px;
      z-index: 500;
      background: var(--surface);
      border: 1px solid var(--border2);
      border-radius: 12px;
      padding: 13px 16px;
      display: flex;
      align-items: center;
      gap: 10px;
      box-shadow: 0 8px 32px rgba(0, 0, 0, .5);
      max-width: 310px;
      transform: translateY(80px);
      opacity: 0;
      transition: all .3s ease;
      pointer-events: none
    }

    .toast.show {
      transform: translateY(0);
      opacity: 1;
      pointer-events: auto
    }

    .toast-icon {
      font-size: 16px
    }

    .toast-msg {
      line-height: var(--line-relaxed)
    }

    /* ── RELATORIO GRID ──────────────────────── */
    .rel-grid {
      display: grid;
      grid-template-columns: 220px 1fr;
      gap: 18px;
      align-items: start
    }

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

    .rel-panel {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 13px;
      padding: 16px
    }

    .rel-panel-title {
      font-family: 'Outfit', sans-serif;
      font-weight: 700;
      margin-bottom: 14px
    }

    .period-btns {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 6px;
      margin-bottom: 10px
    }

    .pbtn {
      padding: 7px;
      text-align: center;
      border-radius: 7px;
      border: 1px solid var(--border2);
      background: var(--surface2);
      color: var(--text3);
      cursor: pointer;
      transition: all .15s
    }

    .pbtn.active,
    .pbtn:hover {
      border-color: var(--accent);
      color: var(--accent);
      background: rgba(79, 140, 255, .1)
    }

    /* ── PERM TABLE ──────────────────────────── */
    .perm-cell {
      text-align: center;
      cursor: pointer;
      font-size: 16px;
      transition: transform .15s;
      user-select: none
    }

    .perm-cell:hover {
      transform: scale(1.2)
    }

    /* ── AUTOCOMPLETE / SELECT2 LIKE ─────────── */
    /* Estilos do Select2 Customizado */
    .select2-wrapper {
      position: relative;
      width: 100%;
    }

    .select2-container {
      width: 100%;
      min-height: 42px;
      padding: 4px 8px;
      background: var(--bg);
      border: 1px solid var(--border2);
      border-radius: 8px;
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px;
      cursor: text;
      transition: all 0.2s;
    }

    .select2-container:focus-within {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.08);
    }

    .select2-search-input {
      flex: 1;
      min-width: 120px;
      border: none;
      background: transparent;
      color: var(--text);
      font-size: 13px;
      padding: 4px 0;
      outline: none;
      font-family: 'Inter', sans-serif;
    }

    .select2-selected-items {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .select2-placeholder {
      font-size: 13px;
      color: var(--text3);
      padding: 4px 0;
      display: none;
      /* Hide since input placeholder handles it */
    }

    .select2-tag {
      background: rgba(79, 140, 255, 0.15);
      border: 1px solid var(--accent);
      color: var(--text);
      padding: 4px 8px;
      border-radius: 6px;
      font-size: 12px;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .select2-tag-remove {
      cursor: pointer;
      color: var(--accent);
      font-weight: bold;
      font-size: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      transition: all 0.2s;
    }

    .select2-tag-remove:hover {
      background: var(--accent);
      color: white;
    }

    .select2-dropdown {
      position: absolute;
      top: calc(100% + 4px);
      left: 0;
      width: 100%;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 8px;
      max-height: 250px;
      overflow-y: auto;
      z-index: 1000;
      box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
      display: none;
      opacity: 0;
      transform: translateY(-5px);
      transition: all 0.2s ease;
    }

    .select2-dropdown.show {
      display: block;
      opacity: 1;
      transform: translateY(0);
    }

    .select2-option {
      padding: 10px 12px;
      cursor: pointer;
      font-size: 13px;
      display: flex;
      align-items: center;
      gap: 8px;
      border-bottom: 1px solid var(--border2);
      transition: background 0.15s;
    }

    .select2-option:last-child {
      border-bottom: none;
    }

    .select2-option:hover {
      background: var(--surface2);
    }

    .select2-option.selected {
      background: rgba(79, 140, 255, 0.1);
    }

    .select2-option-check {
      width: 16px;
      color: var(--accent);
      font-weight: bold;
      display: inline-block;
    }

    .select2-option-text {
      flex: 1;
    }

    .select2-option-badge {
      font-size: 10px;
      background: var(--surface2);
      padding: 2px 6px;
      border-radius: 4px;
      color: var(--text3);
    }

    .select2-no-results {
      padding: 12px;
      text-align: center;
      color: var(--text3);
      font-size: 13px;
    }

    /* ── AUTOCOMPLETE ORIGINAL ─────────── */
    .autocomplete-wrapper {
      position: relative;
      width: 100%;
    }

    .autocomplete-wrapper+.icon-btn {
      height: 38px;
      width: 38px;
      flex-shrink: 0;
    }

    .autocomplete-input {
      width: 100%;
      padding: 9px 11px;
      background: var(--bg);
      border: 1px solid var(--border2);
      color: var(--text);
      border-radius: 8px;
      font-family: 'Inter', sans-serif;
      outline: none;
      transition: all .2s;
    }

    .autocomplete-input:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(79, 140, 255, .08);
    }

    div[style*="display:flex; gap:5px"] {
      align-items: flex-start;
    }

    .autocomplete-dropdown {
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 8px;
      margin-top: 4px;
      max-height: 250px;
      overflow-y: auto;
      z-index: 1000;
      box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
      display: none;
    }

    .autocomplete-dropdown.show {
      display: block;
    }

    .autocomplete-item {
      padding: 10px 14px;
      cursor: pointer;
      border-bottom: 1px solid var(--border);
      transition: background .15s;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .autocomplete-item:last-child {
      border-bottom: none;
    }

    .autocomplete-item:hover {
      background: var(--surface);
    }

    .autocomplete-item.active {
      background: rgba(79, 140, 255, 0.15);
    }

    .autocomplete-item.selected {
      background: rgba(79, 140, 255, 0.2) !important;
      border-left: 3px solid var(--accent);
    }

    .autocomplete-item-info {
      flex: 1;
    }

    .autocomplete-item-name {
      font-weight: 600;
      color: var(--text);
      margin-bottom: 2px;
    }

    .autocomplete-item-email {
      color: var(--text3);
      font-family: 'JetBrains Mono', monospace;
    }

    .autocomplete-item-badge {
      padding: 2px 6px;
      border-radius: 4px;
      background: rgba(79, 140, 255, .1);
      color: var(--accent);
      border: 1px solid rgba(79, 140, 255, .2);
      white-space: nowrap;
      margin-left: 8px;
    }

    .selected-items {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 8px;
      padding: 4px 0;
    }

    .selected-tag {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 4px 8px 4px 10px;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 20px;
      transition: all .15s;
    }

    .selected-tag:hover {
      background: rgba(239, 68, 68, .1);
      border-color: rgba(239, 68, 68, .3);
    }

    .selected-tag .remove {
      cursor: pointer;
      font-size: 14px;
      line-height: 1;
      padding: 0 2px;
      color: var(--text3);
    }

    .selected-tag .remove:hover {
      color: var(--red);
    }

    .search-highlight {
      background: rgba(79, 140, 255, .3);
      color: var(--text);
      font-weight: 600;
      padding: 0 2px;
      border-radius: 3px;
    }

    .item-type-badge {
      padding: 2px 4px;
      border-radius: 3px;
      text-transform: uppercase;
      margin-left: 6px;
    }

    .type-fornecedor {
      background: rgba(16, 217, 139, .1);
      color: var(--green);
    }

    .type-pagina {
      background: rgba(245, 158, 11, .1);
      color: var(--amber);
    }

    /* ── ACCESS CONTROL (PERMISSÕES) ───────────── */
    .access-summary {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 14px;
      margin-bottom: 20px;
    }

    .summary-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 16px;
      display: flex;
      align-items: center;
      gap: 12px;
      transition: all 0.2s;
    }

    .summary-card:hover {
      transform: translateY(-2px);
      border-color: var(--accent);
      box-shadow: 0 4px 12px rgba(79, 140, 255, 0.1);
    }

    .summary-icon {
      width: 40px;
      height: 40px;
      border-radius: 10px;
      background: rgba(79, 140, 255, 0.1);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 20px;
    }

    .summary-info {
      flex: 1;
    }

    .summary-label {
      color: var(--text3);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      display: block;
      margin-bottom: 4px;
    }

    .summary-value {
      font-family: 'Outfit', sans-serif;
      font-weight: 700;
      color: var(--text);
    }

    .access-tabs {
      display: flex;
      gap: 2px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 4px;
      margin-bottom: 20px;
    }

    .tab-btn {
      flex: 1;
      padding: 10px;
      border: none;
      background: transparent;
      color: var(--text3);
      font-weight: 500;
      border-radius: 8px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      transition: all 0.2s;
    }

    .tab-btn:hover {
      color: var(--text);
      background: var(--surface2);
    }

    .tab-btn.active {
      background: linear-gradient(135deg, rgba(79, 140, 255, 0.15), rgba(124, 58, 237, 0.1));
      color: var(--accent);
      border: 1px solid rgba(79, 140, 255, 0.2);
    }

    .access-filters {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 16px;
      margin-bottom: 20px;
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      align-items: center;
    }

    .filter-group {
      display: flex;
      align-items: center;
      gap: 8px;
      flex: 1;
      min-width: 200px;
    }

    .filter-label {
      color: var(--text2);
      white-space: nowrap;
    }

    .filter-input {
      flex: 1;
      background: var(--bg);
      border: 1px solid var(--border2);
      color: var(--text);
      border-radius: 8px;
      padding: 8px 12px;
      font-family: 'Inter', sans-serif;
      outline: none;
      transition: all 0.2s;
    }

    .filter-input:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.1);
    }

    .filter-select {
      flex: 1;
      background: var(--bg);
      border: 1px solid var(--border2);
      color: var(--text);
      border-radius: 8px;
      padding: 8px 12px;
      font-family: 'Inter', sans-serif;
      outline: none;
      cursor: pointer;
    }

    .filter-actions {
      display: flex;
      gap: 8px;
    }

    .access-view {
      display: none;
    }

    .access-view.active {
      display: block;
    }

    /* Matriz de Permissões */
    .matrix-container {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      overflow: auto;
      max-height: 600px;
    }

    .matrix-table {
      width: 100%;
      border-collapse: collapse;
      min-width: 800px;
    }

    .matrix-table th {
      position: sticky;
      top: 0;
      background: var(--surface2);
      padding: 14px 12px;
      font-weight: 600;
      color: var(--text2);
      border-bottom: 2px solid var(--border);
      z-index: 10;
    }

    .matrix-table td {
      padding: 12px;
      border-bottom: 1px solid var(--border);
    }

    .matrix-user-cell {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .matrix-user-avatar {
      width: 32px;
      height: 32px;
      border-radius: 8px;
      background: linear-gradient(135deg, var(--accent), var(--accent2));
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      color: #fff;
    }

    .matrix-user-info {
      flex: 1;
    }

    .matrix-user-name {
      font-weight: 600;
      color: var(--text);
    }

    .matrix-user-role {
      color: var(--text3);
      font-family: 'JetBrains Mono', monospace;
      text-transform: uppercase;
    }

    .matrix-platform-header {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
    }

    .matrix-platform-badge {
      padding: 4px 8px;
      border-radius: 20px;
    }

    .matrix-perm-cell {
      text-align: center;
      cursor: pointer;
      padding: 8px;
      border-radius: 6px;
      transition: all 0.2s;
    }

    .matrix-perm-cell:hover {
      background: var(--surface2);
      transform: scale(1.1);
    }

    .matrix-perm-indicator {
      display: inline-block;
      width: 24px;
      height: 24px;
      line-height: 24px;
      border-radius: 6px;
    }

    .matrix-perm-indicator.allowed {
      background: rgba(16, 217, 139, 0.15);
      color: var(--green);
    }

    .matrix-perm-indicator.denied {
      background: rgba(239, 68, 68, 0.1);
      color: var(--red);
    }

    .matrix-perm-indicator.admin {
      background: rgba(79, 140, 255, 0.15);
      color: var(--accent);
    }

    /* Cards View */
    .cards-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
      gap: 16px;
    }

    .perm-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 16px;
      transition: all 0.2s;
    }

    .perm-card:hover {
      border-color: var(--accent);
      transform: translateY(-2px);
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    }

    .perm-card-header {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 16px;
    }

    .perm-card-avatar {
      width: 48px;
      height: 48px;
      border-radius: 12px;
      background: linear-gradient(135deg, var(--accent), var(--accent2));
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      color: #fff;
    }

    .perm-card-info {
      flex: 1;
    }

    .perm-card-name {
      font-weight: 700;
      color: var(--text);
      margin-bottom: 4px;
    }

    .perm-card-email {
      color: var(--text3);
      font-family: 'JetBrains Mono', monospace;
      margin-bottom: 4px;
    }

    .perm-card-role {
      display: inline-block;
      padding: 2px 8px;
      border-radius: 20px;
      font-weight: 600;
      background: rgba(79, 140, 255, 0.1);
      color: var(--accent);
    }

    .perm-card-role.admin {
      background: rgba(245, 158, 11, 0.1);
      color: var(--amber);
    }

    .perm-card-pages {
      margin: 16px 0;
    }

    .perm-card-pages-title {
      color: var(--text3);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-bottom: 8px;
    }

    .perm-card-pages-list {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .perm-card-page {
      padding: 4px 10px;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 20px;
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .perm-card-page.plat-yt {
      border-color: rgba(255, 0, 0, 0.3);
    }

    .perm-card-page.plat-tt {
      border-color: rgba(0, 242, 234, 0.3);
    }

    .perm-card-page.plat-ig {
      border-color: rgba(214, 36, 159, 0.3);
    }

    .perm-card-actions {
      display: flex;
      gap: 8px;
      margin-top: 16px;
      padding-top: 16px;
      border-top: 1px solid var(--border);
    }

    /* Logs View */
    .logs-container {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 20px;
    }

    .logs-timeline {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .log-entry {
      display: flex;
      align-items: flex-start;
      gap: 16px;
      padding: 12px;
      background: var(--surface2);
      border-radius: 10px;
      border-left: 3px solid transparent;
    }

    .log-entry.create {
      border-left-color: var(--green);
    }

    .log-entry.update {
      border-left-color: var(--amber);
    }

    .log-entry.delete {
      border-left-color: var(--red);
    }

    .log-entry.view {
      border-left-color: var(--accent);
    }

    .log-time {
      color: var(--text3);
      font-family: 'JetBrains Mono', monospace;
      min-width: 80px;
    }

    .log-icon {
      width: 28px;
      height: 28px;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .log-icon.create {
      background: rgba(16, 217, 139, 0.15);
      color: var(--green);
    }

    .log-icon.update {
      background: rgba(245, 158, 11, 0.15);
      color: var(--amber);
    }

    .log-icon.delete {
      background: rgba(239, 68, 68, 0.15);
      color: var(--red);
    }

    .log-icon.view {
      background: rgba(79, 140, 255, 0.15);
      color: var(--accent);
    }

    .log-content {
      flex: 1;
    }

    .log-title {
      font-weight: 600;
      margin-bottom: 4px;
    }

    .log-description {
      color: var(--text2);
      line-height: var(--line-relaxed);
    }

    .log-user {
      color: var(--text3);
      margin-top: 4px;
      display: flex;
      align-items: center;
      gap: 4px;
    }

    /* Quick Edit Modal */
    .quick-perm-list {
      max-height: 300px;
      overflow-y: auto;
      margin: 16px 0;
      padding: 4px;
    }

    .quick-perm-item {
      display: flex;
      align-items: center;
      padding: 10px;
      border-bottom: 1px solid var(--border);
      gap: 12px;
    }

    .quick-perm-item:last-child {
      border-bottom: none;
    }

    .quick-perm-item input[type="checkbox"] {
      width: 18px;
      height: 18px;
      cursor: pointer;
      accent-color: var(--accent);
    }

    .quick-perm-item label {
      flex: 1;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .quick-perm-platform {
      padding: 2px 6px;
      border-radius: 4px;
      background: var(--surface2);
      color: var(--text3);
    }

    .quick-actions {
      display: flex;
      gap: 8px;
      justify-content: flex-end;
      margin: 12px 0;
    }

    /* Responsividade */
    @media (max-width: 768px) {
      .access-summary {
        grid-template-columns: repeat(2, 1fr);
      }

      .access-filters {
        flex-direction: column;
        align-items: stretch;
      }

      .filter-group {
        min-width: auto;
      }

      .cards-grid {
        grid-template-columns: 1fr;
      }

      .log-entry {
        flex-direction: column;
        gap: 8px;
      }

      .log-time {
        min-width: auto;
      }
    }

    @media (max-width: 480px) {
      .access-summary {
        grid-template-columns: 1fr;
      }

      .access-tabs {
        flex-direction: column;
      }

      .tab-btn {
        justify-content: flex-start;
      }
    }

    /* Botão de perigo (vermelho) */
    .btn-danger {
      background: rgba(239, 68, 68, 0.1);
      border: 1px solid rgba(239, 68, 68, 0.3);
      color: var(--red);
    }

    .btn-danger:hover {
      background: rgba(239, 68, 68, 0.2);
    }

    /* Cabeçalhos de vigência */
    .vigente-header td {
      background: rgba(79, 140, 255, 0.05);
      border-bottom: 1px solid rgba(79, 140, 255, 0.2);
      font-weight: 600;
    }

    .historico-header td {
      background: var(--surface2);
      color: var(--text3);
      border-bottom: 1px solid var(--border);
    }

    .vigente-row {
      background: rgba(79, 140, 255, 0.02);
    }

    .vigente-row:hover {
      background: rgba(79, 140, 255, 0.05) !important;
    }

    .historico-row {
      opacity: 0.7;
    }

    .historico-row:hover {
      opacity: 1;
    }

    /* Melhorias nos selects múltiplos */
    select[multiple] {
      min-height: 120px;
      padding: 4px;
    }

    select[multiple] option {
      padding: 8px 10px;
      border-bottom: 1px solid var(--border);
      cursor: pointer;
      transition: background 0.15s;
    }

    select[multiple] option:checked {
      background: linear-gradient(135deg, rgba(79, 140, 255, 0.3), rgba(124, 58, 237, 0.2));
      color: var(--text);
    }

    select[multiple] option:hover {
      background: var(--surface);
    }

    /* Tags de fornecedores selecionados */
    .selected-tag {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 4px 10px;
      background: var(--surface2);
      border: 1px solid var(--accent);
      border-radius: 20px;
      color: var(--text);
      margin: 2px;
    }

    .selected-tag .remove {
      cursor: pointer;
      width: 16px;
      height: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      background: rgba(239, 68, 68, 0.2);
      color: var(--red);
      font-size: 12px;
    }

    .selected-tag .remove:hover {
      background: rgba(239, 68, 68, 0.4);
    }

    /* Remove as setas do input number para a maioria dos navegadores */
    input[type=number]::-webkit-inner-spin-button,
    input[type=number]::-webkit-outer-spin-button {
      -webkit-appearance: none;
      margin: 0;
    }

    input[type=number] {
      -moz-appearance: textfield;
      /* Firefox */
      appearance: textfield;
      /* Navegadores modernos */
    }

    /* ============================================
   PERMISSÕES
   ============================================ */

    /* Cards de permissões */
    .user-permission-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 18px;
      margin-bottom: 16px;
      transition: all 0.2s;
    }

    .user-permission-card:hover {
      border-color: var(--accent);
      box-shadow: 0 4px 12px rgba(79, 140, 255, 0.1);
    }

    .user-permission-header {
      display: flex;
      align-items: center;
      gap: 14px;
      margin-bottom: 16px;
    }

    .user-permission-avatar {
      width: 48px;
      height: 48px;
      border-radius: 12px;
      background: linear-gradient(135deg, var(--accent), var(--accent2));
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      color: #fff;
      flex-shrink: 0;
    }

    .user-permission-info {
      flex: 1;
    }

    .user-permission-name {
      font-weight: 700;
      font-size: 16px;
      margin-bottom: 4px;
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .user-permission-email {
      color: var(--text3);
      font-size: 12px;
      font-family: 'DM Mono', monospace;
      margin-bottom: 4px;
    }

    .user-permission-fornecedor {
      font-size: 11px;
      color: var(--text2);
      background: var(--surface2);
      padding: 2px 8px;
      border-radius: 4px;
      display: inline-block;
    }

    .user-permission-pages {
      margin: 16px 0;
      padding: 12px;
      background: var(--surface2);
      border-radius: 10px;
    }

    .user-permission-pages-title {
      font-size: 11px;
      color: var(--text3);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-bottom: 10px;
    }

    .user-permission-pages-list {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .page-tag {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 4px 10px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 20px;
      font-size: 12px;
      transition: all 0.2s;
    }

    .page-tag:hover {
      border-color: var(--accent);
      transform: translateY(-1px);
    }

    .page-tag[data-platform="YouTube"] {
      border-left: 3px solid #ff4444;
    }

    .page-tag[data-platform="TikTok"] {
      border-left: 3px solid #00f2ea;
    }

    .page-tag[data-platform="Instagram"] {
      border-left: 3px solid #d6249f;
    }

    .page-tag[data-platform="Facebook"] {
      border-left: 3px solid #4267B2;
    }

    .page-tag.admin-tag {
      background: rgba(79, 140, 255, 0.1);
      border-color: var(--accent);
      color: var(--accent);
    }

    .page-tag.no-access {
      background: rgba(239, 68, 68, 0.1);
      border-color: rgba(239, 68, 68, 0.3);
      color: var(--red);
    }

    .user-permission-actions {
      display: flex;
      gap: 8px;
      justify-content: flex-end;
      padding-top: 12px;
      border-top: 1px solid var(--border);
    }

    /* Modal de edição de permissões */
    .modal-xl {
      width: 700px;
      max-width: 95vw;
    }

    .permission-summary {
      background: var(--surface2);
      border-radius: 10px;
      padding: 16px;
      margin-bottom: 20px;
      display: flex;
      align-items: center;
      gap: 16px;
    }

    .permission-summary-avatar {
      width: 56px;
      height: 56px;
      border-radius: 12px;
      background: linear-gradient(135deg, var(--accent), var(--accent2));
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      color: #fff;
      flex-shrink: 0;
    }

    .permission-summary-info {
      flex: 1;
    }

    .permission-summary-name {
      font-weight: 700;
      font-size: 18px;
      margin-bottom: 4px;
    }

    .permission-summary-email {
      color: var(--text3);
      font-size: 12px;
      margin-bottom: 4px;
    }

    .permission-summary-fornecedor {
      font-size: 12px;
      color: var(--accent);
      background: rgba(79, 140, 255, 0.1);
      padding: 2px 8px;
      border-radius: 4px;
      display: inline-block;
    }

    /* Lista de páginas para checkboxes */
    .pages-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      gap: 10px;
      max-height: 300px;
      overflow-y: auto;
      padding: 10px;
      background: var(--surface2);
      border-radius: 10px;
      margin: 16px 0;
    }

    .page-checkbox-item {
      padding: 8px 12px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 8px;
      transition: all 0.2s;
    }

    .page-checkbox-item:hover {
      border-color: var(--accent);
      transform: translateY(-1px);
    }

    .page-checkbox-item label {
      display: flex;
      align-items: center;
      gap: 8px;
      cursor: pointer;
    }

    .page-checkbox {
      width: 18px;
      height: 18px;
      cursor: pointer;
      accent-color: var(--accent);
    }

    .page-checkbox-label {
      flex: 1;
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 13px;
    }

    .page-checkbox-platform {
      font-size: 10px;
      color: var(--text3);
      margin-left: auto;
    }

    /* Controles de seleção em massa */
    .selection-controls {
      display: flex;
      gap: 8px;
      margin: 12px 0;
      padding: 8px;
      background: var(--surface2);
      border-radius: 8px;
      align-items: center;
    }

    .selection-counter {
      margin-left: auto;
      font-size: 12px;
      color: var(--text3);
    }

    /* Responsividade */
    @media (max-width: 768px) {
      .user-permission-header {
        flex-direction: column;
        text-align: center;
      }

      .user-permission-name {
        justify-content: center;
      }

      .user-permission-actions {
        flex-direction: column;
      }

      .pages-grid {
        grid-template-columns: 1fr;
      }

      .permission-summary {
        flex-direction: column;
        text-align: center;
      }
    }

    /* ============================================
   RELATÓRIOS AVANÇADOS - NOVO DESIGN
   ============================================ */

    /* Layout do relatório */
    .relatorio-layout {
      display: grid;
      grid-template-columns: 300px 1fr;
      gap: 20px;
      margin-top: 20px;
    }

    @media (max-width: 1024px) {
      .relatorio-layout {
        grid-template-columns: 1fr;
      }
    }

    /* Painel de filtros */
    .filtros-panel {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 18px;
    }

    /* Em desktop, painel pegajoso */
    @media (min-width: 1025px) {
      .filtros-panel {
        position: sticky;
        top: 80px;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
      }
    }

    .filtros-panel-title {
      font-family: 'Outfit', sans-serif;
      font-weight: 700;
      font-size: 16px;
      margin-bottom: 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .filtros-panel-section {
      margin-bottom: 10px;
      border-bottom: 1px solid var(--border);
      padding-bottom: 16px;
    }

    .filtros-panel-section:last-child {
      border-bottom: none;
    }

    .filtros-panel-section-title {
      font-size: 12px;
      color: var(--text3);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    /* Checkboxes de filtro */
    .filtros-checkbox-list {
      max-height: 200px;
      overflow-y: auto;
      background: var(--surface2);
      border-radius: 8px;
      padding: 4px;
    }

    .filter-checkbox-item {
      padding: 8px 10px;
      border-bottom: 1px solid var(--border);
      transition: background 0.15s;
    }

    .filter-checkbox-item:last-child {
      border-bottom: none;
    }

    .filter-checkbox-item:hover {
      background: var(--surface);
    }

    .filter-checkbox-item label {
      display: flex;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      width: 100%;
    }

    .filter-checkbox-item input[type="checkbox"] {
      width: 16px;
      height: 16px;
      cursor: pointer;
      accent-color: var(--accent);
      flex-shrink: 0;
    }

    .filter-checkbox-label {
      flex: 1;
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 13px;
      flex-wrap: wrap;
    }

    .filter-checkbox-email {
      font-size: 10px;
      color: var(--text3);
      font-family: 'DM Mono', monospace;
    }

    .filter-checkbox-platform {
      font-size: 9px;
      color: var(--text3);
      background: var(--surface);
      padding: 2px 6px;
      border-radius: 4px;
      margin-left: auto;
    }

    /* Ações rápidas */
    .filtros-acoes {
      display: flex;
      gap: 6px;
      margin-top: 8px;
      flex-wrap: wrap;
    }

    .filtros-acoes .btn-sm {
      flex: 1;
      min-width: 80px;
    }

    .filtros-sumario {
      background: var(--surface2);
      border-radius: 8px;
      padding: 12px;
      margin: 16px 0;
      font-size: 12px;
    }

    .filtros-sumario-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 6px;
    }

    .filtros-sumario-item:last-child {
      margin-bottom: 0;
    }

    .filtros-sumario-label {
      color: var(--text3);
    }

    .filtros-sumario-value {
      font-weight: 600;
      color: var(--accent);
    }

    /* Container do relatório */
    .relatorio-container {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 24px;
    }

    .relatorio-header {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      margin-bottom: 24px;
      padding-bottom: 16px;
      border-bottom: 1px solid var(--border);
    }

    .relatorio-title {
      font-family: 'Outfit', sans-serif;
      font-weight: 700;
      font-size: 20px;
      margin-bottom: 4px;
    }

    .relatorio-subtitle {
      color: var(--text3);
      font-size: 13px;
      margin-bottom: 8px;
    }

    .relatorio-filtros {
      background: var(--surface2);
      padding: 8px 12px;
      border-radius: 8px;
      font-size: 12px;
      color: var(--text2);
    }

    .relatorio-actions {
      display: flex;
      gap: 8px;
    }

    /* Cards de resumo no relatório */
    .relatorio-cards {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 16px;
      margin-bottom: 24px;
    }

    /* Cards de seção */
    .relatorio-card {
      background: var(--surface2);
      border-radius: 10px;
      padding: 18px;
      margin-bottom: 24px;
    }

    .relatorio-card-title {
      font-weight: 600;
      font-size: 15px;
      margin-bottom: 8px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    /* Gráfico */
    .chart-container {
      margin-top: 16px;
      padding: 16px 0;
    }

    .chart-bars-container {
      display: flex;
      align-items: flex-end;
      gap: 12px;
      height: 200px;
      margin-bottom: 20px;
      padding: 0 10px;
    }

    .chart-bar-wrapper {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      height: 100%;
      min-width: 40px;
    }

    .chart-bar {
      width: 100%;
      background: linear-gradient(180deg, var(--accent), var(--accent2));
      border-radius: 6px 6px 0 0;
      transition: height 0.3s ease;
      position: relative;
      cursor: pointer;
      min-height: 4px;
    }

    .chart-bar:hover {
      filter: brightness(1.2);
    }

    .chart-bar-tooltip {
      position: absolute;
      bottom: 100%;
      left: 50%;
      transform: translateX(-50%);
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 6px;
      padding: 6px 10px;
      font-size: 11px;
      white-space: nowrap;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.2s;
      z-index: 10;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .chart-bar:hover .chart-bar-tooltip {
      opacity: 1;
    }

    .chart-bar-label {
      font-size: 10px;
      color: var(--text3);
      font-family: 'DM Mono', monospace;
      white-space: nowrap;
    }

    .chart-legend {
      display: flex;
      justify-content: center;
      gap: 16px;
      margin-top: 16px;
      font-size: 12px;
    }

    .chart-legend-item {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .chart-legend-color {
      width: 12px;
      height: 12px;
      border-radius: 3px;
    }

    /* Loading state */
    .loading-state {
      text-align: center;
      padding: 60px 20px;
      color: var(--text3);
    }

    /* Rodapé do relatório */
    .relatorio-footer {
      margin-top: 24px;
      padding-top: 16px;
      border-top: 1px solid var(--border);
      display: flex;
      justify-content: space-between;
      font-size: 11px;
      color: var(--text3);
    }

    /* Responsividade */
    @media (max-width: 768px) {
      .relatorio-header {
        flex-direction: column;
        gap: 16px;
      }

      .relatorio-actions {
        width: 100%;
      }

      .relatorio-cards {
        grid-template-columns: 1fr;
      }

      .chart-bars-container {
        gap: 4px;
      }

      .chart-bar-wrapper {
        min-width: 30px;
      }
    }

    /* Estilos para checkboxes */
    .checkbox-item {
      display: flex;
      align-items: flex-start;
      padding: 8px 12px;
      background: var(--surface2);
      border-radius: 6px;
      margin-bottom: 4px;
      cursor: pointer;
      transition: all 0.2s;
    }

    .checkbox-item:hover {
      background: var(--surface3);
    }

    .checkbox-item input[type="checkbox"] {
      margin-top: 3px;
      margin-right: 10px;
      accent-color: var(--accent);
    }

    .checkbox-label {
      flex: 1;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
    }

    .checkbox-email {
      font-size: 11px;
      color: var(--text3);
      font-family: 'DM Mono', monospace;
    }

    .checkbox-badge {
      font-size: 9px;
      padding: 2px 6px;
      border-radius: 20px;
      background: var(--surface3);
      color: var(--text2);
      text-transform: uppercase;
    }

    .checkbox-badge.youtube {
      background: #ff000020;
      color: #ff0000;
    }

    .checkbox-badge.tiktok {
      background: #00f2ea20;
      color: #00f2ea;
    }

    .checkbox-badge.instagram {
      background: #e4405f20;
      color: #e4405f;
    }    /* ── PAGINATION ──────────────────────────────── */
    .pagination-container {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: var(--space-md) var(--space-lg);
      border-top: 1px solid var(--border);
      background: var(--surface);
      border-bottom-left-radius: 12px;
      border-bottom-right-radius: 12px;
    }
    .pagination-info {
      font-size: var(--font-size-xs);
      color: var(--text3);
      font-family: 'DM Mono', monospace;
    }
    .pagination-controls {
      display: flex;
      gap: 6px;
    }
    .pagination-btn {
      background: var(--surface2);
      border: 1px solid var(--border);
      color: var(--text);
      padding: 6px 12px;
      border-radius: 6px;
      font-size: var(--font-size-xs);
      cursor: pointer;
      font-family: 'DM Mono', monospace;
      transition: all 0.2s;
    }
    .pagination-btn:hover:not(:disabled) {
      background: var(--border);
      border-color: var(--text3);
    }
    .pagination-btn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }
    .pagination-btn.active {
      background: var(--accent);
      color: white;
      border-color: var(--accent);
    }