/* PACKAGE22L10B8_PWA_TASK_VISUAL */

/* PACKAGE22L10B8_PWA_TASK_VISUAL */

.rv-task-date-group-heading {
  display: block;
  margin: 16px 0 8px;
  padding: 7px 10px;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.rv-task-current-date-group-item {
  display: block;
  width: 100%;
  margin: 0 0 7px;
  padding: 11px 13px;
  text-align: left;
  white-space: normal;
  line-height: 1.35;
}

.rv-task-current-date-group-item:hover {
  transform: translateY(-1px);
}

.rv-task-current-date-group-item:active {
  transform: translateY(0);
}

@media (max-width: 760px) {
  .rv-task-date-group-heading {
    margin: 13px 0 7px;
    padding: 6px 9px;
    font-size: 0.78rem;
  }

  .rv-task-current-date-group-item {
    margin-bottom: 6px;
    padding: 10px 11px;
    font-size: 0.96rem;
  }
}

/* Legal document viewer: confirmation remains unavailable until the exact
 * published text has been shown through its end. */
.legal-document-dialog {
  width: min(820px, calc(100vw - 32px));
  max-width: none;
  max-height: min(880px, calc(100dvh - 32px));
  padding: 0;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(23, 32, 51, 0.28);
}

.legal-document-dialog::backdrop {
  background: rgba(15, 23, 42, 0.62);
}

.legal-document-shell {
  display: grid;
  grid-template-rows: auto minmax(180px, 1fr) auto;
  max-height: min(880px, calc(100dvh - 32px));
  background: #fff;
}

.legal-document-header,
.legal-document-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
}

.legal-document-header {
  border-bottom: 1px solid rgba(23, 32, 51, 0.12);
}

.legal-document-footer {
  flex-wrap: wrap;
  border-top: 1px solid rgba(23, 32, 51, 0.12);
}

.legal-document-footer .message {
  flex-basis: 100%;
}

.legal-document-content {
  overflow: auto;
  padding: 24px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.65;
}

@media (max-width: 640px) {
  .legal-document-dialog {
    width: 100vw;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border-radius: 0;
  }

  .legal-document-shell {
    height: 100dvh;
    max-height: none;
  }

  .legal-document-header,
  .legal-document-footer {
    padding: 14px 16px;
  }

  .legal-document-content {
    padding: 18px 16px;
  }
}

:root {
  color-scheme: light;
  --background: #f3f5f8;
  --surface: #ffffff;
  --surface-soft: #eef2f7;
  --text: #172033;
  --muted: #667085;
  --border: #d9e0e8;
  --primary: #2d5bff;
  --primary-hover: #2148d8;
  --danger: #c43232;
  --danger-soft: #fff1f0;
  --success: #18794e;
  --warning: #9a6700;
  --shadow: 0 16px 42px rgb(23 32 51 / 10%);
  --radius-large: 24px;
  --radius: 15px;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--background);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--background);
}

button,
input {
  font: inherit;
}

button {
  min-height: 44px;
  padding: 0.72rem 1rem;
  border: 0;
  border-radius: 11px;
  color: #ffffff;
  background: var(--primary);
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    transform 150ms ease;
}

button:hover {
  background: var(--primary-hover);
}

button:active {
  transform: translateY(1px);
}

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

button.secondary {
  color: var(--text);
  background: var(--surface-soft);
}

button.secondary:hover {
  background: #dfe6ef;
}

button.danger {
  background: var(--danger);
}

button.link-button {
  min-height: auto;
  padding: 0;
  color: var(--primary);
  background: transparent;
  font-weight: 650;
}

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

input {
  width: 100%;
  min-height: 46px;
  margin-top: 0.42rem;
  padding: 0.72rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text);
  background: #ffffff;
  outline: none;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(45 91 255 / 14%);
}

label {
  color: #344054;
  font-size: 0.91rem;
  font-weight: 650;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.8rem;
  font-size: clamp(1.75rem, 5vw, 2.8rem);
  line-height: 1.08;
}

h2 {
  margin-bottom: 0.7rem;
  font-size: 1.15rem;
}

.hidden {
  display: none !important;
}

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

.eyebrow {
  margin-bottom: 0.5rem;
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.offline-banner {
  position: sticky;
  z-index: 100;
  top: 0;
  padding: 0.65rem 1rem;
  color: #ffffff;
  background: var(--warning);
  text-align: center;
  font-size: 0.87rem;
  font-weight: 700;
}

.auth-layout {
  display: grid;
  min-height: 100vh;
}

.brand-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 5vw, 5rem);
  color: #ffffff;
  background:
    radial-gradient(
      circle at 85% 12%,
      rgb(88 129 255 / 70%),
      transparent 32%
    ),
    linear-gradient(145deg, #11192a, #263a6b);
}

.brand-panel .eyebrow {
  color: #9db5ff;
}

.brand-panel .lead {
  max-width: 36rem;
  color: #d9e3ff;
  font-size: 1.08rem;
  line-height: 1.7;
}

.brand-mark,
.small-brand-mark {
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--primary);
  font-weight: 850;
}

.brand-mark {
  width: 72px;
  height: 72px;
  margin-bottom: 1.5rem;
  border-radius: 22px;
  font-size: 2.2rem;
}

.small-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 1.2rem;
}

.feature-list {
  display: grid;
  gap: 0.8rem;
  max-width: 34rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  position: relative;
  padding-left: 1.8rem;
  color: #eef3ff;
}

.feature-list li::before {
  position: absolute;
  left: 0;
  content: "✓";
  color: #90e1b8;
  font-weight: 900;
}

.auth-card {
  width: min(100%, 31rem);
  margin: auto;
  padding: 2rem 1.25rem;
}


.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin-bottom: 1.6rem;
  padding: 0.3rem;
  border-radius: 14px;
  background: #edf1f7;
}

button.auth-tab {
  border: 0;
  border-radius: 11px;
  color: #465267;
  background: transparent;
  box-shadow: none;
}

button.auth-tab:hover {
  background: #e1e7f0;
}

button.auth-tab.active {
  color: #ffffff;
  background: var(--primary);
}

button.auth-tab.active:hover {
  background: var(--primary);
}

.feature-heading {
  margin: 1.8rem 0 0;
  color: #ffffff;
  font-weight: 800;
}

.auth-note {
  margin: 0 0 1.2rem;
  color: var(--muted);
  line-height: 1.55;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 1.6rem 0 1.2rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  flex: 1;
  height: 1px;
  content: "";
  background: #dce2eb;
}

.messenger-open-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.messenger-open-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 41px;
  padding: 0.59rem 0.72rem;
  border: 1px solid var(--rv-border-strong);
  border-radius: 7px;
  color: #32424d;
  background: #ffffff;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  transition:
    border-color 150ms ease,
    background-color 150ms ease,
    transform 150ms ease;
}

.messenger-open-button:hover {
  border-color: #acbac4;
  color: #22313c;
  background: #f7f9fa;
}

.messenger-open-button:active {
  transform: translateY(1px);
}

.messenger-brand-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.56rem;
  font-weight: 850;
  letter-spacing: -0.02em;
  line-height: 1;
}

.messenger-brand-icon-max {
  background: linear-gradient(135deg, #471aff, #9500ff 55%, #00bfff);
}

.messenger-brand-icon-vk {
  background: #0077ff;
  font-size: 0.68rem;
}

@media (max-width: 440px) {
  .messenger-open-grid {
    grid-template-columns: 1fr;
  }
}

.messenger-link-options {
  margin-top: 0.5rem;
}

.messenger-account-button {
  width: 100%;
}

.recovery-link {
  display: block;
  margin-right: auto;
  margin-left: auto;
}

.field-hint {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
}

.link-steps {
  margin: 0 0 1.3rem;
  padding: 1rem 1.1rem;
  border: 1px solid #dce2eb;
  border-radius: 12px;
  background: #f7f9fc;
  line-height: 1.5;
}

.link-steps ol {
  margin: 0.7rem 0 0;
  padding-left: 1.4rem;
}

.link-steps li + li {
  margin-top: 0.35rem;
}

.stack {
  display: grid;
  gap: 1rem;
}

.auth-card .link-button {
  margin-top: 1.2rem;
}

.message {
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  border: 1px solid #f1b5b2;
  border-radius: 11px;
  color: #8f1d1d;
  background: var(--danger-soft);
  line-height: 1.45;
}

.message.success {
  border-color: #a7d8bf;
  color: var(--success);
  background: #edf9f2;
}

.app-layout {
  min-height: 100vh;
}

.app-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding:
    env(safe-area-inset-top)
    1rem
    0;
  border-bottom: 1px solid var(--border);
  background: rgb(255 255 255 / 94%);
  backdrop-filter: blur(14px);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  text-decoration: none;
}

.app-brand span:last-child {
  display: grid;
}

