:root {
  --navy: #0b2f67;
  --navy-2: #123f86;
  --yellow: #ffc400;
  --bg: #f4f7fb;
  --card: #fff;
  --text: #10233f;
  --muted: #6f7d91;
  --line: #dce4ef;
  --danger: #b42318;
  --success: #137a45;
}

* {
  box-sizing: border-box
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Segoe UI, Roboto, Arial, sans-serif
}

body {
  min-height: 100vh
}

a {
  color: inherit
}

.app-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  height: 100vh;
  min-height: 0;
  overflow: hidden
}

.sidebar {
  background: linear-gradient(180deg, #071b3a 0%, #09254e 100%);
  color: #fff;
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  position: sticky;
  top: 0;
  border-right: 1px solid rgba(255, 255, 255, .06)
}

.brand {
  display: block;
  width: 100%;
  min-height: 132px;
  padding: 0;
  margin: 0 0 10px;
  background: #dfe3e8;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .14)
}

.brand img {
  display: block;
  width: 100%;
  height: 132px;
  object-fit: cover;
  object-position: center;
  filter: none
}

.nav {
  display: grid;
  gap: 6px;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 0;
  scrollbar-width: thin
}

.nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 11px;
  text-decoration: none;
  color: #dce7f5;
  font-weight: 650;
  transition: background .16s ease, color .16s ease, transform .16s ease
}

.nav a:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff
}

.sidebar-user {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .13);
  display: grid;
  gap: 12px;
  flex-shrink: 0
}

.sidebar-user span {
  color: #aebdd2
}

.sidebar-user a {
  color: inherit
}

.main {
  padding: 28px 30px 34px;
  min-width: 0;
  min-height: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain
}

.mobile-top {
  display: none
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px
}

.page-head h1 {
  margin: 0;
  font-size: 28px
}

.page-head p {
  margin: 6px 0 0;
  color: var(--muted)
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 15px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px
}

.btn:hover {
  background: var(--navy-2)
}

.btn.secondary {
  background: #fff;
  border-color: var(--line);
  color: var(--text)
}

.btn.danger {
  background: #fff0ee;
  border-color: #f3b6ae;
  color: var(--danger)
}

.btn.yellow {
  background: var(--yellow);
  color: #10233f
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px
}

.card,
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px
}

.card {
  padding: 20px
}

.card .label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em
}

.card .value {
  font-size: 28px;
  font-weight: 800;
  margin-top: 8px
}

.panel {
  padding: 20px;
  margin-bottom: 20px
}

.panel h2 {
  font-size: 18px;
  margin: 0 0 14px
}

.table-wrap {
  overflow-x: auto
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 700px
}

th,
td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 14px
}

th {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em
}

tbody tr:last-child td {
  border-bottom: 0
}

.amount {
  font-weight: 800
}

.muted {
  color: var(--muted)
}

.badge {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef3fa;
  font-size: 12px;
  font-weight: 700
}

.badge.success {
  background: #e8f7ef;
  color: var(--success)
}

.badge.danger {
  background: #fff0ee;
  color: var(--danger)
}

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

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

.field {
  display: grid;
  gap: 7px
}

.field label {
  font-size: 13px;
  font-weight: 700
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbd6e4;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
  color: var(--text)
}

.field textarea {
  min-height: 90px;
  resize: vertical
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 3px solid rgba(18, 63, 134, .12);
  border-color: var(--navy-2)
}

.form-grid {
  display: grid;
  gap: 15px
}

.help {
  font-size: 12px;
  color: var(--muted)
}

.alert {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  background: #fff
}

.alert.success {
  background: #edf9f2;
  border-color: #bee6cf;
  color: #0e693a
}

.alert.error {
  background: #fff2f0;
  border-color: #f4c0ba;
  color: #9b2118
}

.client-summary {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px
}

.summary-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px
}

.summary-box .small {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase
}

.summary-box .big {
  font-size: 23px;
  font-weight: 800;
  margin-top: 5px
}

.progress {
  height: 12px;
  background: #e8edf4;
  border-radius: 999px;
  overflow: hidden
}

.progress>span {
  display: block;
  height: 100%;
  background: var(--navy);
  border-radius: 999px
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px
}

.login-card {
  width: min(430px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px
}

.login-card .logo {
  display: block;
  width: 230px;
  height: 130px;
  object-fit: contain;
  margin: 0 auto 8px
}

.login-card h1 {
  text-align: center;
  margin: 0 0 6px
}

.login-card p {
  text-align: center;
  color: var(--muted);
  margin: 0 0 22px
}

.ticket-page {
  background: #eceff3;
  padding: 18px
}

.ticket-actions {
  width: 80mm;
  max-width: 80mm;
  margin: 0 auto 10px;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  flex-wrap: wrap
}

.ticket-actions .btn {
  flex: 1 1 auto;
  min-height: 36px;
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 7px
}

.ticket {
  width: 80mm;
  max-width: 80mm;
  margin: auto;
  background: #fff;
  padding: 6mm 5mm;
  border-radius: 0;
  box-shadow: 0 8px 24px rgba(7, 27, 58, .12);
  font-family: "Courier New", Consolas, monospace;
  color: #000
}

.ticket-logo {
  display: block;
  width: 58mm;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  margin: 0 auto 2mm
}

.ticket-title {
  text-align: center;
  color: #000;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .06em;
  margin: 0 0 3mm
}

.ticket-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2mm;
  padding: 3mm 0;
  border-top: 1px dashed #000;
  border-bottom: 1px dashed #000;
  font-size: 12px
}

