/* base.css — Design System, Layout, Componentes Valora
 * Extraído automaticamente de index.html
 */

    /* ============================================================
       DESIGN SYSTEM
    ============================================================ */
    :root {
      --bg: #F5F5F7;
      --bg2: #FFFFFF;
      --surface: #FFFFFF;
      --surface2: #F5F5F7;
      --border: rgba(0, 0, 0, 0.08);
      --border2: rgba(0, 0, 0, 0.15);
      --text: #1D1D1F;
      --text2: #86868B;
      --text3: #A1A1A6;
      --accent: #0071E3;
      --accent2: #0077ED;
      --accent-glow: rgba(0, 113, 227, 0.25);
      --green: #34C759;
      --red: #FF3B30;
      --orange: #FF9500;
      --blue: #0071E3;
      --yellow: #FFCC00;
      --radius: 12px;
      --radius-sm: 8px;
      --radius-lg: 18px;
      --sidebar-w: 240px;
      --transition: 0.25s cubic-bezier(0.25, 0.1, 0.25, 1);
      --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
      --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
      --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
    }

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

    html,
    body {
      height: 100%;
      font-family: 'Inter', system-ui, sans-serif;
      background: var(--bg);
      color: var(--text);
      font-size: 14px;
      -webkit-font-smoothing: antialiased;
    }

    /* ── SCROLLBAR ── */
    ::-webkit-scrollbar {
      width: 6px;
      height: 6px;
    }

    ::-webkit-scrollbar-track {
      background: transparent;
    }

    ::-webkit-scrollbar-thumb {
      background: rgba(0, 0, 0, 0.15);
      border-radius: 99px;
    }

    /* ── LAYOUT ── */
    #app {
      display: flex;
      height: 100vh;
      overflow: hidden;
    }

    /* ── SIDEBAR ── */
    #sidebar {
      width: var(--sidebar-w);
      background: var(--bg2);
      border-right: none;
      box-shadow: 1px 0 16px rgba(0,0,0,0.03);
      display: flex;
      flex-direction: column;
      padding: 24px 0;
      flex-shrink: 0;
      z-index: 10;
    }

    .logo {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 0 20px 28px;
      border-bottom: 1px solid var(--border);
      margin-bottom: 16px;
    }

    .logo-icon {
      width: 36px;
      height: 36px;
      background: linear-gradient(135deg, #0071E3, #00C6FF);
      color: #ffffff;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      box-shadow: 0 4px 12px var(--accent-glow);
    }

    .logo-text {
      font-size: 22px;
      font-weight: 800;
      letter-spacing: -0.5px;
    }

    .logo-sub {
      font-size: 10px;
      color: var(--text3);
      font-weight: 400;
    }

    nav {
      flex: 1;
      padding: 0 12px;
    }

    .nav-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 12px;
      border-radius: var(--radius-sm);
      color: var(--text2);
      cursor: pointer;
      transition: background var(--transition), color var(--transition);
      font-size: 13.5px;
      font-weight: 500;
      margin-bottom: 2px;
      user-select: none;
    }

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

    .nav-item.active {
      background: #F5F5F7;
      color: var(--text);
      font-weight: 600;
      border: none;
    }

    .nav-icon {
      font-size: 20px;
      width: 24px;
      text-align: center;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .sidebar-footer {
      padding: 12px 12px 8px;
      border-top: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .sidebar-version {
      font-size: 10px;
      font-weight: 600;
      color: var(--text3);
      background: rgba(0, 0, 0, 0.05);
      border-radius: 20px;
      padding: 4px 10px;
      margin: 4px 4px 0;
      text-align: center;
      letter-spacing: 0.4px;
    }

    /* ── LOGIN OVERLAY ── */
    #login-overlay {
      position: fixed;
      inset: 0;
      z-index: 9999;
      background: #F5F5F7;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }

    #login-overlay.hidden {
      display: none;
    }

    #forgot-overlay {
      position: fixed;
      inset: 0;
      z-index: 10000;
      background: #F5F5F7;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }

    #forgot-overlay.hidden {
      display: none;
    }

    .login-card {
      background: #FFFFFF;
      border: 1px solid var(--border);
      border-radius: 24px;
      padding: 48px 44px;
      width: 100%;
      max-width: 400px;
      box-shadow: 0 16px 48px rgba(0, 0, 0, 0.06);
      animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .login-logo {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 36px;
    }

    .login-logo-icon {
      display: none;
    }

    .login-logo-text {
      font-size: 20px;
      font-weight: 800;
      color: var(--text);
      letter-spacing: -0.5px;
      display: flex;
      align-items: baseline;
    }

    .login-logo-sub {
      font-size: 11px;
      color: var(--text3);
      font-weight: 400;
    }

    .login-title {
      font-size: 26px;
      font-weight: 800;
      color: var(--text);
      letter-spacing: -0.5px;
      margin-bottom: 6px;
    }

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

    .login-field {
      display: flex;
      flex-direction: column;
      gap: 6px;
      margin-bottom: 16px;
    }

    .login-field label {
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.8px;
      color: var(--text3);
    }

    .login-field input {
      background: #FAFAFA;
      border: 1px solid var(--border);
      border-radius: 10px;
      color: var(--text);
      padding: 12px 16px;
      font-size: 14px;
      font-family: inherit;
      outline: none;
      transition: border-color 0.2s, box-shadow 0.2s;
    }

    .login-field input::placeholder {
      color: var(--text3);
    }

    .login-field input:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
      background: #FFFFFF;
    }

    .login-btn {
      width: 100%;
      padding: 13px;
      margin-top: 8px;
      background: linear-gradient(135deg, #2563eb, #7c3aed);
      color: #fff;
      border: none;
      border-radius: 10px;
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      font-family: inherit;
      transition: all 0.2s;
      box-shadow: 0 4px 20px rgba(124, 92, 252, 0.4);
    }

    .login-btn:hover {
      box-shadow: 0 6px 24px rgba(124, 92, 252, 0.6);
      transform: translateY(-1px);
    }

    .login-btn.loading {
      opacity: 0.8;
      pointer-events: none;
    }

    .login-actions {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-top: 24px;
      padding-top: 24px;
      border-top: 1px solid var(--border);
      font-size: 13px;
    }

    .login-link {
      color: var(--text3);
      text-decoration: none;
      font-weight: 600;
      transition: color 0.2s;
    }

    .login-link:hover {
      color: var(--accent);
    }

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

    .login-btn:disabled {
      opacity: 0.6;
      cursor: not-allowed;
      transform: none;
    }

    .login-error {
      background: rgba(220, 38, 38, 0.15);
      border: 1px solid rgba(220, 38, 38, 0.3);
      border-radius: 8px;
      color: #fca5a5;
      font-size: 13px;
      padding: 10px 14px;
      margin-top: 12px;
      display: none;
      text-align: center;
    }

    .login-error.show {
      display: block;
    }

    .btn-logout {
      display: flex;
      align-items: center;
      gap: 8px;
      background: transparent;
      border: 1px solid transparent;
      border-radius: var(--radius-sm);
      color: var(--text2);
      padding: 8px 12px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      width: 100%;
      transition: all var(--transition);
      font-family: inherit;
    }

    .btn-logout:hover {
      background: rgba(255, 59, 48, 0.08); /* Red style hover only */
      color: var(--red);
    }

    .btn-hide-values {
      display: flex;
      align-items: center;
      gap: 8px;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      color: var(--text2);
      padding: 8px 12px;
      font-size: 12.5px;
      font-weight: 500;
      cursor: pointer;
      width: 100%;
      transition: all var(--transition);
    }

    .btn-hide-values:hover {
      background: rgba(0, 0, 0, 0.05);
      color: var(--text);
    }

    .btn-hide-values.active {
      background: rgba(124, 92, 252, 0.15);
      color: var(--accent2);
      border-color: rgba(124, 92, 252, 0.3);
    }

    /* Global hide-values class */
    body.values-hidden .money-value {
      font-size: 0 !important;
      user-select: none;
      pointer-events: none;
      transition: all 0.2s;
    }

    body.values-hidden .money-value::after {
      content: "••••••";
      font-size: 15px;
      color: var(--text3);
      letter-spacing: 2px;
    }

    /* ── MAIN ── */
    #main {
      flex: 1;
      overflow-y: auto;
      padding: 32px;
      display: flex;
      flex-direction: column;
    }

    .page {
      display: none;
      flex-direction: column;
      gap: 28px;
      animation: fadeIn 0.3s ease;
    }

    .page.active {
      display: flex;
    }

    @keyframes fadeIn {
      from {
        opacity: 0;
        transform: translateY(8px);
      }

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

    /* ── PAGE HEADER ── */
    .page-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 16px;
      flex-wrap: wrap;
    }

    .page-title {
      font-size: 24px;
      font-weight: 700;
      color: var(--text);
      letter-spacing: -0.5px;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .page-subtitle {
      color: var(--text2);
      font-size: 13px;
      margin-top: 3px;
    }

    /* ── BUTTONS ── */
    .btn {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      padding: 9px 16px;
      border-radius: var(--radius-sm);
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      border: none;
      transition: all var(--transition);
      white-space: nowrap;
    }

    .btn-primary {
      background: var(--accent);
      color: #fff;
      box-shadow: 0 4px 12px var(--accent-glow);
    }

    .btn-primary:hover {
      transform: translateY(-1px);
      background: var(--accent2);
      box-shadow: 0 6px 16px var(--accent-glow);
    }

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

    .btn-ghost:hover {
      background: rgba(255, 255, 255, 0.1);
      border-color: var(--border2);
    }

    .btn-icon-outline {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 32px;
      height: 32px;
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      background: transparent;
      color: var(--text2);
      transition: all var(--transition);
      cursor: pointer;
      font-size: 16px;
    }

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

    .btn-icon-outline.danger:hover {
      background: rgba(255, 59, 48, 0.08);
      color: var(--red);
      border-color: rgba(255, 59, 48, 0.2);
    }

    .btn-danger {
      background: rgba(240, 90, 122, 0.15);
      color: var(--red);
      border: 1px solid rgba(240, 90, 122, 0.25);
    }

    .btn-danger:hover {
      background: rgba(240, 90, 122, 0.25);
    }

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

    /* Touch target mínimo universal (WCAG 2.5.5) */
    .btn {
      min-height: 44px;
    }
    .btn.btn-sm {
      min-height: 36px;
    }

    /* ── CARDS ── */
    .card {
      background: var(--surface);
      border: none;
      box-shadow: var(--shadow-md);
      border-radius: var(--radius-lg);
      padding: 24px;
    }

    /* ── STATS GRID ── */
    .stat-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      gap: 16px;
    }

    .stat-card {
      background: var(--surface);
      border: none;
      box-shadow: var(--shadow-md);
      border-radius: var(--radius-lg);
      padding: 24px;
      position: relative;
      overflow: hidden;
      transition: box-shadow var(--transition), transform var(--transition);
    }

    .stat-card:hover {
      box-shadow: var(--shadow-lg);
      transform: translateY(-2px);
    }



    .stat-label {
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.8px;
      color: var(--text2);
      margin-bottom: 10px;
    }

    .stat-value {
      font-size: 19px;
      font-weight: 800;
      letter-spacing: -0.5px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .stat-value.purple {
      color: var(--accent2);
    }

    .stat-value.green {
      color: var(--green);
    }

    .stat-value.orange {
      color: var(--orange);
    }

    .stat-value.blue {
      color: var(--blue);
    }

    .stat-change {
      font-size: 11px;
      color: var(--text3);
      margin-top: 4px;
    }

    /* ── TABLE ── */
    .table-wrap {
      background: var(--surface);
      border: none;
      box-shadow: var(--shadow-md);
      border-radius: var(--radius-lg);
      overflow: hidden;
    }

    /* Wrapper de scroll horizontal para tabelas em mobile */
    .table-scroll-wrap {
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }
    .table-scroll-wrap table {
      min-width: 600px;
    }

    .table-toolbar {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 16px 24px;
      border-bottom: 1px solid var(--border);
      flex-wrap: wrap;
    }

    .search-input {
      flex: 1;
      min-width: 180px;
      background: var(--surface2);
      border: 1px solid var(--border2);
      border-radius: var(--radius-sm);
      color: var(--text);
      padding: 8px 12px;
      font-size: 13px;
      outline: none;
      transition: border-color var(--transition);
    }

    .search-input::placeholder {
      color: var(--text3);
    }

    .filter:focus,
    .search-input:focus {
      border-color: var(--border2);
    }

    input[type="month"].filter {
      padding: 6px 12px;
      font-family: inherit;
      color: var(--text);
      background: transparent;
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      font-size: 13px;
      height: 36px;
      box-sizing: border-box;
      outline: none;
      transition: all var(--transition);
    }
    input[type="month"].filter:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
    }

    select.filter {
      background: var(--surface2);
      border: 1px solid var(--border2);
      border-radius: var(--radius-sm);
      color: var(--text);
      padding: 8px 10px;
      font-size: 12px;
      outline: none;
      cursor: pointer;
    }

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

    thead th {
      text-align: left;
      padding: 12px 24px;
      font-size: 11.5px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.6px;
      color: var(--text3);
      border-bottom: 1px solid var(--border);
      background: var(--bg);
    }

    tbody tr {
      transition: background var(--transition);
    }

    tbody tr:hover {
      background: var(--surface2);
    }

    tbody tr:not(:last-child) {
      border-bottom: 1px solid var(--border);
    }

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

    .td-title {
      font-weight: 600;
      font-size: 13.5px;
    }

    .td-sub {
      font-size: 11px;
      color: var(--text2);
      margin-top: 2px;
    }

    .table-actions {
      display: flex;
      gap: 6px;
    }

    .empty-row td {
      text-align: center;
      color: var(--text3);
      padding: 48px;
      font-size: 13px;
    }

    /* ── BADGES ── */
    .badge {
      display: inline-flex;
      align-items: center;
      padding: 3px 10px;
      border-radius: 99px;
      font-size: 11px;
      font-weight: 600;
      white-space: nowrap;
    }

    .badge-palestra {
      background: rgba(77, 184, 255, 0.15);
      color: var(--blue);
    }

    .badge-workshop {
      background: rgba(124, 92, 252, 0.15);
      color: var(--accent2);
    }

    .badge-keynote {
      background: rgba(240, 208, 96, 0.15);
      color: var(--yellow);
    }

    .badge-curso {
      background: rgba(34, 201, 138, 0.15);
      color: var(--green);
    }

    .badge-confirmado {
      background: rgba(34, 201, 138, 0.15);
      color: var(--green);
    }

    .badge-proposta {
      background: rgba(240, 160, 32, 0.15);
      color: var(--orange);
    }

    .badge-cancelado {
      background: rgba(240, 90, 122, 0.15);
      color: var(--red);
    }

    .badge-realizado {
      background: rgba(90, 90, 122, 0.15);
      color: var(--text2);
    }

    .badge-pago {
      background: rgba(34, 201, 138, 0.15);
      color: var(--green);
    }

    .badge-pendente {
      background: rgba(240, 160, 32, 0.15);
      color: var(--orange);
    }

    .badge-atrasado {
      background: rgba(240, 90, 122, 0.15);
      color: var(--red);
    }

    /* ── MODAL ── */
    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.7);
      backdrop-filter: blur(6px);
      z-index: 100;
      display: none;
      padding: 20px;
    }

    .modal-overlay.open {
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .modal {
      background: var(--surface);
      border: none;
      border-radius: 20px;
      width: 100%;
      max-width: 560px;
      max-height: 90vh;
      overflow-y: auto;
      animation: slideUp 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
      box-shadow: 0 32px 80px rgba(0, 0, 0, 0.25);
    }

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

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

    .modal-header {
      padding: 24px 24px 0;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .modal-title {
      font-size: 17px;
      font-weight: 700;
    }

    .modal-close {
      background: none;
      border: none;
      color: var(--text2);
      font-size: 20px;
      cursor: pointer;
      line-height: 1;
      padding: 4px;
      transition: color var(--transition);
    }

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

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

    /* ── FORM ── */
    .form-row {
      display: grid;
      gap: 14px;
    }

    .form-row.cols-2 {
      grid-template-columns: 1fr 1fr;
    }

    .form-row.cols-3 {
      grid-template-columns: 1fr 1fr 1fr;
    }

    .field {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .field label {
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.6px;
      color: var(--text2);
    }

    .field input,
    .field select,
    .field textarea {
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      color: var(--text);
      padding: 9px 12px;
      font-size: 13.5px;
      font-family: inherit;
      outline: none;
      transition: border-color var(--transition), box-shadow var(--transition);
    }

    .field input:focus,
    .field select:focus,
    .field textarea:focus {
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.15);
    }

    .field textarea {
      resize: vertical;
      min-height: 72px;
    }

    .modal-footer {
      display: flex;
      flex-direction: column;
      gap: 12px;
      padding: 0; /* Removido padding pois agora é um bloco lateral */
    }

    /* Responsividade para botões laterais (Mobile) */
    @media (max-width: 768px) {
      .modal-overlay {
        flex-direction: column;
        padding: 10px;
        gap: 20px;
        overflow-y: auto;
        justify-content: flex-start;
      }
      .modal {
        max-height: none;
        margin-top: 40px;
      }
      .modal-footer {
        flex-direction: row;
        width: 100%;
        max-width: 560px;
        justify-content: center;
        padding-bottom: 40px;
        margin-top: 5px;
        order: 2;
      }
      .btn {
        flex: 1;
        justify-content: center;
      }
    }

    /* ── AGENDA (CALENDAR) ── */
    .cal-nav {
      display: flex;
      align-items: center;
      gap: 16px;
    }

    .cal-month-label {
      font-size: 18px;
      font-weight: 700;
      min-width: 180px;
    }

    .cal-grid {
      background: var(--surface);
      border: none;
      box-shadow: var(--shadow-md);
      border-radius: var(--radius-lg);
      overflow: hidden;
    }

    .cal-days-header {
      display: grid;
      grid-template-columns: repeat(7, minmax(0, 1fr));
      border-bottom: 1px solid var(--border);
    }

    .cal-day-name {
      text-align: center;
      padding: 12px 4px;
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.6px;
      color: var(--text3);
    }

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

    .cal-cell {
      min-height: 90px;
      padding: 8px;
      border-right: 1px solid var(--border);
      border-bottom: 1px solid var(--border);
      position: relative;
      transition: background var(--transition);
    }

    .cal-cell:hover {
      background: var(--surface2);
    }

    .cal-cell:nth-child(7n) {
      border-right: none;
    }

    .cal-cell.other-month .cal-cell-num {
      color: var(--text3);
    }

    .cal-cell.today .cal-cell-num {
      background: var(--accent);
      color: #fff;
      box-shadow: 0 2px 8px var(--accent-glow);
    }

    /* Calendar blocking by event status */
    .cal-cell.blocked-proposta {
      background: rgba(234, 179, 8, 0.08);
      border-left: 3px solid #ca8a04;
    }

    .cal-cell.blocked-proposta:hover {
      background: rgba(234, 179, 8, 0.14);
    }

    .cal-cell.blocked-confirmado {
      background: rgba(5, 150, 105, 0.08);
      border-left: 3px solid #059669;
    }

    .cal-cell.blocked-confirmado:hover {
      background: rgba(5, 150, 105, 0.14);
    }

    .cal-cell.blocked-realizado {
      background: rgba(2, 132, 199, 0.08);
      border-left: 3px solid #0284c7;
    }

    .cal-cell-status-badge {
      position: absolute;
      top: 7px;
      right: 7px;
      font-size: 10px;
      font-weight: 700;
      padding: 2px 5px;
      border-radius: 4px;
      white-space: nowrap;
    }

    .cal-cell-status-badge.proposta {
      background: rgba(202, 138, 4, 0.15);
      color: #ca8a04;
    }

    .cal-cell-status-badge.confirmado {
      background: rgba(5, 150, 105, 0.15);
      color: #059669;
    }

    .cal-cell-status-badge.realizado {
      background: rgba(2, 132, 199, 0.15);
      color: #0284c7;
    }

    .cal-cell-num {
      width: 26px;
      height: 26px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      font-weight: 600;
      margin-bottom: 4px;
    }

    .cal-event {
      font-size: 10px;
      padding: 2px 5px;
      border-radius: 4px;
      margin-bottom: 2px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      cursor: default;
      font-weight: 500;
    }

    .cal-event.palestra {
      background: rgba(77, 184, 255, 0.2);
      color: var(--blue);
    }

    .cal-event.workshop {
      background: rgba(124, 92, 252, 0.2);
      color: var(--accent2);
    }

    .cal-event.keynote {
      background: rgba(240, 208, 96, 0.2);
      color: var(--yellow);
    }

    .cal-event.curso {
      background: rgba(34, 201, 138, 0.2);
      color: var(--green);
    }

    /* ── CACHE (FINANCE) ── */
    .finance-summary {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      gap: 16px;
    }

    .finance-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 18px 20px;
      transition: border-color var(--transition);
    }

    .finance-card:hover {
      border-color: var(--border2);
    }

    .finance-label {
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.7px;
      color: var(--text2);
      margin-bottom: 8px;
    }

    .finance-value {
      font-size: 19px;
      font-weight: 800;
      letter-spacing: -0.5px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    /* ── UPCOMING LIST ── */
    .event-list {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .event-item {
      display: flex;
      align-items: center;
      gap: 14px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 12px 16px;
      transition: border-color var(--transition), transform var(--transition);
    }

    .event-item:hover {
      border-color: var(--border2);
      transform: translateX(2px);
    }

    .event-date-badge {
      text-align: center;
      min-width: 44px;
      flex-shrink: 0;
    }

    .event-date-day {
      font-size: 22px;
      font-weight: 800;
      line-height: 1;
    }

    .event-date-month {
      font-size: 10px;
      font-weight: 600;
      text-transform: uppercase;
      color: var(--text2);
      letter-spacing: 0.5px;
    }

    .event-info {
      flex: 1;
    }

    .event-info-title {
      font-weight: 600;
      font-size: 13.5px;
    }

    .event-info-sub {
      font-size: 11.5px;
      color: var(--text2);
      margin-top: 2px;
    }

    .event-right {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 4px;
    }

    .event-valor {
      font-size: 14px;
      font-weight: 700;
      color: var(--green);
    }

    /* ── TOAST ── */
    #toast-container {
      position: fixed;
      bottom: 24px;
      right: 24px;
      z-index: 999;
      display: flex;
      flex-direction: column;
      gap: 8px;
      max-width: 360px;
    }

    .toast {
      background: #1e1e35;
      border: 1px solid var(--border2);
      border-radius: var(--radius-sm);
      padding: 12px 16px;
      font-size: 13px;
      color: #ffffff;
      animation: toastIn 0.25s ease;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .toast.success {
      border-left: 3px solid var(--green);
    }

    .toast.error {
      border-left: 3px solid var(--red);
    }

    @keyframes toastIn {
      from {
        opacity: 0;
        transform: translateY(10px);
      }

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

    /* ── ADMIN ── */
    .admin-tabs {
      display: flex;
      gap: 4px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 4px;
      width: fit-content;
    }

    .admin-tab {
      padding: 7px 16px;
      border-radius: 6px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      color: var(--text2);
      transition: all var(--transition);
      border: none;
      background: none;
    }

    .admin-tab.active {
      background: var(--surface2);
      color: var(--text);
    }

    .admin-tab:hover:not(.active) {
      color: var(--text);
    }

    .admin-panel {
      display: none;
      flex-direction: column;
      gap: 20px;
    }

    .admin-panel.active {
      display: flex;
    }

    .admin-section-title {
      font-size: 15px;
      font-weight: 700;
      margin-bottom: 4px;
    }

    .admin-section-sub {
      font-size: 12px;
      color: var(--text2);
      margin-bottom: 14px;
    }

    /* RBAC */
    .hide-finance { display: none !important; }

    .tipo-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .tipo-item {
      display: flex;
      align-items: center;
      gap: 10px;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 10px 14px;
      margin-bottom: 6px;
    }

    .tipo-edit-row {
      background: var(--surface);
      border: 1px solid var(--border2);
      border-radius: var(--radius-sm);
      padding: 8px 12px;
      margin-bottom: 6px;
      flex-wrap: wrap;
    }

    .tipo-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    .tipo-name {
      flex: 1;
      font-size: 13px;
      font-weight: 500;
    }

    .tipo-tag {
      font-size: 11px;
      color: var(--text3);
    }

    .add-tipo-row {
      display: flex;
      gap: 8px;
      margin-top: 4px;
    }

    .color-picker {
      width: 38px;
      height: 36px;
      border-radius: var(--radius-sm);
      border: 1px solid var(--border2);
      background: var(--surface2);
      cursor: pointer;
      padding: 2px;
    }

    /* ================== RESPONSIVIDADE COMPLETA ================== */

    /* ID duplicado não é válido; hamburguer em todas as pages via classe */
    .page-hamburger {
      display: none;
      align-items: center;
      justify-content: center;
      width: 40px; height: 40px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      cursor: pointer;
      font-size: 18px;
      flex-shrink: 0;
      transition: background var(--transition);
    }
    .page-hamburger:hover { background: var(--bg2); }


    /* Overlay para fechar sidebar no mobile */
    #sidebar-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.5);
      z-index: 99;
      backdrop-filter: blur(2px);
    }
    #sidebar-overlay.active { display: block; }

    /* Botão hamburguer */
    #btn-hamburger {
      display: none;
      align-items: center;
      justify-content: center;
      width: 40px; height: 40px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      cursor: pointer;
      font-size: 18px;
      flex-shrink: 0;
      transition: background var(--transition);
    }
    #btn-hamburger:hover { background: var(--bg2); }

    @media (max-width: 768px) {
      /* Sidebar vira drawer overlay */
      #sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        bottom: 0;
        width: 240px;
        z-index: 100;
        transition: left 0.28s cubic-bezier(0.4,0,0.2,1);
        box-shadow: none;
        overflow-y: auto;
      }
      #sidebar.open {
        left: 0;
        box-shadow: 8px 0 40px rgba(0,0,0,0.18);
      }

      /* Mostrar hamburguer e ocultar nome */
      #btn-hamburger { display: flex; }

      /* Main ocupa 100% da largura */
      #main {
        padding: 16px 14px;
        width: 100%;
      }

      /* Page header adaptado */
      .page-header {
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 16px;
      }
      .page-header .page-title { font-size: 20px; }
      .page-header .btn { width: 100%; justify-content: center; }

      /* Stat cards: 2 colunas */
      .stat-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
      }
      .stat-card {
        padding: 16px;
        min-height: unset;
      }

      /* Finance summary: 2 colunas */
      .finance-summary {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
      }
    } /* ← Fechando @media (max-width: 768px) */

    /* ── BIA AI ASSISTANT ── */
    #page-bia {
      display: none;
      flex-direction: column;
      height: 100%;
      background: var(--surface);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow-md);
      overflow: hidden;
    }

    #page-bia.active {
      display: flex;
    }

    .bia-header {
      padding: 24px 32px;
      border-bottom: 1px solid var(--border);
      background: var(--surface);
      display: flex;
      align-items: center;
      gap: 16px;
    }

    .bia-chat-container {
      flex: 1;
      overflow-y: auto;
      padding: 32px;
      display: flex;
      flex-direction: column;
      gap: 20px;
    }

    .bia-msg {
      display: flex;
      gap: 12px;
      max-width: 80%;
    }

    .bia-msg.user {
      align-self: flex-end;
      flex-direction: row-reverse;
    }

    .bia-bubble {
      padding: 14px 18px;
      border-radius: 16px;
      font-size: 14px;
      line-height: 1.5;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    }

    .bia-msg.ai .bia-bubble {
      background: var(--surface);
      border: 1px solid var(--border);
      color: var(--text);
      border-top-left-radius: 4px;
    }

    .bia-msg.user .bia-bubble {
      background: var(--accent);
      color: #fff;
      border-top-right-radius: 4px;
    }

    .bia-suggestions {
      display: flex;
      gap: 10px;
      padding: 0 32px 16px;
      flex-wrap: wrap;
    }

    .bia-suggest-btn {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 99px;
      padding: 8px 16px;
      font-size: 12.5px;
      color: var(--text2);
      cursor: pointer;
      transition: all var(--transition);
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .bia-suggest-btn:hover {
      background: var(--bg2);
      color: var(--text);
      border-color: var(--border2);
    }

    .bia-input-area {
      padding: 20px 32px;
      background: var(--surface);
      border-top: 1px solid var(--border);
    }

    .bia-input-box {
      display: flex;
      align-items: center;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: 24px;
      padding: 4px 4px 4px 20px;
      transition: border-color var(--transition);
    }

    .bia-input-box:focus-within {
      border-color: var(--accent);
      background: var(--surface);
    }

    .bia-input {
      flex: 1;
      border: none;
      background: transparent;
      outline: none;
      font-size: 14px;
      color: var(--text);
      font-family: inherit;
    }

    .bia-send-btn {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background: var(--accent);
      color: white;
      border: none;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 16px;
      transition: transform 0.1s, filter 0.2s;
    }

    .bia-send-btn:hover {
      filter: brightness(1.1);
      transform: scale(1.05);
    }

    .bia-send-btn:active {
      transform: scale(0.95);
    }

    .typing-indicator {
      display: flex;
      gap: 4px;
      padding: 4px 8px;
    }

    .typing-dot {
      width: 6px;
      height: 6px;
      background: var(--text3);
      border-radius: 50%;
      animation: typing 1.4s infinite ease-in-out;
    }

    .typing-dot:nth-child(1) {
      animation-delay: -0.32s;
    }

    .typing-dot:nth-child(2) {
      animation-delay: -0.16s;
    }

    @keyframes typing {

      0%,
      80%,
      100% {
        transform: scale(0);
        opacity: 0.5;
      }

      40% {
        transform: scale(1);
        opacity: 1;
      }
    }

    /* ── ANIMAÇÃO SPINNER (Loading Insights / BIA) ── */
    @keyframes spin {
      from { transform: rotate(0deg); }
      to   { transform: rotate(360deg); }
    }

    /* Suporte ao ph-spin do Phosphor Icons (garante funcionar mesmo sem o CDN ter carregado a animação) */
    .ph-spin {
      animation: spin 1s linear infinite !important;
      display: inline-block;
    }