﻿<style>
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    :root {
      --color-primary-50: #e6f4f9;
      --color-primary-100: #c9e5f2;
      --color-primary-500: #0b5f84;
      --color-primary-600: #085579;
      --color-primary-700: #07435d;
      --color-accent-400: #f5c842;
      --color-accent-500: #e3b440;
      --color-neutral-50: #f7f9fb;
      --color-neutral-100: #edf2f6;
      --color-neutral-200: #dbe5ee;
      --color-neutral-500: #4f6275;
      --color-neutral-900: #142738;
      --color-success: #16a34a;
      --color-warning: #d97706;
      --color-danger: #dc2626;
      --color-info: #0891b2;
      --surface-app: #f4f6f8;
      --surface-card: #ffffff;
      --surface-muted: #f0f3f7;
      --surface-sidebar: #031a28;
      --brand-gradient: linear-gradient(135deg, var(--color-primary-500) 0%, var(--color-primary-700) 100%);
      --sidebar-gradient: linear-gradient(180deg, #031f32 0%, #021827 100%);
      --sidebar-width: 260px;
      --sidebar-collapsed-width: 72px;
      --shadow-card: 0 1px 2px rgba(4, 26, 40, 0.05), 0 8px 18px rgba(4, 26, 40, 0.06), 0 18px 38px rgba(4, 26, 40, 0.04);
      --shadow-card-hover: 0 2px 4px rgba(4, 26, 40, 0.06), 0 12px 26px rgba(4, 26, 40, 0.09), 0 26px 44px rgba(4, 26, 40, 0.07);
    }

    body {
      background-color: var(--surface-app);
      background-image:
        radial-gradient(circle at 8% 18%, rgba(11, 95, 132, 0.09), transparent 34%),
        radial-gradient(circle at 92% 84%, rgba(227, 180, 64, 0.1), transparent 36%),
        linear-gradient(180deg, #f6f8fb 0%, #eef2f6 100%);
      min-height: 100vh;
      font-family: 'Plus Jakarta Sans', sans-serif;
      overflow-x: hidden;
      color: var(--color-neutral-900);
    }

    :where(button, [role="button"], a, input, select, textarea, .search-result-item, .dashboard-kpi-card):focus-visible {
      outline: 3px solid rgba(11, 95, 132, 0.42);
      outline-offset: 2px;
    }

    .main-container {
      display: block;
      min-height: 100vh;
      position: relative;
    }

    /* SIDEBAR */
    .sidebar {
      width: var(--sidebar-width);
      background: var(--sidebar-gradient);
      color: white;
      padding: 20px;
      overflow-y: auto;
      box-shadow: 2px 0 15px rgba(0, 0, 0, 0.3);
      position: fixed;
      height: 100vh;
      left: 0;
      top: 0;
      z-index: 1000;
      transition: width 0.22s ease, transform 0.28s ease;
    }

    .sidebar-controls {
      margin-left: auto;
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .sidebar-control-btn {
      width: 34px;
      height: 34px;
      border-radius: 10px;
      border: 1px solid rgba(255, 255, 255, 0.24);
      background: rgba(255, 255, 255, 0.08);
      color: rgba(255, 255, 255, 0.95);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .sidebar-control-btn:hover,
    .sidebar-control-btn:focus-visible {
      background: rgba(240, 165, 0, 0.24);
      border-color: rgba(240, 165, 0, 0.66);
      color: #fff;
      outline: none;
    }

    .sidebar-logo { display: flex; align-items: center; margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); gap: 10px; justify-content: space-between; }

    .sidebar-logo i { font-size: 32px; color: var(--color-accent-400); flex-shrink: 0; }

    .sidebar-logo h4 { margin: 0; font-family: 'Sora', sans-serif; font-weight: 700; font-size: 18px; line-height: 1; letter-spacing: -0.01em; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    .sidebar-footer {
      margin-top: 30px;
    }

    .sidebar .nav-menu {
      list-style: none;
      padding: 0;
    }

    .sidebar .nav-group-label {
      font-size: 11px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      font-weight: 700;
      color: rgba(255, 255, 255, 0.55);
      margin: 18px 8px 10px;
    }

    .sidebar .nav-divider {
      border-top: 1px solid rgba(255, 255, 255, 0.16);
      margin: 16px 6px 8px;
    }

    .sidebar .nav-item {
      margin-bottom: 8px;
    }

    .sidebar .nav-link {
      color: rgba(255, 255, 255, 0.88);
      padding: 12px 15px;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      cursor: pointer;
      transition: all 0.3s ease;
      text-decoration: none;
    }

    .sidebar .nav-link-main {
      display: inline-flex;
      align-items: center;
      min-width: 0;
    }

    .sidebar .nav-link:hover {
      background: rgba(240, 165, 0, 0.14);
      color: white;
    }

    .sidebar .nav-link.active {
      background: var(--brand-gradient);
      color: white;
      font-weight: 600;
    }

    .sidebar .nav-link i {
      width: 24px;
      margin-right: 12px;
      text-align: center;
    }

    .sidebar-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 22px;
      height: 22px;
      border-radius: 999px;
      background: rgba(240, 165, 0, 0.18);
      color: #ffcf67;
      font-size: 11px;
      font-weight: 700;
      padding: 0 7px;
      border: 1px solid rgba(240, 165, 0, 0.45);
      margin-left: 8px;
    }

    .sidebar .nav-link.active .sidebar-badge {
      background: rgba(255, 255, 255, 0.24);
      color: #ffffff;
      border-color: rgba(255, 255, 255, 0.48);
    }

    .sidebar-backdrop {
      display: none;
    }

    .mobile-topbar {
      display: none;
    }

    .desktop-only {
      display: inline-flex;
    }

    .mobile-only {
      display: none !important;
    }

    body.sidebar-collapsed .sidebar {
      width: var(--sidebar-collapsed-width);
      padding: 20px 10px;
    }

    body.sidebar-collapsed .sidebar-logo {
      justify-content: center;
      margin-bottom: 18px;
      padding-bottom: 14px;
      position: relative;
    }

    body.sidebar-collapsed .sidebar-logo h4,
    body.sidebar-collapsed .sidebar .nav-group-label,
    body.sidebar-collapsed .sidebar .nav-divider,
    body.sidebar-collapsed .sidebar-footer,
    body.sidebar-collapsed .sidebar-badge {
      display: none !important;
    }

    body.sidebar-collapsed .sidebar-logo i {
      margin-right: 0;
      font-size: 28px;
    }

    body.sidebar-collapsed .sidebar-controls {
      position: absolute;
      top: -2px;
      right: 0;
      margin-left: 0;
    }

    body.sidebar-collapsed .sidebar .nav-link {
      justify-content: center;
      padding: 12px 10px;
    }

    body.sidebar-collapsed .sidebar .nav-link-main {
      font-size: 0;
    }

    body.sidebar-collapsed .sidebar .nav-link i {
      margin-right: 0;
      width: auto;
      font-size: 16px;
    }

    /* MAIN CONTENT */
    .main-content {
      flex: 1;
      margin-left: var(--sidebar-width);
      overflow-y: auto;
      overflow-x: hidden;
      padding: 30px;
      background: var(--surface-app);
      transition: margin-left 0.22s ease;
    }

    body.sidebar-collapsed .main-content {
      margin-left: var(--sidebar-collapsed-width);
    }

    /* HEADER */
    .content-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 30px;
      background: var(--surface-card);
      padding: 20px;
      border-radius: 12px;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    }

    .content-header h2 { color: var(--color-neutral-900); font-weight: 700; font-size: 24px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    .module-header {
      display: flex;
      align-items: center;
      gap: 14px;
      min-width: 0;
    }

    .module-header-icon {
      width: 42px;
      height: 42px;
      border-radius: 14px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: var(--color-primary-50);
      color: var(--color-primary-700);
      box-shadow: inset 0 0 0 1px rgba(15, 80, 112, 0.12);
      font-size: 18px;
      flex-shrink: 0;
    }

    .module-header-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }

    .module-subtitle { margin: 0; font-size: 13px; color: var(--color-neutral-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    .header-actions {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }

    /* MODALS */
    .modal-content {
      border: none;
      border-radius: 12px;
      box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    }

    .modal-header {
      background: var(--brand-gradient);
      color: white;
      border: none;
      border-radius: 12px 12px 0 0;
    }

    /* CARDS */
    .card {
      border: 1px solid rgba(12, 39, 56, 0.08);
      border-radius: 12px;
      box-shadow: var(--shadow-card);
      transition: all 0.3s ease;
      margin-bottom: 20px;
    }

    .card:hover {
      box-shadow: var(--shadow-card-hover);
      transform: translateY(-2px);
    }

    .card-header {
      background: var(--brand-gradient);
      color: white;
      border: none;
      border-radius: 12px 12px 0 0;
      font-weight: 600;
    }

    /* BUTTONS */
    .btn-primary {
      background: var(--brand-gradient);
      border: none;
      border-radius: 8px;
      font-weight: 600;
      transition: all 0.3s ease;
    }

    .btn-primary:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 18px rgba(8, 85, 121, 0.34);
      background: var(--brand-gradient);
      color: white;
    }

    .btn-secondary {
      background: #6c757d;
      border: none;
      border-radius: 8px;
      font-weight: 600;
    }

    .btn-secondary:hover {
      background: #5a6268;
      transform: translateY(-2px);
    }

    .btn-success {
      background: var(--color-success);
      border-color: var(--color-success);
      color: #fff;
      border: none;
      border-radius: 8px;
    }

    .btn-danger {
      background: var(--color-danger);
      border-color: var(--color-danger);
      color: #fff;
      border: none;
      border-radius: 8px;
    }

    .btn-warning {
      background: var(--color-warning);
      border-color: var(--color-warning);
      border: none;
      border-radius: 8px;
      color: #fff;
    }

    .btn-sm {
      padding: 6px 12px;
      font-size: 12px;
      white-space: nowrap;
    }

    /* Evita quebra de texto em todos os botões */
    .btn {
      white-space: nowrap;
    }

    /* BADGES */
    .badge {
      border-radius: 20px;
      padding: 6px 12px;
      font-weight: 600;
    }

    .bg-success {
      background: var(--color-success);
    }

    .bg-danger {
      background: var(--color-danger);
    }

    .bg-warning {
      background: var(--color-warning);
      color: #fff;
    }

    .bg-info {
      background: var(--color-info);
    }

    /* FORMS */
    .form-control,
    .form-select {
      border-radius: 8px;
      border: 1px solid #ddd;
      padding: 10px 12px;
    }

    .form-control:focus,
    .form-select:focus {
      border-color: var(--color-primary-500);
      box-shadow: 0 0 0 0.2rem rgba(26, 127, 168, 0.2);
    }

    /* GLOBAL SEARCH */
    .global-search-container {
      position: fixed;
      inset: 0;
      z-index: 1300;
      display: flex;
      justify-content: center;
      align-items: flex-start;
      padding: min(12vh, 92px) 14px 0;
      background: rgba(3, 20, 32, 0.48);
      backdrop-filter: blur(6px);
    }

    .global-search-panel {
      width: min(760px, 96vw);
      display: flex;
      flex-direction: column;
      gap: 10px;
      animation: fadeIn 0.24s ease;
    }

    .global-search-input {
      border-radius: 14px;
      min-height: 58px;
      padding: 0 18px;
      border: 1px solid #c4d4e3;
      background: #ffffff;
      font-size: 15px;
      transition: all 0.24s ease;
      box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24);
    }

    .global-search-input:focus {
      border-color: var(--color-primary-500);
      box-shadow: 0 0 0 3px rgba(11, 95, 132, 0.18), 0 16px 38px rgba(0, 0, 0, 0.24);
      outline: none;
    }

    .search-results {
      position: relative;
      background: white;
      border-radius: 12px;
      box-shadow: 0 14px 34px rgba(5, 19, 30, 0.2);
      border: 1px solid #d7e1eb;
      max-height: min(56vh, 460px);
      overflow-y: auto;
      display: none;
    }

    .search-results.show {
      display: block;
    }

    .search-result-item {
      display: block;
      width: 100%;
      text-align: left;
      background: transparent;
      border: none;
      padding: 12px 16px;
      border-bottom: 1px solid #edf2f6;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .search-result-item:hover,
    .search-result-item.active {
      background: #f6fafc;
    }

    .search-result-item:focus-visible {
      background: #edf6fb;
      outline-offset: -2px;
    }

    .search-result-item.is-empty,
    .search-result-item.is-loading {
      cursor: default;
      pointer-events: none;
      color: #6f8294;
      text-align: center;
      font-weight: 500;
    }

    .search-result-item:last-child {
      border-bottom: none;
    }

    .search-result-badge {
      display: inline-block;
      font-size: 11px;
      padding: 2px 8px;
      border-radius: 12px;
      background: #e8f3f9;
      color: #07435d;
      margin-right: 8px;
      font-weight: 700;
    }

    .search-result-text {
      font-size: 13px;
      color: #1a2f42;
      font-weight: 600;
    }

    .search-result-subtext {
      font-size: 11px;
      color: #66788a;
      margin-top: 4px;
    }

    .global-search-hint {
      margin: 0;
      color: #d7e2ec;
      font-size: 12px;
      text-align: right;
    }

    .global-search-hint kbd {
      background: rgba(255, 255, 255, 0.14);
      border: 1px solid rgba(255, 255, 255, 0.22);
      border-radius: 6px;
      color: #fff;
      font-size: 11px;
      font-weight: 600;
      padding: 2px 6px;
      margin: 0 2px;
    }

    /* CLIENT PROFILE DRAWER */
    .client-profile-drawer {
      position: fixed;
      top: 0;
      right: -450px;
      width: 450px;
      height: 100vh;
      background: white;
      box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
      z-index: 1100;
      transition: right 0.3s ease;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
    }

    .client-profile-drawer.show {
      right: 0;
    }

    .client-profile-header {
      background: var(--brand-gradient);
      color: white;
      padding: 20px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-shrink: 0;
    }

    .client-profile-header h3 {
      margin: 0;
      font-size: 18px;
      font-weight: 600;
    }

    .client-profile-close {
      background: none;
      border: none;
      color: white;
      font-size: 24px;
      cursor: pointer;
      padding: 0;
    }

    .client-profile-content {
      flex: 1;
      padding: 20px;
      overflow-y: auto;
    }

    .profile-section {
      margin-bottom: 24px;
    }

    .profile-section-title {
      font-size: 13px;
      font-weight: 700;
      color: var(--color-primary-500);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-bottom: 12px;
      padding-bottom: 8px;
      border-bottom: 2px solid #f0f0f0;
    }

    .profile-info {
      display: grid;
      gap: 12px;
    }

    .profile-info-item {
      display: flex;
      justify-content: space-between;
      padding: 8px 0;
      font-size: 13px;
    }

    .profile-info-label {
      color: #999;
      font-weight: 500;
    }

    .profile-info-value {
      color: #333;
      font-weight: 600;
    }

    .profile-timeline {
      position: relative;
      padding-left: 20px;
    }

    .profile-timeline::before {
      content: '';
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: 2px;
      background: #e9ecef;
    }

    .profile-timeline-item {
      position: relative;
      padding-bottom: 16px;
      margin-bottom: 16px;
    }

    .profile-timeline-item::before {
      content: '';
      position: absolute;
      left: -26px;
      top: 4px;
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background: var(--color-primary-500);
      border: 2px solid white;
    }

    .profile-timeline-date {
      font-size: 11px;
      color: #999;
      font-weight: 600;
    }

    .profile-timeline-event {
      font-size: 13px;
      color: #333;
      font-weight: 500;
      margin-top: 4px;
    }

    /* NOTIFICATIONS (TOASTS) */
    .notifications-container {
      position: fixed;
      bottom: 20px;
      right: 20px;
      z-index: 13000;
      max-width: 400px;
    }

    .notification-toast {
      background: white;
      border-radius: 12px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
      padding: 16px 20px;
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      gap: 12px;
      animation: slideIn 0.3s ease;
      border-left: 4px solid var(--color-primary-500);
    }

    @keyframes slideIn {
      from {
        transform: translateX(400px);
        opacity: 0;
      }

      to {
        transform: translateX(0);
        opacity: 1;
      }
    }

    @keyframes slideOut {
      from {
        transform: translateX(0);
        opacity: 1;
      }

      to {
        transform: translateX(400px);
        opacity: 0;
      }
    }

    .notification-toast.removing {
      animation: slideOut 0.3s ease;
    }

    .notification-toast.success {
      border-left-color: var(--color-success);
    }

    .notification-toast.success .notification-icon {
      color: var(--color-success);
    }

    .notification-toast.error {
      border-left-color: var(--color-danger);
    }

    .notification-toast.error .notification-icon {
      color: var(--color-danger);
    }

    .notification-toast.warning {
      border-left-color: var(--color-warning);
    }

    .notification-toast.warning .notification-icon {
      color: var(--color-warning);
    }

    .notification-toast.info {
      border-left-color: var(--color-info);
    }

    .notification-toast.info .notification-icon {
      color: var(--color-info);
    }

    .notification-icon {
      font-size: 18px;
      flex-shrink: 0;
    }

    .notification-content {
      flex: 1;
      font-size: 13px;
      color: #333;
      font-weight: 500;
    }

    .notification-close {
      background: none;
      border: none;
      color: #999;
      cursor: pointer;
      font-size: 16px;
      padding: 0;
      margin-left: 8px;
      flex-shrink: 0;
    }

    .notification-close:hover {
      color: #333;
    }

    /* TABLES */
    .table {
      background: white;
    }

    .table thead {
      background: #f8f9fa;
      font-weight: 600;
      color: var(--color-neutral-900);
    }

    .table tbody tr {
      border-bottom: 1px solid #eee;
    }

    .table tbody tr:hover {
      background: #f8f9fa;
    }

    .table-state-cell {
      padding: 26px 16px !important;
      background: #fff;
    }

    .table-empty-state,
    .table-loading-state {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 8px;
      text-align: center;
    }

    .table-empty-icon {
      width: 48px;
      height: 48px;
      border-radius: 14px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: #edf4f9;
      color: var(--color-primary-700);
      font-size: 20px;
      margin-bottom: 4px;
    }

    .table-empty-title {
      color: var(--color-neutral-900);
      font-weight: 700;
      font-size: 14px;
      margin: 0;
    }

    .table-empty-text {
      color: var(--color-neutral-500);
      font-size: 13px;
      margin: 0;
    }

    .table-loading-line {
      width: min(440px, 85%);
      height: 11px;
      border-radius: 999px;
      background: linear-gradient(90deg, #e8edf4 25%, #f4f7fb 50%, #e8edf4 75%);
      background-size: 200% 100%;
      animation: shimmer 1.2s linear infinite;
    }

    .table-loading-line.short {
      width: min(280px, 64%);
    }

    @keyframes shimmer {
      0% {
        background-position: 200% 0;
      }

      100% {
        background-position: -200% 0;
      }
    }

    .table thead th[data-sortable] {
      cursor: pointer;
      user-select: none;
      position: relative;
      padding-right: 25px;
    }

    .table thead th[data-sortable]:hover {
      background: #e9ecef;
    }

    .table thead th[data-sortable]::after {
      content: '⇅';
      position: absolute;
      right: 8px;
      opacity: 0.3;
      font-size: 12px;
    }

    .table thead th[data-sort="asc"]::after {
      content: '↑';
      opacity: 1;
      color: var(--color-primary-500);
    }

    .table thead th[data-sort="desc"]::after {
      content: '↓';
      opacity: 1;
      color: var(--color-primary-500);
    }

    .table-pagination {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      margin-top: 12px;
      padding: 10px 12px;
      border: 1px solid #dce6f0;
      border-radius: 10px;
      background: #f8fbff;
      flex-wrap: wrap;
    }

    .table-pagination[hidden] {
      display: none !important;
    }

    .table-pagination-summary {
      margin: 0;
      font-size: 13px;
      color: #39556d;
      font-weight: 500;
    }

    .table-pagination-right {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
    }

    .table-pagination-page {
      font-size: 12px;
      color: #516b84;
      margin: 0 2px;
      min-width: 88px;
      text-align: center;
    }

    .table-pagination-size {
      width: auto;
      min-width: 86px;
    }

    .table-actions,
    .client-actions {
      display: flex;
      gap: 8px;
      justify-content: flex-end;
      flex-wrap: nowrap;
    }

    .table-actions .btn,
    .client-actions .btn,
    .opportunity-actions .btn {
      width: 40px;
      height: 40px;
      border-radius: 10px;
      border: 1px solid #d9e1e9;
      background: #fff;
      color: #335168;
      padding: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      box-shadow: none;
      flex-shrink: 0;
      transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    }

    .table-actions .btn i,
    .client-actions .btn i,
    .opportunity-actions .btn i {
      transition: transform 0.18s ease;
    }

    .table-actions .btn:hover,
    .client-actions .btn:hover,
    .opportunity-actions .btn:hover {
      background: #f5f8fb;
      border-color: #b8c8d7;
      color: #14384f;
      transform: translateY(-1px);
      box-shadow: 0 8px 18px rgba(15, 49, 72, 0.14);
    }

    .table-actions .btn:hover i,
    .client-actions .btn:hover i,
    .opportunity-actions .btn:hover i {
      transform: scale(1.08);
    }

    .table-actions .btn:disabled,
    .client-actions .btn:disabled,
    .opportunity-actions .btn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    .table-actions .action-btn-whatsapp,
    .opportunity-actions .btn-whatsapp {
      color: #21a254;
    }

    .table-actions .action-btn-whatsapp:hover,
    .opportunity-actions .btn-whatsapp:hover {
      color: #178844;
    }

    .table-actions .action-btn-edit {
      color: #c78a00;
    }

    .table-actions .action-btn-delete {
      color: #dc3a4b;
    }

    .table-actions .action-btn-profile {
      color: #0e8ab8;
    }

    .table-actions .action-btn-status {
      color: #156d92;
    }

    .table-actions .action-btn-feedback {
      color: #0f5f85;
    }

    .table-actions .action-btn-open,
    .opportunity-actions .btn-open {
      color: #365069;
    }

    .table-actions .action-btn-note,
    .opportunity-actions .btn-notes {
      color: #0e5f82;
    }

    .table-actions .action-btn-solve {
      color: #238557;
    }

    .appointments-table-today {
      background: #fffbf0 !important;
      border-left: 4px solid #ff9800;
    }

    .appointments-table-today:hover {
      background: #ffe8cc !important;
    }

    .opportunities-table {
      border-collapse: separate;
      border-spacing: 0 10px;
    }

    .opportunities-table tbody tr {
      background: #ffffff;
      border-bottom: none;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    .opportunities-table tbody tr:hover {
      background: #f5f7fb;
    }

    .opportunities-table tbody tr.table-danger {
      background: #fff5f5;
    }

    .opportunities-table tbody tr td {
      padding: 14px 12px;
      vertical-align: middle;
    }

    .opportunities-table tbody tr td:first-child {
      border-radius: 10px 0 0 10px;
    }

    .opportunities-table tbody tr td:last-child {
      border-radius: 0 10px 10px 0;
    }

    .opportunity-desc {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .opportunity-desc .desc-title {
      color: var(--color-neutral-900);
      font-weight: 600;
      font-size: 14px;
    }

    .opportunity-desc .desc-notes {
      color: #4b5563;
      font-size: 13px;
    }

    .opportunity-desc .desc-meta {
      color: #6c757d;
      font-size: 12px;
    }

    /* DASHBOARD CARDS */
    .dashboard-card {
      background: white;
      border-radius: 12px;
      padding: 20px;
      margin-bottom: 20px;
      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
      text-align: center;
      cursor: pointer;
      transition: all 0.3s ease;
      border: 2px solid transparent;
    }

    .dashboard-card:hover {
      transform: translateY(-4px);
      box-shadow: 0 8px 24px rgba(26, 127, 168, 0.2);
      border-color: var(--color-primary-500);
    }

    .dashboard-card.alert-pending {
      background: #fffbf0;
      border-color: var(--color-warning);
    }

    .dashboard-card.alert-pending .number {
      color: var(--color-warning);
    }

    .dashboard-card.alert-pending i {
      color: var(--color-warning);
    }

    .dashboard-card.alert-danger {
      background: #fff5f5;
      border-color: var(--color-danger);
    }

    .dashboard-card.alert-danger .number {
      color: var(--color-danger);
    }

    .dashboard-card.alert-danger i {
      color: var(--color-danger);
    }

    .dashboard-card .number {
      font-size: 30px;
      font-weight: 700;
      color: var(--color-primary-500);
      margin: 10px 0;
      line-height: 1.12;
      letter-spacing: -0.01em;
      font-family: 'Plus Jakarta Sans', sans-serif;
      font-variant-numeric: lining-nums tabular-nums;
    }

    .dashboard-card .label {
      color: #666;
      font-size: 14px;
      font-weight: 500;
    }

    .dashboard-card i {
      font-size: 40px;
      color: var(--color-primary-700);
      margin-bottom: 10px;
    }

    .dashboard-kpi-card {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      min-height: 158px;
      padding: 18px 18px 16px;
      text-align: left;
      border: 1px solid #d9e4ee;
      box-shadow: 0 10px 24px rgba(16, 24, 40, 0.06);
      transform-origin: 50% 100%;
      cursor: pointer;
    }

    .dashboard-kpi-card:hover {
      border-color: #9ec2d8;
      box-shadow: 0 16px 34px rgba(5, 47, 70, 0.18);
      transform: translateY(-3px);
    }

    .dashboard-kpi-card:focus-visible {
      border-color: #7ca9c3;
      box-shadow: 0 0 0 3px rgba(11, 95, 132, 0.24), 0 16px 34px rgba(5, 47, 70, 0.18);
      transform: translateY(-2px);
    }

    .dashboard-kpi-top {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 22px;
    }

    .dashboard-kpi-card .label {
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: #617788;
      margin-bottom: 8px;
    }

    .dashboard-kpi-card .number {
      margin: 0;
      color: #1d3142;
      font-size: 32px;
      line-height: 1;
    }

    .dashboard-kpi-icon {
      width: 52px;
      height: 52px;
      flex-shrink: 0;
      border-radius: 16px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: #e8f3f9;
      color: #0b5f84;
      box-shadow: inset 0 0 0 1px rgba(11, 95, 132, 0.14);
    }

    .dashboard-kpi-icon i {
      margin: 0;
      font-size: 22px;
      color: inherit;
    }

    .dashboard-kpi-foot {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      color: #5d7183;
      font-size: 12px;
      border-top: 1px solid #e4ebf1;
      padding-top: 12px;
    }

    .dashboard-kpi-trend {
      font-weight: 600;
      color: var(--color-primary-700);
    }

    .dashboard-kpi-card.kpi-highlight {
      background: linear-gradient(165deg, #073c57 0%, #0b5f84 100%);
      border-color: rgba(245, 200, 66, 0.56);
    }

    .dashboard-kpi-card.kpi-highlight .label,
    .dashboard-kpi-card.kpi-highlight .number,
    .dashboard-kpi-card.kpi-highlight .dashboard-kpi-foot,
    .dashboard-kpi-card.kpi-highlight .dashboard-kpi-trend {
      color: #f3f9fd;
    }

    .dashboard-kpi-card.kpi-highlight .dashboard-kpi-icon {
      background: rgba(255, 255, 255, 0.16);
      color: #f5c842;
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
    }

    #dashboard.kpi-animate .dashboard-kpi-card {
      animation: dashboardKpiReveal 0.56s cubic-bezier(0.16, 1, 0.3, 1) both;
      animation-delay: var(--kpi-delay, 0ms);
    }

    @keyframes dashboardKpiReveal {
      from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
      }

      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    .dashboard-kpi-card .number,
    .dashboard-status-card .status-value {
      font-family: 'DM Mono', monospace;
      font-variant-numeric: tabular-nums;
    }

    /* Finance cards ficam mais legiveis com fonte proporcional */
    #finance .dashboard-card .number {
      font-size: 28px;
      letter-spacing: -0.015em;
    }

    .goal-progress-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
      margin-top: 16px;
      margin-bottom: 4px;
    }

    .goal-progress-item {
      background: #ffffff;
      border: 1px solid #dce5ee;
      border-radius: 12px;
      padding: 12px 14px;
      box-shadow: 0 4px 10px rgba(8, 28, 44, 0.05);
    }

    .goal-progress-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 10px;
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: #5f7384;
    }

    .goal-progress-head strong {
      font-family: 'DM Mono', monospace;
      color: #1d3345;
    }

    .goal-progress-track {
      position: relative;
      width: 100%;
      height: 10px;
      border-radius: 999px;
      overflow: hidden;
      background: #e8eff5;
    }

    .goal-progress-fill {
      display: block;
      height: 100%;
      width: 0%;
      border-radius: inherit;
      background: linear-gradient(90deg, #0a4f70 0%, #0b5f84 100%);
      transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .goal-progress-fill.is-accent {
      background: linear-gradient(90deg, #c18a16 0%, #e3b440 100%);
    }

    .goal-progress-fill.is-overflow {
      background: linear-gradient(90deg, #0f7a40 0%, #16a34a 100%);
    }

    .dashboard-status-strip {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 12px;
      margin-top: 4px;
      margin-bottom: 8px;
    }

    .dashboard-status-card {
      background: #ffffff;
      border: 1px solid #e6e9f3;
      border-radius: 16px;
      padding: 16px 18px;
      box-shadow: 0 8px 20px rgba(16, 24, 40, 0.05);
      min-height: 92px;
    }

    .dashboard-status-card .status-label {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: #6b7280;
      margin-bottom: 10px;
    }

    .dashboard-status-card .status-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    .dashboard-status-card .status-value {
      font-size: 28px;
      font-weight: 700;
      color: #20263c;
      line-height: 1;
      margin-bottom: 8px;
    }

    .dashboard-status-card .status-meta {
      font-size: 12px;
      color: #7b8191;
    }

    .dashboard-status-card.prospeccao .status-dot {
      background: #0e8ea9;
    }

    .dashboard-status-card.aguardando .status-dot {
      background: #d38d00;
    }

    .dashboard-status-card.negociacao .status-dot {
      background: #dd6b20;
    }

    .dashboard-status-card.vendido .status-dot {
      background: var(--color-success);
    }

    .dashboard-status-card.perdido .status-dot {
      background: var(--color-danger);
    }

    .dashboard-panel .card-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
    }

    .dashboard-panel-title {
      display: inline-flex;
      align-items: center;
      gap: 10px;
    }

    .dashboard-panel-meta {
      font-size: 12px;
      font-weight: 600;
      color: rgba(255, 255, 255, 0.88);
    }

    .dashboard-chart-note {
      margin-top: 14px;
      font-size: 12px;
      color: #7b8191;
    }

    .chart-frame {
      position: relative;
      width: 100%;
      height: 240px;
      min-height: 240px;
    }

    .chart-frame.chart-frame-sm {
      height: 220px;
      min-height: 220px;
    }

    .chart-frame.chart-frame-md {
      height: 230px;
      min-height: 230px;
    }

    .chart-frame>canvas {
      display: block !important;
      width: 100% !important;
      height: 100% !important;
      max-width: 100%;
      max-height: 100%;
    }

    .dashboard-sales-summary {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      margin-top: 14px;
      padding-top: 14px;
      border-top: 1px solid #edf0f5;
      font-size: 12px;
      color: #667085;
    }

    .dashboard-sales-summary strong {
      display: block;
      color: #20263c;
      font-size: 14px;
      margin-top: 2px;
    }

    .task-feed {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .task-feed-item {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
      padding: 16px 18px;
      border-radius: 14px;
      background: #f8fafc;
      border: 1px solid #e7ebf3;
    }

    .task-feed-main {
      display: flex;
      gap: 14px;
      min-width: 0;
    }

    .task-feed-icon {
      width: 40px;
      height: 40px;
      border-radius: 12px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      background: #e8f3f9;
      color: #0b5f84;
    }

    .task-feed-title {
      font-size: 13px;
      font-weight: 700;
      color: #20263c;
      margin-bottom: 4px;
    }

    .task-feed-description {
      font-size: 13px;
      color: #667085;
    }

    .task-feed-deadline {
      flex-shrink: 0;
      font-size: 12px;
      font-weight: 700;
      border-radius: 999px;
      padding: 8px 12px;
      background: #e8f3f9;
      color: #0b5f84;
      align-self: center;
    }

    .task-feed-item.is-urgent {
      background: #fff7ed;
      border-color: #fed7aa;
    }

    .task-feed-item.is-urgent .task-feed-icon {
      background: #ffedd5;
      color: #ea580c;
    }

    .task-feed-item.is-urgent .task-feed-deadline {
      background: #ffedd5;
      color: #c2410c;
    }

    .task-feed-item.is-today {
      background: #fff5f5;
      border-color: #fecaca;
    }

    .task-feed-item.is-today .task-feed-icon {
      background: #fee2e2;
      color: #dc2626;
    }

    .task-feed-item.is-today .task-feed-deadline {
      background: #fee2e2;
      color: #b91c1c;
    }

    .opportunity-summary {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
      margin-bottom: 20px;
    }

    .opportunity-card {
      background: #ffffff;
      border-radius: 12px;
      padding: 14px 16px;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
      display: flex;
      align-items: center;
      justify-content: space-between;
      min-height: 72px;
    }

    .opportunity-card .value {
      font-size: 20px;
      font-weight: 700;
      color: #2d3561;
    }

    .opportunity-card .label {
      font-size: 12px;
      color: #6c757d;
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }

    .opportunity-card .icon {
      width: 40px;
      height: 40px;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: #eef1ff;
      color: #4b5bd8;
      font-size: 18px;
    }

    .opportunities-filter-bar {
      display: grid;
      grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(140px, 1fr)) auto auto;
      gap: 10px;
      padding: 14px 16px;
      margin-bottom: 14px;
      border-radius: 12px;
      background: #ffffff;
      border: 1px solid #e6edf4;
      box-shadow: 0 2px 10px rgba(15, 40, 56, 0.05);
      align-items: center;
    }

    .opportunities-filter-bar .input-group,
    .opportunities-filter-bar .form-select {
      min-width: 0;
    }

    .opportunities-filter-toggle {
      border: 1px solid #d9e4ef;
      border-radius: 8px;
      padding: 8px 10px;
      font-size: 13px;
      color: #4d5e73;
      background: #f7fafd;
      white-space: nowrap;
    }

    .opportunities-filter-actions {
      display: inline-flex;
      justify-content: flex-end;
      gap: 8px;
    }

    /* MODULE-SPECIFIC STYLES */

    .sidebar {
      display: flex;
      flex-direction: column;
      width: var(--sidebar-width);
      position: fixed;
      top: 0;
      left: 0;
      height: 100vh;
      z-index: 1000;
      padding: 18px 14px 16px;
      background: var(--sidebar-gradient);
      box-shadow: none;
      border-right: 1px solid rgba(255, 255, 255, 0.08);
    }

    .sidebar-logo { margin-bottom: 16px; padding: 8px 8px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); display: flex; align-items: center; gap: 8px; justify-content: space-between; }

    .sidebar-logo i { color: #f3c744; font-size: 30px; flex-shrink: 0; }

    .sidebar-logo h4 { font-size: 18px; font-weight: 700; line-height: 1; letter-spacing: -0.01em; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    .sidebar-controls {
      gap: 6px;
    }

    .sidebar-control-btn {
      width: 30px;
      height: 30px;
      border-radius: 8px;
      border-color: rgba(255, 255, 255, 0.2);
      background: rgba(255, 255, 255, 0.06);
    }

    .sidebar .nav-menu {
      flex: 1;
      overflow-y: auto;
      padding-right: 2px;
    }

    .sidebar .nav-group-label {
      margin: 16px 10px 8px;
      font-size: 11px;
      letter-spacing: 0.14em;
      color: rgba(238, 247, 255, 0.45);
    }

    .sidebar .nav-item {
      margin-bottom: 4px;
    }

    .sidebar .nav-link {
      min-height: 44px;
      border-radius: 10px;
      padding: 10px 12px;
      color: rgba(247, 251, 255, 0.9);
      border: 1px solid transparent;
      position: relative;
    }

    .sidebar .nav-link:hover {
      background: rgba(21, 95, 130, 0.28);
      border-color: rgba(255, 255, 255, 0.08);
    }

    .sidebar .nav-link.active {
      background: rgba(17, 68, 96, 0.58);
      border-color: rgba(255, 255, 255, 0.12);
      box-shadow: inset 3px 0 0 #f0be43;
    }

    .sidebar-badge {
      background: rgba(240, 190, 67, 0.14);
      color: #ffd976;
      border-color: rgba(240, 190, 67, 0.35);
    }

    .sidebar-footer {
      margin-top: auto;
      padding-top: 12px;
      border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .sidebar-user-card {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px;
      border-radius: 12px;
      background: rgba(17, 61, 86, 0.48);
      border: 1px solid rgba(255, 255, 255, 0.12);
    }

    .sidebar-user-avatar {
      width: 38px;
      height: 38px;
      border-radius: 50%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      font-weight: 700;
      color: #05273a;
      background: linear-gradient(135deg, #f3cd63 0%, #f4a640 100%);
      text-transform: uppercase;
      flex-shrink: 0;
    }

    .sidebar-user-meta {
      display: flex;
      flex-direction: column;
      min-width: 0;
      gap: 2px;
      flex: 1;
    }

    .sidebar-user-name {
      font-size: 15px;
      font-weight: 600;
      color: #f2f7fc;
      line-height: 1.1;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .sidebar-user-role {
      font-size: 12px;
      color: rgba(221, 235, 247, 0.75);
      text-transform: capitalize;
    }

    .sidebar-user-menu-btn {
      width: 28px;
      height: 28px;
      border: 0;
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.08);
      color: rgba(241, 248, 255, 0.9);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      transition: background 0.2s ease;
    }

    .sidebar-user-menu-btn:hover {
      background: rgba(255, 255, 255, 0.18);
    }

    .main-content {
      padding: 24px 28px;
      background: var(--surface-app);
    }

    .card {
      box-shadow: var(--shadow-card);
    }

    .card:hover {
      box-shadow: var(--shadow-card-hover);
      transform: translateY(-2px);
    }

    .opportunities-layout {
      display: flex;
      flex-direction: column;
      gap: 16px;
    }

    .opportunities-header {
      margin-bottom: 0;
      gap: 12px;
    }

    .opportunities-header .module-header {
      min-width: 0;
    }

    .opportunities-header-actions {
      margin-left: auto;
      display: flex;
      gap: 12px;
      align-items: center;
      flex-wrap: nowrap;
    }

    .opportunities-search-wrap {
      min-width: 320px;
      max-width: 430px;
      width: 28vw;
      position: relative;
    }

    .opportunities-search-wrap i {
      position: absolute;
      right: 14px;
      top: 50%;
      transform: translateY(-50%);
      color: #728497;
      font-size: 14px;
    }

    .opportunities-search-wrap .form-control {
      height: 50px;
      border-radius: 12px;
      border: 1px solid #d8dde4;
      padding: 0 42px 0 16px;
      font-size: 15px;
      background: #ffffff;
      box-shadow: none;
    }

    .opportunities-search-wrap .form-control:focus {
      border-color: #9ebfd2;
      box-shadow: 0 0 0 3px rgba(11, 95, 132, 0.13);
    }

    .opportunities-new-btn {
      border: 0;
      height: 50px;
      border-radius: 10px;
      padding: 0 22px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .opportunities-filter-bar {
      grid-template-columns: repeat(3, minmax(180px, 1fr)) minmax(270px, 1.35fr) auto;
      border: 1px solid #dde3ea;
      border-radius: 12px;
      background: #ffffff;
      box-shadow: none;
      padding: 12px;
      gap: 10px;
      margin-bottom: 0;
    }

    .opp-filter-field {
      display: flex;
      flex-direction: column;
      gap: 5px;
      border: 1px solid #dfe5ec;
      border-radius: 10px;
      padding: 10px 12px;
      background: #ffffff;
      min-height: 78px;
    }

    .opp-filter-label {
      font-size: 13px;
      color: #738296;
      font-weight: 500;
      line-height: 1;
    }

    .opp-filter-field .form-select,
    .opp-filter-field .form-control {
      border: 0;
      padding: 0;
      min-height: 30px;
      height: 30px;
      line-height: 30px;
      font-size: 17px;
      color: #15283a;
      box-shadow: none;
      background-color: transparent;
    }

    .opp-filter-field .form-select {
      padding-right: 24px;
      background-position: right 0 center;
    }

    .opp-period-field {
      justify-content: center;
      gap: 8px;
    }

    .opp-period-inputs {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .opp-period-inputs i {
      color: #6f8195;
      font-size: 14px;
    }

    .opp-period-inputs .form-control {
      min-width: 116px;
      height: 30px;
      min-height: 30px;
      line-height: 30px;
      font-size: 14px;
      color: #2e3f50;
      border-bottom: 1px dashed #cbd6e2;
      border-radius: 0;
    }

    .opp-period-inputs .form-control::-webkit-calendar-picker-indicator {
      opacity: 0.65;
    }

    .opp-period-separator {
      font-size: 13px;
      color: #7f8fa0;
      white-space: nowrap;
    }

    .opp-filter-button {
      min-height: 78px;
      border-radius: 10px;
      border: 1px solid #dfe5ec;
      background: #ffffff;
      color: #182a3a;
      padding: 12px 16px;
      font-weight: 600;
      font-size: 14px;
      display: inline-flex;
      align-items: center;
      gap: 8px;
    }

    .opp-filter-button:hover {
      background: #f5f8fb;
      border-color: #c7d3de;
    }

    .opportunities-advanced-filters {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      background: #f7fafc;
      border: 1px dashed #d3dde7;
      border-radius: 10px;
      padding: 10px 12px;
      margin-top: -4px;
    }

    .opportunities-filter-toggle {
      border: 0;
      padding: 0;
      margin: 0;
      background: transparent;
      font-size: 13px;
      color: #44586c;
      display: inline-flex;
      align-items: center;
    }

    .opportunities-layout .opportunity-summary {
      display: none;
    }

    .opportunities-table-wrap {
      border: 1px solid #dde4eb;
      border-radius: 12px;
      background: #ffffff;
      overflow: hidden;
      box-shadow: none;
    }

    #complaints .opportunities-table-wrap .table-responsive {
      border: 0;
      border-radius: 0;
      background: transparent;
    }

    .opportunities-table {
      margin-bottom: 0;
      border-collapse: collapse;
      border-spacing: 0;
    }

    .opportunities-table thead th {
      background: #f5f7fa;
      border-bottom: 1px solid #e3e9ef;
      color: #1a2b3d;
      font-size: 14px;
      font-weight: 700;
      padding: 16px 18px;
      white-space: nowrap;
    }

    .opportunities-table tbody tr {
      background: #fff;
      border-bottom: 1px solid #edf2f6;
      box-shadow: none;
    }

    .opportunities-table tbody tr:last-child {
      border-bottom: 0;
    }

    .opportunities-table tbody tr:hover {
      background: #f9fbfd;
    }

    .opportunities-table tbody tr.table-danger {
      background: #fff7f7;
    }

    .opportunities-table tbody tr td {
      padding: 16px 18px;
      border: 0;
      vertical-align: middle;
    }

    .opportunities-table tbody tr td:first-child,
    .opportunities-table tbody tr td:last-child {
      border-radius: 0;
    }

    .opportunity-main {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .opportunity-main-title {
      font-size: 16px;
      font-weight: 700;
      color: #142738;
      line-height: 1.2;
    }

    .opportunity-main-sub {
      font-size: 14px;
      color: #4f6275;
      line-height: 1.25;
    }

    .opportunity-main-id {
      font-size: 12px;
      color: #8d99a6;
      letter-spacing: 0.01em;
    }

    .opp-status-chip {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      border-radius: 999px;
      padding: 6px 12px;
      font-size: 12px;
      font-weight: 600;
      border: 1px solid transparent;
      white-space: nowrap;
    }

    .opp-status-chip.has-dot::before {
      content: "";
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: currentColor;
      opacity: 0.95;
    }

    .opp-status-chip.is-overdue {
      color: #b8393a;
      background: #feeff0;
      border-color: #f7d8dd;
    }

    .opp-status-chip.is-pending {
      color: #b37c00;
      background: #fff8dc;
      border-color: #f8ebbe;
    }

    .opp-status-chip.is-progress {
      color: #1e78a8;
      background: #eaf6ff;
      border-color: #cae7fb;
    }

    .opp-status-chip.is-done {
      color: #238557;
      background: #e9f8ef;
      border-color: #cdeedc;
    }

    .opp-date-main {
      font-size: 15px;
      font-weight: 700;
      color: #1a2d40;
      line-height: 1.2;
    }

    .opp-date-sub {
      margin-top: 4px;
      font-size: 13px;
      color: #6d7e8f;
    }

    .opp-date-sub.is-overdue {
      color: #c2393a;
      font-weight: 600;
    }

    .opp-origin {
      display: flex;
      flex-direction: column;
      gap: 2px;
      font-size: 13px;
    }

    .opp-origin-label {
      color: #2f4357;
      font-weight: 600;
    }

    .opp-origin-id {
      color: #6d7f92;
    }

    .opp-attendant {
      display: inline-flex;
      align-items: center;
      gap: 10px;
    }

    .opp-attendant-avatar {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      background: linear-gradient(135deg, #d1e7f6 0%, #9dc7df 100%);
      color: #0b4d70;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
      flex-shrink: 0;
    }

    .opp-attendant-name {
      font-size: 14px;
      font-weight: 500;
      color: #2d4153;
      white-space: nowrap;
      max-width: 170px;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .opportunity-actions {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
    }

    .opportunity-actions .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 0;
      box-shadow: none;
    }

    .opportunity-actions .btn:hover {
      background: #f5f8fb;
      border-color: #b8c8d7;
      color: #14384f;
      transform: translateY(-1px);
      box-shadow: 0 8px 18px rgba(15, 49, 72, 0.14);
    }

    /* ALERTS */
    .alert {
      border: none;
      border-radius: 8px;
      border-left: 4px solid;
    }

    .alert-success {
      border-left-color: var(--color-success);
      background: #f0f7f4;
      color: #155724;
    }

    .alert-danger {
      border-left-color: var(--color-danger);
      background: #f8d7da;
      color: #721c24;
    }

    .alert-warning {
      border-left-color: var(--color-warning);
      background: #fff3cd;
      color: #856404;
    }

    .alert-info {
      border-left-color: var(--color-info);
      background: #d1ecf1;
      color: #0c5460;
    }

    /* MODULE SECTIONS */
    .module-section {
      display: none;
    }

    .module-section.active {
      display: block;
      animation: fadeIn 0.3s ease;
    }

    .finance-subpage {
      display: none;
    }

    .finance-subpage.active {
      display: block;
      animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
      from {
        opacity: 0;
        transform: translateY(10px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    @media (prefers-reduced-motion: reduce) {
      *,
      *::before,
      *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
      }
    }

    /* KANBAN BOARD */
    .kanban-board {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 20px;
      overflow-x: auto;
      padding: 10px 0;
    }

    .kanban-column {
      background: #f7fafc;
      border: 1px solid #dbe6ef;
      box-shadow: 0 6px 16px rgba(7, 31, 48, 0.05);
      border-radius: 12px;
      padding: 16px;
      min-width: 300px;
      display: flex;
      flex-direction: column;
    }

    .kanban-header {
      font-weight: 700;
      color: var(--color-neutral-900);
      font-size: 14px;
      margin-bottom: 12px;
      padding-bottom: 12px;
      border-bottom: 2px solid rgba(20, 39, 56, 0.16);
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .kanban-count {
      background: #0b5f84;
      color: white;
      border-radius: 20px;
      padding: 2px 10px;
      font-size: 12px;
      font-weight: 600;
    }

    .kanban-cards-container {
      flex: 1;
      min-height: 400px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .kanban-cards-container.empty {
      background: repeating-linear-gradient(45deg,
          transparent,
          transparent 35px,
          rgba(0, 0, 0, 0.03) 35px,
          rgba(0, 0, 0, 0.03) 70px);
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #999;
      font-size: 12px;
    }

    .kanban-card {
      background: white;
      border-radius: 8px;
      padding: 12px;
      border-left: 4px solid var(--color-primary-500);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
      cursor: move;
      transition: all 0.2s ease;
    }

    .kanban-card:hover {
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
      transform: translateY(-2px);
    }

    .kanban-card.dragging {
      opacity: 0.5;
      transform: scale(0.95);
    }

    .kanban-card-client {
      font-weight: 600;
      color: var(--color-neutral-900);
      font-size: 13px;
      margin-bottom: 4px;
    }

    .kanban-card-product {
      font-size: 12px;
      color: #666;
      margin-bottom: 6px;
    }

    .kanban-card-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: 8px;
      padding-top: 8px;
      border-top: 1px solid #f0f0f0;
    }

    .kanban-card-value {
      font-weight: 700;
      color: var(--color-success);
      font-size: 12px;
    }

    .kanban-card-date {
      font-size: 11px;
      color: #999;
    }

    .kanban-card-actions {
      margin-top: 8px;
      justify-content: flex-end;
    }

    .kanban-card-actions button {
      flex: 0 0 auto;
    }

    .kanban-column.prospection .kanban-card {
      border-left-color: #17a2b8;
    }

    .kanban-column.proposal .kanban-card {
      border-left-color: #ffc107;
    }

    .kanban-column.negotiation .kanban-card {
      border-left-color: #fd7e14;
    }

    .kanban-column.won .kanban-card {
      border-left-color: var(--color-success);
    }

    .kanban-column.lost .kanban-card {
      border-left-color: var(--color-danger);
    }

    .kanban-column.prospection {
      background: linear-gradient(180deg, #eaf7fb 0%, #f7fcff 100%);
      border-color: #d3e9f2;
    }

    .kanban-column.proposal {
      background: linear-gradient(180deg, #fff8e8 0%, #fffdf5 100%);
      border-color: #f3e2b4;
    }

    .kanban-column.negotiation {
      background: linear-gradient(180deg, #fff1e6 0%, #fffaf5 100%);
      border-color: #f7d8bb;
    }

    .kanban-column.won {
      background: linear-gradient(180deg, #ecf9f1 0%, #f8fdf9 100%);
      border-color: #d4eddc;
    }

    .kanban-column.lost {
      background: linear-gradient(180deg, #fff0f0 0%, #fff9f9 100%);
      border-color: #f5d6d8;
    }

    .kanban-column.prospection .kanban-count {
      background: #0e8ea9;
    }

    .kanban-column.proposal .kanban-count {
      background: #d38d00;
    }

    .kanban-column.negotiation .kanban-count {
      background: #dd6b20;
    }

    .kanban-column.won .kanban-count {
      background: var(--color-success);
    }

    .kanban-column.lost .kanban-count {
      background: var(--color-danger);
    }

    /* RESPONSIVE */
    @media (max-width: 768px) {
      .main-container {
        display: block;
        min-height: 100vh;
        height: auto;
      }

      .sidebar {
        width: min(82vw, 320px);
        transform: translateX(-108%);
        transition: transform 0.28s ease;
        z-index: 1095;
      }

      .main-content {
        margin-left: 0;
        padding: 14px;
        padding-top: 76px;
        min-height: 100vh;
      }

      .mobile-topbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1080;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 11px 14px;
        background: #ffffff;
        border-bottom: 1px solid #dde8f2;
        box-shadow: 0 6px 18px rgba(11, 43, 64, 0.08);
      }

      .mobile-topbar-title {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-size: 14px;
        font-weight: 700;
        color: #173247;
      }

      .mobile-topbar-title i {
        color: var(--color-primary-600);
      }

      .mobile-menu-btn {
        width: 40px;
        height: 40px;
        padding: 0;
        border-radius: 11px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
      }

      .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1090;
        background: rgba(8, 22, 32, 0.48);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
      }

      body.mobile-sidebar-open .sidebar {
        transform: translateX(0);
      }

      body.mobile-sidebar-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
      }

      body.mobile-sidebar-open {
        overflow: hidden;
      }

      .desktop-only {
        display: none !important;
      }

      .mobile-only {
        display: inline-flex !important;
      }

      body.sidebar-collapsed .sidebar {
        width: min(82vw, 320px);
        padding: 20px;
      }

      body.sidebar-collapsed .sidebar-logo h4,
      body.sidebar-collapsed .sidebar .nav-group-label,
      body.sidebar-collapsed .sidebar .nav-divider,
      body.sidebar-collapsed .sidebar-footer {
        display: block !important;
      }

      body.sidebar-collapsed .sidebar-badge {
        display: inline-flex !important;
      }

      body.sidebar-collapsed .sidebar .nav-divider {
        display: block !important;
      }

      body.sidebar-collapsed .sidebar .sidebar-badge[hidden] {
        display: none !important;
      }

      body.sidebar-collapsed .sidebar-logo {
        justify-content: flex-start;
        margin-bottom: 30px;
        padding-bottom: 20px;
      }

      body.sidebar-collapsed .sidebar-logo i {
        margin-right: 15px;
        font-size: 32px;
      }

      body.sidebar-collapsed .sidebar-controls {
        position: static;
      }

      body.sidebar-collapsed .sidebar .nav-link {
        justify-content: space-between;
        padding: 12px 15px;
      }

      body.sidebar-collapsed .sidebar .nav-link-main {
        font-size: inherit;
      }

      body.sidebar-collapsed .sidebar .nav-link i {
        margin-right: 12px;
        width: 24px;
      }

      .content-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
      }

      .module-header {
        width: 100%;
      }

      .content-header {
        align-items: stretch;
      }

      .header-actions {
        margin-left: 0;
        width: 100%;
        flex-wrap: wrap;
      }

      .header-actions .btn,
      .header-actions .form-select,
      .content-header>.btn,
      .content-header>select.form-select {
        width: 100%;
      }

      .opportunities-filter-bar {
        grid-template-columns: 1fr;
      }

      .opportunities-filter-actions {
        justify-content: flex-start;
      }

      .opportunities-header {
        align-items: stretch;
      }

      .opportunities-header-actions {
        margin-left: 0;
        width: 100%;
      }

      .opportunities-search-wrap {
        width: 100%;
        min-width: 0;
        max-width: none;
      }

      .opp-filter-button {
        min-height: 54px;
        justify-content: center;
      }

      .login-shell {
        grid-template-columns: 1fr;
        min-height: auto;
      }

      .login-brand {
        padding: 30px 24px;
      }

      .login-card {
        padding: 30px 24px;
      }
    }

    @media (max-width: 992px) {
      .dashboard-status-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .goal-progress-grid {
        grid-template-columns: 1fr;
      }

      .opportunity-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .opportunities-filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .opportunities-filter-actions {
        justify-content: flex-end;
      }

      .opp-period-field,
      .opp-filter-button {
        grid-column: span 2;
      }
    }

    @media (max-width: 576px) {
      .dashboard-status-strip {
        grid-template-columns: 1fr;
      }

      .dashboard-kpi-top,
      .dashboard-sales-summary,
      .task-feed-item {
        flex-direction: column;
      }

      .task-feed-deadline {
        align-self: flex-start;
      }

      .opportunity-summary {
        grid-template-columns: 1fr;
      }

      .sidebar .nav-link {
        padding: 10px 12px;
      }

      .table-pagination {
        flex-direction: column;
        align-items: flex-start;
      }

      .table-pagination-right {
        width: 100%;
        justify-content: space-between;
      }

      .opportunities-header-actions {
        flex-direction: column;
        align-items: stretch;
      }

      .opportunities-new-btn {
        width: 100%;
        justify-content: center;
      }

      .opportunities-filter-bar {
        grid-template-columns: 1fr;
      }

      .opp-period-field,
      .opp-filter-button {
        grid-column: auto;
      }

      .opp-period-inputs {
        flex-wrap: wrap;
      }

      .opportunities-advanced-filters {
        flex-direction: column;
        align-items: flex-start;
      }

      .opportunities-table thead th,
      .opportunities-table tbody tr td {
        padding: 12px 10px;
      }
    }

    /* SCROLLBAR */
    ::-webkit-scrollbar {
      width: 8px;
    }

    ::-webkit-scrollbar-track {
      background: #f1f1f1;
    }

    ::-webkit-scrollbar-thumb {
      background: var(--color-primary-500);
      border-radius: 4px;
    }

    ::-webkit-scrollbar-thumb:hover {
      background: var(--color-primary-700);
    }

    .app-loading-overlay {
      position: fixed;
      inset: 0;
      background: rgba(244, 249, 252, 0.72);
      backdrop-filter: blur(4px);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 12000;
    }

    .app-loading-overlay[hidden] {
      display: none !important;
    }

    .app-loading-card {
      min-width: 240px;
      background: #fff;
      border-radius: 14px;
      padding: 16px 18px;
      display: flex;
      align-items: center;
      gap: 12px;
      box-shadow: 0 14px 34px rgba(12, 35, 50, 0.16);
      border: 1px solid #dce8f2;
    }

    .app-loading-text {
      margin: 0;
      font-size: 13px;
      color: #4d5e73;
    }

    .app-loading-title {
      margin: 0;
      font-size: 14px;
      font-weight: 700;
      color: #173247;
    }

    /* TELA DE LOGIN */
    #loginScreen {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100vh;
      background:
        radial-gradient(circle at 8% 12%, rgba(240, 165, 0, 0.18), transparent 34%),
        radial-gradient(circle at 90% 90%, rgba(255, 255, 255, 0.08), transparent 40%),
        linear-gradient(135deg, #0f2d3d 0%, #155877 55%, #1a7fa8 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 10000;
    }

    .login-container {
      width: 100%;
      max-width: 1020px;
      padding: 20px;
    }

    .login-shell {
      display: grid;
      grid-template-columns: minmax(260px, 1fr) minmax(360px, 0.95fr);
      background: #ffffff;
      border-radius: 20px;
      overflow: hidden;
      box-shadow: 0 24px 70px rgba(6, 25, 39, 0.35);
      min-height: 520px;
    }

    .login-brand {
      position: relative;
      background:
        radial-gradient(circle at 24% 30%, rgba(240, 165, 0, 0.25), transparent 36%),
        radial-gradient(circle at 78% 76%, rgba(255, 255, 255, 0.14), transparent 40%),
        linear-gradient(155deg, #0e2a38 0%, #164b65 52%, #1a7fa8 100%);
      padding: 46px 40px;
      color: #ebf5fb;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 24px;
    }

    .login-brand::after {
      content: '';
      position: absolute;
      right: -28px;
      top: 42px;
      width: 110px;
      height: 110px;
      border-radius: 28px;
      background: rgba(255, 255, 255, 0.07);
      transform: rotate(18deg);
    }

    .login-brand-mark {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 54px;
      height: 54px;
      border-radius: 16px;
      background: rgba(255, 255, 255, 0.18);
      font-size: 24px;
      margin-bottom: 14px;
    }

    .login-brand h1 {
      margin: 0;
      font-size: 30px;
      font-weight: 700;
      letter-spacing: -0.02em;
    }

    .login-brand p {
      margin: 10px 0 0;
      color: rgba(235, 245, 251, 0.88);
      line-height: 1.55;
      max-width: 340px;
    }

    .login-brand-list {
      list-style: none;
      margin: 0;
      padding: 0;
      display: grid;
      gap: 10px;
    }

    .login-brand-list li {
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 13px;
      color: rgba(235, 245, 251, 0.86);
    }

    .login-brand-list i {
      color: #ffd685;
      font-size: 14px;
    }

    .login-card {
      background: #fff;
      padding: 40px;
      box-shadow: none;
      animation: loginSlideIn 0.5s ease;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    @keyframes loginSlideIn {
      from {
        opacity: 0;
        transform: translateY(-30px);
      }

      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .login-header {
      text-align: left;
      margin-bottom: 30px;
    }

    .login-header h2 {
      color: var(--color-neutral-900);
      margin-bottom: 6px;
      font-weight: 700;
      letter-spacing: -0.015em;
    }

    .login-header p {
      color: #666;
      font-size: 14px;
      margin: 0;
    }

    .login-password-group .btn {
      border-color: #d3deea;
      color: #4f6377;
    }

    .login-password-group .btn:hover {
      background: #f4f8fc;
      color: #1d3b4f;
      border-color: #bed0e0;
    }

    .user-info {
      display: flex;
      align-items: center;
      color: white;
      padding: 8px 16px;
      background: rgba(255, 255, 255, 0.1);
      border-radius: 8px;
      margin-left: auto;
    }

    /* SUPPLIERS + PAYABLES */
    .supplier-status-dot {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 4px 10px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 600;
      border: 1px solid transparent;
      white-space: nowrap;
    }

    .supplier-status-dot .dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: currentColor;
      flex-shrink: 0;
    }

    .supplier-status-dot.is-active {
      color: #1f7a49;
      background: #e9f8ef;
      border-color: #c8ecd8;
    }

    .supplier-status-dot.is-inactive {
      color: #6b7280;
      background: #f3f4f6;
      border-color: #e5e7eb;
    }

    .payables-kpi {
      border: 1px solid #e5edf4;
      background: linear-gradient(160deg, #ffffff 0%, #f7fbff 100%);
    }

    .payables-kpi .dashboard-kpi-icon {
      background: #eaf3fb;
      color: #14547a;
    }

    .payables-kpi.payables-kpi--danger .dashboard-kpi-icon {
      background: #fceced;
      color: #b54748;
    }

    .payables-kpi.payables-kpi--success .dashboard-kpi-icon {
      background: #e8f7ef;
      color: #207a4f;
    }

    .payables-kpi.payables-kpi--warning .dashboard-kpi-icon {
      background: #fff5dc;
      color: #9d6a00;
    }

    .payable-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 999px;
      padding: 5px 10px;
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.01em;
      border: 1px solid transparent;
      white-space: nowrap;
    }

    .payable-badge.is-pending {
      color: #9b6500;
      background: #fff6dd;
      border-color: #f4e2b2;
    }

    .payable-badge.is-paid {
      color: #1f7a49;
      background: #e7f7ee;
      border-color: #c8ebd8;
    }

    .payable-badge.is-overdue {
      color: #b13d40;
      background: #fdebed;
      border-color: #f5ccd1;
    }

    .payable-badge.is-cancelled {
      color: #6b7280;
      background: #f3f4f6;
      border-color: #e5e7eb;
    }

    #payables .table tbody tr.payable-overdue td {
      background: #fff4f5;
    }

    #payables .table tbody tr.payable-due-warning td {
      background: #fffaf0;
    }

    #payables .table tbody tr.payable-overdue:hover td {
      background: #ffecee;
    }

    #payables .table tbody tr.payable-due-warning:hover td {
      background: #fff4dc;
    }

    .payable-confirm-summary {
      border: 1px solid #e4ebf2;
      background: #f9fbfd;
      border-radius: 10px;
      padding: 12px;
      display: grid;
      gap: 4px;
      font-size: 13px;
      color: #22384a;
    }

    /* TYPOGRAPHY HARMONIZATION */
    body {
      font-size: 14px;
      line-height: 1.45;
      text-rendering: optimizeLegibility;
    }

    .sidebar .nav-link {
      font-size: 14px;
      line-height: 1.25;
    }

    .sidebar .nav-link i {
      font-size: 15px;
    }

    .sidebar-logo h4 {
      font-size: 17px;
      line-height: 1.05;
      letter-spacing: 0;
    }

    .sidebar-user-name {
      font-size: 14px;
      line-height: 1.2;
    }

    .sidebar-user-role {
      font-size: 12px;
      line-height: 1.25;
    }

    .opportunities-new-btn {
      height: 46px;
      padding: 0 16px;
      font-size: 14px;
      line-height: 1.2;
    }

    .dashboard-kpi-card {
      min-height: 146px;
      padding: 16px;
    }

    .dashboard-kpi-top {
      gap: 12px;
      margin-bottom: 18px;
    }

    .dashboard-kpi-card .label {
      font-size: 11px;
      line-height: 1.25;
      letter-spacing: 0.08em;
    }

    .dashboard-kpi-card .number,
    .dashboard-status-card .status-value {
      font-size: 26px;
      line-height: 1.08;
      letter-spacing: 0;
    }

    .dashboard-kpi-icon {
      width: 46px;
      height: 46px;
      border-radius: 14px;
    }

    .dashboard-kpi-icon i {
      font-size: 19px;
    }

    .dashboard-kpi-foot {
      font-size: 12px;
      line-height: 1.35;
    }

    .opportunities-table thead th {
      font-size: 13px;
      line-height: 1.35;
    }

    .opportunities-table tbody tr td {
      font-size: 14px;
      line-height: 1.4;
      padding-top: 12px;
      padding-bottom: 12px;
    }

    .opportunities-table thead th {
      padding-top: 12px;
      padding-bottom: 12px;
    }

    .opp-filter-label {
      font-size: 12px;
      line-height: 1.35;
    }

    .opportunities-search-wrap .form-control,
    .opp-filter-field .form-select,
    .opp-filter-field .form-control {
      font-size: 14px;
      line-height: 1.35;
    }

    .table-empty-title {
      font-size: 13px;
      line-height: 1.35;
    }

    .table-empty-text,
    .table-pagination-summary,
    .table-pagination-page,
    .payable-confirm-summary {
      font-size: 12px;
      line-height: 1.4;
    }

    .payable-badge,
    .supplier-status-dot,
    .opp-status-chip {
      font-size: 11px;
      line-height: 1.25;
    }

    .modal-title {
      font-size: 16px;
      line-height: 1.3;
    }

    .modal-body,
    .modal-footer .btn {
      font-size: 14px;
    }

    @media (max-width: 576px) {
      .dashboard-kpi-card .number,
      .dashboard-status-card .status-value {
        font-size: 23px;
      }
    }

    /* CUSTOM TOAST STYLES */
    #appToast {
      width: 500px !important;
      max-width: 90vw !important;
      font-size: 0.95rem;
      padding: 15px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
      z-index: 13000 !important;
    }


    /* ============================================================
       Modal Receita — Redesign
       ============================================================ */
    .rx-modal-content {
      border: none;
      border-radius: 16px;
      overflow: hidden;
      box-shadow: 0 24px 64px rgba(4, 26, 40, 0.24);
    }

    .rx-modal-header {
      background: var(--brand-gradient);
      padding: 20px 24px;
      border-bottom: none;
      align-items: center;
    }

    .rx-header-icon {
      width: 44px;
      height: 44px;
      background: rgba(255,255,255,0.18);
      border-radius: 12px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 20px;
      color: #fff;
      flex-shrink: 0;
    }

    .rx-header-subtitle {
      color: rgba(255,255,255,0.68);
      font-size: 12px;
      letter-spacing: 0.02em;
      display: block;
      margin-top: 2px;
    }

    .rx-modal-body {
      background: var(--surface-app);
      padding: 20px 24px 24px;
    }

    /* Section Cards */
    .rx-section {
      background: var(--surface-card);
      border-radius: 12px;
      border: 1px solid var(--color-neutral-200);
      overflow: hidden;
      box-shadow: 0 1px 4px rgba(4,26,40,0.05);
    }

    .rx-section-header {
      display: flex;
      align-items: center;
      gap: 9px;
      padding: 10px 16px;
      background: var(--color-neutral-50);
      border-bottom: 1px solid var(--color-neutral-200);
      font-size: 11px;
      font-weight: 700;
      color: var(--color-primary-600);
      text-transform: uppercase;
      letter-spacing: 0.07em;
    }

    .rx-section-header i {
      font-size: 13px;
      opacity: 0.85;
    }

    .rx-section-badge {
      margin-left: auto;
      font-size: 11px;
      font-weight: 400;
      color: var(--color-neutral-500);
      text-transform: none;
      letter-spacing: 0;
    }

    .rx-section-body {
      padding: 14px 16px;
    }

    /* Labels */
    .rx-label {
      font-size: 11px;
      font-weight: 700;
      color: var(--color-neutral-500);
      text-transform: uppercase;
      letter-spacing: 0.055em;
      margin-bottom: 5px;
      display: block;
    }

    /* Inputs */
    .rx-input {
      font-size: 14px;
      border-radius: 8px;
      border: 1.5px solid var(--color-neutral-200);
      background: #fff;
      color: var(--color-neutral-900);
      transition: border-color 0.15s, box-shadow 0.15s;
    }

    .rx-input:focus {
      border-color: var(--color-primary-500);
      box-shadow: 0 0 0 3px rgba(11,95,132,0.13);
      outline: none;
    }

    .rx-input-sm {
      padding: 5px 8px;
      font-size: 13px;
      text-align: center;
      border-radius: 6px;
    }

    /* Prescription Data Grid */
    .rx-prescription-grid {
      border-radius: 8px;
      overflow: hidden;
      border: 1px solid var(--color-neutral-200);
    }

    .rx-grid-header {
      display: grid;
      grid-template-columns: 56px repeat(5, 1fr);
      background: color-mix(in srgb, var(--color-primary-50) 70%, white);
      border-bottom: 1.5px solid var(--color-neutral-200);
    }

    .rx-lentes-grid .rx-grid-header,
    .rx-lentes-grid .rx-grid-row {
      grid-template-columns: 56px repeat(4, 1fr);
    }

    .rx-col-header {
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.07em;
      color: var(--color-primary-600);
      padding: 7px 6px;
      text-align: center;
      border-left: 1px solid var(--color-neutral-200);
    }

    .rx-col-header:first-child {
      border-left: none;
    }

    .rx-grid-row {
      display: grid;
      grid-template-columns: 56px repeat(5, 1fr);
      border-top: 1px solid var(--color-neutral-100);
    }

    .rx-grid-row + .rx-grid-row {
      border-top: 1px solid var(--color-neutral-200);
    }

    .rx-grid-cell {
      padding: 7px 6px;
      border-left: 1px solid var(--color-neutral-100);
    }

    .rx-eye-label {
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 800;
      font-size: 12px;
      letter-spacing: 0.06em;
      border-left: none;
    }

    .rx-eye-label.rx-od {
      color: var(--color-primary-600);
      background: rgba(11,95,132,0.07);
    }

    .rx-eye-label.rx-oe {
      color: var(--color-info);
      background: rgba(8,145,178,0.07);
    }

    /* Footer */
    .rx-modal-footer {
      background: var(--surface-card);
      border-top: 1px solid var(--color-neutral-200);
      padding: 14px 24px;
      gap: 10px;
    }

    .rx-btn-cancel {
      border-radius: 8px;
      font-size: 13px;
      font-weight: 600;
      padding: 8px 18px;
      color: var(--color-neutral-500);
      border-color: var(--color-neutral-200);
    }

    .rx-btn-cancel:hover {
      background: var(--color-neutral-100);
      border-color: var(--color-neutral-300);
      color: var(--color-neutral-900);
    }

    .rx-btn-save {
      border-radius: 8px;
      font-size: 13px;
      font-weight: 600;
      padding: 8px 22px;
      background: var(--brand-gradient);
      border: none;
      box-shadow: 0 2px 8px rgba(11,95,132,0.28);
      transition: box-shadow 0.2s, transform 0.15s;
    }

    .rx-btn-save:hover {
      box-shadow: 0 4px 16px rgba(11,95,132,0.38);
      transform: translateY(-1px);
    }

  