:root {
  --sidebar-bg: #0f2136;
  --sidebar-border: rgba(255, 255, 255, 0.06);
  --sidebar-text: rgba(255, 255, 255, 0.92);
  --sidebar-muted: rgba(255, 255, 255, 0.55);
  --accent: #4a90e2;
  --accent-hover: #3b7bce;
  --workspace-bg: #eef1f5;
  --surface: #ffffff;
  --text: #1b2430;
  --muted: #5a6573;
  --border: #e0e4ea;
  --shadow: 0 12px 40px rgba(27, 36, 48, 0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  --sidebar-width: 280px;
  --dropdown-surface: #f3f5f9;
  --chk-a1-bg: #dbeafe;
  --chk-a1-bg-hover: #bfdbfe;
  --chk-a2-bg: #ede9fe;
  --chk-a2-bg-hover: #ddd6fe;
  --chk-a34-bg: #fef9c3;
  --chk-a34-bg-hover: #fef08a;
  --chk-udsc-bg: #ffedd5;
  --chk-udsc-bg-hover: #fed7aa;
  --chk-a5-bg: #c8f5d4;
  --chk-a5-bg-hover: #aaf0bc;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--workspace-bg);
  line-height: 1.5;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dotBounce {
  0%,
  80%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1rem 1rem;
  border-right: 1px solid var(--sidebar-border);
  z-index: 40;
  transition: transform 0.22s ease;
}

.sidebar__top {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex: 1;
  min-height: 0;
}

.sidebar__brand {
  display: block;
  line-height: 0;
}

.sidebar__logo {
  width: 100%;
  max-width: 200px;
  height: auto;
  object-fit: contain;
}

.sidebar__account {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (min-width: 901px) {
  .sidebar__account {
    margin-top: 2rem;
  }
}

.sidebar__lang {
  margin-top: -0.35rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
  justify-content: center;
  transition: background 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
}

.pill:active {
  transform: scale(0.98);
}

.pill__logout {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ff5a5a;
  margin-left: auto;
  transition: color 0.15s ease, transform 0.15s ease;
}

.pill--accent .pill__logout {
  display: none !important;
}

.pill__logout svg {
  display: block;
}

.pill--user .pill__logout:hover {
  color: #ff8080;
  transform: scale(1.06);
}

.pill--accent .pill__text {
  flex: 1;
  text-align: center;
}

.pill--user .pill__text {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.pill--accent {
  background: rgba(74, 144, 226, 0.25);
  color: #e8f1ff;
}

.pill--accent:hover {
  background: rgba(74, 144, 226, 0.4);
}

.pill--user {
  justify-content: flex-start;
  background: rgba(255, 255, 255, 0.08);
  color: var(--sidebar-text);
  cursor: pointer;
}

.pill__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.link-btn {
  background: none;
  border: none;
  color: var(--sidebar-muted);
  font-size: 0.8125rem;
  cursor: pointer;
  text-align: center;
  padding: 0.25rem;
  font-family: inherit;
}

.link-btn:hover {
  color: #fff;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  color: var(--sidebar-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
  color: var(--sidebar-text);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.is-active {
  color: #fff;
  background: rgba(74, 144, 226, 0.22);
}

.nav-link__icon {
  display: flex;
  opacity: 0.85;
}

.sidebar__section-label {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--sidebar-muted);
}

.sidebar__toolbar-list .segmented + .sidebar__section-label {
  margin-top: 1rem;
}

.sidebar__controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.case-legend {
  margin-top: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--sidebar-border);
}

.case-legend[hidden] {
  display: none !important;
}

.case-legend .sidebar__section-label {
  margin-bottom: 0.5rem;
}

.case-legend__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.case-legend__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--sidebar-muted);
}

.case-legend__swatch {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.case-legend__swatch--a1 {
  background: var(--chk-a1-bg);
}

.case-legend__swatch--a2 {
  background: var(--chk-a2-bg);
}

.case-legend__swatch--a34 {
  background: var(--chk-a34-bg);
}

.case-legend__swatch--udsc {
  background: var(--chk-udsc-bg);
}

.case-legend__swatch--a5 {
  background: var(--chk-a5-bg);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field__label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--sidebar-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.input--sidebar,
.select--sidebar {
  width: 100%;
  background: #ffffff;
  border: 1px solid rgba(15, 33, 54, 0.12);
  color: var(--text);
  border-radius: 14px;
  padding: 0.55rem 0.75rem;
  font: inherit;
  font-size: 0.875rem;
  box-shadow: 0 2px 10px rgba(15, 33, 54, 0.06);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.16s ease;
}

.input--sidebar::placeholder {
  color: rgba(27, 36, 48, 0.38);
}

.input--sidebar:hover,
.select--sidebar:hover {
  border-color: rgba(74, 144, 226, 0.32);
  box-shadow: 0 4px 16px rgba(15, 33, 54, 0.09);
}

.input--sidebar:focus,
.select--sidebar:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.24);
}

.select--sidebar {
  cursor: pointer;
  appearance: none;
  background-color: var(--dropdown-surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235a6573' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  padding-right: 2rem;
}

.segmented {
  display: flex;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.segmented--wide {
  width: 100%;
}

.segmented__btn {
  flex: 1;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.45rem 0.5rem;
  border: none;
  background: rgba(0, 0, 0, 0.15);
  color: var(--sidebar-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.segmented__btn + .segmented__btn {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.segmented__btn:hover {
  color: var(--sidebar-text);
}

.segmented__btn.is-active {
  background: rgba(74, 144, 226, 0.35);
  color: #fff;
}

.sidebar__footer {
  margin-top: auto;
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--sidebar-muted);
  text-decoration: none;
  font-size: 0.8125rem;
  padding: 0.35rem 0.25rem;
  border-radius: 6px;
}

.footer-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.sidebar__backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 28, 0.45);
  z-index: 30;
}

.workspace {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* List + search below title (mobile only — desktop uses sidebar) */
.workspace-toolbar {
  display: none;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0 1.5rem 0.85rem;
  background: var(--workspace-bg);
}

.workspace-toolbar__label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.workspace-toolbar__search {
  margin: 0;
}

.workspace-toolbar__search-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.workspace-toolbar__input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  box-shadow: 0 2px 10px rgba(15, 33, 54, 0.05);
}

.workspace-toolbar__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.22);
}

.segmented--light {
  border-color: var(--border);
}

.segmented--light .segmented__btn {
  background: #e8ecf2;
  color: var(--muted);
}

.segmented--light .segmented__btn + .segmented__btn {
  border-left-color: var(--border);
}

.segmented--light .segmented__btn.is-active {
  background: var(--accent);
  color: #fff;
}

.segmented--light .segmented__btn:hover:not(.is-active) {
  color: var(--text);
  background: #dde3eb;
}

.workspace-footer {
  margin-top: auto;
  padding: 1.25rem 1.5rem 1.5rem;
  background: var(--sidebar-bg);
  color: rgba(255, 255, 255, 0.72);
  border-top: 1px solid var(--sidebar-border);
}

.workspace-footer__text {
  margin: 0;
  font-size: 0.8125rem;
  text-align: center;
  letter-spacing: 0.02em;
}

.topbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  padding: 1.1rem 1.5rem 0.75rem;
  background: var(--workspace-bg);
}

