:root {
  font:
    16px Arial,
    Helvetica,
    sans-serif;
  color: #15263e;
  background: #f6f8ff;
  --blue: #073dca;
  --line: #e5ebf5;
  --muted: #536b8b;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.button {
  min-height: 44px;
  padding: 10px 15px;
  border: 1px solid #ccd8ee;
  border-radius: 6px;
  background: white;
  color: #304c70;
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
button:disabled {
  cursor: not-allowed;
  color: #65768c;
  background: #edf0f7;
}
.primary {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}
a {
  color: var(--blue);
}
:focus-visible {
  outline: 3px solid #d48e00;
  outline-offset: 3px;
}
input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px;
  border: 1px solid #cbd7eb;
  border-radius: 6px;
  background: white;
  color: inherit;
}
input[type="checkbox"],
input[type="radio"] {
  width: 22px;
  min-height: 22px;
}
textarea {
  min-height: 100px;
  resize: vertical;
}
label {
  display: grid;
  gap: 7px;
  font-size: 0.92rem;
  color: #334c6e;
}
label.check {
  display: flex;
  align-items: center;
}
h1 {
  font-size: 26px;
  margin: 0 0 20px;
}
h2 {
  font-size: 20px;
  margin: 0 0 16px;
}
h3 {
  font-size: 17px;
}
p {
  line-height: 1.5;
}
small,
.muted {
  color: var(--muted);
}
.top {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-size: 26px;
  letter-spacing: -1px;
  font-weight: 800;
  color: inherit;
  text-decoration: none;
}
.top .chip {
  margin-left: auto;
}
.context {
  background: white;
  border-bottom: 1px solid var(--line);
  padding: 8px 14px;
  display: flex;
  gap: 8px;
}
.context select {
  min-height: 34px;
  padding: 4px;
  width: 50%;
  font-size: 13px;
}
.chip {
  display: inline-block;
  padding: 5px 9px;
  background: #edf2ff;
  color: #28466b;
  border-radius: 4px;
  font-size: 12px;
}
.chip.warn {
  background: #fff3d8;
  color: #795400;
}
.chip.good {
  background: #e6f5f0;
  color: #006c56;
}
nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: white;
  display: flex;
  z-index: 5;
  border-top: 1px solid var(--line);
}
nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  color: #465c7b;
  text-decoration: none;
}
nav a[aria-current="page"] {
  color: var(--blue);
  font-weight: 700;
}
nav svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}
main {
  padding: 20px 12px 96px;
  max-width: 1400px;
  margin: auto;
}
.card {
  padding: 18px 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 16px;
  overflow-wrap: anywhere;
}
.card h2 {
  margin-top: 0;
}
.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.between {
  justify-content: space-between;
}
.stack {
  display: grid;
  gap: 14px;
}
.grid {
  display: grid;
  gap: 14px;
}
.two {
  display: grid;
  gap: 16px;
}
.notice {
  padding: 12px;
  border: 1px solid #d2dff6;
  border-radius: 8px;
  background: #edf3ff;
  margin-bottom: 16px;
}
.notice.error {
  background: #fff3e8;
  border-color: #ebcdb4;
}
.error-text {
  color: #a52b17;
}
.tabs {
  display: flex;
  gap: 6px;
  overflow: auto;
  border-bottom: 1px solid var(--line);
  padding: 6px 0 10px;
  margin-bottom: 18px;
  scroll-behavior: smooth;
}
.tabs button {
  white-space: nowrap;
  border: 0;
  background: transparent;
}
.tabs button[aria-selected="true"] {
  color: var(--blue);
  border-bottom: 3px solid var(--blue);
  border-radius: 0;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
td,
th {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 14px 8px;
}
th {
  color: #526b8e;
  background: #f3f6fe;
  font-size: 12px;
}
.table-wrap {
  overflow: auto;
}
.desktop-list {
  display: none;
}
.result-link {
  color: inherit;
  text-decoration: none;
  display: block;
}
.entry {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.photo-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
}
.photo-grid a {
  display: block;
}
fieldset {
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 8px;
}
legend {
  padding: 0 5px;
}
dialog {
  max-width: 95vw;
  border: 1px solid var(--line);
  border-radius: 12px;
}
dialog img {
  max-width: 85vw;
  max-height: 75vh;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
}
.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 10px;
  top: 10px;
  z-index: 20;
  background: white;
  padding: 15px;
}
.field-error {
  color: #a52b17;
  font-size: 13px;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.floating {
  position: sticky;
  bottom: 76px;
  display: flex;
  justify-content: flex-end;
}
.pending {
  color: #705100;
  background: #fff5d8;
  padding: 8px;
  border-radius: 5px;
}
.login {
  max-width: 450px;
  margin: 12vh auto;
}
.login-version {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}
.update {
  background: #fff1c9;
  padding: 10px;
  text-align: center;
}
.hide {
  display: none !important;
}
@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .card {
    padding: 22px;
  }
  .two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .top {
    height: 54px;
    padding: 0 24px;
  }
  .context {
    height: 46px;
    padding-left: 214px;
  }
  .context select {
    max-width: 260px;
  }
  nav {
    top: 54px;
    bottom: 0;
    width: 190px;
    height: auto;
    right: auto;
    display: block;
    border-top: 0;
    border-right: 1px solid var(--line);
    padding-top: 70px;
  }
  nav a {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    font-size: 14px;
    padding: 18px 20px;
  }
  main {
    margin-left: 190px;
    padding: 24px;
    max-width: none;
  }
  .desktop-list {
    display: block;
  }
  .mobile-list {
    display: none;
  }
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .floating {
    bottom: 22px;
  }
  .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .wide {
    grid-column: 1/-1;
  }
  .login {
    margin: 10vh auto;
    max-width: 500px;
  }
  .context {
    position: relative;
    z-index: 6;
  }
  .two {
    align-items: start;
  }
}
.form-grid {
  display: grid;
  gap: 16px;
}
.file-control {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  padding: 12px 16px;
  border: 1px solid #cbd7eb;
  border-radius: 6px;
  background: white;
  font-weight: 600;
  overflow: hidden;
}
.file-control input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.file-control:focus-within {
  outline: 3px solid #d48e00;
  outline-offset: 3px;
}
.desktop-list.table-wrap {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 14px 0;
}
.selected-context {
  white-space: normal;
  overflow-wrap: break-word;
  margin-bottom: 0;
}
.catalog-table td {
  word-break: normal;
  overflow-wrap: normal;
}
@media (max-width: 639px) {
  .catalog-table,
  .catalog-table tbody {
    display: block;
    width: 100%;
  }
  .catalog-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .catalog-table tr {
    display: block;
    border: 1px solid var(--line);
    border-radius: 10px;
    margin-bottom: 14px;
    padding: 12px;
  }
  .catalog-table td {
    display: block;
    width: 100%;
    border: 0;
    padding: 7px 0;
    overflow-wrap: break-word;
  }
  .catalog-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 5px;
  }
  .catalog-table .catalog-name {
    font-size: 17px;
    font-weight: 600;
  }
  .catalog-table .row {
    gap: 8px;
  }
}
[hidden] {
  display: none !important;
}

