:root {
  /* ── Paleta del chatbot ── */
  --navy:         #1e3a5f;
  --navy-mid:     #14335c;
  --navy-light:   #0f386144;
  --navy-dark:    #1a2f4a;

  --gold:         #ffbd23;
  --gold-light:   #ecb935;



  --bg:           #456ea7;        /* fondo general */
  --surface:      #549AC5;  /* cards y tablas */
  --surface2:     #526283; 

  --bg-input: white;
  --fondo-focus-cambiar: #a8bbd4;
  --barra-cambiar: #FF85C0;
  --barra-cambiar-fin: #ff5eac;




  --border:       #000000;

  --text:         #0f2044;
  --text-muted:   #0f2044;
  --text-light:   #0f2044;

  --success:      #1d7a4a;
  --success-bg:   #e3f5ec;
  --danger:       #b53030;
  --danger-bg:    #ecb2b2;
  --warning:      #8a5f0a;
  --warning-bg:   #fef4d9;
  --info:         #1a5fa8;
  --info-bg:      #e6f0fb;

  --radius:       10px;
  --radius-sm:    6px;
  --shadow:       0 2px 12px rgba(15,32,68,0.07);
}

::placeholder {
    color: #000000;
    opacity: 0.6; /* Evita que algunos navegadores lo muestren más transparente */
    font-style: italic;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  min-height: 100dvh;
}

/* ─── LOGIN ─── */
#login-screen {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #1a2f4a 0%, #1e4060 50%, #1e3a5f 100%);
  position: relative;
  overflow: hidden;
}

#login-screen::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  border: 80px solid rgba(200,152,42,0.08);
  top: -200px; right: -200px;
}

#login-screen::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  border: 60px solid rgba(200,152,42,0.05);
  bottom: -150px; left: -100px;
}

.login-box {
  background: var(--surface);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 380px;
  position: relative;
  z-index: 1;
  box-shadow: 0 20px 60px rgba(15,32,68,0.3);
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo .escudo {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--navy-mid), var(--navy-light));
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 24px;
}

.login-logo h1 {
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.4;
}

.login-logo p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-group { margin-bottom: 1rem; }

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--bg-input);
  transition: border-color 0.15s;
  outline: none;
}

.form-group input:focus {
  border-color: var(--navy-mid);
  background: var(--fondo-focus-cambiar);
}

.btn-primary {
  width: 100%;
  padding: 11px;
  background: linear-gradient(135deg, var(--navy-mid), var(--navy-light));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
  margin-top: 0.5rem;
}

.btn-primary:hover { opacity: 0.9; }

.error-msg {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-top: 12px;
  display: none;
}

/* ─── LAYOUT ─── */
#app { display: none; min-height: 100dvh; }

.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: 220px;
  background: linear-gradient(180deg, var(--navy-dark) 0%, var(--navy) 100%);
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.sidebar-brand {
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-brand .brand-name {
  font-size: 13px;
  font-weight: 600;
  color: white;
  line-height: 1.3;
}

.sidebar-brand .brand-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  margin-top: 2px;
}

.sidebar-brand .brand-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  margin-top: 8px;
  letter-spacing: 0.03em;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
}

.nav-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.3);
  padding: 0.75rem 1.25rem 0.25rem;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 1.25rem;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 400;
  border-left: 3px solid transparent;
  transition: all 0.15s;
  user-select: none;
}

.nav-item:hover { color: white; background: rgba(255,255,255,0.06); }

.nav-item.active {
  color: white;
  border-left-color: var(--gold);
  background: rgba(200,152,42,0.12);
  font-weight: 500;
}

.nav-item .nav-icon { font-size: 16px; flex-shrink: 0; }

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  flex-shrink: 0;
}

.user-name { font-size: 13px; color: white; font-weight: 500; }
.user-role { font-size: 11px; color: rgba(255,255,255,0.4); }

.btn-logout {
  width: 100%;
  padding: 8px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-logout:hover { background: rgba(255,255,255,0.12); color: white; }

/* ─── TOPBAR ─── */
.main {
  margin-left: 220px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  width: calc(100% - 220px);
}

.topbar {
  background: linear-gradient(180deg, var(--navy-dark), var(--navy));
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  left: 220px;
  bottom: 0;
  right: 0;
  top: 0;
  z-index: 1000;
}

.topbar-title {
  font-size: 16px;
  font-weight: 600;
  color: white;
}

.topbar-actions { display: flex; align-items: center; gap: 10px; }

.topbar-actions span {
  color: rgba(255,255,255,0.45) !important;
}

.content { 
  padding: calc(56px + 2rem) 2rem 2rem;
  flex: 1; 
  width: 100%; 
}

/* ─── PAGES ─── */
.page { display: none; }
.page.active { display: block; }

/* ─── METRIC CARDS ─── */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 2rem;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--navy-dark);
  transition: transform 0.15s, box-shadow 0.15s;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15,32,68,0.12);
}

