/* =====================================================
   EasyCars Chat CRM - chat.css
   ===================================================== */

:root {
  --chat-bg: #efeae2;
  --chat-sidebar-bg: #fff;
  --chat-bubble-in: #fff;
  --chat-bubble-out: #d9fdd3;
  --chat-bubble-internal: #fff3cd;
  --chat-primary: #ff6b35;
  --chat-primary-dark: #e55a25;
  --chat-header-bg: #f0f2f5;
  --chat-input-bg: #f0f2f5;
  --chat-hover: #f5f6f6;
  --chat-active: #e9ecef;
  --chat-online: #25d366;
  --chat-away: #ffc107;
  --chat-offline: #6c757d;
  --chat-border: #e0e0e0;
  --chat-text-muted: #667781;
  --chat-shadow: rgba(0,0,0,0.08);
}

/* === GLOBAL === */
* { box-sizing: border-box; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 0.875rem;
  overflow: hidden;
  height: 100vh;
  margin: 0;
}

/* === NAVBAR === */
.navbar-chat {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 1000;
}

.navbar-chat .navbar-brand {
  font-size: 1rem;
  letter-spacing: 0.5px;
}

.navbar-search .form-control::placeholder { color: rgba(255,255,255,0.4); }
.navbar-search .form-control:focus { box-shadow: none; border-color: rgba(255,107,53,0.5); }
.navbar-search .input-group-text { border-radius: 0.25rem 0 0 0.25rem; }

.nav-chat-link {
  color: rgba(255,255,255,0.75) !important;
  font-size: 0.82rem;
  transition: all 0.15s;
}
.nav-chat-link:hover, .nav-chat-link.active {
  color: #fff !important;
  background: rgba(255,255,255,0.12) !important;
}

.status-selector {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 0.8rem;
  transition: background 0.15s;
}
.status-selector:hover { background: rgba(255,255,255,0.18); color: #fff; }

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.35); }

/* === STATUS DOTS === */
.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot-sm { width: 8px; height: 8px; }
.status-dot-lg { width: 13px; height: 13px; }
.status-disponible { background: var(--chat-online); }
.status-ocupado { background: #dc3545; }
.status-ausente { background: var(--chat-away); }
.status-offline { background: var(--chat-offline); }

/* === AVATAR === */
.avatar-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
  font-size: 0.75rem;
  background: var(--chat-primary);
  overflow: hidden;
}
.avatar-circle img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-sm { width: 32px; height: 32px; font-size: 0.7rem; }
.avatar-md { width: 40px; height: 40px; font-size: 0.85rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1rem; }
.avatar-xl { width: 80px; height: 80px; font-size: 1.4rem; }

