:root {
      --sidebar-width: 210px;
      --sidebar-collapsed-width: 80px;
      --header-height: 70px;
      --primary-color: #696cff;
      --primary-dark: #5f61e6;
      --sidebar-bg: #2b2c40;
      --sidebar-hover: rgba(255, 255, 255, 0.08);
      --text-light: #a5a3ae;
    }

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

    body {
      font-family: 'Segoe UI', 'Public Sans', -apple-system, sans-serif;
      overflow-x: hidden;
      background: #f5f5f9;
    }

    /* ===== HEADER SUPERIOR ===== */
    .top-header {
      height: var(--header-height);
      background: linear-gradient(135deg, var(--sidebar-bg) 0%, var(--primary-color) 100%);
      color: white;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 1030;
      display: flex;
      align-items: center;
      padding: 0 30px;
      box-shadow: 0 4px 24px 0 rgba(34, 41, 47, 0.1);
    }

    .top-header .logo {
      font-size: 1.5rem;
      font-weight: 700;
      text-decoration: none;
      color: white;
      display: flex;
      align-items: center;
      gap: 12px;
      transition: transform 0.3s ease;
    }

    .top-header .logo img {
      width: 50px;
      height: 50px;
      gap: 15px;
    }

    @media (max-width: 767.98px) {
      .top-header .logo img {
        width: 35px;
        height: 35px;
      }
    }

    .top-header .logo:hover {
      transform: scale(1.05);
    }

    .top-header .logo img {
      width: 40px;
      height: 40px;
      object-fit: contain;
    }

    .top-header .user-info {
      margin-left: auto;
      display: flex;
      align-items: center;
      gap: 15px;
    }

    .top-header .company-badge {
      background: rgba(255, 255, 255, 0.2);
      padding: 8px 16px;
      border-radius: 20px;
      font-size: 0.875rem;
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .top-header .user-badge {
      display: flex;
      align-items: center;
      gap: 10px;
      background: rgba(255, 255, 255, 0.15);
      padding: 8px 16px;
      border-radius: 25px;
      font-size: 0.875rem;
    }

    .top-header .user-badge i {
      font-size: 1.3rem;
    }

    .top-header .btn-logout {
      background: rgba(255, 255, 255, 0.2);
      border: 1px solid rgba(255, 255, 255, 0.3);
      color: white;
      padding: 8px 16px;
      border-radius: 20px;
      transition: all 0.3s ease;
      cursor: pointer;
      font-size: 0.875rem;
    }

    .top-header .btn-logout:hover {
      background: rgba(255, 255, 255, 0.3);
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    /* ===== SIDEBAR ===== */
    .sidebar {
      position: fixed;
      top: var(--header-height);
      left: 0;
      bottom: 0;
      width: var(--sidebar-width);
      background: var(--sidebar-bg);
      color: white;
      overflow-y: auto;
      overflow-x: hidden;
      transition: width 0.3s ease, transform 0.3s ease;
      z-index: 1020;
      box-shadow: 0 4px 24px 0 rgba(34, 41, 47, 0.1);
    }

    /* SIDEBAR COLLAPSED STATE */
    .sidebar.collapsed {
      width: var(--sidebar-collapsed-width);
    }

    .sidebar.collapsed .menu-header,
    .sidebar.collapsed .menu-sub,
    .sidebar.collapsed .menu-footer p,
    .sidebar.collapsed .menu-footer hr {
      display: none;
    }

    .sidebar.collapsed .sidebar-nav a span {
      opacity: 0;
      visibility: hidden;
      width: 0;
    }

    .sidebar.collapsed .sidebar-nav a {
      justify-content: center;
      padding: 12px 0;
      border-left: none;
    }

    .sidebar.collapsed .sidebar-nav a i {
      margin-right: 0;
      font-size: 1.5rem;
    }

    .sidebar.collapsed .menu-toggle::after {
      display: none;
    }

    .sidebar.collapsed .menu-footer {
      padding: 15px 10px;
      text-align: center;
    }

    /* ========== CORREÇÕES CRÍTICAS - Sidebar Collapsed ========== */
    .sidebar.collapsed .sidebar-nav a span,
    .sidebar.collapsed .menu-header,
    .sidebar.collapsed .menu-sub {
      display: none !important;
      opacity: 0 !important;
      visibility: hidden !important;
      width: 0 !important;
      height: 0 !important;
      overflow: hidden !important;
    }

    /* Força centralizar ícones */
    .sidebar.collapsed .sidebar-nav a {
      justify-content: center !important;
      padding: 12px 0 !important;
    }

    .sidebar.collapsed .sidebar-nav a i {
      margin-right: 0 !important;
      margin-left: 0 !important;
    }

    /* Impede qualquer interação com elementos escondidos */
    .sidebar.collapsed .sidebar-nav span,
    .sidebar.collapsed .menu-sub * {
      pointer-events: none !important;
      user-select: none !important;
    }

    /* Remove seta do menu-toggle quando colapsado */
    .sidebar.collapsed .menu-toggle::after {
      content: none !important;
      display: none !important;
    }
    /* ========== FIM CORREÇÕES CRÍTICAS ========== */

    /* Tooltip para sidebar colapsado */
    .sidebar.collapsed .sidebar-nav a {
      position: relative;
    }

    .sidebar.collapsed .sidebar-nav a:hover::after {
      content: attr(data-tooltip);
      position: absolute;
      left: 100%;
      top: 50%;
      transform: translateY(-50%);
      background: var(--sidebar-bg);
      color: white;
      padding: 8px 12px;
      border-radius: 6px;
      white-space: nowrap;
      margin-left: 10px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
      z-index: 1000;
      font-size: 0.875rem;
    }

    .sidebar::-webkit-scrollbar {
      width: 6px;
    }

    .sidebar::-webkit-scrollbar-track {
      background: rgba(255, 255, 255, 0.05);
    }

    .sidebar::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.2);
      border-radius: 3px;
    }

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

    .sidebar-nav .menu-header {
      padding: 15px 20px 10px;
      font-size: 0.75rem;
      font-weight: 600;
      text-transform: uppercase;
      color: var(--text-light);
      letter-spacing: 0.5px;
      transition: opacity 0.3s ease;
    }

    .sidebar-nav a {
      display: flex;
      align-items: center;
      padding: 12px 20px;
      color: #c7c7d2;
      text-decoration: none;
      transition: all 0.3s ease;
      border-left: 3px solid transparent;
    }

    .sidebar-nav a span {
      transition: opacity 0.3s ease, width 0.3s ease;
      white-space: nowrap;
    }

    .sidebar-nav a:hover {
      background: var(--sidebar-hover);
      color: white;
      padding-left: 25px;
    }

    .sidebar.collapsed .sidebar-nav a:hover {
      padding-left: 0;
    }

    .sidebar-nav a.active {
      background: linear-gradient(90deg, rgba(105, 108, 255, 0.16) 0%, rgba(105, 108, 255, 0) 100%);
      border-left-color: var(--primary-color);
      color: white;
    }

    .sidebar.collapsed .sidebar-nav a.active {
      background: var(--sidebar-hover);
      border-left: none;
    }

    .sidebar-nav a.active i {
      color: var(--primary-color);
    }

    .sidebar-nav i {
      margin-right: 12px;
      font-size: 1.25rem;
      width: 24px;
      text-align: center;
      transition: transform 0.3s ease, margin 0.3s ease, font-size 0.3s ease;
    }

    .sidebar-nav a:hover i {
      transform: scale(1.1);
    }

    /* Submenu */
    .sidebar-nav .menu-sub {
      list-style: none;
      padding: 0;
      margin: 0;
      display: none;
      transition: all 0.3s ease;
    }

    .sidebar-nav .menu-item.open .menu-sub {
      display: block;
    }

    .sidebar-nav .menu-sub a {
      padding-left: 56px;
      font-size: 0.9rem;
    }

    .sidebar-nav .menu-sub a:hover {
      padding-left: 60px;
    }

    .sidebar-nav .menu-toggle::after {
      content: '\f282';
      font-family: 'boxicons';
      position: absolute;
      right: 20px;
      transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .sidebar-nav .menu-item.open .menu-toggle::after {
      transform: rotate(90deg);
    }

    .menu-toggle {
      position: relative;
      cursor: pointer;
    }

    /* Footer Menu */
    .menu-footer {
      padding: 20px;
      margin-top: auto;
      border-top: 1px solid rgba(255, 255, 255, 0.1);
      text-align: center;
      font-size: 0.75rem;
      color: var(--text-light);
      transition: padding 0.3s ease;
    }

    .menu-footer hr {
      border-color: rgba(255, 255, 255, 0.1);
      margin: 10px 0;
      transition: opacity 0.3s ease;
    }

    /* ===== BOTÃO DE TOGGLE DO SIDEBAR ===== */
    .sidebar-collapse-btn {
      position: fixed;
      top: calc(var(--header-height) + 15px);
      left: calc(var(--sidebar-width) - 20px);
      width: 40px;
      height: 40px;
      background: var(--primary-color);
      border: none;
      border-radius: 50%;
      color: white;
      font-size: 1.25rem;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 1021;
      box-shadow: 0 4px 12px rgba(105, 108, 255, 0.4);
      transition: all 0.3s ease;
    }

    .sidebar-collapse-btn:hover {
      background: var(--primary-dark);
      transform: scale(1.1);
      box-shadow: 0 6px 16px rgba(105, 108, 255, 0.5);
    }

    .sidebar.collapsed + .sidebar-collapse-btn {
      left: calc(var(--sidebar-collapsed-width) - 20px);
    }

    .sidebar.collapsed + .sidebar-collapse-btn i {
      transform: rotate(180deg);
    }

    /* ===== MAIN CONTENT ===== */
    .main-content {
      margin-left: var(--sidebar-width);
      margin-top: var(--header-height);
      padding: 30px;
      min-height: calc(100vh - var(--header-height) - 80px);
      transition: margin-left 0.3s ease;
    }

    .sidebar.collapsed ~ .main-content {
      margin-left: var(--sidebar-collapsed-width);
    }

    /* ===== FOOTER ===== */
    .content-footer {
      background: #fff;
      padding: 20px 30px;
      text-align: center;
      border-top: 1px solid #d9dee3;
      margin-left: var(--sidebar-width);
      box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03);
      transition: margin-left 0.3s ease;
    }

    .sidebar.collapsed ~ .content-footer {
      margin-left: var(--sidebar-collapsed-width);
    }

    .content-footer p {
      margin: 5px 0;
      font-size: 0.875rem;
    }

    /* ===== CARDS ===== */
    .card {
      border: none;
      border-radius: 12px;
      box-shadow: 0 2px 20px 0 rgba(34, 41, 47, 0.08);
      margin-bottom: 24px;
      transition: all 0.3s ease;
      background: white;
    }

    .card:hover {
      transform: translateY(-4px);
      box-shadow: 0 8px 30px 0 rgba(34, 41, 47, 0.12);
    }

    .card-header {
      background: #f8f9fa;
      color: inherit;
      border-radius: 12px 12px 0 0 !important;
      font-weight: 600;
      padding: 16px 24px;
      border-bottom: 1px solid #d9dee3 !important;
    }

    .card-body {
      padding: 24px;
    }

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

    .cards-4-col {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
      gap: 24px;
      margin-bottom: 24px;
    }

    /* ===== BOTÕES ===== */
    .btn {
      border-radius: 8px;
      padding: 10px 24px;
      font-weight: 500;
      transition: all 0.3s ease;
      border: none;
    }

    .btn-primary {
      background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
      color: white;
      box-shadow: 0 4px 12px rgba(105, 108, 255, 0.25);
    }

    .btn-primary:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(105, 108, 255, 0.4);
    }

    /* ===== LOADING ===== */
    .spinner-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(43, 44, 64, 0.8);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 9999;
    }

    .spinner-overlay.show {
      display: flex;
    }

    /* ===== ANIMATIONS ===== */
    .fade-in {
      animation: fadeIn 0.5s ease;
    }

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

    /* ===== TOGGLE BUTTON ===== */
    .sidebar-toggle {
      background: none;
      border: none;
      color: white;
      font-size: 1.5rem;
      cursor: pointer;
      margin-right: 15px;
      padding: 8px;
      border-radius: 8px;
      transition: background 0.3s ease;
      display: none;
    }

    .sidebar-toggle:hover {
      background: rgba(255, 255, 255, 0.1);
    }

    /* ===== RESPONSIVE ===== */
    @media (max-width: 991.98px) {
      .sidebar {
        transform: translateX(-100%);
      }

      .sidebar.show {
        transform: translateX(0);
        width: var(--sidebar-width);
      }

      .sidebar.collapsed {
        width: var(--sidebar-width);
      }

      .main-content,
      .content-footer {
        margin-left: 0;
      }

      .sidebar.collapsed ~ .main-content,
      .sidebar.collapsed ~ .content-footer {
        margin-left: 0;
      }

      .sidebar-toggle {
        display: block;
      }

      .sidebar-collapse-btn {
        display: none;
      }

      .top-header .company-badge {
        display: none;
      }

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

    @media (max-width: 767.98px) {
      .main-content {
        padding: 20px 15px;
      }

      .top-header .user-badge span {
        display: none;
      }
    }


/* ===== COMPACTAÇÃO OTIMIZADA DE FORMS, LISTAS E COMPONENTES ===== */

/* INPUTS E SELECTS - Redução máxima mantendo usabilidade */
.form-control,
.form-select,
select.form-control,
input.form-control,
textarea.form-control {
  padding: 4px 8px !important;
  font-size: 0.8125rem !important;
  line-height: 1.3 !important;
  min-height: 30px !important;
  height: 30px !important;
}

/* Textarea precisa de altura mínima maior */
textarea.form-control {
  min-height: 60px !important;
  height: auto !important;
}

/* Select múltiplo compacto */
select[multiple].form-control {
  min-height: 70px !important;
  height: auto !important;
}

/* LABELS - Mais compactos */
.form-label {
  margin-bottom: 2px !important;
  font-size: 0.75rem !important;
  font-weight: 500;
  line-height: 1.2;
}

/* FORM GROUPS - Espaçamento mínimo */
.form-group {
  margin-bottom: 8px !important;
}

/* ROWS - Redução de espaçamento */
.row {
  margin-bottom: 6px !important;
}

/* Espaçamento entre colunas reduzido */
.row > [class*='col-'] {
  padding-left: 8px !important;
  padding-right: 8px !important;
}

/* MARGINS - Sistema compactado */
.mb-1 { margin-bottom: 3px !important; }
.mb-2 { margin-bottom: 6px !important; }
.mb-3 { margin-bottom: 8px !important; }
.mb-4 { margin-bottom: 12px !important; }
.mb-5 { margin-bottom: 16px !important; }

.mt-1 { margin-top: 3px !important; }
.mt-2 { margin-top: 6px !important; }
.mt-3 { margin-top: 8px !important; }
.mt-4 { margin-top: 12px !important; }
.mt-5 { margin-top: 16px !important; }

/* CARDS - Mais compactos */
.card {
  margin-bottom: 15px !important;
}

.card-header {
  padding: 10px 15px !important;
  font-size: 0.875rem !important;
}

.card-body {
  padding: 15px !important;
}

/* TABELAS - Células bem compactas */
.table {
  font-size: 0.8125rem !important;
  margin-bottom: 0 !important;
}

.table th,
.table td {
  padding: 6px 8px !important;
  vertical-align: middle;
  line-height: 1.3;
}

.table thead th {
  font-size: 0.75rem !important;
  font-weight: 600;
  padding: 8px 8px !important;
  white-space: nowrap;
}

/* BOTÕES - Redução significativa */
.btn {
  padding: 5px 12px !important;
  font-size: 0.8125rem !important;
  line-height: 1.3;
  min-height: 30px;
}

.btn-sm {
  padding: 3px 8px !important;
  font-size: 0.75rem !important;
  min-height: 26px;
}

.btn-lg {
  padding: 8px 16px !important;
  font-size: 0.9375rem !important;
  min-height: 36px;
}

/* Ícones em botões não devem distorcer */
.btn i {
  font-size: 1em;
  vertical-align: middle;
}

/* INPUT GROUPS */
.input-group {
  margin-bottom: 8px !important;
}

.input-group-text {
  padding: 4px 8px !important;
  font-size: 0.8125rem !important;
  line-height: 1.3;
}

/* CHECKBOXES E RADIOS */
.form-check {
  margin-bottom: 6px !important;
  padding-left: 1.25em;
}

.form-check-input {
  width: 1em;
  height: 1em;
  margin-top: 0.15em;
}

.form-check-label {
  font-size: 0.8125rem !important;
  line-height: 1.3;
}

/* BADGES */
.badge {
  padding: 3px 6px !important;
  font-size: 0.7rem !important;
  line-height: 1.2;
}

/* LIST GROUPS */
.list-group-item {
  padding: 8px 10px !important;
  font-size: 0.8125rem !important;
}

/* MODALS */
.modal-header {
  padding: 10px 15px !important;
}

.modal-body {
  padding: 12px 15px !important;
}

.modal-footer {
  padding: 10px 15px !important;
  gap: 8px;
}

/* ALERTS */
.alert {
  padding: 8px 12px !important;
  font-size: 0.8125rem !important;
  margin-bottom: 12px !important;
}

/* FIELDSETS E LEGENDS */
fieldset {
  margin-bottom: 12px !important;
  padding: 10px !important;
  border: 1px solid #dee2e6;
  border-radius: 6px;
}

legend {
  font-size: 0.875rem !important;
  padding: 0 6px !important;
  margin-bottom: 6px !important;
  width: auto;
  float: none;
}

/* HR */
hr {
  margin: 12px 0 !important;
}

/* PAGINATION */
.pagination {
  margin-bottom: 8px !important;
}

.page-link {
  padding: 4px 8px !important;
  font-size: 0.8125rem !important;
  line-height: 1.3;
}

/* FORM TEXT (textos de ajuda) */
.form-text {
  margin-top: 2px !important;
  font-size: 0.7rem !important;
  line-height: 1.2;
}

/* BREADCRUMBS */
.breadcrumb {
  padding: 6px 10px !important;
  font-size: 0.8125rem !important;
  margin-bottom: 12px !important;
}

.breadcrumb-item + .breadcrumb-item {
  padding-left: 0.4rem;
}

/* TABS */
.nav-tabs .nav-link {
  padding: 6px 10px !important;
  font-size: 0.8125rem !important;
}

.tab-content {
  padding-top: 10px;
}

/* ACCORDIONS */
.accordion-button {
  padding: 8px 12px !important;
  font-size: 0.8125rem !important;
}

.accordion-body {
  padding: 10px 12px !important;
  font-size: 0.8125rem !important;
}

/* DROPDOWNS */
.dropdown-menu {
  font-size: 0.8125rem !important;
  padding: 4px 0;
}

.dropdown-item {
  padding: 4px 12px !important;
}

/* TOOLTIPS E POPOVERS */
.tooltip-inner {
  font-size: 0.75rem !important;
  padding: 4px 8px !important;
}

.popover-body {
  font-size: 0.8125rem !important;
  padding: 8px 10px !important;
}

/* PROGRESS BARS */
.progress {
  height: 1rem !important;
  font-size: 0.7rem !important;
}

/* SPINNERS */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
  border-width: 0.15em;
}