.ticket-meta>div {
  display: flex;
  justify-content: space-between;
  gap: 8px
}

.ticket-meta strong {
  font-weight: 700
}

.ticket-section {
  margin-top: 4mm
}

.ticket-section h2 {
  font-size: 14px;
  background: none;
  color: #000;
  padding: 0;
  margin: 0 0 2mm;
  text-align: center;
  font-weight: 700;
  letter-spacing: .04em
}

.ticket-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 1px 0;
  font-size: 12px
}

.ticket-row strong:first-child {
  min-width: 34mm
}

.ticket-row span:last-child {
  text-align: right;
  word-break: break-word
}

.ticket-highlight {
  font-size: 14px;
  font-weight: 700;
  color: #000
}

.ticket-footer {
  text-align: center;
  border-top: 1px dashed #000;
  margin-top: 4mm;
  padding-top: 4mm;
  font-size: 12px
}

.ticket-footer strong {
  display: block;
  margin-bottom: 2mm;
  font-size: 14px
}

.ticket-cut {
  margin: 4mm 0 0;
  border-top: 1px dashed #000;
  padding-top: 2mm;
  text-align: center;
  font-size: 10px;
  color: #333
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end
}

.filter-row .field {
  min-width: 180px
}

@media(max-width:980px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }

  .client-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
}

@media(max-width:760px) {
  .app-shell {
    display: block
  }

  .sidebar {
    display: none
  }

  .mobile-top {
    display: flex;
    background: #071b3a;
    padding: 9px 14px;
    align-items: center;
    justify-content: space-between;
    color: #fff
  }

  .mobile-top img {
    width: 160px;
    height: 58px;
    object-fit: cover;
    border-radius: 10px;
    padding: 0;
    background: #dfe3e8
  }

  .main {
    padding: 18px 14px
  }

  .page-head {
    display: grid
  }

  .cards,
  .grid-2,
  .grid-3,
  .client-summary {
    grid-template-columns: 1fr
  }

  .card .value {
    font-size: 24px
  }

  .ticket-page {
    padding: 10px
  }

  .ticket {
    padding: 24px 18px
  }

  .ticket-meta {
    grid-template-columns: 1fr
  }

  .ticket-row {
    display: grid;
    gap: 2px
  }
}

@media print {
  body {
    background: #fff
  }

  .ticket-page {
    padding: 0;
    background: #fff
  }

  .ticket-actions {
    display: none !important
  }

  .ticket {
    width: 80mm;
    max-width: 80mm;
    padding: 6mm 5mm;
    border-radius: 0;
    box-shadow: none
  }

  .ticket-logo {
    width: 64mm;
    height: 28mm
  }

  .ticket-title {
    font-size: 18px
  }

  .ticket-meta {
    grid-template-columns: 1fr;
    font-size: 11px
  }

  .ticket-row {
    font-size: 11px;
    display: flex
  }

  .ticket-row strong:first-child {
    min-width: 38mm
  }

  .ticket-highlight {
    font-size: 16px
  }

  @page {
    size: 80mm auto;
    margin: 0
  }
}


/* DASHBOARD UI IMPROVEMENTS */
.nav a.active {
  background: linear-gradient(90deg, rgba(255, 196, 0, .16), rgba(255, 255, 255, .09));
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: none
}

.nav a.active::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--yellow)
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--navy-2);
  margin-bottom: 6px
}

.dashboard-head {
  margin-bottom: 18px
}

.dashboard-cards {
  margin-bottom: 18px
}

.stat-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  box-shadow: 0 6px 20px rgba(8, 32, 74, .04)
}

.stat-card .value {
  font-size: 34px;
  line-height: 1.05
}

.stat-note {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted)
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #eef4ff;
  color: var(--navy-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 18px;
  flex: 0 0 auto
}

.stat-primary {
  border-color: #f3d989;
  background: linear-gradient(180deg, #fffdf5 0%, #ffffff 100%)
}

.stat-primary .stat-icon {
  background: #fff2c2;
  color: #9d6b00
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, .9fr);
  gap: 18px;
  margin-bottom: 18px
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px
}

.section-head.compact {
  margin-bottom: 12px
}

.section-head h2 {
  margin: 0 0 4px;
  font-size: 20px
}

.section-head p {
  margin: 0;
  color: var(--muted)
}

.mini-kpi {
  text-align: right
}

.mini-kpi strong {
  display: block;
  font-size: 20px;
  color: var(--navy)
}

.mini-kpi span {
  font-size: 12px;
  color: var(--muted)
}

