:root {
  color-scheme: light;
  --ink: #102f4c;
  --ink-strong: #08243c;
  --ink-soft: #5a6f82;
  --canvas: #f3f7fa;
  --surface: #ffffff;
  --surface-subtle: #f8fafc;
  --line: #dbe5ec;
  --line-strong: #bdccd8;
  --teal: #087f79;
  --teal-dark: #05655f;
  --teal-soft: #e2f5f2;
  --blue: #1768b3;
  --blue-soft: #eaf3fb;
  --amber: #7a5200;
  --amber-soft: #fff4cf;
  --red: #a3273d;
  --red-soft: #fdecef;
  --green: #176b55;
  --green-soft: #e7f5ef;
  --nav: #0b2740;
  --nav-deep: #071d30;
  --nav-text: #d7e6f0;
  --nav-muted: #8eafc2;
  --nav-active: #0a746f;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm:
    0 1px 2px rgba(8, 36, 60, 0.04), 0 4px 12px rgba(8, 36, 60, 0.035);
  --shadow: 0 16px 40px rgba(8, 36, 60, 0.1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}
html {
  min-width: 320px;
  background: var(--canvas);
}
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--canvas);
  font-size: 15px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
select {
  cursor: pointer;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid #f4b400;
  outline-offset: 3px;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}
button:not(:disabled) {
  transition:
    transform 150ms var(--ease-out),
    background-color 150ms var(--ease-out),
    border-color 150ms var(--ease-out),
    box-shadow 150ms var(--ease-out);
}
button:not(:disabled):active {
  transform: scale(0.97);
}
a {
  color: var(--teal-dark);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  z-index: 100;
  left: -999px;
  top: 0.75rem;
  padding: 0.7rem 1rem;
  color: var(--ink-strong);
  background: white;
  border: 2px solid var(--teal);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.skip-link:focus {
  left: 0.75rem;
}
.prototype-banner {
  min-height: 26px;
  padding: 6px 1rem;
  color: #dcebf4;
  background: var(--nav-deep);
  text-align: center;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.11em;
}
.eyebrow,
.card-kicker,
.nav-overline {
  margin: 0 0 0.4rem;
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  line-height: 1.3;
}
.muted {
  color: var(--ink-soft);
  line-height: 1.55;
}

/* Brand */
.brand-lockup,
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.brand-lockup > span:last-child,
.sidebar-brand > span:last-child {
  display: grid;
  gap: 0.12rem;
  line-height: 1;
}
.brand-lockup strong,
.sidebar-brand strong {
  font-size: 1.45rem;
  letter-spacing: -0.035em;
}
.brand-lockup small,
.sidebar-brand small {
  color: #8eddd6;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.2em;
}
.brand-symbol {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 13px;
  background: linear-gradient(145deg, #1cb7ad, #0d7f79);
  box-shadow: 0 12px 24px rgba(9, 127, 121, 0.24);
  transform: rotate(45deg);
}
.brand-symbol i {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #e8fffc;
  border-radius: 3px;
}
.brand-symbol i:nth-child(1) {
  transform: translate(-7px, -7px);
}
.brand-symbol i:nth-child(2) {
  transform: translate(7px, -7px);
}
.brand-symbol i:nth-child(3) {
  transform: translate(0, 7px);
}
.brand-symbol.compact {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: none;
}
.brand-symbol.compact i {
  width: 9px;
  height: 9px;
}
.brand-symbol.compact i:nth-child(1) {
  transform: translate(-5px, -5px);
}
.brand-symbol.compact i:nth-child(2) {
  transform: translate(5px, -5px);
}
.brand-symbol.compact i:nth-child(3) {
  transform: translate(0, 5px);
}
.brand-symbol > i {
  transform-origin: center;
}
.brand-symbol,
.brand-symbol i {
  transform-box: fill-box;
}
.brand-symbol i {
  rotate: -45deg;
}

/* Login */
.login-layout {
  min-height: calc(100vh - 26px);
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(500px, 1.1fr);
}
.brand-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3rem;
  min-height: 100%;
  padding: clamp(2rem, 5vw, 5rem);
  color: white;
  background:
    radial-gradient(
      circle at 18% 8%,
      rgba(22, 128, 144, 0.55),
      transparent 32%
    ),
    linear-gradient(155deg, #0e3858 0%, var(--nav) 56%, var(--nav-deep) 100%);
}
.brand-panel::after {
  content: "";
  position: absolute;
  right: -18%;
  bottom: -18%;
  width: min(36vw, 520px);
  aspect-ratio: 1;
  border: 1px solid rgba(137, 218, 211, 0.15);
  border-radius: 50%;
  box-shadow:
    0 0 0 60px rgba(137, 218, 211, 0.035),
    0 0 0 120px rgba(137, 218, 211, 0.025);
  pointer-events: none;
}
.brand-panel .eyebrow {
  color: #8fe0d8;
}
.brand-message {
  position: relative;
  z-index: 1;
  max-width: 38rem;
}
.brand-message h1 {
  margin: 0;
  max-width: 13ch;
  color: #fff;
  font-size: clamp(2.35rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}
.brand-message > p:last-child {
  max-width: 34rem;
  margin: 1.4rem 0 0;
  color: #c9dce8;
  font-size: 1.06rem;
  line-height: 1.7;
}
.brand-benefits {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  color: #d9e9f2;
  list-style: none;
}
.brand-benefits li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.brand-benefits li span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #c8fff9;
  background: rgba(49, 179, 168, 0.18);
  border: 1px solid rgba(143, 224, 216, 0.35);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 900;
}
.login-card {
  align-self: center;
  justify-self: center;
  width: min(580px, calc(100% - 3rem));
  display: grid;
  gap: 1rem;
  margin: 2rem 0;
  padding: clamp(1.5rem, 4vw, 2.8rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.login-heading {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 0.3rem;
}
.login-heading h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  letter-spacing: -0.035em;
}
.login-heading p {
  margin: 0.2rem 0 0;
}
.login-card label,
.field-label {
  color: var(--ink-strong);
  font-size: 0.86rem;
  font-weight: 750;
}
.demo-profiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}
.demo-profile {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  min-height: 62px;
  padding: 0.7rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: left;
}
.demo-profile:last-child {
  grid-column: 1 / -1;
}
.demo-profile:hover {
  border-color: #8cb9bb;
  background: #fbfefe;
}
.demo-profile.selected {
  border-color: var(--teal);
  background: var(--teal-soft);
  box-shadow: inset 0 0 0 1px var(--teal);
}
.profile-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--teal-dark);
  background: #edf7f8;
  border-radius: 11px;
  font-size: 0.72rem;
  font-weight: 850;
}
.demo-profile.selected .profile-avatar {
  color: #fff;
  background: var(--teal);
}
.profile-copy {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}
.profile-copy strong {
  overflow: hidden;
  color: var(--ink-strong);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-copy small {
  color: var(--ink-soft);
  font-size: 0.74rem;
}
.profile-check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 0.7rem;
}
.demo-profile.selected .profile-check {
  color: white;
  background: var(--teal);
  border-color: var(--teal);
}
.password-field {
  display: grid;
  gap: 0.45rem;
}
.login-card input,
.login-card select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.78rem 0.9rem;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}
.login-card input:hover,
textarea:hover {
  border-color: #90a9ba;
}
.footnote {
  margin: 0.2rem 0 0;
  color: var(--ink-soft);
  font-size: 0.77rem;
  line-height: 1.5;
}
.form-message {
  margin: 0.25rem 0;
  font-size: 0.84rem;
  line-height: 1.45;
}
.error {
  color: var(--red);
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0.65rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 800;
  line-height: 1.15;
}
.button:not(:disabled):hover {
  transform: translateY(-1px);
}
.button.primary {
  color: white;
  background: var(--teal);
  box-shadow: 0 6px 14px rgba(8, 127, 121, 0.17);
}
.button.primary:not(:disabled):hover {
  background: var(--teal-dark);
  box-shadow: 0 8px 18px rgba(8, 127, 121, 0.24);
}
.button.secondary {
  color: var(--teal-dark);
  background: white;
  border-color: #83b8b5;
}
.button.secondary:not(:disabled):hover {
  background: var(--teal-soft);
  border-color: var(--teal);
}
.button.danger {
  color: var(--red);
  background: white;
  border-color: #dda8b2;
}
.button.danger:not(:disabled):hover {
  background: var(--red-soft);
  border-color: var(--red);
}
.button.ghost {
  color: var(--ink);
  background: #edf2f6;
}
.button.ghost:not(:disabled):hover {
  background: #dfe8ee;
}
.button.full {
  width: 100%;
  min-height: 48px;
}
.link-button {
  padding: 0;
  color: #bdd5e2;
  background: transparent;
  border: 0;
  text-align: left;
  font-size: 0.79rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Application shell */
.app-shell {
  min-height: calc(100vh - 26px);
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 26px);
  max-height: calc(100vh - 26px);
  padding: 1.45rem 1rem 1rem;
  color: var(--nav-text);
  background: linear-gradient(180deg, var(--nav) 0%, var(--nav-deep) 100%);
  overflow-y: auto;
}
.sidebar-brand {
  padding: 0 0.55rem;
  margin-bottom: 2rem;
}
.nav-overline {
  margin: 0 0.7rem 0.7rem;
  color: var(--nav-muted);
  font-size: 0.62rem;
}
.navigation {
  display: grid;
  gap: 0.25rem;
}
.navigation-section {
  display: grid;
  gap: 0.25rem;
}
.navigation-section + .navigation-section {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}
.navigation-section-title {
  margin: 0 0.7rem 0.3rem;
  color: #789bad;
  font-size: 0.6rem;
  font-weight: 850;
  letter-spacing: 0.11em;
}
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.78rem;
  width: 100%;
  min-height: 44px;
  padding: 0.72rem 0.8rem;
  color: var(--nav-text);
  background: transparent;
  border: 0;
  border-radius: 9px;
  text-align: left;
  font-weight: 700;
}
.nav-item:not(.active):hover {
  color: white;
  background: rgba(255, 255, 255, 0.075);
}
.nav-item.active {
  color: white;
  background: linear-gradient(90deg, var(--nav-active), #0a615f);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -1rem;
  width: 3px;
  height: 24px;
  background: #73ddd4;
  border-radius: 0 4px 4px 0;
}
.nav-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  color: #7fd8d1;
  font-size: 1rem;
}
.nav-item.active .nav-icon {
  color: #d9fffc;
}
.nav-label {
  min-width: 0;
}
.sidebar-footer {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 0.45rem 0.55rem;
  align-items: start;
  margin-top: auto;
  padding: 1.15rem 0.65rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.77rem;
}
.sidebar-footer > span:nth-child(2) {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}
.sidebar-footer small {
  color: var(--nav-muted);
  font-size: 0.67rem;
}
.sidebar-footer strong {
  overflow: hidden;
  color: #eff8fc;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-footer .link-button {
  grid-column: 2;
}
.status-dot {
  width: 8px;
  height: 8px;
  margin-top: 0.25rem;
  background: #64d0ae;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(100, 208, 174, 0.12);
}
.content-shell {
  min-width: 0;
}
.topbar {
  position: sticky;
  z-index: 12;
  top: 0;
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem clamp(1rem, 3vw, 2.2rem);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.icon-button {
  display: none;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  color: var(--ink);
  background: #edf2f6;
  border: 0;
  border-radius: var(--radius-sm);
  font-size: 1.12rem;
}
.tenant-control {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}
.tenant-control > span:last-child,
.context-control {
  display: grid;
  gap: 0.1rem;
}
.tenant-control small,
.context-control label {
  color: var(--ink-soft);
  font-size: 0.65rem;
  font-weight: 700;
}
.tenant-control strong {
  max-width: 230px;
  overflow: hidden;
  color: var(--ink-strong);
  font-size: 0.85rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-radius: 8px;
}
.topbar-separator {
  width: 1px;
  height: 34px;
  background: var(--line);
}
.context-control {
  flex: 1;
  max-width: 520px;
  min-width: 150px;
}
.context-control select {
  width: 100%;
  min-width: 0;
  padding: 0.12rem 1.4rem 0.12rem 0;
  color: var(--ink-strong);
  background: transparent;
  border: 0;
  font-size: 0.85rem;
  font-weight: 750;
  text-overflow: ellipsis;
}
.identity-block {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: auto;
}
.identity-block > span:last-child {
  display: grid;
  gap: 0.08rem;
  font-size: 0.83rem;
}
.identity-block small {
  color: var(--ink-soft);
  font-size: 0.68rem;
}
.identity-initials {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  color: white;
  background: linear-gradient(145deg, #0d8d87, #0a5e67);
  border-radius: 12px;
  font-size: 0.74rem;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(8, 127, 121, 0.18);
}
.nav-backdrop {
  display: none;
}
.content {
  width: 100%;
  max-width: 1540px;
  margin: 0 auto;
  padding: clamp(1.3rem, 3vw, 2.5rem);
}

/* Page primitives */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.page-header h1 {
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(1.75rem, 3vw, 2.55rem);
  line-height: 1.08;
  letter-spacing: -0.047em;
}
.page-header p:not(.eyebrow) {
  max-width: 780px;
  margin: 0.45rem 0 0;
  color: var(--ink-soft);
  line-height: 1.55;
}
.context-note {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-bottom: 1rem;
  padding: 0.8rem 1rem;
  color: #275670;
  background: var(--blue-soft);
  border: 1px solid #d2e8f8;
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
  line-height: 1.45;
}
.context-note strong {
  white-space: nowrap;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.2rem;
}
.metric-card,
.panel,
.work-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.metric-card {
  position: relative;
  min-width: 0;
  padding: 1rem 1.05rem;
  overflow: hidden;
}
.metric-card::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--teal);
  opacity: 0.45;
}
.metric-card > span:first-child {
  display: block;
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.metric-card strong {
  display: block;
  margin: 0.4rem 0 0.1rem;
  color: var(--ink-strong);
  font-size: 1.75rem;
  letter-spacing: -0.055em;
}
.metric-card > span:last-child,
.metric-card small {
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.4;
}
.panel {
  min-width: 0;
  padding: 1.2rem;
}
.panel h2,
.work-card h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 1.03rem;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.panel-header p {
  margin: 0.25rem 0 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
}
.two-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.85fr);
  gap: 1rem;
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.82fr);
  gap: 1rem;
  align-items: start;
}
.action-stack {
  display: grid;
  gap: 0.75rem;
}
.panel-divider {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.empty-state,
.error-state,
.loading-state {
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 1.5rem;
  color: var(--ink-soft);
  background: var(--surface-subtle);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  text-align: center;
  line-height: 1.55;
}
.error-state {
  color: var(--red);
  background: #fff8f9;
  border-color: #e8b6c0;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.58rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.15;
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
  opacity: 0.8;
}
.badge.info {
  color: #175e91;
  background: var(--blue-soft);
}
.badge.good {
  color: var(--green);
  background: var(--green-soft);
}
.badge.warn {
  color: var(--amber);
  background: var(--amber-soft);
}
.badge.bad {
  color: var(--red);
  background: var(--red-soft);
}
.badge.neutral {
  color: #4e6474;
  background: #edf2f5;
}

/* Mi día */
.day-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(290px, 0.8fr);
  gap: 1rem;
  align-items: start;
}
.day-main,
.day-side {
  display: grid;
  gap: 1rem;
}
.next-action {
  position: relative;
  padding: clamp(1.2rem, 2.5vw, 1.7rem);
  background: linear-gradient(135deg, #fff 0%, #f7fcfc 100%);
  border: 1px solid #cfe4e2;
  border-radius: var(--radius-lg);
  box-shadow: 0 15px 34px rgba(8, 72, 81, 0.08);
  overflow: hidden;
}
.next-action::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--teal), #31b2a8);
}
.next-action-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.9rem;
}
.next-action h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  letter-spacing: -0.025em;
}
.next-action h3 {
  margin: 0.15rem 0 0.5rem;
  color: var(--ink-strong);
  font-size: clamp(1.15rem, 2vw, 1.38rem);
}
.next-action-reason {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0 0 1rem;
  color: var(--red);
  font-weight: 700;
  line-height: 1.45;
}
.next-action-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.1rem;
}
.progress-block {
  flex: 1;
  min-width: 160px;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  color: var(--ink-soft);
  font-size: 0.77rem;
}
.progress-track {
  height: 7px;
  overflow: hidden;
  background: #e5edf1;
  border-radius: 99px;
}
.progress-track > span {
  display: block;
  height: 100%;
  min-width: 6px;
  background: linear-gradient(90deg, var(--teal), #34b7ac);
  border-radius: inherit;
}
.priority-list,
.signal-list {
  display: grid;
  gap: 0.1rem;
}
.priority-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 0;
  border-top: 1px solid #edf1f4;
}
.priority-row:first-child {
  border-top: 0;
}
.priority-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-radius: 10px;
  font-weight: 850;
}
.priority-copy {
  min-width: 0;
}
.priority-copy strong {
  display: block;
  overflow: hidden;
  color: var(--ink-strong);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.priority-copy small {
  display: block;
  margin-top: 0.2rem;
  color: var(--ink-soft);
}
.priority-row .link-button {
  color: var(--teal-dark);
  font-weight: 750;
}
.signal-card {
  padding: 0.85rem 0;
  border-top: 1px solid #edf1f4;
}
.signal-card:first-child {
  padding-top: 0;
  border-top: 0;
}
.signal-card strong {
  color: var(--ink-strong);
}
.signal-card p {
  margin: 0.25rem 0 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.45;
}

/* Work lists and task details */
.summary-pills,
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
}
.summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 0.72rem;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  font-size: 0.8rem;
  font-weight: 750;
}
.summary-pill strong {
  color: var(--ink-strong);
}
.filter-tab {
  min-height: 38px;
  padding: 0.5rem 0.8rem;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  font-weight: 750;
}
.filter-tab.active {
  color: var(--teal-dark);
  border-bottom-color: var(--teal);
}
.work-list {
  display: grid;
  gap: 0.7rem;
}
.work-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.05rem;
}
.work-card:hover {
  border-color: #c2d4de;
  box-shadow: 0 8px 24px rgba(8, 36, 60, 0.065);
}
.work-card h2,
.work-card h3 {
  margin: 0.12rem 0 0.38rem;
  color: var(--ink-strong);
}
.work-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.8rem;
  color: var(--ink-soft);
  font-size: 0.8rem;
}
.work-meta > span:not(.badge) {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.work-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}
.work-next {
  margin-top: 0.55rem;
  color: var(--ink);
  font-size: 0.79rem;
  font-weight: 650;
}
.task-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
}
.task-summary .summary-pill {
  box-shadow: none;
}
.correction-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 1rem;
  color: #832036;
  background: var(--red-soft);
  border: 1px solid #edc3cb;
  border-left: 4px solid var(--red);
  border-radius: var(--radius-sm);
}
.correction-banner strong {
  display: block;
  margin-bottom: 0.2rem;
}
.checklist {
  display: grid;
  gap: 0.55rem;
}
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.8rem;
  background: #fcfefe;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.check-row:has(input:checked) {
  background: #f6fbf9;
  border-color: #cee5dc;
}
.check-row input {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  margin-top: 0.12rem;
  accent-color: var(--teal);
}
.check-row p {
  margin: 0.22rem 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
}
.readiness-card {
  border-color: #cfe4e2;
}
.readiness-list {
  display: grid;
  gap: 0.5rem;
  margin: 0.9rem 0 1rem;
  padding: 0;
  list-style: none;
}
.readiness-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  color: var(--ink-soft);
  font-size: 0.82rem;
}
.readiness-list li.ready {
  color: var(--green);
}
.readiness-list li.pending {
  color: var(--amber);
}
.timeline {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
}
.timeline li {
  position: relative;
  padding-left: 1.2rem;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.45;
  list-style: none;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 8px;
  height: 8px;
  background: var(--teal);
  border-radius: 50%;
}
.timeline li::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 1rem;
  bottom: -0.75rem;
  width: 1px;
  background: var(--line);
}
.timeline li:last-child::after {
  display: none;
}