/* REDUÇÃO DE ESPAÇAMENTO GERAL DO MAIN CONTENT */
.main-content {
  padding: 20px !important;
}

/* EXCEÇÃO - tela fullscreen sem padding */
.main-content.no-padding {
  padding: 0 !important;
  overflow: hidden;
  min-height: calc(100vh - 70px);
  display: flex;
}

.main-content.no-padding > .fade-in {
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
  animation: none;
}

@media (max-width: 767.98px) {
  .main-content {
    padding: 15px 10px !important;
  }
}

/* DATA TABLES (se usar DataTables) */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
  padding: 4px 8px !important;
  font-size: 0.8125rem !important;
  height: 30px !important;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  font-size: 0.8125rem !important;
}

/* SELECT2 (se usar Select2) */
.select2-container--default .select2-selection--single {
  height: 30px !important;
  padding: 2px 8px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 26px !important;
  font-size: 0.8125rem !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 28px !important;
}

/* OTIMIZAÇÃO ESPECÍFICA PARA MAC - Remove espaços desnecessários */
@media (min-width: 1200px) {
  .container,
  .container-lg,
  .container-md,
  .container-sm,
  .container-xl {
    max-width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}

/* ===== COMPACTAÇÃO ESPECÍFICA DO MENU LATERAL ===== */

/* MENU HEADERS - Reduzir espaçamento */
.sidebar-nav .menu-header {
  padding: 10px 20px 6px !important;
  font-size: 0.7rem !important;
  margin-bottom: 2px !important;
  line-height: 1.2;
}

/* MENU ITEMS - Links principais mais compactos */
.sidebar-nav a {
  padding: 8px 20px !important;
  font-size: 0.8125rem !important;
  line-height: 1.3;
  min-height: 36px;
}

.sidebar-nav a:hover {
  padding-left: 22px !important;
}

/* ÍCONES - Menores e mais próximos */
.sidebar-nav i {
  margin-right: 10px !important;
  font-size: 1.125rem !important;
  width: 20px !important;
}

/* SUBMENU - Ainda mais compacto */
.sidebar-nav .menu-sub {
  margin-top: 2px;
  margin-bottom: 2px;
}

.sidebar-nav .menu-sub a {
  padding: 6px 20px 6px 48px !important;
  font-size: 0.75rem !important;
  line-height: 1.2;
  min-height: 30px;
}

.sidebar-nav .menu-sub a:hover {
  padding-left: 50px !important;
}

.sidebar-nav .menu-sub i {
  font-size: 1rem !important;
  margin-right: 8px !important;
  width: 18px !important;
}

/* MENU ITEM - Reduzir espaçamento entre itens */
.sidebar-nav .menu-item {
  margin-bottom: 2px !important;
}

/* ACTIVE STATE - Ajustar altura da barra */
.sidebar-nav .menu-item.active:before,
.layout-wrapper:not(.layout-horizontal) .bg-menu-theme .menu-inner > .menu-item.active:before {
  height: 36px !important;
  width: 3px !important;
}

/* MENU TOGGLE - Seta de dropdown */
.sidebar-nav .menu-toggle::after {
  font-size: 1rem !important;
  right: 16px !important;
}

/* MENU FOOTER - Mais compacto */
.menu-footer {
  padding: 12px 16px !important;
  font-size: 0.7rem !important;
}

.menu-footer hr {
  margin: 8px 0 !important;
}

/* SIDEBAR NAV - Reduzir padding geral */
.sidebar-nav {
  padding: 12px 0 !important;
}

/* ESTADOS DO MENU */
.sidebar-nav a.active {
  font-weight: 500;
}

/* OTIMIZAÇÃO PARA THEME-DEFAULT.CSS - Sobrescrever se necessário */
.bg-menu-theme .menu-header {
  padding: 10px 20px 6px !important;
  font-size: 0.7rem !important;
}

.bg-menu-theme .menu-link {
  padding: 8px 20px !important;
  font-size: 0.8125rem !important;
}

.bg-menu-theme .menu-sub > .menu-item > .menu-link {
  padding: 6px 20px 6px 48px !important;
  font-size: 0.75rem !important;
}

.bg-menu-theme .menu-sub > .menu-item > .menu-link:before {
  left: 1.125rem !important;
  width: 0.25rem !important;
  height: 0.25rem !important;
}

.bg-menu-theme .menu-sub > .menu-item.active > .menu-link:not(.menu-toggle):before {
  left: 1rem !important;
  width: 0.625rem !important;
  height: 0.625rem !important;
}

/* MENU ICONS - Garantir tamanho uniforme */
.menu-icon {
  font-size: 1.125rem !important;
  width: 20px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* SIDEBAR COLLAPSED - Ajustes */
.sidebar.collapsed .sidebar-nav a {
  padding: 10px 0 !important;
  min-height: 40px;
}

.sidebar.collapsed .sidebar-nav a i {
  font-size: 1.25rem !important;
}

/* ESPACAMENTO VERTICAL ENTRE SEÇÕES */
.sidebar-nav > .menu-item + .menu-header {
  margin-top: 12px !important;
}

/* HOVER STATES - Ajustes finos */
.bg-menu-theme .menu-link:hover,
.bg-menu-theme .menu-link:focus {
  background-color: rgba(67, 89, 113, 0.04);
}

.bg-menu-theme .menu-item.open > .menu-toggle {
  background-color: rgba(67, 89, 113, 0.04);
}

/* ACTIVE SUBMENU ITEM */
.bg-menu-theme .menu-sub > .menu-item.active > .menu-link {
  color: #696cff;
  font-weight: 500;
}

/* MENU TEXT - Garantir alinhamento */
.sidebar-nav a span {
  vertical-align: middle;
  line-height: 1.3;
}

/* OTIMIZAÇÃO ADICIONAL - Menu muito grande em resoluções específicas */
@media (min-height: 900px) and (max-height: 1080px) {
  .sidebar-nav .menu-header {
    padding: 8px 20px 4px !important;
    margin-bottom: 1px !important;
  }
  
  .sidebar-nav a {
    padding: 6px 20px !important;
    min-height: 32px;
  }
  
  .sidebar-nav .menu-sub a {
    padding: 5px 20px 5px 48px !important;
    min-height: 28px;
  }
}

/* MENU COMPACTO EXTREMO - Para telas menores que 800px de altura */
@media (max-height: 800px) {
  .sidebar-nav .menu-header {
    padding: 6px 20px 3px !important;
    font-size: 0.65rem !important;
    margin-bottom: 0 !important;
  }
  
  .sidebar-nav a {
    padding: 5px 20px !important;
    font-size: 0.75rem !important;
    min-height: 28px;
  }
  
  .sidebar-nav .menu-sub a {
    padding: 4px 20px 4px 46px !important;
    font-size: 0.7rem !important;
    min-height: 24px;
  }
  
  .sidebar-nav i {
    font-size: 1rem !important;
    width: 18px !important;
    margin-right: 8px !important;
  }
  
  .sidebar-nav .menu-sub i {
    font-size: 0.875rem !important;
    width: 16px !important;
  }
  
  .sidebar-nav {
    padding: 8px 0 !important;
  }
  
  .sidebar-nav .menu-item {
    margin-bottom: 1px !important;
  }
}

/* OTIMIZAÇÃO PARA SCROLLBAR NO MENU */
.sidebar::-webkit-scrollbar {
  width: 5px !important;
}

.sidebar::-webkit-scrollbar-thumb {
  border-radius: 2px !important;
}

/* GARANTIR TRANSIÇÕES SUAVES */
.sidebar-nav a,
.sidebar-nav .menu-sub {
  transition: all 0.2s ease-in-out;
}

/* ===== COMPACTAÇÃO DO CONTEÚDO INTERNO DOS WIDGETS ===== */

/* TÍTULOS DOS WIDGETS - Reduzir */
.widget-title,
.widget-card h5,
.widget-card h6 {
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  margin: 0 !important;
}

/* VALORES KPI - Números grandes */
.kpi-value,
.widget-body h1,
.widget-body h2,
.widget-body .display-1,
.widget-body .display-2 {
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  margin: 0.5rem 0 !important;
}

/* LABELS ABAIXO DOS VALORES - "disparos", "taxa de entrega", etc */
.kpi-label,
.widget-body p,
.widget-body small,
.widget-body .text-muted {
  font-size: 0.75rem !important;
  line-height: 1.3 !important;
  margin: 0 !important;
  margin-top: 0.25rem !important;
}

/* ÍCONES DOS WIDGETS - Reduzir */
.widget-icon {
  width: 28px !important;
  height: 28px !important;
  font-size: 0.95rem !important;
  border-radius: 0.375rem;
}

/* WIDGET BODY - Compactar padding e altura */
.widget-body {
  padding: 0.75rem !important;
  min-height: 160px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* WIDGET HEADER - Compactar */
.widget-header {
  padding: 0.625rem 0.75rem !important;
  min-height: 40px;
}

/* CHART LABELS - Textos dos gráficos */
.chart-container canvas {
  font-size: 0.75rem !important;
}

/* LABELS DO CHART.JS - Compactar */
.chart-container {
  height: 180px !important;
  position: relative;
}

/* TABELAS DENTRO DOS WIDGETS */
.widget-table {
  font-size: 0.75rem !important;
}

.widget-table th {
  padding: 0.5rem !important;
  font-size: 0.7rem !important;
  font-weight: 600 !important;
}

.widget-table td {
  padding: 0.5rem !important;
  font-size: 0.75rem !important;
}

/* LABELS DOS EIXOS DO GRÁFICO (LIGACAO, WHATSAPP, EMAIL) */
.widget-body .chart-labels,
.widget-body text,
.widget-body tspan {
  font-size: 0.75rem !important;
}

/* BOTÕES DE AÇÃO DO WIDGET (lixeira, etc) */
.widget-action-btn {
  font-size: 0.95rem !important;
  padding: 0.25rem !important;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* BADGES DENTRO DOS WIDGETS */
.widget-body .badge {
  font-size: 0.7rem !important;
  padding: 3px 6px !important;
}

/* SEPARADORES/DIVISORES */
.widget-body hr {
  margin: 0.5rem 0 !important;
}

/* LISTAS DENTRO DOS WIDGETS */
.widget-body ul,
.widget-body ol {
  font-size: 0.75rem !important;
  padding-left: 1.25rem;
  margin: 0.5rem 0 !important;
}

.widget-body li {
  margin-bottom: 0.25rem;
  line-height: 1.4;
}

/* VALORES SECUNDÁRIOS (porcentagens, variações) */
.widget-body .secondary-value,
.widget-body .percentage,
.widget-body .variation {
  font-size: 0.8125rem !important;
  font-weight: 500;
}

/* AJUSTES ESPECÍFICOS PARA CHART.JS */
/* Forçar fonte menor nos gráficos */
#widgets-container canvas {
  font-family: 'Segoe UI', 'Public Sans', -apple-system, sans-serif !important;
}

/* CARD GERAL - Garantir compactação */
.widget-card {
  font-size: 0.875rem;
}

/* OTIMIZAÇÃO PARA 4 COLUNAS */
@media (min-width: 1200px) {
  .widget-body {
    min-height: 150px !important;
  }
  
  .kpi-value {
    font-size: 1.625rem !important;
  }
  
  .chart-container {
    height: 170px !important;
  }
}

/* TELAS MUITO GRANDES - Pode aumentar um pouco */
@media (min-width: 1600px) {
  .kpi-value {
    font-size: 1.875rem !important;
  }
  
  .widget-body {
    min-height: 170px !important;
  }
  
  .chart-container {
    height: 190px !important;
  }
}

/* GARANTIR QUE TEXTOS NÃO QUEBREM */
.widget-title,
.kpi-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Se o título for muito grande, permitir quebra mas manter compacto */
.widget-header.multi-line .widget-title {
  white-space: normal;
  line-height: 1.2;
  max-height: 2.4em;
  overflow: hidden;
}

/* LOADING STATE - Compactar */
.widget-loading {
  font-size: 0.8125rem !important;
  min-height: 140px !important;
}

.widget-loading .spinner-border {
  width: 1.75rem !important;
  height: 1.75rem !important;
}

/* EMPTY STATE DENTRO DO WIDGET */
.widget-body .empty-state {
  font-size: 0.75rem !important;
  color: #999;
  padding: 1rem 0;
}

.widget-body .empty-state i {
  font-size: 2rem !important;
  opacity: 0.3;
  margin-bottom: 0.5rem;
}

.widget-card[draggable="true"] {
    cursor: move;
}

.widget-card[draggable="true"]:active {
    cursor: grabbing;
}

[draggable="true"] {
    cursor: move;
}

[draggable="true"]:active {
    cursor: grabbing;
}

/* Mantém o layout durante o drag */
.col-12.col-md-6.col-lg-4.col-xl-3 {
    min-height: 50px;
}

/* =========================================================
   ATENDIMENTOS OPERADOR – ESTILO CONSOLIDADO
   Data: 2026-02-01
   ========================================================= */


/* Header da sidebar (AZUL - padrão do sistema) */
#atendimentosSidebar .bg-primary {
  background: linear-gradient(135deg, var(--sidebar-bg) 0%, var(--primary-color) 100%);
  color: #ffffff;
}

#atendimentosSidebar .bg-primary h5,
#atendimentosSidebar .bg-primary i {
  color: #ffffff;
}

/* Estado recolhido da sidebar */
#atendimentosSidebar.collapsed {
  margin-left: -240px; /* deixa ~60px visíveis */
}