.chart-panel,
.side-panel,
.payments-panel {
  box-shadow: 0 6px 20px rgba(8, 32, 74, .04)
}

.bars-wrap {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  padding: 8px 4px 2px;
  min-height: 245px;
  border-top: 1px solid var(--line)
}

.bar-item {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px
}

.bar-value {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  min-height: 28px;
  display: flex;
  align-items: flex-end;
  justify-content: center
}

.bar-track {
  width: 100%;
  max-width: 54px;
  height: 165px;
  background: linear-gradient(180deg, #f7f9fc 0%, #edf2f8 100%);
  border: 1px solid #e4ebf4;
  border-radius: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 5px
}

.bar-fill {
  width: 100%;
  border-radius: 14px;
  background: linear-gradient(180deg, #17448f 0%, #0b2f67 100%);
  box-shadow: 0 6px 16px rgba(11, 47, 103, .22)
}

.bar-label {
  font-size: 12px;
  font-weight: 700;
  color: #5d6c83;
  text-align: center
}

.metric-list {
  display: grid;
  gap: 10px
}

.metric-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafcff
}

.metric-item span {
  font-size: 14px;
  color: #506079
}

.metric-item strong {
  font-size: 18px;
  color: var(--navy)
}

.side-subsection {
  margin-top: 18px
}

.side-subsection h3 {
  margin: 0 0 10px;
  font-size: 16px
}

.activity-list {
  display: grid;
  gap: 9px
}

.activity-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-decoration: none
}

.activity-item:hover {
  border-color: #c8d6ea;
  background: #fbfdff
}

.activity-item strong {
  display: block;
  font-size: 14px
}

.activity-item span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px
}

.activity-item em {
  font-style: normal;
  font-weight: 800;
  color: var(--navy)
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 190px;
  color: var(--muted);
  font-size: 14px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: #fbfcfe
}

.empty-state.small {
  min-height: 90px
}

.client-cell {
  display: grid;
  gap: 3px
}

.client-cell strong {
  font-size: 14px
}

.client-cell span {
  font-size: 12px;
  color: var(--muted)
}

.amount-accent {
  color: var(--navy)
}

.method-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800
}

.method-cash {
  background: #e9f8ef;
  color: #117a43
}

.method-transfer {
  background: #ecf3ff;
  color: #184d9a
}

.method-card {
  background: #f3ecff;
  color: #6b3db7
}

.method-deposit {
  background: #fff2e8;
  color: #b15d17
}

.table-link {
  display: inline-flex;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  text-decoration: none;
  font-weight: 700;
  color: var(--navy)
}

.table-link:hover {
  background: #f8fbff;
  border-color: #c9d7ec
}

.payments-panel table tbody tr:hover {
  background: #fbfdff
}

@media(max-width:1160px) {
  .dashboard-grid {
    grid-template-columns: 1fr
  }
}

@media(max-width:760px) {

  .section-head,
  .section-head.compact {
    display: grid
  }

  .mini-kpi {
    text-align: left
  }

  .bars-wrap {
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px
  }

  .bar-item {
    min-width: 62px
  }

  .stat-card .value {
    font-size: 28px
  }
}


/* PRODUCT SELECTOR - BASTÓN LUZIA */
.form-section-title {
  margin: 0;
  font-size: 18px;
  color: var(--text)
}

.form-divider {
  height: 1px;
  background: var(--line);
  width: 100%;
  margin: 4px 0
}

.product-help {
  margin: 5px 0 0
}

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

.product-option {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease
}

.product-option:hover {
  border-color: #b9cae2;
  box-shadow: 0 8px 22px rgba(8, 32, 74, .07);
  transform: translateY(-1px)
}

.product-option.selected {
  border-color: var(--navy-2);
  box-shadow: 0 0 0 3px rgba(18, 63, 134, .09)
}

.product-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none
}

.product-option-top {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px
}

.product-number {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #edf3fb;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900
}

.product-option.selected .product-number {
  background: var(--yellow);
  color: #10233f
}

.product-option-name {
  font-weight: 800;
  line-height: 1.25
}

.product-price {
  font-size: 18px;
  color: var(--navy);
  white-space: nowrap
}

.product-description {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  padding-left: 44px
}

.selected-product-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  border-radius: 15px;
  background: #f7faff;
  border: 1px solid #dbe6f5
}

.selected-product-summary span {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 4px
}

.selected-product-summary strong {
  font-size: 17px
}

.selected-product-total {
  text-align: right
}

.selected-product-total strong {
  font-size: 26px;
  color: var(--navy)
}

@media(max-width:820px) {
  .product-selector {
    grid-template-columns: 1fr
  }

  .selected-product-summary {
    display: grid
  }

  .selected-product-total {
    text-align: left
  }
}


/* ADMINISTRACIÓN, CONTRASEÑAS Y ACCIONES DE ELIMINACIÓN */
.table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap
}

.table-actions form {
  margin: 0
}

.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%
}

.password-wrap input {
  padding-right: 48px !important
}

