@font-face {
  font-family: "Estedad";
  src: url("fonts/Estedad-wght.a30f0be474a2.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #050b19;
  --bg-2: #081426;
  --panel: rgba(14, 27, 48, 0.88);
  --panel-2: rgba(18, 35, 62, 0.72);
  --line: rgba(156, 178, 214, 0.18);
  --text: #f4f8ff;
  --muted: #9eb0ca;
  --blue: #4aa3ff;
  --purple: #a970ff;
  --green: #2ee6a6;
  --red: #ff5f76;
  --amber: #ffbd59;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100dvh;
  position: relative;
  isolation: isolate;
  background: #030713;
  color: var(--text);
  font-family: "Estedad", Tahoma, Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(820px 620px at 12% 4%, rgba(128, 76, 205, 0.25), transparent 72%),
    radial-gradient(780px 600px at 92% 10%, rgba(34, 119, 183, 0.18), transparent 72%),
    linear-gradient(145deg, #030713 0%, #050b19 52%, #07101e 100%);
}

body::after {
  content: "";
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  height: env(safe-area-inset-top);
  pointer-events: none;
  background: #15162f;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  line-height: 1.9;
}

button,
input,
select,
textarea {
  font: inherit;
  font-size: 16px;
}

button {
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: white;
  padding: 10px 14px;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(74, 163, 255, 0.2);
}

button.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  box-shadow: none;
}

button.danger {
  background: linear-gradient(135deg, #ff4967, #c32648);
}

button.tiny {
  padding: 7px 10px;
  font-size: 12px;
}

.manual-points-positive {
  color: var(--green);
}

.manual-points-negative {
  color: var(--red);
}

button:disabled,
.button-link[aria-disabled="true"] {
  cursor: progress;
  opacity: 0.66;
}

.is-submitting {
  cursor: progress;
}

.app-loading {
  position: fixed;
  z-index: 110;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(5, 11, 25, 0.48);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
  backdrop-filter: blur(8px);
}

.app-loading.visible {
  opacity: 1;
  pointer-events: auto;
}

.app-loading > div {
  width: min(360px, 100%);
  border: 1px solid rgba(74, 163, 255, 0.36);
  border-radius: 8px;
  padding: 18px;
  background: rgba(8, 20, 38, 0.96);
  box-shadow: var(--shadow);
  display: grid;
  gap: 9px;
  text-align: center;
}

.app-loading span {
  width: 42px;
  height: 42px;
  margin: 0 auto 2px;
  border: 3px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.app-loading b {
  font-size: 16px;
}

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

.app-update {
  position: fixed;
  z-index: 105;
  inset-inline: max(18px, env(safe-area-inset-left)) max(18px, env(safe-area-inset-right));
  inset-block-end: max(18px, env(safe-area-inset-bottom));
  width: min(720px, calc(100% - 36px));
  margin-inline: auto;
  border: 1px solid rgba(74, 163, 255, 0.48);
  border-radius: 12px;
  padding: 14px;
  background: rgba(8, 20, 38, 0.98);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.42);
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  backdrop-filter: blur(18px);
}

.app-update.visible {
  display: flex;
}

.app-update-copy {
  display: grid;
  gap: 4px;
}

.app-update-copy b {
  color: var(--text);
  font-size: 15px;
}

.app-update-copy span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.app-update button {
  flex: 0 0 auto;
  min-width: 178px;
  background: linear-gradient(135deg, var(--green), var(--blue));
}

.pwa-install {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: max(14px, env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.38);
  color: #172033;
}

.pwa-install.visible {
  display: flex;
}

.pwa-install-card {
  position: relative;
  width: min(430px, 100%);
  min-height: min(78dvh, 720px);
  border-radius: 22px 22px 0 0;
  padding: 30px 22px 22px;
  background: #ffffff;
  box-shadow: 0 -20px 80px rgba(0, 0, 0, 0.28);
  display: grid;
  align-content: center;
  gap: 18px;
  text-align: center;
}

.pwa-install-close {
  position: absolute;
  inset-block-start: 14px;
  inset-inline-start: 14px;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  background: #eef2f7;
  color: #566176;
  box-shadow: none;
  font-size: 24px;
  line-height: 1;
}

.pwa-install-mark {
  width: 58px;
  height: 58px;
  margin: 0 auto 8px;
  border-radius: 8px;
  background: #21ad5b;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 42px;
  font-weight: 900;
}

.pwa-install h2 {
  margin: 0;
  font-size: 26px;
  color: #182136;
}

.pwa-install p {
  margin: 0;
  color: #5f687a;
}

.pwa-install ol {
  margin: 0;
  padding: 18px 0 0;
  border-top: 1px solid #e7ebf2;
  list-style: none;
  display: grid;
  gap: 14px;
  text-align: right;
}

.pwa-install li,
.pwa-android-steps {
  color: #6d7483;
  font-size: 16px;
  line-height: 1.9;
}

.pwa-install li span {
  color: #252e42;
  font-weight: 900;
  margin-inline-end: 4px;
}

.pwa-android-steps {
  display: none;
  padding: 18px 0 0;
  border-top: 1px solid #e7ebf2;
}

.pwa-install.is-android .pwa-ios-steps {
  display: none;
}

.pwa-install.is-android .pwa-android-steps {
  display: block;
}

.pwa-install-ok {
  align-self: end;
  width: 100%;
  min-height: 56px;
  margin-top: 20px;
  background: #21ad5b;
  box-shadow: none;
  font-size: 20px;
  font-weight: 900;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: white;
  padding: 11px 15px;
  font-weight: 700;
}

.modal-backdrop {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: none;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  background: rgba(5, 11, 25, 0.68);
  backdrop-filter: blur(10px);
}

.modal-backdrop.visible {
  display: grid;
}

.modal-panel {
  width: min(560px, 100%);
  max-height: calc(100dvh - 36px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-y: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(18, 35, 62, 0.96), rgba(8, 20, 38, 0.96));
  box-shadow: var(--shadow);
}

.modal-panel h3 {
  margin: 8px 0 10px;
  font-size: 26px;
}

.modal-panel p {
  color: var(--muted);
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.modal-close {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  font-size: 26px;
}

.point-propagation-panel {
  position: relative;
  padding-top: 64px;
}

.point-propagation-panel > .modal-close {
  position: absolute;
  top: 16px;
  left: 16px;
}

.point-rotation-list {
  display: grid;
  gap: 10px;
  max-height: min(330px, 42dvh);
  margin-top: 18px;
  overflow-y: auto;
}

.point-rotation-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.point-rotation-option:hover,
.point-rotation-option:has(input:checked) {
  border-color: rgba(69, 210, 162, 0.7);
  background: rgba(69, 210, 162, 0.1);
}

.point-rotation-option input {
  width: auto;
  flex: 0 0 auto;
}

.point-rotation-option span {
  display: grid;
  gap: 4px;
}

.point-rotation-option small {
  color: var(--muted);
}

.deadline-hours-field {
  margin-top: 18px;
}

.deadline-hours-field input {
  margin-top: 8px;
  max-width: 180px;
  text-align: center;
  direction: ltr;
  font-size: 26px;
  font-weight: 900;
}

.button-link.small {
  padding: 7px 10px;
  font-size: 12px;
}

.button-link.danger-link,
button.danger {
  background: linear-gradient(135deg, #ff4967, #c32648);
}

.button-link.edit-link {
  background: linear-gradient(135deg, #ffbd59, #d9891f);
  color: #1c1306;
}

.button-link.view-link {
  background: linear-gradient(135deg, #4aa3ff, #5a6cff);
}

.icon-view:after,
.icon-edit:after,
.icon-delete:after,
.icon-accept:after,
.icon-reject:after,
.icon-back:after,
.icon-add:after,
.icon-save:after,
.icon-swap:after,
.icon-restart:after,
.icon-download:after,
.icon-send:after {
  display: inline-block;
  font-weight: 900;
  line-height: 1;
}

button.icon-view,
button.icon-edit,
button.icon-delete,
button.icon-accept,
button.icon-reject,
button.icon-back,
button.icon-add,
button.icon-save,
button.icon-swap,
button.icon-restart,
button.icon-download,
button.icon-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.icon-view:after {
  content: "◉";
}

.icon-edit:after {
  content: "✎";
}

.icon-delete:after,
.icon-reject:after {
  content: "×";
}

.icon-accept:after,
.icon-save:after {
  content: "✓";
}

.icon-back:after {
  content: "←";
}

.icon-add:after {
  content: "+";
}

.icon-swap:after {
  content: "↔";
}

.icon-restart:after {
  content: "↻";
}

.icon-download:after {
  content: "⇩";
}

.icon-send:after {
  content: "↗";
}

button.regenerate-button {
  background: #20c98f;
  border-color: #57e9b7;
  color: #061b14;
  box-shadow: 0 10px 24px rgba(32, 201, 143, 0.2);
}

button.regenerate-button:hover {
  background: #35dda4;
  border-color: #7af1c8;
}

.coin-value,
.coin-label,
.wallet-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.coin-value:before,
.coin-label:before,
.wallet-label:before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.coin-value:before,
.coin-label:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffc857' stroke-width='1.8'%3E%3Ccircle cx='12' cy='12' r='8.5' fill='%23ffc857' fill-opacity='.18'/%3E%3Cpath d='M9 9.3c.9-.8 1.9-1.2 3.2-1.2 1.6 0 2.8.7 2.8 1.9 0 1.3-1.2 1.8-3 2-1.8.2-3 .7-3 2 0 1.2 1.2 1.9 2.9 1.9 1.3 0 2.4-.4 3.2-1.2M12 6.5v11'/%3E%3C/svg%3E");
}

.wallet-label:before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235ad8c6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7.5A2.5 2.5 0 0 1 6.5 5H18a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H6.5A2.5 2.5 0 0 1 4 16.5v-9Z' fill='%235ad8c6' fill-opacity='.12'/%3E%3Cpath d='M4 8h14M15 13h5M16.5 13h.01'/%3E%3C/svg%3E");
}

.secondary-link {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.full {
  width: 100%;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  outline: none;
}

select {
  appearance: none;
  padding-left: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%239eb0ca' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  background-size: 16px;
}

textarea {
  min-height: 88px;
}

select option {
  color: #091324;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(74, 163, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(74, 163, 255, 0.14);
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.field-unit {
  color: var(--amber);
  font-size: 11px;
}

.mobile-disclosure {
  display: block;
  min-width: 0;
}

.disclosure-summary {
  display: none;
}

.mobile-disclosure:not([open]) > .disclosure-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  color: var(--text);
  font-weight: 800;
  list-style: none;
}

.mobile-disclosure:not([open]) > .disclosure-summary::-webkit-details-marker {
  display: none;
}

.mobile-disclosure:not([open]) > .disclosure-summary:after {
  content: "+";
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(74, 163, 255, 0.12);
  color: var(--blue);
}

.mobile-disclosure:not([open]) > .disclosure-summary small {
  margin-inline-start: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.disclosure-body {
  min-width: 0;
}

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

.owner-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  background:
    linear-gradient(90deg, rgba(46, 230, 166, 0.05), transparent 38%),
    linear-gradient(145deg, rgba(5, 11, 25, 0.96), rgba(8, 20, 38, 0.82));
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: rgba(5, 13, 29, 0.78);
  border-left: 1px solid var(--line);
  backdrop-filter: blur(18px);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.owner-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  border-left: 1px solid var(--line);
  background: rgba(5, 13, 29, 0.84);
  backdrop-filter: blur(18px);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.owner-content {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 30px;
  display: grid;
  align-content: start;
  gap: 18px;
}

.owner-nav {
  display: grid;
  gap: 8px;
}

.owner-nav a {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 12px;
  color: #d9e6ff;
  font-weight: 800;
}

.owner-nav a:hover,
.owner-nav a[aria-current="page"] {
  border-color: rgba(46, 230, 166, 0.28);
  background: rgba(46, 230, 166, 0.08);
}

.owner-hero {
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(46, 230, 166, 0.1), transparent 45%),
    rgba(14, 27, 48, 0.84);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  box-shadow: var(--shadow);
}

.owner-hero h2 {
  margin: 0;
  font-size: clamp(32px, 5vw, 58px);
}

.owner-hero p {
  max-width: 720px;
}

.owner-command-hero {
  min-height: 170px;
}

.owner-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.owner-metrics-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.owner-metric {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    rgba(14, 27, 48, 0.82);
  padding: 16px;
  box-shadow: var(--shadow);
}

.owner-metric::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 4px;
  background: var(--accent-color, var(--blue));
}

.owner-metric span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.owner-metric b {
  display: block;
  margin-top: 12px;
  color: var(--text);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
}

.owner-metric small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.accent-blue {
  --accent-color: #49a6ff;
  --accent-rgb: 73, 166, 255;
}

.accent-green {
  --accent-color: #2ee6a6;
  --accent-rgb: 46, 230, 166;
}

.accent-purple {
  --accent-color: #a06bff;
  --accent-rgb: 160, 107, 255;
}

.accent-amber {
  --accent-color: #ffc15a;
  --accent-rgb: 255, 193, 90;
}

.accent-red {
  --accent-color: #ff5d7a;
  --accent-rgb: 255, 93, 122;
}

.owner-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.mobile-bottom-nav {
  display: none;
}

.mobile-bottom-nav a,
.mobile-bottom-nav button {
  position: relative;
  color: #d9e6ff;
  border: 1px solid transparent;
}

.mobile-bottom-nav svg {
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.owner-summary article,
.owner-admin-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 16px;
}

.owner-summary article span,
.owner-admin-row small,
.owner-admin-row span {
  color: var(--muted);
}

.owner-summary article b {
  display: block;
  margin-top: 8px;
  font-size: 34px;
}

.owner-admin-list {
  display: grid;
  gap: 10px;
}

.owner-admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.owner-admin-row div {
  display: grid;
  gap: 4px;
}

.owner-password-form {
  display: grid;
  gap: 14px;
}

.owner-admin-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.owner-admin-actions form {
  margin: 0;
}

.owner-command-panel {
  border: 1px solid rgba(73, 166, 255, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(73, 166, 255, 0.13), transparent 38%),
    rgba(14, 27, 48, 0.86);
  padding: 20px;
  box-shadow: var(--shadow);
}

.owner-command-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.owner-command-head h3 {
  margin: 0;
}

.owner-command-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.owner-result-count {
  flex: 0 0 auto;
  border: 1px solid rgba(46, 230, 166, 0.3);
  border-radius: 8px;
  background: rgba(46, 230, 166, 0.08);
  color: #bfffe9;
  padding: 8px 12px;
  font-weight: 900;
}

.owner-command-search {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-top: 16px;
}

.owner-command-search label {
  display: grid;
  gap: 7px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.owner-command-search input {
  width: 100%;
  min-height: 54px;
  font-size: 15px;
}

.owner-search-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.owner-search-actions button,
.owner-command-search .button-link {
  min-height: 54px;
}

.owner-results-stack {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.owner-result-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 13, 29, 0.45);
  padding: 12px;
}

.owner-result-section {
  display: grid;
  gap: 10px;
}

.owner-result-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 2px 2px 0;
}

.owner-result-section-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.owner-result-section-head b {
  color: var(--text);
  font-size: 15px;
}

.owner-result-type {
  display: grid;
  place-items: center;
  min-height: 58px;
  border: 1px solid rgba(var(--accent-rgb, 73, 166, 255), 0.55);
  border-radius: 8px;
  background: rgba(var(--accent-rgb, 73, 166, 255), 0.13);
  color: #edf4ff;
  font-size: 13px;
  font-weight: 950;
}

.owner-result-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.owner-result-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.owner-result-title h4 {
  margin: 0;
  font-size: 19px;
}

.owner-result-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.owner-result-meta span,
.owner-search-hints code {
  border: 1px solid rgba(156, 178, 214, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
}

.owner-result-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.owner-result-actions form {
  margin: 0;
}

.owner-empty-search,
.owner-search-hints {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 16px;
}

.owner-search-hints {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.owner-search-hints span {
  color: var(--muted);
  font-weight: 900;
}

.owner-empty-search b {
  display: block;
  font-size: 18px;
}

.owner-empty-search p {
  margin: 6px 0 0;
  color: var(--muted);
}

.owner-recent-panel {
  width: 100%;
}

.owner-detail-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 12px;
}

.owner-detail-grid span {
  color: var(--muted);
  font-size: 13px;
}

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

.owner-detail-grid b {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
}

.owner-reset-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 14px;
}

.owner-inline-reset {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) auto;
  gap: 7px;
  align-items: center;
}

.owner-inline-reset input {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 14px;
}

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

.brand-mark,
.mark {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 10px;
  object-fit: contain;
}

.mark {
  display: grid;
  place-items: center;
  background: url("logo-mark.452a5c601515.png?v=20260730-official-brand-v4-pwa-opaque") center / contain no-repeat;
  color: transparent;
  font-size: 0;
  overflow: hidden;
  box-shadow: 0 16px 34px rgba(74, 163, 255, 0.2);
}

.brand-copy {
  min-width: 0;
}

.brand-wordmark {
  display: block;
  width: 118px;
  height: auto;
  object-fit: contain;
}

.brand h1,
.hero h2,
.panel h3,
.login h1 {
  margin: 0;
}

.brand p,
.login-brand p,
.hero p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav a,
.nav .mobile-stats-nav {
  position: relative;
  padding: 11px 12px;
  border-radius: 8px;
  color: #d9e6ff;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav .mobile-stats-nav,
.mobile-stats-menu {
  display: none;
}

.nav-badge {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  padding: 0 7px;
  display: inline-grid;
  place-items: center;
  margin-inline-start: auto;
  background: linear-gradient(135deg, var(--red), var(--amber));
  color: #1b0810;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(255, 95, 118, 0.28);
}

.nav svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--line);
}

.site-footprint {
  max-width: 1240px;
  margin: 8px auto 18px;
  padding: 0 28px;
  color: rgba(158, 176, 202, 0.72);
  font-size: 12px;
  letter-spacing: 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.site-footprint img {
  width: 58px;
  height: auto;
  opacity: 0.52;
  filter: grayscale(1);
}

.app-version-label {
  padding-inline-start: 9px;
  border-inline-start: 1px solid rgba(158, 176, 202, 0.24);
  direction: ltr;
}

.content {
  padding: 28px;
  display: grid;
  gap: 20px;
  align-content: start;
}

.content.single {
  max-width: 1240px;
  margin: 0 auto;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(13, 31, 59, 0.94), rgba(18, 23, 49, 0.78)),
    linear-gradient(90deg, rgba(255, 95, 118, 0.16), rgba(46, 230, 166, 0.12));
  box-shadow: var(--shadow);
}

.hero:before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--blue), var(--purple), var(--red));
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero h2 {
  margin-top: 10px;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: 0;
}