/* Tables and forms */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.data-table th {
  padding: 0.65rem 0.5rem;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.68rem;
  letter-spacing: 0.07em;
}
.data-table td {
  padding: 0.8rem 0.5rem;
  border-bottom: 1px solid #edf2f5;
  vertical-align: top;
}
.data-table tr:last-child td {
  border-bottom: 0;
}
.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.admin-form label,
.field-label {
  display: grid;
  gap: 0.38rem;
  color: var(--ink-strong);
  font-size: 0.84rem;
  font-weight: 750;
}
.admin-form input,
.admin-form select,
#responsible-candidates {
  width: 100%;
  min-height: 2.7rem;
  padding: 0.58rem 0.68rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}
.admin-form .confirm-row,
.confirm-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.75rem;
  color: #285772;
  background: var(--blue-soft);
  border-radius: var(--radius-sm);
  line-height: 1.4;
}
.admin-form .confirm-row input,
.confirm-row input {
  width: 18px;
  height: 18px;
  min-height: auto;
  flex: 0 0 18px;
  margin-top: 0.1rem;
  accent-color: var(--teal);
}
.admin-form > .button {
  grid-column: 1 / -1;
  justify-self: start;
}
#responsible-candidates {
  min-height: 7rem;
}
.admin-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.config-list {
  display: grid;
  gap: 0.55rem;
}
.config-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.45rem 0.8rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
}
.config-list > div:first-child {
  padding-top: 0;
  border-top: 0;
}
.config-list span:not(.badge) {
  grid-column: 1;
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.4;
}
.config-list .badge {
  grid-column: 2;
  grid-row: 1 / 3;
}
.config-list .button.ghost {
  grid-column: 1;
  justify-self: start;
}
.mobile-label {
  display: none;
}

/* Calendar */
.calendar-controls {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.calendar-nav,
.calendar-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.6rem;
}
.calendar-nav strong {
  padding: 0.65rem 0;
  color: var(--ink);
  font-size: 0.85rem;
}
.calendar-nav label,
.calendar-filters label {
  display: grid;
  gap: 0.3rem;
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 750;
}
.calendar-nav input,
.calendar-filters select {
  min-height: 2.55rem;
  padding: 0.45rem 0.55rem;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}
.view-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0;
}
.view-switch .button.active {
  color: white;
  background: var(--teal);
  border-color: var(--teal);
}
.calendar-panel {
  min-width: 0;
}
.calendar-agenda,
.calendar-week-grid,
.calendar-day-focus {
  display: grid;
  gap: 0.75rem;
}
.calendar-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  background: white;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.calendar-entry.status-returned {
  border-left-color: var(--red);
}
.calendar-entry.status-submitted {
  border-left-color: var(--blue);
}
.calendar-entry.status-completed {
  border-left-color: var(--green);
}
.calendar-entry.status-open {
  border-left-color: #9a6a07;
}
.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.calendar-week-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.calendar-day {
  min-width: 0;
  padding: 0.9rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.calendar-day > * + * {
  margin-top: 0.55rem;
}
.calendar-chip {
  display: block;
  width: 100%;
  padding: 0.58rem 0.65rem;
  color: var(--ink);
  background: #f4fbfa;
  border: 1px solid #b8d9d5;
  border-radius: 0.55rem;
  text-align: left;
  font: inherit;
  font-size: 0.82rem;
}
.calendar-chip:hover {
  background: var(--teal-soft);
  border-color: var(--teal);
}
.calendar-chip.returned {
  background: #fff5f6;
  border-color: #efbcc5;
}
.calendar-chip.submitted {
  background: #f1f6ff;
  border-color: #b8cced;
}
.calendar-chip.completed {
  background: #f1faf5;
  border-color: #add7c3;
}

/* Notifications */
.notification-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}
.notification-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.notification-list,
.outbox-list,
.preference-list {
  display: grid;
  gap: 0.65rem;
}
.notification-card,
.outbox-list article {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.9rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.notification-card.is-unread {
  background: #f7fffe;
  border-left: 4px solid var(--teal);
}
.notification-card.is-read {
  opacity: 0.82;
}
.notification-card h3 {
  margin: 0.1rem 0 0.35rem;
  color: var(--ink-strong);
  font-size: 0.98rem;
}
.notification-actions {
  display: grid;
  gap: 0.45rem;
  min-width: 126px;
}
.preference-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
}
.preference-row:first-child {
  border-top: 0;
}
.preference-row span {
  display: grid;
  gap: 0.2rem;
}
.preference-row small {
  color: var(--ink-soft);
  line-height: 1.35;
}
.preference-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--teal);
}
.preference-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.preference-toggles label {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  color: var(--ink-soft);
  font-size: 0.73rem;
  font-weight: 700;
}
.preference-toggles input {
  width: 17px;
  height: 17px;
}
.outbox-list article {
  display: block;
}
.digest-preview-grid {
  margin-top: 1rem;
}

