:root {
  /* Light — quiet neutral surface, single muted accent */
  --color-surface: #f6f6f3;
  --color-surface-raised: #ffffff;
  --color-text: #1d1d1b;
  --color-muted: #6c6c66;
  --color-border: #e3e2dc;

  --color-primary: #24262a;
  --color-primary-contrast: #f4f4f2;
  --color-accent: #2f6f5e;
  --color-accent-contrast: #ffffff;
  --color-caution: #a9760f;
  --color-caution-bg: #f5e6c8;
  --color-danger: #a8402c;
  --color-success: #2f6f5e;
  --color-success-bg: #dcece5;

  --font-body: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;

  --radius: 6px;
  --radius-lg: 10px;
  --duration-fast: 130ms;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-surface: #17181a;
    --color-surface-raised: #1e2023;
    --color-text: #e8e7e3;
    --color-muted: #9a9a93;
    --color-border: #323436;

    --color-primary: #101113;
    --color-primary-contrast: #f0efec;
    --color-accent: #4fa78a;
    --color-accent-contrast: #0f1210;
    --color-caution: #d9ac57;
    --color-caution-bg: #3a3020;
    --color-danger: #e0806e;
    --color-success: #4fa78a;
    --color-success-bg: #1d332b;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--color-accent);
  color: var(--color-accent-contrast);
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

main {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-md) var(--space-sm) var(--space-lg);
}

h1, h2, h3, h4 {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-sm);
}

h2 {
  font-size: 1.3rem;
  color: var(--color-text);
}

h3 {
  font-size: 1.05rem;
}

h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-muted);
}

/* Topbar */

.topbar {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 0.75rem var(--space-md);
  background: var(--color-primary);
  color: var(--color-primary-contrast);
}

.topbar-brand {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}

.topbar-nav {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  gap: var(--space-md);
  flex: 1;
  min-width: 0;
}

.topbar-nav::-webkit-scrollbar {
  display: none;
}

.topbar-nav a {
  color: rgb(244 244 242 / 0.6);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
  transition: color var(--duration-fast) var(--ease-out-expo);
}

.topbar-nav a:hover {
  color: var(--color-primary-contrast);
}

.topbar-nav a.active {
  color: var(--color-primary-contrast);
  border-bottom-color: var(--color-accent);
}

.topbar-user {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-xs);
  min-width: 0;
}

.topbar-name {
  font-size: 0.82rem;
  color: rgb(244 244 242 / 0.75);
}

.topbar button.secondary {
  color: var(--color-primary-contrast);
  border-color: rgb(244 244 242 / 0.25);
}

.topbar button.secondary:hover {
  border-color: rgb(244 244 242 / 0.5);
  color: var(--color-primary-contrast);
}

.badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgb(244 244 242 / 0.14);
  color: var(--color-primary-contrast);
}

.badge-superadmin {
  background: rgb(244 244 242 / 0.18);
}

.badge-admin {
  background: rgb(244 244 242 / 0.18);
}

.badge-empleado {
  background: rgb(244 244 242 / 0.12);
}

.badge-pendiente,
.badge-completa {
  border-radius: 999px;
}

.badge-pendiente {
  color: var(--color-caution);
  background: var(--color-caution-bg);
}

.badge-completa {
  color: var(--color-success);
  background: var(--color-success-bg);
}

/* Auth page */

.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
}

.auth-card {
  width: 100%;
  max-width: 360px;
  padding: var(--space-lg) var(--space-md) var(--space-md);
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 12px 32px -16px rgb(0 0 0 / 0.18);
}

.auth-card h1 {
  font-size: 1.3rem;
  margin: 0 0 0.35rem;
}

.auth-subtitle {
  color: var(--color-muted);
  font-size: 0.88rem;
  margin: 0 0 var(--space-md);
}

.auth-card button[type="submit"] {
  width: 100%;
  margin-top: 0.25rem;
}

/* Forms */

fieldset {
  border: none;
  padding: 0;
  margin: 0 0 var(--space-sm);
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: var(--space-xs);
  font-size: 0.82rem;
  color: var(--color-muted);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
}