.password-toggle {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-size: 17px;
  display: grid;
  place-items: center;
  color: var(--text)
}

.password-toggle:hover {
  background: #eef3fa
}

.password-toggle:focus {
  outline: 3px solid rgba(18, 63, 134, .16)
}

.user-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap
}

.user-actions form {
  margin: 0
}

.password-details {
  position: relative
}

.password-details>summary {
  list-style: none;
  cursor: pointer
}

.password-details>summary::-webkit-details-marker {
  display: none
}

.password-change-form {
  position: absolute;
  right: 0;
  top: 48px;
  z-index: 20;
  width: 300px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(7, 27, 58, .18);
  display: grid;
  gap: 9px
}

.row-disabled {
  opacity: .68;
  background: #fafafa
}

.no-sale-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px
}

.no-sale-panel h2 {
  margin-bottom: 5px
}

.no-sale-panel p {
  margin: 0
}

.sale-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px
}

.sale-progress-wrap {
  flex: 1;
  min-width: 0
}

.sale-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px
}

@media(max-width:760px) {

  .table-actions,
  .user-actions {
    justify-content: flex-start
  }

  .password-change-form {
    position: fixed;
    left: 14px;
    right: 14px;
    top: auto;
    width: auto;
    max-width: none
  }

  .no-sale-panel,
  .sale-toolbar {
    display: grid
  }
}


/* SIDEBAR REFINADO */
.nav-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex: 0 0 22px;
  color: #9eb2cf
}

.nav-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor
}

.nav a:hover .nav-icon,
.nav a.active .nav-icon {
  color: var(--yellow)
}

.sidebar-profile {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px
}

.sidebar-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, #ffffff, #dfe9f8);
  color: #0a2855;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12)
}

.sidebar-profile-copy {
  min-width: 0;
  display: grid;
  gap: 3px
}

.sidebar-profile-copy strong {
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.sidebar-profile-copy span {
  font-size: 12px
}

.logout-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  min-height: 40px;
  padding: 9px 10px;
  border-radius: 10px;
  color: #dbe6f5 !important;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .06)
}

.logout-link:hover {
  background: rgba(255, 255, 255, .09);
  color: #fff !important
}

.logout-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor
}

/* ADMINISTRACIÓN DE USUARIOS - REDISEÑO */
.admin-page-head {
  align-items: center
}

.users-overview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(8, 32, 74, .04)
}

.users-overview>div {
  min-width: 84px;
  padding: 7px 11px;
  display: grid;
  gap: 2px;
  text-align: center
}

.users-overview>div+div {
  border-left: 1px solid var(--line)
}

.users-overview strong {
  font-size: 20px;
  color: var(--navy)
}

.users-overview span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em
}

.users-layout {
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  gap: 18px;
  align-items: start
}

.user-create-panel {
  position: sticky;
  top: 0;
  margin-bottom: 0;
  padding: 22px
}

.user-create-panel h2,
.users-list-panel h2 {
  margin: 2px 0 5px;
  font-size: 20px
}

.panel-kicker {
  color: var(--navy-2);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .09em
}

.panel-subtitle,
.users-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45
}

.user-create-form {
  margin-top: 18px
}

.user-create-submit {
  width: 100%;
  margin-top: 2px
}

.users-list-panel {
  margin-bottom: 0;
  padding: 22px
}

.users-section-head {
  margin-bottom: 14px
}

.user-list {
  display: grid;
  gap: 10px
}

.user-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.15fr) minmax(280px, 1.25fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease
}

.user-row:hover {
  border-color: #c6d5e8;
  box-shadow: 0 7px 18px rgba(8, 32, 74, .055)
}

.user-row.is-disabled {
  background: #fafbfc;
  border-style: dashed
}

.user-main {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-width: 0
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #edf3fb;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900
}

.user-row.is-disabled .user-avatar {
  background: #f1f2f4;
  color: #7c8797
}

.user-identity {
  min-width: 0
}

.user-name-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0
}

.user-name-line strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.user-handle {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px
}

.user-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(82px, 1fr));
  gap: 8px
}

.user-meta-item {
  display: grid;
  gap: 3px;
  min-width: 0
}

.user-meta-item span {
  font-size: 10px;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em
}

.user-meta-item strong {
  font-size: 12px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.status-active-text {
  color: #117a43 !important
}

.status-disabled-text {
  color: #9b2118 !important
}

.badge.neutral {
  background: #f0f4f9;
  color: #53637a
}

.user-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap
}

.compact-btn {
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 12px
}

.password-details {
  position: relative
}

.password-details>summary {
  list-style: none;
  cursor: pointer
}

.password-details>summary::-webkit-details-marker {
  display: none
}

.password-change-form {
  position: absolute;
  right: 0;
  top: 44px;
  z-index: 30;
  width: 310px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(7, 27, 58, .18);
  display: grid;
  gap: 11px
}

.password-form-head {
  display: grid;
  gap: 2px
}

.password-form-head strong {
  font-size: 14px
}

.password-form-head span {
  color: var(--muted);
  font-size: 12px
}

.password-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%
}