.metric-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.metric-value {
  font-size: 28px;
  font-weight: 300;
  color: var(--navy);
  line-height: 1;
  font-family: 'DM Mono', monospace;
}

.metric-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

.metric-card.gold  { border-top-color: var(--gold); }
.metric-card.gold  .metric-value { color: var(--gold); }
.metric-card.success { border-top-color: var(--success); }
.metric-card.success .metric-value { color: var(--success); }
.metric-card.danger  { border-top-color: var(--danger); }
.metric-card.danger  .metric-value { color: var(--danger); }

/* ─── SECTION CARD ─── */
.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.section-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, rgba(30,58,95,0.04), transparent);
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* ─── TABLE ─── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table { width: 100%; table-layout: auto; border-collapse: collapse; }

th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: white;
  background: linear-gradient(135deg, var(--navy-mid), var(--navy-light));
  border-bottom: 2px solid var(--navy-mid);
  white-space: nowrap;
}

td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(74,127,181,0.05); }

/* ─── MOBILE TABLE: card layout ─── */
@media (max-width: 600px) {
  /* Ocultar headers en mobile */
  .table-wrap thead { display: none; }

  .table-wrap table,
  .table-wrap tbody,
  .table-wrap tr {
    display: block;
    width: 100%;
  }

  .table-wrap{
    padding-top: 30px;
  }

  .section-card{
    border: 0;
    background-color: transparent;
  }

  .table-wrap tr {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    padding: 10px 12px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .table-wrap tr:hover { background: var(--surface); }

  .table-wrap td {
    display: block;
    padding: 8px 0;
  }

  /* Etiqueta antes de cada celda via data-label */
  .table-wrap td::before {
    content: attr(data-label);
    display: block;

    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);

    margin-bottom: 3px;
  }

  .table-wrap td:last-child{
    border-bottom: 0;
  }
}

/* ─── BADGES ─── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-info    { background: var(--info-bg);    color: var(--info); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-navy    { background: rgba(0, 0, 0, 0.15); color: black; }

/* ─── ACTION BUTTONS ─── */
.action-btns { display: flex; gap: 6px; align-items: center; }

.btn-icon {
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.15s;
}

.btn-icon:hover { background: var(--danger-bg); color: var(--text); border-color: #b0b8d0; }
.btn-icon.danger:hover { background: var(--danger-bg); color: var(--danger); border-color: #e0aaaa; }
.btn-icon.success:hover { background: var(--success-bg); color: var(--success); border-color: #99d9bb; }

/* ─── PAGINATION ─── */
.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 1.25rem;
  border-top: 1px solid var(--border);
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.pag-info { font-size: 12px; color: var(--text-muted); }
.pag-controls { display: flex; gap: 4px; flex-wrap: wrap; }

.pag-btn {
  padding: 5px 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
  transition: all 0.12s;
}

.pag-btn:hover { background: var(--surface2); }
.pag-btn.active { background: var(--navy-mid); color: white; border-color: var(--navy-mid); }
.pag-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ─── TOOLBAR ─── */
.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.search-input {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--bg-input);
  outline: none;
  transition: border-color 0.15s;
}

.search-input:focus { border-color: var(--navy-mid); background: var(--fondo-focus-cambiar); }

select.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--bg-input);
  outline: none;
  cursor: pointer;

  &:focus{
    background: var(--fondo-focus-cambiar);
  }
}

.btn-add {
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--navy-mid), var(--navy-light));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.btn-add:hover { opacity: 0.9; }

