:root {
  --blue-980: #1b446c;
  --blue-930: #1f4f7d;
  --blue-860: #2a5f90;
  --blue-800: #2f6f9f;
  --blue-720: #2f6f9f;
  --blue-500: #6faad2;
  --ice-100: #f2f8ff;
  --ice-50: #f8fbff;
  --white: #ffffff;
  --ink: #102132;
  --muted: #4e6377;
  --line: #c9dced;
  --accent-ok: #2dbd6e;
  --accent-login: #2f6f9f;
  --accent-error: #d64141;
  --warning: #ffd464;
  --series-sales: #2f6f9f;
  --series-iva: #e3b735;
  --series-expenses: #d64e4e;
  --series-net: #2dbd6e;
  --shadow: 0 16px 28px rgba(9, 29, 49, 0.14);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  overflow-x: hidden;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
}

body {
  background: linear-gradient(130deg, #d8ecff 0%, #eff7ff 42%, #f8fcff 100%);
}

body.auth-only .print-modal,
body.auth-only .busy-overlay {
  display: none !important;
}

body.auth-only {
  overflow: hidden;
}

body.auth-only .shell {
  grid-template-columns: 1fr;
  width: min(720px, 96vw);
  margin: 0 auto;
  min-height: calc(100vh - 64px);
}

body.auth-only .workspace {
  width: 100%;
}

body.auth-only .auth-screen {
  min-height: calc(100vh - 64px);
  place-items: center;
  overflow: hidden;
}

body.busy-cursor,
body.busy-cursor * {
  cursor: progress !important;
}

.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 7%, rgba(32, 85, 132, 0.24), transparent 38%),
    radial-gradient(circle at 84% 8%, rgba(111, 170, 210, 0.2), transparent 41%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 64px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(33, 79, 121, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
}

.brand-copy {
  display: grid;
  gap: 0;
}

.brand-copy strong {
  line-height: 1;
}

.brand-copy small {
  color: #b5d5f1;
  line-height: 1;
}

.brand-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
}

.brand-dot.state-login {
  background: var(--accent-login);
}

.brand-dot.state-connected {
  background: var(--accent-ok);
}

.brand-dot.state-error {
  background: var(--accent-error);
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 10px;
}

.pill.muted {
  color: #d9ecff;
  background: rgba(44, 86, 123, 0.9);
  border: 1px solid rgba(142, 185, 219, 0.5);
}

.shell {
  width: calc(100% - 32px);
  margin: 14px 16px 18px;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  transition: grid-template-columns 0.22s ease;
}

.sidebar-expanded .shell {
  grid-template-columns: 252px minmax(0, 1fr);
}

.shell:has(.sidebar:hover) {
  grid-template-columns: 252px minmax(0, 1fr);
}

.global-progress {
  position: sticky;
  top: 64px;
  z-index: 31;
  height: 24px;
  background: rgba(33, 79, 121, 0.9);
  border-bottom: 1px solid rgba(181, 213, 241, 0.28);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
}

.global-progress-bar {
  height: 8px;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6faad2 0%, #96f2c6 100%);
  transition: width 0.2s ease;
}

.global-progress-text {
  color: #d9ecff;
  font-size: 0.77rem;
  font-weight: 700;
}

.sidebar {
  width: 100%;
  height: calc(100vh - 92px);
  max-height: calc(100vh - 92px);
  background: linear-gradient(180deg, #2f73a8 0%, #22527d 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow-x: hidden;
  overflow-y: auto;
  transition: width 0.2s ease;
  position: sticky;
  top: 78px;
  align-self: start;
}

.sidebar:hover {
  width: 100%;
}

.sidebar-title {
  height: 62px;
  padding: 8px 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #e7f3ff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  padding: 4px;
}

.sidebar-title span {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.5rem;
  letter-spacing: 1px;
  opacity: 0;
  transition: opacity 0.15s ease;
  white-space: nowrap;
}

.sidebar:hover .sidebar-title span {
  opacity: 1;
}

.sidebar-nav {
  padding: 9px;
  display: grid;
  gap: 6px;
}

.sidebar-version {
  margin-top: 6px;
  padding: 6px 10px 10px;
  border-top: 1px solid rgba(192, 222, 247, 0.22);
}

.sidebar-version span {
  display: inline-block;
  color: #d8ecff;
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 0.15s ease, width 0.15s ease;
}

.sidebar:hover .sidebar-version span,
.sidebar:focus-within .sidebar-version span {
  opacity: 1;
  width: auto;
}

.sidebar-separator {
  height: 1px;
  background: rgba(192, 222, 247, 0.28);
  margin: 8px 4px;
}

.module-link {
  border: 1px solid rgba(157, 200, 232, 0.2);
  background: rgba(21, 55, 86, 0.4);
  color: #e3f4ff;
  border-radius: 12px;
  min-height: 46px;
  padding: 8px 9px;
  font: inherit;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.module-link img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.15));
  flex: 0 0 22px;
}

