:root {
  --navy: #073d4f;
  --navy-dark: #042d3d;
  --ink: #172338;
  --muted: #6c7a90;
  --line: #dfe6ef;
  --page: #f6f9fc;
  --blue: #0d6efd;
  --green: #16b88f;
  --mint: #e8fbf5;
  --orange: #ff9f1c;
  --red: #ff4d4f;
  --yellow: #f5c542;
  --purple: #7555c7;
  --brand-blue: #00a6d6;
  --brand-green: #91c83e;
  --shadow: 0 10px 30px rgba(17, 34, 64, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body[data-page]:not(.auth-ready) .app-shell {
  visibility: hidden;
}

body[data-page]:not(.auth-ready)::before {
  content: "Validando sesion...";
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--page);
  color: var(--muted);
  font-weight: 800;
  z-index: 9999;
}

.position-fixed {
  position: fixed;
}

.top-0 {
  top: 0;
}

.end-0 {
  right: 0;
}

.p-3 {
  padding: 1rem;
}

.me-2 {
  margin-right: 0.5rem;
}

.m-auto {
  margin: auto;
}

.text-end {
  text-align: right;
}

.text-muted {
  color: var(--muted);
}

.text-danger {
  color: var(--red);
}

.d-flex {
  display: flex;
}

.align-items-center {
  align-items: center;
}

.gap-3 {
  gap: 1rem;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.align-middle td,
.align-middle th {
  vertical-align: middle;
}

.form-control,
.form-select {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
}

.form-control-sm,
.form-select-sm {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 13px;
}

.btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-weight: 700;
  cursor: pointer;
}

.btn-sm {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.btn-primary {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

.btn-outline-primary {
  color: var(--blue);
  border-color: var(--blue);
  background: #fff;
}

.btn-light {
  color: #304056;
  border-color: var(--line);
  background: #f8fafc;
}

.link-button {
  padding: 0;
  border: 0;
  color: var(--blue);
  background: transparent;
  font: inherit;
  font-weight: 800;
  text-align: left;
  text-decoration: none;
}

.link-button:hover {
  text-decoration: underline;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-left: 0;
  list-style: none;
}

.nav-tabs {
  border-bottom: 1px solid var(--line);
}

.toast-container {
  z-index: 1080;
}

.toast {
  width: min(360px, calc(100vw - 32px));
  display: none;
  margin-bottom: 10px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.toast.show {
  display: block;
}

.toast-body {
  padding: 12px 14px;
}

.text-bg-primary {
  color: #fff;
  background: var(--blue);
}

.text-bg-success {
  color: #fff;
  background: #14956f;
}

.text-bg-warning {
  color: #2d2300;
  background: #f5c542;
}

.text-bg-danger {
  color: #fff;
  background: #d92d20;
}

.border-0 {
  border: 0;
}

.btn-close {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.btn-close::before {
  content: "x";
  font-size: 20px;
  line-height: 1;
}

.btn-close-white {
  color: #fff;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1060;
  display: none;
  overflow: auto;
  padding: 24px;
  background: rgba(15, 23, 42, 0.42);
}

.modal.show {
  display: block;
}

.modal-dialog {
  width: min(760px, 100%);
  margin: 40px auto;
}

.modal-xl {
  width: min(1080px, 100%);
}

.modal-content {
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.2);
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.modal-body {
  padding: 18px;
}

.modal-title {
  margin: 0;
}

.fs-5 {
  font-size: 1.25rem;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--page);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px 14px 18px;
  color: #fff;
  background:
    radial-gradient(circle at 20% 0%, rgba(20, 184, 166, 0.25), transparent 32%),
    linear-gradient(180deg, var(--navy), var(--navy-dark));
  overflow: hidden;
}

.brand-mini,
.product {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mini {
  padding: 0 14px 12px;
  line-height: 1.15;
  opacity: 0.95;
}

.brand-mini .brand-mark {
  width: 56px;
  height: 56px;
}

.brand-word {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 27px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.brand-word span:first-child {
  color: var(--brand-blue);
}

.brand-word span:last-child {
  color: var(--brand-green);
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: inline-block;
  flex: 0 0 auto;
  background-image: url("../images/logoTriangulo.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12));
}

.brand-mark.large {
  width: 58px;
  height: 58px;
}

.brand-mark.tiny {
  width: 24px;
  height: 24px;
}

.main-nav {
  display: grid;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.main-nav .nav-link,
.logout-button {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: transparent;
  text-align: left;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease;
}

.main-nav .nav-link i,
.logout-button i {
  width: 20px;
  font-size: 17px;
}

.main-nav .nav-link:hover,
.main-nav .nav-link.active {
  background: rgba(255, 255, 255, 0.15);
}

.main-nav .nav-link:active,
.logout-button:active {
  transform: translateY(1px);
}

.logout-button {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0;
}

.content {
  min-width: 0;
  background:
    linear-gradient(180deg, #fff 0, #f9fbfe 140px, var(--page) 100%);
}

.topbar {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 36px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.product strong {
  font-size: 24px;
  color: #0f172a;
}

.top-actions,
.toolbar,
.title-row,
.meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.topbar .top-actions {
  margin-left: auto;
  justify-content: flex-end;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #314158;
  background: #fff;
}

.icon-button.small {
  width: 32px;
  height: 32px;
}

.icon-button.danger {
  color: #d92d20;
  background: #fff7f7;
  border-color: #ffd6d6;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-pill > span {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--purple);
  font-weight: 700;
}

.user-pill strong,
.user-pill small {
  display: block;
}

.user-pill small {
  color: var(--muted);
  font-size: 11px;
}

.screen {
  display: none;
  padding: 34px 36px 38px;
}

.screen.active {
  display: block;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.page-heading h1 {
  margin: 0 0 6px;
  font-size: 30px;
  font-weight: 800;
}

.page-heading h1 span {
  color: #8dc900;
}

.page-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.kpi-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 88px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.kpi-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 24px;
}

.kpi-card h3 {
  margin: 0;
  color: #344154;
  font-size: 12px;
  font-weight: 700;
}

.kpi-card strong {
  display: block;
  margin-top: 2px;
  font-size: 27px;
  line-height: 1;
}

.kpi-card small {
  color: var(--muted);
  font-weight: 700;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
}

.client-home {
  display: grid;
  gap: 24px;
}

.client-home-copy {
  max-width: 760px;
}

.section-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.client-home-copy h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 26px;
  line-height: 1.2;
}

.client-home-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.client-qr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 360px));
  gap: 20px;
}

.client-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.7fr);
  gap: 20px;
}

.client-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 14px;
}

.client-summary-card {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.client-summary-card i {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--blue);
  background: #eaf4ff;
  font-size: 22px;
}

.client-summary-card span {
  color: #344154;
  font-weight: 800;
}

.client-summary-card strong {
  color: var(--ink);
  font-size: 32px;
  line-height: 1;
}

.client-next-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  min-height: 132px;
  padding: 20px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(135deg, #0f6df7, #0d9ccf 58%, #16b88f);
  box-shadow: 0 18px 42px rgba(13, 110, 253, 0.2);
}

.client-next-card small {
  display: block;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 900;
  text-transform: uppercase;
}

.client-next-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.client-next-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}

.client-next-card .btn {
  align-self: flex-start;
  color: var(--blue);
  background: #fff;
  border-color: #fff;
}

.client-support-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(260px, 0.55fr);
  gap: 20px;
}

.install-help-card,
.client-notes-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.install-help-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.install-help-card h2,
.client-notes-card h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
}