.topbar__mobile-row {
  display: none;
  align-items: center;
  width: 100%;
  gap: 0;
}

.topbar__brand--mobile {
  display: block;
  line-height: 0;
  padding: 0.35rem 0.75rem;
  border-radius: 14px;
  background: var(--sidebar-bg);
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.topbar__brand--mobile:hover {
  opacity: 0.92;
}

.topbar__logo--mobile {
  display: block;
  height: 38px;
  width: auto;
  max-width: min(260px, 70vw);
  object-fit: contain;
}

.topbar__mobile-spacer {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  pointer-events: none;
}

.icon-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}

.icon-btn:hover {
  background: #f7f8fa;
}

.icon-btn:active {
  transform: scale(0.97);
}

.topbar__titles {
  min-width: 0;
  width: 100%;
}

.page-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  transition: opacity 0.25s ease;
}

.page-subtitle[hidden] {
  display: none !important;
}

.page-subtitle .loading-line {
  margin-right: 0.15rem;
}

.page-subtitle .loading-dots {
  display: inline-flex;
  gap: 0.1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.page-subtitle .loading-dots span {
  display: inline-block;
  animation: dotBounce 1.05s infinite ease-in-out;
}

.page-subtitle .loading-dots span:nth-child(2) {
  animation-delay: 0.15s;
}

.page-subtitle .loading-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

.main {
  flex: 1;
  padding: 0 1.5rem 2rem;
  display: flex;
  flex-direction: column;
}

.login-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
  animation: fadeInUp 0.4s ease both;
}