.app-brand small {
  color: var(--muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.header-actions button {
  min-height: 38px;
  padding: 0.5rem 0.7rem;
}

.status-pill {
  display: none;
  padding: 0.38rem 0.65rem;
  border-radius: 999px;
  color: var(--success);
  background: #e9f8f0;
  font-size: 0.76rem;
  font-weight: 800;
}

.status-pill.offline {
  color: var(--warning);
  background: #fff5d6;
}

.app-body {
  display: grid;
}

.app-nav {
  position: sticky;
  z-index: 10;
  top: 68px;
  display: flex;
  gap: 0.35rem;
  padding: 0.65rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.nav-button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0.55rem 0.8rem;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
  white-space: nowrap;
}

.nav-button:hover {
  color: var(--text);
  background: var(--surface-soft);
}

.nav-button.active {
  color: #ffffff;
  background: var(--primary);
}

.content-area {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 1.25rem 1rem 4rem;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.3rem;
}

.section-heading h1 {
  margin-bottom: 0;
  font-size: clamp(1.65rem, 4vw, 2.35rem);
}

.section-intro {
  max-width: 47rem;
  color: var(--muted);
  line-height: 1.65;
}

.card-grid {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.card,
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 6px 20px rgb(23 32 51 / 4%);
}

.card {
  display: grid;
  gap: 0.28rem;
  padding: 1rem;
}

.card strong {
  font-size: 1.2rem;
}

.card-label {
  margin-bottom: 0.2rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
}

.panel {
  margin-bottom: 1rem;
  padding: 1rem;
}

.panel p {
  color: var(--muted);
  line-height: 1.6;
}

.danger-panel {
  border-color: #f0c2bf;
}

.two-columns {
  display: grid;
  gap: 1rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.empty-state {
  padding: 1rem;
  border-radius: 12px;
  color: var(--muted);
  background: var(--surface-soft);
}

.list {
  display: grid;
  gap: 0.75rem;
}

.list-item {
  display: grid;
  gap: 0.7rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.list-item-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.list-item-meta {
  display: grid;
  gap: 0.25rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.badge {
  display: inline-flex;
  width: fit-content;
  padding: 0.24rem 0.5rem;
  border-radius: 999px;
  color: var(--success);
  background: #e9f8f0;
  font-size: 0.72rem;
  font-weight: 800;
}

.recovery-codes {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.55rem;
  margin-top: 1rem;
}

.recovery-code {
  padding: 0.7rem;
  border: 1px dashed var(--border);
  border-radius: 9px;
  background: var(--surface-soft);
  font-family: ui-monospace, monospace;
  text-align: center;
  user-select: all;
}

noscript {
  display: block;
  padding: 1rem;
  color: #ffffff;
  background: var(--danger);
  text-align: center;
}

@media (min-width: 640px) {
  .auth-card {
    padding: 3rem;
  }

  .status-pill {
    display: inline-flex;
  }

  .content-area {
    padding: 2rem 1.5rem 5rem;
  }

  .card-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .two-columns {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .panel,
  .card {
    padding: 1.3rem;
  }
}

@media (min-width: 980px) {
  .brand-mark {
    margin-bottom: 3rem;
  }

  .auth-layout {
    grid-template-columns:
      minmax(0, 1.25fr)
      minmax(28rem, 0.75fr);
  }

  .brand-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .app-header {
    padding-right: 1.5rem;
    padding-left: 1.5rem;
  }

  .app-body {
    grid-template-columns: 240px 1fr;
  }

  .app-nav {
    top: 68px;
    display: flex;
    flex-direction: column;
    align-self: start;
    height: calc(100vh - 68px);
    padding: 1rem;
    overflow: auto;
    border-right: 1px solid var(--border);
    border-bottom: 0;
  }

  .nav-button {
    width: 100%;
    text-align: left;
  }

  .card-grid {
    grid-template-columns:
      repeat(4, minmax(0, 1fr));
  }

  .legal-grid {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

select,
textarea {
  width: 100%;
  min-height: 46px;
  margin-top: 0.42rem;
  padding: 0.72rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text);
  background: #ffffff;
  font: inherit;
  outline: none;
}

select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(45 91 255 / 14%);
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.compact-form {
  display: grid;
  gap: 1rem;
}

.work-form-grid {
  align-items: end;
}

.work-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.65rem;
}

.work-toolbar label {
  min-width: 150px;
}

.work-toolbar button {
  min-height: 46px;
}

.work-list {
  display: grid;
  gap: 0.85rem;
}

.work-item {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 6px 20px rgb(23 32 51 / 4%);
}

.work-item-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.work-item-heading h2 {
  margin: 0;
  overflow-wrap: anywhere;
}

.work-meta {
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.55;
}

.work-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.work-item-actions button {
  min-height: 40px;
  padding: 0.55rem 0.75rem;
}

.work-pre {
  min-height: 90px;
  margin: 0;
  overflow: auto;
  color: var(--text);
  font-family: inherit;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.checkbox-row {
  display: flex;
  align-items: center;
  align-self: center;
  gap: 0.6rem;
  min-height: 46px;
}

.checkbox-row input {
  width: 20px;
  min-height: 20px;
  margin: 0;
}

@media (min-width: 640px) {
  .compact-form {
    grid-template-columns:
      minmax(0, 1fr)
      auto;
    align-items: end;
  }

  .work-form-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .work-wide-field {
    grid-column: 1 / -1;
  }

  .work-item {
    padding: 1.3rem;
  }
}

@media (min-width: 980px) {
  .work-form-grid {
    grid-template-columns:
      repeat(4, minmax(0, 1fr));
  }

  .work-wide-field {
    grid-column: span 2;
  }
}

.parity-analytics-form {
  grid-template-columns:
    repeat(auto-fit, minmax(150px, 1fr));
}

#parity-export-message {
  min-height: 1.5rem;
  margin-bottom: 0;
}

#parity-export-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

@media (max-width: 639px) {
  .parity-analytics-form {
    grid-template-columns: 1fr;
  }

  #section-archive .work-item-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

.attachments-selection-form {
  grid-template-columns:
    repeat(auto-fit, minmax(180px, 1fr));
}

.attachments-upload-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 1rem;
}

.attachments-upload-form label {
  flex: 1 1 280px;
}

.attachments-upload-form button {
  flex: 0 0 auto;
}

.attachment-item h2 {
  overflow-wrap: anywhere;
}

.attachments-list .work-meta {
  overflow-wrap: anywhere;
}

#attachments-selection-message,
#attachments-upload-message,
#attachments-upload-rules {
  min-height: 1.5rem;
}

#attachments-upload-button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

@media (max-width: 639px) {
  .attachments-selection-form {
    grid-template-columns: 1fr;
  }

  .attachments-upload-form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .attachments-upload-form button {
    width: 100%;
  }

  .attachment-item .work-item-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}


/* Package 10C1 management interface */

.management-panel-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: start;
}

.management-panel-heading h2 {
  margin-bottom: 0.25rem;
}

.management-form-grid,
.management-settings-grid {
  display: grid;
  gap: 1rem;
  align-items: end;
}

.management-secret-result {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 1px dashed var(--border);
  border-radius: 11px;
  background: var(--surface-soft);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.management-secret-result code {
  padding: 0.22rem 0.4rem;
  border-radius: 6px;
  background: #ffffff;
  font-family: ui-monospace, monospace;
  font-weight: 800;
  user-select: all;
}

.management-summary-text {
  min-height: 1.5rem;
}

.management-tariff-grid {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.management-tariff-item {
  min-width: 0;
}

.management-weekdays {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.management-weekdays legend {
  padding: 0 0.35rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
}

.management-weekdays label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-weight: 650;
}

.management-weekdays input {
  width: 20px;
  min-height: 20px;
  margin: 0;
}

.management-save-button {
  width: fit-content;
}

@media (min-width: 640px) {
.management-form-grid {
    grid-template-columns:
      minmax(0, 1fr)
      minmax(150px, 0.55fr)
      auto;
  }

  .management-settings-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .management-weekdays,
  .management-save-button {
    grid-column: 1 / -1;
  }

  .management-tariff-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}

.more-navigation-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(min(100%, 230px), 1fr)
  );
  gap: 12px;
}

.more-navigation-grid > button {
  min-height: 54px;
  justify-content: flex-start;
  text-align: left;
}

@media (min-width: 980px) {
  .management-settings-grid {
    grid-template-columns:
      repeat(4, minmax(0, 1fr));
  }

  .management-tariff-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  #section-management .work-item-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .management-save-button {
    width: 100%;
  }
}

/* Package 10C2 — PWA support */

.archive-bulk-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.archive-item-select {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  font-weight: 600;
  cursor: pointer;
}

.archive-item-select input {
  width: 1.2rem;
  height: 1.2rem;
  margin: 0;
}

#parity-archive-list .work-item.selected {
  outline: 2px solid var(--accent-color, currentColor);
  outline-offset: 2px;
}

.support-layout {
  display: grid;
  gap: 1rem;
}

.support-sidebar,
.support-main {
  min-width: 0;
}

.support-create-grid,
.support-reply-form,
.support-upload-form {
  display: grid;
  gap: 0.9rem;
}

.support-wide-field {
  grid-column: 1 / -1;
}

.support-ticket-list {
  display: grid;
  gap: 0.65rem;
}

.support-ticket-button {
  width: 100%;
  display: grid;
  gap: 0.4rem;
  padding: 0.9rem;
  text-align: left;
  border: 1px solid var(--border-color);
  border-radius: 0.8rem;
  background: var(--surface-color);
  color: inherit;
}

.support-ticket-button:hover,
.support-ticket-button:focus-visible {
  border-color: currentColor;
}

.support-ticket-button.active {
  outline: 2px solid currentColor;
  outline-offset: 1px;
}

.support-ticket-button.unread {
  border-color: var(--accent-color, currentColor);
  background: color-mix(
    in srgb,
    var(--accent-color, #246bfd) 7%,
    var(--surface-color)
  );
}

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

.support-ticket-category {
  font-weight: 600;
}

.support-ticket-subject {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-unread-badge {
  min-width: 1.5rem;
  text-align: center;
}

.support-ticket-meta {
  font-size: 0.88rem;
  opacity: 0.75;
}

.support-description {
  margin-bottom: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.support-message-list {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.support-message {
  max-width: 92%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.9rem;
  background: var(--surface-color);
}

.support-message.customer {
  justify-self: end;
}

.support-message.support {
  justify-self: start;
}

.support-message p {
  margin-bottom: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.support-message-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.45rem;
  font-size: 0.85rem;
  opacity: 0.8;
}

.support-attachment-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.support-attachment-item h2 {
  overflow-wrap: anywhere;
}

@media (min-width: 640px) {
  .support-create-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .support-create-grid > button {
    justify-self: start;
  }

  .support-upload-form {
    grid-template-columns:
      minmax(0, 1fr) auto;
    align-items: end;
  }
}

@media (min-width: 980px) {
  .support-layout {
    grid-template-columns:
      minmax(280px, 0.8fr)
      minmax(0, 1.5fr);
    align-items: start;
  }

  .support-sidebar {
    display: contents;
  }

  .support-sidebar > .panel:first-child {
    grid-column: 1 / -1;
  }

  .support-sidebar > .panel:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
    position: sticky;
    top: 1rem;
  }

  .support-main {
    grid-column: 2;
    grid-row: 2;
  }
}


/* PACKAGE 10C3 VIDEO INTERFACE */

.video-layout {
  display: grid;
  gap: 1rem;
}

.video-list {
  display: grid;
  gap: 0.75rem;
}

.video-card {
  display: grid;
  gap: 0.35rem;
  width: 100%;
  padding: 0.9rem;
  border: 1px solid currentColor;
  border-radius: 0.75rem;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.video-card:hover,
.video-card:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.video-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.video-delivery {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.video-player {
  display: block;
  width: 100%;
  max-height: 70vh;
  border-radius: 0.75rem;
  background: #000;
}

.video-external-link {
  display: inline-flex;
  width: fit-content;
  min-height: 44px;
  align-items: center;
  padding: 0.7rem 1rem;
  border: 1px solid currentColor;
  border-radius: 0.65rem;
  font-weight: 600;
}

@media (min-width: 900px) {
  .video-layout {
    grid-template-columns:
      minmax(220px, 0.8fr)
      minmax(0, 1.2fr);
    align-items: start;
  }

  #video-detail-panel {
    grid-column: 1 / -1;
  }
}

.messenger-link-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.messenger-link-target {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  color: var(--primary);
  background: #edf2ff;
  font-size: 0.82rem;
  font-weight: 800;
}

.messenger-link-code-box {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
}

.messenger-link-code {
  display: block;
  margin: 0.55rem 0;
  font-family: ui-monospace, monospace;
  font-size: clamp(1.7rem, 8vw, 2.4rem);
  font-weight: 850;
  letter-spacing: 0.18em;
  text-align: center;
  user-select: all;
}
/* PACKAGE_8F_C_BRAND_ICON_BEGIN */
.brand-mark,
.small-brand-mark {
  display: block;
  object-fit: cover;
  padding: 0;
  overflow: hidden;
  border-radius: 50%;
  background: transparent;
}
/* PACKAGE_8F_C_BRAND_ICON_END */

/* PACKAGE 9F-B-C3-H1-C-A6-A5-A2 — exact Core Team presentation */
.team-core-screen,
.team-flow-text {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  line-height: 1.55;
  background: transparent;
  border: 0;
}

.team-action-stack {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.team-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.team-action-row > button {
  flex: 1 1 14rem;
}

.team-flow {
  margin-top: 1rem;
}

.team-flow:empty {
  display: none;
}

.team-overview {
  display: grid;
  gap: 1.25rem;
}

.team-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.team-summary-card {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-soft);
}

.team-summary-card strong {
  overflow-wrap: anywhere;
  font-size: 1.05rem;
}

.team-summary-label,
.team-summary-card small,
.team-member-details small {
  color: var(--muted);
}

.team-member-list {
  display: grid;
  gap: 0.7rem;
}

.team-member-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
}

.team-member-details {
  display: grid;
  gap: 0.4rem;
}

.team-member-badges,
.team-member-actions,
.team-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.team-member-actions button,
.team-confirm-actions button {
  min-height: 38px;
  padding: 0.55rem 0.8rem;
}

.team-confirm-panel {
  display: grid;
  gap: 0.75rem;
}

.team-confirm-panel h3,
.team-confirm-panel p {
  margin: 0;
}

.today-dashboard {
  display: grid;
  gap: 1rem;
}

.today-dashboard-header > div {
  display: grid;
  gap: 0.25rem;
}

.today-dashboard-header strong {
  font-size: 1.15rem;
}

.today-dashboard-header small {
  color: var(--muted);
}

.today-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.today-metric-card {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface-soft);
}

.today-metric-card strong {
  font-size: 1.08rem;
  overflow-wrap: anywhere;
}

.today-metric-card span {
  color: var(--muted);
  font-size: 0.82rem;
}

.today-control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.today-control-chip {
  padding: 0.42rem 0.65rem;
  border-radius: 999px;
  color: var(--text);
  background: var(--surface-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.today-control-chip.danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.today-control-chip.warning {
  color: var(--warning);
  background: #fff7d6;
}

.today-group-list {
  display: grid;
  gap: 1rem;
}

.today-group {
  display: grid;
  gap: 0.55rem;
}

.today-group h3 {
  margin: 0;
  font-size: 1rem;
}

.today-item-button {
  display: grid;
  gap: 0.28rem;
  width: 100%;
  min-height: 0;
  padding: 0.78rem 0.9rem;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
  text-align: left;
}

.today-item-button:hover {
  border-color: #b8c5ff;
  color: var(--text);
  background: #f7f9ff;
}

.today-item-button span {
  color: var(--muted);
  font-size: 0.84rem;
}

.today-group-more {
  margin: 0.15rem 0 0;
}

.today-empty-state {
  display: grid;
  gap: 0.35rem;
}

@media (max-width: 760px) {
  .team-summary-grid {
    grid-template-columns: 1fr;
  }

  .team-member-card {
    align-items: stretch;
    flex-direction: column;
  }

  .team-member-actions button,
  .team-confirm-actions button {
    flex: 1 1 10rem;
  }

  .today-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.team-inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.team-inline-form input {
  flex: 1 1 18rem;
}

.team-inline-form button {
  flex: 0 1 auto;
}

@media (max-width: 720px) {
  .team-action-row,
  .team-inline-form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .team-action-row > button,
  .team-inline-form input,
  .team-inline-form button {
    width: 100%;
  }
}

/* PACKAGE 9F-B-C3-H1-C-A6-A6-A2 — exact Core Settings presentation */
.settings-core-screen {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  line-height: 1.55;
  background: transparent;
  border: 0;
}

.settings-action-stack {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.settings-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.settings-action-row > button {
  flex: 1 1 14rem;
}

.settings-flow {
  margin-top: 1rem;
}

.settings-flow:empty {
  display: none;
}

.settings-inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.settings-inline-form input {
  flex: 1 1 18rem;
}

.settings-inline-form button {
  flex: 0 1 auto;
}

@media (max-width: 720px) {
  .settings-action-row,
  .settings-inline-form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .settings-action-row > button,
  .settings-inline-form input,
  .settings-inline-form button {
    width: 100%;
  }
}

/* Exact Core tariff flow - web presentation only. */
.management-tariff-core-panel {
  display: grid;
  gap: 16px;
}

.management-tariff-screen {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  line-height: 1.55;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
}

.management-tariff-flow {
  display: grid;
  gap: 12px;
}

.management-tariff-actions {
  display: grid;
  gap: 10px;
}

.management-tariff-action-row {
  display: grid;
  grid-template-columns:
    repeat(
      auto-fit,
      minmax(180px, 1fr)
    );
  gap: 10px;
}

.management-tariff-action-row > button {
  width: 100%;
}

.management-tariff-promo-form {
  display: grid;
  gap: 10px;
}

.management-tariff-promo-form input {
  width: 100%;
}


/* ==========================================================
   REVISOR UX/UI FOUNDATION V1

   Concept:
   familiar accounting ergonomics
   + modern calm visual language.

   Canonical bot names, hierarchy, roles and behaviour
   are intentionally untouched.
   ========================================================== */

:root {
  --rv-bg: #f3f5f6;
  --rv-surface: #ffffff;
  --rv-surface-soft: #f7f8f9;
  --rv-surface-warm: #fbfaf5;

  --rv-text: #26333d;
  --rv-text-strong: #1e2a33;
  --rv-muted: #687681;

  --rv-border: #d8dfe4;
  --rv-border-strong: #c6d0d7;

  --rv-primary: #385b73;
  --rv-primary-hover: #2d4b61;
  --rv-primary-soft: #edf3f6;

  --rv-accent: #d1a32d;
  --rv-accent-soft: #fbf5df;

  --rv-success: #34775b;
  --rv-success-soft: #edf7f2;

  --rv-warning: #936714;
  --rv-warning-soft: #fff7df;

  --rv-danger: #ab4848;
  --rv-danger-soft: #fff1f0;

  --rv-radius: 10px;

  --rv-shadow:
    0 4px 16px rgb(30 43 53 / 5%);

  --rv-shadow-raised:
    0 14px 36px rgb(30 43 53 / 8%);

  /*
   * Existing components continue using their current
   * semantic variables, but inherit the new palette.
   */
  --text: var(--rv-text);
  --muted: var(--rv-muted);
  --border: var(--rv-border);
  --surface: var(--rv-surface);
  --surface-soft: var(--rv-surface-soft);
  --primary: var(--rv-primary);
  --success: var(--rv-success);
  --warning: var(--rv-warning);
  --danger: var(--rv-danger);
  --danger-soft: var(--rv-danger-soft);
  --radius: var(--rv-radius);
}


/* ---------- Global ---------- */

html {
  background: var(--rv-bg);
}

body {
  color: var(--rv-text);
  background:
    linear-gradient(
      180deg,
      #fafbfb 0,
      var(--rv-bg) 270px
    );
  font-family:
    "Segoe UI Variable",
    "Segoe UI",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    Arial,
    sans-serif;
  font-size: 15px;
  line-height: 1.48;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  color: var(--rv-text-strong);
  font-weight: 680;
  letter-spacing: -0.012em;
}

h1 {
  font-size: clamp(
    1.55rem,
    2.8vw,
    2.05rem
  );
  line-height: 1.18;
}

h2 {
  font-size: 1.08rem;
  line-height: 1.32;
}

.eyebrow {
  color: #707b84;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.muted,
.section-intro {
  color: var(--rv-muted);
}


/* ---------- First contact ---------- */

.auth-layout {
  background: var(--rv-bg);
}

.brand-panel {
  color: var(--rv-text);
  border-right: 1px solid var(--rv-border);
  background:
    radial-gradient(
      circle at 12% 15%,
      rgb(209 163 45 / 13%),
      transparent 30%
    ),
    radial-gradient(
      circle at 88% 80%,
      rgb(56 91 115 / 9%),
      transparent 34%
    ),
    linear-gradient(
      145deg,
      #fbfcfc,
      #edf2f4
    );
}

.brand-panel .lead {
  color: #566570;
}

.brand-panel .eyebrow {
  color: #8b6919;
}

.brand-mark,
.small-brand-mark {
  color: #ffffff;
  background: var(--rv-primary);
  box-shadow:
    inset 0 -4px 0
    rgb(209 163 45 / 90%);
}

.brand-mark {
  border-radius: 15px;
}

.small-brand-mark {
  border-radius: 8px;
}

.auth-card {
  border: 1px solid var(--rv-border);
  border-radius: 15px;
  background: #ffffff;
  box-shadow: var(--rv-shadow-raised);
}


/* ---------- Forms ---------- */

input,
select,
textarea {
  min-height: 41px;
  border: 1px solid var(--rv-border-strong);
  border-radius: 7px;
  color: var(--rv-text);
  background: #ffffff;
  font: inherit;
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: var(--rv-primary);
  box-shadow:
    0 0 0 3px
    rgb(56 91 115 / 12%);
}

label {
  color: #3d4b55;
  font-size: 0.88rem;
  font-weight: 620;
}


/* ---------- Buttons ---------- */

button {
  border-radius: 7px;
  font-family: inherit;
}

button:not(.link-button) {
  min-height: 41px;
  padding: 0.59rem 0.86rem;
  border: 1px solid var(--rv-primary);
  color: #ffffff;
  background: var(--rv-primary);
  box-shadow: none;
  font-weight: 650;
}

button:not(.link-button):hover {
  border-color: var(--rv-primary-hover);
  background: var(--rv-primary-hover);
}

button.secondary {
  border-color: var(--rv-border-strong);
  color: #32424d;
  background: #ffffff;
}

button.secondary:hover {
  border-color: #acbac4;
  color: #22313c;
  background: #f7f9fa;
}

button.danger {
  border-color: #debcbc;
  color: var(--rv-danger);
  background: #ffffff;
}

button.danger:hover {
  color: #8e3636;
  background: var(--rv-danger-soft);
}

button.link-button {
  color: var(--rv-primary);
  font-weight: 650;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline:
    3px solid rgb(209 163 45 / 30%);
  outline-offset: 2px;
}


/* ---------- Header ---------- */

.app-header {
  border-bottom: 1px solid var(--rv-border);
  background: rgb(255 255 255 / 95%);
  box-shadow:
    0 1px 8px rgb(30 43 53 / 4%);
  backdrop-filter: blur(10px);
}

.app-brand {
  color: var(--rv-text);
}

.app-brand small {
  color: var(--rv-muted);
}


/* ---------- Main navigation ---------- */

.app-nav {
  gap: 0.08rem;
  padding:
    0.4rem
    max(
      0.65rem,
      env(safe-area-inset-left)
    );
  border-bottom: 1px solid var(--rv-border);
  background: #ffffff;
  scrollbar-width: thin;
}

.nav-button {
  min-height: 39px;
  padding: 0.47rem 0.72rem;
  border: 0;
  border-radius: 7px 7px 0 0;
  color: #65737d;
  background: transparent;
  box-shadow: none;
  font-size: 0.91rem;
  font-weight: 620;
}

.nav-button:hover {
  color: #26343e;
  background: var(--rv-surface-soft);
  box-shadow: none;
}

.nav-button.active {
  color: #263943;
  background: var(--rv-primary-soft);
  box-shadow:
    inset 0 -3px 0 var(--rv-accent);
}


/* ---------- Workspace ---------- */

.content-area {
  width: min(100%, 1320px);
  padding:
    1.1rem
    clamp(0.8rem, 2vw, 1.45rem)
    4rem;
}

.section-heading {
  margin-bottom: 0.95rem;
}

.section-heading h1 {
  margin-bottom: 0.12rem;
}


/* ---------- Panels / cards ---------- */

.card,
.panel,
.list-item,
.work-item {
  border: 1px solid var(--rv-border);
  border-radius: var(--rv-radius);
  background: #ffffff;
  box-shadow: var(--rv-shadow);
}

.card {
  gap: 0.2rem;
  padding: 0.86rem 0.95rem;
}

.panel {
  padding: 0.95rem 1rem;
}

.card-label {
  color: #74818a;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.list {
  gap: 0.55rem;
}

.list-item,
.work-item {
  gap: 0.62rem;
  padding: 0.8rem 0.9rem;
  box-shadow:
    0 2px 9px rgb(30 43 53 / 3%);
}

.list-item:hover,
.work-item:hover {
  border-color: #c4cfd6;
  box-shadow:
    0 5px 15px rgb(30 43 53 / 5%);
}

.work-meta,
.list-item-meta {
  color: var(--rv-muted);
  font-size: 0.84rem;
  line-height: 1.42;
}

.work-item-actions {
  gap: 0.4rem;
}

.work-item-actions button {
  min-height: 35px;
  padding: 0.43rem 0.62rem;
  font-size: 0.85rem;
}


/* ---------- Toolbars ---------- */

.work-toolbar,
.compact-form {
  gap: 0.62rem;
}

.work-toolbar {
  padding: 0.67rem;
  border: 1px solid var(--rv-border);
  border-radius: var(--rv-radius);
  background: #f8f9fa;
}

.management-form-grid,
.management-settings-grid {
  gap: 0.72rem;
}

.management-panel-heading {
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #e5eaed;
}


/* ---------- Status ---------- */

.badge,
.status-pill {
  border: 1px solid #cce0d5;
  color: var(--rv-success);
  background: var(--rv-success-soft);
  font-weight: 700;
}

.status-pill.offline {
  border-color: #ead8a2;
  color: var(--rv-warning);
  background: var(--rv-warning-soft);
}

.message {
  border-radius: 7px;
}

.message.success {
  border-color: #bddbc9;
  color: #286247;
  background: var(--rv-success-soft);
}

.empty-state {
  border: 1px solid #e2e7ea;
  border-radius: 7px;
  color: var(--rv-muted);
  background: var(--rv-surface-soft);
}


/* ---------- Tables ---------- */

table {
  width: 100%;
  border-spacing: 0;
  border-collapse: separate;
  border: 1px solid var(--rv-border);
  border-radius: var(--rv-radius);
  background: #ffffff;
  overflow: hidden;
}

thead th {
  padding: 0.58rem 0.66rem;
  border-bottom:
    1px solid var(--rv-border-strong);
  color: #53616b;
  background: #f4f6f7;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
}

tbody td {
  padding: 0.58rem 0.66rem;
  border-bottom: 1px solid #e8ecef;
  color: #303e48;
  vertical-align: top;
}

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

tbody tr:hover {
  background: #fafbfb;
}


/* ---------- New user onboarding ---------- */

#no-role-onboarding-panel {
  border-color: #ddd6b9;
  background:
    linear-gradient(
      135deg,
      #ffffff,
      var(--rv-surface-warm)
    );
}

#onboarding-start-solo-button {
  box-shadow:
    inset 0 -3px 0
    rgb(209 163 45 / 78%);
}


/* ---------- Desktop density ---------- */

@media (min-width: 980px) {
  .card-grid {
    gap: 0.72rem;
  }

  .two-columns {
    gap: 0.78rem;
  }

  .panel {
    margin-bottom: 0.78rem;
  }

  .auth-card {
    max-width: 580px;
  }
}


/* ---------- Mobile ---------- */

@media (max-width: 639px) {
  body {
    font-size: 15px;
  }

  .content-area {
    padding:
      0.82rem
      0.68rem
      calc(
        4rem
        + env(safe-area-inset-bottom)
      );
  }

  .app-nav {
    padding:
      0.34rem
      0.42rem;
  }

  .nav-button {
    min-height: 42px;
    padding: 0.5rem 0.66rem;
  }

  .card,
  .panel,
  .list-item,
  .work-item {
    border-radius: 9px;
  }

  .card,
  .panel {
    padding: 0.82rem;
  }

  .work-item {
    padding: 0.77rem;
  }

  button:not(.link-button),
  .work-item-actions button {
    min-height: 44px;
  }
}


/* ---------- Accessibility ---------- */

@media (prefers-reduced-motion: reduce) {
  button,
  .list-item,
  .work-item {
    transition: none;
  }
}


/* ==========================================================
   REVISOR UX/UI-2 AUTH + TASKS

   1. Fix auth feature-list contrast.
   2. Turn canonical Tasks keyboard into a clear desktop grid.
   Business logic and button labels remain unchanged.
   ========================================================== */


/* ---------- AUTH: readable feature list ---------- */

.brand-panel .feature-heading {
  color: #344550;
  font-weight: 700;
}

.brand-panel .feature-list {
  color: #344550;
}

.brand-panel .feature-list li {
  color: #344550;
  font-weight: 520;
}

.brand-panel .feature-list li::before {
  color: #38a46c;
  text-shadow: none;
}


/* ---------- TASKS: canonical menu as work cards ---------- */

#work-tasks-core-menu {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 0.7rem;

  width: min(100%, 860px);
  margin-top: 1rem;
  padding: 0.85rem;

  border: 1px solid var(--rv-border);
  border-radius: 12px;

  background: #ffffff;

  box-shadow:
    0 5px 18px
    rgb(30 43 53 / 5%);
}


/*
 * Preserve exact Core row geometry:
 *
 * 1: Current
 * 2: New + Do now
 * 3: Templates + Recurring
 * 4: Back
 */

#work-tasks-core-current {
  grid-column: 1 / -1;
}

#work-tasks-core-back {
  grid-column: 1 / -1;
}


#work-tasks-core-menu > button {
  display: flex;
  align-items: center;
  justify-content: flex-start;

  min-height: 62px;

  padding:
    0.85rem
    1rem;

  border:
    1px solid
    var(--rv-border-strong);

  border-radius: 9px;

  color: #263744;
  background: #ffffff;

  box-shadow:
    0 2px 8px
    rgb(30 43 53 / 3%);

  text-align: left;
  font-size: 0.94rem;
  font-weight: 650;

  transition:
    border-color 120ms ease,
    background 120ms ease,
    box-shadow 120ms ease,
    transform 120ms ease;
}


#work-tasks-core-menu > button:hover {
  border-color: #aebdc7;
  color: #20313e;
  background: #f8fafb;

  box-shadow:
    0 5px 14px
    rgb(30 43 53 / 6%);
}


#work-tasks-core-menu > button:active {
  transform: translateY(1px);
}


/* Main action */

#work-tasks-core-create {
  border-color: var(--rv-primary);

  color: #ffffff;
  background:
    linear-gradient(
      180deg,
      #426982,
      var(--rv-primary)
    );

  box-shadow:
    inset 0 -3px 0
    rgb(209 163 45 / 82%),
    0 5px 13px
    rgb(45 75 97 / 13%);
}


#work-tasks-core-create:hover {
  border-color: var(--rv-primary-hover);
  color: #ffffff;
  background: var(--rv-primary-hover);
}


/* Current tasks gets a subtle hierarchy */

#work-tasks-core-current {
  border-color: #b9c8d1;
  background: var(--rv-primary-soft);
}


/* Do-now gets a restrained warm cue */

#work-tasks-core-do-now {
  border-color: #ddd3af;
  background:
    linear-gradient(
      180deg,
      #fffef9,
      #fbf8eb
    );
}


/* Back should read as navigation, not a primary action */

#work-tasks-core-back {
  min-height: 40px;

  padding:
    0.45rem
    0.25rem;

  border-color: transparent;

  color: var(--rv-muted);
  background: transparent;

  box-shadow: none;
}


#work-tasks-core-back:hover {
  border-color: transparent;

  color: var(--rv-primary);
  background: transparent;

  box-shadow: none;
}


/* Other task keyboards keep their normal button behavior */

