/* =====================================================================
   HUETRIX · Huete Arquitectos
   Sistema visual coherente con Actas Pro y Huete Flow
   ===================================================================== */

:root {
  /* Marca Huete */
  --red:        rgb(193, 0, 0);
  --red2:       rgb(160, 0, 0);
  --red3:       rgb(220, 40, 40);
  --red-soft:   #FBF0EF;

  /* Acento Huetrix (rojo corporativo Huete) */
  --accent:     rgb(193, 0, 0);
  --accent2:    rgb(160, 0, 0);
  --accent-soft:#FBF0EF;

  /* Tipos de registro */
  --t-contacto:   rgb(193, 0, 0);
  --t-contacto-s: #FBF0EF;
  --t-material:   #B8952A;
  --t-material-s: #FDF8EE;
  --t-parametro:  #4A5A7A;
  --t-parametro-s:#EEF1F6;

  /* Neutros */
  --bg:        #F7F5F2;
  --surface:   #FFFFFF;
  --ink:       #1A1714;
  --ink2:      #3D3832;
  --ink3:      #5A5550;
  --mute:      #8A827A;
  --mute2:     #A09890;
  --line:      #E8E3DC;
  --line2:     #F0EBE3;

  /* Dimensiones */
  --fn: Verdana, Geneva, Tahoma, sans-serif;
  --r:  10px;
  --r-lg: 14px;
  --nav-h: 56px;
  --side-w: 260px;
  --shadow-sm: 0 1px 2px rgba(26,23,20,0.04);
  --shadow-md: 0 4px 14px rgba(26,23,20,0.08);
  --shadow-lg: 0 20px 60px rgba(26,23,20,0.20);
}

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

html, body {
  height: 100%;
  font-family: var(--fn);
  font-size: 13px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body { overflow-x: hidden; }

/* noise sutil al fondo igual que el portal */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
  z-index: 0;
}