.hero-card {
  min-width: 220px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.07);
  padding: 18px;
  display: grid;
  gap: 8px;
}

.hero-card span,
.hero-card small,
.eyebrow,
.muted {
  color: var(--muted);
}

.hero-card b {
  font-size: 26px;
}

.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
}

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

.stat,
.panel,
.login {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.stat {
  position: relative;
  overflow: hidden;
  padding: 18px;
}

.stat:before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--blue);
}

.stat.red:before {
  background: var(--red);
}

.stat.green:before {
  background: var(--green);
}

.stat.purple:before {
  background: var(--purple);
}

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

.stat b {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.panel {
  padding: 18px;
  display: grid;
  gap: 16px;
}

.compact-panel {
  padding: 14px 18px;
}

.tabs-panel {
  display: flex;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 8px;
  box-shadow: var(--shadow);
}

.tabs-panel a {
  flex: 1;
  min-height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.tabs-panel a.active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(169, 112, 255, 0.35), rgba(74, 163, 255, 0.28));
}

.rotation-switcher {
  max-width: 520px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head + .people-grid,
.section-head + .rule-calendar,
.section-head + .calendar-grid,
.section-head + .stats,
.section-head + .price-rules {
  margin-top: 18px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 99px;
  margin-left: 5px;
  background: var(--muted);
}

.dot.mine {
  background: var(--green);
}

.dot.partner {
  background: var(--purple);
}

.dot.other {
  background: var(--blue);
}

.dot.hot {
  background: var(--red);
}

.dot.sensitive {
  background: var(--amber);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 10px;
  overflow-x: auto;
}

.mobile-calendar-tools,
.compact-calendar,
.day-sheet {
  display: none;
}

.weekday-head {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
}

.day-card {
  min-height: 168px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.day-card.blank,
.rule-day.blank {
  min-height: 0;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.day-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
}

.day-card header b {
  color: var(--text);
  font-size: 26px;
}

.day-card small {
  color: var(--muted);
}

.day-card.mine {
  border-color: rgba(46, 230, 166, 0.75);
  background: linear-gradient(180deg, rgba(46, 230, 166, 0.16), rgba(255, 255, 255, 0.05));
}

.day-card.partner {
  border-color: rgba(169, 112, 255, 0.7);
}

.day-card.other {
  border-color: rgba(74, 163, 255, 0.42);
}

.day-card.free {
  border-color: rgba(154, 169, 196, 0.22);
  background: rgba(255, 255, 255, 0.035);
}

.day-card.sensitive {
  box-shadow: inset 0 0 0 1px rgba(255, 189, 89, 0.62), 0 0 18px rgba(255, 189, 89, 0.12);
}

.day-card.off-day {
  box-shadow: inset 0 0 0 1px rgba(255, 95, 118, 0.68), 0 0 18px rgba(255, 95, 118, 0.13);
}

.day-card.past,
.rule-day.past {
  opacity: 0.58;
}

.assignees {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.assignees span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-width: 0;
  min-height: 26px;
  border-radius: 999px;
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.09);
  color: #dfe9ff;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.09);
  color: #dfe9ff;
  white-space: nowrap;
}

.site-shift-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.site-shift-row {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.34);
  color: var(--text);
  text-align: right;
  font: inherit;
}

.site-shift-row b {
  color: var(--muted);
  font-size: 0.76rem;
}

.site-shift-row span {
  line-height: 1.6;
}

.site-shift-row em {
  color: var(--amber);
  font-size: 0.76rem;
  font-style: normal;
  line-height: 1.5;
}

.site-shift-row.mine {
  border-color: rgba(45, 212, 191, 0.55);
  background: rgba(20, 184, 166, 0.18);
}

.site-shift-row.other {
  border-color: rgba(96, 165, 250, 0.38);
}

.site-shift-row.selectable {
  cursor: pointer;
}

.site-shift-row.disabled,
.site-shift-row.own-shift.disabled {
  cursor: not-allowed;
  opacity: 0.42;
  filter: grayscale(1) saturate(0);
}

.site-shift-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.site-shift-row.selected {
  border-color: rgba(46, 230, 166, 0.95);
  background: rgba(46, 230, 166, 0.2);
  box-shadow: 0 0 0 2px rgba(46, 230, 166, 0.2);
}

button.site-shift-row {
  cursor: pointer;
}

.site-shift-row .swap-link {
  justify-self: start;
  min-height: 32px;
  color: #fff;
  font-size: 0.78rem;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(138, 91, 246, 0.24);
}

.compact-day-slots {
  display: none;
}

.slot-picker {
  position: fixed;
  z-index: 36;
  inset-inline: max(14px, calc((100vw - 520px) / 2));
  inset-block-end: 18px;
  border: 1px solid rgba(74, 163, 255, 0.36);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(16, 32, 57, 0.98), rgba(8, 20, 38, 0.98)),
    var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  padding: 16px;
  display: grid;
  gap: 12px;
  backdrop-filter: blur(18px);
}

.slot-picker[hidden] {
  display: none;
}

.slot-picker strong {
  color: var(--text);
  font-size: 18px;
}

.slot-picker-list {
  display: grid;
  gap: 8px;
  max-height: min(52vh, 430px);
  overflow-y: auto;
  padding-block-end: 4px;
}

.day-card footer {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.day-card em {
  color: var(--amber);
  font-style: normal;
  font-size: 12px;
}

.no-shift {
  margin-top: auto;
  color: var(--muted);
  font-size: 13px;
}

.table-wrap {
  overflow-x: auto;
}

.desktop-ledger-table {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.desktop-ledger-compact table {
  min-width: 560px;
}

.desktop-ledger-wide table {
  min-width: 980px;
}

table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: right;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

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

.rotation-basics-field {
  grid-template-rows: auto minmax(46px, auto) minmax(22px, auto);
  align-content: start;
}

.rotation-basics-help {
  min-height: 22px;
  line-height: 1.65;
}

.intern-create-form input {
  height: 48px;
  min-height: 48px;
}

.coin-adjust-form {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(120px, 0.8fr) minmax(180px, 1.3fr) auto;
  gap: 12px;
  align-items: end;
  margin: 18px 0 8px;
}

.coin-adjust-form label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.coin-adjust-form input,
.coin-adjust-form select {
  margin-top: 7px;
}

.coin-adjust-form button {
  min-height: 44px;
}

.owner-create-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.owner-panel-compact {
  max-width: 980px;
  margin-inline: auto;
}

.owner-create-form input {
  width: 100%;
}

.owner-create-form button {
  min-height: 44px;
  white-space: nowrap;
}

.chip,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border: 1px solid rgba(156, 178, 214, 0.2);
  border-radius: 8px;
  padding: 4px 9px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.status-pill.green {
  border-color: rgba(46, 230, 166, 0.28);
  color: var(--green);
}

.status-pill.red {
  border-color: rgba(255, 95, 118, 0.3);
  color: var(--red);
}

.section-head.separated {
  margin-top: 24px;
}

.rule-formula {
  border-inline-start: 4px solid var(--green);
  padding: 12px 14px;
  background: rgba(46, 230, 166, 0.07);
  display: grid;
  gap: 5px;
}

.rule-formula span {
  color: var(--text);
  font-weight: 800;
}

.rule-formula small {
  color: var(--muted);
  line-height: 1.9;
}

.rule-subheading {
  margin: 22px 0 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 15px;
}

.rule-price-grid label {
  min-width: 0;
}

.form-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 16px;
}

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

.action-card,
.person-card,
.rule-day {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 16px;
}

.extra-hardness-day {
  display: grid;
  align-items: stretch;
  gap: 7px;
}

.extra-hardness-points {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}

.extra-hardness-points input {
  width: 70px;
  min-height: 34px;
  padding: 5px 7px;
  text-align: center;
  direction: ltr;
}

.extra-hardness-points input:disabled {
  opacity: 0.42;
}

.action-card {
  min-height: 170px;
  display: grid;
  align-content: end;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.action-card:before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--blue);
}

.action-card.green:before {
  background: var(--green);
}

.action-card.purple:before {
  background: var(--purple);
}

.action-card.owner:before {
  background: var(--amber);
}

.action-card span,
.action-card small {
  color: var(--muted);
}

.action-card b {
  font-size: 24px;
}

.profile-card {
  align-content: start;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.profile-row span {
  color: var(--muted);
}

.profile-actions {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.profile-actions .button-link svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.telegram-card {
  align-content: start;
}

.telegram-connected {
  border-color: rgba(46, 230, 166, 0.44);
  background: rgba(46, 230, 166, 0.12);
  color: var(--green);
}

.telegram-copy {
  min-height: 48px;
  margin: 0;
  line-height: 1.9;
}

.telegram-action {
  margin-top: 16px;
}

.support-card {
  align-content: start;
}

.support-copy {
  margin: 0 0 16px;
  line-height: 1.9;
}

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

.support-link {
  min-height: 64px;
  display: grid;
  gap: 2px;
  padding: 10px 14px;
  box-shadow: none;
}

.support-link span {
  font-weight: 850;
}

.support-link small {
  direction: ltr;
  color: rgba(231, 239, 252, 0.72);
  font-size: 11px;
}

.telegram-support {
  border: 1px solid rgba(74, 163, 255, 0.48);
  background: rgba(74, 163, 255, 0.13);
}

.bale-support {
  border: 1px solid rgba(46, 230, 166, 0.42);
  background: rgba(46, 230, 166, 0.11);
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

.person-card {
  display: grid;
  gap: 12px;
}

.person-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.person-card header span {
  color: var(--muted);
}

.rotation-team-grid .person-card {
  align-content: start;
}

.rotation-team-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.rotation-team-field select:disabled {
  opacity: 0.45;
}

.copy-usernames-panel .section-head {
  align-items: center;
}

.username-share-hint {
  display: grid;
  gap: 4px;
  margin: 14px 0 10px;
  padding: 12px 14px;
  border: 1px solid rgba(245, 185, 73, 0.42);
  border-radius: 8px;
  background: rgba(245, 185, 73, 0.09);
  color: #ffe4aa;
}

.username-share-hint span {
  color: var(--muted);
  font-size: 13px;
}

.username-copy-panel {
  width: min(680px, 100%);
}

.section-head.compact {
  margin-bottom: 12px;
}

.copy-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.copy-tools button {
  min-height: 40px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  font-size: 13px;
}

.username-copy-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.username-copy-list label {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.username-copy-list input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.username-copy-list span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.username-copy-list b,
.username-copy-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.username-copy-list small {
  color: var(--muted);
}

.username-copy-preview {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  direction: rtl;
}

.copy-status {
  min-height: 24px;
  margin: 10px 0 0;
  color: #bdf8e4;
  font-size: 13px;
}

.hospital-manager {
  display: grid;
  gap: 14px;
}

.hospital-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.hospital-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 16px;
  display: grid;
  gap: 12px;
}

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

.hospital-base-points {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 1fr);
  align-items: end;
  gap: 12px;
  border: 1px solid rgba(74, 163, 255, 0.22);
  border-radius: 8px;
  padding: 12px;
  background: rgba(74, 163, 255, 0.05);
}

.hospital-base-points .check {
  min-height: 48px;
  align-items: center;
}

.hospital-base-points input[readonly] {
  cursor: text;
  color: var(--muted);
  border-color: rgba(74, 163, 255, 0.22);
  background: rgba(15, 23, 42, 0.45);
}

.site-rule-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 4px;
  overflow-x: auto;
}

.site-rule-tabs button {
  flex: 0 0 auto;
  min-width: 140px;
  border: 1px solid var(--line);
}

.site-rule-tabs button.active {
  color: #fff;
  border-color: rgba(50, 220, 176, 0.8);
  background: linear-gradient(135deg, rgba(22, 163, 155, 0.75), rgba(58, 119, 220, 0.75));
  box-shadow: 0 8px 22px rgba(30, 150, 190, 0.18);
}

[data-site-rule-panel] > h4 {
  margin: 0 0 14px;
}

.hospital-date-grid fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

.hospital-date-grid legend {
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.jalali-date-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr 0.8fr;
  gap: 8px;
}

.hospital-eligibility {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 10px;
  background: rgba(15, 23, 42, 0.2);
}

.hospital-team-setting {
  display: flex;
  flex-direction: row;
  direction: ltr;
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(50, 220, 176, 0.28);
  border-radius: 8px;
  padding: 14px 16px;
  background: rgba(16, 185, 129, 0.07);
  cursor: pointer;
}

.hospital-team-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
  direction: rtl;
  text-align: right;
}