/* Task 11: scoped management and the account footer use the existing tokens. */
.nav-full, .management-nav { display: none; }
.sidebar-account { display: none; }
nav .management-mobile { display: flex; }
.listado-ref { white-space: nowrap; min-width: 7.5rem; overflow-wrap: normal; word-break: normal; }
.member-row { border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.conflict-json { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 22rem; overflow: auto; }
.conflict-edit { min-height: 9rem; width: 100%; font-family: monospace; }
@media (min-width: 1024px) {
  nav { display: flex; flex-direction: column; padding-top: 16px; overflow-y: auto; }
  nav a { flex: 0 0 auto; padding: 14px 16px; }
  .nav-short, nav .management-mobile { display: none; }
  .nav-full, .management-nav { display: block; }
  .management-nav summary { cursor: pointer; padding: 14px 16px; min-height: 46px; }
  .management-nav a { padding: 10px 16px 10px 30px; }
  .sidebar-account { display: grid; gap: 10px; margin-top: auto; padding: 16px; border-top: 1px solid var(--line); }
  .sidebar-account select { width: 100%; min-width: 0; }
  .sidebar-account .logout-icon { width: 46px; justify-self: start; font-size: 24px; }
}

.mobile-account { position: relative; }
.mobile-account summary { cursor: pointer; padding: 12px 6px; min-height: 46px; font-size: 14px; }
.mobile-account-panel { display: grid; gap: 10px; position: absolute; right: 0; top: 46px; width: 260px; padding: 16px; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 28px #15263e22; }
.mobile-account-panel select { width: 100%; }
.logout-icon { width: 46px; height: 46px; justify-self: start; }
.logout-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.6; }
@media (max-width: 1023px) { .header-user { display: none; } }
@media (min-width: 1024px) { .mobile-account { display: none; } nav { top: 100px; } }

/* Task 12: human conflict content and local photo placeholders only. */
.conflict-dependents { padding-left: 22px; }
.conflict-dependents li { margin: 10px 0; }
.conflict-actions { margin: 20px 0; }
.conflict-technical { margin-top: 18px; }
.link-code { font-size: 28px; letter-spacing: .12em; padding: 16px 0; display: block; }
.link-preview { overflow-wrap: anywhere; }
.photo-grid .photo-item { min-width: 0; }
.photo-grid .photo-item > .notice { padding: 10px; overflow-wrap: normal; word-break: normal; }

/* Tablet phase 1: common dark rail + drawer. Other screen layouts are unchanged. */
.app-shell { --rail-width: 160px; }
.app-shell > .top { position: sticky; top: 0; z-index: 20; height: 60px; padding: 8px 16px; }
.app-shell .header-work { width: min(32vw, 340px); min-width: 110px; min-height: 44px; font-size: 14px; }
.app-shell .top .brand { width: 128px; flex-shrink: 0; }
.app-shell .sidebar {
  position: fixed; inset: 60px auto 0 0; width: var(--rail-width); height: auto;
  background: #14243d; color: #f5f8ff; border: 0; padding: 12px 0;
  display: flex; flex-direction: column; overflow-y: auto; z-index: 15;
}
.app-shell .sidebar > a { flex: 0 0 auto; flex-direction: row; justify-content: flex-start; padding: 12px; gap: 10px; min-height: 56px; color: #e4ecff; font-size: 14px; }
.app-shell .sidebar a[aria-current=page] { background: #294c86; color: white; box-shadow: inset 3px 0 #8fb8ff; }
.app-shell .sidebar svg { width: 20px; height: 20px; flex-shrink: 0; }
.app-shell .nav-full { display: block; }
.app-shell .nav-short, .app-shell .management-mobile, .app-shell .mobile-account { display: none; }
.app-shell .management-nav { display: block; }
.app-shell .management-nav summary { padding: 14px 12px; min-height: 48px; cursor: pointer; font-size: 14px; }
.app-shell .management-nav a { color: #e4ecff; font-size: 14px; padding: 12px 16px; min-height: 44px; }
.app-shell .sidebar-account { display: grid; gap: 10px; margin-top: auto; padding: 16px 12px 4px; border-top: 1px solid #40526e; font-size: 14px; }
.app-shell .sidebar-account label, .app-shell .sidebar-account small { color: #d5e1f5; font-size: 14px; }
.app-shell .sidebar-account strong { overflow-wrap: break-word; }
.app-shell .sidebar-account select { min-width: 0; width: 100%; font-size: 14px; color: #15263e; padding: 8px 4px; }
.app-shell .sidebar-account .logout-icon { color: #e4ecff; background: transparent; border-color: #657b9c; justify-self: start; }
.app-shell > main { margin-left: var(--rail-width); padding: 24px 16px 96px; max-width: none; min-width: 0; }
.menu-toggle, .menu-backdrop, .drawer-close { display: none; }
@media (max-width: 1023px) {
  .app-shell > .top { padding: 8px 12px; gap: 8px; }
  .app-shell > main { margin-left: 0; padding: 20px 12px 96px; }
  .app-shell .sidebar { inset: 0 auto 0 0; width: min(272px, 85vw); z-index: 40; visibility: hidden; transform: translateX(-100%); }
  .app-shell.sidebar-open .sidebar { visibility: visible; transform: translateX(0); }
  .menu-toggle, .drawer-close { display: inline-flex; }
  .menu-toggle { width: 44px; padding: 8px; font-size: 22px; flex-shrink: 0; }
  .drawer-close { margin: 0 12px 12px; align-self: start; }
  .sidebar-open .menu-backdrop { display: block; position: fixed; inset: 0; width: 100%; height: 100%; z-index: 30; border: 0; border-radius: 0; background: #0b162c80; }
  .app-shell .header-work { width: 0; flex: 1; min-width: 0; }
  .app-shell .top .chip { flex-shrink: 0; max-width: 155px; }
}
@media (max-width: 639px) { .app-shell .top .brand { display: none; } }

/* Always a table, including mobile; only its own viewport scrolls horizontally. */
.listado-screen { min-width: 0; }
.listado-heading { margin-bottom: 16px; }
.listado-heading h1 { margin: 0; }
.filter-bar { display: grid; grid-template-columns: minmax(140px, 2fr) repeat(3, minmax(90px, 1fr)) auto auto auto; gap: 8px; align-items: end; }
.listado-filters { margin-bottom: 16px; position: relative; }
.listado-filters label { font-size: 14px; }
.listado-filters input, .listado-filters select { font-size: 14px; min-width: 0; }
.filter-bar > details > summary { cursor: pointer; min-height: 44px; padding: 12px 10px; white-space: nowrap; border: 1px solid #cbd7eb; border-radius: 6px; background: white; font-size: 14px; }
.filter-bar > details[open] > summary { border-color: var(--blue); }
.extra-filters > .grid, .column-picker > .column-options { position: absolute; z-index: 12; top: 100%; right: 0; width: min(720px, 100%); max-height: min(65dvh, 600px); overflow: auto; background: white; padding: 16px; border: 1px solid #cbd7eb; border-radius: 8px; box-shadow: 0 8px 24px #15263e22; }
.column-options { display: grid; gap: 10px; }
.listado-master { display: grid; min-width: 0; gap: 16px; }
.listado-screen .desktop-list { display: block; min-width: 0; margin: 0; border-radius: 8px; height: clamp(320px, 60dvh, 720px); overscroll-behavior: contain; }
.listado-table { width: 100%; min-width: 0; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.listado-table tr { height: 48px; }
.listado-table td, .listado-table th { height: 48px; padding: 0 8px; font-size: 14px; line-height: 20px; white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.listado-table th { position: sticky; top: 0; z-index: 3; background: #eef3fc; }
.listado-table td { background: white; cursor: pointer; }
.listado-table .listado-ref { position: sticky; left: 0; z-index: 2; min-width: 0; box-shadow: 1px 0 var(--line); overflow: hidden; }
.listado-table th.listado-ref { z-index: 4; }
.listado-table tr.selected td { background: #e4eeff; }
.listado-table tr:hover td { background: #f0f5ff; }
.listado-table tr.selected:hover td { background: #dce9ff; }
.listado-table .pending-mark { display: inline-block; width: 9px; height: 9px; margin-left: 8px; border-radius: 50%; background: #a66700; }
.listado-detail { display: none; min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: white; overflow: auto; overscroll-behavior: contain; }
.detail-pairs { display: grid; grid-template-columns: minmax(95px, 1fr) minmax(0, 2fr); gap: 12px; font-size: 14px; }
.detail-pairs dt { color: var(--muted); }
.detail-pairs dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.listado-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.listado-footer .notice { margin: 0; flex: 1; min-width: 170px; font-size: 14px; }
.listado-footer .row { margin-left: auto; }
@media (min-width: 1024px) {
  .listado-master.has-detail { grid-template-columns: minmax(0, 1fr) clamp(260px, 24vw, 300px); }
  .listado-screen .desktop-list, .listado-detail { height: clamp(360px, calc(100dvh - 260px), 820px); }
  .listado-master.has-detail .listado-detail { display: block; }
}
@media (max-width: 1023px) {
  .filter-bar { grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; }
  .filter-bar > label { min-width: 0; }
  .filter-bar > details, .filter-bar > button { min-width: 0; }
  /* The form is the positioned ancestor, outside the scrollable single row. */
  .extra-filters > .grid, .column-picker > .column-options { width: 100%; max-height: 60dvh; }
}

/* Phase 2: default list columns fit tablets; only extra columns need the safety net. */
.filter-bar > label { min-width: 0; }
.listado-table .listado-ref a { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 639px) {
  .filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-bar > label:first-child { grid-column: 1 / -1; }
  .listado-table[data-layout=default] { min-width: 620px; }
}

/* Visita uses one scoped snapshot for room counts and avance rows. */
.visita-screen { min-width: 0; }
.visit-work { margin-top: -8px; }
.visit-context-actions { margin: 12px 0 18px; }
.visit-counts { margin: 0; font-size: 14px; }
.visit-master { display: grid; gap: 16px; min-width: 0; align-items: start; }
.visit-room-panel, .visit-record-panel { min-width: 0; padding: 16px; background: white; border: 1px solid var(--line); border-radius: 8px; }
.visit-master h2 { font-size: 18px; margin: 0 0 12px; }
.visit-records-heading { margin-bottom: 12px; }
.visit-records-heading h2 { margin: 0; }
.visit-table-wrap { overflow: auto; overscroll-behavior: contain; }
.visit-room-scroll { max-height: 300px; }
.visit-record-scroll { max-height: 60dvh; }
.visit-master table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 14px; }
.visit-master tr, .visit-master th, .visit-master td { height: 48px; }
.visit-master th, .visit-master td { padding: 5px 8px; font-size: 14px; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.visit-master th { position: sticky; top: 0; background: #eef3fc; z-index: 3; }
.visit-rooms-table th:last-child, .visit-rooms-table td:last-child { width: 76px; text-align: right; }
.visit-rooms-table button { width: 100%; justify-content: start; padding: 0; min-height: 34px; border: 0; background: transparent; font-weight: 400; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.visit-rooms-table tbody tr { cursor: pointer; }
.visit-rooms-table .selected td { background: #e4eeff; }
.visit-rooms-table .selected button { font-weight: 700; }
.visit-records-table { min-width: 560px; }
.visit-records-table td { cursor: pointer; background: white; }
.visit-records-table tr:hover td { background: #f0f5ff; }
.visit-records-table .visit-ref { position: sticky; left: 0; z-index: 2; }
.visit-records-table th.visit-ref { z-index: 4; }
.visit-ref a, .visit-cell-line, .visit-pending { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.visit-ref a, .visit-pending { font-size: 14px; }
@media (min-width: 1024px) {
  .visit-master { grid-template-columns: 240px minmax(0, 1fr); }
  .visit-room-scroll { max-height: 60dvh; }
}

/* Shared application shell */
:root { background: #f7f8fa; --line: #e2e5e9; --muted: #626d7a; }
.app-shell { --rail-width: 216px; }
.app-shell > .top { height: 52px; padding: 4px 16px; border-bottom: 1px solid var(--line); }
.app-shell .top .brand { width: auto; margin-right: auto; display: inline-flex; }
.app-shell .top .chip { margin: 0; white-space: nowrap; font-size: 12px; }
.app-shell .sidebar { inset: 52px auto 0 0; background: #fff; color: #263445; border-right: 1px solid var(--line); padding: 12px 8px; }
.app-shell .sidebar > a { color: #344354; min-height: 44px; padding: 8px 12px; border-radius: 6px; }
.app-shell .sidebar a[aria-current=page] { background: #edf2fb; color: #073dca; box-shadow: none; }
.app-shell .management-nav summary, .app-shell .management-nav a { color: #344354; }
.app-shell > main { padding: 24px 24px 96px; }
.app-shell h1 { font-size: 24px; }
.profile-menu { position: relative; flex-shrink: 0; }
.profile-menu > summary { display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; list-style: none; border-radius: 50%; background: #e8edf4; color: #263b55; font-weight: 700; }
.profile-menu > summary::-webkit-details-marker { display: none; }
.profile-panel { position: absolute; right: 0; top: calc(100% + 5px); width: min(320px, calc(100vw - 24px)); padding: 16px; display: grid; gap: 14px; background: white; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px #17253620; }
.profile-identity { display: grid; gap: 4px; overflow-wrap: anywhere; }
.profile-panel label { font-size: 13px; }
.profile-logout { justify-content: flex-start; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding-left: 0; }
.profile-version { border-top: 1px solid var(--line); padding-top: 12px; }
@media (max-width: 1023px) {
  .app-shell > .top { height: 56px; padding: 6px 12px; }
  .app-shell > main { padding: 20px 12px 96px; }
  .app-shell .sidebar { inset: 0 auto 0 0; }
  .app-shell .top .brand { display: inline-flex; }
}

/* Listing controls keep filters visible in the document flow. */
.filter-bar { display: flex; flex-wrap: wrap; align-items: end; }
.filter-bar > label:first-child { flex: 1 1 240px; }
.filter-bar > .extra-filters { position: static; }
.extra-filters > .grid { position: static; width: 100%; max-height: none; padding: 16px 0; border: 0; box-shadow: none; }
.listado-filters:has(.extra-filters[open]) .filter-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; }
.listado-filters:has(.extra-filters[open]) .extra-filters { grid-column: 1 / -1; grid-row: 2; }
.filter-actions { padding-bottom: 12px; }
.listado-footer [aria-label="Paginación"] { align-items: center; flex-wrap: wrap; }
.listado-footer [aria-label="Paginación"] label { display: flex; align-items: center; gap: 8px; }
.listado-footer [aria-label="Paginación"] select { width: auto; }
@media (max-width: 639px) {
  .filter-bar > label:first-child { flex-basis: 100%; }
  .listado-filters:has(.extra-filters[open]) .filter-bar { grid-template-columns: minmax(0, 1fr) auto; }
  .listado-filters:has(.extra-filters[open]) .filter-bar > label:first-child { grid-column: 1 / -1; }
  .listado-filters:has(.extra-filters[open]) .extra-filters { grid-row: auto; }
}
/* Shared surfaces and controls across operational screens. */
.app-shell { color: #202b38; font-size: 14px; }
.app-shell h2 { font-size: 18px; }
.app-shell h3 { font-size: 16px; }
.app-shell .card { border-radius: 6px; padding: 16px; }
.app-shell .notice { border-color: #dce3eb; background: #f4f7fa; border-radius: 6px; }
.app-shell .notice.error { border-color: #ebc4bc; background: #fff4f2; }
.app-shell th { background: #f6f7f9; color: #566270; }
.app-shell input, .app-shell select, .app-shell textarea, .app-shell button { border-color: #cfd6dd; }
.app-shell button.primary { border-color: var(--blue); }
.app-shell button:not(:disabled):hover { filter: brightness(.97); }
.app-shell .primary:not(:disabled):hover { filter: brightness(.92); }
@media (prefers-reduced-motion: reduce) { .app-shell .tabs { scroll-behavior: auto; } }
.app-shell .top .brand { font-size: 21px; letter-spacing: -.7px; }
.app-shell .connection-status { background: transparent; color: #485767; padding: 4px 0; }
.app-shell .connection-status::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #478267; vertical-align: 1px; }
.app-shell .connection-status[data-online="false"]::before { background: #a16a16; }
.app-shell .card:has(> .table-wrap > .catalog-table) { padding: 0; border: 0; background: transparent; }