.avatar-colors-0 { background: #e53935; }
.avatar-colors-1 { background: #8e24aa; }
.avatar-colors-2 { background: #1e88e5; }
.avatar-colors-3 { background: #00897b; }
.avatar-colors-4 { background: #43a047; }
.avatar-colors-5 { background: #f4511e; }
.avatar-colors-6 { background: #6d4c41; }
.avatar-colors-7 { background: #546e7a; }

/* === SIDEBAR === */
#sidebar {
  transition: width 0.2s;
  flex-shrink: 0;
}

.sidebar-tabs .nav-link {
  font-size: 0.78rem;
  padding: 0.25rem 0.4rem;
  color: var(--chat-text-muted);
  border-radius: 0.25rem;
  transition: all 0.15s;
}
.sidebar-tabs .nav-link:hover { background: var(--chat-hover); color: #333; }
.sidebar-tabs .nav-link.active {
  background: var(--chat-primary);
  color: #fff;
}
.sidebar-tabs .nav-link .badge { font-size: 0.65rem; }

/* === TICKET CARD === */
.ticket-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--chat-border);
  cursor: pointer;
  transition: background 0.1s;
  position: relative;
  background: var(--chat-sidebar-bg);
}

.ticket-card:hover { background: var(--chat-hover); }
.ticket-card.active { background: var(--chat-active); }
.ticket-card.unread { background: #f0f7ff; }
.ticket-card.unread:hover { background: #e8f3ff; }

.ticket-card-body { flex: 1; min-width: 0; }

.ticket-card-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 50px);
}

.ticket-card-preview {
  font-size: 0.78rem;
  color: var(--chat-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.ticket-card-time {
  font-size: 0.7rem;
  color: var(--chat-text-muted);
  white-space: nowrap;
  position: absolute;
  top: 10px;
  right: 14px;
}

.unread-badge {
  background: var(--chat-primary);
  color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 0.65rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ticket-card .channel-icon {
  font-size: 0.75rem;
  color: var(--chat-text-muted);
}

.ticket-card .queue-badge {
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 10px;
  background: #e9ecef;
  color: #555;
  white-space: nowrap;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* === PRIORITY BADGE === */
.priority-badge {
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 600;
}
.priority-baja { background: #e3f2fd; color: #1565c0; }
.priority-normal { background: #e8f5e9; color: #2e7d32; }
.priority-alta { background: #fff3e0; color: #e65100; }
.priority-urgente { background: #fce4ec; color: #c62828; }

/* === STATUS BADGE === */
.status-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}
.status-abierto { background: #e3f2fd; color: #1565c0; }
.status-pendiente { background: #fff9c4; color: #f57f17; }
.status-resuelto { background: #e8f5e9; color: #2e7d32; }
.status-cerrado { background: #eceff1; color: #546e7a; }

/* === CHAT HEADER === */
#chatHeader {
  gap: 12px;
}

.chat-header-contact-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: #111;
}
.chat-header-sub {
  font-size: 0.75rem;
  color: var(--chat-text-muted);
}

/* === MESSAGES === */
#messagesContainer {
  background: var(--chat-bg);
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c5b9a8' fill-opacity='0.15'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.message-date-divider {
  text-align: center;
  margin: 12px 0;
}
.message-date-divider span {
  background: rgba(225, 220, 209, 0.8);
  color: #667781;
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 8px;
  font-weight: 500;
}

.message-row {
  display: flex;
  margin-bottom: 2px;
  padding: 1px 4px;
}
.message-row.outgoing { justify-content: flex-end; }
.message-row.incoming { justify-content: flex-start; }
.message-row.system { justify-content: center; }
.message-row.internal { justify-content: flex-end; }

.message-row.first-in-group { margin-top: 6px; }

/* Bubbles */
.message-bubble {
  max-width: 65%;
  min-width: 80px;
  padding: 6px 9px 4px;
  border-radius: 8px;
  word-wrap: break-word;
  word-break: break-word;
  position: relative;
  box-shadow: 0 1px 1px var(--chat-shadow);
  font-size: 0.84rem;
  line-height: 1.4;
}

.bubble-incoming {
  background: var(--chat-bubble-in);
  border-top-left-radius: 2px;
}
.bubble-incoming.first-bubble { border-top-left-radius: 8px; }

.bubble-outgoing {
  background: var(--chat-bubble-out);
  border-top-right-radius: 2px;
}
.bubble-outgoing.first-bubble { border-top-right-radius: 8px; }

.bubble-internal {
  background: var(--chat-bubble-internal);
  border: 1px solid #ffc107;
  border-top-right-radius: 2px;
}
.bubble-internal.first-bubble { border-top-right-radius: 8px; }

.bubble-system {
  background: rgba(225, 220, 209, 0.8);
  color: #667781;
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 8px;
  max-width: 80%;
  text-align: center;
  box-shadow: none;
}

/* Message tail (triangle) */
.bubble-incoming::before {
  content: '';
  position: absolute;
  top: 0;
  left: -8px;
  width: 0;
  height: 0;
  border-top: 8px solid var(--chat-bubble-in);
  border-left: 8px solid transparent;
}
.bubble-incoming.not-first::before { display: none; }

.bubble-outgoing::after {
  content: '';
  position: absolute;
  top: 0;
  right: -8px;
  width: 0;
  height: 0;
  border-top: 8px solid var(--chat-bubble-out);
  border-right: 8px solid transparent;
}
.bubble-outgoing.not-first::after { display: none; }

/* Message footer */
.message-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  margin-top: 2px;
}

.message-time {
  font-size: 0.67rem;
  color: var(--chat-text-muted);
  white-space: nowrap;
}

.message-status {
  font-size: 0.72rem;
}
.status-sent { color: var(--chat-text-muted); }
.status-delivered { color: var(--chat-text-muted); }
.status-read { color: #53bdeb; }
.status-failed { color: #dc3545; }

/* Sender name in bubble */
.bubble-sender-name {
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--chat-primary);
}

/* Internal note icon */
.note-icon {
  font-size: 0.7rem;
  color: #856404;
  margin-right: 3px;
}

/* === MEDIA IN BUBBLES === */
.message-image {
  max-width: 300px;
  max-height: 250px;
  border-radius: 6px;
  cursor: pointer;
  display: block;
  object-fit: cover;
  transition: opacity 0.15s;
}
.message-image:hover { opacity: 0.9; }

.message-audio {
  max-width: 280px;
  width: 100%;
  margin: 2px 0;
}
.message-audio audio {
  width: 100%;
  height: 36px;
  outline: none;
}

.message-video {
  max-width: 300px;
  border-radius: 6px;
  display: block;
}

.message-document {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0,0,0,0.04);
  border-radius: 6px;
  padding: 8px 10px;
  min-width: 220px;
  max-width: 280px;
}
.message-document .doc-icon {
  font-size: 1.8rem;
  color: var(--chat-primary);
  flex-shrink: 0;
}
.message-document .doc-info {
  flex: 1;
  min-width: 0;
}
.message-document .doc-name {
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.message-document .doc-download {
  font-size: 0.7rem;
  color: var(--chat-primary);
  text-decoration: none;
}
.message-document .doc-download:hover { text-decoration: underline; }

.message-sticker img { max-width: 150px; max-height: 150px; }

.message-location a {
  color: var(--chat-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.message-location a:hover { text-decoration: underline; }

.message-contact-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

/* === TYPING INDICATOR === */
.typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--chat-bubble-in);
  padding: 8px 14px;
  border-radius: 18px;
  margin: 4px 4px;
  box-shadow: 0 1px 1px var(--chat-shadow);
}
.typing-indicator span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #aaa;
  animation: typing-bounce 1.2s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* === INPUT AREA === */
.chat-input-area {
  background: var(--chat-input-bg);
}

.chat-input-area textarea {
  background: #fff;
  border: 1px solid var(--chat-border);
  border-radius: 22px;
  padding: 8px 14px;
  font-size: 0.88rem;
  line-height: 1.4;
  transition: all 0.15s;
}
.chat-input-area textarea:focus {
  outline: none;
  box-shadow: none;
  border-color: #ccc;
}
.note-mode textarea {
  background: #fffde7;
  border-color: #ffc107;
}

.note-banner {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.78rem;
  color: #856404;
  font-weight: 500;
}

.btn-chat-send {
  background: var(--chat-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-chat-send:hover { background: var(--chat-primary-dark); color: #fff; }

.btn-chat-primary {
  background: var(--chat-primary);
  color: #fff;
  border: none;
}
.btn-chat-primary:hover { background: var(--chat-primary-dark); color: #fff; }

/* === QUICK REPLY DROPDOWN === */
.quick-reply-dropdown {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--chat-border);
  border-radius: 8px;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.12);
  z-index: 100;
  max-height: 250px;
  overflow-y: auto;
  margin-bottom: 4px;
}
.quick-reply-item {
  padding: 8px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.1s;
}
.quick-reply-item:hover { background: var(--chat-hover); }
.quick-reply-item:last-child { border-bottom: none; }
.quick-reply-title {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--chat-primary);
}
.quick-reply-text {
  font-size: 0.78rem;
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* === INFO PANEL === */
#infoPanel .nav-link {
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  color: var(--chat-text-muted);
  border-radius: 0.25rem;
}
#infoPanel .nav-link.active {
  background: var(--chat-primary);
  color: #fff;
}

.panel-section {
  padding: 16px;
  border-bottom: 1px solid var(--chat-border);
}
.panel-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--chat-text-muted);
  margin-bottom: 10px;
}

.editable-field {
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: background 0.1s;
  font-size: 0.85rem;
}
.editable-field:hover { background: var(--chat-hover); }
.editable-field-placeholder { color: #aaa; font-style: italic; }

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 500;
  margin: 2px;
}
.tag-chip .remove-tag {
  cursor: pointer;
  opacity: 0.6;
  font-size: 0.68rem;
}
.tag-chip .remove-tag:hover { opacity: 1; }

/* === LIGHTBOX === */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

/* === ADMIN VIEWS === */
.agent-card {
  border-radius: 12px;
  border: 1px solid var(--chat-border);
  transition: box-shadow 0.15s, transform 0.15s;
  overflow: hidden;
  background: #fff;
}
.agent-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); transform: translateY(-2px); }

.agent-card-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 20px;
  text-align: center;
  position: relative;
}
.agent-card .agent-type-badge {
  position: absolute;
  top: 10px;
  right: 10px;
}
.agent-card .agent-name { font-weight: 700; margin-top: 8px; font-size: 0.95rem; }
.agent-card .agent-meta { font-size: 0.78rem; color: var(--chat-text-muted); }
.agent-card-body { padding: 14px; }

.create-agent-card {
  border: 2px dashed var(--chat-border);
  background: transparent !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  cursor: pointer;
  transition: all 0.15s;
  border-radius: 12px;
}
.create-agent-card:hover {
  border-color: var(--chat-primary);
  color: var(--chat-primary);
  background: rgba(255,107,53,0.04) !important;
}

/* Flow Table */
.flow-table { border: none; }
.flow-table th { background: var(--chat-header-bg); font-size: 0.8rem; font-weight: 600; border: none; }
.flow-table td { font-size: 0.84rem; vertical-align: middle; border-color: var(--chat-border); }

/* Step card in flow editor */
.step-card {
  background: #f8f9fa;
  border: 1px solid var(--chat-border);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
}
.step-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.step-type-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}
.step-enviar_mensaje { background: #e3f2fd; color: #1565c0; }
.step-esperar_respuesta { background: #e8f5e9; color: #2e7d32; }
.step-condicion { background: #fce4ec; color: #c62828; }
.step-asignar_agente { background: #fff3e0; color: #e65100; }
.step-asignar_cola { background: #f3e5f5; color: #6a1b9a; }
.step-webhook { background: #e0f2f1; color: #00695c; }
.step-delay { background: #fff8e1; color: #f57f17; }
.step-transferir { background: #fbe9e7; color: #bf360c; }

/* Stats cards */
.stat-card {
  border-radius: 10px;
  padding: 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  right: -15px;
  bottom: -15px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
}
.stat-card .stat-icon {
  font-size: 2rem;
  opacity: 0.85;
}
.stat-card .stat-value { font-size: 2rem; font-weight: 700; line-height: 1; }
.stat-card .stat-label { font-size: 0.8rem; opacity: 0.85; margin-top: 4px; }
.stat-blue { background: linear-gradient(135deg, #1976d2, #42a5f5); }
.stat-orange { background: linear-gradient(135deg, #e65100, #ff9800); }
.stat-green { background: linear-gradient(135deg, #2e7d32, #66bb6a); }
.stat-purple { background: linear-gradient(135deg, #6a1b9a, #ab47bc); }

/* Settings accordion */
.settings-accordion .accordion-button {
  font-weight: 600;
  font-size: 0.88rem;
  background: var(--chat-header-bg);
}
.settings-accordion .accordion-button:not(.collapsed) {
  background: #fff;
  color: var(--chat-primary);
  box-shadow: none;
}
.settings-accordion .accordion-button::after {
  filter: none;
}

/* Quick replies and tags tables */
.qr-table th, .tags-table th { font-size: 0.78rem; background: var(--chat-header-bg); }
.qr-table td, .tags-table td { font-size: 0.82rem; }

/* === HISTORY ITEM === */
.ticket-history-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--chat-border);
  font-size: 0.8rem;
}
.ticket-history-item:last-child { border-bottom: none; }

/* === FORM CONTROLS SMALL === */
.form-select-xs {
  font-size: 0.78rem;
  padding: 0.15rem 1.5rem 0.15rem 0.4rem;
  height: auto;
}

/* === TOOL CHECKBOX === */
.tool-check-label {
  font-size: 0.82rem;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--chat-border);
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tool-check-label:hover { background: var(--chat-hover); }
input[type=checkbox]:checked + .tool-check-label {
  background: rgba(255,107,53,0.08);
  border-color: var(--chat-primary);
  color: var(--chat-primary);
}

/* === RESPONSIVE ADJUSTMENTS === */
@media (max-width: 992px) {
  #infoPanel { display: none !important; }
  #sidebar { width: 280px !important; min-width: 280px !important; }
}

@media (max-width: 768px) {
  #sidebar { width: 100% !important; min-width: 100% !important; }
  #chatWindow { display: none; }
  .navbar-search { display: none !important; }
}

/* === MISC === */
.link-preview {
  background: rgba(0,0,0,0.04);
  border-left: 3px solid var(--chat-primary);
  padding: 6px 8px;
  border-radius: 0 6px 6px 0;
  font-size: 0.78rem;
  margin-top: 4px;
}

.color-swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-block;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: transform 0.1s;
}
.color-swatch:hover { transform: scale(1.2); }
.color-swatch.selected { box-shadow: 0 0 0 2px var(--chat-primary); }

.day-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--chat-border);
}
.day-toggle:last-child { border-bottom: none; }

.temperatura-value {
  font-weight: 600;
  color: var(--chat-primary);
  min-width: 30px;
  text-align: center;
}

/* Transition for panel open/close */
#infoPanel {
  transition: width 0.2s;
}

/* Linkify links */
.msg-text a { color: var(--chat-primary); text-decoration: none; }
.msg-text a:hover { text-decoration: underline; }

/* Load more button */
#loadMoreContainer .btn { border-radius: 16px; font-size: 0.8rem; }

/* Filter panel */
#filterPanel { font-size: 0.82rem; }