#work-tasks-core-template-actions,
#work-tasks-core-recurring-actions,
#work-tasks-core-wizard-actions,
#work-tasks-core-card-actions {
  gap: 0.55rem;
}


/* ---------- Responsive Tasks ---------- */

@media (max-width: 760px) {
  #work-tasks-core-menu {
    grid-template-columns: 1fr;

    padding: 0.65rem;
  }

  #work-tasks-core-current,
  #work-tasks-core-back {
    grid-column: auto;
  }

  #work-tasks-core-menu > button {
    min-height: 54px;
  }
}


/* ==========================================================
   REVISOR UX/UI-3 TASKS CORE FLOW SIDEBAR

   - Correct Tasks DOM row selectors.
   - Restore responsive wrapping of Core text.
   - Reduce visual weight of desktop navigation.
   - Preserve canonical labels/order/behaviour.
   ========================================================== */


/* ---------- Core text: readable and responsive ---------- */

#work-tasks-core-flow {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

#work-tasks-core-screen-text {
  display: block;

  width: 100%;
  max-width: 100%;
  min-width: 0;

  margin: 0 0 1rem;
  padding: 0;

  border: 0;

  color: var(--rv-text);
  background: transparent;

  font-family:
    "Segoe UI Variable",
    "Segoe UI",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    Arial,
    sans-serif;

  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.58;

  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
  overflow-x: hidden;
}


/* ---------- Tasks: preserve actual Core row geometry ---------- */

#work-tasks-core-menu {
  display: flex;
  flex-direction: column;

  gap: 0.65rem;

  width: min(100%, 940px);
  max-width: 100%;

  margin-top: 0.95rem;
  padding: 0.8rem;

  box-sizing: border-box;

  border: 1px solid var(--rv-border);
  border-radius: 11px;

  background: #ffffff;

  box-shadow:
    0 4px 16px
    rgb(30 43 53 / 4%);
}


/*
 * HTML already contains exact bot rows.
 * Style those rows instead of attempting
 * to rebuild their geometry at menu level.
 */

#work-tasks-core-menu > div {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 0.65rem;

  width: 100%;
  min-width: 0;
}


#work-tasks-core-menu > div:first-child,
#work-tasks-core-menu > div:last-child {
  grid-template-columns: 1fr;
}


#work-tasks-core-menu > div > button {
  display: flex;

  align-items: center;
  justify-content: flex-start;

  width: 100%;
  min-width: 0;
  min-height: 54px;

  margin: 0;
  padding:
    0.72rem
    0.9rem;

  box-sizing: border-box;

  border:
    1px solid
    var(--rv-border-strong);

  border-radius: 8px;

  color: #2c3c48;
  background: #ffffff;

  box-shadow:
    0 1px 5px
    rgb(30 43 53 / 3%);

  font-size: 0.93rem;
  font-weight: 650;
  line-height: 1.3;

  text-align: left;

  white-space: normal;
  overflow-wrap: anywhere;
}


#work-tasks-core-menu > div > button:hover {
  border-color: #afbdc7;

  color: #20313d;
  background: #f7f9fa;

  box-shadow:
    0 4px 12px
    rgb(30 43 53 / 5%);
}


/* Current tasks */

#work-tasks-core-current {
  border-color: #bdcad2;

  color: #2b4658;

  background:
    linear-gradient(
      180deg,
      #f7fafb,
      #edf3f6
    );
}


/* Main action */

#work-tasks-core-create {
  border-color: var(--rv-primary);

  color: #ffffff;

  background:
    linear-gradient(
      180deg,
      #426982,
      var(--rv-primary)
    );

  box-shadow:
    inset 0 -3px 0
    rgb(209 163 45 / 78%),
    0 4px 12px
    rgb(45 75 97 / 11%);
}


#work-tasks-core-create:hover {
  border-color: var(--rv-primary-hover);

  color: #ffffff;
  background: var(--rv-primary-hover);
}


/* Do now */

#work-tasks-core-do-now {
  border-color: #ded3ae;

  color: #4c4534;

  background:
    linear-gradient(
      180deg,
      #fffef9,
      #faf6e8
    );
}


/* Disabled actions must remain readable */

#work-tasks-core-menu
> div
> button:disabled {
  opacity: 1;

  border-color: #d5dde2;

  color: #7a8790;
  background: #f1f4f5;

  box-shadow: none;

  cursor: not-allowed;
}


/* Back = navigation rather than work action */

#work-tasks-core-back {
  min-height: 38px;

  padding:
    0.4rem
    0.25rem;

  border-color: transparent;

  color: #6a7781;
  background: transparent;

  box-shadow: none;
}


#work-tasks-core-back:hover {
  border-color: transparent;

  color: var(--rv-primary);
  background: transparent;

  box-shadow: none;
}


/* ---------- Desktop sidebar: lighter visual hierarchy ---------- */

@media (min-width: 760px) {
  .app-nav {
    gap: 0.2rem;

    padding:
      0.55rem
      0.5rem;

    border-right:
      1px solid
      var(--rv-border);

    background: #f7f9fa;
  }


  .app-nav .nav-button {
    min-height: 43px;

    padding:
      0.55rem
      0.72rem;

    border:
      1px solid
      transparent;

    border-radius: 7px;

    color: #465660;
    background: transparent;

    box-shadow: none;

    font-size: 0.91rem;
    font-weight: 620;
  }


  .app-nav .nav-button:hover {
    border-color: #d8e0e5;

    color: #263842;
    background: #ffffff;

    box-shadow:
      0 1px 4px
      rgb(30 43 53 / 3%);
  }


  .app-nav .nav-button.active {
    border-color: #bbc9d2;

    color: #243b4a;
    background: #ffffff;

    box-shadow:
      inset 3px 0 0
      var(--rv-accent),
      0 2px 6px
      rgb(30 43 53 / 4%);
  }
}


/* ---------- Task layout on narrow screens ---------- */

@media (max-width: 760px) {
  #work-tasks-core-menu {
    gap: 0.55rem;

    padding: 0.6rem;
  }


  #work-tasks-core-menu > div {
    grid-template-columns: 1fr;

    gap: 0.55rem;
  }


  #work-tasks-core-menu
  > div
  > button {
    min-height: 50px;
  }
}

/* ==========================================================
   REVISOR UX/UI-4 UNIFIED PWA ACTIONS
   ========================================================== */


/* ---------- Compact application header ---------- */

.app-header {
  min-height: 62px;
  padding:
    0.42rem
    1rem;
}

.app-header img {
  max-height: 46px;
  width: auto;
}

.app-header button:not(.link-button) {
  min-height: 38px;
  padding:
    0.46rem
    0.78rem;
}

.app-header .status-pill,
.app-header .badge {
  min-height: 34px;
  padding:
    0.36rem
    0.7rem;
}


/* ---------- Working-screen headings ---------- */

.content-section
.section-heading {
  margin-bottom: 0.72rem;
}

.content-section
.section-heading h1 {
  font-size:
    clamp(
      1.8rem,
      2.3vw,
      2.2rem
    );

  line-height: 1.15;
}


/* Today may remain slightly more prominent. */

#section-today
.section-heading h1 {
  font-size:
    clamp(
      1.95rem,
      2.5vw,
      2.35rem
    );
}

#section-today
.panel {
  padding:
    0.86rem
    1rem;
}


/* ---------- Dynamic Core keyboard rows ---------- */

.rv-core-row {
  display: flex !important;

  flex-wrap: wrap;

  align-items: stretch;

  gap: 0.55rem;

  width: 100%;

  margin:
    0.45rem
    0;
}

.rv-core-row::before,
.rv-core-row::after {
  content: none !important;
  display: none !important;
}

.rv-core-row-hidden {
  display: none !important;
}


/* ---------- Core actions become normal PWA controls ---------- */

button.rv-core-action {
  flex:
    1
    1
    220px;

  width: auto;

  min-width: 0;
  min-height: 46px;

  margin: 0;

  padding:
    0.62rem
    0.82rem;

  border:
    1px solid
    var(--rv-border-strong) !important;

  border-radius:
    8px !important;

  color:
    #30414d !important;

  background:
    #ffffff !important;

  box-shadow:
    0 1px 5px
    rgb(30 43 53 / 3%)
    !important;

  font-family:
    "Segoe UI Variable",
    "Segoe UI",
    system-ui,
    sans-serif;

  font-size:
    0.91rem;

  font-weight:
    640;

  line-height:
    1.3;

  text-align:
    left;

  white-space:
    normal;

  overflow-wrap:
    anywhere;
}

button.rv-core-action:hover {
  border-color:
    #abbac4 !important;

  color:
    #213541 !important;

  background:
    #f8fafb !important;

  box-shadow:
    0 4px 12px
    rgb(30 43 53 / 5%)
    !important;
}


/* Main create actions */

button.rv-core-primary:not(:disabled) {
  border-color:
    var(--rv-primary) !important;

  color:
    #ffffff !important;

  background:
    linear-gradient(
      180deg,
      #426982,
      var(--rv-primary)
    ) !important;

  box-shadow:
    inset 0 -3px 0
    rgb(209 163 45 / 76%),
    0 4px 11px
    rgb(45 75 97 / 10%)
    !important;
}

button.rv-core-primary:not(:disabled):hover {
  border-color:
    var(--rv-primary-hover)
    !important;

  color:
    #ffffff !important;

  background:
    var(--rv-primary-hover)
    !important;
}


/* Reports: filter controls */

button.rv-core-filter {
  flex:
    0
    1
    220px;

  background:
    var(--rv-primary-soft)
    !important;

  color:
    #345267 !important;
}

button.rv-core-warning {
  border-color:
    #e2d4aa !important;

  color:
    #76591b !important;

  background:
    #fffaf0 !important;
}


/* Reports: calendar suggestion */

button.rv-core-featured {
  flex:
    1
    1
    100%;

  border-color:
    #d7cfb2 !important;

  color:
    #4b4636 !important;

  background:
    linear-gradient(
      180deg,
      #fffef9,
      #fbf7e9
    ) !important;
}


/* Analytics initial quick-start controls */

button.rv-core-quickstart {
  flex:
    0
    1
    360px;

  min-height:
    42px;

  color:
    #304753 !important;

  background:
    #ffffff !important;
}


/* Core "Back" becomes navigation rather than a card */

button.rv-core-back {
  flex:
    0
    0
    auto;

  width:
    auto;

  min-height:
    34px;

  padding:
    0.3rem
    0.22rem;

  border-color:
    transparent !important;

  color:
    #697983 !important;

  background:
    transparent !important;

  box-shadow:
    none !important;
}

button.rv-core-back:hover {
  border-color:
    transparent !important;

  color:
    var(--rv-primary) !important;

  background:
    transparent !important;

  box-shadow:
    none !important;
}


/* Search already has permanent PWA navigation. */

.rv-core-hidden,
.rv-core-selection-prompt {
  display:
    none !important;
}


/* ---------- Tasks final hierarchy ---------- */

#work-tasks-core-create:not(:disabled) {
  border-color:
    var(--rv-primary) !important;

  color:
    #ffffff !important;

  background:
    linear-gradient(
      180deg,
      #426982,
      var(--rv-primary)
    ) !important;

  box-shadow:
    inset 0 -3px 0
    rgb(209 163 45 / 76%),
    0 4px 11px
    rgb(45 75 97 / 10%)
    !important;
}

#work-tasks-core-back {
  min-height:
    34px !important;

  border-color:
    transparent !important;

  color:
    #697983 !important;

  background:
    transparent !important;

  box-shadow:
    none !important;
}


/* ---------- More ---------- */

#more-menu-actions {
  gap:
    0.65rem;
}

#more-menu-actions
.more-menu-button {
  min-height:
    48px;
}


/* ---------- Slightly denser work forms ---------- */

#section-clients .panel,
#section-reports .panel,
#section-analytics .panel,
#section-search .panel {
  padding:
    0.9rem
    1rem;
}


/* ---------- Mobile ---------- */

@media (max-width: 760px) {
  .app-header {
    min-height:
      56px;

    padding:
      0.35rem
      0.55rem;
  }

  .content-section
  .section-heading h1 {
    font-size:
      1.7rem;
  }

  #section-today
  .section-heading h1 {
    font-size:
      1.8rem;
  }

  .rv-core-row {
    gap:
      0.45rem;
  }

  button.rv-core-action,
  button.rv-core-filter,
  button.rv-core-quickstart {
    flex:
      1
      1
      100%;

    width:
      100%;
  }

  button.rv-core-back {
    width:
      auto;
  }
}

/* ==========================================================
   REVISOR UX/UI-5 SPACING RHYTHM

   Base rhythm:
   4px micro
   8px compact
   12px related controls
   16px component separation
   24px semantic block separation
   ========================================================== */


/* ---------- Desktop application proportions ---------- */

@media (min-width: 980px) {
  .app-body {
    grid-template-columns:
      228px
      minmax(0, 1fr);
  }

  .app-nav {
    padding:
      0.7rem
      0.55rem;

    gap:
      0.16rem;
  }

  .app-nav .nav-button {
    min-height:
      40px;

    padding:
      0.46rem
      0.62rem;
  }

  .content-area {
    padding:
      0.9rem
      1.2rem
      3rem;
  }
}


/* ---------- Section rhythm ---------- */

.content-section
.section-heading {
  margin-bottom:
    0.75rem;
}

.content-section
.section-heading h1 {
  margin:
    0;
}

.content-section
.section-heading
.eyebrow {
  margin-bottom:
    0.3rem;
}


/* ---------- Panels ---------- */

.content-section
.panel {
  margin-bottom:
    1rem;
}

.content-section
.panel:last-child {
  margin-bottom:
    0;
}

.card-grid,
.two-columns {
  gap:
    0.85rem;
}


/* ---------- More ---------- */

#section-more
.section-heading {
  margin-bottom:
    0.85rem;
}

#section-more
.panel {
  padding:
    0.85rem;
}

#more-menu-actions {
  gap:
    0.7rem;
}

#more-menu-actions
.more-menu-button {
  min-height:
    46px;
}


/* ---------- Core intro / controls ---------- */

.rv-core-row {
  margin:
    0.4rem
    0;

  gap:
    0.55rem;
}

.rv-core-row
+ .rv-core-row {
  margin-top:
    0.5rem;
}


/* ---------- Native work forms ---------- */

#section-clients form,
#section-reports form,
#section-analytics form,
#section-search form {
  gap:
    0.75rem;
}

#section-clients .empty-state,
#section-reports .empty-state,
#section-analytics .empty-state,
#section-search .empty-state {
  margin-top:
    0.8rem;
}


/* ---------- Tasks ---------- */

#work-tasks-core-screen-text {
  margin-bottom:
    0.85rem;
}

#work-tasks-core-menu {
  margin-top:
    0.75rem;

  gap:
    0.55rem;
}

#work-tasks-core-menu
> div {
  gap:
    0.55rem;
}


/* ---------- Today ---------- */

#section-today
.section-heading {
  margin-bottom:
    0.7rem;
}

#section-today
.panel {
  margin-bottom:
    0.85rem;

  padding:
    0.85rem
    0.95rem;
}


/* ---------- Mobile ---------- */

@media (max-width: 760px) {
  .content-area {
    padding:
      0.75rem
      0.65rem
      calc(
        3rem
        + env(
          safe-area-inset-bottom
        )
      );
  }

  .content-section
  .panel {
    margin-bottom:
      0.75rem;
  }

  #more-menu-actions {
    gap:
      0.55rem;
  }
}

/* ==========================================================
   REVISOR UX/UI-6 RESPONSIVE WORKFLOW R3.2
   ========================================================== */

.rv-responsive-workflow-panel[hidden],
.rv-responsive-workflow-backdrop[hidden] {
  display: none !important;
}


[data-core-flow-enabled="true"]
> .rv-responsive-workflow-panel.rv-responsive-workflow-panel-active {
  display: block !important;
}


.rv-responsive-workflow-backdrop {
  position: fixed;
  z-index: 430;
  inset: 0;

  background:
    rgb(29 43 52 / 22%);

  backdrop-filter:
    blur(1px);
}


.rv-responsive-workflow-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;

  margin:
    0
    0
    0.8rem;

  padding:
    0
    0
    0.65rem;

  border-bottom:
    1px solid #e1e6ea;
}


.rv-responsive-workflow-back {
  min-height: 34px;

  margin: 0;

  padding:
    0.28rem
    0.16rem;

  border: 0 !important;

  color:
    #667983 !important;

  background:
    transparent !important;

  box-shadow:
    none !important;

  font-size: 0.9rem;
  font-weight: 640;

  cursor: pointer;
}


.rv-responsive-workflow-back:hover {
  color:
    var(--rv-primary) !important;

  background:
    transparent !important;

  box-shadow:
    none !important;
}


.rv-responsive-workflow-panel
> h2 {
  margin-top: 0;
  margin-bottom: 0.8rem;

  font-size: 1.22rem;
  line-height: 1.25;
}


.rv-responsive-workflow-panel
form {
  gap: 0.75rem;
}


.rv-responsive-workflow-panel
button[type="submit"] {
  min-height: 44px;
}


/* Desktop */

@media (min-width: 761px) {
  body.rv-responsive-workflow-open {
    overflow: hidden;
  }


  .rv-responsive-workflow-panel-active {
    display: block !important;

    position: fixed;

    z-index: 440;

    top: 74px;
    right: 18px;
    bottom: 18px;

    width:
      min(
        520px,
        calc(
          100vw
          - 285px
        )
      );

    max-width: 520px;

    margin: 0 !important;

    padding:
      1rem
      1.05rem
      1.15rem !important;

    overflow-y: auto;

    overscroll-behavior:
      contain;

    border:
      1px solid #d8e0e5 !important;

    border-radius:
      12px !important;

    background:
      #ffffff !important;

    box-shadow:
      0 20px 54px
      rgb(24 40 52 / 18%) !important;
  }


  .rv-responsive-workflow-panel-active
  button[type="submit"] {
    width: 100%;
  }
}


/* Mobile */

@media (max-width: 760px) {
  body.rv-responsive-workflow-open {
    overflow: hidden;
  }


  .rv-responsive-workflow-backdrop {
    display: none !important;
  }


  .rv-responsive-workflow-panel-active {
    display: block !important;

    position: fixed;

    z-index: 520;

    inset: 0;

    width: 100%;
    max-width: none;

    height: 100dvh;
    max-height: none;

    margin: 0 !important;

    padding:
      calc(
        0.75rem
        + env(
          safe-area-inset-top
        )
      )
      0.8rem
      calc(
        1rem
        + env(
          safe-area-inset-bottom
        )
      )
      !important;

    overflow-y: auto;

    overscroll-behavior:
      contain;

    border: 0 !important;
    border-radius: 0 !important;

    background:
      #ffffff !important;

    box-shadow:
      none !important;
  }


  .rv-responsive-workflow-nav {
    position: sticky;
    z-index: 2;

    top:
      calc(
        -0.75rem
        - env(
          safe-area-inset-top
        )
      );

    margin:
      -0.1rem
      0
      0.75rem;

    padding:
      calc(
        0.55rem
        + env(
          safe-area-inset-top
        )
      )
      0
      0.65rem;

    background:
      #ffffff;
  }


  .rv-responsive-workflow-panel-active
  form,
  .rv-responsive-workflow-panel-active
  button[type="submit"] {
    width: 100%;
  }
}

/* ==========================================================
   REVISOR UX/UI-6 R3 FINAL PWA PRESENTATION
   PWA visual layer only.
   ========================================================== */


/* ----- Client card ----- */

[data-core-flow-host="clients"].rv-client-card-mode {
  display: grid !important;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(260px, 310px) !important;
  gap: 18px !important;
  align-items: start !important;
}

[data-core-flow-host="clients"].rv-client-card-mode
> .rv-client-card-summary {
  grid-column: 1 !important;
  display: grid !important;
  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    ) !important;
  gap: 12px !important;
  min-width: 0 !important;
}

[data-core-flow-host="clients"].rv-client-card-mode
.rv-client-card-block {
  margin: 0 !important;
  padding: 15px 16px !important;
  border:
    1px solid
    rgba(23, 32, 51, 0.12) !important;
  border-radius: 13px !important;
  background: #ffffff !important;
  box-shadow:
    0 3px 12px
    rgba(23, 32, 51, 0.04) !important;
  line-height: 1.6 !important;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
}

[data-core-flow-host="clients"].rv-client-card-mode
.rv-client-card-title {
  grid-column: 1 / -1 !important;
  padding: 17px 18px !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  background:
    linear-gradient(
      180deg,
      #ffffff,
      #f8fafc
    ) !important;
}