.install-help-card p {
  margin: 0;
  color: var(--muted);
}

.client-notes-card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.client-notes-card li {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #344154;
  font-weight: 750;
}

.client-notes-card i {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #087f5b;
  background: #e8fbf5;
}

.install-instructions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.install-instructions-grid section {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.install-instructions-grid h2 {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 18px;
}

.install-instructions-grid ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: #344154;
}

.client-phase-section {
  display: grid;
  gap: 16px;
  margin-top: 4px;
}

.client-phase-section .panel-title {
  margin-bottom: 0;
}

.client-phase-section .panel-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.client-phase-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 16px;
}

.phase-card {
  display: grid;
  gap: 12px;
  min-height: 190px;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 5px solid #b8c1cc;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.phase-card.active {
  border-left-color: var(--blue);
  background: linear-gradient(180deg, #f8fbff, #fff);
}

.phase-card.completed {
  border-left-color: var(--green);
}

.phase-card.upcoming {
  color: #607086;
  background: #f8fafc;
}

.phase-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.phase-card strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.25;
}

.phase-card > small {
  color: var(--muted);
  font-weight: 800;
}

.phase-card dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.phase-card dt {
  color: #7a8699;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.phase-card dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-weight: 800;
}

.phase-badge {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  color: #667085;
  background: #eef2f7;
  font-size: 11px;
  font-weight: 800;
}

.phase-badge.active {
  color: #0959c9;
  background: #eaf4ff;
}

.phase-badge.completed {
  color: #087f5b;
  background: #e8fbf5;
}

.phase-editor-list {
  display: grid;
  gap: 12px;
}

.phase-editor-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) repeat(3, minmax(130px, 1fr));
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.phase-editor-row strong {
  display: block;
  color: var(--ink);
  font-weight: 800;
}

