html {
  font-size: 14px;
}

/* ── Badge correo no leído (navbar) ────────────── */
#mailNavLink { padding: 8px 12px; }
#mailNavLink .navbar-badge { top: 4px; right: 4px; }

@keyframes mail-pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.25); }
    100% { transform: scale(1); }
}
.mail-has-unread .fa-envelope {
    animation: mail-pulse 2s ease-in-out infinite;
    color: #dc3545;
}

/* ── Barra de búsqueda / filtros estilo Odoo ─── */
.ok-searchbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.ok-search-left  { position: relative; flex: 1; max-width: 600px; }
.ok-search-right { display: flex; align-items: center; flex-shrink: 0; }

.ok-search-box {
  display: flex;
  align-items: center;
  border: 2px solid #dee2e6;
  border-radius: 6px;
  padding: 4px 8px;
  background: #fff;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 36px;
  cursor: text;
}
.ok-search-box:focus-within { border-color: #00a09d; }
.ok-search-icon { color: #aaa; font-size: .85rem; flex-shrink: 0; }
.ok-search-input {
  border: none;
  outline: none;
  flex: 1;
  min-width: 120px;
  font-size: .87rem;
  padding: 0 4px;
}
.ok-search-dropdown-btn {
  background: none;
  border: none;
  color: #aaa;
  padding: 0 4px;
  cursor: pointer;
  flex-shrink: 0;
}
.ok-search-dropdown-btn:hover { color: #00a09d; }

/* Chips de filtros activos */
.ok-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #875a7b;
  color: #fff;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: .77rem;
  font-weight: 500;
}
.ok-chip-remove { cursor: pointer; opacity: .8; }
.ok-chip-remove:hover { opacity: 1; }

/* Panel de filtros desplegable */
.ok-filter-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 1050;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
  display: flex;
  gap: 0;
  min-width: 500px;
}
.ok-fp-col {
  padding: 12px 16px;
  min-width: 160px;
  border-right: 1px solid #f0f0f0;
}
.ok-fp-col:last-child { border-right: none; }
.ok-fp-title {
  font-size: .78rem;
  font-weight: 700;
  color: #875a7b;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 8px;
}
.ok-fp-item {
  font-size: .85rem;
  color: #00a09d;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: background .1s;
}
.ok-fp-item:hover { background: #f0fffe; }
.ok-fp-disabled { color: #bbb !important; cursor: default !important; }
.ok-fp-disabled:hover { background: none !important; }
.ok-fp-sep { height: 1px; background: #f0f0f0; margin: 6px 0; }

/* ── Facet search dropdown ───────────────────── */
.ok-facet-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 1060;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,.13);
  min-width: 380px;
  max-height: 400px;
  overflow-y: auto;
}
.ok-facet-loading { padding: 12px 16px; color: #888; font-size: .85rem; }
.ok-facet-row {
  padding: 8px 16px;
  font-size: .85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background .1s;
  border-bottom: 1px solid #f5f5f5;
}
.ok-facet-row:last-child { border-bottom: none; }
.ok-facet-main:hover { background: #f0fffe; }
.ok-facet-sug { padding-left: 32px; color: #00a09d; font-size: .83rem; }
.ok-facet-sug:hover { background: #f0fffe; }
.ok-facet-icon { color: #875a7b; font-size: .8rem; width: 14px; text-align: center; }
.ok-facet-sug-icon { color: #ccc; font-size: .75rem; width: 14px; }

/* Caret expandible ▶ */
.ok-facet-caret {
  color: #aaa;
  font-size: .75rem;
  width: 14px;
  text-align: center;
  transition: transform .15s;
  flex-shrink: 0;
}
.ok-facet-caret-open { transform: rotate(90deg); color: #875a7b; }
.ok-facet-expandable { cursor: pointer; }
.ok-facet-expandable:hover { background: #faf8fc; }

/* Sub-sugerencias indentadas */
.ok-facet-sugs .ok-facet-sug { padding-left: 32px; color: #00a09d; font-size: .83rem; }
.ok-facet-sugs .ok-facet-sug:hover { background: #f0fffe; }

/* "Filtro personalizado..." */
.ok-facet-custom {
  padding: 9px 16px;
  font-size: .83rem;
  color: #00a09d;
  cursor: pointer;
  border-top: 1px solid #f0f0f0;
  margin-top: 2px;
}
.ok-facet-custom:hover { background: #f0fffe; text-decoration: underline; }

/* ── Stepper tipo Odoo ───────────────────────── */
.ticket-stepper-wrap { overflow-x: auto; }
.ticket-stepper {
  display: flex;
  gap: 0;
  flex-wrap: nowrap;
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 0;
  margin-bottom: 0;
}
.stepper-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 18px 8px 24px;
  font-size: .82rem;
  cursor: pointer;
  color: #666;
  position: relative;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.stepper-item:hover:not(.stepper-current) {
  color: #333;
  border-bottom-color: #aaa;
}
.stepper-current {
  color: #00a09d;
  font-weight: 700;
  border-bottom: 3px solid var(--etapa-color, #00a09d);
  cursor: default;
}
.stepper-pending { color: #999; }
.stepper-time {
  font-size: .75rem;
  color: #aaa;
  font-weight: 400;
}
.stepper-loading { opacity: .5; }

/* Avatar estilo Odoo */
.odoo-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  color: #fff;
  font-weight: 600;
  font-size: .8rem;
  flex-shrink: 0;
}
.nota-content img, .summ-content img { max-width: 100%; max-height: 300px; height: auto; display: block; border-radius: 4px; }
.nota-content { overflow-wrap: break-word; word-break: break-word; overflow: hidden; }

/* Kanban "Todos" — sección por equipo */
.ok-team-section {
  width: 100%;
  margin-bottom: 28px;
}
.ok-team-header-bar {
  display: flex;
  align-items: center;
  padding: 6px 0 8px 0;
  border-bottom: 2px solid #dee2e6;
  margin-bottom: 12px;
}
.ok-team-cols {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  align-items: flex-start;
  padding-bottom: 8px;
}

/* ── Kanban estilo Odoo ──────────────────────── */
.ok-col {
  min-width: 280px;
  max-width: 295px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
.ok-col-header {
  padding: 0 0 6px 0;
  margin-bottom: 6px;
}
.ok-col-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.ok-col-title {
  font-weight: 700;
  font-size: .9rem;
  color: #212529;
}
.ok-col-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ok-col-count {
  font-size: .78rem;
  color: #888;
  font-weight: 600;
}
.ok-col-add {
  color: #875a7b;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1;
}
.ok-col-add:hover { color: #5d3d55; }
.ok-col-progress {
  height: 4px;
  background: #f0f0f0;
  border-radius: 2px;
  overflow: hidden;
}
.ok-col-progress-bar {
  height: 100%;
  border-radius: 2px;
  transition: width .4s;
}
.ok-col-body {
  flex: 1;
  min-height: 100px;
  max-height: 76vh;
  overflow-y: auto;
}

/* Tarjeta Odoo */
.ok-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: box-shadow .15s, transform .1s;
  position: relative;
}
.ok-card:hover {
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
  transform: translateY(-1px);
}
.ok-card-title {
  font-weight: 600;
  font-size: .85rem;
  color: #1a1a1a;
  line-height: 1.35;
  margin-bottom: 3px;
}
.ok-card-num {
  font-weight: 400;
  color: #888;
  font-size: .8rem;
}
.ok-card-cliente {
  font-size: .78rem;
  color: #888;
  margin-bottom: 5px;
}
.ok-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-bottom: 6px;
}
.ok-tag {
  padding: 2px 8px;
  border-radius: 20px;
  font-size: .73rem;
  color: #fff;
  font-weight: 500;
}
.ok-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}
.ok-card-footer-left {
  display: flex;
  align-items: center;
  gap: 2px;
}
.ok-card-footer-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ok-clock { color: #bbb; font-size: .78rem; }
.ok-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  font-size: .75rem;
}
.ok-done-circle {
  display: inline-block;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid #ccc;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.ok-done-circle:hover { border-color: #5cb85c; background: #5cb85c22; }
.ok-dias-badge {
  font-size: .7rem;
  padding: 1px 5px;
  border-radius: 10px;
  margin-left: 4px;
  font-weight: 600;
}
.ok-dias-badge.danger { background:#fde8e8; color:#d9534f; }
.ok-dias-badge.warn   { background:#fff3cd; color:#d97706; }
.ok-ghost { opacity:.3; background:#f0f0f0 !important; }
.ok-col-collapsed { min-width: 48px !important; max-width: 48px !important; }
.ok-col-collapsed .ok-col-body,
.ok-col-collapsed .ok-col-footer,
.ok-col-collapsed .ok-col-progress,
.ok-col-collapsed .ok-col-count,
.ok-col-collapsed .ok-col-add { display: none !important; }
.ok-col-collapsed .ok-col-title { writing-mode: vertical-rl; text-orientation: mixed; font-size:.78rem; padding:8px 0; display:block; overflow:hidden; max-height:200px; }

/* ── Kanban (antiguo, por compatibilidad) ─────── */
.kanban-col {
  min-width: 230px;
  max-width: 250px;
  flex-shrink: 0;
  background: #f4f6f9;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
}

.kanban-col-header {
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border-radius: 6px 6px 0 0;
}

.kanban-col-title {
  font-weight: 600;
  font-size: .82rem;
  color: #333;
}

.kanban-col-body {
  flex: 1;
  min-height: 80px;
  max-height: 72vh;
  overflow-y: auto;
  padding: 6px;
}

.kanban-col-footer {
  padding: 4px 6px;
  border-top: 1px solid #dee2e6;
  background: #fff;
  border-radius: 0 0 6px 6px;
}

.kanban-card {
  background: #fff;
  border-radius: 5px;
  padding: 8px 10px;
  margin-bottom: 6px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  transition: box-shadow .15s, transform .1s;
  font-size: .82rem;
}
.kanban-card:hover {
  box-shadow: 0 3px 10px rgba(0,0,0,.15);
  transform: translateY(-1px);
}
.kanban-card:active { cursor: grabbing; }
.kanban-card-title {
  font-weight: 600;
  font-size: .83rem;
  line-height: 1.3;
  color: #333;
}
.kanban-ghost {
  opacity: .3;
  background: #e3e7ed !important;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}