[data-core-flow-host="clients"].rv-client-card-mode
.rv-client-card-profile,
[data-core-flow-host="clients"].rv-client-card-mode
.rv-client-card-tasks {
  min-width: 0 !important;
}

[data-core-flow-host="clients"].rv-client-card-mode
.rv-client-card-notice {
  grid-column: 1 / -1 !important;
}

[data-core-flow-host="clients"].rv-client-card-mode
> .core-flow-keyboard {
  grid-column: 2 !important;
  position: sticky !important;
  top: 12px !important;
  display: grid !important;
  gap: 9px !important;
  padding: 14px !important;
  border:
    1px solid
    rgba(23, 32, 51, 0.12) !important;
  border-radius: 13px !important;
  background: #f7f9fb !important;
}

[data-core-flow-host="clients"].rv-client-card-mode
> .rv-client-context-header {
  grid-column: 1 / -1 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  gap: 8px 18px !important;
  padding: 14px 16px !important;
  border: 1px solid rgba(23, 32, 51, 0.12) !important;
  border-radius: 13px !important;
  background: #f8fafc !important;
}

[data-core-flow-host="clients"].rv-client-card-mode
> .rv-client-context-header span {
  color: #637482 !important;
}

[data-core-flow-host="clients"].rv-client-detail-step
> .core-flow-screen-text {
  grid-column: 1 !important;
  min-height: 150px !important;
  margin: 0 !important;
  padding: 18px !important;
  border: 1px solid rgba(23, 32, 51, 0.12) !important;
  border-radius: 13px !important;
  background: #fff !important;
  white-space: pre-wrap !important;
}

.rv-client-actions-title {
  margin: 0 0 2px !important;
  font-size: 1rem !important;
}

[data-core-flow-host="clients"].rv-client-card-mode
> .core-flow-keyboard
.core-flow-keyboard-row {
  display: grid !important;
  grid-template-columns:
    minmax(0, 1fr) !important;
  gap: 8px !important;
  width: 100% !important;
}

[data-core-flow-host="clients"].rv-client-card-mode
button.rv-core-action {
  width: 100% !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding:
    0.7rem
    0.85rem !important;
  border-radius: 10px !important;
  text-align: left !important;
}


/* ----- Task wizard/action buttons ----- */

#work-tasks-core-menu,
#work-tasks-core-wizard-actions,
#work-tasks-core-template-actions,
#work-tasks-core-recurring-actions,
#work-tasks-core-card-actions {
  display: grid !important;
  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    ) !important;
  gap: 10px !important;
  align-items: stretch !important;
}

#work-tasks-core-menu > .work-toolbar,
#work-tasks-core-wizard-actions > .work-toolbar,
#work-tasks-core-template-actions > .work-toolbar,
#work-tasks-core-recurring-actions > .work-toolbar,
#work-tasks-core-card-actions > .work-toolbar {
  display: contents !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#work-tasks-core-menu button,
#work-tasks-core-wizard-actions button,
#work-tasks-core-template-actions button,
#work-tasks-core-recurring-actions button,
#work-tasks-core-card-actions button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 46px !important;
  margin: 0 !important;
  padding:
    0.72rem
    0.9rem !important;
  border:
    1px solid
    rgba(23, 32, 51, 0.15) !important;
  border-radius: 11px !important;
  color: #30414d !important;
  background: #ffffff !important;
  box-shadow:
    0 2px 7px
    rgba(23, 32, 51, 0.04) !important;
  font-weight: 650 !important;
  line-height: 1.3 !important;
  text-align: left !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

#work-tasks-core-menu button:hover,
#work-tasks-core-wizard-actions button:hover,
#work-tasks-core-template-actions button:hover,
#work-tasks-core-recurring-actions button:hover,
#work-tasks-core-card-actions button:hover {
  border-color:
    rgba(
      23,
      32,
      51,
      0.30
    ) !important;
  background: #f8fafb !important;
}

#work-tasks-core-wizard-input-form:not([hidden]):not(.hidden) {
  display: grid !important;
  grid-template-columns:
    minmax(0, 1fr)
    auto !important;
  gap: 10px !important;
  align-items: end !important;
}

#work-tasks-core-wizard-submit:not([hidden]):not(.hidden) {
  min-width: 118px !important;
  min-height: 46px !important;
  padding:
    0.72rem
    1.1rem !important;
  border:
    1px solid
    #31556d !important;
  border-radius: 11px !important;
  color: #ffffff !important;
  background: #31556d !important;
  font-weight: 700 !important;
}


/* ----- Today ----- */

#work-today-summary,
#work-today-do-now {
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 16px !important;
  border:
    1px solid
    rgba(23, 32, 51, 0.12) !important;
  border-radius: 13px !important;
  background: #ffffff !important;
  line-height: 1.65 !important;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
}

#work-today-do-now-flow {
  margin-top: 14px !important;
  border:
    1px solid
    rgba(23, 32, 51, 0.12) !important;
  border-radius: 13px !important;
  background: #f8fafb !important;
  overflow: hidden !important;
}

#work-today-do-now-flow > summary {
  padding: 13px 16px !important;
  cursor: pointer !important;
  font-weight: 700 !important;
}

#work-today-do-now-flow
#work-today-do-now {
  border: 0 !important;
  border-top:
    1px solid
    rgba(23, 32, 51, 0.10) !important;
  border-radius: 0 !important;
}


/* ----- Responsive ----- */

@media (max-width: 760px) {
  [data-core-flow-host="clients"].rv-client-card-mode {
    grid-template-columns:
      minmax(0, 1fr) !important;
  }

  [data-core-flow-host="clients"].rv-client-card-mode
  > .rv-client-card-summary {
    grid-column: 1 !important;
    grid-template-columns:
      minmax(0, 1fr) !important;
  }

  [data-core-flow-host="clients"].rv-client-card-mode
  > .core-flow-keyboard {
    grid-column: 1 !important;
    position: static !important;
  }

  #work-tasks-core-menu,
  #work-tasks-core-wizard-actions,
  #work-tasks-core-template-actions,
  #work-tasks-core-recurring-actions,
  #work-tasks-core-card-actions {
    grid-template-columns:
      minmax(0, 1fr) !important;
  }

  #work-tasks-core-wizard-input-form:not([hidden]):not(.hidden) {
    grid-template-columns:
      minmax(0, 1fr) !important;
  }

  #work-tasks-core-wizard-submit:not([hidden]):not(.hidden) {
    width: 100% !important;
  }
}

/* ==========================================================
   REVISOR UX/UI-6 R3-R1.1 TASK VISIBILITY GUARD

   R3 presentation uses display:grid !important for visible
   task action groups. Hidden Core states must always win.
   ========================================================== */

#work-tasks-core-menu[hidden],
#work-tasks-core-menu.hidden,

#work-tasks-core-wizard-actions[hidden],
#work-tasks-core-wizard-actions.hidden,

#work-tasks-core-template-actions[hidden],
#work-tasks-core-template-actions.hidden,

#work-tasks-core-recurring-actions[hidden],
#work-tasks-core-recurring-actions.hidden,

#work-tasks-core-card-actions[hidden],
#work-tasks-core-card-actions.hidden {
  display: none !important;
}


/* ==========================================================
   REVISOR R3-R2A-R1-RETRY
   ANALYTICS WEB DASHBOARD + TASK HARD GUARD
   ========================================================== */


/*
 * Analytics already has a dedicated PWA API and native web
 * section. Hide only the duplicate messenger/Core surface.
 */
#section-analytics.rv-analytics-web
> [data-core-flow-host="analytics"] {
  display: none !important;
}


/*
 * Core Flow normally hides native children. Analytics is the
 * desktop exception because its web presentation is richer.
 */
#section-analytics.rv-analytics-web[
  data-core-flow-enabled="true"
]
> :not(
  [data-core-flow-host="analytics"]
) {
  display: revert !important;
}

#section-analytics.rv-analytics-web
> .section-heading {
  display: flex !important;
  align-items: flex-start;
  gap: 1rem;
}

#section-analytics.rv-analytics-web
> .panel {
  display: block !important;
}

#section-analytics.rv-analytics-web
> .two-columns,
#section-analytics.rv-analytics-web
> .analytics-kpi-grid {
  display: grid !important;
}


/* ---------- Analytics header ---------- */

#section-analytics
.section-heading {
  align-items: flex-start;
}

.analytics-period-badge {
  margin-left: auto;
  padding:
    0.48rem
    0.8rem;
  border:
    1px solid
    #d7e0e5;
  border-radius:
    999px;
  background:
    #ffffff;
  color:
    #5a6d79;
  font-size:
    0.86rem;
  font-weight:
    700;
  white-space:
    nowrap;
}


/* ---------- Period filter ---------- */

#section-analytics
> .panel:first-of-type {
  padding:
    0.95rem
    1rem;
}

#section-analytics
.parity-analytics-form {
  display: grid;
  grid-template-columns:
    minmax(150px, 1.2fr)
    minmax(100px, 0.65fr)
    minmax(100px, 0.65fr)
    minmax(130px, 0.8fr);
  gap:
    0.75rem;
  align-items:
    end;
}


/* ---------- KPI ---------- */

.analytics-kpi-grid {
  grid-template-columns:
    repeat(
      4,
      minmax(0, 1fr)
    );
  gap:
    0.8rem;
}

.analytics-kpi-card {
  min-width:
    0;
  padding:
    1rem
    1.05rem !important;
}

.analytics-kpi-icon {
  display:
    block;
  margin-bottom:
    0.45rem;
  font-size:
    1.15rem;
}

.analytics-kpi-value {
  display:
    block;
  color:
    #213c4d;
  font-size:
    clamp(
      1.45rem,
      2.1vw,
      2rem
    );
  font-weight:
    800;
  line-height:
    1.1;
  overflow-wrap:
    anywhere;
}

.analytics-kpi-label {
  display:
    block;
  margin-top:
    0.45rem;
  color:
    #71818c;
  font-size:
    0.86rem;
  font-weight:
    600;
}


/* ---------- Detail grid ---------- */

#section-analytics
.analytics-insight-grid {
  grid-template-columns:
    repeat(
      3,
      minmax(0, 1fr)
    ) !important;
  gap:
    0.8rem;
  align-items:
    stretch;
}

#section-analytics
.analytics-insight-grid
> .panel {
  min-width:
    0;
  padding:
    1rem !important;
}

#section-analytics
.analytics-summary-card {
  grid-column:
    1 / -1;
  order:
    10;
}

#section-analytics
.analytics-clean-pre {
  min-height:
    0 !important;
  margin:
    0;
  padding:
    0 !important;
  border:
    0 !important;
  background:
    transparent !important;
  font-family:
    inherit !important;
  font-size:
    0.9rem;
  line-height:
    1.6;
  white-space:
    pre-wrap;
  overflow-wrap:
    anywhere;
}

#section-analytics
.analytics-insight-grid
h2 {
  margin-bottom:
    0.65rem;
}


/* ---------- Task card hard guard ---------- */

#work-tasks-core-menu[hidden],
#work-tasks-core-menu.hidden {
  display:
    none !important;
}

/*
 * PACKAGE 22L-10B66-AN-R57-R27
 *
 * Root menu visibility is controlled explicitly by Core through
 * the hidden attribute and .hidden class.
 *
 * Do not infer root visibility from descendant/card action state:
 * stale/transitional card-action visibility can otherwise hide the
 * entire Tasks root menu, including "➕ Новая задача".
 */


/* ---------- Responsive ---------- */

@media (max-width: 1050px) {
  .analytics-kpi-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      ) !important;
  }

  #section-analytics
  .analytics-insight-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      ) !important;
  }

  #section-analytics
  .analytics-summary-card {
    grid-column:
      1 / -1;
  }
}

@media (max-width: 760px) {
  #section-analytics
  .section-heading {
    flex-direction:
      column;
  }

  .analytics-period-badge {
    margin-left:
      0;
  }

  #section-analytics
  .parity-analytics-form,
  .analytics-kpi-grid,
  #section-analytics
  .analytics-insight-grid {
    grid-template-columns:
      minmax(0, 1fr) !important;
  }

  #section-analytics
  .analytics-summary-card {
    grid-column:
      auto;
  }
}


/* ==========================================================
   REVISOR R3-R2A-R2
   CLIENT ANALYTICS + DESKTOP OPEN CLIENT REMOVAL
   ========================================================== */


/* ---------- Desktop client root ---------- */

/*
 * PACKAGE21 A8-R5
 * Canonical number-entry client opening is available on
 * desktop and mobile.
 */
@media (min-width: 761px) {
  #section-clients
  [data-core-flow-host="clients"]
  button[data-core-flow-value="🔍 Открыть клиента"] {
    display: inline-flex !important;
  }
}


/* ---------- Per-client analytics ---------- */

#section-analytics.rv-analytics-web
> .analytics-client-analysis {
  display: block !important;
}

.analytics-client-analysis {
  min-width: 0;
  padding:
    1rem !important;
}

.analytics-client-analysis-heading {
  display: flex;
  justify-content:
    space-between;
  align-items:
    flex-start;
  gap:
    1rem;
  margin-bottom:
    0.8rem;
}

.analytics-client-analysis-heading h2 {
  margin:
    0;
  font-size:
    1.05rem;
}

.analytics-client-analysis-heading p {
  max-width:
    720px;
  margin:
    0;
  line-height:
    1.5;
}

.analytics-client-table-wrap {
  width:
    100%;
  overflow-x:
    auto;
  border:
    1px solid #e0e6ea;
  border-radius:
    12px;
  background:
    #ffffff;
}

.analytics-client-table-wrap.is-loading {
  opacity:
    0.65;
}

.analytics-client-table {
  width:
    100%;
  min-width:
    930px;
  border-collapse:
    collapse;
}

.analytics-client-table th,
.analytics-client-table td {
  padding:
    0.78rem
    0.75rem;
  border-bottom:
    1px solid #e8edf0;
  text-align:
    left;
  vertical-align:
    middle;
}

.analytics-client-table th {
  background:
    #f7f9fa;
  color:
    #657681;
  font-size:
    0.76rem;
  font-weight:
    800;
  letter-spacing:
    0.025em;
  text-transform:
    uppercase;
  white-space:
    nowrap;
}

.analytics-client-table td {
  color:
    #344b59;
  font-size:
    0.9rem;
  line-height:
    1.45;
}

.analytics-client-table
tbody
tr:last-child
td {
  border-bottom:
    0;
}

.analytics-client-table
tbody
tr:hover {
  background:
    #fafbfc;
}

.analytics-client-name {
  color:
    #203947 !important;
  font-weight:
    750;
  white-space:
    nowrap;
}

.analytics-client-money,
.analytics-client-rate {
  font-weight:
    700;
  white-space:
    nowrap;
}

.analytics-client-empty {
  padding:
    1.2rem;
  color:
    #71818c;
  text-align:
    center;
}

@media (max-width: 760px) {
  .analytics-client-analysis-heading {
    flex-direction:
      column;
  }
}


/* =========================================================
   PACKAGE21 CONSOLIDATED FIXES
   ========================================================= */

/* Active top navigation must always remain readable. */
.nav-button.active,
.nav-button.active:hover,
.nav-button.active:focus,
.nav-button.active:focus-visible {
  color: #ffffff !important;
  background: var(--primary) !important;
}

/*
 * Keep the canonical "Открыть клиента" action available on
 * desktop as well as mobile. Opening is number-entry only.
 */
@media (min-width: 761px) {
  button[data-core-flow-value="🔍 Открыть клиента"] {
    display: inline-flex !important;
  }
}

/* Mobile Analytics must never widen or visually shrink page. */
#section-analytics,
#section-analytics .panel,
#section-analytics .compact-form,
#section-analytics .work-pre,
#section-analytics [id^="parity-analytics-"] {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}

#section-analytics .work-pre {
  overflow-x: auto;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

@media (max-width: 760px) {
  #section-analytics {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  #section-analytics .parity-analytics-form {
    grid-template-columns: minmax(0, 1fr);
  }

  #section-analytics input,
  #section-analytics select,
  #section-analytics button {
    max-width: 100%;
  }
}

/* Reports use desktop width efficiently; mobile stays 1 column. */
#section-reports {
  width: 100%;
  min-width: 0;
  max-width: none;
}

#section-reports .work-item,
#section-reports .panel {
  min-width: 0;
}

@media (min-width: 1100px) {
  #section-reports #work-reports-list {
    grid-template-columns:
      repeat(
        auto-fit,
        minmax(min(100%, 420px), 1fr)
      );
    align-items: start;
  }

  #section-reports .work-item-actions {
    align-items: center;
  }
}

/* Direct entity cards remain keyboard-visible and clickable. */
.work-task-card,
.work-report-card,
.work-client-card {
  cursor: pointer;
}

.work-task-card:focus-visible,
.work-report-card:focus-visible,
.work-client-card:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.support-bonus-panel p:last-child {
  margin-bottom: 0;
}


/* =========================================================
   PACKAGE21 PUSH ENROLLMENT
   ========================================================= */

.today-push-notification-panel {
  border-left:
    4px solid
    var(--warning, #d99100);
}

.today-push-notification-panel[hidden] {
  display: none !important;
}

.today-push-notification-title {
  margin:
    0
    0
    10px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.today-push-notification-panel .button-row {
  margin-top: 12px;
}

@media (max-width: 760px) {
  .today-push-notification-panel {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  #today-push-toggle-button {
    width: 100%;
  }
}

/* =========================================================
   PACKAGE21 A8-R2
   NUMBER-ONLY OPEN + MOBILE ANALYTICS + REPORT READABILITY
   ========================================================= */

/*
 * Entity summaries are informational.
 * Opening a task/client/report is performed only through
 * the canonical number-entry flow.
 */
.work-task-card,
.work-client-card,
.work-report-card {
  cursor: default !important;
}


/* ---------------------------------------------------------
   Mobile analytics

   Desktop keeps the real table.
   On narrow screens each tbody row becomes a vertical
   client card. This avoids shrinking a 930px table.
   --------------------------------------------------------- */

@media (max-width: 760px) {
  .analytics-client-table-wrap {
    overflow:
      visible;
    border:
      0;
    border-radius:
      0;
    background:
      transparent;
  }

  .analytics-client-table {
    display:
      block;
    width:
      100%;
    min-width:
      0;
  }

  .analytics-client-table thead {
    display:
      none;
  }

  .analytics-client-table tbody {
    display:
      grid;
    grid-template-columns:
      minmax(0, 1fr);
    gap:
      12px;
    width:
      100%;
  }

  .analytics-client-table tbody tr {
    display:
      grid;
    grid-template-columns:
      minmax(0, 1fr);
    width:
      100%;
    min-width:
      0;
    overflow:
      hidden;
    border:
      1px solid #e0e6ea;
    border-radius:
      12px;
    background:
      #ffffff;
  }

  .analytics-client-table tbody tr:hover {
    background:
      #ffffff;
  }

  .analytics-client-table tbody td {
    display:
      grid;
    grid-template-columns:
      minmax(92px, 38%)
      minmax(0, 1fr);
    gap:
      10px;
    width:
      100%;
    min-width:
      0;
    box-sizing:
      border-box;
    padding:
      10px
      12px;
    border-bottom:
      1px solid #edf1f3;
    font-size:
      0.95rem;
    line-height:
      1.4;
    white-space:
      normal;
    overflow-wrap:
      anywhere;
  }

  .analytics-client-table
  tbody
  tr
  td:last-child {
    border-bottom:
      0;
  }

  .analytics-client-table
  tbody
  td::before {
    min-width:
      0;
    color:
      #71818c;
    font-size:
      0.72rem;
    font-weight:
      800;
    line-height:
      1.3;
    letter-spacing:
      0.025em;
    text-transform:
      uppercase;
  }

  .analytics-client-table
  tbody
  td:nth-child(1)::before {
    content:
      "Клиент";
  }

  .analytics-client-table
  tbody
  td:nth-child(2)::before {
    content:
      "Профиль";
  }

  .analytics-client-table
  tbody
  td:nth-child(3)::before {
    content:
      "Оплата";
  }

  .analytics-client-table
  tbody
  td:nth-child(4)::before {
    content:
      "Время";
  }

  .analytics-client-table
  tbody
  td:nth-child(5)::before {
    content:
      "Доход";
  }

  .analytics-client-table
  tbody
  td:nth-child(6)::before {
    content:
      "Стоимость часа";
  }

  .analytics-client-name,
  .analytics-client-money,
  .analytics-client-rate {
    white-space:
      normal;
  }
}


/* ---------------------------------------------------------
   Reports

   Do not build a wide/two-column direct-open wall.
   Report summaries remain separated and readable.
   --------------------------------------------------------- */

#section-reports {
  width:
    100%;
  min-width:
    0;
}

#section-reports
> #work-reports-list {
  display:
    grid;
  grid-template-columns:
    minmax(0, 1fr) !important;
  gap:
    14px;
  width:
    100%;
  min-width:
    0;
}