.phase-editor-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 700;
}

.phase-editor-row label {
  display: grid;
  gap: 6px;
  color: #344154;
  font-size: 12px;
  font-weight: 800;
}

.qa-config-panel {
  margin-top: 20px;
  margin-bottom: 20px;
}

.qa-config-panel .panel-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.qa-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 18px;
}

.qa-config-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.qa-config-card .qr-frame {
  width: 150px;
}

.qa-config-fields {
  display: grid;
  gap: 12px;
}

.qa-config-fields label {
  display: grid;
  gap: 6px;
  color: #344154;
  font-weight: 800;
}

.qa-config-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.client-store-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.store-link-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.store-link-card:hover {
  transform: translateY(-1px);
  border-color: rgba(29, 111, 245, 0.28);
  color: var(--ink);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
}

.store-link-card.disabled {
  pointer-events: none;
  opacity: 0.58;
}

.store-link-card .store-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  color: #fff;
  font-size: 26px;
  background: linear-gradient(135deg, #0b3b63, #16b979);
}

.store-link-card small {
  display: block;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
}

.store-link-card strong {
  display: block;
  margin-top: 3px;
  font-size: 22px;
}

.qr-card {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.qr-card small {
  display: block;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

.qr-card strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 22px;
}

.qr-frame {
  position: relative;
  width: min(100%, 240px);
  aspect-ratio: 1;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, #111827 10px, transparent 10px) 0 0 / 28px 28px,
    linear-gradient(#111827 10px, transparent 10px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(17, 24, 39, 0.18) 8px, transparent 8px) 6px 6px / 22px 22px,
    #fff;
}

.qr-frame::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 6px;
  background:
    linear-gradient(#fff, #fff) center / 36% 36% no-repeat,
    linear-gradient(135deg, transparent 0 38%, rgba(255, 255, 255, 0.92) 38% 62%, transparent 62%);
}

.qr-frame.has-image {
  display: grid;
  place-items: center;
  padding: 10px;
  background: #fff;
}

.qr-frame.has-image::before,
.qr-frame.has-image span {
  display: none;
}

.qr-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.qr-frame span {
  position: absolute;
  width: 46px;
  height: 46px;
  border: 8px solid #111827;
  border-radius: 4px;
  background: #fff;
}

.qr-frame span:nth-child(1) {
  top: 18px;
  left: 18px;
}

.qr-frame span:nth-child(2) {
  top: 18px;
  right: 18px;
}

.qr-frame span:nth-child(3) {
  left: 18px;
  bottom: 18px;
}

.qr-frame.ios {
  box-shadow: inset 0 0 0 8px rgba(15, 98, 254, 0.08);
}

.qr-frame.android {
  box-shadow: inset 0 0 0 8px rgba(16, 185, 129, 0.1);
}

.panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.panel.wide {
  grid-column: span 1;
}

.activity-panel {
  grid-column: 1 / -1;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.panel h2,
.case-detail-heading h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.status-summary {
  display: grid;
  grid-template-columns: minmax(132px, 150px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 190px;
}

.donut {
  width: 136px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--green) 0 55%, #b8c1cc 55% 82%, var(--blue) 82% 93%, var(--red) 93% 98%, var(--yellow) 98% 100%);
}

.donut::before {
  content: "";
  position: absolute;
}

.donut span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  font-size: 22px;
  font-weight: 800;
}

.donut small {
  display: block;
  margin-top: -18px;
  color: var(--muted);
  font-size: 12px;
}

.legend,
.progress-list,
.due-list,
.compact-table,
.activity-list,
.assigned-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.empty-state {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.dashboard-custom-range {
  display: flex;
  gap: 8px;
  align-items: center;
}

.dashboard-custom-range[hidden] {
  display: none;
}

.dashboard-custom-range .form-control {
  width: 145px;
}

.legend-row,
.progress-row,
.due-row,
.failed-row,
.activity-row,
.assigned-row {
  display: grid;
  gap: 8px;
}

.legend-row {
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 13px;
}

.legend-row span {
  min-width: 0;
  line-height: 1.25;
}

.legend-row strong {
  min-width: 38px;
  color: var(--ink);
  text-align: right;
  white-space: nowrap;
}

.legend-row strong small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.1;
}

.dot {
  width: 9px;
  height: 9px;
  display: inline-block;
  border-radius: 50%;
}

.dot.ok,
.stacked-progress .ok {
  background: var(--green);
}

.dot.process,
.stacked-progress .process {
  background: var(--blue);
}

.dot.pause,
.stacked-progress .pause {
  background: var(--orange);
}

.dot.fail,
.stacked-progress .fail {
  background: var(--red);
}

.dot.blocked {
  background: var(--yellow);
}

.progress-row {
  grid-template-columns: 150px 1fr 42px;
  align-items: center;
  font-size: 13px;
}

.meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f6;
}

.meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.due-row,
.failed-row,
.activity-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #edf1f6;
}

