/* Identidad "Cuadre" — misma marca que la landing (tinta, papel, verde, latón). */
:root {
  --ink: #17223B;         /* tinta */
  --ink-2: #33405c;
  --ink-3: #4c5772;
  --muted: #6B7280;       /* gris-dato */
  --faint: #97a0ac;
  --line: #E1E2DC;
  --line-2: #D9DAD3;
  --bg: #F1F2ED;          /* papel */
  --panel: #FFFFFF;
  --soft: #F5F6F1;
  --soft-2: #E5E6E0;
  --accent: #2F6F4E;      /* verde-cuadre */
  --accent-hover: #285f43;
  --green: #2F6F4E;
  --green-bg: #e6efe9;
  --amber: #A9812F;       /* latón */
  --amber-bg: #f5eeda;
  --red: #B3452F;         /* alerta */
  --red-bg: #f6e6e1;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(23,34,59,.05);
  --shadow: 0 4px 24px -10px rgba(23,34,59,.16);
  --shadow-lg: 0 24px 60px -20px rgba(23,34,59,.28);
  --ease: cubic-bezier(.22,.61,.36,1);
  --sidebar-w: 248px;
  --font-display: "Merriweather", Georgia, "Times New Roman", serif;
  --font-sans: "Open Sans", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}
h1, h2, h3 { font-family: var(--font-display); }
h1 { margin: 0; font-weight: 700; font-size: 30px; letter-spacing: 0; line-height: 1.15; }
a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-2); }
a:hover { border-color: var(--ink); }

[hidden] { display: none !important; }

.eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px;
}