.module-link span {
  opacity: 0;
  width: 0;
  overflow: hidden;
  transition: opacity 0.15s ease;
  white-space: nowrap;
  text-align: left;
}

.sidebar:hover .module-link span {
  opacity: 1;
  width: auto;
}

.module-link:hover {
  transform: translateX(1px);
  background: rgba(69, 129, 178, 0.52);
  border-color: rgba(179, 215, 242, 0.5);
}

.module-link.active {
  background: #d4ebff;
  color: #184468;
  border-color: #95c6ea;
}

.module-link.disabled,
.module-link:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.module-link.danger {
  background: rgba(123, 45, 34, 0.45);
  border-color: rgba(228, 154, 143, 0.4);
}

.workspace {
  min-width: 0;
  width: 100%;
}

.auth-screen {
  min-height: calc(100vh - 112px);
  display: grid;
  place-items: center;
  gap: 12px;
}

.card {
  background: rgba(255, 255, 255, 0.93);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.card-lite {
  border: 1px solid #d2e5f5;
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}

.auth-card {
  width: min(560px, 94vw);
}

.auth-card h1,
.auth-card h2,
.view h2 {
  margin: 0 0 10px;
  color: var(--blue-930);
}

.auth-card p {
  margin: 0 0 14px;
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 10px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.full {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 6px;
  color: #27465f;
  font-size: 0.87rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #b8d7ef;
  border-radius: 10px;
  padding: 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

input[readonly] {
  background: #edf4fb;
  color: #43637f;
}

.required-visual {
  background: #fff8cf !important;
}

input:required,
select:required,
textarea:required {
  background: #fff8cf;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #8bc2ea;
  border-color: transparent;
}

.required-missing {
  border-color: #d3a700 !important;
  background: #ffef96 !important;
  outline: 2px solid #ffd03d !important;
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 46px;
}

.toggle-password {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid #c6dff2;
  background: #eff8ff;
  border-radius: 8px;
  width: 32px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.toggle-password img {
  width: 17px;
  height: 17px;
  object-fit: contain;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.btn-primary {
  background: #96f2c6;
  color: #0b3b20;
}

.btn-soft {
  background: #f9e8a5;
  color: #4c3c08;
}

.btn-ghost {
  background: #e6f3ff;
  color: #234f73;
}

.row-actions {
  margin: 11px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#empresaView .row-actions {
  margin-top: 8px;
}

.module-toolbar {
  margin: 2px 0 10px;
}

.search-field {
  max-width: 460px;
}

.search-field input[type="search"] {
  border-radius: 999px;
  border-color: #9ec6e5;
  padding-inline: 14px;
  background: #f7fbff;
}

.row-actions.compact {
  margin: 4px 0 0;
}

.auth-actions {
  justify-content: flex-start;
}

.remember-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #2b4f6d;
  font-size: 0.84rem;
  margin-top: 3px;
}

.remember-check input {
  width: auto;
}

.btn-register {
  margin-left: 8px;
}

.app {
  display: grid;
  gap: 16px;
}

.company-info {
  background: linear-gradient(180deg, #eff7ff 0%, #ffffff 100%);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.stats article {
  background: #fff;
  border: 1px solid #d5e8f6;
  border-radius: 12px;
  padding: 11px;
}

.stats h3 {
  margin: 0 0 6px;
  font-size: 0.81rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #4a6d8d;
}

.stats p {
  margin: 0;
  font-weight: 800;
  color: var(--blue-930);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.dashboard-grid.dashboard-bottom {
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 20px;
}

#dashboardView > .trend-card {
  margin-bottom: 20px;
}

.chart-card {
  border: 1px solid #d2e5f4;
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
  box-shadow: 0 14px 28px rgba(23, 63, 93, 0.1);
  position: relative;
  overflow: hidden;
}

.chart-card h3 {
  margin: 0 0 8px;
  color: #2a5377;
}

.trend-card {
  overflow: hidden;
  min-height: 500px;
}

#dashboardView .dashboard-grid.dashboard-bottom .chart-card {
  min-height: 440px;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.series-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.series-pill {
  border: 1px solid #bfd8ed;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #234c6d;
  background: #f4fbff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.series-pill input {
  width: auto;
  margin: 0;
}

.series-pill.sales {
  border-color: rgba(47, 111, 159, 0.45);
  color: #1f4f74;
}

.series-pill.iva {
  border-color: rgba(227, 183, 53, 0.45);
  color: #77590b;
}

.series-pill.expenses {
  border-color: rgba(214, 78, 78, 0.45);
  color: #7a2c2c;
}

.series-pill.net {
  border-color: rgba(45, 189, 110, 0.45);
  color: #17603b;
}

.chart-card canvas {
  width: 100%;
  height: auto;
  min-height: 280px;
  border: 1px solid #e6f1fb;
  border-radius: 10px;
  background: linear-gradient(180deg, #fbfeff 0%, #f1f8ff 100%);
}

#dashboardView .dashboard-grid.dashboard-bottom canvas {
  min-height: 340px;
}

.chart-card.loading::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.55) 45%, transparent 100%);
  animation: shimmer 0.65s linear infinite;
  pointer-events: none;
}

.chart-hint {
  margin: 6px 0 0;
  color: #577089;
  font-size: 0.78rem;
}

.top-clientes-cards {
  display: grid;
  gap: 10px;
  height: 100%;
  min-height: 340px;
  overflow: auto;
  align-content: start;
}

.top-cliente-card {
  border: 1px solid #cfe3f4;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fcff 0%, #eef7ff 100%);
  padding: 10px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  animation: fadeUpIn 0.35s ease both;
}

.top-cliente-card:hover {
  transform: translateY(-1px);
  border-color: #86bbdf;
  box-shadow: 0 8px 18px rgba(26, 70, 103, 0.14);
}

.top-cliente-card h4 {
  margin: 0 0 4px;
  color: #244c6d;
  font-size: 0.95rem;
}

.top-cliente-card p {
  margin: 0;
  color: #48647e;
  font-size: 0.78rem;
  line-height: 1.3;
}

.table-wrap {
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid #d3e6f5;
  border-radius: 12px;
  background: #fff;
}

.table-wrap.slim {
  max-height: 340px;
}

.logo-preview-wrap {
  border: 1px dashed #9ec6e5;
  border-radius: 12px;
  padding: 10px;
  background: #f7fcff;
  min-height: 88px;
  display: grid;
  place-items: center;
}

.logo-preview {
  max-height: 72px;
  max-width: min(360px, 100%);
  object-fit: contain;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.config-grid > .full {
  grid-column: 1 / -1;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #254a68;
}

.checkbox-row input {
  width: auto;
}

.flag-btn img {
  width: 30px;
  height: 20px;
  object-fit: cover;
  border-radius: 3px;
}

.top-gap {
  margin-top: 10px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

th,
td {
  padding: 8px 10px;
  border-bottom: 1px solid #ebf3fa;
  text-align: left;
  font-size: 0.84rem;
  white-space: normal;
  word-break: break-word;
}

th.selection-col,
td.selection-cell {
  width: 86px;
  min-width: 86px;
  max-width: 86px;
  text-align: center;
  white-space: nowrap;
}

td.selection-cell {
  vertical-align: middle;
}

td.selection-cell .row-select {
  margin: 0 auto;
  display: block;
}

.line-actions {
  justify-content: flex-start;
  margin-top: 4px;
}

.lineas-wrap {
  max-height: 220px;
}

th {
  background: #f5fbff;
  color: #2a5276;
  position: sticky;
  top: 0;
  z-index: 1;
}

.action-btn {
  border: 1px solid #afd0eb;
  background: #ebf6ff;
  color: #1d4b70;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  margin-right: 4px;
}

.action-btn.danger {
  border-color: #e8b0a9;
  background: #faece9;
  color: #7a2f25;
}

.action-btn.ok {
  border-color: #9fd8b6;
  background: #e9f9ee;
  color: #1d6a3c;
}

.action-btn:disabled {
  opacity: 0.65;
  cursor: default;
}

.row-payment-pendiente {
  background: #fbe3e3;
}

.row-payment-pagada {
  background: #def4e2;
}

.row-state-pendiente {
  background: #ffe9cb;
}

.row-state-encurso {
  background: #d2e3f7;
}

.row-state-hecho {
  background: #d6eedb;
}

.row-presupuesto-realizado {
  background: #d9e8f8;
}

.row-presupuesto-enviado {
  background: #ffe9cb;
}

.row-presupuesto-aceptado {
  background: #d6eedb;
}

.row-presupuesto-rechazado {
  background: #f7d6d6;
}

.agenda-shell {
  display: grid;
  grid-template-columns: minmax(320px, 440px) minmax(300px, 1fr);
  gap: 12px;
  margin-bottom: 10px;
}

.agenda-date-field input[type="date"],
#agendaHoraInput {
  min-height: 42px;
}

#agendaHoraInput {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.agenda-time-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: -2px;
}

.time-chip {
  border: 1px solid #9bc4e4;
  background: #edf7ff;
  color: #1f4e72;
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  font-size: 0.77rem;
  font-weight: 700;
  cursor: pointer;
}

.time-chip:hover {
  background: #dff0ff;
}

#showRegisterBtn[hidden] {
  display: none !important;
}

.empresa-readonly input,
.empresa-readonly select,
.empresa-readonly textarea {
  background: #edf4fb !important;
  color: #45627d;
  pointer-events: none;
}

.empresa-readonly .logo-preview-wrap {
  opacity: 0.9;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.calendar-header strong {
  color: #234f73;
}

.calendar-legend {
  color: #5c7388;
  font-size: 0.8rem;
  margin-bottom: 8px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.calendar-weekday,
.calendar-day {
  text-align: center;
  border-radius: 8px;
  min-height: 34px;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
}

.calendar-weekday {
  background: #f2f8ff;
  color: #375c7c;
  font-weight: 700;
}

.calendar-day {
  border: 1px solid #d8e9f8;
  background: #fff;
  cursor: pointer;
}

.calendar-day.outside {
  opacity: 0.4;
}

.calendar-day.pending {
  background: #ffe58f;
  border-color: #f4ce55;
}

.calendar-day.selected {
  outline: 2px solid #2f6f9f;
  outline-offset: -1px;
}

.toast {
  position: fixed;
  right: 14px;
  bottom: 14px;
  max-width: min(520px, 90vw);
  background: #1b3f5d;
  color: #eaf6ff;
  border-radius: 10px;
  padding: 11px 13px;
  box-shadow: 0 14px 22px rgba(10, 32, 52, 0.3);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  z-index: 60;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.busy-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 19, 31, 0.18);
  display: grid;
  place-items: center;
  z-index: 70;
  pointer-events: none;
}

.busy-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(22, 70, 107, 0.28);
  border-top-color: #2f6f9f;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.print-modal {
  position: fixed;
  inset: 0;
  background: rgba(9, 24, 40, 0.58);
  display: grid;
  place-items: center;
  z-index: 80;
  padding: 14px;
}

.print-modal-card {
  width: min(1180px, 98vw);
  height: min(92vh, 920px);
  background: #fff;
  border-radius: 12px;
  border: 1px solid #b9d4e9;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.print-modal-head {
  padding: 10px 12px;
  border-bottom: 1px solid #d6e8f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f4faff;
}

.print-modal-head h3 {
  margin: 0;
  color: #204d71;
}

.print-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
}