kbd {
  display: inline-block;
  background: var(--line2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: var(--fn);
  font-size: 10px;
  color: var(--ink3);
}

/* =========================== TOP NAV =========================== */
.top-nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0 22px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-left  { display: flex; align-items: center; gap: 14px; }
.nav-right { display: flex; align-items: center; gap: 10px; }

.back-link {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: var(--line2);
  color: var(--ink2);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.back-link:hover { background: var(--ink); color: var(--surface); }

.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 34px; height: 34px;
  background: var(--accent);
  color: white;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(193,0,0,0.25);
}
.brand-name {
  font-size: 15px;
  font-weight: bold;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.brand-tag {
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  margin-top: 2px;
}

.sync-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 11px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: bold;
  border: 1px solid var(--line);
  background: var(--surface);
}
.sync-dot { width: 7px; height: 7px; border-radius: 50%; }
.sync-idle   { color: var(--mute); }
.sync-idle   .sync-dot { background: var(--mute2); }
.sync-ok     { color: #0A7F3F; border-color: #CFE8D9; background: #F0F9F3; }
.sync-ok     .sync-dot { background: #22A55A; box-shadow: 0 0 0 3px rgba(34,165,90,0.15); }
.sync-syncing { color: #9A7B22; border-color: #F1E6C6; background: #FDF8EE; }
.sync-syncing .sync-dot { background: #D4AC3D; animation: pulse 1.2s ease-in-out infinite; }
.sync-error  { color: var(--red2); border-color: #F3D4D4; background: #FBF0EF; }
.sync-error  .sync-dot { background: var(--red); }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.85); }
}

/* =========================== BOTONES =========================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 13px;
  border-radius: 8px;
  font-family: var(--fn);
  font-size: 12px;
  font-weight: bold;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.08s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent2); }
.btn-solid   { background: var(--ink); color: white; }
.btn-solid:hover { background: #000; }
.btn-ghost   { background: var(--surface); color: var(--ink2); border-color: var(--line); }
.btn-ghost:hover { background: var(--line2); border-color: var(--mute2); }
.btn-danger  { background: var(--red-soft); color: var(--red2); border-color: #F3D4D4; }
.btn-danger:hover { background: var(--red); color: white; border-color: var(--red); }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* =========================== LAYOUT =========================== */
.layout {
  display: grid;
  grid-template-columns: var(--side-w) 1fr;
  min-height: calc(100vh - var(--nav-h));
  position: relative;
  z-index: 1;
}

/* =========================== SIDEBAR =========================== */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 18px 14px;
  display: flex; flex-direction: column;
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
}
.side-section { margin-bottom: 22px; }
.side-section:last-of-type { margin-bottom: 0; }
.side-footer { margin-top: auto; padding-top: 14px; }

.side-label {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  padding: 0 8px 8px;
}
.mini-count {
  font-size: 10px;
  background: var(--line2);
  color: var(--mute);
  padding: 1px 6px;
  border-radius: 10px;
  letter-spacing: 0;
}

.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-link {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px;
  border: none;
  background: transparent;
  border-radius: 7px;
  font-family: var(--fn);
  font-size: 12px;
  color: var(--ink2);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, color 0.12s;
}
.side-link:hover { background: var(--line2); }
.side-link.active { background: var(--accent-soft); color: var(--accent2); font-weight: bold; }
.side-link .count {
  margin-left: auto;
  font-size: 10px;
  font-weight: bold;
  background: var(--line2);
  color: var(--mute);
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 22px;
  text-align: center;
}
.side-link.active .count { background: var(--accent); color: white; }

.cat-list {
  display: flex; flex-direction: column; gap: 1px;
  max-height: 300px;
  overflow-y: auto;
}
.cat-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-family: var(--fn);
  font-size: 11px;
  color: var(--ink3);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}
.cat-item:hover { background: var(--line2); }
.cat-item.active { background: var(--accent-soft); color: var(--accent2); font-weight: bold; }
.cat-item .count {
  margin-left: auto;
  font-size: 10px;
  color: var(--mute);
}
.cat-empty {
  padding: 8px 10px;
  font-size: 11px;
  color: var(--mute2);
  font-style: italic;
}

.kb-hint {
  font-size: 10px;
  color: var(--mute);
  padding: 0 4px;
  line-height: 1.7;
}

/* =========================== MAIN =========================== */
.main {
  padding: 20px 28px 40px;
  min-width: 0;
}

.main-toolbar {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 18px;
}
.search-wrap {
  flex: 1;
  position: relative;
  max-width: 560px;
}
.search-ico {
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  color: var(--mute2);
}
#searchInput {
  width: 100%;
  padding: 10px 36px 10px 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-family: var(--fn);
  font-size: 13px;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
#searchInput:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(193,0,0,0.12);
}
.search-clear {
  position: absolute; right: 10px; top: 50%;
  transform: translateY(-50%);
  width: 20px; height: 20px;
  border-radius: 50%;
  display: none;
  align-items: center; justify-content: center;
  color: var(--mute);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
.search-clear:hover { background: var(--line2); color: var(--ink); }
.search-wrap.has-text .search-clear { display: flex; }

.toolbar-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.result-count {
  font-size: 11px;
  color: var(--mute);
  font-weight: bold;
}

.view-toggle {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2px;
}
.vt-btn {
  width: 28px; height: 26px;
  border: none;
  background: transparent;
  border-radius: 6px;
  color: var(--mute);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.vt-btn:hover { color: var(--ink); }
.vt-btn.active { background: var(--accent); color: white; }

/* =========================== RESULTADOS =========================== */
.results-area.view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.results-area.view-list {
  display: flex; flex-direction: column; gap: 6px;
}

/* TARJETA GRID */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 16px 14px;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
  position: relative;
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 140px;
}
.card::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--card-c, var(--accent));
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--mute2);
}
.card.type-contacto  { --card-c: var(--t-contacto); }
.card.type-material  { --card-c: var(--t-material); }
.card.type-parametro { --card-c: var(--t-parametro); }