/* Analytics */
.analytics-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(172px, 1fr));
  gap: 0.9rem;
  align-items: end;
}
.analytics-filters > label {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
}
.analytics-filters input,
.analytics-filters select {
  width: 100%;
  min-width: 0;
  min-height: 2.75rem;
  padding: 0.55rem 0.65rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.analytics-filters > p {
  grid-column: 1 / -1;
  margin: 0;
  overflow-wrap: anywhere;
}
.analytics-card {
  min-height: 12rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  overflow-wrap: anywhere;
}
.analytics-card strong {
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.05;
}
.analytics-card small {
  color: var(--ink-soft);
  line-height: 1.35;
}
.analytics-card .button {
  width: 100%;
  margin-top: auto;
}
.analytics-dimensions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-block: 1rem;
}
.analytics-dimension {
  min-width: 0;
  overflow: hidden;
}
.analytics-comparison-list,
.analytics-stat-list,
.analytics-category-list {
  display: grid;
  gap: 0.55rem;
}
.analytics-comparison-list > div,
.analytics-stat-list > div,
.analytics-category-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.1rem;
  border-bottom: 1px solid var(--line);
}
.analytics-stat-list > div {
  grid-template-columns: minmax(0, 1fr) auto;
}
.analytics-comparison-list > div {
  display: flex;
  justify-content: space-between;
  align-items: start;
}
.analytics-comparison-list span {
  color: var(--ink-soft);
  font-size: 0.88rem;
  text-align: right;
}
.analytics-quality {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.65rem 1rem;
  margin: 0;
}
.analytics-quality dt {
  color: var(--ink);
  font-weight: 700;
}
.analytics-quality dd {
  margin: 0;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}
.analytics-trend {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.analytics-trend li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.7rem;
  background: #f5fbfb;
  border-left: 3px solid var(--teal);
}
.analytics-trend span {
  color: var(--ink-soft);
  text-align: right;
}

/* Dialog and toast */
.decision-dialog {
  width: min(520px, calc(100% - 2rem));
  padding: 0;
  color: var(--ink);
  background: white;
  border: 0;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(3, 25, 43, 0.3);
}
.decision-dialog::backdrop {
  background: rgba(5, 25, 42, 0.62);
  backdrop-filter: blur(3px);
}
.decision-dialog form {
  display: grid;
  gap: 1rem;
  padding: 1.4rem;
}
.dialog-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: white;
  background: var(--teal);
  border-radius: 12px;
  font-weight: 900;
}
.dialog-heading h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 1.4rem;
}
.dialog-heading p:last-child {
  margin: 0.4rem 0 0;
}
.decision-dialog textarea {
  resize: vertical;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.2rem;
}
.toast {
  position: fixed;
  z-index: 80;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  max-width: min(430px, calc(100vw - 2rem));
  padding: 0.9rem 1rem;
  color: #073b4c;
  background: white;
  border: 1px solid #9fd6d2;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.toast.error {
  color: #8b1e29;
  border-color: #e4a2a9;
}
.toast-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  color: white;
  background: var(--teal);
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 800;
}
.toast.error .toast-icon {
  background: var(--red);
}

/* Responsive */
@media (max-width: 1080px) {
  .day-layout {
    grid-template-columns: 1fr;
  }
  .day-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .analytics-dimensions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    inset: 26px auto 0 0;
    width: min(290px, 86vw);
    max-height: none;
    transform: translateX(-105%);
    transition: transform 220ms var(--ease-out);
    box-shadow: var(--shadow);
  }
  .app-shell.nav-open .sidebar {
    transform: translateX(0);
  }
  .nav-backdrop {
    position: fixed;
    z-index: 18;
    inset: 26px 0 0;
    display: block;
    visibility: hidden;
    background: rgba(6, 29, 48, 0.48);
    border: 0;
    opacity: 0;
    pointer-events: none;
    transition:
      opacity 180ms var(--ease-out),
      visibility 180ms;
  }
  .app-shell.nav-open .nav-backdrop {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }
  .icon-button {
    display: grid;
  }
  .topbar {
    padding: 0.7rem 1rem;
  }
  .tenant-control {
    display: none;
  }
  .topbar-separator {
    display: none;
  }
  .identity-block strong {
    max-width: 105px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .content {
    padding: 1.15rem 1rem 2rem;
  }
  .two-columns,
  .detail-grid,
  .notification-grid,
  .admin-form-grid {
    grid-template-columns: 1fr;
  }
  .page-header {
    display: block;
  }
  .page-header > .button {
    margin-top: 0.85rem;
  }
  .work-card {
    grid-template-columns: 1fr;
  }
  .work-actions {
    justify-content: flex-start;
  }
  .admin-config-grid {
    grid-template-columns: 1fr;
  }
  .data-table {
    display: block;
  }
  .data-table thead {
    display: none;
  }
  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: 100%;
  }
  .data-table tr {
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--line);
  }
  .data-table td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.34rem 0;
    border: 0;
    text-align: right;
  }
  .data-table td::before {
    content: attr(data-label);
    color: var(--ink-soft);
    text-align: left;
    font-size: 0.72rem;
    font-weight: 800;
  }
  .login-layout {
    grid-template-columns: 1fr;
  }
  .brand-panel {
    min-height: auto;
    padding: 2rem;
    gap: 2rem;
  }
  .brand-message h1 {
    max-width: 17ch;
    font-size: clamp(2.2rem, 8vw, 3.5rem);
  }
  .brand-benefits {
    display: none;
  }
  .login-card {
    width: min(620px, calc(100% - 2rem));
    margin: -1rem auto 2rem;
  }
}

@media (max-width: 700px) {
  .day-side {
    grid-template-columns: 1fr;
  }
  .next-action-footer {
    align-items: stretch;
    flex-direction: column;
  }
  .next-action-footer .button {
    width: 100%;
  }
  .demo-profiles {
    grid-template-columns: 1fr;
  }
  .demo-profile:last-child {
    grid-column: auto;
  }
  .calendar-month-grid {
    grid-template-columns: 1fr;
  }
  .calendar-entry {
    align-items: stretch;
    flex-direction: column;
  }
  .calendar-entry .button {
    width: 100%;
  }
  .calendar-nav,
  .calendar-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .calendar-nav strong,
  .calendar-nav label,
  .calendar-filters label {
    grid-column: 1 / -1;
  }
  .view-switch .button {
    flex: 1 1 calc(50% - 0.45rem);
  }
  .notification-summary {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }
  .notification-card {
    flex-direction: column;
  }
  .notification-actions {
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }
  .preference-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .admin-form {
    grid-template-columns: 1fr;
  }
  .analytics-filters {
    grid-template-columns: 1fr;
  }
  .analytics-dimensions,
  .analytics-quality {
    grid-template-columns: 1fr;
  }
  .analytics-comparison-list > div,
  .analytics-trend li {
    flex-direction: column;
    gap: 0.25rem;
  }
  .analytics-comparison-list span,
  .analytics-trend span {
    text-align: left;
  }
  .analytics-card {
    min-height: 0;
  }
}

@media (max-width: 500px) {
  body {
    font-size: 14px;
  }
  .prototype-banner {
    padding-inline: 0.5rem;
    font-size: 0.58rem;
    letter-spacing: 0.07em;
  }
  .brand-panel {
    padding: 1.5rem;
  }
  .brand-message > p:last-child {
    display: none;
  }
  .login-card {
    width: calc(100% - 1rem);
    margin: -0.4rem auto 1rem;
    padding: 1.15rem;
  }
  .identity-block small {
    display: none;
  }
  .identity-initials {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
  .context-control {
    min-width: 0;
  }
  .context-control select {
    font-size: 0.78rem;
  }
  .metric-grid {
    gap: 0.65rem;
  }
  .metric-card {
    padding: 0.9rem;
  }
  .metric-card strong {
    font-size: 1.5rem;
  }
  .panel {
    padding: 1rem;
  }
  .work-card {
    padding: 0.9rem;
  }
  .work-actions {
    display: grid;
    width: 100%;
  }
  .work-actions .button,
  .page-header > .button {
    width: 100%;
  }
  .page-header h1 {
    font-size: 1.7rem;
  }
  .priority-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }
  .priority-row .link-button {
    grid-column: 2;
    justify-self: start;
  }
  .dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .dialog-actions .button {
    width: 100%;
  }
}

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