.password-wrap input {
  padding-right: 48px !important
}

.password-toggle {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-size: 17px;
  display: grid;
  place-items: center;
  color: var(--text)
}

.password-toggle:hover {
  background: #eef3fa
}

.password-toggle:focus {
  outline: 3px solid rgba(18, 63, 134, .16)
}

.password-eye {
  line-height: 1
}

/* El usuario desactivado se distingue sin apagar botones ni legibilidad */
.row-disabled {
  opacity: 1;
  background: #fafbfc
}

@media(max-width:1200px) {
  .users-layout {
    grid-template-columns: 1fr
  }

  .user-create-panel {
    position: static
  }
}

@media(max-width:900px) {
  .user-row {
    grid-template-columns: 1fr
  }

  .user-meta {
    grid-template-columns: repeat(3, 1fr)
  }

  .user-actions {
    justify-content: flex-start
  }
}

@media(max-width:760px) {
  .app-shell {
    display: block;
    height: auto;
    min-height: 100vh;
    overflow: visible
  }

  .sidebar {
    display: none
  }

  .main {
    padding: 18px 14px;
    height: auto;
    min-height: 0;
    overflow: visible
  }

  .admin-page-head {
    display: grid
  }

  .users-overview {
    width: max-content
  }

  .user-meta {
    grid-template-columns: 1fr 1fr
  }

  .password-change-form {
    position: fixed;
    left: 14px;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    max-width: none
  }
}


/* TARJETAS EN LUGAR DE TABLAS */
.compact-filter-panel {
  padding: 16px 18px
}

.entity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px
}

.entity-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 6px 20px rgba(8, 32, 74, .04);
  display: grid;
  gap: 16px
}

.entity-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px
}

.entity-card-head h2 {
  margin: 4px 0 0;
  font-size: 19px;
  line-height: 1.2
}

.entity-card-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px
}

.entity-kicker {
  display: block;
  color: var(--navy-2);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em
}

.entity-money {
  color: var(--navy);
  font-size: 20px;
  white-space: nowrap
}

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

.entity-details>div,
.sale-money-grid>div {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #e7edf5;
  border-radius: 11px;
  background: #fafcff;
  display: grid;
  gap: 3px
}

.entity-details span,
.sale-money-grid span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em
}

.entity-details strong,
.sale-money-grid strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px
}

.entity-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 2px
}

.entity-card-actions form {
  margin: 0
}

.sale-money-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px
}

.owner-strip {
  padding: 9px 11px;
  border-radius: 10px;
  background: #f5f8fc;
  color: #5d6c83;
  font-size: 12px
}

.payment-card-list {
  display: grid;
  gap: 10px
}

.payment-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff
}

.payment-card.is-cancelled {
  background: #fff8f7;
  border-style: dashed
}

.payment-card>div:first-child {
  min-width: 0;
  display: grid;
  gap: 3px
}

.payment-card>div:first-child strong {
  font-size: 14px
}

.payment-card small {
  color: var(--muted)
}

.payment-date {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase
}

.payment-card-amount {
  display: grid;
  gap: 5px;
  justify-items: end
}

.payment-card-amount>strong {
  color: var(--navy);
  font-size: 17px
}

.report-card-list {
  margin-bottom: 20px
}

.report-payment-card {
  grid-template-columns: minmax(0, 1fr) auto auto;
  background: #fff
}

.user-meta-expanded {
  grid-template-columns: repeat(5, minmax(70px, 1fr))
}

/* Logo integrado al azul del sidebar */
.sidebar .brand {
  margin-bottom: 2px
}

.sidebar .brand:hover {
  background: rgba(255, 255, 255, .025)
}

@media(max-width:1050px) {
  .entity-grid {
    grid-template-columns: 1fr
  }

  .user-meta-expanded {
    grid-template-columns: repeat(3, minmax(70px, 1fr))
  }
}

@media(max-width:760px) {

  .entity-details,
  .sale-money-grid {
    grid-template-columns: 1fr
  }

  .payment-card,
  .report-payment-card {
    grid-template-columns: 1fr
  }

  .payment-card-amount {
    justify-items: start
  }

  .entity-card-actions {
    justify-content: flex-start
  }
}


/* USERS PAGE LAYOUT FIX */
.users-layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 18px;
  align-items: start
}

.users-list-panel {
  padding: 20px
}

.user-list {
  display: grid;
  gap: 12px
}

.user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "main actions"
    "meta meta";
  gap: 14px 16px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff
}

.user-main {
  grid-area: main
}

.user-meta {
  grid-area: meta;
  display: grid;
  grid-template-columns: repeat(5, minmax(95px, 1fr));
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #e8edf5
}

.user-meta-expanded {
  grid-template-columns: repeat(5, minmax(95px, 1fr))
}

.user-actions {
  grid-area: actions;
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 8px;
  justify-content: end;
  align-content: start;
  min-width: 260px
}

.user-actions .btn,
.user-actions summary.btn {
  white-space: nowrap
}

.user-actions form {
  margin: 0
}