.hospital-team-copy small {
  color: var(--muted);
  line-height: 1.7;
}

.setting-switch {
  position: relative;
  display: block;
  width: 48px;
  height: 28px;
  direction: ltr;
  flex: 0 0 auto;
}

@media (max-width: 620px) {
  .hospital-team-setting {
    align-items: flex-start;
    gap: 12px;
    padding: 13px;
  }

  .setting-switch {
    margin-top: 2px;
  }
}

.setting-switch input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.setting-switch i {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  transition: background 160ms ease, border-color 160ms ease;
}

.setting-switch i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 160ms ease, background 160ms ease;
}

.setting-switch input:checked + i {
  border-color: rgba(52, 211, 153, 0.72);
  background: rgba(16, 185, 129, 0.32);
}

.setting-switch input:checked + i::after {
  transform: translateX(20px);
  background: var(--green);
}

.setting-switch input:focus-visible + i {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.team-wallet-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.team-wallet-list span {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 0.78rem;
  color: var(--muted);
}

.team-wallet-list b {
  color: var(--text);
}

.hospital-eligibility > div:first-child {
  display: grid;
  gap: 3px;
}

.hospital-eligibility b {
  color: var(--text);
}

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

.hospital-eligibility-grid label[hidden] {
  display: none;
}

.hospital-card header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.hospital-card header div {
  display: grid;
  gap: 4px;
}

.hospital-card header span {
  color: var(--muted);
  font-weight: 800;
}

.hospital-card header b {
  color: var(--text);
}

.hospital-remove {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 13px;
}

.danger-soft {
  background: rgba(255, 73, 103, 0.12);
  color: #ffb8c4;
  border-color: rgba(255, 73, 103, 0.35);
}

.danger-soft:hover {
  background: rgba(255, 73, 103, 0.2);
}

.hospital-add {
  justify-self: start;
  min-height: 42px;
}

.hospital-add:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.site-ledger-table th:not(:first-child),
.site-ledger-table td:not(:first-child) {
  text-align: center;
}

.date-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.date-group h3 {
  grid-column: 1 / -1;
  margin: 0;
}

.grid-flow {
  display: grid;
  gap: 18px;
}

.rule-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(135px, 1fr));
  gap: 10px;
  overflow-x: auto;
}

.swap-source {
  display: grid;
  gap: 10px;
}

.swap-source b {
  font-size: 26px;
}

.swap-source > span {
  color: var(--amber);
}

.admin-swap-calendar {
  padding-bottom: 108px;
  scroll-margin-top: 18px;
}

.admin-edit-mode {
  width: min(100%, 480px);
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.035);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.admin-edit-mode button {
  min-height: 44px;
  border: 1px solid rgba(147, 167, 199, 0.35);
  background: linear-gradient(180deg, rgba(51, 70, 99, 0.9), rgba(32, 49, 76, 0.94));
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: #eaf2ff;
  font-weight: 800;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.admin-edit-mode button:hover {
  border-color: rgba(74, 163, 255, 0.58);
  background: linear-gradient(180deg, rgba(57, 81, 116, 0.96), rgba(36, 57, 89, 0.98));
  transform: translateY(-1px);
}

.admin-edit-mode button.active {
  border-color: rgba(74, 163, 255, 0.9);
  background: linear-gradient(135deg, rgba(116, 89, 239, 0.82), rgba(48, 145, 231, 0.86));
  box-shadow: 0 9px 24px rgba(74, 163, 255, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  color: #fff;
}

.admin-preference-legend {
  border-inline-start: 4px solid var(--red);
  padding: 10px 12px;
  background: rgba(255, 95, 118, 0.075);
  display: flex;
  align-items: center;
  gap: 9px;
}

.admin-preference-legend > span {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 3px;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 95, 118, 0.14);
}

.admin-preference-legend p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.admin-preference-legend b {
  color: #ffd7dd;
}

.admin-swap-instruction {
  min-height: 70px;
  margin-bottom: 18px;
  border: 1px solid rgba(74, 163, 255, 0.28);
  border-radius: 8px;
  background: rgba(74, 163, 255, 0.075);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-swap-instruction > div {
  display: grid;
  gap: 4px;
}

.admin-swap-instruction strong {
  color: var(--text);
}

.admin-swap-instruction small {
  color: var(--muted);
}

.admin-swap-step {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 1px solid rgba(74, 163, 255, 0.42);
  border-radius: 8px;
  background: rgba(74, 163, 255, 0.16);
  display: grid;
  place-items: center;
  color: var(--text);
  font-weight: 900;
}

.admin-swap-reset {
  margin-inline-start: auto;
  white-space: nowrap;
}

button.admin-swap-day {
  width: 100%;
  color: var(--text);
  text-align: right;
  cursor: pointer;
  box-shadow: none;
}

button.admin-swap-day:hover {
  border-color: rgba(169, 112, 255, 0.7);
  transform: translateY(-1px);
}

.admin-preference-lock {
  border-inline-start: 3px solid var(--red);
  padding: 6px 8px;
  background: rgba(255, 95, 118, 0.1);
  display: grid;
  gap: 2px;
  text-align: right;
}

.admin-preference-lock span {
  color: #ffbdc8;
  font-size: 10px;
}

.admin-preference-lock b {
  color: var(--text);
  font-size: 11px;
  line-height: 1.6;
}

.preference-lock-count {
  position: absolute;
  z-index: 2;
  inset-block-start: 3px;
  inset-inline-start: 3px;
  min-width: 17px;
  height: 17px;
  border-radius: 5px;
  padding-inline: 4px;
  background: var(--red);
  color: white;
  display: grid;
  place-items: center;
  font-size: 9px;
  line-height: 1;
}

.admin-swap-option.source-selected {
  border-color: rgba(169, 112, 255, 0.98) !important;
  background: rgba(169, 112, 255, 0.2) !important;
  box-shadow: 0 0 0 3px rgba(169, 112, 255, 0.2), 0 16px 34px rgba(169, 112, 255, 0.12) !important;
  opacity: 1;
}

.admin-swap-option.target-selected {
  border-color: rgba(46, 230, 166, 0.98) !important;
  background: rgba(46, 230, 166, 0.2) !important;
  box-shadow: 0 0 0 3px rgba(46, 230, 166, 0.2), 0 16px 34px rgba(46, 230, 166, 0.12) !important;
  opacity: 1;
}

.admin-swap-confirm {
  z-index: 30;
  padding-inline-end: 58px;
}

.admin-confirm-close {
  position: absolute;
  inset-inline-end: 10px;
  inset-block-start: 10px;
  min-width: 34px !important;
  width: 34px !important;
  min-height: 34px !important;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
}

@media (min-width: 761px) {
  .swap-confirm-bar.admin-swap-confirm {
    min-height: 122px;
    padding: 56px 16px 16px;
    align-items: center;
  }

  .admin-swap-confirm .admin-confirm-close {
    left: 14px;
    right: auto;
    top: 12px;
  }
}

.admin-shift-preview {
  padding-inline-end: 58px;
}

.admin-shift-preview .sheet-close {
  position: absolute;
  inset-inline-end: 10px;
  inset-block-start: 10px;
  width: 34px;
  height: 34px;
  padding: 0;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.admin-shift-preview > small {
  color: var(--muted);
  line-height: 1.7;
}

.admin-preview-shift-row {
  cursor: pointer;
}

.admin-preview-shift-row small {
  color: var(--blue);
  font-weight: 800;
}

.admin-preview-shift-row.preview-only {
  cursor: default;
}

.admin-preview-shift-row.preview-only:hover {
  transform: none;
}

.admin-replacement-field {
  min-width: 280px;
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}

.admin-replacement-field[hidden] {
  display: none;
}

.admin-replacement-field select {
  width: 100%;
  min-height: 48px;
}

.admin-replacement-field > label {
  display: grid;
  gap: 5px;
}

.admin-replacement-or {
  margin-top: 3px;
  color: var(--text);
}

.admin-replacement-people {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-height: 150px;
  overflow-y: auto;
}

.admin-replacement-people label {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  cursor: pointer;
}

.admin-replacement-people label:has(input:checked) {
  border-color: rgba(74, 163, 255, 0.7);
  background: rgba(74, 163, 255, 0.14);
}

.admin-replacement-people label.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.admin-replacement-people input {
  width: 17px;
  height: 17px;
  margin: 0;
}

.swap-calendar {
  margin-bottom: 16px;
  padding-bottom: 92px;
}

.swap-day {
  position: relative;
}

.swap-day input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.compact-day input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.swap-day.selectable {
  cursor: pointer;
}

.swap-day.selectable:hover {
  border-color: rgba(46, 230, 166, 0.85);
  transform: translateY(-1px);
}

.swap-day.selectable:has(.swap-destination-option.selected) {
  border-color: rgba(46, 230, 166, 0.95);
  box-shadow: 0 0 0 2px rgba(46, 230, 166, 0.2), 0 18px 40px rgba(46, 230, 166, 0.12);
}

.compact-day.selectable.selected {
  border-color: rgba(46, 230, 166, 0.95);
  background: rgba(46, 230, 166, 0.22);
  box-shadow: 0 0 0 2px rgba(46, 230, 166, 0.16);
}

.swap-day-direct-option {
  width: 100%;
  min-height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
}

.swap-day-direct-option:hover {
  transform: none;
  box-shadow: none;
}

.swap-day.disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.compact-day.disabled {
  cursor: not-allowed;
}

.swap-day.own-shift.disabled,
.swap-compact-calendar .compact-day.own-shift.disabled {
  border-color: rgba(154, 169, 196, 0.16);
  background: rgba(154, 169, 196, 0.045);
  color: rgba(154, 169, 196, 0.66);
  box-shadow: none;
  filter: grayscale(1) saturate(0);
  opacity: 0.34;
}

.swap-confirm-bar {
  position: fixed;
  z-index: 20;
  inset-inline: max(18px, calc((100vw - 1120px) / 2));
  inset-block-end: 20px;
  border: 1px solid rgba(46, 230, 166, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(46, 230, 166, 0.18), rgba(74, 163, 255, 0.16)),
    rgba(8, 20, 38, 0.96);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(24px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  backdrop-filter: blur(18px);
}

.swap-confirm-bar.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.swap-confirm-bar > div {
  display: grid;
  gap: 4px;
}

.swap-confirm-bar strong {
  color: var(--text);
  font-size: 17px;
}

.swap-confirm-bar small {
  color: var(--muted);
}

.preference-countdown {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border-color: rgba(255, 83, 113, 0.48);
  background:
    linear-gradient(135deg, rgba(255, 83, 113, 0.14), rgba(255, 184, 77, 0.08)),
    rgba(11, 24, 45, 0.92);
}

.preference-countdown h3 {
  margin: 6px 0;
  font-size: 25px;
}

.preference-countdown p {
  margin: 0;
  color: var(--muted);
}

.countdown-display {
  direction: ltr;
  min-width: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 83, 113, 0.55);
  border-radius: 8px;
  background: rgba(255, 83, 113, 0.08);
  box-shadow: 0 0 42px rgba(255, 83, 113, 0.16);
  color: #ff637f;
  font-variant-numeric: tabular-nums;
}

.countdown-display span {
  min-width: 58px;
  text-align: center;
  font-size: 38px;
  font-weight: 900;
}

.countdown-display em {
  color: #ffb84d;
  font-style: normal;
  font-size: 30px;
  font-weight: 900;
}

.preference-countdown.expired {
  border-color: rgba(255, 184, 77, 0.5);
}

.preference-countdown.expired .countdown-display {
  border-color: rgba(255, 184, 77, 0.55);
  background: rgba(255, 184, 77, 0.08);
  color: #ffb84d;
}

.preference-countdown-compact {
  margin: 0 0 18px;
  padding: 16px 18px;
  min-height: 0;
}

.preference-countdown-compact h4 {
  margin: 2px 0 4px;
  font-size: 1rem;
}

.preference-countdown-compact .countdown-display {
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.preference-submitter {
  display: block;
  margin-top: 10px;
  color: var(--green);
}

.preference-total {
  min-width: 140px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.055);
  display: grid;
  gap: 5px;
}

.preference-total span {
  color: var(--muted);
  font-size: 12px;
}

.preference-total b {
  color: var(--green);
}

.wallet-meter {
  display: block;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.09);
}

.wallet-meter i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--amber));
  transition: width 0.18s ease, background 0.18s ease;
}

.wallet-meter i.over-budget {
  background: var(--red);
}

#walletRemaining {
  color: var(--muted);
  font-size: 11px;
}

#walletRemaining.over-budget {
  color: #ffd0d7;
}

.price-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.price-rules span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.055);
  color: #dfe9ff;
  font-size: 12px;
}

.preference-price-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.preference-price-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.preference-price-item > span {
  color: var(--muted);
  font-size: 12px;
}

.preference-price-item b {
  flex: 0 0 auto;
  color: var(--amber);
  font-size: 13px;
}

.preference-receipt {
  display: grid;
  gap: 14px;
}

.preference-receipt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.preference-receipt-head > div {
  display: grid;
  gap: 5px;
}

.preference-receipt-head small {
  color: var(--muted);
}

.preference-receipt-days {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.preference-receipt-days > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.preference-receipt form button {
  width: 100%;
}

.price-guide-note {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.8;
}

.assessment-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.assessment-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.045);
  display: grid;
  gap: 7px;
}

.assessment-card.green {
  border-color: rgba(46, 230, 166, 0.34);
  background: rgba(46, 230, 166, 0.08);
}

.assessment-card.blue {
  border-color: rgba(74, 163, 255, 0.34);
  background: rgba(74, 163, 255, 0.08);
}

.assessment-card.red {
  border-color: rgba(255, 95, 118, 0.42);
  background: rgba(255, 95, 118, 0.08);
}