#section-reports
.work-report-card {
  min-width:
    0;
  padding:
    16px;
  border-left:
    3px solid
    var(--primary);
}

#section-reports
.work-report-card
+ .work-report-card {
  margin-top:
    0;
}

@media (max-width: 760px) {
  #section-reports
  .work-report-card {
    padding:
      13px;
  }
}


/* =========================================================
   PACKAGE21 A8-R5
   CANONICAL NUMBER-ONLY CLIENT / REPORT UI
   ========================================================= */

/*
 * Native client/report card lists duplicate the canonical
 * Core Flow and create a second, confusing open model.
 *
 * Keep the data and renderers intact, but do not present the
 * duplicate card walls to the user.
 */
#section-clients > #work-clients-list,
#section-reports > #work-reports-list {
  display: none !important;
}


/*
 * Client/report number entry must be comfortable on desktop
 * and mobile.
 */
#section-clients .core-flow-input-form,
#section-reports .core-flow-input-form {
  width: min(100%, 620px);
  grid-template-columns:
    minmax(0, 1fr)
    auto;
  gap: 10px;
}

#section-clients .core-flow-input,
#section-reports .core-flow-input {
  min-width: 0;
  font-size: 1rem;
}

@media (max-width: 760px) {
  #section-clients .core-flow-input-form,
  #section-reports .core-flow-input-form {
    width: 100%;
  }
}


/* =========================================================
   PACKAGE21 A8-R6-R2
   VISIBLE NUMBER INPUT + READABLE CORE LISTS
   ========================================================= */

/*
 * Number-entry workflow ordering:
 *
 * 1. readable list / prompt
 * 2. number field + Open
 * 3. canonical messenger actions
 */
[data-core-flow-host].rv-core-number-input-mode
> .core-flow-screen-text {
  order: 1;
}

[data-core-flow-host].rv-core-number-input-mode
> .core-flow-input-form {
  order: 2;
}

[data-core-flow-host].rv-core-number-input-mode
> .core-flow-keyboard {
  order: 3;
}


/*
 * Never let the generic root-menu polishing layer suppress
 * an actual client/report number-entry workflow.
 */
[data-core-flow-host].rv-core-number-input-mode
> .core-flow-input-form {
  display: grid !important;
  visibility: visible !important;
  width: min(100%, 720px);
  grid-template-columns:
    minmax(0, 1fr)
    auto;
  gap: 10px;
}

[data-core-flow-host].rv-core-number-input-mode
> .core-flow-input-form[hidden] {
  display: grid !important;
}

[data-core-flow-host].rv-core-number-input-mode
.core-flow-input {
  display: block !important;
  visibility: visible !important;
  min-width: 0;
  min-height: 48px;
  font-size: 16px;
}

[data-core-flow-host].rv-core-number-input-mode
.core-flow-submit-button {
  display: inline-flex !important;
  visibility: visible !important;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  min-height: 48px;
  font-weight: 700;
}


/* ---------- Readable numbered Core lists ---------- */

.rv-core-readable-numbered-screen {
  display: grid;
  gap: 10px;
  width: min(100%, 980px);
  max-width: 100%;
  white-space: normal !important;
}

.rv-core-readable-numbered-list {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr);
  gap: 8px;
  width: 100%;
}

.rv-core-readable-numbered-item {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  border: 1px solid rgba(23, 32, 51, 0.12);
  border-left: 4px solid var(--primary);
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  cursor: default;
}

.rv-core-readable-text-block {
  max-width: 100%;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.rv-core-readable-title {
  margin-bottom: 2px;
  font-size: 1.05rem;
  font-weight: 750;
}

.rv-core-readable-instruction {
  margin-top: 4px;
  font-weight: 700;
}

.rv-core-readable-example {
  color: var(--muted);
  font-size: 0.92rem;
}


@media (max-width: 760px) {
  [data-core-flow-host].rv-core-number-input-mode
  > .core-flow-input-form {
    width: 100%;
    grid-template-columns:
      minmax(0, 1fr);
  }

  [data-core-flow-host].rv-core-number-input-mode
  .core-flow-submit-button {
    width: 100%;
  }

  .rv-core-readable-numbered-item {
    padding: 10px 12px;
    font-size: 15px;
  }
}


/* =========================================================
   PACKAGE21 A8-R7
   CLICKABLE NUMBERED ROWS + REPORT CARD VISUAL PARITY
   ========================================================= */


/* ---------- Entire numbered row is the navigation control ---------- */

.rv-core-readable-numbered-item-action {
  cursor: pointer;
  user-select: none;
  transition:
    transform 120ms ease,
    border-color 120ms ease,
    box-shadow 120ms ease,
    background 120ms ease;
}

.rv-core-readable-numbered-item-action:hover {
  border-color: rgba(49, 96, 122, 0.38);
  background: #f8fbfd;
  box-shadow:
    0 3px 12px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.rv-core-readable-numbered-item-action:active {
  transform: translateY(0);
}

.rv-core-readable-numbered-item-action:focus-visible {
  outline: 3px solid rgba(49, 96, 122, 0.24);
  outline-offset: 2px;
  border-color: var(--primary);
}


/*
 * Dedicated Task Core uses spans inside its existing screen.
 * Keep exactly the same visual rows as clients/reports.
 */
.rv-task-readable-numbered-screen
.rv-core-readable-numbered-list {
  display: grid;
}

.rv-task-readable-numbered-screen
.rv-core-readable-numbered-item,
.rv-task-readable-numbered-screen
.rv-core-readable-text-block {
  white-space: normal;
}


/* ---------- Report card presentation ---------- */

[data-core-flow-host].rv-report-card-mode {
  width: 100%;
  max-width: 1200px;
  gap: 18px;
}

[data-core-flow-host].rv-report-card-mode
> .rv-report-card-summary {
  width: min(100%, 980px);
  max-width: 100%;
}

.rv-report-card-summary {
  display: grid;
  gap: 0;
  white-space: normal !important;
}

.rv-report-card-title {
  margin-bottom: 14px;
  color: var(--text);
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-weight: 750;
  line-height: 1.35;
}

.rv-report-card-notice {
  width: fit-content;
  max-width: 100%;
  margin-bottom: 12px;
  padding: 9px 12px;
  border: 1px solid rgba(49, 96, 122, 0.16);
  border-radius: 10px;
  background: rgba(49, 96, 122, 0.06);
  line-height: 1.45;
}

.rv-report-card-field {
  display: grid;
  grid-template-columns:
    minmax(150px, 210px)
    minmax(0, 1fr);
  gap: 16px;
  width: 100%;
  padding: 8px 0;
  border-bottom: 1px solid rgba(23, 32, 51, 0.08);
  line-height: 1.5;
}

.rv-report-card-field:last-child {
  border-bottom: 0;
}

.rv-report-card-field-label {
  color: var(--muted);
  font-weight: 650;
}

.rv-report-card-field-value {
  min-width: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.rv-report-card-text {
  padding: 6px 0;
  line-height: 1.5;
}


/*
 * Match the successful task-card action geometry:
 * two balanced columns on desktop, one on mobile.
 */
[data-core-flow-host].rv-report-card-mode
> .core-flow-keyboard {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 1200px;
}

[data-core-flow-host].rv-report-card-mode
> .core-flow-keyboard
> .core-flow-keyboard-row {
  display: contents;
}

[data-core-flow-host].rv-report-card-mode
.core-flow-keyboard-button {
  width: 100%;
  min-height: 54px;
  padding: 12px 16px;
  justify-content: flex-start;
  text-align: left;
  font-size: 1rem;
  font-weight: 700;
}


/*
 * While an individual report is open, the old generic
 * reports heading/filter is redundant and visually competes
 * with the card.
 */
#section-reports.rv-report-card-active
.section-heading {
  display: none !important;
}


@media (max-width: 760px) {
  [data-core-flow-host].rv-report-card-mode
  > .core-flow-keyboard {
    grid-template-columns:
      minmax(0, 1fr);
  }

  .rv-report-card-field {
    grid-template-columns:
      minmax(0, 1fr);
    gap: 3px;
    padding: 10px 0;
  }

  .rv-report-card-field-label {
    font-size: 0.86rem;
  }

  [data-core-flow-host].rv-report-card-mode
  .core-flow-keyboard-button {
    min-height: 50px;
  }
}


/* =========================================================
   PACKAGE21 A8-R7-R3-R1
   DEDICATED TASK CURRENT LIST
   ========================================================= */

.rv-task-current-interactive-screen
.rv-core-readable-numbered-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  width: 100%;
}

/*
 * PACKAGE21 A8-R7-R4-R2
 *
 * Task rows are real buttons. Override the global primary-button
 * rule with a selector specific to the current-task list.
 */
#work-tasks-core-screen-text button.rv-task-direct-number-row {
  appearance: none;
  display: block;
  width: 100%;
  min-height: 0;
  box-sizing: border-box;
  padding: 11px 14px;
  border: 1px solid rgba(23, 32, 51, 0.12);
  border-left: 4px solid var(--primary);
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
  box-shadow: none;
  font: inherit;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition:
    transform 120ms ease,
    border-color 120ms ease,
    box-shadow 120ms ease,
    background 120ms ease;
}

#work-tasks-core-screen-text button.rv-task-direct-number-row:hover {
  border-color: rgba(49, 96, 122, 0.38);
  border-left-color: var(--primary);
  background: #f7fafb;
  color: var(--text);
  box-shadow:
    0 3px 12px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

#work-tasks-core-screen-text button.rv-task-direct-number-row:active {
  transform: translateY(0);
}

#work-tasks-core-screen-text button.rv-task-direct-number-row:focus-visible {
  border-left-color: var(--primary);
  background: #ffffff;
  color: var(--text);
  outline: 3px solid rgb(47 101 127 / 22%);
  outline-offset: 2px;
}

#work-tasks-core-current-input-form:not([hidden]):not(.hidden) {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  width: min(100%, 720px);
  margin-top: 12px;
}

#work-tasks-core-current-number {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  box-sizing: border-box;
  font-size: 16px;
}

@media (max-width: 760px) {
  #work-tasks-core-current-input-form:not([hidden]):not(.hidden) {
    width: 100%;
  }
}


/*
 * PACKAGE21 A8-R8-R1 SEARCH CLICKABLE RESULTS
 *
 * Structured task/client/report groups are direct PWA card targets.
 */

#work-search-results.rv-search-results-readable {
  display: grid;
  gap: 8px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  font-family: inherit;
  overflow-wrap: anywhere;
}

#work-search-results .rv-search-result-text {
  display: block;
  min-width: 0;
  white-space: normal;
  font-family: inherit;
}

#work-search-results .rv-search-result-title {
  margin-bottom: 2px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

#work-search-results .rv-search-result-summary {
  margin-bottom: 4px;
  color: var(--muted);
}

#work-search-results .rv-search-result-section-title {
  margin-top: 8px;
  font-weight: 700;
  color: var(--text);
}

#work-search-results .rv-search-result-group {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

#work-search-results .rv-search-result-group h3 {
  margin: 0;
  font-size: 1rem;
}

#work-search-results button.rv-search-result-row {
  appearance: none;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 12px 14px;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
  box-shadow: none;
  font: inherit;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}

#work-search-results button.rv-search-result-row:hover {
  border-color: var(--border);
  border-left-color: var(--primary);
  background: #f7fafb;
  color: var(--text);
  box-shadow:
    0 3px 12px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

#work-search-results button.rv-search-result-row:active {
  transform: translateY(0);
}

#work-search-results button.rv-search-result-row:focus-visible {
  border-left-color: var(--primary);
  background: #ffffff;
  color: var(--text);
  outline: 3px solid rgb(47 101 127 / 22%);
  outline-offset: 2px;
}

#work-search-results button.rv-search-result-row strong,
#work-search-results button.rv-search-result-row span,
#work-search-results button.rv-search-result-row small {
  display: block;
}

#work-search-results button.rv-search-result-row span {
  margin-top: 3px;
}

#work-search-results button.rv-search-result-row small {
  margin-top: 4px;
  color: var(--muted);
}

#work-search-results .rv-search-result-more {
  margin-top: -2px;
  font-size: 0.92rem;
  color: var(--muted);
}

#work-search-results .rv-search-result-hint {
  margin-top: 8px;
  font-size: 0.92rem;
  color: var(--muted);
}

@media (max-width: 760px) {
  #work-search-results button.rv-search-result-row {
    min-height: 52px;
    padding: 12px;
  }
}


/* =========================================================
   PACKAGE21 A8-R9-R1 DO NOW PRESENTATION
   ========================================================= */

.rv-task-do-now-screen {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  width: min(100%, 1080px);
  max-width: 100%;
  white-space: normal;
}

.rv-task-do-now-screen
.rv-task-do-now-title {
  display: block;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.25;
  font-weight: 750;
  color: var(--text);
}

.rv-task-do-now-recommendation {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(180, 139, 18, 0.25);
  border-left: 4px solid #d3a514;
  border-radius: 12px;
  background: #fffdf5;
}

.rv-task-do-now-quick-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding-top: 2px;
}

.rv-task-do-now-section-title {
  display: block;
  font-size: 1.06rem;
  line-height: 1.35;
  font-weight: 750;
  color: var(--text);
}

.rv-task-do-now-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rv-task-do-now-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid rgba(23, 32, 51, 0.1);
  border-radius: 999px;
  background: #f7fafb;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.25;
}

.rv-task-do-now-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

#work-tasks-core-screen-text
button.rv-task-do-now-task {
  appearance: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  width: 100%;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(23, 32, 51, 0.12);
  border-left: 4px solid var(--primary);
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
  box-shadow: none;
  font: inherit;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition:
    transform 120ms ease,
    border-color 120ms ease,
    box-shadow 120ms ease,
    background 120ms ease;
}

#work-tasks-core-screen-text
button.rv-task-do-now-task-recommended {
  background: #ffffff;
}

#work-tasks-core-screen-text
button.rv-task-do-now-task:hover {
  border-color: rgba(49, 96, 122, 0.38);
  border-left-color: var(--primary);
  background: #f7fafb;
  color: var(--text);
  box-shadow:
    0 3px 12px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

#work-tasks-core-screen-text
button.rv-task-do-now-task:active {
  transform: translateY(0);
}

#work-tasks-core-screen-text
button.rv-task-do-now-task:focus-visible {
  border-left-color: var(--primary);
  background: #ffffff;
  color: var(--text);
  outline: 3px solid rgb(47 101 127 / 22%);
  outline-offset: 2px;
}

.rv-task-do-now-task-title {
  display: block;
  min-width: 0;
  font-weight: 700;
  color: var(--text);
}

.rv-task-do-now-task-description {
  display: block;
  min-width: 0;
  color: var(--text);
}

.rv-task-do-now-task-meta {
  display: block;
  min-width: 0;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.9rem;
}

.rv-task-do-now-note,
.rv-task-do-now-more {
  display: block;
  color: var(--muted);
  line-height: 1.45;
}

.rv-task-do-now-more {
  margin-top: 2px;
  font-size: 0.92rem;
}

@media (max-width: 760px) {
  .rv-task-do-now-screen {
    gap: 13px;
  }

  .rv-task-do-now-recommendation {
    padding: 12px;
  }

  .rv-task-do-now-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .rv-task-do-now-chip {
    width: 100%;
    box-sizing: border-box;
    border-radius: 9px;
  }

  #work-tasks-core-screen-text
  button.rv-task-do-now-task {
    min-height: 52px;
    padding: 11px 12px;
  }
}


/* =========================================================
   PACKAGE21 A8-R10-R1 STRUCTURED TASK CARD
   ========================================================= */

#work-tasks-core-screen-text.rv-task-card-readable-screen {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  width: min(100%, 1200px);
  max-width: 100%;
  white-space: normal;
}

.rv-task-card-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  width: 100%;
  box-sizing: border-box;
  padding: 20px;
  border: 1px solid rgba(23, 32, 51, 0.12);
  border-radius: 14px;
  background: #ffffff;
  box-shadow:
    0 4px 16px rgba(15, 23, 42, 0.05);
  white-space: normal;
}

.rv-task-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.rv-task-card-title {
  display: block;
  min-width: 0;
  color: var(--text);
  font-size: clamp(1.3rem, 2vw, 1.55rem);
  font-weight: 750;
  line-height: 1.25;
}

.rv-task-card-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  flex: 0 0 auto;
}

.rv-task-card-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  box-sizing: border-box;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.2;
}

.rv-task-card-status {
  border: 1px solid rgba(31, 122, 78, 0.16);
  background: #eef8f2;
  color: #246b46;
}

.rv-task-card-urgent {
  border: 1px solid rgba(184, 94, 38, 0.16);
  background: #fff5ee;
  color: #9a4d22;
}

.rv-task-card-description-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  padding: 15px 16px;
  border: 1px solid rgba(23, 32, 51, 0.09);
  border-radius: 11px;
  background: #f8fafb;
}

.rv-task-card-field-label {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.25;
}