/* ─── MODAL ─── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,32,68,0.55);
  backdrop-filter: blur(2px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border-radius: var(--radius);
  width: 100%;
  max-width: 520px;
  max-height: 90dvh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(15,32,68,0.25);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, rgba(30,58,95,0.05), transparent);
}

.modal-title { font-size: 15px; font-weight: 600; color: var(--text); }

.modal-close {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--bg-input);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-muted);
  transition: all 0.12s;
}

.modal-close:hover { background: var(--danger-bg); color: var(--danger); border-color: #e0aaaa; }

.modal-body { padding: 1.5rem; }

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.modal-body .form-group label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 6px;
}

.modal-body .form-group input,
.modal-body .form-group textarea,
.modal-body .form-group select {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text);
  background: var(--bg-input);
  outline: none;
  transition: border-color 0.15s;
}

.modal-body .form-group input:focus,
.modal-body .form-group textarea:focus,
.modal-body .form-group select:focus {
  border-color: var(--navy-mid);
  background: var(--fondo-focus-cambiar);
}

.modal-body .form-group textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.5;
}

.btn-cancel {
  padding: 8px 18px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: var(--bg-input);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.12s;
}

.btn-cancel:hover { background: var(--fondo-focus-cambiar); color: var(--text); }

.btn-save {
  padding: 8px 20px;
  background: linear-gradient(135deg, var(--navy-mid), var(--navy-light));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.12s;
}

.btn-save:hover { opacity: 0.9; }

.btn-danger {
  padding: 8px 18px;
  background: var(--danger);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s;
}

.btn-danger:hover { background: #8f2020; }

/* ─── TOAST ─── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}

.toast {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  max-width: 300px;
  animation: slideIn 0.2s ease;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.success { background: var(--success-bg); color: var(--success); border: 1px solid #9dcfc0; }
.toast.error   { background: var(--danger-bg);  color: var(--danger);  border: 1px solid #e0aaaa; }
.toast.info    { background: var(--info-bg);    color: var(--info);    border: 1px solid #9bbfe6; }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ─── EMPTY STATE ─── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.3; }
.empty-state p { font-size: 14px; }

/* ─── FRECUENTES ─── */
.freq-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 1.25rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

.freq-item:hover { background: rgba(74,127,181,0.04); }
.freq-item:last-child { border-bottom: none; }

.freq-rank {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
}

.freq-rank.top { background: var(--surface2); color: var(--gold); }

.freq-text { flex: 1; font-size: 13px; }
.freq-bar-wrap { width: 80px; }
.freq-bar-bg { background: var(--bg-input); height: 4px; border-radius: 2px; overflow: hidden; }
.freq-bar { height: 4px; background: linear-gradient(90deg, var(--barra-cambiar), var(--barra-cambiar-fin)); border-radius: 2px; transition: width 0.4s ease; }

.freq-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  font-family: 'DM Mono', monospace;
  min-width: 20px;
  text-align: right;
}

/* ─── CONFIRMACIÓN ─── */
.confirm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,32,68,0.55);
  backdrop-filter: blur(2px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.confirm-overlay.open { display: flex; }

.confirm-box {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 380px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(15,32,68,0.25);
}

.confirm-title { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.confirm-body  { font-size: 13px; color: var(--text-muted); margin-bottom: 1.5rem; line-height: 1.6; }
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ─── LOADING ─── */
.loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 13px;
}

.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--navy-mid);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── USUARIOS ─── */
.rol-select {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 12px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}

/* ─── RESPONSIVE LAYOUT ─── */
.btn-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: white;
  font-size: 22px;
  line-height: 1;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,32,68,0.5);
  z-index: 99;
}

.sidebar-overlay.open { display: block; }

.text-truncate {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

#preguntas-tbody tr td:nth-child(2),
#preguntas-tbody tr td:nth-child(3) {
  white-space: normal;
  overflow-wrap:anywhere;
  overflow: visible;
}

#usuarios-tbody tr td:nth-child(2) {
  white-space: normal;
  overflow-wrap:anywhere;
  overflow: visible;
}

.respuesta-preview {
  display: -webkit-box;
  line-clamp: 1;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}

.respuesta-preview.expandida {
  display: block;
  line-clamp: 1;
  -webkit-line-clamp: unset;
  overflow: visible;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 200;
  }

  .sidebar.open { transform: translateX(0); }

  .main { margin-left: 0; width: 100%; }

  body { overflow-x: hidden; }

  #app { overflow-x: hidden; width: 100%; }

  .btn-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .topbar { 
    left: 0;
    padding: 0 1rem; 
  }
  .content { 
    padding-top: calc(56px + 1rem);
  }

  .metrics-grid { grid-template-columns: repeat(2, 1fr); }

  .toolbar { flex-direction: column; align-items: stretch; }
  .search-input { min-width: unset; }
}

/* ─── USER AVATAR SIDEBAR ─── */
.user-avatar {
  width: 60px; height: 60px;
}

.user-avatar img.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.back-chatbot {
    display: block;
    width: 100%;
    padding: 8px;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    font-size: 12px;
    text-align: center;
    text-decoration: none;
    margin-bottom: 8px;
    transition: all 0.15s;
}

.back-chatbot:hover {
    color: white;
    background: rgba(255,255,255,0.12);
}