/* Boceto aprobado — shell claro y Mi día */
.has-app-shell {
  --canvas: #f5f9fc;
  --surface: #ffffff;
  --ink: #113456;
  --ink-strong: #062e58;
  --ink-soft: #66788a;
  --line: #dfe7ed;
  --teal: #168f88;
  --teal-dark: #08746e;
  --teal-soft: #e2f7f3;
  --navy: #073b75;
  background: var(--canvas);
}
.has-app-shell .prototype-banner { display: none; }
.has-app-shell .app-shell {
  min-height: 100vh;
  grid-template-columns: 224px minmax(0, 1fr);
  background: var(--canvas);
}
.has-app-shell .sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  max-height: 100vh;
  padding: 0;
  color: var(--ink-strong);
  background: #fff;
  border-right: 1px solid var(--line);
  box-shadow: none;
}
.has-app-shell .sidebar-brand {
  min-height: 74px;
  gap: .65rem;
  margin: 0;
  padding: 0 1.15rem;
  border-bottom: 1px solid var(--line);
}
.has-app-shell .sidebar-brand .brand-symbol.compact {
  width: 34px;
  height: 34px;
  background: linear-gradient(145deg, #57c9bb, #087c75);
  box-shadow: none;
}
.has-app-shell .brand-wordmark {
  color: var(--ink-strong);
  font-size: 1.03rem;
  font-weight: 760;
  letter-spacing: -.025em;
  white-space: nowrap;
}
.has-app-shell .brand-wordmark strong {
  font-size: inherit;
  letter-spacing: inherit;
}
.has-app-shell .navigation {
  display: grid;
  gap: .25rem;
  padding: 1rem .7rem;
}
.has-app-shell .nav-item {
  min-height: 43px;
  gap: .72rem;
  padding: .68rem .75rem;
  color: #173b60;
  background: transparent;
  border-radius: 7px;
  font-size: .9rem;
  font-weight: 610;
}
.has-app-shell .nav-item:not(.active):hover {
  color: var(--ink-strong);
  background: #f1f7f8;
}
.has-app-shell .nav-item.active {
  color: #0d5f5d;
  background: linear-gradient(90deg, #dff7f2 0%, #edf9f7 100%);
  box-shadow: none;
}
.has-app-shell .nav-item.active::before { display: none; }
.has-app-shell .nav-icon {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
  color: #21496f;
}
.has-app-shell .nav-icon svg,
.has-app-shell .section-icon svg,
.has-app-shell .row-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.has-app-shell .nav-item.active .nav-icon { color: #0a746f; }
.has-app-shell .sidebar-footer { display: none; }
.has-app-shell .topbar {
  min-height: 74px;
  padding: .65rem 1.35rem;
  gap: 1rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
  backdrop-filter: none;
}
.has-app-shell .tenant-control,
.has-app-shell .context-control {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 270px;
}
.has-app-shell .tenant-control {
  padding-right: .2rem;
}
.has-app-shell .tenant-control small,
.has-app-shell .context-control label {
  color: #6b7c8c;
  font-size: .66rem;
  font-weight: 650;
}
.has-app-shell .tenant-control strong,
.has-app-shell .context-control select {
  max-width: 220px;
  color: var(--ink-strong);
  font-size: .8rem;
  font-weight: 700;
}
.has-app-shell .topbar-icon {
  width: 30px;
  height: 30px;
  color: #0e4f78;
  background: transparent;
  font-size: 1.15rem;
}
.has-app-shell .topbar-separator {
  height: 38px;
  background: #d7e1e8;
}
.has-app-shell .global-search {
  display: flex;
  align-items: center;
  gap: .55rem;
  width: min(390px, 32vw);
  min-width: 220px;
  min-height: 42px;
  margin-left: auto;
  padding: 0 .9rem;
  color: #536a7f;
  background: #f3f7fa;
  border: 1px solid #e2e9ee;
  border-radius: 999px;
}
.has-app-shell .global-search > span {
  font-size: 1.4rem;
  line-height: 1;
}
.has-app-shell .global-search input {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: .82rem;
}
.has-app-shell .global-search input::placeholder { color: #8795a3; }
.has-app-shell .identity-block { margin-left: 0; }
.has-app-shell .identity-block > span:last-child { display: none; }
.has-app-shell .identity-initials {
  width: 40px;
  height: 40px;
  color: #fff;
  background: var(--ink-strong);
  border-radius: 50%;
  box-shadow: none;
}
.has-app-shell .content {
  max-width: none;
  padding: 1.35rem 2rem 2.5rem;
}
.has-app-shell .day-header {
  margin-bottom: 1rem;
}
.has-app-shell .day-header h1 {
  margin: 0;
  color: var(--ink-strong);
  font-size: clamp(2rem, 3vw, 2.65rem);
  line-height: 1.05;
  letter-spacing: -.045em;
}
.has-app-shell .day-header p {
  margin: .35rem 0 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
}
.has-app-shell .day-layout {
  grid-template-columns: minmax(0, 2fr) minmax(310px, .98fr);
  gap: 1rem;
}
.has-app-shell .day-main,
.has-app-shell .day-side {
  gap: 1rem;
}
.has-app-shell .panel,
.has-app-shell .next-action {
  border: 1px solid #e0e7ec;
  border-radius: 7px;
  box-shadow: 0 7px 20px rgba(20, 55, 80, .055);
}
.has-app-shell .next-action {
  min-height: 300px;
  padding: 1.2rem 1.35rem;
  background: #fff;
  overflow: visible;
}
.has-app-shell .next-action::before { display: none; }
.has-app-shell .next-action-heading {
  margin-bottom: 1rem;
}
.has-app-shell .panel-title-with-icon {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.has-app-shell .panel-title-with-icon h2,
.has-app-shell .next-action-heading h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 1.18rem;
  letter-spacing: -.02em;
}
.has-app-shell .section-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  color: #0d557d;
  background: #edf5fb;
  border-radius: 50%;
  font-size: 1.45rem;
}
.has-app-shell .section-icon svg { width: 19px; height: 19px; }
.has-app-shell .section-icon.solid {
  color: #0c8580;
  background: #dff6f2;
}
.has-app-shell .section-icon.risk { color: var(--ink-strong); background: transparent; }
.has-app-shell .next-action-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  min-height: 215px;
}
.has-app-shell .next-action-content {
  display: grid;
  align-content: start;
  padding-right: 1.4rem;
}
.has-app-shell .next-action h3 {
  margin: .05rem 0 .45rem;
  color: var(--ink-strong);
  font-size: 1.2rem;
  letter-spacing: -.02em;
}
.has-app-shell .next-action-reason {
  gap: .45rem;
  margin: 0 0 1.2rem;
  color: #c32743;
  font-size: .88rem;
  font-weight: 620;
}
.has-app-shell .next-action-reason > span:first-child {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  color: #fff;
  background: #c32743;
  border-radius: 50%;
  font-size: .72rem;
}
.has-app-shell .next-action-progress { max-width: 540px; }
.has-app-shell .progress-label {
  color: var(--ink-soft);
  font-size: .76rem;
}
.has-app-shell .progress-track {
  height: 6px;
  background: #e9eef2;
}
.has-app-shell .progress-track > span { background: #129489; }
.has-app-shell .next-action-alert {
  display: flex;
  align-items: center;
  gap: .5rem;
  max-width: 540px;
  margin-top: 1rem;
  padding: .65rem .8rem;
  color: #b5233e;
  background: #fff0f3;
  border: 1px solid #f5d5dc;
  border-radius: 5px;
  font-size: .78rem;
}
.has-app-shell .next-action-content > .button {
  justify-self: start;
  min-width: 190px;
  margin-top: auto;
  color: #fff;
  background: var(--navy);
  border-color: var(--navy);
  box-shadow: 0 5px 12px rgba(7, 59, 117, .18);
}
.has-app-shell .next-action-content > .button:hover { background: #052f60; }
.has-app-shell .next-action-owner {
  display: grid;
  align-content: start;
  gap: .6rem;
  padding: .45rem 0 0 1.4rem;
  border-left: 1px solid #e6ebef;
}
.has-app-shell .next-action-owner small { color: var(--ink-soft); }
.has-app-shell .responsibility-tag,
.has-app-shell .risk-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  padding: .36rem .7rem;
  color: #08736f;
  background: #dff5f2;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
}
.has-app-shell .responsibility-tag.approval {
  color: #246896;
  background: #e5f2fb;
}
.has-app-shell .later-panel,
.has-app-shell .side-panel { padding: 1rem 1.25rem; }
.has-app-shell .later-panel .panel-header,
.has-app-shell .side-panel .panel-header {
  margin-bottom: .6rem;
  padding-bottom: .7rem;
  border-bottom: 1px solid #e8edf1;
}
.has-app-shell .later-panel .section-icon,
.has-app-shell .side-panel .section-icon {
  width: 29px;
  height: 29px;
  flex-basis: 29px;
  color: var(--ink-strong);
  background: transparent;
}
.has-app-shell .later-list,
.has-app-shell .waiting-list,
.has-app-shell .risk-list { display: grid; }
.has-app-shell .later-row,
.has-app-shell .waiting-row,
.has-app-shell .risk-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto auto 18px;
  align-items: center;
  gap: .7rem;
  min-height: 58px;
  padding: .55rem 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid #edf1f4;
  text-align: left;
}
.has-app-shell .later-row:last-child,
.has-app-shell .waiting-row:last-child,
.has-app-shell .risk-row:last-child { border-bottom: 0; }
.has-app-shell .later-row:hover,
.has-app-shell .waiting-row:hover { background: #f8fbfc; }
.has-app-shell .row-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #174f76;
  background: #f0f5f8;
  border: 1px solid #e0e8ed;
  border-radius: 50%;
}
.has-app-shell .row-icon svg { width: 18px; height: 18px; }
.has-app-shell .later-row strong,
.has-app-shell .waiting-row strong,
.has-app-shell .risk-row strong {
  color: var(--ink-strong);
  font-size: .81rem;
}
.has-app-shell .waiting-row > span:nth-child(2),
.has-app-shell .risk-row > span:nth-child(2) { display: grid; gap: .18rem; }
.has-app-shell .waiting-row small,
.has-app-shell .risk-row small {
  color: var(--ink-soft);
  font-size: .72rem;
  line-height: 1.35;
}
.has-app-shell .row-due {
  color: #6a7d8e;
  font-size: .73rem;
}
.has-app-shell .row-chevron {
  color: #46617a;
  font-size: 1.5rem;
  font-weight: 300;
}
.has-app-shell .side-panel .waiting-row,
.has-app-shell .side-panel .risk-row {
  grid-template-columns: 40px minmax(0, 1fr) auto 16px;
  min-height: 82px;
}
.has-app-shell .side-panel .row-icon { width: 38px; height: 38px; }
.has-app-shell .row-icon.risk {
  color: #c31e45;
  background: #ffedf2;
  border-color: #ffe0e7;
}
.has-app-shell .risk-tag {
  color: #c31e45;
  background: #ffe8ee;
}
.has-app-shell .compact-empty {
  padding: .75rem 0;
  color: var(--ink-soft);
  font-size: .82rem;
}
.has-app-shell .badge {
  padding: .36rem .7rem;
  font-size: .7rem;
}
.has-app-shell .badge.bad { color: #bf2945; background: #ffe9ee; }
.has-app-shell .badge.warn { color: #945f00; background: #fff2cf; }
.has-app-shell .badge.info { color: #236c99; background: #e5f2fb; }
.has-app-shell .badge.good { color: #08736f; background: #dff5f2; }
.has-app-shell .button.primary {
  color: #fff;
  background: var(--navy);
  border-color: var(--navy);
  box-shadow: 0 5px 12px rgba(7, 59, 117, .16);
}
.has-app-shell .button.primary:not(:disabled):hover { background: #052f60; }
.has-app-shell .button.secondary {
  color: #0c577d;
  border-color: #8eb8c5;
}

@media (max-width: 1100px) {
  .has-app-shell .day-layout { grid-template-columns: 1fr; }
  .has-app-shell .day-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .has-app-shell .global-search { width: min(310px, 28vw); min-width: 180px; }
}

@media (max-width: 900px) {
  .has-app-shell .app-shell { grid-template-columns: 1fr; }
  .has-app-shell .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(280px, 86vw);
    max-height: none;
    transform: translateX(-105%);
    box-shadow: 14px 0 34px rgba(16, 45, 70, .14);
  }
  .has-app-shell .app-shell.nav-open .sidebar { transform: translateX(0); }
  .has-app-shell .nav-backdrop { inset: 0; }
  .has-app-shell .topbar { padding-inline: .8rem; }
  .has-app-shell .global-search { display: none; }
  .has-app-shell .tenant-control { display: none; }
  .has-app-shell .context-control { max-width: none; flex: 1; }
  .has-app-shell .identity-block { margin-left: auto; }
  .has-app-shell .content { padding: 1.15rem 1rem 2rem; }
}

@media (max-width: 700px) {
  .has-app-shell .day-side { grid-template-columns: 1fr; }
  .has-app-shell .next-action-grid { grid-template-columns: 1fr; }
  .has-app-shell .next-action-content { padding-right: 0; }
  .has-app-shell .next-action-owner {
    grid-template-columns: auto 1fr;
    align-items: center;
    margin-top: 1rem;
    padding: 1rem 0 0;
    border-top: 1px solid #e6ebef;
    border-left: 0;
  }
  .has-app-shell .later-row { grid-template-columns: 36px minmax(0, 1fr) 18px; }
  .has-app-shell .later-row .row-due,
  .has-app-shell .later-row .responsibility-tag { display: none; }
}

@media (max-width: 500px) {
  .has-app-shell .day-header h1 { font-size: 1.9rem; }
  .has-app-shell .day-header p { font-size: .94rem; }
  .has-app-shell .next-action { padding: 1rem; }
  .has-app-shell .next-action-content > .button { width: 100%; }
  .has-app-shell .side-panel .waiting-row,
  .has-app-shell .side-panel .risk-row { grid-template-columns: 38px minmax(0, 1fr) 16px; }
  .has-app-shell .side-panel .responsibility-tag,
  .has-app-shell .side-panel .risk-tag { display: none; }
}

.has-app-shell .brand-wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: .24rem;
}
.has-app-shell .tenant-control {
  flex: 0 0 250px;
}
.has-app-shell .tenant-control > span:last-child {
  min-width: 0;
}
.has-app-shell .tenant-control strong {
  display: block;
  width: 100%;
}


/* Mi trabajo — Lista/Kanban, estados semánticos y panel lateral */
.has-app-shell {
  --status-open: #168b8a;
  --status-open-soft: #e5f6f4;
  --status-progress: #65a839;
  --status-progress-soft: #eef7e8;
  --status-returned: #e0643d;
  --status-returned-soft: #fceee9;
  --status-review: #8056b8;
  --status-review-soft: #f2ebf8;
  --status-closed: #217a70;
  --status-closed-soft: #e8f3f0;
  --status-cancelled: #7b858b;
  --status-cancelled-soft: #eff2f3;
  --motion-out: cubic-bezier(0.23, 1, 0.32, 1);
}

.has-app-shell .work-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.has-app-shell .work-toolbar .summary-pills { margin-bottom: 0; }
.has-app-shell .work-view-switch {
  display: inline-flex;
  flex: 0 0 auto;
  gap: .2rem;
  padding: .25rem;
  background: #ecf3f2;
  border: 1px solid #d8e7e4;
  border-radius: 10px;
}
.has-app-shell .work-view-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .42rem;
  min-height: 36px;
  padding: .42rem .7rem;
  color: #5f7487;
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: .78rem;
  font-weight: 760;
  transition:
    color 160ms var(--motion-out),
    background-color 160ms var(--motion-out),
    box-shadow 160ms var(--motion-out),
    transform 120ms var(--motion-out);
}
.has-app-shell .work-view-button:hover { color: var(--ink-strong); }
.has-app-shell .work-view-button.active {
  color: #087b78;
  background: #fff;
  box-shadow: 0 2px 8px rgba(14, 79, 76, .12);
}
.has-app-shell .work-view-button:active { transform: scale(.97); }
.has-app-shell .work-view-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.has-app-shell .kanban-view-icon {
  display: grid;
  grid-template-columns: repeat(3, 4px);
  align-items: end;
  gap: 2px;
  width: 16px;
  height: 16px;
}
.has-app-shell .kanban-view-icon i {
  display: block;
  height: 12px;
  background: currentColor;
  border-radius: 2px;
  opacity: .8;
}
.has-app-shell .kanban-view-icon i:nth-child(2) { height: 16px; }
.has-app-shell .kanban-view-icon i:nth-child(3) { height: 9px; }

.has-app-shell .work-card-interactive {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  outline: none;
  transition:
    transform 190ms var(--motion-out),
    border-color 190ms var(--motion-out),
    box-shadow 190ms var(--motion-out);
}
.has-app-shell .work-card-interactive::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--card-status, var(--status-open));
}
.has-app-shell .work-card-interactive:hover,
.has-app-shell .work-card-interactive:focus-visible {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--card-status) 38%, #dce6ec);
  box-shadow: 0 14px 28px color-mix(in srgb, var(--card-status) 10%, rgba(18, 50, 76, .08));
}
.has-app-shell .work-card-interactive:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--card-status) 20%, transparent), 0 14px 28px rgba(18, 50, 76, .11);
}
.has-app-shell .work-card-affordance {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: var(--card-status, var(--teal-dark));
  font-size: .78rem;
  font-weight: 780;
}
.has-app-shell .work-card-affordance > span:last-child {
  font-size: 1.05rem;
  transition: transform 180ms var(--motion-out);
}
.has-app-shell .work-card-interactive:hover .work-card-affordance > span:last-child,
.has-app-shell .work-card-interactive:focus-visible .work-card-affordance > span:last-child {
  transform: translateX(3px);
}
.has-app-shell .overdue { color: var(--status-returned) !important; font-weight: 760; }