.due-row strong,
.failed-row strong,
.activity-row strong {
  display: block;
  font-size: 13px;
}

.due-row small,
.failed-row small,
.activity-row small,
.case-detail-heading p {
  color: var(--muted);
}

.text-action {
  display: inline-block;
  border: 0;
  padding: 0;
  margin-top: 16px;
  color: var(--blue);
  background: transparent;
  font-weight: 700;
  text-decoration: none;
}

.filter-strip {
  display: none;
  grid-template-columns: 200px 200px minmax(240px, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.filter-strip.visible {
  display: grid;
}

.subtle-tabs {
  margin-bottom: 18px;
  border-color: var(--line);
}

.subtle-tabs .nav-link {
  color: #46566d;
  border: 0;
  border-bottom: 2px solid transparent;
}

.subtle-tabs .nav-link.active {
  color: var(--blue);
  background: transparent;
  border-bottom-color: var(--blue);
}

.table-panel {
  padding: 0;
  overflow: hidden;
}

.case-table,
.steps-table {
  margin: 0;
  min-width: 860px;
}

.case-table thead,
.steps-table thead {
  color: #607086;
  background: #f7f9fc;
  font-size: 12px;
}

.case-table th,
.case-table td,
.steps-table th,
.steps-table td {
  padding: 14px 16px;
  border-color: #edf1f6;
  font-size: 13px;
}

.badge {
  min-width: 74px;
  border-radius: 999px;
  padding: 6px 9px;
  font-weight: 700;
}

.text-bg-success-subtle {
  color: #027854 !important;
  background: #dff8ef !important;
}

.text-bg-info-subtle {
  color: #0067c7 !important;
  background: #e2f1ff !important;
}

.text-bg-warning-subtle {
  color: #986100 !important;
  background: #fff2cf !important;
}

.text-bg-danger-subtle {
  color: #b42318 !important;
  background: #ffe1e1 !important;
}

.text-bg-secondary-subtle {
  color: #5f6c7b !important;
  background: #edf1f6 !important;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.pager {
  display: flex;
  align-items: center;
  gap: 7px;
}

.page-number {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.page-number.active {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

.breadcrumb-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 13px;
}

.execution-heading {
  align-items: flex-start;
}

.title-row h1 {
  margin: 0;
}

.meta-row {
  margin-top: 14px;
  color: #5a6a80;
  font-size: 13px;
}

.execution-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 20px;
}

.stacked-progress {
  height: 10px;
  display: flex;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f6;
}

.stacked-progress span {
  height: 100%;
}

.stacked-progress .empty {
  background: #c7d0dc;
}

.mini-legend {
  display: grid;
  gap: 7px;
  margin: 16px 0 20px;
  color: #65758a;
  font-size: 13px;
}

.mini-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.assigned-row {
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  padding: 12px 8px;
  border-radius: 8px;
  color: #35445a;
  cursor: pointer;
}

.assigned-row.active,
.assigned-row:hover {
  background: #eaf4ff;
}

.assigned-row strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.case-detail-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.description-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 210px;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.description-grid h3,
.section-label,
.execution-form label,
.case-form-grid label {
  margin-bottom: 8px;
  color: #26364c;
  font-size: 13px;
  font-weight: 800;
}

.description-grid p {
  margin: 0;
  color: #3f4f64;
  line-height: 1.5;
}

.section-label {
  margin: 24px 0 12px;
}

.steps-table {
  min-width: 1000px;
}

.evidence-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.execution-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px 240px;
  gap: 18px;
  margin-top: 20px;
}

.execution-form label,
.case-form-grid label {
  display: grid;
  gap: 8px;
}

.execution-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.placeholder {
  min-height: calc(100vh - 84px);
  place-items: center;
  text-align: center;
}

.placeholder.active {
  display: grid;
  align-content: center;
}

.placeholder i {
  color: var(--blue);
  font-size: 58px;
}

.placeholder h1 {
  margin: 8px 0 4px;
  font-size: 28px;
  font-weight: 800;
}

.placeholder p {
  max-width: 520px;
  color: var(--muted);
}

.case-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.case-form-grid .full {
  grid-column: 1 / -1;
}

.test-script-builder {
  display: grid;
  gap: 14px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.script-builder-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.script-builder-heading h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 850;
}

.script-builder-heading p {
  margin: 0;
  color: var(--muted);
}

.case-steps-builder {
  display: grid;
  gap: 12px;
}

.case-step-editor {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 40px;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.case-step-editor-number {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--blue);
  background: #eaf4ff;
  font-weight: 850;
}

.case-step-editor-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.case-step-editor-fields label:first-child,
.case-step-editor-fields label:nth-child(3) {
  grid-column: 1 / -1;
}

.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 9% 18%, rgba(13, 110, 253, 0.18), transparent 26%),
    radial-gradient(circle at 88% 72%, rgba(22, 184, 143, 0.18), transparent 28%),
    linear-gradient(135deg, #f7fbff 0%, #eef6f8 48%, #ffffff 100%);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(430px, 0.75fr);
}