.btn-toggle-sidebar {
  padding: 5px 6px;
  line-height: 1;
  border-radius: 6px;
}

.btn-toggle-sidebar i {
  font-size: 1.5rem;
  transition: transform 0.2s ease;
}

/* quando sidebar estiver recolhida */
#atendimentosSidebar.collapsed .btn-toggle-sidebar i {
  transform: rotate(180deg); /* vira > */
}



/* ===== ABAS =============================================== */

.nav-tabs {
  border-bottom: 1px solid #e0e6ed;
  margin: 0;
  background-color: #f8f9fa;
}

.nav-tabs .nav-link {
  border: none;
  color: #64748b;
  padding: 0.5rem 1rem;
  transition: color 0.2s ease, background-color 0.2s ease;
  border-radius: 0;
}

.nav-tabs .nav-link:hover {
  color: #0d6efd;
  background-color: rgba(13, 110, 253, 0.06);
}

.nav-tabs .nav-link.active {
  background: #ffffff;
  color: #0d6efd;
  border-bottom: 2px solid #0d6efd;
  font-weight: 600;
}

/* ===== LISTAS DE ATENDIMENTOS ============================ */

#atendimentosSidebar {
  background-color: #ffffff;
  border-right: 1px solid #e0e6ed;
  width: 320px;
  transition: margin-left 0.25s ease;
  position: relative;
  z-index: 100;

  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-height));
  flex: 0 0 320px;
}