.assessment-card h4,
.raw-metrics-title {
  margin: 0;
}

.assessment-card span {
  color: var(--muted);
  font-size: 12px;
}

.assessment-card b {
  font-size: 24px;
}

.assessment-card p,
.recommendation-list {
  margin: 0;
  color: #c7d5ed;
  line-height: 1.8;
  font-size: 13px;
}

.recommendation-list {
  padding-inline-start: 20px;
}

.raw-metrics-title {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
}

.preference-day {
  cursor: pointer;
  text-align: inherit;
}

.preference-hidden-inputs,
.preference-day input,
.preference-sheet .preference-sheet-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.preference-day.selected {
  border-color: rgba(46, 230, 166, 0.95);
  background: linear-gradient(180deg, rgba(46, 230, 166, 0.36), rgba(46, 230, 166, 0.18));
  box-shadow: 0 0 0 2px rgba(46, 230, 166, 0.32), 0 18px 42px rgba(46, 230, 166, 0.18);
}

.preference-day.disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button.preference-day.disabled {
  pointer-events: none;
}

.preference-day:has(input:checked) {
  border-color: rgba(46, 230, 166, 0.95);
  background: linear-gradient(180deg, rgba(46, 230, 166, 0.36), rgba(46, 230, 166, 0.18));
  box-shadow: 0 0 0 2px rgba(46, 230, 166, 0.32), 0 18px 42px rgba(46, 230, 166, 0.18);
}

.preference-sheet button:not(.sheet-close) {
  min-height: 44px;
}

.preference-price {
  margin-top: auto;
  color: var(--amber);
  font-weight: 800;
}

.preference-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.preference-hero-actions {
  min-width: 240px;
  display: grid;
  gap: 10px;
  justify-items: stretch;
}

.preference-cart-bar {
  position: fixed;
  z-index: 25;
  inset-inline: max(18px, calc((100vw - 1120px) / 2));
  inset-block-end: 20px;
  border: 1px solid rgba(46, 230, 166, 0.44);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(46, 230, 166, 0.18), rgba(74, 163, 255, 0.16)),
    rgba(8, 20, 38, 0.96);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(24px);
  transition: opacity 0.18s ease, transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  backdrop-filter: blur(18px);
}

.preference-cart-bar.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.preference-cart-bar.over-budget {
  border-color: rgba(255, 95, 118, 0.65);
  background:
    linear-gradient(135deg, rgba(255, 95, 118, 0.22), rgba(255, 189, 89, 0.12)),
    rgba(8, 20, 38, 0.97);
}

.preference-cart-bar > div {
  display: grid;
  gap: 4px;
}

.preference-cart-bar strong {
  color: var(--text);
  font-size: 17px;
}

.preference-cart-bar small {
  color: var(--muted);
}

.preference-cart-bar.over-budget small {
  color: #ffd0d7;
}

.preference-cart-bar button {
  min-width: 190px;
  min-height: 48px;
}

.soft-toast {
  position: fixed;
  z-index: 70;
  inset-inline: max(18px, calc((100vw - 620px) / 2));
  inset-block-start: 18px;
  border: 1px solid rgba(255, 189, 89, 0.48);
  border-radius: 8px;
  padding: 13px 15px;
  background:
    linear-gradient(135deg, rgba(255, 189, 89, 0.18), rgba(255, 95, 118, 0.12)),
    rgba(8, 20, 38, 0.98);
  color: #fff2df;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  backdrop-filter: blur(16px);
  text-align: center;
  line-height: 1.8;
}

.soft-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.swap-confirm-bar button {
  min-width: 190px;
  min-height: 48px;
}

.swap-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.swap-option {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 14px;
  color: var(--text);
  display: grid;
  gap: 7px;
}

.swap-option input {
  width: auto;
}

.swap-option small {
  color: var(--amber);
}

.swap-option span {
  color: var(--muted);
  line-height: 1.7;
}

.rule-day {
  min-height: 220px;
  min-width: 0;
  overflow: hidden;
  display: grid;
  gap: 9px;
  align-content: start;
}

.rule-day.auto-hot {
  border-color: rgba(255, 95, 118, 0.45);
}

.rule-day header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
}

.rule-day header b {
  color: var(--text);
  font-size: 24px;
}

.auto-tags {
  min-height: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.auto-tags span {
  border-radius: 999px;
  background: rgba(255, 95, 118, 0.14);
  color: #ffd4dc;
  padding: 3px 8px;
  font-size: 11px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.check input {
  width: auto;
}

.publish-button {
  justify-self: stretch;
  min-height: 52px;
  font-size: 16px;
  font-weight: 800;
}

.span-2 {
  grid-column: 1 / -1;
}

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

.rotation-detail-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
  max-width: 100%;
}

.rotation-detail-actions > form {
  display: inline-flex;
}

.rotation-detail-actions .button-link,
.rotation-detail-actions button {
  min-height: 46px;
  white-space: normal;
  line-height: 1.45;
}

.empty {
  grid-column: 1 / -1;
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

.alert {
  border-radius: 8px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
}

.alert.error {
  color: #ffd7dd;
  border-color: rgba(255, 95, 118, 0.45);
}

.alert.success {
  color: #d9fff2;
  border-color: rgba(46, 230, 166, 0.45);
}

.landing {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: max(22px, env(safe-area-inset-top)) 0 70px;
}

.landing-nav {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.landing-brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: contain;
}

.landing-brand span {
  display: grid;
  gap: 3px;
}

.landing-brand-wordmark {
  display: block;
  width: 116px;
  height: auto;
}

.landing-brand small,
.landing-product small {
  color: var(--muted);
}

.landing-nav nav,
.landing-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.landing-signin,
.landing-signup,
.landing-primary,
.landing-secondary {
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  padding: 10px 18px;
  font-weight: 850;
}

.landing-signin,
.landing-secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.landing-signup,
.landing-primary {
  background: #278f75;
  border: 1px solid #39bc99;
  box-shadow: 0 12px 32px rgba(39, 143, 117, 0.24);
}

.landing-hero {
  min-height: min(700px, calc(100dvh - 90px));
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(520px, 1.08fr);
  align-items: center;
  gap: clamp(40px, 7vw, 100px);
  padding: 56px 0 72px;
}

.landing-wordmark {
  margin: 8px 0 0;
  width: min(100%, 560px);
  line-height: 0;
}

.landing-wordmark img {
  display: block;
  width: 100%;
  height: auto;
}

.landing-copy h2 {
  margin: 18px 0 0;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.45;
}

.landing-kicker {
  width: fit-content;
  margin: 0;
  padding: 7px 10px;
  border-right: 3px solid var(--green);
  color: #b9d8ce;
  background: rgba(46, 230, 166, 0.06);
  font-weight: 700;
}

.landing-lead {
  max-width: 620px;
  margin: 22px 0 26px;
  color: #bdcbe0;
  font-size: 17px;
}

.landing-vpn {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.landing-admin-note {
  max-width: 600px;
  margin: 14px 0 0;
  color: #aebdd2;
  font-size: 13px;
}

.landing-product {
  position: relative;
  padding: 22px;
  border: 1px solid rgba(96, 151, 203, 0.35);
  border-radius: 8px;
  background: #0e1e35;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

.landing-product::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--green), var(--blue), var(--purple), var(--red));
  border-radius: 8px 8px 0 0;
}

.landing-product-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.landing-product-head > span:first-child {
  display: grid;
}

.landing-product-head b {
  font-size: 23px;
}

.landing-live {
  padding: 7px 10px;
  border: 1px solid rgba(46, 230, 166, 0.32);
  border-radius: 999px;
  color: #bdf8e4;
  background: rgba(46, 230, 166, 0.09);
  font-size: 12px;
  font-weight: 800;
}

.landing-week,
.landing-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.landing-week {
  margin-bottom: 8px;
}

.landing-week span {
  display: grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-weight: 800;
}

.landing-calendar > span {
  min-width: 0;
  aspect-ratio: 0.9;
  display: grid;
  align-content: space-between;
  padding: 10px 8px;
  border: 1px solid rgba(74, 163, 255, 0.34);
  border-radius: 7px;
  background: #172943;
}

.landing-calendar b {
  font-size: 20px;
}

.landing-calendar small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}

.landing-calendar .is-mine {
  border-color: var(--green);
  background: #155244;
}

.landing-calendar .is-off {
  border-color: var(--red);
}

.landing-calendar .is-hard {
  border-color: var(--amber);
}

.landing-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
}

.landing-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.landing-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.landing-legend .mine { background: var(--green); }
.landing-legend .off { background: var(--red); }
.landing-legend .hard { background: var(--amber); }

.landing-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  padding: 44px 0;
  border-top: 1px solid var(--line);
}

.landing-features article {
  position: relative;
  padding-inline-start: 48px;
}

.landing-features article > span {
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(74, 163, 255, 0.35);
  border-radius: 50%;
  color: var(--blue);
  font-weight: 900;
}

.landing-features h3 {
  margin: 0 0 7px;
  font-size: 19px;
}

.landing-features p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.landing-showcase {
  display: grid;
  gap: 26px;
  padding: 46px 0 34px;
  border-top: 1px solid var(--line);
}

.landing-section-title {
  max-width: 760px;
}

.landing-section-title span,
.landing-admin-strip > div:first-child span {
  color: #86dac3;
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.landing-section-title h2,
.landing-admin-strip h2 {
  margin: 8px 0 0;
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.55;
}

.landing-showcase-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.landing-mini-screen {
  position: relative;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(96, 151, 203, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(23, 41, 67, 0.96), rgba(10, 24, 43, 0.96));
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.26);
  overflow: hidden;
}

.landing-mini-screen::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--green));
  opacity: 0.9;
}

.landing-mini-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.landing-mini-head span {
  display: grid;
  gap: 3px;
}

.landing-mini-head b {
  font-size: 18px;
}

.landing-mini-head small {
  color: var(--muted);
  font-size: 12px;
}

.landing-mini-head em {
  padding: 7px 9px;
  border-radius: 999px;
  color: #bdf8e4;
  background: rgba(46, 230, 166, 0.1);
  border: 1px solid rgba(46, 230, 166, 0.24);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.landing-mini-calendar,
.landing-rule-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.landing-mini-calendar span,
.landing-rule-days span {
  min-width: 0;
  min-height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(74, 163, 255, 0.34);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
  font-weight: 900;
}

.landing-mini-calendar .chosen {
  color: #ffe4a6;
  border-color: var(--amber);
  background: rgba(255, 188, 77, 0.1);
}

.landing-mini-calendar .blocked,
.landing-rule-days .off {
  border-color: var(--red);
  background: rgba(255, 89, 125, 0.09);
}

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

.landing-rule-days span {
  min-height: 92px;
  align-content: center;
  gap: 5px;
  padding: 10px;
}

.landing-rule-days b {
  font-size: 26px;
}

.landing-rule-days small {
  color: var(--muted);
  text-align: center;
  font-size: 11px;
}

.landing-rule-days .hard {
  border-color: var(--amber);
}

.landing-cart {
  margin-top: auto;
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid rgba(46, 230, 166, 0.24);
  border-radius: 8px;
  background: rgba(11, 76, 70, 0.35);
}

.landing-cart span,
.landing-action-row span {
  color: var(--muted);
  font-size: 12px;
}

.landing-cart b {
  color: #dffdf2;
  font-size: 18px;
}

.landing-cart small,
.landing-mini-screen p {
  color: var(--muted);
  font-size: 12px;
}

.landing-swap-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

.landing-swap-flow div {
  min-width: 0;
  min-height: 122px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(74, 163, 255, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.landing-swap-flow small,
.landing-swap-flow span {
  color: var(--muted);
  font-size: 12px;
}

.landing-swap-flow b {
  font-size: 22px;
}

.landing-swap-flow i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #dcf6ff;
  background: rgba(74, 163, 255, 0.16);
  font-style: normal;
  font-weight: 900;
}

.landing-ledger {
  display: grid;
  gap: 8px;
}

.landing-ledger-head,
.landing-ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px 58px 54px;
  align-items: center;
  gap: 4px;
}

.landing-ledger-head {
  min-height: 32px;
  padding: 0 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.landing-ledger-row {
  min-height: 46px;
  padding: 8px;
  border: 1px solid rgba(96, 151, 203, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.landing-ledger-head span,
.landing-ledger-row b,
.landing-ledger-row small,
.landing-ledger-row strong {
  justify-self: center;
  text-align: center;
}

.landing-ledger-head span:first-child,
.landing-ledger-row > span {
  justify-self: start;
  text-align: start;
}

.landing-ledger-row > span {
  color: #dbe7f8;
  font-size: 11px;
  font-weight: 850;
}

.landing-ledger-row b,
.landing-ledger-row strong {
  color: #eaf4ff;
  font-size: 16px;
}

.landing-ledger-row strong {
  font-weight: 900;
}

.landing-ledger-row small {
  min-width: 34px;
  min-height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffe4a6;
  background: rgba(255, 188, 77, 0.12);
  font-size: 12px;
  font-weight: 900;
}

.landing-action-row {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.landing-action-row span {
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.055);
  text-align: center;
  font-weight: 800;
}

.landing-admin-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
  align-items: center;
  gap: 28px;
  margin: 28px 0 24px;
  padding: 28px;
  border: 1px solid rgba(46, 230, 166, 0.26);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(11, 76, 70, 0.34), rgba(14, 30, 53, 0.72));
}

.landing-support {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.55fr);
  align-items: center;
  gap: 28px;
  margin: 24px 0 0;
  padding: 24px 28px;
  border-top: 1px solid var(--line);
}

.landing-support > div:first-child > span {
  color: #86dac3;
  font-size: 12px;
  font-weight: 850;
}

.landing-support h2 {
  margin: 5px 0 4px;
  font-size: 24px;
}

.landing-support p {
  margin: 0;
  color: var(--muted);
}

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

.landing-admin-points span {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(96, 151, 203, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: #dbe7f8;
  font-weight: 850;
}

.landing-admin-points b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--green);
  background: rgba(46, 230, 166, 0.12);
}

.login-wrap {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
}

.login {
  width: min(440px, 100%);
  padding: 28px;
  display: grid;
  gap: 18px;
}

.auth-screen .login {
  gap: 16px;
}

.wide-auth-card {
  width: min(620px, 100%);
}

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