.login-panel[hidden] {
  display: none !important;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}

.card:hover {
  box-shadow: 0 16px 48px rgba(27, 36, 48, 0.1);
}

.card--login {
  width: 100%;
  max-width: 420px;
  padding: 2rem 2rem 1.75rem;
}

.card__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
}

.card__lead {
  margin: 0.5rem 0 1.25rem;
  color: var(--muted);
  font-size: 0.925rem;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field--login .field__label {
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.8125rem;
  font-weight: 600;
}

.input--light {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #f7f8fa;
  font: inherit;
  font-size: 0.9375rem;
}

.input--light:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  background: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  width: 100%;
}

.btn--primary:hover {
  background: var(--accent-hover);
}

.btn--google {
  width: 100%;
  background: #fff;
  color: #3c4043;
  border: 1px solid var(--border);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}

.btn--google:hover {
  background: #f8f9fb;
}

.login__divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.login__divider::before,
.login__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.login__hint {
  margin: 1.25rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.flash {
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  background: #fff4f4;
  border: 1px solid #f0caca;
  color: #8a2f2f;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.records-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  animation: fadeInUp 0.38s ease both;
}

.records-panel[hidden] {
  display: none !important;
}

.banner--error {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: #fff0f0;
  border: 1px solid #f0c4c4;
  color: #8f2d2d;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  white-space: pre-wrap;
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.5);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 1rem;
  align-content: start;
}

.card-record {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.15s, border-color 0.15s;
}

.card-record:hover {
  border-color: rgba(74, 144, 226, 0.35);
  box-shadow: var(--shadow);
}