.message-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 25, 42, 0.44);
  display: grid;
  place-items: center;
  z-index: 95;
  padding: 12px;
}

.message-card {
  width: min(520px, 96vw);
  background: #fff;
  border: 1px solid #bcd7eb;
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(12, 33, 54, 0.24);
  padding: 16px;
}

.message-card h3 {
  margin: 0;
  color: #1f4d70;
}

.message-card p {
  margin: 0 0 10px;
  color: #3f5f7a;
}

.message-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

#messageModalIcon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.message-card .row-actions {
  justify-content: flex-end;
}

.message-card.success {
  border-color: #8cd8af;
}

.message-card.warning {
  border-color: #f2ca69;
}

.message-card.error {
  border-color: #e4a2a2;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

@keyframes fadeUpIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1220px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .agenda-shell {
    grid-template-columns: 1fr;
  }

  .config-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-grid.dashboard-bottom {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .shell {
    width: calc(100% - 20px);
    margin: 10px 10px 16px;
    grid-template-columns: 1fr;
  }

  .sidebar {
    width: 100%;
    min-height: auto;
    height: auto;
    max-height: none;
    position: static;
  }

  .sidebar:hover {
    width: 100%;
  }

  .sidebar-title span,
  .module-link span,
  .sidebar-version span,
  .sidebar:hover .sidebar-title span,
  .sidebar:hover .module-link span,
  .sidebar:hover .sidebar-version span {
    opacity: 1;
    width: auto;
  }

  .sidebar-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-separator {
    grid-column: 1 / -1;
  }

  .module-link {
    justify-content: flex-start;
  }
}

@media (max-width: 780px) {
  .grid-2,
  .stats,
  .sidebar-nav {
    grid-template-columns: 1fr;
  }

  .topbar {
    padding: 0 12px;
  }
}