.password-details {
  grid-column: 1 / -1;
  justify-self: end
}

.password-change-form {
  right: 0;
  top: 42px;
  width: 320px
}

.user-name-line {
  flex-wrap: wrap
}

.user-name-line strong {
  max-width: 100%
}

.user-meta-item {
  padding: 10px 11px;
  border: 1px solid #e8edf5;
  border-radius: 11px;
  background: #fafcff
}

.user-meta-item strong {
  white-space: normal;
  line-height: 1.25
}

@media(max-width:1280px) {

  .user-meta,
  .user-meta-expanded {
    grid-template-columns: repeat(3, minmax(100px, 1fr))
  }

  .user-actions {
    min-width: 220px
  }
}

@media(max-width:1120px) {
  .users-layout {
    grid-template-columns: 1fr
  }

  .user-create-panel {
    position: static
  }
}

@media(max-width:980px) {
  .user-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "meta"
      "actions";
  }

  .user-actions {
    grid-template-columns: repeat(3, max-content);
    justify-content: flex-start;
    min-width: 0
  }

  .password-details {
    justify-self: start
  }
}

@media(max-width:760px) {
  .users-overview {
    width: 100%;
    justify-content: space-between
  }

  .user-meta,
  .user-meta-expanded {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }

  .user-actions {
    grid-template-columns: repeat(2, max-content)
  }
}

@media(max-width:520px) {
  .user-actions {
    grid-template-columns: 1fr;
    width: 100%
  }

  .user-actions .btn,
  .user-actions summary.btn,
  .user-actions form {
    width: 100%
  }

  .user-actions form .btn {
    width: 100%
  }

  .password-details {
    width: 100%
  }

  .password-details>summary {
    width: 100%
  }

  .password-change-form {
    left: 12px;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: auto
  }
}


/* USERS - ESTILO DE REFERENCIA */
.users-page-head {
  align-items: center;
  margin-bottom: 22px
}

.users-overview-cards {
  display: flex;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none
}

.users-overview-cards>div+div {
  border-left: 0
}

.overview-card {
  min-width: 180px;
  display: flex !important;
  align-items: center;
  gap: 14px;
  padding: 15px 18px !important;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(8, 32, 74, .04);
  text-align: left !important
}

.overview-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #edf4ff;
  color: #1767da;
  flex: 0 0 48px
}

.overview-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor
}

.overview-card>div {
  display: grid;
  gap: 0
}

.overview-card strong {
  font-size: 26px;
  line-height: 1;
  color: var(--navy)
}

.overview-card span:last-child {
  margin-top: 5px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: .03em
}

.users-layout-reference {
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 18px;
  align-items: start
}

.user-create-reference,
.users-list-reference {
  border-radius: 16px
}

.user-create-reference {
  padding: 24px
}

.users-list-reference {
  padding: 24px
}

.user-create-reference h2,
.users-list-reference h2 {
  font-size: 22px;
  margin: 4px 0 6px
}

.user-create-reference .panel-subtitle,
.users-list-reference .users-section-head p {
  font-size: 14px;
  line-height: 1.5
}

.user-create-reference .field input,
.user-create-reference .field select {
  min-height: 50px;
  border-radius: 11px;
  font-size: 15px
}

.user-create-reference .field label {
  font-size: 13px
}

.user-create-reference .user-create-submit {
  min-height: 52px;
  font-size: 15px;
  border-radius: 11px
}

.user-list-reference {
  display: grid;
  gap: 14px
}

.user-card-reference {
  position: relative;
  padding: 18px;
  border: 1px solid #d8e2ef;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 0 rgba(8, 32, 74, .01);
  display: grid;
  gap: 16px
}

.user-card-reference.is-disabled {
  background: #fbfbfc;
  border-style: dashed
}

.user-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px
}

.user-main-reference {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0
}

.user-avatar-reference {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 50%;
  font-size: 17px;
  background: linear-gradient(145deg, #edf5ff, #dceaff);
  color: #113d7a
}

.user-identity {
  min-width: 0
}

.user-name-line strong {
  font-size: 16px;
  color: #10233f;
  white-space: normal
}

.user-subline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 3px
}

.user-handle {
  margin: 0;
  font-size: 13px
}

.current-account-badge {
  padding: 5px 8px;
  font-size: 10px
}

.user-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end
}

.user-action-btn {
  min-height: 42px;
  padding: 8px 14px;
  gap: 7px;
  font-size: 13px;
  border-radius: 10px;
  font-weight: 800
}

.user-action-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor
}

.user-more-menu {
  position: relative
}

.user-more-menu>summary {
  list-style: none
}

.user-more-menu>summary::-webkit-details-marker {
  display: none
}

.more-button {
  width: 44px;
  height: 42px;
  border: 1px solid #cfdced;
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  color: #0b2f67;
  transition: background .16s ease, border-color .16s ease
}

.more-button:hover {
  background: #f7faff;
  border-color: #9fc0eb
}

.more-button span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  display: block
}