input,
textarea,
select {
  width: 100%;
  height: 2.5rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface-raised);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.4;
  margin-bottom: var(--space-sm);
  transition: border-color var(--duration-fast) var(--ease-out-expo);
}

textarea {
  height: auto;
}

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.1rem;
}

/* La flecha del select vive en un elemento aparte (::after del wrapper),
   no como background-image del <select> mismo. Pintarla como fondo del
   propio control nativo es frágil en iOS Safari — el cálculo de
   background-position sobre un <select> con appearance:none se descuadra
   ahí de forma crónica (probado con varias sintaxis, ninguna se sostuvo).
   Un elemento independiente y posicionado con absolute no depende en nada
   de cómo iOS renderiza el control nativo por dentro. */
.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.6rem;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%236c6c66' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 8L10 12.5L14.5 8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 16px;
  pointer-events: none;
}

@media (prefers-color-scheme: dark) {
  .select-wrap:not([data-theme="light"] *)::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%239a9a93' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 8L10 12.5L14.5 8'/%3E%3C/svg%3E");
  }
}

input[type="date"],
input[type="datetime-local"] {
  color-scheme: light dark;
}

/* iOS Safari fuerza box-sizing: content-box en input[type="date"] pase lo
   que digamos en CSS, así que padding y borde se suman POR FUERA del ancho
   que le damos (de ahí el desborde) y también queda más alto de lo normal.
   appearance: none normaliza eso sin quitar el selector nativo de fecha.
   @supports (-webkit-touch-callout: none) detecta Safari de iOS
   específicamente (no aplica en desktop ni en otros navegadores). Fuente:
   https://gomakethings.com/articles/fixing-temporal-input-styling-in-safari/ */
@supports (-webkit-touch-callout: none) {
  input[type="date"],
  input[type="datetime-local"] {
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
}

input:hover,
textarea:hover,
select:hover {
  border-color: #b9b8b0;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--color-accent);
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 4rem;
}

button {
  cursor: pointer;
  border: none;
  border-radius: var(--radius);
  padding: 0.55rem 1rem;
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 600;
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  transition: background var(--duration-fast) var(--ease-out-expo);
}

button:hover {
  background: color-mix(in srgb, var(--color-accent) 88%, black);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  padding: calc(0.55rem - 1px) calc(1rem - 1px);
}

button.secondary:hover {
  border-color: #b9b8b0;
  background: var(--color-surface);
}

button.danger {
  background: transparent;
  color: var(--color-danger);
  border: 1px solid var(--color-danger);
  padding: calc(0.55rem - 1px) calc(1rem - 1px);
}

button.danger:hover {
  background: var(--color-danger);
  color: #fff;
}

.button-link {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  text-decoration: none;
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  font-size: 0.86rem;
  font-weight: 600;
  transition: background var(--duration-fast) var(--ease-out-expo);
}

.button-link:hover {
  background: color-mix(in srgb, var(--color-accent) 88%, black);
}

.form-card {
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

.evidence-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

@media (max-width: 640px) {
  .evidence-grid {
    grid-template-columns: 1fr;
  }
}

.evidence-fieldset {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-sm);
  background: var(--color-surface-raised);
}

.evidence-fieldset legend {
  padding: 0;
  margin-bottom: var(--space-sm);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--color-text);
}

.dropzone {
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-md);
  text-align: center;
  cursor: pointer;
  color: var(--color-muted);
  transition: border-color var(--duration-fast) var(--ease-out-expo),
    background var(--duration-fast) var(--ease-out-expo);
}

.dropzone p {
  margin: 0.2rem 0;
  font-size: 0.9rem;
}

.dropzone-hint {
  font-size: 0.78rem !important;
  color: var(--color-muted);
}

.dropzone:hover,
.dropzone:focus-visible {
  border-color: var(--color-accent);
  outline: none;
}

.dropzone.drag-active {
  border-color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 6%, transparent);
  color: var(--color-text);
}