.rv-task-card-description {
  display: block;
  min-width: 0;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.rv-task-card-meta-grid {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.rv-task-card-meta-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(23, 32, 51, 0.08);
  border-radius: 10px;
  background: #ffffff;
}

.rv-task-card-meta-label {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.25;
}

.rv-task-card-meta-value {
  display: block;
  min-width: 0;
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.rv-task-card-notice {
  display: block;
  width: min(100%, 980px);
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid rgba(49, 96, 122, 0.15);
  border-left: 4px solid var(--primary);
  border-radius: 10px;
  background: #f7fafb;
  color: var(--text);
  line-height: 1.45;
  white-space: pre-wrap;
}

@media (max-width: 1000px) {
  .rv-task-card-meta-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .rv-task-card-summary {
    gap: 14px;
    padding: 14px;
    border-radius: 11px;
  }

  .rv-task-card-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .rv-task-card-badges {
    justify-content: flex-start;
  }

  .rv-task-card-description-block {
    padding: 12px;
  }

  .rv-task-card-meta-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .rv-task-card-meta-item {
    padding: 10px 11px;
  }
}


/* ==========================================================
   PACKAGE 21 / A8-R11
   FIRST SCREEN + PUBLIC DEMO MODE
   ========================================================== */

.demo-entry {
  display: grid;
  gap: 8px;
  margin: 1.35rem 0 1rem;
}

.demo-launch-button {
  width: 100%;
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: #ffffff !important;
  color: #172033 !important;
  font-size: 1.02rem;
  font-weight: 800;
}

.demo-entry-note,
.demo-returning-note {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.88rem;
  line-height: 1.45;
}

.demo-preview {
  display: grid;
  gap: 12px;
  margin: 1rem 0 1.25rem;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.09);
}

.demo-preview-focus,
.demo-preview-money {
  display: grid;
  gap: 5px;
}

.demo-preview-focus strong,
.demo-preview-money strong,
.demo-preview-focus span,
.demo-preview-money span {
  color: #ffffff;
}

.demo-preview small,
.demo-preview-focus small,
.demo-preview-money small {
  color: rgba(255, 255, 255, 0.76);
}

.demo-preview-stats {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.demo-preview-stats span {
  padding: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.82rem;
}

.demo-preview-stats strong {
  display: block;
  margin-top: 3px;
  color: #ffffff;
}

.demo-benefits {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.demo-benefits article {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
}

.demo-benefits strong {
  color: #ffffff;
  font-size: 0.9rem;
}

.demo-benefits span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  line-height: 1.45;
}


/* Demo application shell */

.rv-demo-banner {
  position: sticky;
  top: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding:
    9px
    max(12px, env(safe-area-inset-right))
    9px
    max(12px, env(safe-area-inset-left));
  border-bottom: 1px solid rgba(23, 32, 51, 0.12);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.rv-demo-banner-copy {
  display: grid;
  gap: 2px;
}

.rv-demo-banner-copy span {
  color: #71818c;
  font-size: 0.8rem;
}

.rv-demo-banner-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.rv-demo-banner-actions button {
  min-height: 38px;
}

body.rv-demo-mode
.nav-button[data-section="more"] {
  display: none !important;
}

body.rv-demo-mode
.content-section:not(#section-demo-analytics)
> :not(.rv-demo-content) {
  display: none !important;
}

.rv-demo-content {
  display: grid;
  gap: 14px;
  width: 100%;
  min-width: 0;
}

.rv-demo-heading {
  margin-bottom: 0;
}

.rv-demo-kpis {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.rv-demo-kpis article {
  display: grid;
  gap: 6px;
  padding: 13px;
  border: 1px solid rgba(23, 32, 51, 0.10);
  border-radius: 14px;
  background: #ffffff;
}

.rv-demo-kpis span {
  color: #71818c;
  font-size: 0.82rem;
}

.rv-demo-kpis strong {
  font-size: 1.18rem;
}

.rv-demo-focus-card {
  border-left:
    4px solid
    var(--primary);
}

.rv-demo-list {
  display: grid;
  gap: 8px;
}

button.rv-demo-row {
  display: grid;
  width: 100%;
  gap: 5px;
  padding: 12px 13px;
  border:
    1px solid
    rgba(23, 32, 51, 0.10) !important;
  border-radius: 12px;
  background: #f8fafc !important;
  color: #172033 !important;
  text-align: left;
}

button.rv-demo-row:hover,
button.rv-demo-row:focus-visible {
  background: #ffffff !important;
  border-color:
    rgba(23, 32, 51, 0.24) !important;
}

button.rv-demo-row span {
  color: #71818c;
  font-size: 0.84rem;
  font-weight: 500;
}

.rv-demo-detail-grid {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 14px 0;
}

.rv-demo-detail-grid span {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 11px;
  background: #f6f8fb;
}

.rv-demo-detail-grid b {
  color: #71818c;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.rv-demo-report-groups,
.rv-demo-analytics-grid {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.rv-demo-report-list {
  display: grid;
  gap: 8px;
  margin-top: 11px;
}

.rv-demo-report {
  display: grid;
  gap: 4px;
  padding: 9px;
  border-radius: 10px;
  background: #f6f8fb;
}

.rv-demo-report span {
  color: #71818c;
  font-size: 0.82rem;
}

.rv-demo-focused {
  outline:
    2px solid
    rgba(30, 102, 255, 0.28);
}

.rv-demo-analytics-card {
  display: grid;
  gap: 11px;
}

.rv-demo-analytics-card > div {
  display: grid;
  gap: 3px;
  padding-top: 9px;
  border-top:
    1px solid
    rgba(23, 32, 51, 0.08);
}

.rv-demo-analytics-card span {
  color: #71818c;
  font-size: 0.82rem;
}

.rv-demo-analytics-card strong {
  font-size: 1.08rem;
}

.rv-demo-conversion-card {
  text-align: center;
}


@media (max-width: 760px) {
  .auth-layout {
    align-items: stretch;
  }

  .brand-panel {
    min-height: auto;
  }

  .brand-panel h1 {
    font-size: clamp(
      2rem,
      9vw,
      2.65rem
    );
  }

  .demo-entry {
    margin-top: 1rem;
  }

  .demo-preview {
    padding: 12px;
  }

  .demo-preview-stats {
    grid-template-columns:
      minmax(0, 1fr);
  }

  .demo-benefits {
    grid-template-columns:
      minmax(0, 1fr);
  }

  .rv-demo-banner {
    position: sticky;
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
    padding:
      calc(
        7px
        + env(safe-area-inset-top)
      )
      9px
      7px;
  }

  .rv-demo-banner-copy {
    grid-template-columns:
      auto 1fr;
    align-items: baseline;
    column-gap: 8px;
  }

  .rv-demo-banner-actions {
    display: grid;
    grid-template-columns:
      minmax(0, 1fr)
      auto;
  }

  .rv-demo-banner-actions
  .rv-demo-register {
    grid-column: 1 / -1;
    width: 100%;
  }

  .rv-demo-kpis,
  .rv-demo-detail-grid,
  .rv-demo-report-groups,
  .rv-demo-analytics-grid {
    grid-template-columns:
      minmax(0, 1fr);
  }

  .rv-demo-content {
    gap: 10px;
  }

  .rv-demo-detail-card,
  .rv-demo-focus-card {
    padding: 13px;
  }
}


/* ==========================================================
   PACKAGE 21 / A8-R11-R1-S3
   FIRST SCREEN READABILITY
   ========================================================== */

/*
 * The auth landing brand area is light.
 * Demo preview content therefore uses an explicit light-card
 * visual contract instead of inherited white-on-dark colors.
 */

#auth-view .brand-panel .demo-entry-note,
#auth-view .brand-panel .demo-returning-note {
  color: #526071 !important;
  font-weight: 600;
}

#auth-view .brand-panel .demo-preview {
  border:
    1px solid
    rgba(23, 32, 51, 0.14) !important;
  background:
    rgba(255, 255, 255, 0.88) !important;
  box-shadow:
    0 10px 28px
    rgba(23, 32, 51, 0.07);
}

#auth-view .brand-panel .demo-preview-focus,
#auth-view .brand-panel .demo-preview-money {
  color: #172033 !important;
}

#auth-view .brand-panel .demo-preview-focus strong,
#auth-view .brand-panel .demo-preview-money strong,
#auth-view .brand-panel .demo-preview-focus span,
#auth-view .brand-panel .demo-preview-money span {
  color: #172033 !important;
}

#auth-view .brand-panel .demo-preview small,
#auth-view .brand-panel .demo-preview-focus small,
#auth-view .brand-panel .demo-preview-money small {
  color: #5f6d7c !important;
}

#auth-view .brand-panel .demo-preview-stats span {
  border:
    1px solid
    rgba(23, 32, 51, 0.08);
  background:
    #f4f7fa !important;
  color:
    #526071 !important;
}

#auth-view .brand-panel .demo-preview-stats strong {
  color: #172033 !important;
}

#auth-view .brand-panel .demo-benefits article {
  border:
    1px solid
    rgba(23, 32, 51, 0.10);
  background:
    rgba(255, 255, 255, 0.82) !important;
  box-shadow:
    0 6px 18px
    rgba(23, 32, 51, 0.045);
}

#auth-view .brand-panel .demo-benefits strong {
  color: #172033 !important;
}

#auth-view .brand-panel .demo-benefits span {
  color: #526071 !important;
}

#auth-view .brand-panel .demo-launch-button {
  border:
    1px solid
    #315d77 !important;
  background:
    #ffffff !important;
  color:
    #17344a !important;
}

#auth-view .brand-panel .demo-launch-button:hover,
#auth-view .brand-panel .demo-launch-button:focus-visible {
  background:
    #f2f7fa !important;
  color:
    #102a3c !important;
}

/* Keep the primary product message clearly readable. */
#auth-view .brand-panel .eyebrow {
  color: #8a6115 !important;
  font-weight: 800;
}

#auth-view .brand-panel h1 {
  color: #172033 !important;
}

#auth-view .brand-panel .lead {
  color: #526071 !important;
}


/* Mobile: slightly stronger separation between selling blocks. */
@media (max-width: 760px) {
  #auth-view .brand-panel .demo-preview,
  #auth-view .brand-panel .demo-benefits article {
    background: #ffffff !important;
  }

  #auth-view .brand-panel .demo-entry-note,
  #auth-view .brand-panel .demo-returning-note {
    font-size: 0.86rem;
    line-height: 1.4;
  }
}


/* ==========================================================
   PACKAGE 21 / A8-R11-R2-R1
   DEMO ANALYTICS -> REAL NATIVE ANALYTICS PRESENTATION
   ========================================================== */

/*
 * Generic demo mode hides the authenticated section bodies.
 * Analytics is the deliberate exception: demo data is rendered
 * into the same native analytics structure/classes as real work.
 */

body.rv-demo-mode
#section-analytics.rv-demo-analytics-native
> .rv-demo-content {
  display:
    none !important;
}

body.rv-demo-mode
#section-analytics.rv-demo-analytics-native
> .rv-demo-analytics-native-heading {
  display:
    flex !important;
}

body.rv-demo-mode
#section-analytics.rv-demo-analytics-native
> .rv-demo-analytics-native-form {
  display:
    block !important;
}

body.rv-demo-mode
#section-analytics.rv-demo-analytics-native
> .rv-demo-analytics-native-kpis {
  display:
    grid !important;
}

body.rv-demo-mode
#section-analytics.rv-demo-analytics-native
> .rv-demo-analytics-native-insights {
  display:
    grid !important;
}

body.rv-demo-mode
#section-analytics.rv-demo-analytics-native
> .rv-demo-analytics-native-clients {
  display:
    block !important;
}

body.rv-demo-mode
#section-analytics.rv-demo-analytics-native
> [data-core-flow-host="analytics"] {
  display:
    none !important;
}

.rv-demo-analytics-period-note {
  margin:
    0.7rem
    0
    0;
  font-size:
    0.86rem;
}

body.rv-demo-mode
#section-analytics.rv-demo-analytics-native
.analytics-client-analysis-heading {
  align-items:
    flex-start;
}

body.rv-demo-mode
#section-analytics.rv-demo-analytics-native
.analytics-client-analysis-heading
h2 {
  margin-bottom:
    0.35rem;
}

body.rv-demo-mode
#section-analytics.rv-demo-analytics-native
.analytics-client-analysis-heading
p {
  color:
    #647783;
}

/*
 * Preserve the already validated Package21 mobile analytics
 * transformation: desktop = table, phone = one vertical card
 * per client.
 */
@media (max-width: 760px) {
  body.rv-demo-mode
  #section-analytics.rv-demo-analytics-native
  > .rv-demo-analytics-native-heading {
    display:
      flex !important;
    flex-direction:
      column;
  }

  body.rv-demo-mode
  #section-analytics.rv-demo-analytics-native
  > .rv-demo-analytics-native-kpis,
  body.rv-demo-mode
  #section-analytics.rv-demo-analytics-native
  > .rv-demo-analytics-native-insights {
    grid-template-columns:
      minmax(0, 1fr)
      !important;
  }
}

/* PACKAGE 21 / A8-R11-R2 — ISOLATED STATIC DEMO ANALYTICS */

body:not(.rv-demo-mode)
#section-demo-analytics {
  display: none !important;
}

body.rv-demo-mode
#section-demo-analytics:not(.hidden) {
  display: block !important;
}

#section-demo-analytics {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

#section-demo-analytics *,
#section-demo-analytics *::before,
#section-demo-analytics *::after {
  box-sizing: border-box;
}

#section-demo-analytics
.rv-demo-analytics-screen {
  display: grid;
  gap: 18px;
  width: 100%;
  min-width: 0;
}

#section-demo-analytics
.rv-demo-analytics-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

#section-demo-analytics
.rv-demo-analytics-heading h1 {
  margin-bottom: 6px;
}

#section-demo-analytics
.rv-demo-analytics-heading p {
  max-width: 720px;
  margin: 0;
}

#section-demo-analytics
.rv-demo-analytics-period,
#section-demo-analytics
.rv-demo-analytics-client-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid
    rgba(120, 120, 140, 0.22);
  border-radius: 999px;
  background:
    rgba(120, 120, 140, 0.08);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

#section-demo-analytics
.rv-demo-analytics-kpis {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

#section-demo-analytics
.rv-demo-analytics-kpi {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  min-height: 132px;
}

#section-demo-analytics
.rv-demo-analytics-kpi-icon {
  font-size: 24px;
  line-height: 1;
}

#section-demo-analytics
.rv-demo-analytics-kpi strong {
  font-size:
    clamp(22px, 3vw, 30px);
  line-height: 1.12;
  overflow-wrap: anywhere;
}

#section-demo-analytics
.rv-demo-analytics-kpi
> span:last-child {
  font-size: 14px;
  line-height: 1.35;
  opacity: 0.76;
}

#section-demo-analytics
.rv-demo-analytics-value {
  display: grid;
  gap: 16px;
}

#section-demo-analytics
.rv-demo-analytics-value-copy h2,
#section-demo-analytics
.rv-demo-analytics-block-title h2,
#section-demo-analytics
.rv-demo-analytics-cta h2 {
  margin: 0 0 6px;
}

#section-demo-analytics
.rv-demo-analytics-value-copy p,
#section-demo-analytics
.rv-demo-analytics-block-title p,
#section-demo-analytics
.rv-demo-analytics-cta p {
  margin: 0;
}

#section-demo-analytics
.rv-demo-analytics-comparison {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    auto
    minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
}

#section-demo-analytics
.rv-demo-analytics-compare-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  border: 1px solid
    rgba(120, 120, 140, 0.18);
  border-radius: 14px;
  background:
    rgba(120, 120, 140, 0.05);
}

#section-demo-analytics
.rv-demo-analytics-compare-card.is-warning {
  border-color:
    rgba(190, 120, 20, 0.34);
}

#section-demo-analytics
.rv-demo-analytics-compare-card.is-good {
  border-color:
    rgba(35, 145, 90, 0.34);
}

#section-demo-analytics
.rv-demo-analytics-compare-card strong {
  font-size: 17px;
}

#section-demo-analytics
.rv-demo-analytics-compare-card span {
  font-size: 14px;
  opacity: 0.78;
}

#section-demo-analytics
.rv-demo-analytics-compare-card b {
  margin-top: 4px;
  font-size: 20px;
}

#section-demo-analytics
.rv-demo-analytics-compare-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
}

#section-demo-analytics
.rv-demo-analytics-value-note {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  opacity: 0.78;
}

#section-demo-analytics
.rv-demo-analytics-summary {
  display: grid;
  gap: 14px;
}

#section-demo-analytics
.rv-demo-analytics-block-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

#section-demo-analytics
.rv-demo-analytics-summary-grid {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(0, 1fr));
  gap: 10px;
}

#section-demo-analytics
.rv-demo-analytics-summary-grid
> div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border-radius: 12px;
  background:
    rgba(120, 120, 140, 0.06);
}

#section-demo-analytics
.rv-demo-analytics-summary-grid span {
  font-size: 13px;
  line-height: 1.35;
  opacity: 0.72;
}

#section-demo-analytics
.rv-demo-analytics-summary-grid strong {
  font-size: 17px;
  overflow-wrap: anywhere;
}

#section-demo-analytics
.rv-demo-analytics-insights {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

#section-demo-analytics
.rv-demo-analytics-insight {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}

#section-demo-analytics
.rv-demo-analytics-ranking {
  display: grid;
  gap: 0;
  margin: 0;
  padding-left: 28px;
}

#section-demo-analytics
.rv-demo-analytics-ranking li {
  padding: 10px 0 10px 4px;
  border-bottom: 1px solid
    rgba(120, 120, 140, 0.13);
}

#section-demo-analytics
.rv-demo-analytics-ranking
li:last-child {
  border-bottom: 0;
}

#section-demo-analytics
.rv-demo-analytics-ranking
li > div {
  display: grid;
  gap: 3px;
  margin-bottom: 5px;
}

#section-demo-analytics
.rv-demo-analytics-ranking span {
  font-size: 13px;
  opacity: 0.7;
}

#section-demo-analytics
.rv-demo-analytics-ranking b {
  font-size: 15px;
}

#section-demo-analytics
.rv-demo-analytics-ranking
b.is-low {
  font-weight: 800;
}

#section-demo-analytics
.rv-demo-analytics-low-list {
  display: grid;
  gap: 9px;
}

#section-demo-analytics
.rv-demo-analytics-low-list
> div {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr) auto;
  gap: 4px 10px;
  padding: 11px 12px;
  border: 1px solid
    rgba(190, 120, 20, 0.24);
  border-radius: 12px;
  background:
    rgba(190, 120, 20, 0.05);
}

#section-demo-analytics
.rv-demo-analytics-low-list span {
  font-size: 13px;
  opacity: 0.72;
}

#section-demo-analytics
.rv-demo-analytics-clients {
  display: grid;
  gap: 14px;
  min-width: 0;
}

#section-demo-analytics
.rv-demo-analytics-table-wrap {
  width: 100%;
  min-width: 0;
}

#section-demo-analytics
.rv-demo-analytics-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

#section-demo-analytics
.rv-demo-analytics-table th,
#section-demo-analytics
.rv-demo-analytics-table td {
  padding: 12px 10px;
  border-bottom: 1px solid
    rgba(120, 120, 140, 0.13);
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

#section-demo-analytics
.rv-demo-analytics-table th {
  font-size: 13px;
  opacity: 0.7;
}

#section-demo-analytics
.rv-demo-analytics-table
tbody tr:last-child td {
  border-bottom: 0;
}

#section-demo-analytics
.rv-demo-analytics-table
tr.is-low td {
  background:
    rgba(190, 120, 20, 0.05);
}

#section-demo-analytics
.rv-demo-analytics-mobile-clients {
  display: none;
}

#section-demo-analytics
.rv-demo-analytics-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

#section-demo-analytics
.rv-demo-analytics-cta-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 10px;
}


@media (max-width: 980px) {
  #section-demo-analytics
  .rv-demo-analytics-kpis {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  #section-demo-analytics
  .rv-demo-analytics-summary-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  #section-demo-analytics
  .rv-demo-analytics-insights {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 760px) {
  #section-demo-analytics
  .rv-demo-analytics-screen {
    gap: 14px;
  }

  #section-demo-analytics
  .rv-demo-analytics-heading {
    display: grid;
    gap: 10px;
  }

  #section-demo-analytics
  .rv-demo-analytics-period {
    justify-self: start;
  }

  #section-demo-analytics
  .rv-demo-analytics-kpis {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  #section-demo-analytics
  .rv-demo-analytics-kpi {
    min-height: 118px;
    padding: 13px;
  }

  #section-demo-analytics
  .rv-demo-analytics-kpi strong {
    font-size: 21px;
  }

  #section-demo-analytics
  .rv-demo-analytics-comparison {
    grid-template-columns: 1fr;
  }

  #section-demo-analytics
  .rv-demo-analytics-compare-arrow {
    min-height: 20px;
    transform: rotate(90deg);
  }

  #section-demo-analytics
  .rv-demo-analytics-summary-grid {
    grid-template-columns: 1fr;
  }

  #section-demo-analytics
  .rv-demo-analytics-block-title {
    display: grid;
    gap: 8px;
  }

  #section-demo-analytics
  .rv-demo-analytics-client-count {
    justify-self: start;
  }

  #section-demo-analytics
  .rv-demo-analytics-table-wrap {
    display: none;
  }

  #section-demo-analytics
  .rv-demo-analytics-mobile-clients {
    display: grid;
    gap: 10px;
  }

  #section-demo-analytics
  .rv-demo-analytics-mobile-clients
  > article {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 13px;
    border: 1px solid
      rgba(120, 120, 140, 0.16);
    border-radius: 13px;
    background:
      rgba(120, 120, 140, 0.04);
  }

  #section-demo-analytics
  .rv-demo-analytics-mobile-clients
  > article.is-low {
    border-color:
      rgba(190, 120, 20, 0.3);
    background:
      rgba(190, 120, 20, 0.05);
  }

  #section-demo-analytics
  .rv-demo-analytics-mobile-clients
  > article > strong {
    font-size: 17px;
  }

  #section-demo-analytics
  .rv-demo-analytics-mobile-clients
  > article > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
  }

  #section-demo-analytics
  .rv-demo-analytics-mobile-clients
  span {
    min-width: 0;
    font-size: 13px;
    opacity: 0.7;
  }

  #section-demo-analytics
  .rv-demo-analytics-mobile-clients
  b {
    flex: 0 0 auto;
    font-size: 14px;
    text-align: right;
  }

  #section-demo-analytics
  .rv-demo-analytics-cta {
    display: grid;
  }

  #section-demo-analytics
  .rv-demo-analytics-cta-actions {
    display: grid;
    width: 100%;
  }

  #section-demo-analytics
  .rv-demo-analytics-cta-actions
  button {
    width: 100%;
  }
}


@media (max-width: 390px) {
  #section-demo-analytics
  .rv-demo-analytics-kpis {
    grid-template-columns: 1fr;
  }

  #section-demo-analytics
  .rv-demo-analytics-kpi {
    min-height: 0;
  }
}

/* PACKAGE 22H-2 — mobile task comments */
#work-tasks-core-card-input-form.rv-task-comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  width: 100%;
}

#work-tasks-core-card-comment {
  display: block;
  width: 100%;
  min-height: 132px;
  box-sizing: border-box;
  resize: vertical;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#work-tasks-core-card-comment-submit {
  width: 100%;
  min-height: 44px;
}

#work-tasks-core-screen-text.rv-task-comments-screen {
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
  word-break: break-word;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.55;
}

@media (max-width: 720px) {
  #work-tasks-core-card-comment {
    min-height: 150px;
    font-size: 16px;
  }

  #work-tasks-core-screen-text.rv-task-comments-screen {
    font-size: 16px;
    line-height: 1.55;
  }
}

/* PACKAGE22L10B26_TASK_READABILITY */

.rv-task-date-group-heading {
  display: block;
  margin: 18px 0 8px;
  padding: 7px 10px;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.04em;
}