.compact-login-shell {
  grid-template-columns: minmax(320px, 560px);
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.login-hero {
  position: relative;
  display: grid;
  align-content: space-between;
  min-height: 100vh;
  padding: 54px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(7, 61, 79, 0.92), rgba(4, 45, 61, 0.96)),
    linear-gradient(90deg, #073d4f, #042d3d);
}

.login-hero::after {
  content: "";
  position: absolute;
  inset: auto -16% -18% 34%;
  height: 380px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.35), rgba(22, 184, 143, 0.28));
  filter: blur(4px);
}

.login-brand,
.login-card-heading,
.login-footnote,
.login-options {
  display: flex;
  align-items: center;
}

.login-brand {
  gap: 14px;
}

.login-brand .brand-word {
  font-size: 58px;
}

.made-by {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #6d7a90;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.made-by strong {
  color: var(--navy-dark);
  font-weight: 900;
}

.made-by sup {
  top: -0.35em;
  color: var(--brand-green);
  font-size: 9px;
}

.login-copy {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.login-copy p {
  margin: 0 0 14px;
  color: #9be7d3;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 13px;
}

.login-copy h1 {
  margin: 0;
  max-width: 760px;
  font-size: 52px;
  line-height: 1.04;
  font-weight: 850;
}

.login-preview {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(14px);
}

.preview-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.preview-top span,
.preview-status {
  color: rgba(255, 255, 255, 0.74);
}

.preview-top strong {
  font-size: 30px;
}

.preview-bars {
  display: grid;
  gap: 10px;
}

.preview-bars span {
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, #16b88f, #0d6efd);
}

.preview-status {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
  font-size: 13px;
}

.preview-status span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.login-panel {
  display: grid;
  align-items: center;
  padding: 42px;
}

.login-card {
  width: min(460px, 100%);
  margin: 0 auto;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

.login-card-heading {
  gap: 14px;
  margin-bottom: 28px;
}

.login-card-heading h2 {
  margin: 0 0 4px;
  font-size: 28px;
  font-weight: 850;
}

.login-card-heading p {
  margin: 0;
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 18px;
}

.login-form label {
  display: grid;
  gap: 8px;
  color: #26364c;
  font-weight: 800;
}

.input-icon {
  position: relative;
}

.input-icon > i {
  position: absolute;
  left: 12px;
  top: 50%;
  z-index: 1;
  color: var(--muted);
  transform: translateY(-50%);
}

.input-icon .form-control {
  padding-left: 38px;
  padding-right: 48px;
}

.input-icon .icon-button {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
}

.login-options {
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
}

.login-options a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.check-row {
  display: inline-flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px !important;
  font-weight: 700 !important;
}

.login-submit {
  width: 100%;
  min-height: 48px;
}

.login-footnote {
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.login-footnote span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.login-footnote a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.login-result {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 12px;
  border: 1px solid #cfe3ff;
  border-radius: 8px;
  color: #16345e;
  background: #f0f7ff;
  font-size: 13px;
}

.login-result a {
  overflow-wrap: anywhere;
  color: var(--blue);
  font-weight: 750;
}

.password-hint {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.case-library {
  display: grid;
  grid-template-columns: 300px minmax(430px, 0.95fr) minmax(360px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.case-library-list-only {
  grid-template-columns: 320px minmax(0, 1fr);
}

.case-folders-panel,
.case-list-panel,
.case-detail-panel {
  min-height: 620px;
}

.case-library-actions,
.case-list-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 22px;
}

.case-library-actions .btn {
  flex: 1;
}

.folder-entity-filter {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
  color: #52617a;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.folder-entity-filter .form-select {
  color: #162846;
  font-size: 14px;
  font-weight: 750;
  text-transform: none;
}

.case-folders-panel h2 {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 850;
}

.case-folders-panel h2 span {
  color: #aab2bf;
  font-weight: 700;
}

.case-folder-list {
  display: grid;
  gap: 6px;
}

.case-folder-item {
  width: 100%;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  color: #20314d;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.case-folder-item:hover,
.case-folder-item.active {
  background: #f0f2f6;
}

.case-folder-item strong,
.folder-name-stack {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-folder-item strong {
  font-size: 16px;
}

.folder-name-stack {
  display: grid;
  min-width: 0;
}

.folder-name-stack small {
  overflow: hidden;
  color: #7c8799;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.case-folder-item span:last-child {
  color: #aab2bf;
  font-weight: 800;
}

.folder-name-stack-grow {
  min-width: 0;
}

.table-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.case-list-toolbar {
  justify-content: space-between;
}

.case-list-toolbar .form-control {
  max-width: 260px;
}

.case-list-toolbar .form-select {
  max-width: 190px;
}

.library-table {
  min-width: 680px;
}

.clients-panel {
  overflow: hidden;
}

.clients-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.clients-toolbar .form-control {
  max-width: 300px;
}

.clients-table {
  min-width: 900px;
}

.users-table {
  min-width: 1040px;
}

.clients-table tbody tr {
  cursor: default;
}

.users-table tbody tr {
  cursor: default;
}

.table-subtext {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.type-pill {
  display: inline-flex;
  align-items: center;
  min-width: 78px;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.type-siscoop {
  color: #005bd3;
  background: #e8f1ff;
}

.type-entity {
  color: #027854;
  background: #dff8ef;
}

.user-type-note {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #52617a;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f5f7fb;
  font-size: 13px;
  font-weight: 750;
}

.icon-button.danger {
  color: #d92d20;
}

.icon-button.danger:hover {
  color: #b42318;
  background: #fff1f0;
}

.clients-footer,
.pagination-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.clients-footer {
  justify-content: space-between;
}

.pagination-controls span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.library-table tbody tr {
  cursor: pointer;
}

.library-table tbody tr.active,
.library-table tbody tr:hover {
  background: #eef6ff;
}

.case-key {
  color: #005bd3;
  font-size: 16px;
  font-weight: 850;
}

.case-title-cell {
  color: #005bd3;
  font-size: 15px;
  font-weight: 850;
  text-transform: uppercase;
}

.priority-flag {
  color: #ff9f1c;
  font-size: 17px;
}

.case-detail-panel {
  position: sticky;
  top: 102px;
}

.case-detail-empty {
  min-height: 560px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}

.case-detail-empty i {
  color: var(--blue);
  font-size: 44px;
}

.case-detail-empty strong {
  color: var(--ink);
  font-size: 18px;
}

.case-detail-content {
  display: grid;
  gap: 18px;
}

.case-detail-page {
  display: grid;
  gap: 20px;
}

.case-detail-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.case-detail-kicker {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-weight: 750;
}

.case-detail-content h2 {
  margin: 0;
  color: #10213e;
  font-size: 24px;
  line-height: 1.12;
  text-transform: uppercase;
}

.case-detail-hero h1 {
  margin: 8px 0 0;
  max-width: 980px;
  color: #10213e;
  font-size: 34px;
  line-height: 1.12;
  font-weight: 850;
  text-transform: uppercase;
}

.detail-page-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(360px, 1.15fr);
  gap: 18px;
  align-items: stretch;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.detail-meta-grid span {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
}

.detail-meta-grid strong,
.detail-copy h3,
.script-heading h3,
.script-step h4 {
  margin: 0;
  color: #52627a;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  text-transform: uppercase;
}

.detail-meta-grid em {
  color: var(--ink);
  font-style: normal;
  font-weight: 750;
}

.detail-copy {
  display: grid;
  gap: 8px;
}

.detail-copy p {
  margin: 0 0 8px;
  color: #35445a;
  line-height: 1.55;
}

.script-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.script-panel .script-heading {
  align-items: center;
  padding-top: 0;
  padding-bottom: 16px;
  border-top: 0;
  border-bottom: 1px solid var(--line);
}

.script-heading h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 850;
}

.script-heading span {
  color: var(--muted);
  font-weight: 800;
}

.script-steps {
  display: grid;
  gap: 14px;
}

.script-step {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.script-step-number {
  display: grid;
  place-items: end center;
  padding: 18px 0;
  color: #647086;
  background: #f0f2f6;
  font-size: 34px;
  font-weight: 300;
}

.script-step-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.script-step p {
  margin: 6px 0 0;
  color: #21324e;
  line-height: 1.5;
}

.expected-image-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.expected-image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.expected-image-item {
  min-width: 0;
}

.expected-image-preview {
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.expected-image-preview img {
  display: block;
  width: 100%;
  height: 380px;
  object-fit: contain;
}

.expected-image-gallery .expected-image-link {
  margin-top: 0;
  font-size: 13px;
}

.execution-cycle-table td:nth-child(5) {
  min-width: 180px;
}

.execution-cycle-library {
  grid-template-columns: 330px minmax(0, 1fr);
}

.execution-cycle-table {
  min-width: 980px;
}

.cycle-play-button {
  color: #142a4f;
  background: #fff;
}

.cycle-play-button i {
  font-size: 18px;
}

.cycle-progress {
  width: 132px;
  height: 8px;
  display: inline-flex;
  overflow: hidden;
  margin-right: 10px;
  border-radius: 999px;
  background: #edf1f6;
  vertical-align: middle;
}

.cycle-progress span {
  display: block;
  min-width: 0;
}

.cycle-progress span:first-child {
  border-radius: 999px 0 0 999px;
}

.cycle-progress span:last-child {
  border-radius: 0 999px 999px 0;
}

.cycle-progress .passed {
  background: #34c759;
}

.cycle-progress .in-progress {
  background: #3b82f6;
}

.cycle-progress .failed {
  background: #ef3340;
}

.cycle-progress .blocked {
  background: #f5a623;
}

.cycle-progress .not-started {
  background: #c6ccd6;
}

.cycle-case-picker {
  display: grid;
  gap: 12px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.cycle-case-library {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.cycle-case-folders {
  overflow: auto;
  padding: 14px;
  border-right: 1px solid var(--line);
  background: #fbfcfe;
}

.cycle-case-folders h3 {
  margin: 0 0 12px;
  padding: 10px 12px;
  overflow: hidden;
  border-radius: 6px;
  color: #13233f;
  background: #f1f3f7;
  font-size: 16px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cycle-case-folder-list {
  display: grid;
  gap: 4px;
}

.cycle-case-folder {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  color: #162846;
  background: transparent;
  text-align: left;
}

.cycle-case-folder.active {
  background: #eef1f5;
}

.cycle-case-folder strong {
  overflow: hidden;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cycle-case-folder span {
  color: #a3aab6;
  font-weight: 850;
}

.cycle-case-results {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
}

.cycle-case-results-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.cycle-case-results-toolbar .form-control {
  max-width: 280px;
}

.cycle-case-table-wrap {
  overflow: auto;
}

.cycle-case-table {
  min-width: 640px;
  margin: 0;
}

.cycle-case-table th,
.cycle-case-table td {
  padding: 12px 14px;
  border-color: var(--line);
}

.cycle-case-picker-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-weight: 750;
}

.cycle-case-picker-footer strong {
  color: #13233f;
}

.test-player-screen {
  padding-top: 0;
}

.test-player-hero {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.test-player-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #10264b;
  background: #f1f4f8;
  font-size: 32px;
}

.test-player-hero h1 {
  margin: 4px 0;
  color: #13233f;
  font-size: 30px;
  font-weight: 850;
}

.test-player-hero p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.test-player-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 0;
  align-items: start;
}

.test-player-cases {
  min-height: calc(100vh - 220px);
  border-top: 0;
  border-left: 0;
  border-bottom: 0;
  border-radius: 0;
  box-shadow: none;
}

.test-player-cases .script-builder-heading {
  margin-bottom: 16px;
}

.player-case-list {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  max-height: calc(100vh - 360px);
  overflow: auto;
}

.player-case-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid #35c759;
  border-radius: 8px;
  color: #13233f;
  background: #fff;
  text-align: left;
}

.player-case-item.status-not_started {
  border-left-color: #c6ccd6;
  color: #667085;
  background: #f7f8fa;
}

.player-case-item.status-not_started i,
.player-case-item.status-not_started strong,
.player-case-item.status-not_started em {
  color: #667085;
}

.player-case-item.active {
  border-color: #3887ff;
  border-left-color: #35c759;
  background: #eaf2ff;
}

.player-case-item.status-not_started.active {
  border-color: #9aa4b2;
  border-left-color: #98a2b3;
  background: #eef1f5;
}

.player-case-item i {
  color: #f5a400;
  margin-top: 2px;
}

.player-case-item span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.player-case-item strong {
  color: var(--blue);
}

.player-case-item em {
  overflow: hidden;
  color: #243757;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-case-item small {
  color: var(--muted);
  font-weight: 700;
}

.test-player-detail {
  min-height: calc(100vh - 220px);
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
  box-shadow: none;
}

.player-case-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.player-case-heading h2 {
  margin: 0 0 8px;
  color: #13233f;
  font-size: 24px;
  font-weight: 850;
}

.player-case-heading p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.player-status-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.player-case-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #13233f;
  font-weight: 850;
}

.player-status-actions select {
  width: 150px;
}

.player-execution-details {
  padding: 20px 0;
}

.player-execution-details h3 {
  margin: 0 0 16px;
  color: #13233f;
  font-size: 20px;
  font-weight: 850;
}

.player-execution-details h4,
.player-step-card h4 {
  margin: 0 0 10px;
  color: #4a5870;
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.player-steps {
  display: grid;
  gap: 18px;
}

.player-step-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 4px solid #2ba36b;
  border-radius: 8px;
  background: #fff;
}

.player-step-card.status-not_started {
  border-left-color: #c6ccd6;
  background: #f8fafc;
}

.player-step-card.status-not_started .player-step-number {
  color: #98a2b3;
  background: #eef1f5;
}

.player-step-card.status-passed {
  border-left-color: #2ba36b;
}

.player-step-card.status-failed {
  border-left-color: #d92d20;
}

.player-step-card.status-blocked {
  border-left-color: #f59e0b;
}

.player-step-card.status-in_progress {
  border-left-color: #0d6efd;
}

.player-step-number {
  display: grid;
  place-items: end center;
  padding: 18px 0;
  color: #657189;
  background: #eaf6ef;
  font-size: 42px;
  font-weight: 300;
}

.player-step-content {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(420px, 1.2fr);
  gap: 28px;
  padding: 28px;
}

.player-step-test-data {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.player-step-test-data h4 {
  margin-bottom: 6px;
}

.player-step-test-data p {
  color: #667085;
  font-size: 15px;
  line-height: 1.5;
}

.player-step-status {
  grid-column: 1 / -1;
  max-width: 260px;
  color: #4a5870;
  font-weight: 800;
}

.player-step-content p {
  color: #13233f;
  font-size: 18px;
  line-height: 1.65;
}

.player-expected-image {
  width: min(280px, 100%);
  max-height: 420px;
  display: block;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.expected-image-gallery.player-gallery {
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
}

.expected-image-gallery.player-gallery .expected-image-preview img {
  height: 580px;
}

@media (max-width: 1180px) {
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

  .dashboard-grid,
  .execution-layout,
  .case-library,
  .detail-page-grid,
  .description-grid,
  .execution-form {
    grid-template-columns: 1fr;
  }

  .case-detail-panel {
    position: static;
  }

  .status-summary {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .status-summary .legend {
    width: 100%;
  }

  .player-step-content {
    grid-template-columns: 1fr;
  }

  .expected-image-gallery.player-gallery {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
}

@media (max-width: 1420px) {
  .execution-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-hero {
    min-height: auto;
    gap: 46px;
    padding: 34px 24px;
  }

  .login-copy h1 {
    font-size: 38px;
  }

  .login-panel {
    padding: 24px;
  }
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 12px;
  }

  .brand-mini,
  .logout-button {
    display: none;
  }

  .main-nav {
    display: flex;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
  }

  .main-nav .nav-link {
    flex: 0 0 auto;
    width: auto;
    min-height: 42px;
  }

  .topbar {
    height: auto;
    padding: 18px;
    gap: 14px;
    align-items: flex-start;
  }

  .screen {
    padding: 22px 18px;
  }

  .page-heading,
  .case-detail-heading,
  .case-detail-hero,
  .table-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .kpi-grid,
  .filter-strip,
  .client-qr-grid,
  .client-store-grid,
  .client-overview,
  .client-summary-grid,
  .client-support-grid,
  .install-instructions-grid,
  .client-phase-grid,
  .qa-config-grid,
  .detail-meta-grid {
    grid-template-columns: 1fr;
  }

  .install-help-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .qa-config-card {
    grid-template-columns: 1fr;
  }

  .phase-editor-row {
    grid-template-columns: 1fr;
  }

  .status-summary {
    grid-template-columns: 1fr;
  }

  .player-step-card {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .player-step-content {
    padding: 20px;
  }

  .expected-image-gallery.player-gallery .expected-image-preview img {
    height: 460px;
  }
}

@media (max-width: 560px) {
  .topbar,
  .top-actions,
  .toolbar {
    width: 100%;
  }

  .product strong {
    font-size: 20px;
  }

  .user-pill div {
    display: none;
  }

  .page-heading h1 {
    font-size: 24px;
  }

  .execution-actions .btn,
  .toolbar .btn,
  .toolbar .form-select {
    width: 100%;
  }

  .login-card {
    padding: 24px;
  }

  .expected-image-gallery.player-gallery {
    grid-template-columns: 1fr;
  }

  .expected-image-gallery.player-gallery .expected-image-preview img {
    height: 360px;
  }

  .login-copy h1 {
    font-size: 32px;
  }

  .login-options,
  .login-footnote {
    align-items: flex-start;
    flex-direction: column;
  }
}