#listaAtendendo,
#listaPendentes {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.5rem;
}

/* Scrollbar customizada */
#listaAtendendo::-webkit-scrollbar,
#listaPendentes::-webkit-scrollbar {
  width: 8px;
}

#listaAtendendo::-webkit-scrollbar-track,
#listaPendentes::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

#listaAtendendo::-webkit-scrollbar-thumb,
#listaPendentes::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 4px;
}

#listaAtendendo::-webkit-scrollbar-thumb:hover,
#listaPendentes::-webkit-scrollbar-thumb:hover {
  background: #a0aec0;
}

/* ===== CARDS DOS ATENDIMENTOS ============================ */

.card.w-100 {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.15s ease;
  margin-bottom: 0.5rem;
}

.card.w-100:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
  border-color: #cbd5e0;
  background-color: #f8faff;
}

.card.w-100.border-primary {
  background-color: #eef2ff;
  border-color: #0d6efd;
}

/* ===================================================================
   ATENDIMENTOS OPERADOR - CSS CONSOLIDADO
   Organização: Estrutura → Componentes → Estados → Responsividade
   =================================================================== */

/* ===== VARIÁVEIS CSS ====================================== */
:root {
  /* Cores principais */
  --op-bg: #f5f5f5;
  --op-card: #ffffff;
  --op-border: #e5e7eb;
  --op-border-hover: #d1d5db;
  
  /* Textos */
  --op-text: #111827;
  --op-text-secondary: #374151;
  --op-text-muted: #6b7280;
  --op-text-light: #9ca3af;
  
  /* Primárias */
  --op-primary: #3b82f6;
  --op-primary-hover: #2563eb;
  --op-primary-light: #eff6ff;
  
  /* Warnings/Alertas */
  --op-warning: #f59e0b;
  
  /* Backgrounds */
  --op-bg-header: #fafafa;
  --op-bg-input: #f9fafb;
  
  /* Espaçamentos */
  --op-spacing-xs: 4px;
  --op-spacing-sm: 8px;
  --op-spacing-md: 12px;
  --op-spacing-lg: 16px;
  
  /* Transições */
  --op-transition: all 0.15s ease;
  --op-transition-slow: all 0.2s ease;
}