.has-app-shell .work-card.status-open,
.has-app-shell .kanban-card.status-open { --card-status: var(--status-open); --card-soft: var(--status-open-soft); }
.has-app-shell .work-card.status-in_progress,
.has-app-shell .kanban-card.status-in_progress { --card-status: var(--status-progress); --card-soft: var(--status-progress-soft); }
.has-app-shell .work-card.status-returned,
.has-app-shell .kanban-card.status-returned { --card-status: var(--status-returned); --card-soft: var(--status-returned-soft); }
.has-app-shell .work-card.status-submitted,
.has-app-shell .kanban-card.status-submitted { --card-status: var(--status-review); --card-soft: var(--status-review-soft); }
.has-app-shell .work-card.status-completed,
.has-app-shell .kanban-card.status-completed { --card-status: var(--status-closed); --card-soft: var(--status-closed-soft); }
.has-app-shell .work-card.status-cancelled,
.has-app-shell .kanban-card.status-cancelled { --card-status: var(--status-cancelled); --card-soft: var(--status-cancelled-soft); }

.has-app-shell .badge.status-open { color: #0c7473; background: var(--status-open-soft); }
.has-app-shell .badge.status-in_progress { color: #548f2e; background: var(--status-progress-soft); }
.has-app-shell .badge.status-returned,
.has-app-shell .badge.status-rejected { color: #c34f2d; background: var(--status-returned-soft); }
.has-app-shell .badge.status-submitted,
.has-app-shell .badge.status-pending { color: #70459f; background: var(--status-review-soft); }
.has-app-shell .badge.status-completed,
.has-app-shell .badge.status-approved,
.has-app-shell .badge.status-delivered { color: #176a62; background: var(--status-closed-soft); }
.has-app-shell .badge.status-cancelled { color: #62717e; background: var(--status-cancelled-soft); }

.has-app-shell .kanban-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(230px, 1fr));
  gap: .8rem;
  min-width: 1190px;
  padding: .1rem .1rem 1rem;
}
.has-app-shell .content:has(.kanban-board) {
  overflow-x: auto;
  scrollbar-color: #b9c9d3 transparent;
  scrollbar-width: thin;
}
.has-app-shell .kanban-column {
  --column-status: var(--status-open);
  --column-soft: var(--status-open-soft);
  min-width: 0;
  padding: .75rem;
  background: color-mix(in srgb, var(--column-soft) 72%, #f7f9fa);
  border: 1px solid color-mix(in srgb, var(--column-status) 18%, #dfe7ed);
  border-radius: 12px;
}
.has-app-shell .kanban-in_progress { --column-status: var(--status-progress); --column-soft: var(--status-progress-soft); }
.has-app-shell .kanban-returned { --column-status: var(--status-returned); --column-soft: var(--status-returned-soft); }
.has-app-shell .kanban-submitted { --column-status: var(--status-review); --column-soft: var(--status-review-soft); }
.has-app-shell .kanban-closed { --column-status: var(--status-closed); --column-soft: var(--status-closed-soft); }
.has-app-shell .kanban-column-header { padding: .15rem .15rem .75rem; }
.has-app-shell .kanban-column-header > div {
  display: flex;
  align-items: center;
  gap: .45rem;
}
.has-app-shell .kanban-column-header h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: .91rem;
  letter-spacing: -.015em;
}
.has-app-shell .kanban-column-header p {
  margin: .35rem 0 0 1.05rem;
  color: var(--ink-soft);
  font-size: .7rem;
}
.has-app-shell .kanban-status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  background: var(--column-status);
  border-radius: 50%;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--column-status) 14%, transparent);
}
.has-app-shell .kanban-count {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: auto;
  padding: 0 .35rem;
  color: var(--column-status);
  background: #fff;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 850;
}
.has-app-shell .kanban-column-body { display: grid; align-content: start; gap: .65rem; }
.has-app-shell .kanban-card {
  position: relative;
  min-width: 0;
  padding: .85rem;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  border: 1px solid #dde6ec;
  border-radius: 9px;
  box-shadow: 0 5px 15px rgba(18, 50, 76, .065);
  outline: none;
  transition:
    transform 200ms var(--motion-out),
    border-color 200ms var(--motion-out),
    box-shadow 200ms var(--motion-out);
}
.has-app-shell .kanban-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--card-status);
}
.has-app-shell .kanban-card:hover,
.has-app-shell .kanban-card:focus-visible {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--card-status) 38%, #dde6ec);
  box-shadow: 0 14px 24px color-mix(in srgb, var(--card-status) 12%, rgba(18, 50, 76, .09));
}
.has-app-shell .kanban-card:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--card-status) 20%, transparent), 0 14px 24px rgba(18, 50, 76, .13);
}
.has-app-shell .kanban-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .45rem;
}
.has-app-shell .kanban-area {
  max-width: 110px;
  overflow: hidden;
  color: var(--card-status);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .63rem;
  font-weight: 850;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.has-app-shell .kanban-card h3 {
  margin: .75rem 0 .4rem;
  color: var(--ink-strong);
  font-size: .9rem;
  line-height: 1.35;
  letter-spacing: -.018em;
}
.has-app-shell .kanban-next {
  min-height: 2.35em;
  margin: 0 0 .75rem;
  color: #52697c;
  font-size: .72rem;
  line-height: 1.45;
}
.has-app-shell .kanban-progress { margin-bottom: .75rem; }
.has-app-shell .kanban-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  margin-bottom: .28rem;
  color: var(--ink-soft);
  font-size: .65rem;
}
.has-app-shell .kanban-progress .progress-track { height: 4px; }
.has-app-shell .kanban-progress .progress-track > span { background: var(--card-status); }
.has-app-shell .kanban-card footer {
  display: grid;
  gap: .3rem;
  padding-top: .7rem;
  border-top: 1px solid #edf1f4;
}
.has-app-shell .kanban-context,
.has-app-shell .kanban-due {
  overflow: hidden;
  color: var(--ink-soft);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .66rem;
}
.has-app-shell .kanban-empty {
  display: grid;
  place-items: center;
  min-height: 125px;
  padding: 1rem;
  color: #82919d;
  border: 1px dashed color-mix(in srgb, var(--column-status) 23%, #cfdbe2);
  border-radius: 9px;
  text-align: center;
}
.has-app-shell .kanban-empty > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--column-status);
  background: #fff;
  border-radius: 50%;
}
.has-app-shell .kanban-empty p { margin: .45rem 0 0; font-size: .72rem; }

.has-app-shell .task-drawer-backdrop {
  position: fixed;
  z-index: 58;
  inset: 0;
  visibility: hidden;
  background: rgba(6, 29, 48, .38);
  border: 0;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 220ms var(--motion-out),
    visibility 220ms;
}
.has-app-shell .task-drawer {
  position: fixed;
  z-index: 60;
  top: 0;
  right: 0;
  width: min(480px, 94vw);
  height: 100dvh;
  overflow: hidden;
  color: var(--ink);
  background: #fff;
  border-left: 1px solid #dce5eb;
  box-shadow: -18px 0 44px rgba(6, 35, 58, .18);
  transform: translateX(104%);
  transition: transform 280ms var(--motion-out);
}
.has-app-shell .app-shell.task-drawer-open .task-drawer-backdrop {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.has-app-shell .app-shell.task-drawer-open .task-drawer { transform: translateX(0); }
body.task-drawer-visible { overflow: hidden; }
.has-app-shell .task-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  min-height: 90px;
  padding: 1.25rem 1.35rem 1rem;
  border-bottom: 1px solid #e1e8ed;
}
.has-app-shell .task-drawer-header .eyebrow { margin: 0 0 .3rem; }
.has-app-shell .task-drawer-header h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 1.24rem;
  line-height: 1.25;
  letter-spacing: -.025em;
}
.has-app-shell .task-drawer-close {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  color: #476176;
  background: #f1f5f7;
  border-radius: 50%;
  font-size: 1.45rem;
  transition:
    color 150ms var(--motion-out),
    background-color 150ms var(--motion-out),
    transform 150ms var(--motion-out);
}
.has-app-shell .task-drawer-close:hover { color: var(--ink-strong); background: #e6edf1; transform: rotate(4deg); }
.has-app-shell .task-drawer-close:active { transform: scale(.95); }
.has-app-shell .task-drawer-content {
  height: calc(100dvh - 90px);
  padding: 1.15rem 1.35rem 1.5rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.has-app-shell .drawer-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 1rem;
}
.has-app-shell .drawer-area {
  overflow: hidden;
  color: #5e7283;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .72rem;
  font-weight: 750;
  text-transform: uppercase;
}
.has-app-shell .drawer-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  margin-bottom: 1rem;
}
.has-app-shell .drawer-overview > div {
  display: grid;
  gap: .25rem;
  min-width: 0;
  padding: .75rem;
  background: #f6f9fb;
  border: 1px solid #e4eaee;
  border-radius: 8px;
}
.has-app-shell .drawer-overview span,
.has-app-shell .drawer-progress small {
  color: var(--ink-soft);
  font-size: .68rem;
}
.has-app-shell .drawer-overview strong {
  overflow: hidden;
  color: var(--ink-strong);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .77rem;
}
.has-app-shell .drawer-progress {
  margin-bottom: 1rem;
  padding: .85rem;
  background: #fff;
  border: 1px solid #e1e8ed;
  border-radius: 8px;
}
.has-app-shell .drawer-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  margin-bottom: .45rem;
  font-size: .76rem;
}
.has-app-shell .drawer-progress .progress-track { height: 6px; margin-bottom: .42rem; }
.has-app-shell .drawer-next-step {
  --drawer-status: var(--status-open);
  margin-bottom: 1.2rem;
  padding: .9rem 1rem;
  background: color-mix(in srgb, var(--drawer-status) 7%, #fff);
  border: 1px solid color-mix(in srgb, var(--drawer-status) 22%, #e1e8ed);
  border-left: 4px solid var(--drawer-status);
  border-radius: 8px;
}
.has-app-shell .drawer-next-step.status-in_progress { --drawer-status: var(--status-progress); }
.has-app-shell .drawer-next-step.status-returned { --drawer-status: var(--status-returned); }
.has-app-shell .drawer-next-step.status-submitted { --drawer-status: var(--status-review); }
.has-app-shell .drawer-next-step.status-completed { --drawer-status: var(--status-closed); }
.has-app-shell .drawer-next-step h3 { margin: .2rem 0 .35rem; color: var(--ink-strong); font-size: .94rem; }
.has-app-shell .drawer-next-step p:last-child { margin: 0; color: #52697c; font-size: .75rem; line-height: 1.45; }
.has-app-shell .drawer-section { margin-top: 1.2rem; }
.has-app-shell .drawer-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: .55rem;
  border-bottom: 1px solid #e5ebef;
}
.has-app-shell .drawer-section-heading h3 { margin: 0; color: var(--ink-strong); font-size: .9rem; }
.has-app-shell .drawer-section-heading span {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  color: #0a706b;
  background: #e2f5f2;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 850;
}
.has-app-shell .drawer-checklist,
.has-app-shell .drawer-evidence { margin: 0; padding: 0; list-style: none; }
.has-app-shell .drawer-checklist li,
.has-app-shell .drawer-evidence li {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: .72rem 0;
  border-bottom: 1px solid #edf1f4;
}
.has-app-shell .drawer-checklist li > span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 50%;
  font-size: .72rem;
}
.has-app-shell .drawer-checklist li.completed > span { color: #fff; background: var(--status-closed); }
.has-app-shell .drawer-checklist li.pending > span { color: #7c8b97; background: #eef2f4; }
.has-app-shell .drawer-checklist strong,
.has-app-shell .drawer-evidence strong { display: block; color: var(--ink-strong); font-size: .76rem; }
.has-app-shell .drawer-checklist small,
.has-app-shell .drawer-evidence small { display: block; margin-top: .2rem; color: var(--ink-soft); font-size: .67rem; }
.has-app-shell .drawer-file-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  color: #0b7771;
  background: #e5f5f3;
  border-radius: 7px;
}
.has-app-shell .drawer-empty { margin: .75rem 0; color: var(--ink-soft); font-size: .74rem; }
.has-app-shell .drawer-footer {
  position: sticky;
  bottom: -1.5rem;
  margin: 1.2rem -1.35rem -1.5rem;
  padding: 1rem 1.35rem 1.2rem;
  background: linear-gradient(180deg, rgba(255,255,255,.8), #fff 28%);
  border-top: 1px solid #e1e8ed;
}
.has-app-shell .drawer-loading,
.has-app-shell .drawer-error {
  display: grid;
  place-items: center;
  min-height: 260px;
  color: var(--ink-soft);
  text-align: center;
}
.has-app-shell .drawer-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #dfe8ed;
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: drawer-spin .75s linear infinite;
}
.has-app-shell .drawer-error > span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #fff;
  background: var(--status-returned);
  border-radius: 50%;
  font-weight: 900;
}
@keyframes drawer-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: no-preference) {
  .has-app-shell .kanban-card {
    animation: kanban-card-in 280ms var(--motion-out) both;
    animation-delay: calc(var(--card-index, 0) * 45ms);
  }
  @keyframes kanban-card-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (max-width: 900px) {
  .has-app-shell .work-toolbar { align-items: stretch; flex-direction: column; }
  .has-app-shell .work-view-switch { align-self: flex-start; }
  .has-app-shell .kanban-board { min-width: 1130px; }
}

@media (max-width: 600px) {
  .has-app-shell .work-toolbar .summary-pills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .has-app-shell .work-toolbar .summary-pill { justify-content: center; }
  .has-app-shell .work-view-switch { width: 100%; }
  .has-app-shell .work-view-button { flex: 1; }
  .has-app-shell .task-drawer { width: 100%; }
  .has-app-shell .task-drawer-header { padding-inline: 1rem; }
  .has-app-shell .task-drawer-content { padding-inline: 1rem; }
  .has-app-shell .drawer-overview { grid-template-columns: 1fr; }
  .has-app-shell .drawer-footer { margin-inline: -1rem; padding-inline: 1rem; }
  .has-app-shell .work-card-affordance { justify-content: space-between; }
}

.has-app-shell .drawer-inline-loading,
.has-app-shell .drawer-access-note {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-top: 1rem;
  padding: .8rem .9rem;
  color: #52697c;
  background: #f4f8fa;
  border: 1px solid #e0e8ed;
  border-radius: 8px;
  font-size: .74rem;
  line-height: 1.45;
}
.has-app-shell .drawer-inline-loading .drawer-spinner {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-width: 2px;
}
.has-app-shell .drawer-access-note > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  color: #fff;
  background: #5f7f96;
  border-radius: 50%;
  font-size: .72rem;
  font-weight: 850;
}
.has-app-shell .drawer-access-note p { margin: 0; }