.rv-task-current-date-group-item {
  display: block;
  width: 100%;
  margin: 0 0 7px;
  padding: 11px 13px;
  text-align: left;
  white-space: normal;
  line-height: 1.4;
  font-size: 0.96rem;
}

@media (max-width: 760px) {
  .rv-task-date-group-heading {
    margin-top: 14px;
    margin-bottom: 7px;
    padding: 6px 9px;
    font-size: 0.78rem;
  }

  .rv-task-current-date-group-item {
    padding: 10px 11px;
    font-size: 0.94rem;
    line-height: 1.38;
  }
}

/* PACKAGE22L10B35_FIRST_TASK */

/* PACKAGE22L10B35_FIRST_TASK */

#work-tasks-core-screen-text
button.rv-task-do-now-task-featured {
  padding: 16px 17px;
  border-width: 2px;
  border-left-width: 5px;
  border-radius: 13px;
  background: #fffdf5;
  box-shadow:
    0 5px 18px rgba(15, 23, 42, 0.1);
}

#work-tasks-core-screen-text
button.rv-task-do-now-task-featured
.rv-task-do-now-task-title {
  font-size: 1.05rem;
  font-weight: 800;
}

#work-tasks-core-screen-text
button.rv-task-do-now-task-featured
.rv-task-do-now-task-description {
  font-size: 1rem;
  font-weight: 500;
}

#work-tasks-core-screen-text
button.rv-task-do-now-task-featured
.rv-task-do-now-task-meta {
  margin-top: 4px;
  font-size: 0.94rem;
  font-weight: 600;
}

@media (max-width: 760px) {
  #work-tasks-core-screen-text
  button.rv-task-do-now-task-featured {
    padding: 14px 13px;
    border-radius: 12px;
  }

  #work-tasks-core-screen-text
  button.rv-task-do-now-task-featured
  .rv-task-do-now-task-title {
    font-size: 1rem;
  }
}

/* PACKAGE22L10B46_DO_NOW_VISUAL */

/*
 * The recommendation itself is the visual focus.
 * The outer wrapper must not look like a second card.
 */
#work-tasks-core-screen-text
.rv-task-do-now-recommendation {
  display: contents;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#work-tasks-core-screen-text
button.rv-task-do-now-task-featured {
  padding: 15px 17px;
  border-width: 2px;
  border-left-width: 5px;
  border-radius: 12px;
  background: #f8fbfd;
  box-shadow:
    0 4px 14px rgba(15, 23, 42, 0.08);
}

#work-tasks-core-screen-text
button.rv-task-do-now-task-featured
.rv-task-do-now-task-title {
  font-weight: 800;
}

#work-tasks-core-screen-text
button.rv-task-do-now-task-featured
.rv-task-do-now-task-description {
  font-size: 1rem;
  font-weight: 650;
}

#work-tasks-core-screen-text
button.rv-task-do-now-task-featured
.rv-task-do-now-task-meta {
  margin-top: 4px;
  font-size: 0.94rem;
  font-weight: 600;
}

@media (max-width: 760px) {
  #work-tasks-core-screen-text
  button.rv-task-do-now-task-featured {
    padding: 13px 13px;
  }
}

/* PACKAGE22L10B50_DO_NOW_FINAL_CARD */

#work-tasks-core-screen-text
button.rv-task-do-now-task-featured {
  display: block;
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  box-sizing: border-box;
  padding: 15px 17px !important;
  margin: 0 !important;
  border-width: 2px !important;
  border-left-width: 5px !important;
  border-radius: 12px;
  background: #f8fbfd;
  box-shadow:
    0 4px 14px rgba(15, 23, 42, 0.08);
  text-align: left;
  white-space: normal;
}

#work-tasks-core-screen-text
button.rv-task-do-now-task-featured
.rv-task-do-now-task-title,
#work-tasks-core-screen-text
button.rv-task-do-now-task-featured
.rv-task-do-now-task-description,
#work-tasks-core-screen-text
button.rv-task-do-now-task-featured
.rv-task-do-now-task-meta {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

#work-tasks-core-screen-text
button.rv-task-do-now-task-featured
.rv-task-do-now-task-meta {
  margin-top: 5px !important;
  line-height: 1.35;
  font-size: 0.94rem;
  font-weight: 600;
}

#work-tasks-core-screen-text
.rv-task-do-now-recommendation {
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

@media (max-width: 760px) {
  #work-tasks-core-screen-text
  button.rv-task-do-now-task-featured {
    padding: 13px 13px !important;
  }
}

/* ==========================================================
   REVISOR PACKAGE 22L-10B65C
   TASK CREATION WIZARD PRESENTATION

   Presentation only.
   Core labels, keyboard order and behaviour remain unchanged.
   ========================================================== */

#work-tasks-core-wizard.rv-task-create-wizard {
  width: min(100%, 980px) !important;
  max-width: 980px !important;
  margin: 0 !important;
  padding: 24px 26px 28px !important;
  box-sizing: border-box !important;

  border:
    1px solid
    rgba(23, 32, 51, 0.10) !important;
  border-radius: 16px !important;

  background: #ffffff !important;

  box-shadow:
    0 8px 28px
    rgba(23, 32, 51, 0.055) !important;
}


#work-tasks-core-wizard-screen-text.rv-task-create-screen {
  display: block !important;

  width: 100% !important;
  margin: 0 0 22px !important;
  padding: 0 !important;

  border: 0 !important;
  background: transparent !important;

  color: #223440 !important;

  font-family:
    "Segoe UI Variable",
    "Segoe UI",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    Arial,
    sans-serif !important;

  font-size: 1.05rem !important;
  font-weight: 500 !important;
  line-height: 1.7 !important;

  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
}


#work-tasks-core-wizard-actions {
  gap: 10px !important;
}


#work-tasks-core-wizard-actions
button.rv-task-create-action {
  min-height: 50px !important;

  padding:
    0.78rem
    1rem !important;

  border-radius: 10px !important;

  border:
    1px solid
    #d6dee3 !important;

  color: #263946 !important;
  background: #ffffff !important;

  box-shadow:
    0 2px 7px
    rgba(23, 32, 51, 0.035) !important;

  font-size: 0.96rem !important;
  font-weight: 650 !important;

  transition:
    border-color 120ms ease,
    background 120ms ease,
    box-shadow 120ms ease,
    transform 120ms ease !important;
}


#work-tasks-core-wizard-actions
button.rv-task-create-action:hover {
  border-color: #aebdc7 !important;

  background: #f8fafb !important;

  box-shadow:
    0 5px 14px
    rgba(23, 32, 51, 0.06) !important;
}


#work-tasks-core-wizard-actions
button.rv-task-create-action:active {
  transform: translateY(1px) !important;
}


/* Urgency is a choice, but deserves a restrained warning cue. */

#work-tasks-core-wizard-actions
button.rv-task-create-action-urgent {
  border-color: #e3c8b8 !important;

  color: #694333 !important;

  background:
    linear-gradient(
      180deg,
      #fffdfb,
      #fcf6f2
    ) !important;
}


/* Attachment is useful but not destructive/primary. */

#work-tasks-core-wizard-actions
button.rv-task-create-action-attachment {
  border-color: #c9d8e1 !important;

  color: #31556d !important;

  background: #f8fbfc !important;
}


/* Cancel/back are navigation controls, not answer choices. */

#work-tasks-core-wizard-actions
button.rv-task-create-action-secondary {
  border-color: transparent !important;

  color: #6d7b84 !important;
  background: transparent !important;

  box-shadow: none !important;

  font-weight: 550 !important;
}


#work-tasks-core-wizard-actions
button.rv-task-create-action-secondary:hover {
  border-color: transparent !important;

  color: #31556d !important;
  background: #f5f7f8 !important;

  box-shadow: none !important;
}


/* Typed steps */

#work-tasks-core-wizard-input-form:not([hidden]):not(.hidden) {
  margin-top: 6px !important;
}


#work-tasks-core-wizard-input {
  width: 100% !important;
  min-height: 50px !important;

  padding:
    0.75rem
    0.95rem !important;

  box-sizing: border-box !important;

  border:
    1px solid
    #b9c7d0 !important;
  border-radius: 10px !important;

  color: #263946 !important;
  background: #ffffff !important;

  font-size: 1rem !important;

  box-shadow:
    inset 0 1px 2px
    rgba(23, 32, 51, 0.025) !important;
}


#work-tasks-core-wizard-input:focus {
  outline: none !important;

  border-color: #52758c !important;

  box-shadow:
    0 0 0 3px
    rgba(49, 85, 109, 0.10) !important;
}


#work-tasks-core-wizard-submit:not([hidden]):not(.hidden) {
  min-width: 126px !important;
  min-height: 50px !important;

  border-radius: 10px !important;

  box-shadow:
    0 3px 9px
    rgba(49, 85, 109, 0.13) !important;
}


/* File picker */

#work-tasks-core-wizard-upload:not([hidden]):not(.hidden) {
  margin-top: 12px !important;
  padding: 14px !important;

  border:
    1px dashed
    #bccbd4 !important;
  border-radius: 11px !important;

  background: #f8fafb !important;
}


/* Desktop: keep choices readable instead of stretching forever. */

@media (min-width: 761px) {
  #work-tasks-core-wizard-actions {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      ) !important;
  }
}


/* Mobile: one clear action per row. */

@media (max-width: 760px) {
  #work-tasks-core-wizard.rv-task-create-wizard {
    width: 100% !important;

    padding:
      18px
      14px
      22px !important;

    border-radius: 12px !important;
  }

  #work-tasks-core-wizard-screen-text.rv-task-create-screen {
    margin-bottom: 16px !important;

    font-size: 1rem !important;
    line-height: 1.6 !important;
  }

  #work-tasks-core-wizard-actions {
    grid-template-columns:
      minmax(0, 1fr) !important;
  }

  #work-tasks-core-wizard-actions
  button.rv-task-create-action {
    min-height: 52px !important;
  }
}

/* ==========================================================
   REVISOR PACKAGE 22L-10B65F
   TASK CREATION WIZARD HIERARCHY
   ========================================================== */

#work-tasks-core-wizard-screen-text.rv-task-create-screen {
  white-space: normal !important;
}

.rv-task-create-title,
.rv-task-create-step,
.rv-task-create-question,
.rv-task-create-summary {
  display: block;
}

.rv-task-create-title {
  margin: 0;
  color: #223440;
  font-size: 1.35rem;
  font-weight: 720;
  line-height: 1.25;
}

.rv-task-create-step {
  margin-top: 5px;
  color: #7b8992;
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.35;
}

.rv-task-create-question {
  margin-top: 14px;
  color: #344955;
  font-size: 1rem;
  font-weight: 550;
  line-height: 1.45;
}

.rv-task-create-summary {
  margin: 0 0 22px;
  padding: 17px 18px;

  border:
    1px solid
    #dbe4e9;

  border-radius: 12px;
  background: #f8fafb;

  color: #314651;

  font-size: 0.96rem;
  font-weight: 500;
  line-height: 1.6;

  white-space: pre-wrap;
}

#work-tasks-core-wizard-actions
button.rv-task-create-action-secondary {
  grid-column: 1 / -1 !important;

  width: auto !important;
  min-height: 38px !important;

  justify-self: start !important;

  margin-top: 4px !important;

  padding:
    0.45rem
    0.65rem !important;

  text-align: left !important;
}

@media (max-width: 760px) {
  .rv-task-create-title {
    font-size: 1.22rem;
  }

  .rv-task-create-question {
    margin-top: 11px;
  }

  .rv-task-create-summary {
    margin-bottom: 17px;
    padding: 14px;
  }

  #work-tasks-core-wizard-actions
  button.rv-task-create-action-secondary {
    width: 100% !important;
  }
}

/* ==========================================================
   REVISOR PACKAGE 22L-10B65Q-F
   TASK COMMENT MULTILINE HISTORY
   Core already preserves newline characters in screen_text.
   ========================================================== */

#work-tasks-core-screen-text.rv-task-comments-screen {
  white-space: pre-wrap !important;
  overflow-wrap: anywhere;
}

/* ==========================================================
   REVISOR PACKAGE 22L-10B66-D
   REPORT CREATION WIZARD
   Visual parity with task creation.
   ========================================================== */

[data-core-flow-host="reports"].rv-report-create-wizard {
  width: min(100%, 980px) !important;
  max-width: 980px !important;
  margin: 0 !important;
  padding: 24px 26px 28px !important;
  box-sizing: border-box !important;

  border:
    1px solid
    rgba(23, 32, 51, 0.10) !important;

  border-radius: 16px !important;
  background: #ffffff !important;

  box-shadow:
    0 5px 18px
    rgba(15, 23, 42, 0.05) !important;
}

[data-core-flow-host="reports"].rv-report-create-wizard
.rv-report-create-header {
  display: block;
  width: 100%;
  margin: 0 0 14px;
}

[data-core-flow-host="reports"].rv-report-create-wizard
.core-flow-screen {
  display: block !important;
  width: 100% !important;
  margin: 0 0 22px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  white-space: normal !important;
}

.rv-report-create-screen {
  display: block !important;
}

.rv-report-create-hint {
  display: block;
  margin-top: 12px;
  padding: 11px 13px;

  border:
    1px solid
    rgba(23, 32, 51, 0.08);

  border-radius: 10px;
  background: #f8fafb;

  color: #667782;
  font-size: 0.92rem;
  line-height: 1.45;
}

[data-core-flow-host="reports"].rv-report-create-wizard
.core-flow-keyboard {
  display: grid !important;
  grid-template-columns:
    repeat(2, minmax(0, 1fr)) !important;

  gap: 10px !important;
  width: 100% !important;
}

[data-core-flow-host="reports"].rv-report-create-wizard
button.rv-report-create-action {
  min-height: 50px !important;
  padding: 0.78rem 1rem !important;

  border-radius: 10px !important;

  border:
    1px solid
    rgba(23, 32, 51, 0.13) !important;

  background: #ffffff !important;
  color: #2f4654 !important;

  font-weight: 650 !important;
  line-height: 1.3 !important;

  box-shadow:
    0 2px 8px
    rgba(15, 23, 42, 0.04) !important;
}

[data-core-flow-host="reports"].rv-report-create-wizard
button.rv-report-create-action:hover {
  border-color: #aebdc7 !important;
  background: #f8fafb !important;

  box-shadow:
    0 5px 14px
    rgba(23, 32, 51, 0.06) !important;
}

[data-core-flow-host="reports"].rv-report-create-wizard
button.rv-report-create-action-secondary {
  grid-column: 1 / -1 !important;

  width: auto !important;
  min-height: 38px !important;

  justify-self: start !important;

  margin-top: 4px !important;
  padding: 0.45rem 0.6rem !important;

  border-color: transparent !important;
  background: transparent !important;

  color: #6d7b84 !important;

  box-shadow: none !important;
  font-weight: 550 !important;
}

[data-core-flow-host="reports"].rv-report-create-wizard
button.rv-report-create-action-secondary:hover {
  border-color: transparent !important;
  background: #f5f7f8 !important;
  color: #31556d !important;
  box-shadow: none !important;
}

[data-core-flow-host="reports"].rv-report-create-wizard
button.rv-report-create-action-attachment {
  border-color: #c9d8e1 !important;
  background: #f8fbfc !important;
  color: #31556d !important;
}

[data-core-flow-host="reports"].rv-report-create-wizard
.core-flow-input {
  width: 100% !important;
  min-height: 50px !important;

  padding:
    0.75rem
    0.95rem !important;

  box-sizing: border-box !important;

  border:
    1px solid
    #c7d2d9 !important;

  border-radius: 10px !important;
  background: #ffffff !important;

  color: #223440 !important;
  font-size: 1rem !important;
}

[data-core-flow-host="reports"].rv-report-create-wizard
.core-flow-input:focus {
  outline: none !important;
  border-color: #52758c !important;

  box-shadow:
    0 0 0 3px
    rgba(49, 85, 109, 0.10) !important;
}

[data-core-flow-host="reports"].rv-report-create-wizard
.rv-report-create-date-input {
  min-height: 50px !important;
}

@media (max-width: 760px) {
  [data-core-flow-host="reports"].rv-report-create-wizard {
    width: 100% !important;

    padding:
      18px
      14px
      22px !important;

    border-radius: 12px !important;
  }

  [data-core-flow-host="reports"].rv-report-create-wizard
  .core-flow-keyboard {
    grid-template-columns:
      minmax(0, 1fr) !important;
  }

  [data-core-flow-host="reports"].rv-report-create-wizard
  button.rv-report-create-action {
    min-height: 52px !important;
  }

  [data-core-flow-host="reports"].rv-report-create-wizard
  button.rv-report-create-action-secondary {
    width: 100% !important;
  }
}

/* PACKAGE_22L_10B66_AN_R29_CLIENT_TASK_PRESENTATION */

[data-core-flow-host="clients"].rv-task-create-wizard {
  box-sizing: border-box !important;
}

[data-core-flow-host="clients"].rv-task-create-wizard
.rv-task-create-screen {
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 !important;

  color: #223440 !important;

  font-size: 1.05rem !important;
  line-height: 1.7 !important;
}

[data-core-flow-host="clients"].rv-task-create-wizard
.rv-task-create-header {
  margin: 0 0 18px !important;
}

[data-core-flow-host="clients"].rv-task-create-wizard
.rv-task-create-title {
  display: block !important;

  margin: 0 !important;

  font-size: 1.35rem !important;
  line-height: 1.25 !important;
  font-weight: 720 !important;
}

[data-core-flow-host="clients"].rv-task-create-wizard
.rv-task-create-step {
  display: block !important;

  margin-top: 5px !important;

  color: #7b8992 !important;

  font-size: 0.82rem !important;
  line-height: 1.35 !important;
  font-weight: 650 !important;
}

[data-core-flow-host="clients"].rv-task-create-wizard
.rv-task-create-question {
  display: block !important;

  margin-top: 14px !important;

  color: #344955 !important;

  font-size: 1rem !important;
  line-height: 1.45 !important;
  font-weight: 550 !important;

  white-space: pre-wrap !important;
}

[data-core-flow-host="clients"].rv-task-create-wizard
.rv-task-create-summary {
  display: block !important;

  margin: 12px 0 22px !important;

  padding: 17px 18px !important;

  border:
    1px solid
    #dbe4e9 !important;

  border-radius: 12px !important;

  background: #f8fafb !important;

  color: #314651 !important;

  font-size: 0.96rem !important;
  line-height: 1.6 !important;

  white-space: pre-wrap !important;
}

[data-core-flow-host="clients"].rv-task-create-wizard
.core-flow-keyboard-button.rv-task-create-action {
  min-height: 50px !important;

  border-radius: 10px !important;

  font-weight: 650 !important;
}

@media (max-width: 760px) {
  [data-core-flow-host="clients"].rv-task-create-wizard
  .rv-task-create-title {
    font-size: 1.22rem !important;
  }

  [data-core-flow-host="clients"].rv-task-create-wizard
  .rv-task-create-question {
    font-size: 1rem !important;
  }
}


/*
 * PACKAGE_22L_10B66_AN_R47
 *
 * During canonical Client creation show one wizard surface only.
 *
 * The Core Flow host is prepended before the legacy Clients page
 * elements. Hide those following legacy elements only while the
 * Clients Core Flow host is in task-style creation mode.
 *
 * CSS only:
 * - no Task code changes
 * - no Report code changes
 * - no backend changes
 */
#section-clients
> [data-core-flow-host="clients"].rv-task-create-wizard
~ .section-heading,

#section-clients
> [data-core-flow-host="clients"].rv-task-create-wizard
~ article.panel,

#section-clients
> [data-core-flow-host="clients"].rv-task-create-wizard
~ #work-clients-list {
  display: none !important;
}


/*
 * PACKAGE_22L_10B66_AN_R49
 *
 * Client Core Flow already uses the canonical Task Wizard
 * semantic classes. Apply the same presentation to the
 * Clients host without touching Task behaviour or Client logic.
 */

/* Main wizard card */
#section-clients
> [data-core-flow-host="clients"].rv-task-create-wizard {
  width: min(100%, 980px) !important;
  max-width: 980px !important;
  margin: 0 !important;
  padding: 24px 26px 28px !important;
  box-sizing: border-box !important;

  border:
    1px solid
    rgba(23, 32, 51, 0.10) !important;

  border-radius: 16px !important;
  background: #ffffff !important;

  box-shadow:
    0 8px 24px
    rgba(23, 32, 51, 0.055) !important;
}


/* Screen */
#section-clients
> [data-core-flow-host="clients"].rv-task-create-wizard
> .rv-task-create-screen {
  display: block !important;

  width: 100% !important;
  margin: 0 0 22px !important;
  padding: 0 !important;

  border: 0 !important;
  background: transparent !important;

  color: #223440 !important;

  white-space: normal !important;
}