.card-type-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 10px;
  margin-bottom: 10px;
  width: fit-content;
}
.card.type-contacto  .card-type-chip { background: var(--t-contacto-s);  color: var(--t-contacto); }
.card.type-material  .card-type-chip { background: var(--t-material-s);  color: #9A7B22; }
.card.type-parametro .card-type-chip { background: var(--t-parametro-s); color: var(--t-parametro); }
.ctc-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.card-title {
  font-size: 14px;
  font-weight: bold;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: 4px;
  word-break: break-word;
}
.card-sub {
  font-size: 11px;
  color: var(--mute);
  margin-bottom: 10px;
}
.card-info {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 11px;
  color: var(--ink3);
  margin-bottom: 10px;
}
.card-info-row {
  display: flex; align-items: center; gap: 6px;
  overflow: hidden;
}
.card-info-row svg { color: var(--mute2); flex-shrink: 0; }
.card-info-row span {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-notes-preview {
  font-size: 11px;
  color: var(--mute);
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-foot {
  margin-top: auto;
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--line2);
}
.card-category {
  font-size: 10px;
  color: var(--mute);
  letter-spacing: 0.05em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-tags { display: flex; gap: 3px; flex-wrap: wrap; }
.tag-chip {
  font-size: 9px;
  background: var(--line2);
  color: var(--ink3);
  padding: 1px 6px;
  border-radius: 8px;
}

/* FILA LISTA */
.row {
  display: grid;
  grid-template-columns: 22px 1.6fr 1fr 1fr 120px;
  gap: 14px;
  align-items: center;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.row:hover { border-color: var(--mute2); background: #FDFBF8; }
.row-type {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.row.type-contacto  .row-type { background: var(--t-contacto); }
.row.type-material  .row-type { background: var(--t-material); }
.row.type-parametro .row-type { background: var(--t-parametro); }
.row-name { font-weight: bold; color: var(--ink); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-empresa, .row-contact, .row-cat {
  font-size: 11px;
  color: var(--ink3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row-cat { color: var(--mute); text-align: right; }

/* =========================== EMPTY STATE =========================== */
.empty-state {
  grid-column: 1 / -1;
  padding: 70px 20px 40px;
  text-align: center;
  color: var(--mute);
  max-width: 520px;
  margin: 0 auto;
}
.empty-icon {
  display: inline-flex;
  padding: 18px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 18px;
  margin-bottom: 18px;
}
.empty-state h2 {
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 8px;
}
.empty-state p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink3);
  margin-bottom: 22px;
}
.empty-actions {
  display: flex; gap: 10px; justify-content: center;
  margin-bottom: 18px;
}
.empty-hint { font-size: 11px; color: var(--mute); }

.no-results {
  grid-column: 1 / -1;
  padding: 50px 20px;
  text-align: center;
  color: var(--mute);
  font-size: 13px;
}

/* =========================== MODAL =========================== */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(26,23,20,0.45);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fade-in 0.15s ease both;
}
.modal-bg.hidden { display: none; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 720px;
  max-height: calc(100vh - 40px);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: modal-in 0.2s ease both;
}
.modal-sm { max-width: 520px; }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  gap: 14px;
}
.modal-title {
  display: flex; align-items: center; gap: 10px;
  flex: 1;
  min-width: 0;
}
.modal-title h3 {
  font-size: 15px;
  color: var(--ink);
}
.mode-chip {
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent2);
  flex-shrink: 0;
}
.field-name {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--fn);
  font-size: 17px;
  font-weight: bold;
  color: var(--ink);
  padding: 4px 0;
  min-width: 0;
}
.field-name:focus { outline: none; }
.field-name::placeholder { color: var(--mute2); font-weight: normal; }

.modal-close {
  width: 30px; height: 30px;
  border: none;
  background: var(--line2);
  border-radius: 6px;
  font-size: 20px;
  color: var(--ink3);
  cursor: pointer;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.modal-close:hover { background: var(--ink); color: white; }

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.f-col-2 { grid-column: 1 / -1; }

.f-field label {
  display: block;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 5px;
}
.f-field input,
.f-field textarea,
.f-field select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-family: var(--fn);
  font-size: 12.5px;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.f-field textarea { resize: vertical; min-height: 80px; font-family: var(--fn); line-height: 1.55; }
.f-field input:focus,
.f-field textarea:focus,
.f-field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(193,0,0,0.10);
}
.field-hint {
  font-size: 10px;
  color: var(--mute);
  margin-top: 4px;
}

.type-select {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}
.ts-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 7px;
  font-family: var(--fn);
  font-size: 11.5px;
  font-weight: bold;
  color: var(--ink3);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.ts-btn:hover { border-color: var(--mute2); }
.ts-btn.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent2);
}

.modal-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.foot-right { display: flex; gap: 8px; margin-left: auto; }

.hidden { display: none !important; }

/* =========================== MODO VISUAL (campos de contacto) =========================== */
.modal[data-t="material"]  .f-contacto-only,
.modal[data-t="parametro"] .f-contacto-only { display: none; }

/* =========================== IMPORT =========================== */
.import-intro {
  font-size: 12px;
  color: var(--ink3);
  line-height: 1.55;
  margin-bottom: 16px;
}
.import-intro code {
  background: var(--line2);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
}
.drop-zone {
  border: 2px dashed var(--line);
  border-radius: 10px;
  padding: 28px 20px;
  text-align: center;
  color: var(--mute);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.drop-zone:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.dz-main { font-size: 13px; font-weight: bold; margin-top: 10px; color: var(--ink); }
.dz-sub  { font-size: 11px; margin-top: 3px; }

.import-type {
  margin-top: 16px;
}
.import-type label {
  display: block;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 5px;
}
.import-type select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-family: var(--fn);
  font-size: 12px;
  background: var(--surface);
}

.import-preview {
  margin-top: 16px;
  padding: 14px;
  background: var(--accent-soft);
  border: 1px solid #F3D4D4;
  border-radius: 9px;
}
.import-preview h4 {
  font-size: 12px;
  color: var(--accent2);
  margin-bottom: 6px;
}
.import-preview-stats {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 11px;
  color: var(--ink3);
  margin-bottom: 8px;
}
.import-preview-stats b { color: var(--accent2); }
.import-preview-note {
  font-size: 11px;
  color: var(--ink3);
  line-height: 1.5;
}

/* =========================== TOAST =========================== */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  padding: 11px 18px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: bold;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  animation: toast-in 0.2s ease both;
  max-width: 90vw;
}
.toast.hidden { display: none; }
.toast.t-ok    { background: #157A3F; }
.toast.t-err   { background: var(--red2); }
.toast.t-warn  { background: #9A7B22; }
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* =========================== DETALLE: NOTAS ENRIQUECIDAS =========================== */
.notes-rich {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--fn);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink2);
}
.notes-rich a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed var(--accent);
}
.notes-rich a:hover { color: var(--accent2); border-bottom-style: solid; }

/* =========================== RESPONSIVE =========================== */
@media (max-width: 900px) {
  :root { --side-w: 100%; }
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .main { padding: 16px; }
  .row { grid-template-columns: 12px 1fr 100px; }
  .row-empresa, .row-contact { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .f-col-2 { grid-column: 1; }
  .type-select { grid-template-columns: 1fr; }
  .main-toolbar { flex-wrap: wrap; }
  .search-wrap { max-width: 100%; flex: 1 1 100%; }
}

@media (max-width: 560px) {
  .nav-right .btn span,
  #dbxBtnLabel { display: none; }
  .brand-tag { display: none; }
  .top-nav { padding: 0 14px; }
}

/* =========================== SCROLLBAR =========================== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 5px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--mute2); }