/* ===================================================================
   1. ESTRUTURA PRINCIPAL
   =================================================================== */

/* Área de detalhes - Container principal */
#areaDetalhes {
  width: 100%;
  max-width: none;
  background-color: var(--op-bg);
  padding: 0;
  overflow-y: auto;
}

#areaDetalhes::-webkit-scrollbar {
  width: 8px;
}

#areaDetalhes::-webkit-scrollbar-track {
  background: #f1f1f1;
}

#areaDetalhes::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

#areaDetalhes::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Estado vazio */
#estadoVazio {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 400px;
  color: var(--op-text-light);
}

#estadoVazio i {
  opacity: 0.15;
  font-size: 4rem;
}

/* ===================================================================
   2. CONTEÚDO DO ATENDIMENTO
   =================================================================== */

/* Container do atendimento */
.atendimento-detalhe-content {
  width: 100%;
  max-width: none;
  padding: var(--op-spacing-md) var(--op-spacing-lg);
  height: 100%;
  overflow-y: auto;
}

.atendimento-detalhe-content.operador-edicao {
  padding: var(--op-spacing-md) var(--op-spacing-lg);
  max-width: none;
}

/* Ajuste de rows do Bootstrap */
.atendimento-detalhe-content .row {
  margin-left: 0;
  margin-right: 0;
}

