/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Keep organizing styles into separate files for maintainability.
 */

/* ── Sidebar — mobile (off-canvas overlay) vs desktop (in-flow) ── */
.sidebar-component {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
}
@media (min-width: 768px) {
  .sidebar-component {
    position: relative;
    z-index: auto;
  }
}

/* ── Sidebar — item activo (estilo arkheon) ───────────────────── */
.sidebar-active {
  background-color: rgb(239 240 242);
  color: rgb(31 41 55);
}
.dark .sidebar-active {
  background-color: rgb(31 41 55);
  color: rgb(255 255 255);
}
.dark .sidebar-active svg {
  color: rgb(209 213 219);
}

.sidebar-component a {
  min-height: 36px;
}

.sidebar-component [data-action~="pointerdown->sidebar#startResize"]:hover {
  background-color: rgb(99 102 241);
}

.pagy.series-nav {
  display: flex;
  gap: 0.25rem;
}
.pagy.series-nav a {
  display: inline-flex;
  min-width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(229 231 235);
  border-radius: 0.5rem;
  padding: 0 0.5rem;
  color: rgb(75 85 99);
  font-size: 0.875rem;
}
.pagy.series-nav a:hover { background-color: rgb(249 250 251); }
.pagy.series-nav a[aria-current="page"] { background-color: rgb(79 70 229); border-color: rgb(79 70 229); color: white; }
.dark .pagy.series-nav a { border-color: rgb(55 65 81); color: rgb(209 213 219); }
.dark .pagy.series-nav a:hover { background-color: rgb(31 41 55); }

/* ── CRUD tables ─────────────────────────────────────────────────────── */
.crud-page { width: 100%; }
.crud-table-shell {
  overflow: hidden;
  border: 1px solid rgb(229 231 235);
  border-radius: 0.75rem;
  background: white;
}
.crud-table { min-width: 100%; border-collapse: collapse; }
.crud-table thead { background: rgb(249 250 251); }
.crud-table th {
  padding: 0.75rem 1.5rem;
  color: rgb(107 114 128);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-align: left;
  text-transform: uppercase;
}
.crud-table td { padding: 1rem 1.5rem; }
.crud-table tbody tr { border-top: 1px solid rgb(243 244 246); transition: background-color 150ms; }
.crud-table tbody tr:hover { background: rgb(249 250 251); }
.crud-row-selected { background: rgb(238 242 255) !important; }
.crud-checkbox { border-radius: 0.25rem; border-color: rgb(209 213 219); color: rgb(79 70 229); }
.crud-checkbox:focus { --tw-ring-color: rgb(99 102 241); }
.crud-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  padding: 0.375rem;
  color: rgb(107 114 128);
}
.crud-action:hover { background: rgb(243 244 246); color: rgb(79 70 229); }
.dark .crud-table-shell { border-color: rgb(55 65 81); background: rgb(31 41 55); }
.dark .crud-table thead { background: rgb(31 41 55 / 0.8); }
.dark .crud-table th { color: rgb(156 163 175); }
.dark .crud-table tbody tr { border-color: rgb(55 65 81 / 0.6); }
.dark .crud-table tbody tr:hover { background: rgb(55 65 81 / 0.5); }
.dark .crud-row-selected { background: rgb(49 46 129 / 0.45) !important; }
.dark .crud-action { color: rgb(156 163 175); }
.dark .crud-action:hover { background: rgb(55 65 81); color: rgb(165 180 252); }

/* Collapsed desktop sidebar: retain the icons and hide their labels. */
@media (min-width: 768px) {
  #sidebar[data-collapsed="true"] nav > div,
  #sidebar[data-collapsed="true"] nav a span {
    display: none;
  }

  #sidebar[data-collapsed="true"] nav a {
    justify-content: center;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

}