/* Functional modules and secure account access. */
.access-card { width: min(540px, calc(100% - 3rem)); margin: 2rem 0; padding: clamp(1.5rem, 4vw, 2.75rem); }
.access-card h1 { margin: 0; font-size: clamp(1.65rem, 3vw, 2rem); line-height: 1.15; letter-spacing: -.035em; }
.access-card > .muted { margin: 0 0 .35rem; }
.access-card .access-form { display: grid; gap: .7rem; }
.access-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; display: grid; gap: .65rem; }
.access-form input, .access-form select { min-height: 46px; font-size: 1rem; }
.access-form .confirm-row { display: flex; align-items: flex-start; gap: .6rem; line-height: 1.5; }
.access-form .confirm-row input { width: 20px; height: 20px; min-height: 20px; flex: 0 0 20px; margin-top: .15rem; accent-color: var(--teal); }
.access-form input.otp-input { font-variant-numeric: tabular-nums; letter-spacing: .24em; font-size: 1.3rem; }
.access-actions { display: grid; gap: .6rem; margin-top: .75rem; }
.access-card .button { min-height: 44px; }
.access-notice { padding: .9rem 1rem; background: var(--teal-soft); color: #075b56; border: 1px solid #96d7ce; border-radius: 8px; font-size: .87rem; line-height: 1.5; }
.access-card .form-message.error { padding: .85rem; background: var(--red-soft); border: 1px solid #e5a5ab; border-radius: 8px; line-height: 1.5; }
.session-facts { margin: .5rem 0; display: grid; gap: .75rem; }
.session-facts > div { display: grid; gap: .25rem; }
.session-facts dt { color: var(--ink-soft); font-size: .8rem; }
.session-facts dd { margin: 0; font-weight: 700; }
.security-section { padding-top: 1rem; border-top: 1px solid var(--line); }
.security-section strong { overflow-wrap: anywhere; }
.security-section h2 { font-size: 1.1rem; }
.security-section summary { cursor: pointer; color: #9f2431; font-weight: 700; padding: .5rem 0; }
.enrollment-steps { margin: .5rem 0; padding-left: 1.2rem; color: var(--ink-soft); line-height: 1.65; }
.secret-panel { padding: 1rem; border: 1px solid var(--line); border-radius: 10px; background: #f3f8fc; }
.secret-panel > span { display: block; margin-bottom: .6rem; font-size: .8rem; font-weight: 700; }
.secret-panel code { display: block; overflow-wrap: anywhere; color: var(--ink); line-height: 1.7; font-size: 1rem; }
.brand-panel .access-brand { margin: 0; font-size: clamp(3rem, 7vw, 5.75rem); letter-spacing: -.08em; line-height: .8; }
.access-brand span { color: #75d3cd; font-size: .47em; letter-spacing: .02em; }
.access-load-error { max-width: 42rem; margin: 10vh auto; padding: 2rem; text-align: center; }
@media (max-width: 760px) {
  .access-layout { display: block; }
  .access-layout .brand-panel { min-height: 0; padding: 1.25rem 1.5rem; gap: .4rem; }
  .access-layout .brand-mark, .access-layout .brand-panel > p { display: none; }
  .access-layout .access-brand { font-size: 2.2rem; line-height: .9; }
  .access-layout .access-brand br { display: none; }
  .access-layout .access-brand span { font-size: .62em; margin-left: .5rem; }
  .access-layout .access-card { margin: 1.25rem auto; width: calc(100% - 2rem); }
}

/* PC-2.1 — editor no-code por etapas y puestos */
.pc21-stage, .pc21-task { min-width: 0; margin: .9rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: .85rem; background: #fbfdff; }
.pc21-stage { border-left: 4px solid var(--teal); }
.pc21-task { border-left: 3px solid #7db7d0; background: white; }
.pc21-stage legend, .pc21-task legend { padding: 0 .35rem; color: var(--teal-dark); font-size: .82rem; font-weight: 800; }
.pc21-tasks { display: grid; gap: .75rem; }
.pc21-stage .work-actions { flex-wrap: wrap; margin-top: .75rem; }
@media (max-width: 720px) { .pc21-stage, .pc21-task { padding: .8rem; } .pc21-stage .work-actions { display: grid; grid-template-columns: 1fr; } .pc21-stage .work-actions .button { width: 100%; } }

/* Contextual reporting, desktop and narrow mobile view. */
.reporting-list { display: grid; gap: 1rem; margin: 1rem 0; }
.reporting-endpoints { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 1rem; align-items: center; }
.reporting-card p, .reporting-card strong { overflow-wrap: anywhere; }
.reporting-arrow { color: var(--teal); font-size: 1.6rem; }
#reporting-create-panel, #reporting-confirm { margin-top: 1rem; }
#reporting-message:not(:empty) { padding: .85rem; background: #edf8ff; border-radius: 8px; }
@media (max-width: 600px) { .reporting-endpoints { grid-template-columns: 1fr; gap: .25rem; } .reporting-arrow { transform: rotate(90deg); width: fit-content; } }
.recurrence-select { display: grid; gap: .5rem; max-width: 100%; }
.recurrence-select select { width: 100%; min-width: 0; min-height: 44px; padding: .7rem; border: 1px solid #b5c9dc; border-radius: 8px; background: white; color: inherit; font: inherit; }
.recurrence-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }
.recurrence-results { display: grid; gap: 1rem; margin-block: 1rem; }
.recurrence-occurrence dl { display: flex; flex-wrap: wrap; gap: 1rem 3rem; }
.recurrence-occurrence dt { color: var(--muted); font-size: .85rem; }
.recurrence-occurrence dd { margin: .35rem 0 0; font-weight: 600; }
.recurrence-occurrence .panel-header { flex-wrap: wrap; gap: .75rem; }
.recurrence-occurrence .badge { white-space: normal; max-width: 100%; }

.task-preflight-results { display: grid; gap: 16px; }
.task-preflight-card { overflow-wrap: anywhere; }
.task-preflight-card .panel-header { align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.task-preflight-card h3, .task-preflight-card h4 { margin: 0 0 8px; }
.task-preflight-card .badge { white-space: normal; }
.task-preflight-facts { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 14px; }
.task-preflight-facts dt { color: var(--muted); font-size: 13px; }
.task-preflight-facts dd { margin: 4px 0 0; }
.task-preflight-roles { display: grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap: 16px; margin-top: 20px; }
.task-preflight-roles section { border-top: 1px solid var(--line); padding-top: 12px; }
.task-preflight-roles ul, .task-preflight-blockers { padding-left: 20px; }
#task-preflight-rule { min-height: 44px; max-width: 100%; }

.execution-reference { overflow-wrap: anywhere; }

.native-evidence-panel{grid-column:1/-1}.native-evidence-panel textarea{display:block;width:100%;box-sizing:border-box;margin:8px 0 12px;font:inherit;resize:vertical}.native-evidence-content{white-space:pre-wrap;overflow-wrap:anywhere}.native-evidence-panel select{max-width:100%;width:100%;min-height:44px;padding:.7rem;border:1px solid #b6c7d7;border-radius:8px;background:white;color:var(--ink)}
[data-task-files]{min-width:0;overflow-wrap:anywhere}
[data-task-file-form] input[type=file]{display:block;width:100%;min-width:0;max-width:100%;box-sizing:border-box;margin:.5rem 0 1rem;font-size:.9rem}
[data-task-file-form] input[type=file]::file-selector-button{max-width:100%;padding:.5rem;border:1px solid #b6c7d7;border-radius:6px;background:white;color:var(--ink)}
[data-task-file-form] .field-label{display:block;margin-top:.75rem}
[data-review-reassignment]{grid-column:1/-1;min-width:0;overflow-wrap:anywhere}
[data-review-reassignment] fieldset{min-width:0;border:0;padding:0;margin:0;display:grid;gap:.7rem}
[data-review-reassignment] textarea{box-sizing:border-box;resize:vertical}
[data-review-reassignment] button{justify-self:start}
@media(max-width:600px){[data-review-reassignment] .panel-header{flex-direction:column;align-items:stretch;gap:.8rem}}

.deadline-policy{display:grid;gap:1rem}.deadline-dates{display:flex;flex-wrap:wrap;gap:1rem 2rem;margin:1rem 0}.deadline-dates strong{display:block}.deadline-signals{list-style:none;padding:0;display:grid;gap:.75rem}.deadline-signals li{display:flex;flex-direction:column;gap:.25rem;padding:.75rem 0;border-bottom:1px solid var(--border,#dce2e8)}
[data-deadline-preview]{display:grid;gap:1rem;margin-top:1rem}[data-deadline-preview]:empty{display:none}
.automation-panel { overflow-wrap: anywhere; }
.automation-panel h2, .automation-panel h3 { margin-top: 1.4rem; }
.automation-cards { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,280px),1fr)); gap: .8rem; }
.automation-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }
.automation-form { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,240px),1fr)); gap: 1rem; align-items: end; margin: 1rem 0; }
.automation-form label { display: grid; gap: .4rem; min-width: 0; }
.automation-form input, .automation-form select { width: 100%; min-width: 0; box-sizing: border-box; padding: .7rem; }
.automation-metadata { display: grid; grid-template-columns: minmax(100px,1fr) 3fr; gap: .5rem; }
.automation-metadata dd { margin: 0; min-width: 0; }
.automation-confirm, .automation-secret { padding: 1rem; margin-top: 1rem; border: 1px solid #bdd9d1; border-radius: 10px; background: #f2faf7; }
.automation-confirm .button { margin: .4rem .4rem 0 0; }
.automation-secret textarea { display: block; width: 100%; min-height: 7rem; box-sizing: border-box; margin: .7rem 0; overflow-wrap: anywhere; }
.automation-id { overflow-wrap: anywhere; font-size: .88rem; }

/* F1.3e: reconciled current-operation panels. */
.operations-panel { margin-block: 1rem; }
.operations-filters { display:flex; flex-wrap:wrap; align-items:end; gap:12px; }
.operations-filters label,.operations-detail-header label { display:grid; gap:6px; }
.operations-block { margin-block:24px; }
.operations-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; }
.operations-card { display:grid; gap:8px; padding:16px; border:1px solid #cbd5e1; border-radius:12px; background:#fff; color:#193f44; text-align:left; cursor:pointer; font:inherit; }
.operations-card strong { font-size:2rem; line-height:1.1; }
.operations-card span:last-child { font-size:.8rem; text-decoration:underline; }
.operations-card[aria-pressed=true] { border-color:#166b60; background:#edf8f5; }
.operations-card:focus-visible { outline:3px solid #166b60; outline-offset:3px; }
.operations-list { list-style:none; padding:0; margin:0 0 16px; }
.operations-row { display:flex; align-items:center; justify-content:space-between; gap:16px; border-bottom:1px solid #e2e8f0; padding:16px 0; overflow-wrap:anywhere; }
.operations-row>div { min-width:0; }
.operations-row p { margin:6px 0; }
.operations-row button { flex-shrink:0; }
.operations-cutoff { font-size:.85rem; overflow-wrap:anywhere; }
.operations-detail-header { flex-wrap:wrap; }
.operations-panel [data-op-message]:not(:empty) { padding:18px 0; }
@media(max-width:600px) { .operations-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .operations-card { padding:12px; } .operations-row { flex-direction:column; align-items:stretch; } .operations-filters label { flex:1; min-width:125px; } .operations-panel select { max-width:100%; } }

.operations-panel input,.operations-panel select { border:1px solid var(--line); border-radius:8px; padding:10px 12px; background:var(--surface); color:var(--ink); min-height:42px; }
.operations-list { max-height:36rem; overflow:auto; padding-inline:3px 12px; }
.operations-panel [data-op-total] { font-weight:600; }

/* Support portal: scoped layout, plain-text conversations, keyboard-visible actions. */
.support-portal [data-support-status]:not(:empty){padding:14px 18px;margin-bottom:16px;border-radius:12px;background:#eef4ff;color:#22385f}
.support-contexts,.support-filters{display:flex;align-items:end;justify-content:space-between;gap:16px;flex-wrap:wrap}
.support-filters label,.support-form label{display:flex;flex-direction:column;gap:7px;font-weight:600}
.support-form,.support-form [data-support-fields]{display:grid;gap:16px}
.support-form input,.support-form select,.support-form textarea,.support-filters select{width:100%;box-sizing:border-box;padding:11px 12px;border:1px solid #bdc8d6;border-radius:9px;background:#fff;color:#182c43;font:inherit}
.support-form textarea{resize:vertical;min-height:110px}.support-columns{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(260px,1fr);gap:20px;align-items:start}
.support-cases,.support-history{list-style:none;padding:0;display:grid;gap:12px}.support-cases li,.support-history li{padding:16px;border:1px solid #dce3ec;border-radius:12px;background:#fff}
.support-case-link{background:none;border:0;padding:0;color:#174aa3;font:inherit;font-weight:700;text-align:left;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.support-message{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65}.support-event-heading{display:flex;gap:12px;justify-content:space-between;flex-wrap:wrap}.support-event-heading span{font-size:.85rem;color:#53657b}
.support-attention{color:#855300;font-weight:600}.support-portal .panel{margin-bottom:20px}.support-portal button:focus-visible,.support-portal select:focus-visible,.support-portal textarea:focus-visible,.support-portal input:focus-visible{outline:3px solid #376bd9;outline-offset:3px}
@media(max-width:760px){.support-columns{grid-template-columns:1fr}.support-filters{align-items:stretch}.support-filters label{flex:1 1 100%}.support-contexts .work-actions{width:100%}}
.support-resource-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;margin:1rem 0; }
.support-resource-card { border:1px solid var(--border,#d8dee6);border-radius:12px;padding:1rem;min-width:0; }
.support-resource-card ul,.support-resource-results { list-style:none;padding:0;margin:0; }
.support-resource-card li { padding:1rem 0;border-top:1px solid var(--border,#d8dee6);overflow-wrap:anywhere; }
.support-resource-results li { display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 0;border-top:1px solid var(--border,#d8dee6); }
.support-resource-results li>div { min-width:0;overflow-wrap:anywhere; }
.support-resource-preview { background:var(--surface,#f7f9fc);padding:1rem;border-radius:12px;margin:1rem 0; }
.support-resource-preview pre { font:inherit;white-space:pre-wrap;overflow-wrap:anywhere; }
.support-resources summary { cursor:pointer;font-weight:600;padding:.75rem 0; }
@media(max-width:850px){.support-resource-grid{grid-template-columns:1fr}.support-resource-results li{align-items:flex-start;flex-direction:column}}

/* The expanded operational navigation remains usable on short screens. */
.sidebar { max-height: 100dvh; overflow-y: auto; }
.sidebar-footer { flex-wrap: wrap; }
.sidebar-footer .link-button { width: 100%; text-align: left; }
.topbar .identity-block { margin-left: auto; }
.task-drawer[inert] { visibility: hidden; }
.task-drawer-open .task-drawer { visibility: visible; }
@media (max-width: 768px) { .sidebar { max-height: 100dvh; } }
.has-app-shell .sidebar-footer { display: grid; flex-shrink: 0; padding: 1rem; border-top: 1px solid var(--line); }
.has-app-shell .sidebar-footer strong, .has-app-shell .sidebar-footer .link-button { color: var(--ink-strong); }
.has-app-shell .sidebar-footer small { color: var(--ink-soft); }
.has-app-shell .sidebar-footer .link-button { min-height: 36px; }


/* Celebración de finalización: breve, no bloqueante y respetuosa con movimiento reducido. */
.completion-celebration {
  position: fixed;
  z-index: 120;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.completion-message {
  position: absolute;
  top: 5.25rem;
  left: 50%;
  display: flex;
  align-items: center;
  gap: .75rem;
  width: max-content;
  max-width: calc(100vw - 2rem);
  padding: .78rem 1rem;
  color: #123553;
  background: rgba(255, 255, 255, .96);
  border: 1px solid color-mix(in srgb, var(--status-closed, #217a70) 24%, #dce5e7);
  border-radius: 14px;
  box-shadow: 0 16px 42px rgba(19, 49, 66, .18);
  opacity: 0;
  transform: translate(-50%, -12px) scale(.97);
  animation: completion-message-in 320ms cubic-bezier(.23, 1, .32, 1) forwards;
  backdrop-filter: blur(12px);
}
.completion-message strong,
.completion-message small { display: block; }
.completion-message strong { margin-bottom: .12rem; font-size: .92rem; }
.completion-message small { color: #61737f; font-size: .72rem; }
.completion-check {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  color: #fff;
  background: linear-gradient(145deg, var(--status-open, #168b8a), var(--status-progress, #65a839));
  border-radius: 50%;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--status-open, #168b8a) 12%, transparent);
  font-size: 1rem;
  font-weight: 900;
}
.completion-celebration.leaving .completion-message {
  opacity: 0;
  transform: translate(-50%, -10px) scale(.985);
  transition: opacity 280ms cubic-bezier(.23, 1, .32, 1), transform 280ms cubic-bezier(.23, 1, .32, 1);
}
.completion-confetti-piece {
  position: absolute;
  top: 5.7rem;
  left: 50%;
  width: var(--confetti-size);
  height: calc(var(--confetti-size) * 1.55);
  background: var(--status-open, #168b8a);
  border-radius: 2px;
  opacity: 0;
  transform: translate(-50%, 0) rotate(0deg);
  animation: completion-confetti-burst var(--confetti-duration) cubic-bezier(.17, .75, .31, 1) var(--confetti-delay) forwards;
}
.completion-confetti-piece:nth-child(5n + 2) { background: var(--status-progress, #65a839); }
.completion-confetti-piece:nth-child(5n + 3) { background: var(--status-returned, #e0643d); }
.completion-confetti-piece:nth-child(5n + 4) { background: var(--status-review, #8056b8); }
.completion-confetti-piece:nth-child(5n) { background: #f0b43c; }
.completion-confetti-piece:nth-child(3n) { border-radius: 50%; }
@keyframes completion-message-in {
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
@keyframes completion-confetti-burst {
  0% { opacity: 0; transform: translate(-50%, 0) rotate(0deg); }
  9% { opacity: 1; }
  76% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--confetti-x)), var(--confetti-fall)) rotate(var(--confetti-spin)); }
}
.completion-celebration.reduced-motion .completion-message {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
  animation: none;
}
@media (max-width: 600px) {
  .completion-message { top: 4.5rem; width: calc(100vw - 2rem); }
  .completion-confetti-piece { top: 5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .completion-confetti { display: none; }
}

/* Service targets use the existing workspace palette and responsive panels. */
.support-service-metrics { display:grid; grid-template-columns:repeat(auto-fit,minmax(145px,1fr)); gap:1rem; }
.support-service-metrics > div { display:flex; flex-direction:column; gap:.3rem; padding:.8rem; border:1px solid var(--line,#dce5e7); border-radius:12px; }
.support-service-metrics strong { font-size:1.35rem; }
.support-service-metrics span { font-size:.86rem; }
.support-service-summary { overflow-wrap:anywhere; }
.support-service-summary p { margin:.35rem 0; }
.support-portal [data-catalog-forms] section { min-width:0; }
.support-portal [data-catalog-forms] input,.support-portal [data-catalog-forms] select { max-width:100%; }

/* Unit communications share the existing shell and Manus design tokens. */
.comms { min-width:0; }
.comms .panel { margin-top:16px; overflow-wrap:anywhere; }
.comms-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr)); gap:16px; }
.comms-list .panel { margin-top:0; }
.comms-form { display:grid; gap:16px; }
.comms-form label,.comms-filters label { display:grid; gap:6px; }
.comms-form input,.comms-form textarea,.comms-filters select { max-width:100%; min-width:0; }
.comms-form fieldset { min-width:0; border:1px solid var(--border,#dce2e8); border-radius:12px; padding:16px; }
.comms-form .comms-check { display:flex; align-items:flex-start; gap:10px; padding:6px 0; }
.comms-check input { width:auto; flex:0 0 auto; margin-top:4px; }
.comms-filters { display:flex; flex-wrap:wrap; gap:16px; margin:20px 0; }
.comms-message { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.7; margin:24px 0; }
.comms .work-actions { flex-wrap:wrap; }
@media(max-width:600px) { .comms-filters { display:grid; } .comms .button { white-space:normal; } }

/* Task collaboration works in both the task drawer and full detail. */
.task-collaboration { margin-top:20px; min-width:0; overflow-wrap:anywhere; }
.collab-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.collab-form { display:grid; gap:12px; margin:16px 0; }
.collab-form label,.collab-filter { display:grid; gap:6px; }
.collab-form input,.collab-form textarea,.collab-form select { width:100%; min-width:0; max-width:100%; }
.collab-form .collab-check { display:flex; gap:8px; align-items:flex-start; padding:6px 0; }
.collab-check input { width:auto; flex:0 0 auto; margin-top:4px; }
.collab-filter { margin:16px 0; }
.collab-events { list-style:none; padding:0; }
.collab-events>li,.collab-block { padding:16px 0; border-bottom:1px solid var(--border,#dce2e8); }
.collab-message { white-space:pre-wrap; overflow-wrap:anywhere; }
.collab-inbox-list { display:grid; gap:16px; }
.collab-inbox-list .panel { overflow-wrap:anywhere; }
.task-collaboration .button,.collab-inbox-list .button { white-space:normal; }
.task-collaboration .panel-header,.collab-inbox-list .work-actions { flex-wrap:wrap; gap:12px; }
.task-drawer .collab-grid { grid-template-columns:1fr; }
@media(max-width:850px) { .collab-grid { grid-template-columns:1fr; } }

/* V1-02C: personal activity feed, compatible with the existing visual system. */
.activity-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:20px;align-items:end}.activity-filters label{display:flex;flex-direction:column;gap:8px;min-width:0}.activity-filters input,.activity-filters select{width:100%;min-width:0;padding:10px;border:1px solid #ccd8dc;border-radius:8px;background:#fff;color:inherit;font:inherit}.activity-filters .button{justify-self:start}.activity-counts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:16px 0}.activity-count{display:flex;flex-direction:column;gap:8px;text-align:left;padding:16px;border:1px solid #ccd8dc;border-radius:12px;background:#fff;color:inherit;font:inherit;cursor:pointer}.activity-count strong{font-size:1.5rem}.activity-count[aria-pressed=true]{border-color:#428b81;background:#edf8f5}.activity-list{display:grid;gap:16px}.activity-card,.activity-detail{min-width:0;overflow-wrap:anywhere}.activity-card h2{margin:12px 0}.activity-tags,.activity-pages{display:flex;flex-wrap:wrap;gap:10px}.activity-pages{margin:20px 0;justify-content:space-between}.activity-preview{white-space:pre-wrap;overflow-wrap:anywhere}.activity-detail{margin:16px 0;border:2px solid #428b81}.activity-ack{display:grid;gap:16px}.activity-ack label{display:flex;align-items:flex-start;gap:10px}.activity-ack input{flex:0 0 auto;margin-top:4px}.activity-status[role=alert]{color:#a32929}.activity-filters :focus-visible,.activity-count:focus-visible,.activity-ack :focus-visible{outline:3px solid #dfbf54;outline-offset:3px}@media(max-width:700px){.activity-filters{grid-template-columns:1fr}.activity-counts{grid-template-columns:repeat(2,minmax(0,1fr))}.activity-card .work-actions{display:grid}.activity-detail .panel-header{flex-direction:column;align-items:flex-start}}

/* Personal external-delivery preparation */
.delivery-status,.delivery-form,.delivery-preview{margin-bottom:20px;overflow-wrap:anywhere}
.delivery-fields{display:grid;grid-template-columns:1.2fr .7fr 1.3fr;gap:16px;margin:18px 0}
.delivery-fields label{display:grid;gap:8px;min-width:0}
.delivery-fields input,.delivery-fields select{width:100%;min-width:0;box-sizing:border-box;padding:10px;border:1px solid var(--border,#d7e0e6);border-radius:8px;font:inherit;background:#fff;color:inherit}
.delivery-kinds{border:1px solid var(--border,#d7e0e6);border-radius:10px;padding:14px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.delivery-kinds legend{font-weight:600;padding:0 5px}
.delivery-kinds label{display:flex;align-items:center;gap:10px;min-height:34px}
.delivery-kinds input{width:18px;height:18px;flex:none}
.delivery-preview h3{font-size:17px}
@media(max-width:700px){.delivery-fields,.delivery-kinds{grid-template-columns:1fr}.delivery-form .work-actions{flex-wrap:wrap}.delivery-form .work-actions button{width:100%}}

/* V1-03A: client onboarding, following the existing Manus shell. */
.client-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:16px}
.client-card{border:1px solid var(--border,#e4e7ec);border-radius:14px;padding:18px;min-width:0;overflow-wrap:anywhere}
.client-counts{display:flex;flex-wrap:wrap;gap:20px}.client-counts div{min-width:80px}.client-counts dt{font-size:.8rem}.client-counts dd{margin:4px 0;font-size:1.4rem;font-weight:650}

.client-access{max-width:1250px;margin:24px auto;padding:0 20px}.client-access>.work-actions{margin-bottom:24px}

/* Tenant settings; brand variables stay inside the active workspace. */
.company-mark { display:inline-flex; align-items:center; justify-content:center; min-width:2.7rem; height:2.7rem; padding:.3rem; border-radius:12px; background:var(--teal-soft); color:var(--teal-dark); font-weight:800; font-size:.8rem; }
.sidebar-brand:has(.company-mark) .brand-symbol { display:none; }
.company-settings { display:grid; gap:1rem; }
.company-settings-grid { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); gap:1rem; }
.company-settings .panel { min-width:0; }
.company-settings label:not(.company-module) { display:grid; gap:.4rem; margin:1rem 0; font-weight:600; }
.company-settings input:not([type=checkbox]), .company-settings select { width:100%; min-width:0; max-width:100%; padding:.7rem; border:1px solid var(--line,#d9e1e6); border-radius:8px; background:white; color:inherit; font:inherit; }
.company-module-list { display:grid; gap:.8rem; }
.company-module { display:flex; align-items:flex-start; gap:.8rem; padding:1rem; border:1px solid var(--line,#d9e1e6); border-radius:10px; cursor:pointer; }
.company-module input { width:1.2rem; height:1.2rem; accent-color:var(--teal); flex-shrink:0; }
.company-module small { display:block; margin-top:.4rem; font-weight:400; }
.company-preview { display:grid; justify-items:start; gap:1rem; padding:1.5rem; background:var(--teal-soft); border:1px solid var(--teal); border-radius:12px; overflow-wrap:anywhere; }
.company-preview strong { color:var(--teal-dark); font-size:1.4rem; }
.company-preview-action { color:white; background:var(--teal-dark); border-radius:8px; padding:.6rem 1rem; }
.company-confirmation { border:2px solid var(--teal); }
.company-settings>button { justify-self:start; }
@media(max-width:760px){.company-settings-grid{grid-template-columns:1fr}.company-settings .panel{padding:1rem}.company-confirmation button{margin-top:.5rem}}

.has-app-shell .app-shell .nav-item.active { color:var(--teal-dark); background:var(--teal-soft); }
.has-app-shell .app-shell .nav-item.active .nav-icon { color:var(--teal-dark); }
.has-app-shell button.tenant-control { border:0; border-radius:8px; background:transparent; color:inherit; text-align:left; font:inherit; cursor:pointer; }
.has-app-shell button.tenant-control:hover { background:var(--teal-soft); }
.has-app-shell button.tenant-control:focus-visible { outline:3px solid var(--teal); outline-offset:3px; }
/* Keep tenant switching and account controls reachable in the mobile sidebar. */
.has-app-shell .sidebar-footer { display:grid; border-color:var(--line,#d9e1e6); color:var(--ink,#16364c); }
.has-app-shell .sidebar-footer strong { color:inherit; }
.has-app-shell .sidebar-footer small { color:var(--muted,#617685); }
.client-lifecycle { margin:1.2rem 0; border:2px solid var(--teal,#087f79); overflow-wrap:anywhere; }
.client-lifecycle-change { padding:1rem; margin:1rem 0; border:1px solid var(--line,#d9e1e6); border-radius:12px; }
.client-lifecycle-change textarea { width:100%; min-width:0; resize:vertical; padding:.8rem; font:inherit; color:inherit; border:1px solid var(--line,#d9e1e6); border-radius:8px; }
.client-lifecycle-change>button { margin-top:1rem; }
.client-lifecycle-history { display:grid; gap:1rem; padding-left:1.3rem; }
.client-lifecycle-history time { display:block; margin:.3rem 0; font-size:.85rem; color:var(--muted,#617685); }
@media(max-width:600px){.client-lifecycle .page-header{align-items:stretch;flex-direction:column}.client-lifecycle .work-actions{display:flex;flex-wrap:wrap}.client-lifecycle-change{padding:.8rem}}

.export-panel { margin-block: 20px; min-width: 0; }
.export-request { border-top: 1px solid var(--border, #dbe4e3); padding-block: 18px; overflow-wrap: anywhere; }
.export-digest { font-family: monospace; overflow-wrap: anywhere; font-size: 12px; }
.export-panel select { max-width: 100%; }

/* Unit opening dossiers */
.opening-body { display:grid; gap:18px; min-width:0; }
.opening-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr)); gap:16px; }
.opening-card,.opening-milestone,.opening-editor { min-width:0; overflow-wrap:anywhere; }
.opening-card progress,.opening-body progress { display:block; width:100%; height:10px; margin:12px 0 20px; accent-color:var(--teal); }
.opening-form { display:grid; gap:14px; max-width:780px; }
.opening-form label,.opening-candidates label { display:grid; gap:6px; min-width:0; }
.opening-form input,.opening-form select,.opening-form textarea { width:100%; min-width:0; }
.opening-candidates { display:flex; flex-wrap:wrap; gap:10px; align-items:end; }
.opening-tasks,.opening-history { padding:0; list-style:none; display:grid; gap:12px; }
.opening-tasks li { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; padding:16px 0; border-top:1px solid var(--border,#dce4e6); }
.opening-tasks li>div { min-width:0; max-width:100%; overflow-wrap:anywhere; }
.opening-text { white-space:pre-wrap; overflow-wrap:anywhere; }
.opening-history li { padding:12px 0; border-top:1px solid var(--border,#dce4e6); }
.opening-changes { white-space:pre-wrap; overflow-wrap:anywhere; font-size:12px; max-height:300px; overflow:auto; }
@media(max-width:600px) { .opening-body .work-actions { align-items:stretch; } .opening-body .work-actions>* { max-width:100%; } .opening-tasks .work-actions { width:100%; } }

.opening-change-list { display:grid; grid-template-columns:minmax(90px,1fr) 3fr; gap:8px; overflow-wrap:anywhere; }
.opening-change-list dd { margin:0; }
.opening-body [hidden] { display:none !important; }

/* Reusable opening templates */
.template-editor { display:grid; gap:16px; min-width:0; }
.template-editor label,.template-item-fields label,.template-review-milestone label { display:grid; gap:6px; min-width:0; }
.template-editor input,.template-editor select,.template-editor textarea { width:100%; min-width:0; }
.template-item-fields { display:grid; grid-template-columns:minmax(180px,2fr) minmax(140px,2fr) minmax(110px,1fr); gap:14px; margin-bottom:14px; }
.template-milestone,.template-review-milestone { min-width:0; overflow-wrap:anywhere; }
.template-task { margin:16px 0; padding:16px; border:1px solid var(--border,#dce4e6); border-radius:12px; }
.template-consent { display:flex!important; align-items:start; gap:10px; }
.template-consent input { width:auto; margin-top:4px; }
@media(max-width:760px) { .template-item-fields { grid-template-columns:1fr; } .template-task { padding:12px; } }

.opening-review-round { border-top:1px solid var(--border,#dbe3ed); padding:1.2rem 0; overflow-wrap:anywhere; }
.opening-review-round details { margin-top:.8rem; }
.opening-review .opening-tasks li { display:block; }
.opening-review .work-actions { flex-wrap:wrap; }
.opening-body .support-attachments select { width:100%; min-width:0; }
.opening-body .support-attachments input[type=file] { max-width:100%; }

/* Opening work reuses the existing cards across personal queues. */
.opening-work-panel { margin-bottom: 24px; }
.opening-work-filters { display:flex; flex-wrap:wrap; gap:12px; align-items:end; margin:16px 0; }
.opening-work-filters label { flex:1 1 220px; display:grid; gap:6px; min-width:0; }
.opening-work-filters input,.opening-work-filters select { width:100%; min-width:0; }
.opening-work-cards { display:grid; gap:14px; margin:16px 0; }
.opening-work-card { border:1px solid var(--border,#dce2eb); border-radius:14px; padding:18px; overflow-wrap:anywhere; min-width:0; }
.opening-work-card h3 { margin:10px 0; }
.opening-tasks [data-opening-task]:focus { outline:3px solid #3681da; outline-offset:4px; }

.opening-prerequisites{display:grid;gap:12px;min-width:0;border:1px solid var(--border,#dce4e8);border-radius:8px;padding:16px}.opening-prerequisites label{display:flex;gap:10px;align-items:flex-start}.opening-prerequisites input{width:auto;flex:0 0 auto}.opening-prerequisites span{overflow-wrap:anywhere}.opening-dependency-note{border-left:3px solid #d49a29;padding:10px 14px;background:#fff8e9;overflow-wrap:anywhere}

/* V1-04F: field audit forms, scoped to this module. */
.field-audit-body {min-width:0;overflow-wrap:anywhere}
.field-audit-body input:not([type=checkbox]),.field-audit-body select,.field-audit-body textarea {max-width:100%;min-width:0;box-sizing:border-box;padding:10px 12px;border:1px solid var(--line,#d9e1e6);border-radius:8px;background:white;color:inherit;font:inherit;min-height:44px}
.field-audit-body input[type=checkbox] {width:20px;height:20px;justify-self:start;flex:0 0 auto}
.field-audit-body .template-task {display:grid;gap:12px}
.field-audit-body .work-actions {flex-wrap:wrap;gap:12px}
.field-audit-body button {white-space:normal}
.field-audit-body [role=alert] {color:#a32929}
.field-audit-body :focus-visible {outline:3px solid #428b81;outline-offset:3px}
@media(max-width:600px){.field-audit-body .work-actions{display:grid;grid-template-columns:1fr}.field-audit-body .panel{min-width:0}.field-audit-body .button{max-width:100%}}