.phone-input {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0;
  position: relative;
  direction: ltr;
  border: 1px solid rgba(156, 178, 214, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.phone-input > span {
  align-self: stretch;
  display: grid;
  place-items: center;
  padding: 0 13px;
  border-right: 1px solid rgba(156, 178, 214, 0.2);
  color: var(--text);
  font-weight: 900;
  background: rgba(255, 255, 255, 0.06);
}

.phone-input input {
  direction: ltr;
  text-align: left;
  border: 0;
  background: transparent;
  min-height: 44px;
  border-radius: 0;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-brand-link {
  color: var(--text);
}

.login-brand-link:hover .mark,
.login-brand-link:focus-visible .mark {
  box-shadow: 0 16px 38px rgba(74, 163, 255, 0.34);
}

.pdf-option-actions > form {
  display: flex;
}

.pdf-option-actions .button-link,
.pdf-option-actions button {
  min-height: 46px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.auth-tabs a {
  display: grid;
  place-items: center;
  min-height: 40px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 800;
}

.auth-tabs a[aria-current="page"] {
  background: rgba(74, 163, 255, 0.18);
  color: var(--text);
  border: 1px solid rgba(74, 163, 255, 0.34);
}

.auth-link {
  justify-self: start;
  font-size: 13px;
}

.center-link {
  justify-self: center;
}

.auth-cancel-form {
  display: grid;
  justify-items: center;
  margin: 0;
}

.auth-cancel-button {
  justify-self: center;
  width: auto;
  min-height: 0;
  padding: 9px 14px;
  border: 1px solid rgba(255, 92, 122, 0.38);
  border-radius: 8px;
  background: rgba(255, 92, 122, 0.1);
  box-shadow: none;
  color: #ffc8d2;
  font-size: 13px;
  font-weight: 800;
}

.auth-cancel-button:hover,
.auth-cancel-button:focus-visible {
  color: #ffffff;
  background: rgba(255, 92, 122, 0.18);
  box-shadow: none;
}

.auth-hint {
  margin: -4px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(74, 163, 255, 0.22);
  border-radius: 8px;
  background: rgba(74, 163, 255, 0.08);
  color: #c5d8f7;
  font-size: 13px;
  text-align: center;
}

.username-status {
  min-height: 20px;
  color: var(--muted);
}

.username-status[data-state="good"] {
  color: var(--green);
}

.username-status[data-state="bad"] {
  color: var(--red);
}

.errorlist {
  margin: 0;
  padding: 0;
  list-style: none;
  color: #ffd7dd;
  font-size: 12px;
}

.created-intern-card {
  border-color: rgba(46, 230, 166, 0.34);
  background: linear-gradient(135deg, rgba(13, 75, 65, 0.42), rgba(14, 27, 48, 0.88));
}

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

.credential-grid > div,
.person-username {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
}

.credential-grid span,
.person-username {
  color: var(--muted);
  font-size: 12px;
}

.credential-grid b,
.person-username b {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 16px;
}

.optional-profile-grid {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(156, 178, 214, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.optional-profile-grid.relaxed {
  gap: 14px;
  padding: 14px;
}

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

.auth-steps.compact {
  gap: 10px;
}

.auth-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(156, 178, 214, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  opacity: 0.72;
}

.auth-step.active {
  border-color: rgba(46, 230, 166, 0.42);
  background: rgba(46, 230, 166, 0.08);
  opacity: 1;
}

.auth-step > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(74, 163, 255, 0.18);
  color: var(--text);
  font-weight: 900;
}

.auth-step.active > span {
  background: linear-gradient(135deg, var(--green), var(--blue));
  color: #041528;
}

.auth-step b {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

.auth-step p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.code-entry {
  display: grid;
  gap: 8px;
}

.code-boxes {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.code-boxes input {
  height: 54px;
  padding: 0;
  text-align: center;
  font-size: 24px;
  font-weight: 900;
  direction: ltr;
}

.guide-page {
  counter-reset: guide-section;
}

.guide-hero h2 {
  max-width: 780px;
}

.guide-hero-actions {
  min-width: 240px;
  display: grid;
  gap: 10px;
}

.guide-hero-actions .hero-card {
  min-width: 0;
}

.guide-hero-actions .button-link {
  width: 100%;
}

.guide-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
}

.guide-toc a {
  min-height: 40px;
  border: 1px solid rgba(156, 178, 214, 0.18);
  border-radius: 8px;
  padding: 9px 12px;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  color: #dbe8ff;
  font-weight: 800;
}

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

.guide-card p {
  margin: 0;
  color: #d6e2f5;
}

.guide-card h3 {
  font-size: 24px;
  line-height: 1.45;
}

.guide-card h4 {
  margin: 0 0 8px;
  font-size: 16px;
}

.guide-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.guide-steps article,
.guide-timeline article {
  border: 1px solid rgba(156, 178, 214, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  padding: 14px;
}

.guide-steps article > b {
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(46, 230, 166, 0.22), rgba(74, 163, 255, 0.18));
  color: var(--green);
}

.guide-timeline {
  display: grid;
  gap: 10px;
}

.guide-timeline article {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.guide-timeline b {
  color: var(--text);
  font-size: 17px;
}

.guide-screen-map {
  border: 1px solid rgba(74, 163, 255, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(3, 7, 19, 0.72), rgba(8, 20, 38, 0.82)),
    rgba(255, 255, 255, 0.04);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.guide-screen-map > div {
  min-height: 74px;
  border: 1px solid rgba(156, 178, 214, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  padding: 12px;
  display: grid;
  align-content: center;
  gap: 4px;
  position: relative;
}

.guide-screen-map span {
  position: absolute;
  inset-block-start: 10px;
  inset-inline-start: 10px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #03120d;
  font-weight: 900;
}

.guide-screen-map b,
.guide-screen-map small {
  padding-inline-start: 38px;
}

.guide-screen-map small {
  color: var(--muted);
}

.guide-screen-map .map-hero {
  min-height: 96px;
  background: linear-gradient(135deg, rgba(74, 163, 255, 0.18), rgba(169, 112, 255, 0.13));
}

.guide-screen-map .map-row {
  padding: 0;
  border: 0;
  background: transparent;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.guide-screen-map .map-row > div {
  min-height: 92px;
  border: 1px solid rgba(156, 178, 214, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  padding: 12px;
  display: grid;
  align-content: center;
  gap: 4px;
  position: relative;
}

.guide-screen-map .map-calendar {
  min-height: 150px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 14.2% 32px;
}

.guide-screen-map .muted-map {
  background: rgba(255, 255, 255, 0.035);
}

.guide-callouts {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.guide-callouts p {
  border-inline-start: 3px solid var(--blue);
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(74, 163, 255, 0.08);
}

.guide-split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
  align-items: center;
}

.approval-chain {
  display: grid;
  gap: 8px;
}

.approval-chain span {
  min-height: 44px;
  border: 1px solid rgba(46, 230, 166, 0.28);
  border-radius: 8px;
  background: rgba(46, 230, 166, 0.08);
  display: grid;
  place-items: center;
  color: #dffdf3;
  font-weight: 800;
}

.approval-chain i {
  width: 2px;
  height: 16px;
  margin: 0 auto;
  background: rgba(158, 176, 202, 0.4);
}

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

  .owner-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .owner-rail {
    position: static;
    height: auto;
  }

  .owner-content {
    padding: 18px;
  }

  .owner-hero {
    min-height: auto;
    flex-direction: column;
    align-items: stretch;
  }

  .owner-summary,
  .owner-metrics-grid {
    grid-template-columns: 1fr;
  }

  .stats,
  .admin-grid,
  .form-grid,
  .coin-adjust-form,
  .owner-create-form,
  .owner-command-search,
  .owner-detail-grid,
  .owner-reset-form,
  .action-grid,
  .assessment-grid,
  .people-grid,
  .people-grid.compact,
  .date-group,
  .swap-grid {
    grid-template-columns: 1fr;
  }

  .owner-command-head,
  .owner-result-title,
  .owner-result-actions {
    align-items: stretch;
  }

  .owner-command-head,
  .owner-result-actions,
  .owner-search-actions,
  .owner-search-hints {
    flex-direction: column;
  }

  .owner-search-actions,
  .owner-search-actions button,
  .owner-search-actions .button-link {
    width: 100%;
  }

  .owner-result-card {
    grid-template-columns: 1fr;
  }

  .owner-result-type {
    min-height: 42px;
  }

  .owner-inline-reset {
    grid-template-columns: 1fr;
  }

  .credential-grid {
    grid-template-columns: 1fr;
  }

  .name-grid {
    grid-template-columns: 1fr;
  }

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

  .preference-receipt-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .preference-receipt-days {
    grid-template-columns: 1fr;
  }

  .hero,
  .section-head {
    flex-direction: column;
  }

  .swap-confirm-bar {
    inset-inline: 12px;
    inset-block-end: 12px;
    align-items: stretch;
    flex-direction: column;
  }

  .admin-swap-instruction {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .admin-swap-instruction > div {
    min-width: calc(100% - 52px);
    flex: 1;
  }

  .admin-swap-reset {
    width: 100%;
    margin-inline-start: 0;
  }

  .admin-edit-mode {
    width: 100%;
  }

  .admin-replacement-field {
    width: 100%;
    min-width: 0;
  }

  .swap-confirm-bar button,
  .preference-cart-bar button {
    width: 100%;
  }

  .swap-confirm-bar .admin-confirm-close {
    position: absolute;
    width: 34px !important;
  }
}

@media (max-width: 600px) {
  .modal-panel {
    padding: 18px;
  }

  .modal-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .username-copy-list {
    grid-template-columns: 1fr;
  }

  .preference-countdown {
    display: grid;
  }

  .countdown-display {
    min-width: 0;
    width: 100%;
    padding: 14px 10px;
  }

  .countdown-display span {
    min-width: 48px;
    font-size: 31px;
  }

  .landing {
    width: calc(100% - 24px);
    padding-bottom: 42px;
  }

  .landing-nav {
    gap: 10px;
  }

  .landing-brand-mark {
    width: 38px;
    height: 38px;
  }

  .landing-brand-wordmark {
    width: 100px;
  }

  .landing-nav nav {
    gap: 6px;
  }

  .landing-signin,
  .landing-signup {
    min-height: 40px;
    padding: 8px 11px;
    font-size: 13px;
  }

  .landing-hero {
    padding-top: 42px;
  }

  .landing-wordmark {
    width: min(100%, 430px);
    margin-inline: auto;
  }

  .landing-copy h2 {
    font-size: 25px;
  }

  .landing-lead {
    font-size: 15px;
  }

  .landing-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .landing-primary,
  .landing-secondary {
    padding-inline: 10px;
    font-size: 14px;
  }

  .landing-product {
    padding: 16px 12px;
  }

  .landing-calendar > span {
    padding: 7px 5px;
  }

  .landing-calendar b {
    font-size: 17px;
  }

  .landing-calendar small {
    display: none;
  }

  .landing-showcase {
    padding-top: 34px;
  }

  .landing-showcase-grid {
    gap: 12px;
  }

  .landing-mini-screen {
    min-height: auto;
    padding: 15px 12px;
  }

  .landing-mini-head {
    align-items: stretch;
  }

  .landing-mini-head b {
    font-size: 17px;
  }

  .landing-mini-head em {
    align-self: flex-start;
    font-size: 10px;
  }

  .landing-mini-calendar span {
    min-height: 40px;
  }

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

  .landing-rule-days span {
    min-height: 78px;
  }

  .landing-swap-flow {
    grid-template-columns: 1fr;
  }

  .landing-swap-flow i {
    margin-inline: auto;
    transform: rotate(90deg);
  }

  .landing-swap-flow div {
    min-height: 86px;
  }

  .landing-ledger-head,
  .landing-ledger-row {
    grid-template-columns: minmax(0, 1fr) 30px 52px 48px;
    gap: 3px;
  }

  .landing-ledger-head {
    padding-inline: 6px;
    font-size: 9px;
  }

  .landing-ledger-row {
    padding: 7px 6px;
  }

  .landing-ledger-row > span {
    font-size: 11px;
  }

  .landing-ledger-row b,
  .landing-ledger-row strong {
    font-size: 14px;
  }

  .landing-ledger-row small {
    min-width: 28px;
    min-height: 22px;
    font-size: 11px;
  }

  .landing-action-row {
    grid-template-columns: 1fr;
  }

  .landing-admin-strip {
    padding: 18px 14px;
  }

  .landing-admin-points {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  body {
    padding-bottom: 0;
  }

  body:has(.mobile-bottom-nav) {
    padding-bottom: calc(86px + env(safe-area-inset-bottom));
  }

  .login-wrap {
    align-items: center;
    padding: calc(18px + env(safe-area-inset-top)) 12px calc(14px + env(safe-area-inset-bottom));
  }

  .landing {
    width: min(100% - 28px, 720px);
    padding-top: calc(14px + env(safe-area-inset-top));
  }

  .landing-nav {
    min-height: 54px;
  }

  .landing-brand small {
    display: none;
  }

  .landing-hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 54px 0 60px;
  }

  .landing-copy {
    text-align: center;
  }

  .landing-kicker,
  .landing-lead {
    margin-inline: auto;
  }

  .landing-actions {
    justify-content: center;
  }

  .landing-features {
    grid-template-columns: 1fr;
  }

  .landing-showcase-grid,
  .landing-admin-strip,
  .landing-support {
    grid-template-columns: 1fr;
  }

  .login {
    padding: 20px;
    gap: 14px;
  }

  .auth-screen .login {
    max-height: calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .shell {
    display: block;
    min-height: 100dvh;
    padding-bottom: calc(86px + env(safe-area-inset-bottom));
  }

  .sidebar {
    display: none;
  }

  .nav {
    display: grid;
    gap: 6px;
  }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 30;
    inset-inline: 0;
    inset-block-end: 0;
    display: grid;
    gap: 6px;
    border: 1px solid rgba(156, 178, 214, 0.22);
    border-inline: 0;
    border-block-end: 0;
    border-radius: 14px 14px 0 0;
    padding: 8px max(14px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    background: linear-gradient(180deg, rgba(12, 28, 52, 0.98), rgba(6, 16, 34, 0.98));
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(18px);
  }

  .nav.intern-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .nav.admin-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .mobile-bottom-nav.intern-nav,
  .mobile-bottom-nav.admin-nav {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

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

  .nav .desktop-guide-nav {
    display: none;
  }

  .nav a,
  .nav .mobile-stats-nav,
  .mobile-bottom-nav a,
  .mobile-bottom-nav button {
    min-height: 54px;
    padding: 7px 5px;
    display: grid;
    place-items: center;
    text-align: center;
    font-size: 10px;
    line-height: 1.35;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(156, 178, 214, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    font-family: inherit;
    font-weight: 800;
    cursor: pointer;
  }

  .nav a[aria-current="page"],
  .nav .mobile-stats-nav[aria-current="page"],
  .mobile-bottom-nav a[aria-current="page"],
  .mobile-bottom-nav button[aria-current="page"] {
    background: linear-gradient(180deg, rgba(74, 163, 255, 0.28), rgba(74, 163, 255, 0.12));
    border-color: rgba(74, 163, 255, 0.56);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 0 0 1px rgba(74, 163, 255, 0.18);
  }

  .nav .mobile-stats-nav {
    display: grid;
    border: 1px solid rgba(156, 178, 214, 0.16);
    color: #d9e6ff;
  }

  .nav-badge {
    position: absolute;
    inset-block-start: -5px;
    inset-inline-end: -2px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin: 0;
    font-size: 11px;
  }

  .nav a:active,
  .nav .mobile-stats-nav:active,
  .mobile-bottom-nav a:active,
  .mobile-bottom-nav button:active {
    transform: translateY(1px);
    background: rgba(74, 163, 255, 0.16);
  }

  .nav svg,
  .nav .mobile-stats-nav svg,
  .mobile-bottom-nav svg {
    width: 20px;
    height: 20px;
    color: var(--blue);
  }

  .mobile-bottom-nav svg path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .nav .rotation-stats-nav,
  .nav .overall-stats-nav {
    display: none;
  }

  .mobile-stats-menu {
    position: fixed;
    z-index: 29;
    inset-inline: 12px;
    inset-block-end: 86px;
    border: 1px solid rgba(74, 163, 255, 0.34);
    border-radius: 8px;
    padding: 8px;
    background: rgba(5, 13, 29, 0.97);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
    gap: 6px;
    backdrop-filter: blur(18px);
  }

  .mobile-stats-menu.visible {
    display: grid;
  }

  .mobile-stats-menu a {
    border: 1px solid rgba(156, 178, 214, 0.16);
    border-radius: 8px;
    padding: 11px 12px;
    background: rgba(255, 255, 255, 0.06);
    display: grid;
    gap: 4px;
  }

  .mobile-stats-menu span {
    color: var(--text);
    font-weight: 800;
  }

  .mobile-stats-menu small {
    color: var(--muted);
  }

  .content,
  .content.single {
    padding: calc(18px + env(safe-area-inset-top)) 12px 12px;
    gap: 12px;
    max-width: none;
  }

  .site-footprint {
    margin: 0 auto calc(98px + env(safe-area-inset-bottom));
    padding: 0 14px;
    font-size: 11px;
  }

  .app-update {
    inset-inline: 12px;
    inset-block-end: calc(88px + env(safe-area-inset-bottom));
    width: auto;
    padding: 13px;
    align-items: stretch;
    flex-direction: column;
    gap: 11px;
  }

  .app-update button {
    width: 100%;
    min-width: 0;
  }

  .content > * {
    min-width: 0;
  }

  .hero {
    min-height: auto;
    align-items: stretch;
    padding: 16px;
    gap: 14px;
    background:
      linear-gradient(135deg, rgba(13, 36, 70, 0.96), rgba(9, 18, 38, 0.92)),
      linear-gradient(90deg, rgba(46, 230, 166, 0.12), rgba(74, 163, 255, 0.14), rgba(255, 95, 118, 0.1));
  }

  .hero h2 {
    margin-top: 8px;
    font-size: 28px;
    line-height: 1.35;
  }

  .hero p {
    display: block;
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.8;
    color: #c9d8ef;
  }

  .hero-card {
    min-width: 0;
    width: 100%;
    padding: 11px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    background: rgba(255, 255, 255, 0.055);
  }

  .hero-card span {
    grid-column: 1 / -1;
    font-size: 11px;
  }

  .hero-card b,
  .hero-card small {
    min-height: 34px;
    border: 1px solid rgba(156, 178, 214, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.055);
    padding: 7px 9px;
    display: flex;
    align-items: center;
    overflow-wrap: anywhere;
  }

  .hero-card b {
    font-size: 16px;
    color: var(--text);
  }

  .hero-card small {
    color: #c7d5ed;
    font-size: 11px;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .button-link {
    flex: 1 1 130px;
    min-height: 42px;
  }

  .preference-hero-actions {
    width: 100%;
    min-width: 0;
  }

  .hero > .button-link {
    align-self: flex-end;
    flex: 0 0 auto;
    min-height: 40px;
    padding: 9px 13px;
  }

  .hero .rotation-detail-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }

  .hero .rotation-detail-actions > form {
    display: flex;
    min-width: 0;
  }

  .hero .rotation-detail-actions .button-link,
  .hero .rotation-detail-actions button {
    width: 100%;
    min-width: 0;
    min-height: 50px;
    padding: 9px 10px;
    overflow-wrap: anywhere;
  }

  .rotation-panel {
    order: 1;
  }

  .calendar-panel {
    order: 2;
  }

  .dashboard-stats {
    order: 3;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .dashboard-stats .stat {
    padding: 12px;
  }

  .dashboard-stats .stat span {
    font-size: 11px;
  }

  .dashboard-stats .stat b {
    font-size: 22px;
  }

  #ledger {
    order: 4;
  }

  .panel {
    padding: 14px;
  }

  .section-head {
    gap: 10px;
  }

  .legend {
    width: 100%;
    gap: 8px;
  }

  .mobile-calendar-tools {
    display: flex;
    justify-content: flex-end;
  }

  .disclosure-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    color: var(--text);
    font-weight: 800;
    list-style: none;
  }

  .mobile-disclosure {
    display: block;
  }

  .mobile-disclosure > .disclosure-body {
    max-width: 100%;
  }

  .disclosure-summary::-webkit-details-marker {
    display: none;
  }

  .disclosure-summary:after {
    content: "+";
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: rgba(74, 163, 255, 0.12);
    color: var(--blue);
  }

  .mobile-disclosure[open] > .disclosure-summary:after {
    content: "−";
  }

  .disclosure-summary small {
    margin-inline-start: auto;
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
  }

  .mobile-disclosure[open] > .disclosure-body {
    margin-top: 14px;
  }

  .mobile-disclosure > .disclosure-body > .section-head {
    display: none;
  }

  .hospital-list {
    grid-template-columns: 1fr;
  }

  .hospital-card {
    padding: 14px;
  }

  .hospital-date-grid,
  .hospital-eligibility-grid {
    grid-template-columns: 1fr;
  }

  .hospital-card header {
    align-items: center;
  }

  .hospital-add {
    width: 100%;
  }

  .compact-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
  }

  .compact-weekday {
    min-height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.035);
    font-weight: 800;
    font-size: 12px;
  }

  .compact-day {
    min-width: 0;
    aspect-ratio: 1;
    border: 1px solid rgba(156, 178, 214, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--text);
    padding: 0;
    display: grid;
    place-items: center;
    position: relative;
    box-shadow: none;
  }

  .compact-day span {
    font-weight: 800;
    font-size: 16px;
    line-height: 1;
    position: relative;
    z-index: 1;
  }

  .compact-day.mine {
    border-color: rgba(46, 230, 166, 0.85);
    background: rgba(46, 230, 166, 0.2);
  }

  .compact-day.other {
    border-color: rgba(74, 163, 255, 0.42);
  }

  .compact-day.free {
    opacity: 0.45;
  }

  .compact-day.off-day {
    box-shadow: inset 0 0 0 2px rgba(255, 95, 118, 0.72), 0 0 12px rgba(255, 95, 118, 0.12);
  }

  .compact-day.sensitive {
    box-shadow: inset 0 0 0 2px rgba(255, 189, 89, 0.78), 0 0 12px rgba(255, 189, 89, 0.12);
  }

  .compact-day.off-day i,
  .compact-day.sensitive i {
    display: none;
  }

  .compact-day.blank {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
  }

  .compact-day.past {
    opacity: 0.5;
  }

  .full-calendar {
    display: none;
  }

  .calendar-panel.expanded .full-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(118px, 1fr));
  }

  .calendar-panel.expanded .compact-calendar {
    display: none;
  }

  .swap-form.expanded .swap-full-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(118px, 1fr));
  }

  .swap-form.expanded .swap-compact-calendar {
    display: none;
  }

  .admin-swap-calendar.expanded .admin-swap-full-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(118px, 1fr));
  }

  .admin-swap-calendar.expanded .admin-swap-compact-calendar {
    display: none;
  }

  .preference-form.expanded .preference-full-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(118px, 1fr));
  }

  .preference-form.expanded .preference-compact-calendar {
    display: none;
  }

  .slot-picker {
    inset-inline: 12px;
    inset-block-end: 92px;
    padding: 14px;
  }

  .slot-picker .site-shift-row {
    min-height: 58px;
    padding: 10px 12px;
  }

  .day-sheet {
    position: fixed;
    z-index: 35;
    inset-inline: 12px;
    inset-block-end: 84px;
    border: 1px solid rgba(74, 163, 255, 0.35);
    border-radius: 8px;
    background: rgba(8, 20, 38, 0.97);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
    padding: 16px;
    gap: 8px;
    transform: translateY(18px);
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(18px);
    transition: opacity 0.18s ease, transform 0.18s ease;
  }

  .day-sheet.visible {
    display: grid;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .day-sheet strong {
    font-size: 22px;
  }

  .day-sheet p {
    margin: 0;
    color: var(--text);
    line-height: 1.8;
  }

  .day-sheet em {
    color: var(--amber);
    font-style: normal;
  }

  .sheet-close {
    position: absolute;
    inset-inline-end: 10px;
    inset-block-start: 10px;
    width: 34px;
    height: 34px;
    padding: 0;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
  }

  .preference-cart-bar {
    inset-inline: 12px;
    inset-block-end: 84px;
    align-items: stretch;
    flex-direction: column;
  }

  .soft-toast {
    inset-inline: 12px;
    inset-block-start: 12px;
  }

  .table-wrap {
    overflow-x: auto;
  }

  .mobile-card-table {
    overflow-x: visible;
  }

  .mobile-card-table table,
  .mobile-card-table thead,
  .mobile-card-table tbody,
  .mobile-card-table tr,
  .mobile-card-table td {
    display: block;
    min-width: 0;
    width: 100%;
  }

  .mobile-card-table thead {
    display: none;
  }

  .mobile-card-table tr {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    padding: 10px;
    margin-bottom: 10px;
  }

  .mobile-card-table .rotation-list-row.needs-attention {
    border: 2px solid rgba(255, 189, 89, 0.72);
    background: linear-gradient(90deg, rgba(124, 78, 14, 0.17), rgba(255, 255, 255, 0.035) 42%);
    box-shadow: 0 0 24px rgba(255, 189, 89, 0.1);
  }

  .mobile-card-table .rotation-list-row.needs-attention > td {
    border: 0;
    background: transparent;
  }

  .mobile-card-table td {
    border-bottom: 0;
    padding: 8px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .mobile-card-table td:before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    flex: 0 0 auto;
  }

  .mobile-card-table .rotation-status {
    white-space: normal;
    text-align: center;
    line-height: 1.45;
  }

  .mobile-card-table td:last-child {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .mobile-card-table td:last-child:before {
    width: 100%;
  }

  .mobile-card-table .button-link.small {
    flex: 1 1 90px;
    min-height: 38px;
  }

  .preference-actions {
    flex-direction: column-reverse;
  }

  .preference-actions .button-link,
  .preference-actions button {
    width: 100%;
  }

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

  .guide-toc a {
    text-align: center;
    font-size: 12px;
  }

  .guide-grid,
  .guide-steps,
  .guide-split {
    grid-template-columns: 1fr;
  }

  .guide-card h3 {
    font-size: 20px;
  }

  .guide-timeline article {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .guide-screen-map .map-row {
    grid-template-columns: 1fr;
  }

  .guide-screen-map > div,
  .guide-screen-map .map-row > div {
    min-height: 84px;
  }

  .guide-screen-map .map-calendar {
    min-height: 130px;
  }
}
.generation-status {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(72, 166, 255, 0.55);
  border-inline-start: 5px solid var(--blue, #48a6ff);
  background: linear-gradient(110deg, rgba(49, 116, 186, 0.22), rgba(14, 27, 48, 0.94) 58%);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
}

.generation-running,
.generation-queued {
  border-color: rgba(245, 185, 73, 0.62);
  border-inline-start-color: #f5b949;
  background: linear-gradient(110deg, rgba(154, 108, 27, 0.27), rgba(14, 27, 48, 0.95) 62%);
}

.generation-completed {
  border-color: rgba(56, 217, 169, 0.62);
  border-inline-start-color: #38d9a9;
  background: linear-gradient(110deg, rgba(22, 118, 91, 0.28), rgba(14, 27, 48, 0.95) 62%);
}

.generation-failed {
  border-color: rgba(255, 92, 122, 0.62);
  border-inline-start-color: #ff5c7a;
  background: linear-gradient(110deg, rgba(145, 41, 65, 0.28), rgba(14, 27, 48, 0.95) 62%);
}

.generation-status h3 { font-size: 24px; }
.generation-status p { margin: 10px 0 0; color: #e7f0ff; font-size: 16px; font-weight: 750; }
.generation-status-title { display: flex; align-items: center; gap: 12px; }
.generation-status-icon { width: 13px; height: 13px; flex: 0 0 13px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 7px rgba(72, 166, 255, 0.13); }
.generation-running .generation-status-icon,
.generation-queued .generation-status-icon { background: var(--amber); box-shadow: 0 0 0 7px rgba(245, 185, 73, 0.15); }
.generation-completed .generation-status-icon { background: var(--green); box-shadow: 0 0 0 7px rgba(56, 217, 169, 0.14); }
.generation-failed .generation-status-icon { background: var(--red); box-shadow: 0 0 0 7px rgba(255, 92, 122, 0.14); }
.generation-running .generation-status-icon { animation: schedulerPulse 1.7s ease-in-out infinite; }

@keyframes schedulerPulse {
  50% { box-shadow: 0 0 0 12px rgba(245, 185, 73, 0.04); }
}

.rotation-detail-actions { display: grid; gap: 10px; align-content: center; justify-items: start; }
.rotation-detail-primary,
.rotation-detail-secondary,
.rotation-row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rotation-detail-primary form,
.rotation-detail-secondary form,
.rotation-row-actions form { margin: 0; }
.rotation-row-actions { min-width: 250px; flex-wrap: nowrap; }
.rotation-row-actions .button-link { min-width: 0; white-space: nowrap; }

.owner-observability-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.owner-observability-grid .owner-chart-panel:last-child { grid-column: 1 / -1; }
.owner-chart-panel,
.owner-system-panel { border: 1px solid var(--line); border-radius: 8px; background: rgba(14, 27, 48, 0.86); padding: 18px; box-shadow: var(--shadow); }
.owner-chart-total,
.owner-system-freshness { border: 1px solid rgba(56, 217, 169, 0.38); border-radius: 999px; padding: 6px 10px; color: #bdf7e4; font-size: 12px; font-weight: 850; }
.owner-system-freshness.is-stale { border-color: rgba(245, 185, 73, 0.45); color: #ffe0a2; }
.owner-system-freshness i { display: inline-block; width: 7px; height: 7px; margin-inline-end: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(56, 217, 169, 0.12); animation: liveStatusPulse 1.8s ease-in-out infinite; }
@keyframes liveStatusPulse { 50% { box-shadow: 0 0 0 9px rgba(56, 217, 169, 0.02); } }
.owner-bar-chart { height: 190px; display: grid; grid-template-columns: repeat(14, minmax(12px, 1fr)); align-items: end; gap: 6px; margin-top: 16px; padding-top: 24px; border-bottom: 1px solid var(--line); }
.owner-bar-column { height: 100%; min-width: 0; display: grid; grid-template-rows: 18px minmax(0, 1fr) 25px; align-items: end; justify-items: center; gap: 4px; }
.owner-bar-column i { width: min(22px, 78%); min-height: 3px; height: max(3px, var(--bar-height)); border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #49a6ff, #785ff4); }
.owner-generation-chart .owner-bar-column i { background: linear-gradient(180deg, #38d9a9, #278ec7); }
.owner-chart-legend { display: flex; gap: 12px; color: var(--muted); font-size: 11px; font-weight: 800; }
.owner-chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.owner-chart-legend span::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--blue); }
.owner-chart-legend .is-intern::before { background: var(--green); }
.owner-bar-pair { width: 100%; height: 100%; display: flex; align-items: end; justify-content: center; gap: 3px; }
.owner-signup-chart .owner-bar-pair i { width: min(10px, 36%); }
.owner-signup-chart .owner-bar-pair .is-admin { background: linear-gradient(180deg, #49a6ff, #785ff4); }
.owner-signup-chart .owner-bar-pair .is-intern { background: linear-gradient(180deg, #38d9a9, #168f75); }
.owner-bar-value { color: #dce9fb; font-size: 11px; font-weight: 850; }
.owner-bar-value-pair { width: 100%; display: flex; justify-content: center; gap: 4px; }
.owner-bar-value-pair b { min-width: 10px; font: inherit; text-align: center; }
.owner-bar-value-pair .is-admin { color: #7cbaff; }
.owner-bar-value-pair .is-intern { color: #54ddb5; }
.owner-bar-column small { color: var(--muted); font-size: 9px; writing-mode: vertical-rl; }
.owner-chart-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; }
.owner-system-panel { display: grid; gap: 16px; }
.owner-system-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.owner-system-grid article { border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: rgba(255, 255, 255, 0.025); display: grid; gap: 10px; }
.owner-system-grid article > div:first-child { display: flex; justify-content: space-between; align-items: baseline; }
.owner-system-grid span,
.owner-system-grid small { color: var(--muted); }
.owner-system-grid b { font-size: 25px; }
.owner-resource-meter { height: 8px; overflow: hidden; border-radius: 999px; background: rgba(147, 167, 199, 0.18); }
.owner-resource-meter i { display: block; width: var(--resource-value); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), var(--blue), var(--amber)); transition: width 300ms ease; }

@media (max-width: 760px) {
  .hero .rotation-detail-actions,
  .rotation-detail-primary,
  .rotation-detail-secondary { width: 100%; }
  .hero .rotation-detail-actions { grid-template-columns: 1fr; }
  .rotation-detail-primary,
  .rotation-detail-secondary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rotation-detail-primary > *,
  .rotation-detail-secondary > * { width: 100%; }
  .rotation-detail-primary button,
  .rotation-detail-secondary .button-link { width: 100%; min-height: 48px; }
  .rotation-row-actions { width: 100%; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rotation-row-actions .button-link { width: 100%; min-height: 48px; padding-inline: 8px; }
  .owner-observability-grid { grid-template-columns: 1fr; }
  .owner-observability-grid .owner-chart-panel:last-child { grid-column: auto; }
  .owner-system-grid { grid-template-columns: 1fr; }
  .owner-bar-chart { gap: 3px; }
  .owner-bar-value { font-size: 9px; }
}

/* Owner operations console */
.owner-brand-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 8px;
  object-fit: contain;
}

.owner-status-strip,
.owner-ops-metrics,
.owner-dossier-metrics {
  display: grid;
  gap: 10px;
}

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

.owner-status-item {
  min-height: 74px;
  border: 1px solid var(--line);
  border-inline-start: 4px solid #49a6ff;
  border-radius: 8px;
  background: rgba(14, 27, 48, 0.82);
  padding: 12px 14px;
  display: grid;
  align-content: center;
  gap: 5px;
}

.owner-status-item > span,
.owner-status-item small {
  color: var(--muted);
  font-size: 12px;
}

.owner-status-item.is-ok { border-inline-start-color: var(--green); }
.owner-status-item.is-warning { border-inline-start-color: var(--amber); }
.owner-status-item.is-danger { border-inline-start-color: var(--red); }

.owner-workspace-grid,
.owner-dossier-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.8fr);
  gap: 14px;
}

.owner-attention-panel,
.owner-pipeline-panel,
.owner-registry-toolbar {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(14, 27, 48, 0.84);
  padding: 18px;
  box-shadow: var(--shadow);
}

.owner-attention-list,
.owner-pipeline-list,
.owner-activity-list,
.owner-audit-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.owner-attention-row {
  min-height: 64px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-inline-start: 4px solid #49a6ff;
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.025);
}

.owner-attention-row.is-critical { border-inline-start-color: var(--red); }
.owner-attention-row.is-warning { border-inline-start-color: var(--amber); }
.owner-attention-row b { font-size: 24px; }
.owner-attention-row span { display: grid; gap: 3px; }
.owner-attention-row small { color: var(--muted); }
.owner-attention-row i { color: #b7d9ff; font-style: normal; font-weight: 800; }

.owner-clear-state {
  min-height: 110px;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 6px;
  color: #c9f8e8;
}

.owner-clear-state span { color: var(--muted); }

.owner-pipeline-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 9px 2px;
}

.owner-pipeline-list div:last-child { border-bottom: 0; }
.owner-pipeline-list span { color: var(--muted); }

.owner-attention-total {
  color: #ffd2da;
  font-weight: 850;
}

.owner-activity-row,
.owner-audit-list > div {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 10px 2px;
}

.owner-audit-list > div { grid-template-columns: minmax(0, 1fr) auto; }
.owner-activity-row:last-child,
.owner-audit-list > div:last-child { border-bottom: 0; }
.owner-activity-row > span:nth-child(2),
.owner-audit-list span { display: grid; gap: 3px; }
.owner-activity-row small,
.owner-audit-list small,
.owner-activity-row time,
.owner-audit-list time { color: var(--muted); font-size: 12px; }
.owner-activity-kind { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.owner-activity-kind.is-job { background: var(--amber); }
.owner-activity-kind.is-owner { background: var(--purple); }
.owner-activity-kind.is-account { background: var(--green); }

.owner-ops-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.owner-ops-metrics a,
.owner-dossier-metrics article {
  min-height: 100px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(14, 27, 48, 0.84);
  padding: 14px;
  display: grid;
  align-content: center;
  gap: 7px;
}

.owner-ops-metrics span,
.owner-dossier-metrics span,
.owner-dossier-metrics small { color: var(--muted); }
.owner-ops-metrics b,
.owner-dossier-metrics b { font-size: 30px; }
.owner-ops-metrics .has-danger,
.owner-dossier-metrics .has-danger { border-color: rgba(255, 95, 118, 0.52); }

.owner-ops-section { scroll-margin-top: 18px; }
.owner-ops-table table,
.owner-registry-table table,
.owner-dossier-table table { min-width: 920px; }
.owner-error-cell { max-width: 300px; color: #ffd0d8; }
.owner-row-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.owner-row-actions form { margin: 0; }
.owner-pipeline-filters { display: flex; gap: 7px; flex-wrap: wrap; margin: 0 0 14px; }
.owner-pipeline-filters span { border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; color: var(--muted); font-size: 12px; }

.owner-registry-filters {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) minmax(160px, 0.8fr) minmax(160px, 0.8fr) auto auto;
  gap: 10px;
  align-items: end;
}

.owner-registry-filters label { display: grid; gap: 6px; margin: 0; color: var(--muted); font-size: 12px; font-weight: 800; }
.owner-registry-filters input,
.owner-registry-filters select,
.owner-registry-filters button,
.owner-registry-filters .button-link { min-height: 50px; }
.owner-table-primary { display: block; color: #eaf3ff; font-weight: 900; }
.owner-registry-table td > small,
.owner-dossier-table td > small { display: block; margin-top: 4px; color: var(--muted); }

.owner-emergency-create > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.owner-emergency-create > summary::-webkit-details-marker { display: none; }
.owner-emergency-create > summary span { display: grid; gap: 4px; }
.owner-emergency-create > summary small { color: var(--muted); }
.owner-emergency-create > summary i { color: #b9d9ff; font-style: normal; }
.owner-emergency-create[open] .owner-create-form { margin-top: 18px; }

.owner-dossier-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.owner-dossier-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.owner-facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.owner-facts div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 12px 0; }
.owner-facts dt { color: var(--muted); }
.owner-facts dd { margin: 0; font-weight: 800; text-align: end; overflow-wrap: anywhere; }
.danger-text { color: #ff9bab; }
.owner-recovery-panel { align-content: start; }
.owner-recovery-note { margin-top: 14px; border: 1px solid rgba(255, 189, 89, 0.28); border-radius: 8px; background: rgba(255, 189, 89, 0.06); padding: 12px; display: grid; gap: 4px; }
.owner-recovery-note span { color: var(--muted); }
.owner-danger-zone { border-color: rgba(255, 95, 118, 0.36); background: rgba(68, 17, 31, 0.32); }
.owner-danger-zone p { color: #f0aeb9; }

@media (max-width: 1100px) {
  .owner-shell { display: block; }
  .owner-rail {
    position: sticky;
    top: 0;
    z-index: 30;
    height: auto;
    min-height: 72px;
    border-left: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px 14px;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  .owner-rail .brand { flex: 0 0 auto; }
  .owner-rail .brand p { display: none; }
  .owner-rail .brand h1 { font-size: 20px; }
  .owner-brand-mark { width: 40px; height: 40px; flex-basis: 40px; }
  .owner-nav { display: flex; flex: 1 1 auto; overflow-x: auto; gap: 6px; }
  .owner-nav a { white-space: nowrap; padding: 9px 10px; }
  .owner-rail > form { flex: 0 0 auto; }
  .owner-rail > form button { width: auto; min-height: 40px; padding-inline: 12px; }
  .owner-content { padding: 18px; }
  .owner-metrics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .owner-status-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .owner-workspace-grid,
  .owner-dossier-grid { grid-template-columns: 1fr; }
  .owner-ops-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .owner-dossier-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .owner-registry-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .owner-registry-query { grid-column: 1 / -1; }
  .owner-create-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  body:has(.owner-shell) {
    padding-bottom: calc(82px + env(safe-area-inset-bottom));
  }
  .owner-shell,
  .owner-content,
  .owner-content > * {
    min-width: 0;
    max-width: 100%;
  }
  .owner-rail {
    position: fixed;
    inset: auto 0 0;
    z-index: 40;
    min-height: 70px;
    padding: 8px 8px max(8px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    border-bottom: 0;
    background: rgba(5, 13, 29, 0.96);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 6px;
  }
  .owner-rail .brand { display: none; }
  .owner-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    overflow: visible;
  }
  .owner-nav a {
    min-width: 0;
    min-height: 48px;
    padding: 6px 3px;
    display: grid;
    place-items: center;
    white-space: normal;
    text-align: center;
    font-size: 10px;
    line-height: 1.25;
  }
  .owner-rail > form { align-self: stretch; }
  .owner-rail > form button { height: 100%; min-height: 48px; font-size: 0; width: 42px; padding: 0; }
  .owner-rail > form button::before { content: "×"; font-size: 22px; }
  .owner-content { padding: 12px 12px 20px; gap: 12px; }
  .owner-hero { padding: 18px; gap: 14px; }
  .owner-hero h2 { font-size: 30px; }
  .owner-hero p {
    max-width: 100%;
    margin-bottom: 0;
    overflow-wrap: anywhere;
  }
  .owner-metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .owner-metric { min-height: 112px; padding: 13px; }
  .owner-metric b { font-size: 32px; }
  .owner-status-strip,
  .owner-ops-metrics,
  .owner-dossier-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .owner-status-item,
  .owner-ops-metrics a,
  .owner-dossier-metrics article { min-height: 88px; padding: 11px; }
  .owner-attention-panel,
  .owner-pipeline-panel,
  .owner-registry-toolbar { padding: 14px; }
  .owner-attention-row { grid-template-columns: 36px minmax(0, 1fr); }
  .owner-attention-row i { display: none; }
  .owner-command-search,
  .owner-registry-filters,
  .owner-create-form,
  .owner-facts { grid-template-columns: 1fr; }
  .owner-registry-query { grid-column: auto; }
  .owner-registry-filters > button,
  .owner-registry-filters > .button-link { width: 100%; }
  .owner-result-card { padding: 10px; }
  .owner-facts div { min-width: 0; }
  .owner-dossier-hero .owner-hero-actions,
  .owner-dossier-hero .owner-hero-actions > * { width: 100%; }
  .owner-dossier-hero .owner-hero-actions button { width: 100%; }
  .owner-activity-row { grid-template-columns: 10px minmax(0, 1fr); }
  .owner-activity-row time { grid-column: 2; }
  .owner-audit-list > div { grid-template-columns: 1fr; }
  .owner-ops-table,
  .owner-registry-table,
  .owner-dossier-table {
    width: 100%;
    max-width: 100%;
    overflow: visible;
  }
  .owner-panel-compact {
    width: 100%;
    margin-inline: 0;
  }
  .owner-ops-table table,
  .owner-registry-table table,
  .owner-dossier-table table {
    width: 100%;
    min-width: 0;
  }
}

/* Action guidance */
.attention-target {
  border-color: rgba(255, 189, 89, 0.64) !important;
  box-shadow: inset 3px 0 0 rgba(255, 189, 89, 0.8), inset 0 0 0 1px rgba(255, 189, 89, 0.14), 0 0 28px rgba(255, 189, 89, 0.09);
  background: linear-gradient(90deg, rgba(124, 78, 14, 0.13), rgba(255, 255, 255, 0.025) 32%);
}

.rotation-list-row.needs-attention > td {
  border-top: 1px solid rgba(255, 189, 89, 0.48);
  border-bottom: 1px solid rgba(255, 189, 89, 0.48);
  background: rgba(124, 78, 14, 0.1);
}

.rotation-list-row.needs-attention > td:first-child {
  border-inline-start: 3px solid rgba(255, 189, 89, 0.82);
}

.rotation-list-row.needs-attention > td:last-child {
  border-inline-end: 1px solid rgba(255, 189, 89, 0.48);
}

.attention-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 7px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 189, 89, 0.4);
  border-radius: 999px;
  color: #ffe0a5;
  background: rgba(124, 78, 14, 0.24);
  font-size: 11px;
  font-weight: 700;
}

.rotation-status-badges {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.rotation-status-badges .attention-label {
  margin-top: 0;
}

.rotation-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.rotation-status::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 9px currentColor;
}

.rotation-status-success,
.rotation-status-ready {
  color: #9cf0d1;
  border-color: rgba(48, 221, 169, 0.58);
  background: rgba(16, 116, 88, 0.38);
  box-shadow: inset 0 0 0 1px rgba(48, 221, 169, 0.08);
}

.rotation-status-warning {
  color: #ffe0a5;
  border-color: rgba(255, 189, 89, 0.62);
  background: rgba(124, 78, 14, 0.38);
  box-shadow: inset 0 0 0 1px rgba(255, 189, 89, 0.08);
}

.rotation-status-danger {
  color: #ffc4cf;
  border-color: rgba(255, 85, 119, 0.62);
  background: rgba(116, 28, 50, 0.4);
  box-shadow: inset 0 0 0 1px rgba(255, 85, 119, 0.08);
}

.rotation-status-muted {
  color: var(--muted);
  border-color: var(--line);
  background: rgba(69, 84, 109, 0.24);
}

.past-editable-pill {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 4px 6px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  line-height: 1.25;
  font-size: 10px;
  color: #bde3ff;
  border-color: rgba(66, 166, 255, 0.4);
  background: rgba(31, 96, 155, 0.2);
}

.settlement-lock-warning {
  margin-bottom: 14px;
  border-width: 2px;
}

.settled-lock-pill {
  color: #ffc4cf;
  border-color: rgba(255, 85, 119, 0.42);
  background: rgba(116, 28, 50, 0.25);
}

/* Dual messenger onboarding */
.messenger-choice-grid,
.messenger-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.messenger-provider-page {
  display: grid;
  gap: 14px;
}

.messenger-choice-grid > form {
  min-width: 0;
  margin: 0;
}

.messenger-choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 84px;
  padding: 14px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(31, 48, 75, 0.72);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
  width: 100%;
  min-width: 0;
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.messenger-choice:hover,
.messenger-choice:focus-visible {
  border-color: var(--blue);
  background: rgba(36, 68, 106, 0.88);
  transform: translateY(-1px);
}

.messenger-choice.preferred {
  border-color: rgba(66, 166, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(66, 166, 255, 0.12);
}

.messenger-choice.preferred::after {
  content: "پیشنهادی";
  position: absolute;
  inset-block-start: 7px;
  inset-inline-end: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  color: #bde3ff;
  background: rgba(32, 137, 220, 0.18);
  font-size: 10px;
}

.messenger-provider-logo {
  display: block;
  width: 44px !important;
  min-width: 44px;
  max-width: 44px !important;
  height: 44px !important;
  min-height: 44px;
  max-height: 44px !important;
  flex: 0 0 44px;
  object-fit: contain;
}

.messenger-profile-logo {
  width: 38px !important;
  min-width: 38px;
  max-width: 38px !important;
  height: 38px !important;
  min-height: 38px;
  max-height: 38px !important;
  flex-basis: 38px;
}

.messenger-connect-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(100%, 320px);
  margin-top: 12px;
  padding: 10px 14px;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(111, 185, 255, 0.55);
  border-radius: 8px;
  background: rgba(36, 112, 185, 0.42);
}

.messenger-connect-button.bale {
  border-color: rgba(48, 221, 169, 0.52);
  background: rgba(14, 109, 91, 0.4);
}

.auth-flow-back {
  display: block;
  width: fit-content;
  margin: 14px auto 0;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid rgba(176, 194, 219, 0.38);
}

.messenger-choice span {
  display: grid;
  gap: 3px;
}

.messenger-choice small,
.messenger-profile-card small {
  color: var(--muted);
  font-size: 11px;
}

.messenger-profile-panel {
  grid-column: 1 / -1;
}

.messenger-profile-intro {
  margin-top: -6px;
}

.messenger-profile-card {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 35, 61, 0.7);
}

.messenger-profile-card header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}

.messenger-profile-card header > div {
  display: grid;
  gap: 2px;
}

.backup-messenger-card {
  max-width: 520px;
}

.backup-messenger-visual {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0 8px;
  padding: 16px;
  border: 1px solid rgba(48, 221, 169, 0.45);
  border-radius: 8px;
  background: rgba(14, 73, 76, 0.35);
}

.backup-messenger-visual .messenger-provider-logo {
  width: 42px !important;
  min-width: 42px;
  max-width: 42px !important;
  height: 42px !important;
  min-height: 42px;
  max-height: 42px !important;
  flex-basis: 42px;
}

.backup-messenger-visual.telegram {
  border-color: rgba(66, 166, 255, 0.48);
  background: rgba(20, 74, 116, 0.35);
}

.backup-messenger-visual div {
  display: grid;
  gap: 5px;
}

.backup-messenger-visual p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.messenger-link-wait {
  padding: 11px;
  text-align: center;
  color: #bde3ff;
  border: 1px solid rgba(66, 166, 255, 0.32);
  background: rgba(66, 166, 255, 0.1);
}

@media (max-width: 700px) {
  .messenger-choice-grid,
  .messenger-profile-grid {
    grid-template-columns: 1fr;
  }

  .messenger-choice {
    min-height: 76px;
  }

  .messenger-profile-card header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .messenger-profile-card header .pill {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

/* Role-specific product manual */
.guide-manual {
  --guide-surface: rgba(11, 28, 51, 0.78);
  --guide-soft: rgba(39, 59, 88, 0.56);
  width: 100%;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  max-width: 1480px;
  padding-bottom: 44px;
}

.guide-manual-hero {
  align-items: stretch;
  gap: 28px;
}

.guide-manual-hero > div:first-child {
  max-width: 820px;
}

.guide-manual-hero h2 {
  margin: 10px 0 8px;
}

.guide-manual-identity {
  min-width: 250px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(40, 57, 84, 0.68);
  padding: 18px;
  display: grid;
  align-content: center;
  gap: 7px;
}

.guide-manual-identity span,
.guide-manual-identity small {
  color: var(--muted);
}

.guide-manual-identity b {
  font-size: 24px;
}

.guide-manual-identity .button-link {
  margin-top: 8px;
  width: 100%;
}

.guide-manual-nav {
  position: sticky;
  top: 10px;
  z-index: 18;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(4, 15, 32, 0.94);
  padding: 8px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
}

.guide-manual-nav::-webkit-scrollbar {
  display: none;
}

.guide-manual-nav a {
  flex: 1 0 auto;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 9px 13px;
  display: grid;
  place-items: center;
  color: #bad0ea;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.guide-manual-nav a:hover,
.guide-manual-nav a:focus-visible {
  border-color: rgba(68, 164, 255, 0.48);
  background: rgba(36, 103, 168, 0.22);
  color: #fff;
}

.guide-intro-band,
.guide-chapter {
  scroll-margin-top: 84px;
}

.guide-intro-band {
  border-block: 1px solid var(--line);
  padding: 34px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(440px, 0.95fr);
  align-items: center;
  gap: 42px;
}

.guide-intro-band h3,
.guide-chapter h3 {
  margin: 7px 0 10px;
  line-height: 1.55;
}

.guide-intro-band h3 {
  max-width: 720px;
  font-size: clamp(26px, 3vw, 40px);
}

.guide-intro-band p,
.guide-chapter p,
.guide-check-list {
  color: #bdcde1;
  line-height: 2;
}

.guide-flow-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.guide-flow-list li {
  min-height: 98px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--guide-surface);
  padding: 14px;
  display: grid;
  align-content: center;
  gap: 5px;
}

.guide-flow-list li::before {
  content: counter(list-item, decimal-leading-zero);
  color: var(--green);
  font-weight: 900;
}

.guide-flow-list span {
  color: var(--muted);
  font-size: 13px;
}

.guide-chapter {
  border-bottom: 1px solid var(--line);
  padding: 42px 10px 52px;
}

.guide-chapter-media {
  display: grid;
  grid-template-columns: minmax(320px, 0.88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}

.guide-chapter-reverse .guide-chapter-copy {
  order: 2;
}

.guide-chapter-reverse .guide-shot {
  order: 1;
}

.guide-chapter-reverse .guide-shot-stack {
  order: 1;
}

.guide-chapter-copy {
  min-width: 0;
}

.guide-step-no {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(64, 164, 255, 0.54);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  margin-bottom: 12px;
  color: #89caff;
  background: rgba(24, 91, 154, 0.16);
  font-weight: 900;
}

.guide-check-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.guide-check-list li {
  position: relative;
  padding: 10px 34px 10px 0;
  border-bottom: 1px solid rgba(103, 130, 163, 0.2);
}

.guide-check-list li:last-child {
  border-bottom: 0;
}

.guide-check-list li::before {
  content: "\2713";
  position: absolute;
  inset-inline-start: 0;
  top: 10px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(48, 221, 169, 0.14);
  color: var(--green);
  font-size: 12px;
  font-weight: 950;
}

.guide-note,
.guide-warning {
  margin-top: 18px;
  border: 1px solid rgba(48, 221, 169, 0.35);
  border-radius: 8px;
  background: rgba(10, 91, 83, 0.14);
  padding: 14px 16px;
  color: #c7eade;
  line-height: 1.9;
}

.guide-warning {
  border-color: rgba(255, 189, 89, 0.42);
  background: rgba(125, 79, 14, 0.13);
  color: #f4d9a6;
}

.guide-shot {
  margin: 0;
  min-width: 0;
  border: 1px solid rgba(71, 112, 157, 0.56);
  border-radius: 8px;
  background: rgba(5, 14, 29, 0.76);
  padding: 10px;
  overflow: hidden;
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.28);
}

.guide-shot picture,
.guide-shot img {
  display: block;
  width: 100%;
}

.guide-shot img {
  max-height: 680px;
  border-radius: 5px;
  object-fit: cover;
  object-position: top;
}

.guide-shot figcaption {
  padding: 12px 6px 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.guide-shot-wide {
  margin-top: 24px;
}

.guide-shot-wide img {
  max-height: 620px;
  object-fit: contain;
  background: #061126;
}

.guide-shot-grid,
.guide-shot-stack {
  display: grid;
  gap: 14px;
}

.guide-shot-grid {
  margin-top: 24px;
}

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

.guide-shot-grid-phone {
  grid-template-columns: repeat(2, minmax(0, 380px));
  justify-content: center;
}

.guide-shot-phone {
  width: 100%;
  max-width: 380px;
  margin-inline: auto;
}

.guide-shot-phone img {
  max-height: 720px;
  object-fit: contain;
  background: #061126;
}

.guide-shot-span,
.guide-shot-span-full {
  grid-column: 1 / -1;
}

.guide-chapter-media > .guide-shot-span-full {
  grid-column: 1 / -1;
  width: 100%;
}

.guide-chapter-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.guide-chapter-heading .guide-step-no {
  flex: 0 0 auto;
  margin: 0;
}

.guide-chapter-heading h3 {
  margin: 2px 0 0;
}

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

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

.guide-columns > div,
.guide-scenarios article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--guide-surface);
  padding: 16px;
}

.guide-columns h4,
.guide-scenarios h4 {
  margin: 0 0 7px;
  font-size: 16px;
}

.guide-columns p,
.guide-scenarios p {
  margin: 0;
  font-size: 13px;
  line-height: 1.9;
}

.guide-site-rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0;
}

.guide-site-rules div {
  border-inline-start: 3px solid var(--blue);
  background: rgba(20, 42, 70, 0.62);
  padding: 13px;
  display: grid;
  gap: 5px;
}

.guide-site-rules span {
  color: var(--muted);
  font-size: 13px;
}

.guide-scenarios {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.guide-scenarios article {
  border-top: 3px solid rgba(48, 221, 169, 0.72);
}

.guide-final-check {
  border-bottom: 0;
}

.guide-final-actions {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.guide-final-actions p {
  margin: 0;
}

.guide-final-actions .button-link {
  flex: 0 0 auto;
}

@media (max-width: 1000px) {
  .guide-intro-band,
  .guide-chapter-media {
    grid-template-columns: 1fr;
  }

  .guide-chapter-reverse .guide-chapter-copy,
  .guide-chapter-reverse .guide-shot,
  .guide-chapter-reverse .guide-shot-stack {
    order: initial;
  }

  .guide-chapter-media .guide-shot {
    max-width: 840px;
    margin-inline: auto;
  }

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

  .guide-shot-grid-wide {
    grid-template-columns: 1fr;
  }

  .guide-shot-span,
  .guide-shot-span-full {
    grid-column: auto;
  }
}

@media (max-width: 700px) {
  .guide-manual {
    gap: 12px;
    padding-inline: 12px;
    padding-bottom: calc(104px + env(safe-area-inset-bottom));
  }

  .guide-manual-hero {
    display: grid;
    padding: 19px;
    gap: 18px;
  }

  .guide-manual-hero h2 {
    font-size: 34px;
    line-height: 1.35;
  }

  .guide-manual-hero p {
    font-size: 14px;
  }

  .guide-manual-identity {
    min-width: 0;
    padding: 14px;
  }

  .guide-manual-nav {
    top: calc(env(safe-area-inset-top) + 6px);
    margin-inline: 0;
  }

  .guide-manual-nav a {
    min-height: 40px;
    padding: 8px 11px;
    font-size: 12px;
  }

  .guide-intro-band {
    padding: 27px 3px;
    gap: 22px;
  }

  .guide-intro-band h3 {
    font-size: 27px;
  }

  .guide-flow-list,
  .guide-columns,
  .guide-site-rules,
  .guide-scenarios,
  .guide-shot-grid-phone {
    grid-template-columns: 1fr;
  }

  .guide-flow-list li {
    min-height: 82px;
  }

  .guide-chapter {
    padding: 30px 3px 38px;
  }

  .guide-chapter-media {
    gap: 25px;
  }

  .guide-chapter h3 {
    font-size: 25px;
  }

  .guide-chapter-heading {
    align-items: flex-start;
  }

  .guide-check-list li {
    padding-inline-end: 32px;
    font-size: 14px;
  }

  .guide-shot {
    width: calc(100% + 6px);
    margin-inline: -3px;
    padding: 6px;
  }

  .guide-shot img,
  .guide-shot-wide img {
    max-height: none;
    object-fit: contain;
  }

  .guide-shot figcaption {
    padding: 10px 5px 4px;
  }

  .guide-final-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .guide-final-actions .button-link {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .hospital-base-points {
    grid-template-columns: 1fr;
  }

  .site-rule-tabs {
    margin-inline: -4px;
  }

  .site-rule-tabs button {
    min-width: 125px;
  }

  .mobile-card-table .rotation-list-row.needs-attention {
    border: 1px solid var(--line);
    border-inline-start: 4px solid rgba(255, 189, 89, 0.88);
    background: linear-gradient(90deg, rgba(124, 78, 14, 0.13), rgba(255, 255, 255, 0.035) 36%);
  }

  .mobile-card-table .rotation-list-row.needs-attention > td,
  .mobile-card-table .rotation-list-row.needs-attention > td:first-child,
  .mobile-card-table .rotation-list-row.needs-attention > td:last-child {
    border: 0;
  }

  .mobile-card-table td[data-label="وضعیت"] {
    align-items: flex-start;
  }

  .mobile-card-table .rotation-status-badges {
    flex: 1 1 auto;
    justify-content: flex-end;
    gap: 7px;
  }

  .mobile-card-table .rotation-status-badges > * {
    min-height: 30px;
    margin: 0;
  }

  .rotation-detail-primary {
    align-items: stretch;
    grid-auto-rows: minmax(68px, auto);
  }

  .rotation-detail-primary > form {
    display: flex;
    align-items: stretch;
  }

  .rotation-detail-primary > form > button,
  .rotation-detail-primary > button,
  .rotation-detail-primary > .button-link {
    height: 100%;
    min-height: 68px;
  }
}