.card-record__id {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.card-record__field {
  margin-top: 0.55rem;
  font-size: 0.875rem;
}

.card-record__name {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.15rem;
}

.card-record__value {
  word-break: break-word;
  color: var(--text);
}

.table-wrap {
  overflow: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.22s ease, border-color 0.22s ease;
}

.table-wrap--animated {
  animation: fadeInUp 0.42s ease both;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table th,
.table td {
  text-align: left;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  transition: background 0.16s ease;
}

.table th {
  font-size: 0.9375rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
  background: #f7f8fa;
  white-space: nowrap;
}

.table tbody tr:nth-child(odd) td {
  background: #ffffff;
}

.table tbody tr:nth-child(even) td {
  background: #f3f5f9;
}

.table tbody tr:hover td {
  background: #e8ecf4 !important;
}

.table tbody tr.table__row--chk-a1 td {
  background: var(--chk-a1-bg) !important;
}

.table tbody tr.table__row--chk-a1:hover td {
  background: var(--chk-a1-bg-hover) !important;
}

.table tbody tr.table__row--chk-a2 td {
  background: var(--chk-a2-bg) !important;
}

.table tbody tr.table__row--chk-a2:hover td {
  background: var(--chk-a2-bg-hover) !important;
}

.table tbody tr.table__row--chk-a34 td {
  background: var(--chk-a34-bg) !important;
}

.table tbody tr.table__row--chk-a34:hover td {
  background: var(--chk-a34-bg-hover) !important;
}

.table tbody tr.table__row--chk-udsc-wsa td {
  background: var(--chk-udsc-bg) !important;
}

.table tbody tr.table__row--chk-udsc-wsa:hover td {
  background: var(--chk-udsc-bg-hover) !important;
}

.table tbody tr.table__row--chk-a5 td {
  background: var(--chk-a5-bg) !important;
}

.table tbody tr.table__row--chk-a5:hover td {
  background: var(--chk-a5-bg-hover) !important;
}

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

.cell-value {
  font-family: var(--mono);
  font-size: 0.8rem;
  max-width: 360px;
}

/* Pagination (main workspace) */
.pager {
  padding-top: 0.75rem;
}

.pager--main {
  margin-top: 0.35rem;
  animation: fadeInUp 0.35s ease both;
}

.pager__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.pager__row--main {
  justify-content: center;
  flex-wrap: wrap;
}

.pager__row--tight {
  margin-top: 0.35rem;
}

.pager__btn--main {
  min-width: 5.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 14px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 0.8125rem;
  box-shadow: 0 2px 8px rgba(15, 33, 54, 0.05);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.12s ease, box-shadow 0.2s ease;
}

.pager__btn--main:hover:not(:disabled) {
  background: #f7f8fa;
  border-color: rgba(74, 144, 226, 0.35);
  box-shadow: 0 4px 14px rgba(15, 33, 54, 0.08);
}

.pager__btn--main:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.pager__info--main {
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  font-family: var(--font);
  letter-spacing: 0.01em;
  min-width: 6.5rem;
  text-align: center;
}

.field--pager-main {
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  justify-content: center;
}

.field__label--pager {
  color: var(--muted);
  margin: 0;
}

.select--main {
  appearance: none;
  background-color: var(--dropdown-surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235a6573' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 14px;
  padding: 0.45rem 2rem 0.45rem 0.75rem;
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(15, 33, 54, 0.05);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.2s ease;
}

.select--main:hover {
  border-color: rgba(74, 144, 226, 0.35);
  box-shadow: 0 4px 16px rgba(15, 33, 54, 0.09);
}

.select--main:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.22);
}

/* Group headers (grid + table) */
.group-header {
  grid-column: 1 / -1;
  padding: 0.35rem 0.2rem 0;
  margin-top: 0.35rem;
}

.group-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.group-row__cell {
  font-weight: 800;
  background: rgba(74, 144, 226, 0.07) !important;
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: auto;
    right: 0;
    top: 0;
    bottom: 0;
    border-right: none;
    border-left: 1px solid var(--sidebar-border);
    transform: translateX(100%);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.22);
  }

  .shell.is-sidebar-open .sidebar {
    transform: translateX(0);
  }

  .shell.is-sidebar-open .sidebar__backdrop {
    display: block;
  }

  .topbar__mobile-row {
    display: grid;
    grid-template-columns: 42px 1fr 42px;
    align-items: center;
    justify-items: stretch;
  }

  .topbar__mobile-spacer {
    grid-column: 1;
    justify-self: start;
  }

  .topbar__brand--mobile {
    grid-column: 2;
    justify-self: center;
  }

  .icon-btn--menu-end {
    grid-column: 3;
    justify-self: end;
  }

  .topbar__titles {
    text-align: center;
  }

  .page-title {
    font-size: 1.25rem;
  }

  .icon-btn {
    display: flex;
  }

  .workspace {
    width: 100%;
  }

  .workspace-toolbar {
    display: flex;
  }

  .sidebar__toolbar-list {
    display: none !important;
  }

  .cell-value {
    max-width: none;
  }

  .table-wrap {
    display: none !important;
  }

  .card-list--mobile {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: 100%;
    max-width: 100%;
    padding: 0 0 0.5rem;
  }

  .card-list--mobile[hidden] {
    display: none !important;
  }

  .case-card {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(27, 36, 48, 0.08);
    background: var(--surface);
    max-width: 100%;
  }

  .case-card__section {
    padding: 0.85rem 1rem;
  }

  .case-card__section--top {
    background: linear-gradient(165deg, #e8f0fc 0%, #dfe8f6 100%);
  }

  .case-card__section--bottom {
    background: #f4f6fa;
    border-top: 1px solid var(--border);
  }

  .case-card--chk-a1 .case-card__section--top {
    background: linear-gradient(165deg, #dbeafe 0%, #bfdbfe 100%);
  }

  .case-card--chk-a1 .case-card__section--bottom {
    background: #e8f2fc;
    border-top-color: #93c5fd;
  }

  .case-card--chk-a2 .case-card__section--top {
    background: linear-gradient(165deg, #ede9fe 0%, #ddd6fe 100%);
  }

  .case-card--chk-a2 .case-card__section--bottom {
    background: #f3f0ff;
    border-top-color: #c4b5fd;
  }

  .case-card--chk-a34 .case-card__section--top {
    background: linear-gradient(165deg, #fef9c3 0%, #fef08a 100%);
  }

  .case-card--chk-a34 .case-card__section--bottom {
    background: #fffbeb;
    border-top-color: #fde047;
  }

  .case-card--chk-udsc-wsa .case-card__section--top {
    background: linear-gradient(165deg, #ffedd5 0%, #fed7aa 100%);
  }

  .case-card--chk-udsc-wsa .case-card__section--bottom {
    background: #fff7ed;
    border-top-color: #fdba74;
  }

  .case-card--chk-a5 .case-card__section--top {
    background: linear-gradient(165deg, #d4f8dc 0%, #b8f0c8 100%);
  }

  .case-card--chk-a5 .case-card__section--bottom {
    background: var(--chk-a5-bg);
    border-top-color: #7dd99a;
  }

  .case-card--chk-a1 {
    border-color: #93c5fd;
  }

  .case-card--chk-a2 {
    border-color: #c4b5fd;
  }

  .case-card--chk-a34 {
    border-color: #fde047;
  }

  .case-card--chk-udsc-wsa {
    border-color: #fdba74;
  }

  .case-card--chk-a5 {
    border-color: #7dd99a;
    box-shadow: 0 4px 20px rgba(46, 125, 50, 0.14);
  }

  .case-card__top-grid {
    display: grid;
    grid-template-columns: 1fr minmax(5.5rem, 32%);
    gap: 0.75rem 0.65rem;
    align-items: start;
  }

  .case-card__left {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-width: 0;
  }

  .case-card__right {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    align-items: flex-end;
    text-align: right;
    min-width: 0;
  }

  .case-card__kv {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
  }

  .case-card__k {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    line-height: 1.25;
  }

  .case-card__v {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
    word-break: break-word;
  }

  .case-card__v--case {
    font-size: 1.05rem;
    font-weight: 700;
    font-family: var(--mono);
  }

  .case-card__grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem 0.75rem;
  }

  .case-card__grid2 + .case-card__grid2 {
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(27, 36, 48, 0.08);
  }

  .case-card--client .case-card__client-stack {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .case-card--client .case-card__client-wide .case-card__v {
    font-size: 1.05rem;
  }
}

@media (min-width: 901px) {
  .workspace-toolbar {
    display: none !important;
  }

  .card-list--mobile {
    display: none !important;
  }

  .table-wrap {
    display: block;
  }

  .sidebar__backdrop {
    display: none !important;
  }

  .topbar {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;
    padding-top: 1.25rem;
  }

  .topbar__mobile-row {
    display: none !important;
  }

  .topbar__titles {
    flex: 1;
    text-align: left;
  }
}
