:root {
  color-scheme: light;
  --serena-sidebar-width: 14rem;
}

html {
  scrollbar-gutter: stable;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid #f97316;
  outline-offset: 2px;
}

.app-sidebar {
  background: #243f3f;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.app-sidebar-nav {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.app-workspace {
  transition: margin-left 180ms ease;
}

.app-main {
  background: #f6f8fa;
}

.app-content-frame {
  width: 100%;
  max-width: 90rem;
}

.app-content-frame.space-y-10 > :not([hidden]) ~ :not([hidden]) {
  margin-top: 1.75rem;
}

.serena-data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.serena-data-table thead th {
  padding: 0.7rem 1rem;
  border-top: 1px solid #e5eaf0;
  border-bottom: 1px solid #e5eaf0;
  background: #f7f9fb;
  color: #536273;
  font-size: 0.6875rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
}

.serena-data-table thead th:first-child {
  border-left: 1px solid #e5eaf0;
  border-radius: 6px 0 0 6px;
}

.serena-data-table thead th:last-child {
  border-right: 1px solid #e5eaf0;
  border-radius: 0 6px 6px 0;
}

.serena-data-table tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #edf0f3;
  vertical-align: middle;
}

.serena-data-table tbody tr {
  transition: background-color 120ms ease;
}

.serena-data-table tbody tr:hover {
  background: #f7f9fa;
}

.serena-data-table tbody tr:focus-within {
  background: #f2f6f6;
}

.serena-data-table tbody tr:last-child td {
  border-bottom-color: transparent;
}

.serena-data-table--compact thead th {
  padding: 0.6rem 0.75rem;
}

.serena-data-table--compact tbody td {
  padding: 0.65rem 0.75rem;
}

.serena-record-list > li {
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid #edf0f3;
  border-radius: 6px;
  transition: background-color 120ms ease;
}

.serena-record-list > li:hover {
  background: #f7f9fa;
}

.serena-record-list > li:last-child {
  border-bottom-color: transparent;
}

.serena-navigation-progress {
  position: fixed;
  z-index: 300000;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms ease;
}

.serena-navigation-progress span {
  display: block;
  width: 38%;
  height: 100%;
  background: #f97316;
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.4);
  transform: translateX(-110%);
}

.serena-navigation-progress.is-active {
  opacity: 1;
}

.serena-navigation-progress.is-active span {
  animation: serena-progress 1.05s ease-in-out infinite;
}

.serena-submit-loading {
  position: relative;
  min-width: 8rem;
  cursor: wait !important;
}

.serena-submit-loading > * {
  visibility: hidden !important;
}

.serena-submit-loading::after {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.75rem;
  color: currentColor;
  content: "Traitement...";
  font-size: 0.75rem;
  font-weight: 600;
}

@keyframes serena-progress {
  0% {
    transform: translateX(-110%);
  }
  60% {
    transform: translateX(170%);
  }
  100% {
    transform: translateX(280%);
  }
}

@media (max-width: 1023px) {
  .app-content-frame.space-y-10 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 1.5rem;
  }
}

@media (max-width: 767px) {
  .serena-data-table thead th,
  .serena-data-table tbody td {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