.atendimento-detalhe-content .row > [class*="col-"] {
  padding-left: var(--op-spacing-sm);
  padding-right: var(--op-spacing-sm);
}

/* Header do atendimento */
.atendimento-detalhe-content .mb-3.p-3.border-bottom {
  margin-left: 0;
  margin-right: 0;
  padding: 10px var(--op-spacing-lg) !important;
  background-color: var(--op-bg-header) !important;
  border-bottom: 2px solid var(--op-border) !important;
  margin-bottom: var(--op-spacing-md) !important;
}

.atendimento-detalhe-content .mb-3.p-3.border-bottom i {
  font-size: 1.25rem;
}

.atendimento-detalhe-content .mb-3.p-3.border-bottom strong {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--op-text);
}

/* ===================================================================
   3. CARDS PADRÃO
   =================================================================== */

#areaDetalhes .card {
  width: 100%;
  max-width: none;
  border: 1px solid var(--op-border);
  border-radius: 6px;
  background: var(--op-card);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  margin-bottom: var(--op-spacing-md);
  transition: var(--op-transition);
}

#areaDetalhes .card-header {
  background-color: var(--op-bg-header);
  border-bottom: 1px solid var(--op-border);
  padding: var(--op-spacing-sm) var(--op-spacing-md);
  font-weight: 600;
  font-size: 0.875rem;
}