.user-more-dropdown {
  position: absolute;
  right: 0;
  top: 50px;
  z-index: 40;
  width: 220px;
  padding: 7px;
  background: #fff;
  border: 1px solid #d7e1ee;
  border-radius: 12px;
  box-shadow: 0 16px 38px rgba(7, 27, 58, .18);
  display: grid;
  gap: 4px
}

.user-more-dropdown form {
  margin: 0
}

.menu-action {
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: #18304f;
  text-align: left;
  font: inherit;
  font-size: 13px;
  font-weight: 700
}

.menu-action:hover {
  background: #f5f8fc
}

.menu-action svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex: 0 0 18px
}

.danger-menu-action {
  color: #c62828;
  background: #fff7f6
}

.danger-menu-action:hover {
  background: #feeceb
}

.success-menu-action {
  color: #117a43;
  background: #f4fbf7
}

.success-menu-action:hover {
  background: #eaf8ef
}

.user-stats-reference {
  display: grid;
  grid-template-columns: 1.15fr 1fr .9fr .9fr 1.15fr;
  gap: 10px;
  padding-top: 13px;
  border-top: 1px solid #e8edf4
}

.user-stat-box {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #e3eaf3;
  border-radius: 11px;
  background: linear-gradient(180deg, #fbfdff, #f7faff);
  display: grid;
  gap: 4px
}

.user-stat-box>span {
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #65758d
}

.user-stat-box>strong {
  font-size: 13px;
  color: #10233f;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.user-status-dot {
  display: flex;
  align-items: center;
  gap: 7px
}

.user-status-dot::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #94a3b8;
  flex: 0 0 9px
}

.user-status-dot.is-active {
  color: #117a43
}

.user-status-dot.is-active::before {
  background: #16c55d
}

.user-status-dot.is-disabled {
  color: #b42318
}

.user-status-dot.is-disabled::before {
  background: #e05246
}

.password-dialog {
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  overflow: visible;
  max-width: min(480px, calc(100vw - 28px));
  width: 100%
}

.password-dialog::backdrop {
  background: rgba(4, 20, 44, .42);
  backdrop-filter: blur(2px)
}

.password-dialog-card {
  background: #fff;
  border: 1px solid #d8e2ef;
  border-radius: 16px;
  box-shadow: 0 24px 65px rgba(7, 27, 58, .25);
  padding: 20px;
  display: grid;
  gap: 18px
}

.password-dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px
}

.password-dialog-head>div {
  display: grid;
  gap: 3px
}

.password-dialog-head span {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--navy-2)
}

.password-dialog-head strong {
  font-size: 19px;
  color: #10233f
}

.dialog-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: #506079;
  font-size: 24px;
  line-height: 1;
  cursor: pointer
}

.dialog-close:hover {
  background: #f5f8fc
}

.password-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px
}

@media(max-width:1320px) {
  .users-layout-reference {
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr)
  }

  .user-stats-reference {
    grid-template-columns: repeat(3, minmax(100px, 1fr))
  }
}

@media(max-width:1120px) {
  .users-layout-reference {
    grid-template-columns: 1fr
  }

  .user-create-reference {
    position: static
  }
}

@media(max-width:820px) {
  .users-page-head {
    display: grid;
    gap: 14px
  }

  .users-overview-cards {
    width: 100%
  }

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

  .user-card-top {
    align-items: flex-start;
    display: grid
  }

  .user-card-actions {
    justify-content: flex-start
  }

  .user-stats-reference {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
}

@media(max-width:560px) {
  .users-overview-cards {
    display: grid;
    grid-template-columns: 1fr 1fr
  }

  .overview-card {
    padding: 12px !important
  }

  .overview-icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px
  }

  .user-main-reference {
    align-items: flex-start
  }

  .user-avatar-reference {
    width: 48px;
    height: 48px;
    flex-basis: 48px
  }

  .user-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 44px;
    width: 100%
  }

  .user-action-btn {
    width: 100%
  }

  .user-stats-reference {
    grid-template-columns: 1fr 1fr
  }

  .user-more-dropdown {
    right: 0;
    width: 210px
  }

  .password-dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr
  }
}


.brand:hover {
  transform: translateY(-1px);
  transition: transform .16s ease, box-shadow .16s ease;
  box-shadow: 0 14px 28px rgba(0, 0, 0, .16)
}

.sidebar .brand:hover {
  background: #dfe3e8
}
/* =========================================================
   SIDEBAR + LOGO BASTÓN LUZIA INTEGRADO
   PEGAR AL FINAL DE app.css
   ========================================================= */

/*
 * El sidebar ocupa toda la altura.
 * Quitamos el padding general para permitir que
 * la imagen toque completamente los bordes.
 */
.sidebar {
    background: linear-gradient(
        180deg,
        #071b3a 0%,
        #09254e 100%
    ) !important;

    color: #fff;

    padding: 0 !important;

    display: flex;
    flex-direction: column;

    gap: 0 !important;

    height: 100vh;
    min-height: 0;

    overflow: hidden;

    position: sticky;
    top: 0;

    border-right: 1px solid rgba(255, 255, 255, 0.06);
}