/* Actions use the same visual language as Task */
#section-clients
> [data-core-flow-host="clients"].rv-task-create-wizard
.core-flow-keyboard
button.rv-task-create-action {
  min-height: 50px !important;

  padding:
    0.78rem
    1rem !important;

  border-radius: 10px !important;

  border:
    1px solid
    #d6dee3 !important;

  background: #ffffff !important;

  color: #223440 !important;

  box-shadow:
    0 3px 10px
    rgba(23, 32, 51, 0.035) !important;

  font-weight: 650 !important;
}


#section-clients
> [data-core-flow-host="clients"].rv-task-create-wizard
.core-flow-keyboard
button.rv-task-create-action:hover {
  border-color: #aebdc7 !important;
  background: #f8fafb !important;

  box-shadow:
    0 5px 14px
    rgba(23, 32, 51, 0.06) !important;
}


/* Typed answer */
#section-clients
> [data-core-flow-host="clients"].rv-task-create-wizard
.core-flow-input-form {
  width: 100% !important;
  max-width: 100% !important;
}


#section-clients
> [data-core-flow-host="clients"].rv-task-create-wizard
.core-flow-input {
  width: 100% !important;
  min-height: 50px !important;

  box-sizing: border-box !important;

  padding:
    0.78rem
    1rem !important;

  border:
    1px solid
    #d6dee3 !important;

  border-radius: 10px !important;

  background: #ffffff !important;

  color: #223440 !important;
}


/* Keep submit visually consistent */
#section-clients
> [data-core-flow-host="clients"].rv-task-create-wizard
.core-flow-submit-button {
  min-height: 50px !important;
  border-radius: 10px !important;
}


/* Mobile */
@media (max-width: 760px) {
  #section-clients
  > [data-core-flow-host="clients"].rv-task-create-wizard {
    width: 100% !important;

    padding:
      18px
      14px
      22px !important;

    border-radius: 12px !important;
  }

  #section-clients
  > [data-core-flow-host="clients"].rv-task-create-wizard
  > .rv-task-create-screen {
    margin-bottom: 16px !important;
  }

  #section-clients
  > [data-core-flow-host="clients"].rv-task-create-wizard
  .core-flow-keyboard {
    grid-template-columns:
      minmax(0, 1fr) !important;
  }
}


/*
 * PACKAGE_22L_10B66_AN_R52
 *
 * Typed Client creation follows Task hierarchy:
 * question -> helper -> input -> primary -> secondary.
 */

#section-clients
> [data-core-flow-host="clients"].rv-task-create-wizard {
  display: flex !important;
  flex-direction: column !important;
}

#section-clients
> [data-core-flow-host="clients"].rv-task-create-wizard
> .rv-task-create-screen {
  order: 10 !important;
}

#section-clients
> [data-core-flow-host="clients"].rv-task-create-wizard
> .core-flow-input-form {
  order: 20 !important;
}

#section-clients
> [data-core-flow-host="clients"].rv-task-create-wizard
> .core-flow-keyboard {
  order: 30 !important;
}

#section-clients
> [data-core-flow-host="clients"].rv-task-create-wizard
button.rv-task-create-action-secondary {
  width: auto !important;
  min-height: 38px !important;

  align-self: flex-start !important;

  margin-top: 4px !important;

  padding:
    0.45rem
    0.65rem !important;

  border-color: transparent !important;
  background: transparent !important;
  color: #4d6677 !important;

  box-shadow: none !important;

  font-weight: 550 !important;
}

#section-clients
> [data-core-flow-host="clients"].rv-task-create-wizard
button.rv-task-create-action-secondary:hover {
  border-color: transparent !important;
  color: #31556d !important;
  background: #f5f7f8 !important;
  box-shadow: none !important;
}

@media (max-width: 760px) {
  #section-clients
  > [data-core-flow-host="clients"].rv-task-create-wizard
  button.rv-task-create-action-secondary {
    width: 100% !important;
  }
}


/*
 * PACKAGE_22L_10B66_AN_R56_GRID
 *
 * Client creation uses the canonical Task Wizard
 * choice structure.
 *
 * Desktop: two equal columns.
 * Mobile: one action per row.
 */

/* Flatten Core Flow bot-style rows into one wizard grid. */
#section-clients
> [data-core-flow-host="clients"].rv-task-create-wizard
> .core-flow-keyboard {
  display: grid !important;

  width: 100% !important;

  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    ) !important;

  gap: 10px !important;
}

#section-clients
> [data-core-flow-host="clients"].rv-task-create-wizard
> .core-flow-keyboard
> .core-flow-keyboard-row {
  display: contents !important;
}


/* All normal choices occupy equal grid cells. */
#section-clients
> [data-core-flow-host="clients"].rv-task-create-wizard
> .core-flow-keyboard
button.rv-task-create-action {
  width: 100% !important;
  min-width: 0 !important;

  justify-self: stretch !important;

  text-align: left !important;
}


/* Same attachment cue as Task creation. */
#section-clients
> [data-core-flow-host="clients"].rv-task-create-wizard
button.rv-task-create-action-attachment {
  border-color: #c9d8e1 !important;

  color: #31556d !important;

  background: #f8fbfc !important;
}


/* Cancel/back is navigation, not an answer choice. */
#section-clients
> [data-core-flow-host="clients"].rv-task-create-wizard
> .core-flow-keyboard
button.rv-task-create-action-secondary {
  grid-column: 1 / -1 !important;

  width: auto !important;

  justify-self: start !important;

  text-align: left !important;
}


/* Typed steps retain Task-like spacing. */
#section-clients
> [data-core-flow-host="clients"].rv-task-create-wizard
> .core-flow-input-form {
  margin-top: 6px !important;
  margin-bottom: 10px !important;
}


#section-clients
> [data-core-flow-host="clients"].rv-task-create-wizard
> .rv-task-create-screen {
  margin-bottom: 22px !important;
}


@media (max-width: 760px) {
  #section-clients
  > [data-core-flow-host="clients"].rv-task-create-wizard
  > .core-flow-keyboard {
    grid-template-columns:
      minmax(0, 1fr) !important;
  }

  #section-clients
  > [data-core-flow-host="clients"].rv-task-create-wizard
  > .core-flow-keyboard
  button.rv-task-create-action-secondary {
    grid-column: 1 !important;

    width: 100% !important;
  }
}


/*
 * PACKAGE_22L_10B66_AN_R57_UX
 *
 * Final Client creation interaction hierarchy.
 *
 * - helper/example is visually connected to its input;
 * - input and primary action have a safe separation;
 * - typed screens use the same strong primary action;
 * - Back/Cancel are quiet navigation actions.
 */

#section-clients
> [data-core-flow-host="clients"].rv-task-create-wizard
> .rv-task-create-screen {
  margin-bottom: 10px !important;
}


#section-clients
> [data-core-flow-host="clients"].rv-task-create-wizard
> .core-flow-input-form {
  margin-top: 0 !important;
  margin-bottom: 18px !important;

  gap: 16px !important;
}


#section-clients
> [data-core-flow-host="clients"].rv-task-create-wizard
> .core-flow-input-form
> .core-flow-input {
  margin: 0 !important;
}


#section-clients
> [data-core-flow-host="clients"].rv-task-create-wizard
> .core-flow-input-form
> button {
  width: 100% !important;

  min-height: 50px !important;

  margin-top: 0 !important;

  justify-self: stretch !important;
}


/*
 * Back and Cancel must not compete with answer choices
 * or the primary "Далее" action.
 */

#section-clients
> [data-core-flow-host="clients"].rv-task-create-wizard
> .core-flow-keyboard
button.rv-task-create-action-secondary {
  grid-column: 1 / -1 !important;

  width: auto !important;
  min-height: 34px !important;

  padding:
    6px
    4px !important;

  justify-self: start !important;

  border-color: transparent !important;

  color: #6d7b84 !important;
  background: transparent !important;

  box-shadow: none !important;

  font-size: .9rem !important;
  font-weight: 550 !important;
}


#section-clients
> [data-core-flow-host="clients"].rv-task-create-wizard
button.rv-client-create-back {
  margin-top: 4px !important;
}


@media (max-width: 760px) {
  #section-clients
  > [data-core-flow-host="clients"].rv-task-create-wizard
  > .core-flow-input-form {
    gap: 16px !important;
  }


  #section-clients
  > [data-core-flow-host="clients"].rv-task-create-wizard
  > .core-flow-keyboard
  button.rv-task-create-action-secondary {
    width: auto !important;

    justify-self: start !important;
  }
}

/*
 * PACKAGE 22L-10B66-AN-R57-R35
 *
 * Task Core visibility invariant.
 *
 * Presentation rules use display:* !important for task wizard
 * descendants. A hidden task flow must always remain completely
 * invisible regardless of presentation classes left on descendants.
 */
#work-tasks-core-wizard[hidden],
#work-tasks-core-wizard.hidden,
#work-tasks-core-recurring-flow[hidden],
#work-tasks-core-recurring-flow.hidden,
#work-tasks-core-template-flow[hidden],
#work-tasks-core-template-flow.hidden {
  display: none !important;
}

/* Unified editors for existing tasks and reports. */
.work-edit-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: var(--surface, #fff);
  color: var(--text, #172033);
  box-shadow: 0 24px 80px rgba(23, 32, 51, 0.28);
}

.work-edit-dialog::backdrop {
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(2px);
}

.work-edit-form {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.work-edit-header,
.work-edit-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.work-edit-header h2 {
  margin: 0;
  font-size: clamp(18px, 3vw, 24px);
}

.work-edit-close {
  flex: 0 0 42px;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(23, 32, 51, 0.07);
  color: inherit;
  font-size: 28px;
  line-height: 1;
}

.work-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.work-edit-field {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted, #5d6678);
}

.work-edit-field-wide,
.work-edit-check,
.work-edit-consultation {
  grid-column: 1 / -1;
}

.work-edit-control {
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(23, 32, 51, 0.18);
  border-radius: 10px;
  background: #fff;
  color: #172033;
  font: inherit;
  font-weight: 500;
}

textarea.work-edit-control {
  min-height: 100px;
  resize: vertical;
}

.work-edit-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 650;
}

.work-edit-check input {
  width: 20px;
  height: 20px;
  margin: 0;
}

.work-edit-consultation {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(23, 32, 51, 0.12);
  border-radius: 12px;
}

.work-edit-consultation[hidden] {
  display: none;
}

.work-edit-consultation legend {
  padding: 0 6px;
  font-weight: 700;
}

.work-edit-message {
  min-height: 20px;
  color: var(--danger, #b42318);
  font-size: 14px;
}

.work-edit-actions {
  justify-content: flex-end;
}

.work-edit-toolbar {
  margin-bottom: 4px;
}

@media (max-width: 620px) {
  .work-edit-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 14px;
  }

  .work-edit-form {
    gap: 14px;
    padding: 16px;
  }

  .work-edit-grid,
  .work-edit-consultation {
    grid-template-columns: minmax(0, 1fr);
  }

  .work-edit-consultation .work-edit-field {
    grid-column: 1;
  }

  .work-edit-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .work-edit-actions button {
    width: 100%;
  }

  .work-edit-actions button[type="submit"] {
    grid-row: 1;
  }
}

.skip-link {
  position: fixed;
  z-index: 10000;
  top: 10px;
  left: 10px;
  transform: translateY(-150%);
  padding: 10px 14px;
  border-radius: 9px;
  background: #172033;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: transform 120ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Release 1.2.0 follow-up: one shared Do Now presentation on Tasks and Today. */

html[data-surface="vk"] #install-button,
html[data-surface="vk"] #logout-button,
html[data-surface="vk"] .auth-tabs,
html[data-surface="vk"] .demo-entry {
  display: none !important;
}
#work-tasks-core-screen-text.rv-task-do-now-screen,
#work-today-do-now.rv-task-do-now-screen {
  display: grid !important;
  gap: 16px !important;
  padding: 16px !important;
  white-space: normal !important;
}

#work-tasks-core-screen-text .rv-task-do-now-recommendation,
#work-today-do-now .rv-task-do-now-recommendation {
  display: block !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#work-tasks-core-screen-text button.rv-task-do-now-task,
#work-today-do-now button.rv-task-do-now-task {
  appearance: none;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 12px 14px !important;
  border: 1px solid rgba(23, 32, 51, 0.14) !important;
  border-left: 4px solid var(--primary) !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: var(--text) !important;
  box-shadow: none !important;
  font: inherit;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  cursor: pointer;
}

#work-tasks-core-screen-text button.rv-task-do-now-task-featured,
#work-today-do-now button.rv-task-do-now-task-featured {
  padding: 15px 17px !important;
  border-width: 2px !important;
  border-left-width: 5px !important;
  border-radius: 12px !important;
  background: #f8fbfd !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08) !important;
}

#work-tasks-core-screen-text button.rv-task-do-now-task:hover,
#work-today-do-now button.rv-task-do-now-task:hover {
  background: #f7fafb !important;
  border-color: rgba(49, 96, 122, 0.38) !important;
  border-left-color: var(--primary) !important;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.08) !important;
  transform: translateY(-1px);
}

/* Search is divided into current, completed and archived destinations. */
#work-search-results .rv-search-lifecycle {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafb;
}

#work-search-results .rv-search-lifecycle-completed {
  background: #f4faf7;
}

#work-search-results .rv-search-lifecycle-archived {
  background: #fbf7f7;
}

#work-search-results .rv-search-lifecycle-title {
  margin: 0;
  font-size: 1.08rem;
}

#work-search-results .rv-search-result-group {
  margin-top: 0;
}

#work-search-results .rv-search-result-title-row {
  display: flex !important;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

#work-search-results .rv-search-result-title-row strong {
  min-width: 0;
}

#work-search-results .rv-search-status {
  flex: 0 0 auto;
  width: fit-content;
  margin: 0 !important;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eaf1f5;
  color: #31556d;
  font-size: .74rem;
  font-weight: 750;
}

#work-search-results .rv-search-status-completed {
  background: #e4f4eb;
  color: #217044;
}

#work-search-results .rv-search-status-archived {
  background: #f4e7e7;
  color: #92413d;
}

#work-search-results .rv-search-result-location {
  font-weight: 650;
}

/* All three creation flows use the Client wizard's quiet Back action. */
button.rv-wizard-back {
  width: auto !important;
  min-height: 34px !important;
  margin-top: 4px !important;
  padding: 6px 4px !important;
  justify-self: start !important;
  border-color: transparent !important;
  color: #6d7b84 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: .9rem !important;
  font-weight: 550 !important;
}

button.rv-wizard-back:hover {
  color: var(--primary) !important;
  background: #f3f7f9 !important;
}

/* Existing-client attachments: make the upload target explicit. */
.rv-client-file-upload {
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
  padding: 18px;
  border: 2px dashed rgba(49, 96, 122, 0.38);
  border-radius: 13px;
  background: #f7fafc;
}

.rv-client-file-upload-title {
  font-size: 1.06rem;
  font-weight: 750;
}

.rv-client-file-upload-hint,
.rv-client-file-upload-status {
  color: var(--muted);
  line-height: 1.45;
}

.rv-client-file-upload .core-flow-file-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.rv-client-file-upload .core-flow-file-input::file-selector-button {
  min-height: 38px;
  margin-right: 12px;
  padding: 8px 13px;
  border: 1px solid var(--primary);
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.rv-client-file-upload-error {
  color: var(--danger, #b42318) !important;
  font-weight: 650;
}

/* Client deletion uses an unmistakable primary danger and real cancel button. */
button.rv-client-delete-confirm-action {
  width: 100% !important;
  min-height: 48px !important;
  padding: 11px 14px !important;
  border-radius: 10px !important;
  font-weight: 750 !important;
  text-align: center !important;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.07) !important;
}

button.rv-client-delete-confirm-danger {
  border: 1px solid #b42318 !important;
  background: #b42318 !important;
  color: #fff !important;
}

button.rv-client-delete-confirm-danger:hover {
  background: #921f16 !important;
}

button.rv-client-delete-confirm-cancel {
  border: 1px solid var(--border) !important;
  background: #fff !important;
  color: var(--text) !important;
}

@media (max-width: 760px) {
  #work-search-results .rv-search-result-title-row {
    display: grid !important;
  }

  .rv-client-file-upload {
    padding: 14px;
  }
}


/* ==========================================================
   RELEASE v1276
   PUBLIC LEGAL FOOTER
   Shared by PWA and VK Mini App
   ========================================================== */

#auth-view .public-legal-footer {
  grid-column: 1 / -1;

  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;

  width: 100%;
  margin-top: 10px;
  padding: 18px 0 4px;

  border-top:
    1px solid
    rgba(23, 32, 51, 0.10);

  color: #617083;
  font-size: 12px;
  line-height: 1.55;
}

#auth-view .public-legal-footer__identity {
  display: flex;
  flex-direction: column;
  gap: 2px;

  min-width: 280px;
}

#auth-view .public-legal-footer__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;

  gap: 6px 0;
}

#auth-view .public-legal-footer__links a {
  color: #2f6680;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

#auth-view .public-legal-footer__links a:hover,
#auth-view .public-legal-footer__links a:focus-visible {
  color: #172033;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#auth-view .public-legal-footer__links a:not(:last-child)::after {
  content: "·";
  display: inline-block;

  margin: 0 9px;

  color: #94a0ad;
  text-decoration: none;
}

@media (max-width: 900px) {
  #auth-view .public-legal-footer {
    flex-direction: column;
    align-items: flex-start;

    padding-bottom:
      calc(
        8px
        + env(safe-area-inset-bottom, 0px)
      );
  }

  #auth-view .public-legal-footer__identity {
    min-width: 0;
  }

  #auth-view .public-legal-footer__links {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  #auth-view .public-legal-footer {
    font-size: 11px;
  }

  #auth-view .public-legal-footer__links {
    display: block;
  }

  #auth-view .public-legal-footer__links a {
    display: block;
    width: fit-content;
    margin-top: 5px;
    white-space: normal;
  }

  #auth-view .public-legal-footer__links a::after {
    display: none !important;
  }
}


/* ==================================================
   v1278 — guided first-run onboarding
   ================================================== */

#app-view.onboarding-active .app-nav {
  display: none;
}

#app-view.onboarding-active .app-body {
  grid-template-columns: minmax(0, 1fr);
}

#app-view.onboarding-active #app-main {
  max-width: 1180px;
  width: 100%;
  margin-inline: auto;
}

#section-overview.onboarding-workspace-step
  > .card-grid {
  display: none;
}

#section-overview.onboarding-workspace-step
  > .panel:not(#no-role-onboarding-panel) {
  display: none;
}

#section-overview.onboarding-workspace-step
  #no-role-onboarding-panel {
  display: block;
  max-width: 760px;
}

#section-overview.onboarding-workspace-step
  #no-role-onboarding-panel.hidden {
  display: block;
}

#section-overview.onboarding-workspace-step
  #no-role-onboarding-panel .stack {
  max-width: 560px;
}

#section-legal.onboarding-legal-step
  .legal-grid {
  max-width: 1000px;
}

#section-legal.onboarding-legal-step
  .card {
  min-height: 180px;
}

@media (max-width: 720px) {
  #app-view.onboarding-active #app-main {
    width: 100%;
  }

  #section-overview.onboarding-workspace-step
    #no-role-onboarding-panel {
    max-width: none;
  }
}



/* ==================================================
   v1279 — navigation and channels
   ================================================== */

.more-menu-v1279 {
  display: grid;
  gap: 16px;
}

.more-menu-group-title-v1279 {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.more-channels-button-v1279 {
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.more-channels-button-v1279 span {
  font-size: 0.9rem;
  font-weight: 400;
  opacity: 0.75;
}

.channels-open-grid-v1279,
.messenger-discovery-actions-v1279 {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.channels-open-link-v1279 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.channels-intro-v1279 {
  margin-bottom: 16px;
}

.v1279-workday-chooser {
  margin-top: 12px;
}

.v1279-workday-chooser
  .more-navigation-grid {
  margin-top: 12px;
}

.support-tools-v1279 {
  margin-bottom: 16px;
}

#history-audit-host-v1279,
#support-diagnostics-host-v1279 {
  margin-top: 16px;
}

.messenger-discovery-v1279 {
  margin-bottom: 16px;
}

.messenger-discovery-v1279 h2 {
  margin-top: 0;
}

@media (max-width: 720px) {
  .channels-open-grid-v1279,
  .messenger-discovery-actions-v1279 {
    flex-direction: column;
  }

  .channels-open-link-v1279,
  .messenger-discovery-actions-v1279
    button {
    width: 100%;
  }
}