#areaDetalhes .card-body {
  padding: var(--op-spacing-md) var(--op-spacing-lg);
}

/* Cards na sidebar */
.card.shadow-sm {
  border: 1px solid var(--op-border);
  transition: var(--op-transition);
}

.card.shadow-sm:hover {
  border-color: var(--op-primary);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15) !important;
  transform: translateY(-1px);
}

/* ===================================================================
   4. CARDS OPERADOR (Interações, Subatendimentos, Formulários)
   =================================================================== */

.card-operador {
  width: 100%;
  max-width: none;
  border: 1px solid var(--op-border);
  border-radius: 6px;
  background: var(--op-card);
  box-shadow: none;
  margin-bottom: 8px;
  transition: var(--op-transition-slow);
}

.card-operador:hover {
  border-color: var(--op-border-hover);
}

.card-operador.expanded {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

/* Header operador */
.card-header-operador {
  background: linear-gradient(to bottom, var(--op-bg-header) 0%, #f5f5f5 100%);
  border-bottom: 1px solid var(--op-border);
  padding: var(--op-spacing-sm) var(--op-spacing-md);
  border-radius: 6px 6px 0 0;
}

.card-operador.expanded .card-header-operador {
  background: #f9fafb;
  border-bottom-color: var(--op-border-hover);
}

.header-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--op-text-secondary);
  letter-spacing: 0.3px;
}

.card-header-operador i.bx {
  font-size: 1.125rem;
  color: var(--op-text-light);
}

/* Body operador */
.card-body-operador {
  padding: var(--op-spacing-md);
  background: var(--op-card);
  transition: var(--op-transition-slow);
  overflow: hidden;
}

.card-body-operador.d-none {
  padding: 0;
}

/* Estado vazio */
.card-operador.empty .card-header-operador {
  opacity: 0.6;
}

.card-operador.empty .btn-toggle-operador {
  cursor: not-allowed;
  opacity: 0.5;
}

/* ===================================================================
   5. BOTÕES
   =================================================================== */

/* Botão padrão small */
.btn-sm {
  padding: 4px 10px;
  font-size: 0.75rem;
  border-radius: 4px;
  font-weight: 600;
  transition: var(--op-transition);
}