/* =========================================================
   LOGO / CABECERA DEL SIDEBAR
   ========================================================= */

.sidebar .brand {
    display: block !important;

    /*
     * Ocupa TODO el ancho del sidebar.
     * Ya no se ve como una tarjeta independiente.
     */
    width: 100% !important;

    /*
     * Respetamos aproximadamente la proporción
     * original de tu imagen 1024 x 500.
     */
    aspect-ratio: 1024 / 500;

    margin: 0 !important;
    padding: 0 !important;

    background: transparent !important;

    border: 0 !important;
    border-radius: 0 !important;

    box-shadow: none !important;

    overflow: hidden;

    flex-shrink: 0;
}


/*
 * La imagen llena completamente la cabecera.
 */
.sidebar .brand img {
    display: block !important;

    width: 100% !important;
    height: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    object-fit: cover !important;
    object-position: center !important;

    border: 0 !important;
    border-radius: 0 !important;

    box-shadow: none !important;
    filter: none !important;
}


/*
 * Evitamos cualquier efecto de "tarjeta"
 * cuando pasas el mouse.
 */
.sidebar .brand:hover {
    transform: none !important;

    background: transparent !important;

    border: 0 !important;

    box-shadow: none !important;
}


/* =========================================================
   MENÚ
   ========================================================= */

/*
 * Como quitamos el padding del sidebar,
 * ahora el espacio lateral se lo damos al menú.
 */
.sidebar .nav {
    display: grid;

    gap: 6px;

    min-height: 0;

    overflow-y: auto;
    overflow-x: hidden;

    /*
     * Espacio entre logo y primeras opciones.
     */
    padding: 18px 14px 8px !important;

    scrollbar-width: thin;
}


/*
 * Opciones del menú.
 */
.sidebar .nav a {
    position: relative;

    display: flex;

    align-items: center;

    gap: 11px;

    min-height: 46px;

    padding: 10px 12px;

    border-radius: 11px;

    text-decoration: none;

    color: #dce7f5;

    font-weight: 650;

    transition:
        background 0.16s ease,
        color 0.16s ease;
}


/*
 * Hover de las opciones.
 */
.sidebar .nav a:hover {
    background: rgba(255, 255, 255, 0.08);

    color: #fff;
}


/*
 * Opción seleccionada.
 */
.sidebar .nav a.active {
    background: linear-gradient(
        90deg,
        rgba(255, 196, 0, 0.16),
        rgba(255, 255, 255, 0.09)
    );

    color: #fff;

    border: 1px solid rgba(255, 255, 255, 0.08);

    box-shadow: none;
}


/*
 * Línea amarilla del menú seleccionado.
 */
.sidebar .nav a.active::before {
    content: "";

    position: absolute;

    left: -14px;

    top: 9px;
    bottom: 9px;

    width: 3px;

    background: #ffc400;

    border-radius: 0 4px 4px 0;
}


/* =========================================================
   PERFIL DEL USUARIO
   ========================================================= */

.sidebar .sidebar-user {
    margin-top: auto !important;

    /*
     * Recuperamos aquí el padding lateral.
     */
    padding:
        14px
        14px
        16px !important;

    border-top: 1px solid rgba(255, 255, 255, 0.13);

    display: grid;

    gap: 12px;

    flex-shrink: 0;
}


/* =========================================================
   BOTÓN CERRAR SESIÓN
   ========================================================= */

.sidebar .logout-link {
    display: flex;

    align-items: center;

    gap: 9px;

    min-height: 40px;

    padding: 9px 10px;

    border-radius: 10px;

    color: #dbe6f5 !important;

    text-decoration: none;

    font-size: 13px;

    font-weight: 700;

    background: rgba(255, 255, 255, 0.04);

    border: 1px solid rgba(255, 255, 255, 0.06);
}


.sidebar .logout-link:hover {
    background: rgba(255, 255, 255, 0.09);

    color: #fff !important;
}


/* =========================================================
   MÓVIL
   ========================================================= */

@media (max-width: 760px) {

    /*
     * El sidebar sigue ocultándose en móvil,
     * como ya lo tienes configurado.
     */
    .sidebar {
        display: none !important;
    }

}

/* =========================================================
   ELIMINAR LÍNEA ENTRE SIDEBAR Y CONTENIDO
   ========================================================= */

.sidebar {
    border-right: none !important;
    box-shadow: none !important;
}


/* El logo no tendrá ningún borde ni separación */
.sidebar .brand {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}


/* La imagen tampoco genera bordes */
.sidebar .brand img {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;

    display: block !important;
}


/* Evita espacios mínimos entre la imagen
   y el resto del sidebar */
.sidebar .brand {
    margin: 0 !important;
    padding: 0 !important;
}


/* El menú comienza inmediatamente debajo del logo */
.sidebar .nav {
    border: none !important;
    margin: 0 !important;
    padding: 18px 14px 8px !important;
}


/* Quitamos cualquier posible separación
   generada por el contenedor principal */
.app-shell {
    column-gap: 0 !important;
    gap: 0 !important;
}