.thumb-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.thumb-item {
  position: relative;
  width: 84px;
  height: 84px;
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.thumb-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 999px;
  background: var(--color-danger);
  color: #fff;
  font-size: 0.8rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Carousel (carrusel compacto embebido, Swiper) */

.compact-swiper {
  height: 260px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  --swiper-navigation-size: 20px;
  --swiper-navigation-color: var(--color-text);
}

.compact-swiper .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  /* Safari a veces no actualiza el cursor en hover sobre elementos con
     transform 3D (el truco de aceleración por GPU que usa cada slide de
     Swiper) — se repite cursor: zoom-in en toda la cadena de ancestros
     para que, sea cual sea el que Safari use para el hit-test, lo tenga. */
  cursor: zoom-in;
}

.compact-swiper .swiper-zoom-container {
  cursor: zoom-in;
}

.compact-swiper .swiper-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: zoom-in;
}

.compact-swiper .swiper-pagination-fraction {
  bottom: 8px;
  left: 50%;
  width: auto;
  transform: translateX(-50%);
  background: rgb(0 0 0 / 0.55);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
}

.carousel-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: var(--space-xs) 0 var(--space-md);
}

/* Modal form actions */

.modal-actions {
  display: flex;
  gap: var(--space-sm);
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: start;
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-sm);
  margin-bottom: var(--space-md);
}

.inline-form input,
.inline-form select {
  width: auto;
  min-width: 160px;
  margin-bottom: 0;
}

.inline-form button {
  height: fit-content;
  align-self: end;
}

#status,
#login-error {
  min-height: 1.2rem;
  font-size: 0.9rem;
  color: var(--color-muted);
}

#status a {
  color: var(--color-accent);
  font-weight: 600;
}

#login-error {
  color: var(--color-danger);
}

/* Table */

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: var(--space-lg) 0 var(--space-sm);
}

.panel-header:first-of-type {
  margin-top: 0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface-raised);
}

.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-xs);
}

.table-counter {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-muted);
}

.pager {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.pager[hidden] {
  display: none;
}

.pager-status {
  font-size: 0.85rem;
  color: var(--color-muted);
}

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

th,
td {
  text-align: left;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.87rem;
}

th {
  background: var(--color-surface);
  color: var(--color-muted);
  font-weight: 600;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

td {
  font-variant-numeric: tabular-nums;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr {
  transition: background var(--duration-fast) var(--ease-out-expo);
}

tbody tr:hover {
  background: var(--color-surface);
}

.empty-state {
  color: var(--color-muted);
  text-align: center;
  padding: var(--space-md);
}

/* Icon buttons + tooltips */

.icon-actions {
  display: flex;
  gap: 0.2rem;
  align-items: center;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--radius);
  background: transparent;
  border: 1px solid transparent;
  color: var(--color-muted);
  text-decoration: none;
}

.icon-btn svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.icon-btn:hover {
  background: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-text);
}

.icon-btn.icon-btn-danger {
  color: var(--color-danger);
}

.icon-btn.icon-btn-danger:hover {
  background: color-mix(in srgb, var(--color-danger) 10%, transparent);
  border-color: var(--color-danger);
}

.icon-btn.icon-btn-accent {
  color: var(--color-accent);
}

.icon-btn.icon-btn-accent:hover {
  background: color-mix(in srgb, var(--color-accent) 10%, transparent);
  border-color: var(--color-accent);
}

.icon-tooltip {
  position: fixed;
  transform: translate(-50%, -100%);
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.3rem 0.55rem;
  border-radius: var(--radius);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 2000;
  transition: opacity var(--duration-fast) var(--ease-out-expo);
}

.icon-tooltip-visible {
  opacity: 1;
}

/* Modal */

dialog {
  border: none;
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  max-width: 560px;
  width: 90vw;
  color: var(--color-text);
  background: var(--color-surface-raised);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 20px 48px -16px rgb(0 0 0 / 0.28);
}

dialog::backdrop {
  background: rgb(20 20 18 / 0.4);
}

/* Confirm dialog: reemplazo estético de confirm() nativo */

.confirm-dialog {
  max-width: 420px;
}

.confirm-dialog-message {
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

.confirm-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
}

/* Info dialog: aviso de una sola acción (éxito, etc.) */

.info-dialog {
  max-width: 420px;
}

.info-dialog-message {
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

.info-dialog-actions {
  display: flex;
  justify-content: flex-end;
}

/* Lightbox: carrusel completo agrandado (Swiper) al hacer click en una foto */

.lightbox {
  padding: 0;
  border: none;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  background: transparent;
  box-shadow: none;
}

.lightbox::backdrop {
  background: rgb(0 0 0 / 0.9);
}

.lightbox-swiper {
  width: 100%;
  height: 100%;
  --swiper-navigation-color: #fff;
  --swiper-pagination-color: #fff;
}

.lightbox .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox .swiper-zoom-container img {
  display: block;
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox-close,
.lightbox-download {
  position: fixed;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: none;
  background: rgb(255 255 255 / 0.14);
  color: #fff;
  z-index: 20;
  transition: background var(--duration-fast) var(--ease-out-expo);
}

.lightbox-close svg,
.lightbox-download svg {
  width: 26px;
  height: 26px;
}

.lightbox-close,
.lightbox-download {
  top: var(--space-md);
}

.lightbox-close {
  right: var(--space-md);
}

.lightbox-download {
  right: calc(var(--space-md) * 2 + 52px);
}

.lightbox-close:hover {
  background: var(--color-danger);
}

.lightbox-download:hover {
  background: var(--color-success);
}

/* Toasts */

#toast-container {
  position: fixed;
  bottom: var(--space-md);
  right: var(--space-md);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  max-width: min(360px, calc(100vw - 2 * var(--space-md)));
}

.toast {
  background: var(--color-surface-raised);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-muted);
  border-radius: var(--radius);
  padding: 0.7rem 0.9rem;
  font-size: 0.85rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 12px 28px -12px rgb(0 0 0 / 0.25);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--duration-fast) var(--ease-out-expo), transform var(--duration-fast) var(--ease-out-expo);
}

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