/* Botão toggle sidebar */
.btn-toggle-sidebar {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Botão toggle operador */
.btn-toggle-operador {
  background: transparent;
  border: 1px solid var(--op-border-hover);
  color: var(--op-text-muted);
  width: 28px;
  height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: var(--op-transition-slow);
  cursor: pointer;
}

.btn-toggle-operador:hover {
  background: #f3f4f6;
  border-color: var(--op-text-light);
  color: var(--op-text-secondary);
}

.btn-toggle-operador:active {
  background: var(--op-border);
  transform: scale(0.95);
}

.btn-toggle-operador:focus {
  outline: 2px solid var(--op-primary);
  outline-offset: 2px;
}

.btn-toggle-operador i {
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.btn-toggle-operador.active i {
  transform: rotate(180deg);
}

/* Botão ação operador */
.btn-action-operador {
  background: var(--op-card);
  border: 1px solid var(--op-border-hover);
  color: var(--op-primary);
  width: 28px;
  height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: var(--op-transition-slow);
  cursor: pointer;
}

.btn-action-operador:hover {
  background: var(--op-primary-light);
  border-color: var(--op-primary);
  color: var(--op-primary-hover);
}

.btn-action-operador:active {
  background: #dbeafe;
  transform: scale(0.95);
}

.btn-action-operador:focus {
  outline: 2px solid var(--op-primary);
  outline-offset: 2px;
}

.btn-action-operador i {
  font-size: 1rem;
}

/* ===================================================================
   6. BADGES
   =================================================================== */

.badge {
  font-size: 0.6875rem;
  padding: 3px 8px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: var(--op-transition);
}

.badge-count {
  background: var(--op-primary);
  color: #ffffff;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
  line-height: 1.2;
}

.badge-count-warning {
  background: var(--op-warning);
}

.badge-count:empty,
.badge-count[data-count="0"] {
  background: var(--op-border);
  color: var(--op-text-light);
}

/* ===================================================================
   7. FORMULÁRIOS
   =================================================================== */

/* Campos compactos */
.atendimento-detalhe-content .form-control,
.atendimento-detalhe-content .form-select {
  width: 100%;
  transition: var(--op-transition);
}

.atendimento-detalhe-content .form-control-sm,
.atendimento-detalhe-content .form-select-sm {
  font-size: 0.8125rem;
  padding: var(--op-spacing-xs) var(--op-spacing-sm);
  height: calc(1.5em + 8px);
}

/* Labels */
.atendimento-detalhe-content .form-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--op-text-secondary);
  margin-bottom: var(--op-spacing-xs);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Readonly */
.form-control[readonly] {
  background-color: var(--op-bg-input);
  color: var(--op-text-secondary);
  cursor: not-allowed;
  border-color: var(--op-border);
}

/* Focus states */
.form-control:focus,
.form-select:focus {
  border-color: var(--op-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ===================================================================
   8. RESUMO (PENDENTES)
   =================================================================== */

.resumo-header {
  padding: 10px var(--op-spacing-md);
  border-bottom: 2px solid var(--op-border);
  margin-bottom: 10px;
  background: var(--op-bg-header);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.resumo-bloco {
  border-bottom: 1px solid #e9ecef;
  padding: 10px var(--op-spacing-md);
  background: var(--op-card);
}

.resumo-bloco:last-child {
  border-bottom: none;
}

.resumo-titulo {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--op-text);
  margin-bottom: var(--op-spacing-sm);
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.resumo-label {
  font-size: 0.6875rem;
  color: var(--op-text-muted);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 3px;
  letter-spacing: 0.3px;
}

.resumo-valor {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--op-text);
}

.resumo-linha {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 0.8125rem;
  border-bottom: 1px solid #f3f4f6;
}

.resumo-linha:last-child {
  border-bottom: none;
}

.resumo-linha span {
  color: var(--op-text-muted);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.resumo-linha strong {
  font-weight: 600;
  color: var(--op-text);
  text-align: right;
}

/* ===================================================================
   9. LISTAS (Interações e Subatendimentos)
   =================================================================== */

#listaInteracoes .card,
#listaSubAtendimentos .card {
  border: 1px solid var(--op-border);
  border-radius: 4px;
  margin-bottom: 8px;
  transition: var(--op-transition);
}

#listaInteracoes .card:hover {
  border-color: var(--op-primary);
  box-shadow: 0 1px 3px rgba(59, 130, 246, 0.1);
}

#listaInteracoes .card-body {
  padding: var(--op-spacing-sm) 10px;
}

#listaSubAtendimentos .card:hover {
  border-color: var(--op-warning);
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.1);
}

#listaSubAtendimentos .card-body {
  padding: 10px var(--op-spacing-md);
}

/* ===================================================================
   10. OFFCANVAS
   =================================================================== */

.offcanvas-end {
  width: min(600px, 90vw) !important;
}

.offcanvas-header {
  padding: var(--op-spacing-md) var(--op-spacing-lg);
}

.offcanvas-body {
  padding: var(--op-spacing-lg);
}

.offcanvas-footer {
  padding: var(--op-spacing-md) var(--op-spacing-lg);
}

/* ===================================================================
   11. SCROLLBAR CUSTOMIZADA
   =================================================================== */

.overflow-auto::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.overflow-auto::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.overflow-auto::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.overflow-auto::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ===================================================================
   12. UTILITIES
   =================================================================== */

.cursor-pointer {
  cursor: pointer;
  user-select: none;
}

.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===================================================================
   13. RESPONSIVIDADE
   =================================================================== */

/* Mobile */
@media (max-width: 768px) {
  #atendimentosSidebar {
    width: 100% !important;
    position: absolute;
    height: 100%;
    z-index: 1000;
  }
  
  .atendimento-detalhe-content {
    padding: var(--op-spacing-sm) var(--op-spacing-md);
  }
  
  #areaDetalhes .card-body {
    padding: 10px var(--op-spacing-md);
  }
  
  .atendimento-detalhe-content .row > [class*="col-"] {
    padding-left: 6px;
    padding-right: 6px;
  }
  
  .card-header-operador {
    padding: 6px 10px;
  }
  
  .header-title {
    font-size: 0.75rem;
  }
  
  .btn-toggle-operador,
  .btn-action-operador {
    width: 24px;
    height: 24px;
  }
  
  .btn-toggle-operador i,
  .btn-action-operador i {
    font-size: 0.875rem;
  }
}

/* Desktop Grande */
@media (min-width: 1400px) {
  .atendimento-detalhe-content {
    padding: var(--op-spacing-md) 24px;
  }
  
  #areaDetalhes .card-body {
    padding: var(--op-spacing-lg) 20px;
  }
}

/* Desktop Extra Grande */
@media (min-width: 1600px) {
  .atendimento-detalhe-content .col-md-6 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
  
  .atendimento-detalhe-content .col-md-4 {
    flex: 0 0 25%;
    max-width: 25%;
  }
}