/* ===================== Layout ===================== */
.app { display: flex; min-height: 100vh; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #dcdce0; border-radius: 20px; border: 3px solid #fff; }
::-webkit-scrollbar-thumb:hover { background: #c7c7cd; }

/* ===================== Sidebar ===================== */
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; background: var(--bg);
  border-right: 1px solid var(--line); display: flex; flex-direction: column;
  padding: 28px 16px 16px; position: sticky; top: 0; height: 100vh;
}
.brand { padding: 0 12px 26px; }
.brand .eyebrow { margin-bottom: 4px; }
.brand-name { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: 0; color: var(--ink); }
.brand-name .dot-sep { color: var(--faint); margin: 0 1px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%; position: relative;
  border: none; background: none; color: var(--ink-3);
  padding: 10px 12px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500;
  cursor: pointer; text-align: left; font-family: inherit; letter-spacing: -0.01em;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.nav-item .ico { width: 17px; height: 17px; stroke: currentColor; opacity: .8; transition: transform .2s var(--ease); }
.nav-item:hover { background: var(--soft); color: var(--ink); }
.nav-item:hover .ico { transform: translateX(1px); }
.nav-item.active { background: var(--soft-2); color: var(--ink); font-weight: 600; }
.nav-item.active .ico { opacity: 1; }

.user {
  margin-top: auto; display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  transition: background .18s var(--ease);
}
.user:hover { background: var(--soft); }
.avatar {
  width: 34px; height: 34px; border-radius: 9px; background: var(--ink); color: #fff;
  display: grid; place-items: center; font-weight: 600; font-size: 14px; flex-shrink: 0;
}
.user-info { min-width: 0; flex: 1; }
.user-name { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-mail { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #c9c9cf; flex-shrink: 0; transition: .3s; }
.status-dot.ok { background: var(--green); box-shadow: 0 0 0 3px rgba(22,163,74,.16); }
.status-dot.warn { background: #d97706; box-shadow: 0 0 0 3px rgba(217,119,6,.16); }
.status-dot.err { background: var(--red); box-shadow: 0 0 0 3px rgba(220,38,38,.16); }

/* ===================== Content / pages ===================== */
.content { flex: 1; min-width: 0; padding: 46px 52px 80px; max-width: 1240px; }
.page { display: none; }
.page.active { display: block; animation: pageIn .4s var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
h1 { margin-bottom: 26px; }

/* ===================== Dropzone ===================== */
.dropzone {
  border: 1.5px dashed var(--line-2); border-radius: 16px; padding: 46px 24px; text-align: center;
  background: var(--bg); cursor: pointer; transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
  outline: none;
}
.dropzone:hover { border-color: #c7c7cd; background: #fcfcfd; }
.dropzone:focus-visible { border-color: var(--ink); }
.dropzone.drag { border-color: var(--ink); background: var(--soft); transform: scale(1.006); }
.dz-ico {
  width: 54px; height: 54px; margin: 0 auto 16px; border-radius: 14px; display: grid; place-items: center;
  background: var(--soft-2); color: var(--ink-2); transition: transform .25s var(--ease), background .2s;
}
.dz-ico svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.dropzone:hover .dz-ico { transform: translateY(-2px); }
.dropzone.drag .dz-ico { background: #e6e6e9; transform: translateY(-3px) scale(1.04); }
.dz-title { margin: 0; font-size: 15.5px; font-weight: 600; color: var(--ink); }
.dz-sub { margin: 7px 0 0; font-size: 13px; color: var(--muted); }
.dz-folder { margin: 14px 0 0; }
.linkbtn {
  background: none; border: none; font-family: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--ink-2); cursor: pointer; border-bottom: 1px solid var(--line-2); padding: 0 0 1px;
  transition: border-color .15s;
}
.linkbtn:hover { border-color: var(--ink); }

/* ===================== Analyze bar ===================== */
.analyze-bar {
  display: flex; align-items: flex-end; gap: 16px; margin-top: 18px;
  padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  animation: pageIn .3s var(--ease);
}
.ab-left { display: flex; gap: 14px; flex: 1; flex-wrap: wrap; }
.ab-field { flex: 1; min-width: 180px; }
.ab-field span { display: block; font-size: 12px; font-weight: 600; color: var(--ink-3); margin-bottom: 6px; }
.analyze-bar .btn { align-self: stretch; }

/* ===================== Forms ===================== */
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-3); margin-bottom: 7px; }
input[type=text], input[type=password], input[type=number], select {
  width: 100%; padding: 10px 13px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  font-size: 14px; background: var(--bg); font-family: inherit; color: var(--ink);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
input::placeholder { color: var(--faint); }
input:focus, select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(10,10,11,.07); }
select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8a94' stroke-width='2.2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; padding-right: 36px;
}
.row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.row > label { flex: 1; min-width: 190px; }
.input-row { display: flex; gap: 8px; }
.input-row input { flex: 1; }
.btn-row { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--ink); margin: 4px 0 16px; }
.check input { width: 17px; height: 17px; accent-color: var(--ink); cursor: pointer; }
.check span { font-size: 13.5px; }
.hint { color: var(--muted); font-size: 12.5px; margin: 8px 0 16px; line-height: 1.55; }

/* ===================== Buttons ===================== */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 10px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-2);
  background: var(--bg); color: var(--ink); font-size: 13.5px; font-weight: 600; cursor: pointer;
  white-space: nowrap; font-family: inherit; letter-spacing: -0.01em;
  transition: background .16s var(--ease), border-color .16s var(--ease), transform .12s var(--ease), box-shadow .16s var(--ease);
}
.btn .ico { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.btn:hover { background: var(--soft); border-color: var(--line-2); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: 0 6px 18px -8px rgba(10,10,11,.5); }
.btn.primary .ico { fill: none; }
.btn.primary svg[class="ico"] polygon, .btn.primary polygon { fill: currentColor; stroke: none; }
.btn.ghost { border-color: transparent; background: none; color: var(--ink-3); }
.btn.ghost:hover { background: var(--soft); color: var(--ink); }
.btn.small { padding: 7px 12px; font-size: 12.5px; }
.btn.icon-btn { padding: 9px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.danger-ghost { color: var(--red); border-color: transparent; background: none; }
.btn.danger-ghost:hover { background: var(--red-bg); }

/* ===================== Progress ===================== */
.progress-card {
  margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); box-shadow: var(--shadow-sm); animation: pageIn .3s var(--ease);
}
.progress-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font-size: 13.5px; color: var(--ink-2); }
.progress-count { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); }
.progress-bar { height: 8px; background: var(--soft-2); border-radius: 999px; overflow: hidden; }
.progress-fill {
  height: 100%; width: 0%; border-radius: 999px; background: var(--ink);
  transition: width .5s var(--ease); position: relative; overflow: hidden;
}
.progress-fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.spinner { width: 15px; height: 15px; border: 2px solid var(--line-2); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; flex-shrink: 0; }
.spinner.amber { border-color: #f3d9a8; border-top-color: var(--amber); }
@keyframes spin { to { transform: rotate(360deg); } }
.waiting-box {
  display: flex; align-items: center; gap: 11px; background: var(--amber-bg); color: var(--amber);
  padding: 11px 14px; border-radius: var(--radius-sm); margin-top: 14px; font-size: 13px; font-weight: 500;
  animation: pageIn .25s var(--ease);
}

/* ===================== Result / data tables ===================== */
.result-block { margin-top: 24px; animation: pageIn .35s var(--ease); }
.result-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.done-msg { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 500; color: var(--green); }
.done-msg .done-check { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; }

.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table thead th {
  background: var(--ink); color: #fff; font-weight: 600; font-size: 11px; text-transform: uppercase;
  letter-spacing: .05em; padding: 12px 14px; text-align: left; white-space: nowrap;
}
.data-table tbody td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table tbody tr { transition: background .14s var(--ease); animation: rowIn .35s var(--ease) both; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--soft); }
@keyframes rowIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.cell-strong { font-weight: 600; color: var(--ink); }
.cell-mono { font-variant-numeric: tabular-nums; }
.cell-file { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.cell-inc { max-width: 240px; white-space: normal; color: var(--muted); font-size: 12px; line-height: 1.5; }
.cell-bases { font-size: 12px; color: var(--ink-3); line-height: 1.6; white-space: nowrap; }
.cell-bases b { color: var(--ink); font-weight: 600; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; line-height: 1.4; }
.pill.alta { background: var(--green-bg); color: var(--green); }
.pill.media { background: var(--amber-bg); color: var(--amber); }
.pill.baja { background: var(--red-bg); color: var(--red); }
.pill.sin { background: var(--amber-bg); color: var(--amber); }
.pill.rev { background: var(--green-bg); color: var(--green); }
.pill .pdot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
button.pill { border: none; cursor: pointer; font-family: inherit; transition: transform .12s var(--ease), filter .15s; }
button.pill:hover { filter: brightness(.96); transform: translateY(-1px); }

/* ===================== Historial ===================== */
.hist-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 22px; }
.search { position: relative; flex: 1; max-width: 420px; }
.search .ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; }
.search input { padding-left: 38px; }
.date-group { margin-bottom: 30px; }
.date-label { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.lote {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
  margin-bottom: 10px; box-shadow: var(--shadow-sm); overflow: hidden;
  transition: border-color .18s var(--ease), box-shadow .2s var(--ease);
  animation: rowIn .35s var(--ease) both;
}
.lote:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.lote-head { display: flex; align-items: center; gap: 16px; padding: 16px 18px; }
.lote-meta { flex: 1; min-width: 0; }
.lote-title { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.lote-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.lote-sub .sep { margin: 0 7px; opacity: .5; }
.lote-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.chev { transition: transform .25s var(--ease); }
.lote.open .chev { transform: rotate(180deg); }
.lote-detail { border-top: 1px solid var(--line); background: var(--soft); overflow: hidden; }
.lote-detail .table-wrap { border: none; border-radius: 0; box-shadow: none; }
.lote-detail .data-table thead th { background: #26262b; }
.detail-actions { display: flex; gap: 8px; padding: 12px 14px; justify-content: flex-end; }

.empty { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty-ico { width: 40px; height: 40px; fill: none; stroke: var(--faint); stroke-width: 1.6; margin-bottom: 14px; }
.empty p { margin: 0; font-weight: 600; color: var(--ink-2); font-size: 15px; }
.empty span { font-size: 13px; }

/* ===================== Cards / config ===================== */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 18px; box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.card-head .card-label { margin-bottom: 0; }

.status-table { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.st-empty { padding: 18px; color: var(--muted); font-size: 13px; text-align: center; }
.st-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13.5px; animation: rowIn .3s var(--ease) both; }
.st-row:last-child { border-bottom: none; }
.st-row .st-key { color: var(--ink-3); }
.st-row .st-val { font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 7px; font-variant-numeric: tabular-nums; }
.st-val.ok { color: var(--green); }
.st-val.err { color: var(--red); }
.st-val .ico { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.st-foot { padding: 11px 16px; font-size: 12px; color: var(--faint); background: var(--soft); }
.st-models { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 60%; }
.st-models span { background: var(--soft-2); color: var(--ink-3); padding: 3px 8px; border-radius: 7px; font-size: 11.5px; font-weight: 500; }
.st-banner { padding: 13px 16px; font-size: 13px; font-weight: 500; border-bottom: 1px solid var(--line); }
.st-banner.ok { background: var(--green-bg); color: var(--green); }
.st-banner.warn { background: var(--amber-bg); color: var(--amber); }
.st-banner.err { background: var(--red-bg); color: var(--red); }

/* ===================== Modal ===================== */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(10,10,11,.42); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 60; padding: 22px;
  animation: fadeIn .2s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal { background: #fff; border-radius: 18px; width: 680px; max-width: 100%; max-height: 90vh; overflow: auto; box-shadow: var(--shadow-lg); animation: modalIn .28s var(--ease); }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.modal-body { padding: 22px 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.modal-body label { grid-column: span 1; }
.modal-body label.full { grid-column: span 2; }
.modal-body .iva-block { grid-column: span 2; }
.iva-row { display: flex; gap: 8px; margin-bottom: 8px; }
.iva-row input { flex: 1; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 24px; border-top: 1px solid var(--line); }

/* ===================== Toast ===================== */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(0);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); z-index: 100; font-size: 13.5px; font-weight: 500;
  display: flex; align-items: center; gap: 9px; animation: toastIn .3s var(--ease);
}
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(16px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
.toast.ok { background: #0f2a17; }
.toast.err { background: #2a0f0f; }
.toast::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #9ca3af; }
.toast.ok::before { background: #4ade80; }
.toast.err::before { background: #f87171; }

/* ===================== Auth screen ===================== */
.auth-screen {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 24px; background:
    radial-gradient(1200px 600px at 50% -10%, #f2f2f4 0%, #ffffff 45%),
    var(--bg);
  z-index: 40; animation: fadeIn .3s var(--ease);
}
.auth-card {
  width: 400px; max-width: 100%; background: var(--panel); border: 1px solid var(--line);
  border-radius: 18px; padding: 34px 32px; box-shadow: var(--shadow-lg);
  animation: modalIn .4s var(--ease);
}
.auth-brand { text-align: center; margin-bottom: 24px; }
.auth-brand .eyebrow { margin-bottom: 5px; }
.auth-brand .brand-name { font-family: var(--font-display); font-size: 28px; font-weight: 700; letter-spacing: 0; }
.auth-brand .dot-sep { color: var(--faint); }
.auth-tabs {
  display: flex; gap: 4px; background: var(--soft-2); padding: 4px; border-radius: 12px; margin-bottom: 24px;
}
.auth-tab {
  flex: 1; border: none; background: none; padding: 9px; border-radius: 9px; cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--muted);
  transition: background .2s var(--ease), color .2s var(--ease);
}
.auth-tab.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.auth-form { display: flex; flex-direction: column; gap: 15px; animation: pageIn .3s var(--ease); }
.auth-form label { margin-bottom: 0; }
.auth-form input { padding: 11px 13px; }
.auth-submit { width: 100%; padding: 12px; margin-top: 4px; font-size: 14px; }
.auth-error {
  background: var(--red-bg); color: var(--red); border-radius: var(--radius-sm);
  padding: 10px 13px; font-size: 12.5px; font-weight: 500; line-height: 1.45;
  animation: shake .4s var(--ease);
}
@keyframes shake {
  0%,100% { transform: translateX(0); } 20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); }
}
.auth-foot { text-align: center; font-size: 11.5px; color: var(--faint); margin: 22px 0 0; }
.logout { flex-shrink: 0; margin-left: 2px; }
.logout .ico { width: 16px; height: 16px; }

/* ===================== Responsive ===================== */
@media (max-width: 860px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; padding: 12px 16px; border-right: none; border-bottom: 1px solid var(--line); }
  .brand { padding: 0; }
  .nav { flex-direction: row; margin: 0 auto; }
  .nav-item span:not(.ico) { display: none; }
  .user { margin: 0; }
  .user-info { display: none; }
  .content { padding: 28px 20px 60px; }
  h1 { font-size: 24px; }
  .modal-body { grid-template-columns: 1fr; }
  .modal-body label, .modal-body label.full, .modal-body .iva-block { grid-column: span 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .progress-fill::after { display: none; }
}