.toast-success {
  border-left-color: var(--color-success);
}

.toast-error {
  border-left-color: var(--color-danger);
}

.toast-info {
  border-left-color: var(--color-accent);
}

@media (max-width: 640px) {
  #toast-container {
    left: var(--space-md);
    right: var(--space-md);
    max-width: none;
  }
}

.gallery h4 {
  margin-bottom: var(--space-xs);
}

#avances-modal {
  max-width: 640px;
}

.avance-card {
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: var(--space-sm);
  background: var(--color-surface);
  overflow: hidden;
  transition: border-left-color var(--duration-fast) var(--ease-out-expo);
}

.avance-card[open] {
  border-left-color: var(--color-accent);
}

.avance-card summary {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm);
  cursor: pointer;
  font-weight: 600;
  color: var(--color-text);
  list-style: none;
}

.avance-card summary::-webkit-details-marker {
  display: none;
}

.avance-card summary:hover {
  background: var(--color-surface-raised);
}

.avance-chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--color-muted);
  transition: transform var(--duration-fast) var(--ease-out-expo);
}

.avance-card[open] .avance-chevron {
  transform: rotate(90deg);
  color: var(--color-accent);
}

.avance-day {
  flex: 1;
}

.avance-count {
  background: color-mix(in srgb, var(--color-accent) 14%, transparent);
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

.avance-card .gallery {
  padding: 0 var(--space-sm) var(--space-sm);
}

.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.thumbs img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

@media (max-width: 900px) {
  .topbar {
    flex-wrap: wrap;
  }

  .topbar-brand {
    width: 100%;
  }

  .topbar-nav {
    order: 3;
    width: 100%;
    flex-wrap: wrap;
    overflow-x: visible;
    gap: var(--space-sm);
  }

  .topbar-user {
    order: 2;
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 640px) {
  .panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
  }

  .inline-form {
    flex-direction: column;
    align-items: stretch;
  }

  .inline-form input,
  .inline-form select {
    width: 100%;
    min-width: 0;
  }
}
