:root {
  --bg: #fafbfc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e8ecf0;
  --accent: #1f4ed8;
  --pending: #ca8a04;
  --closed: #15803d;
  --cancelled: #dc2626;
  color-scheme: light;
}
html[data-theme="dark"] {
  --bg: #0b1018;
  --surface: #151c27;
  --surface-2: #1c2533;
  --text: #e8eef7;
  --muted: #94a3b8;
  --line: #2a3548;
  --accent: #7b95ff;
  --pending: #eab308;
  --closed: #4ade80;
  --cancelled: #f87171;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.adm-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.adm-login[hidden],
.adm-app[hidden],
#calendarHome[hidden],
#dayWorkspace[hidden] {
  display: none !important;
}
.adm-hint {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 10px;
}
.adm-card--link {
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  background: var(--surface);
}
.adm-strip {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 8px;
  overflow: hidden;
  padding-left: 6px;
}
.adm-strip::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: #facc15;
}
.adm-strip--closed::before { background: var(--closed); }
.adm-strip--cancelled::before { background: var(--cancelled); }
.adm-strip.is-open {
  border-color: rgba(202, 138, 4, 0.45);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}
.adm-strip--closed.is-open { border-color: rgba(21, 128, 61, 0.35); }
.adm-strip--cancelled.is-open { border-color: rgba(220, 38, 38, 0.35); }
.adm-strip__row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  gap: 4px 10px;
  align-items: center;
  padding: 9px 12px 10px;
  border: 0;
  background: var(--surface);
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.adm-strip__name {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adm-strip__sum {
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
}
.adm-strip__chev {
  color: var(--muted);
  font-size: 12px;
}
.adm-hl {
  background: linear-gradient(transparent 42%, #fde047 42% 88%, transparent 88%);
  color: inherit;
  padding: 0 3px;
  font-weight: 700;
}
.adm-strip--closed .adm-hl {
  background: linear-gradient(transparent 42%, #86efac 42% 88%, transparent 88%);
}
.adm-strip--cancelled .adm-hl {
  background: linear-gradient(transparent 42%, #fca5a5 42% 88%, transparent 88%);
}
.adm-strip__preview {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.adm-strip.is-open .adm-strip__preview { display: none; }
.adm-strip__body {
  border-top: 1px solid var(--line);
  padding: 4px 8px 8px;
}
.adm-strip .adm-work {
  border: 0;
  box-shadow: none;
  margin: 0;
  padding: 12px;
}
.adm-work {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 16px;
}
.adm-work__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.adm-work__head-side {
  display: flex;
  align-items: center;
  gap: 10px;
}
.adm-work__chat {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: #1f4ed8;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 10px 24px rgba(31, 78, 216, 0.4);
}
.adm-work__chat:hover {
  filter: brightness(1.08);
}
.adm-work__chat svg {
  width: 24px;
  height: 24px;
}
.adm-work__id {
  margin: 0 0 4px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.adm-work h3 { margin: 0 0 4px; font-size: 1.2rem; }
.adm-work h4 { margin: 14px 0 8px; font-size: 13px; }
.adm-dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 0;
}
.adm-dl dt {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.adm-dl dd { margin: 2px 0 0; }
.adm-items { list-style: none; padding: 0; margin: 0; }
.adm-items li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.adm-item-econ {
  flex-wrap: wrap;
  align-items: flex-end;
}
.adm-item-econ__name {
  display: grid;
  gap: 2px;
  flex: 1 1 180px;
}
.adm-item-econ__name strong {
  font-weight: 700;
  font-size: 13px;
}
.adm-item-econ__drop {
  display: grid;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex: 0 0 140px;
}
.adm-item-econ__drop input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  font-weight: 700;
  color: var(--text);
  background: var(--surface-2);
  text-transform: none;
  letter-spacing: 0;
}
.adm-item-econ__margin {
  flex: 1 1 100%;
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.adm-item-econ__margin strong {
  color: var(--closed);
}
.adm-order-econ {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--muted);
}
.adm-order-econ strong {
  color: var(--closed);
}
.adm-total { font-weight: 800; font-size: 16px; }
.adm-note { display: grid; gap: 6px; margin: 12px 0; font-size: 13px; }
.adm-note textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  background: var(--surface);
  color: var(--text);
}
.adm-sent { color: var(--closed); font-size: 13px; font-weight: 600; }
a.adm-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
#dayWorkspace .adm-btn { margin-bottom: 12px; }
@media (max-width: 720px) {
  .adm-dl { grid-template-columns: 1fr; }
}
.adm-login__card {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.06);
}
.adm-login__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.adm-login__head .adm-login__brand {
  margin: 0;
}
.adm-login__brand {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.adm-login__card h1 {
  margin: 0 0 8px;
  font-size: 1.55rem;
}
.adm-login__cred {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
}
.adm-login form {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}
.adm-login label span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}
.adm-login input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  font: inherit;
  box-sizing: border-box;
  background: var(--surface);
  color: var(--text);
}
.adm-pass-wrap {
  position: relative;
}
.adm-pass-wrap input {
  padding-right: 46px;
}
.adm-pass-wrap input::-ms-reveal,
.adm-pass-wrap input::-ms-clear {
  display: none;
}
.adm-pass-wrap input::-webkit-credentials-auto-fill-button,
.adm-pass-wrap input::-webkit-contacts-auto-fill-button {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
  width: 0;
  height: 0;
  margin: 0;
}
.adm-pass-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  z-index: 6;
  pointer-events: auto;
}
.adm-pass-toggle:hover {
  background: var(--surface-2);
  color: var(--text);
}
.adm-pass-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
  grid-area: 1 / 1;
}
.adm-pass-toggle svg[hidden] {
  display: none !important;
}

.adm-app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}
.adm-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.adm-logo {
  display: block;
  width: 168px;
  height: 44px;
  margin: 0 0 6px;
  text-decoration: none;
  line-height: 0;
}
.adm-logo img {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}
html:not([data-theme="dark"]) .adm-logo .logo__light {
  display: block;
}
html[data-theme="dark"] .adm-logo .logo__dark {
  display: block;
}
.adm-top__brand {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.adm-top h1 {
  margin: 0;
  font-size: 1.6rem;
}
.adm-top__actions {
  display: flex;
  gap: 8px;
}
.adm-sound-pick {
  display: inline-flex;
  align-items: center;
}
.adm-sound-pick select {
  height: 38px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 0 12px;
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.adm-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}
.adm-login .adm-btn--primary {
  width: 100%;
  height: 46px;
  font-size: 16px;
}
.adm-btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.adm-btn--sm {
  padding: 6px 10px;
  font-size: 12px;
}
#notifyBtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.adm-push-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.25);
  flex-shrink: 0;
}
#notifyBtn.is-on .adm-push-dot {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.28);
  animation: adm-push-pulse 1.8s ease-out infinite;
}
@keyframes adm-push-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45); }
  70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
@media (prefers-reduced-motion: reduce) {
  #notifyBtn.is-on .adm-push-dot { animation: none; }
}
#notifyBtn.is-on {
  background: #ecfdf5;
  border-color: #86efac;
  color: #15803d;
}
#notifyBtn.is-blocked {
  border-color: #fca5a5;
  color: #b91c1c;
}
#notifyBtn.is-blocked .adm-push-dot {
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.28);
  animation: none;
}
.adm-push-hint {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.28);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.adm-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.adm-stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}
.adm-stat strong {
  display: block;
  font-size: 1.35rem;
}
.adm-stat span {
  color: var(--muted);
  font-size: 12px;
}
.adm-margin {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px 16px;
  margin: 0 0 16px;
}
.adm-margin__head h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}
.adm-margin__head p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.adm-margin__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.adm-stat--margin strong {
  color: var(--closed);
}
.adm-stat--muted strong {
  color: var(--muted);
}

.adm-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}
.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.dot--pending { background: var(--pending); }
.dot--closed { background: var(--closed); }
.dot--cancelled { background: var(--cancelled); }

.adm-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 12px 0 10px;
}
.adm-cal-nav__mid {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.adm-cal-nav__mid strong {
  font-size: 1.2rem;
  font-weight: 800;
  text-align: center;
  text-transform: capitalize;
  line-height: 1.2;
}

.adm-cal {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 22px;
}
.adm-cal__wd {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  padding: 4px 0;
}
.adm-cal__cell {
  min-height: 78px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  padding: 8px;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.adm-cal__cell:disabled {
  opacity: 0.35;
  cursor: default;
}
.adm-cal__cell.is-today {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(31, 78, 216, 0.2);
}
.adm-cal__cell.is-selected {
  background: #eff4ff;
}
html[data-theme="dark"] .adm-cal__cell.is-selected {
  background: rgba(123, 149, 255, 0.18);
}
.adm-cal__num {
  font-weight: 800;
  font-size: 13px;
}
.adm-cal__count {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}
.adm-cal__marks {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.adm-day + .adm-day {
  margin-top: 16px;
}
.adm-day h2 { margin: 0 0 4px; }
.adm-day__meta { margin: 0 0 14px; color: var(--muted); font-size: 14px; }

.adm-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 10px;
}
.adm-card__head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.adm-marker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}
.adm-card__items {
  margin: 8px 0;
  color: var(--muted);
  font-size: 13px;
}
.adm-card__time {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.adm-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.adm-msg {
  margin: 4px 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}
.adm-msg__label {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.adm-msg__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.adm-msg__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
}
.adm-msg__btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.adm-msg__btn--tg { background: #229ed9; }
.adm-msg__btn--vb { background: #7360f2; }
.adm-msg__btn--wa { background: #128c7e; }

.adm-feed {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  margin: 0 0 16px;
}
.adm-feed h2 { margin: 0 0 6px; font-size: 1.05rem; }
.adm-feed__url {
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
  margin: 0 0 10px;
}
.adm-feed__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.adm-error {
  color: var(--cancelled);
  font-size: 13px;
  margin: 0;
}

@media (max-width: 720px) {
  .adm-stats,
  .adm-margin__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-cal__cell { min-height: 62px; padding: 6px; }
}

.adm-theme-toggle {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
}
.adm-theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.adm-theme-toggle .theme-toggle__sun { display: none; }
html[data-theme="dark"] .adm-theme-toggle .theme-toggle__moon { display: none; }
html[data-theme="dark"] .adm-theme-toggle .theme-toggle__sun { display: block; }
html[data-theme="dark"] .adm-login input,
html[data-theme="dark"] .adm-note textarea,
html[data-theme="dark"] select {
  color-scheme: dark;
}
html[data-theme="dark"] .adm-item-econ__drop input,
html[data-theme="dark"] .adm-item-econ__drop strong {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ffffff;
  background: #0f172a;
}
html[data-theme="dark"] #notifyBtn.is-on {
  background: rgba(74, 222, 128, 0.16);
  border-color: rgba(74, 222, 128, 0.45);
  color: #86efac;
}
html[data-theme="dark"] .adm-push-dot {
  background: #64748b;
  box-shadow: 0 0 0 2px rgba(100, 116, 139, 0.35);
}
html[data-theme="dark"] #notifyBtn.is-on .adm-push-dot {
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.3);
}
html[data-theme="dark"] #notifyBtn.is-blocked {
  border-color: rgba(248, 113, 113, 0.55);
  color: #fca5a5;
}
html[data-theme="dark"] #notifyBtn.is-blocked .adm-push-dot {
  background: #f87171;
}

.adm-pdf {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.45);
}
.adm-pdf[hidden] {
  display: none !important;
}
.adm-pdf__card {
  width: min(440px, 100%);
  background: var(--surface);
  color: var(--text);
  border-radius: 16px;
  padding: 20px 20px 16px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.25);
}
.adm-pdf__card h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}
.adm-pdf__opt {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  font-weight: 600;
}
.adm-pdf__range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 8px 24px;
}
.adm-pdf__range label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
.adm-pdf__range input {
  font: inherit;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}
.adm-pdf__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
@media (max-width: 720px) {
  .adm-top__actions {
    flex-wrap: wrap;
  }
}
.adm-chat-badge {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  place-items: center;
}
.adm-chat-badge[hidden] { display: none !important; }
.adm-hotchat {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.35);
  display: grid;
  place-items: center;
  padding: 16px;
}
.adm-hotchat[hidden] { display: none !important; }
.adm-hotchat__card {
  width: min(920px, 100%);
  height: min(82vh, 680px);
  background: var(--surface, #fff);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.adm-hotchat__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line, #e2e8f0);
}
.adm-hotchat__body {
  flex: 1;
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 0;
}
.adm-hotchat__list {
  overflow: auto;
  border-right: 1px solid var(--line, #e2e8f0);
}
.adm-hotchat__item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--line, #e2e8f0);
}
.adm-hotchat__thread-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line, #e2e8f0);
}
.adm-lead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line, #e2e8f0);
  background: rgba(31, 78, 216, 0.08);
  flex-shrink: 0;
}
.adm-lead[hidden] { display: none !important; }
.adm-lead__main {
  min-width: 0;
  flex: 1;
}
.adm-lead__main strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}
.adm-lead__phone {
  display: inline-block;
  font-weight: 700;
  color: #1f4ed8;
  text-decoration: none;
  margin-bottom: 4px;
}
.adm-lead__phone:hover { text-decoration: underline; }
.adm-lead__main p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted, #64748b);
  line-height: 1.35;
}
html[data-theme="dark"] .adm-lead {
  background: rgba(31, 78, 216, 0.18);
}
html[data-theme="dark"] .adm-lead__phone {
  color: #93c5fd;
}
.adm-hotchat__item-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.adm-hotchat__live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  flex-shrink: 0;
}
.adm-hotchat__item.is-live .adm-hotchat__live {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25);
  animation: adm-push-pulse 1.8s ease-out infinite;
}
.adm-hotchat__item.is-wait .adm-hotchat__live {
  background: #f59e0b;
}
.adm-hotchat__item.is-closed .adm-hotchat__live {
  background: #64748b;
}
.adm-hotchat__who {
  display: block;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  margin: 2px 0 4px;
}
.adm-hotchat__item.is-live .adm-hotchat__who {
  color: #16a34a;
}
.adm-hotchat__item.is-wait .adm-hotchat__who {
  color: #d97706;
}
.adm-hotchat__item.is-on {
  background: rgba(31, 78, 216, 0.12);
  box-shadow: inset 3px 0 0 #1f4ed8;
}
.adm-hotchat__item.is-closed {
  opacity: 0.62;
}
.adm-hotchat__archive-toggle {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line, #e2e8f0);
  background: transparent;
  color: var(--muted, #64748b);
  padding: 10px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}
.adm-hotchat__form.is-closed {
  opacity: 0.55;
}
.adm-hotchat__item strong { display: block; }
.adm-hotchat__item span { color: var(--muted, #64748b); font-size: 12px; }
.adm-hotchat__thread {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.adm-hotchat__msgs {
  flex: 1;
  overflow: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.adm-hotchat__bubble {
  max-width: 80%;
  padding: 8px 10px;
  border-radius: 12px;
  white-space: pre-wrap;
}
.adm-hotchat__bubble--customer {
  align-self: flex-start;
  background: var(--surface-2, #f1f5f9);
}
.adm-hotchat__bubble--manager {
  align-self: flex-end;
  background: #1f4ed8;
  color: #fff;
}
.adm-hotchat__form {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px 12px;
  background: var(--surface, #fff);
  border-top: 1px solid #cbd5e1;
}
.adm-hotchat__form textarea {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 48px;
  max-height: 120px;
  border: 1px solid #94a3b8;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
  color: #0f172a;
  resize: none;
  line-height: 1.35;
}
html[data-theme="dark"] .adm-hotchat__form {
  background: var(--surface, #0f172a);
  border-top-color: #334155;
}
html[data-theme="dark"] .adm-hotchat__item.is-on {
  background: rgba(31, 78, 216, 0.22);
}
html[data-theme="dark"] .adm-hotchat__item.is-live .adm-hotchat__who {
  color: #86efac;
}
@media (max-width: 720px) {
  .adm-hotchat__body { grid-template-columns: 1fr; }
  .adm-hotchat__list { max-height: 140px; }
}
.adm-btn--chat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.adm-btn--chat svg {
  width: 18px;
  height: 18px;
}
.adm-btn--chat.is-on {
  background: #1f4ed8;
  color: #fff;
  animation: admChatPulse 1.2s ease infinite;
}
.adm-chat-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  width: 60px;
  height: 60px;
  border: 0;
  border-radius: 50%;
  background: #1f4ed8;
  color: #fff;
  box-shadow: 0 10px 24px rgba(31, 78, 216, 0.4);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.adm-chat-fab[hidden] { display: none !important; }
.adm-chat-fab.is-on {
  animation: admChatPulse 1.2s ease infinite;
}
.adm-chat-fab svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}
.adm-chat-fab .adm-chat-badge {
  position: absolute;
  top: 6px;
  right: 6px;
}
@keyframes admChatPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.adm-alert {
  position: fixed;
  right: 18px;
  bottom: 90px;
  z-index: 85;
  width: min(340px, calc(100vw - 24px));
  background: #0f172a;
  color: #fff;
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.35);
}
.adm-alert[hidden] { display: none !important; }
.adm-alert p {
  margin: 6px 0 12px;
  font-size: 14px;
  line-height: 1.4;
  color: #e2e8f0;
}
.adm-alert__row {
  display: flex;
  gap: 8px;
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }
  .adm-login {
    padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  }
  .adm-login__card {
    padding: 22px 18px;
  }
  .adm-login__card h1 {
    font-size: 1.7rem;
  }
  .adm-login input {
    min-height: 48px;
    font-size: 16px;
  }
  .adm-app {
    padding: max(12px, env(safe-area-inset-top)) 14px max(28px, env(safe-area-inset-bottom));
  }
  .adm-logo {
    width: 200px;
    height: 54px;
  }
  .adm-top h1 {
    font-size: 1.85rem;
  }
  .adm-top__brand {
    font-size: 13px;
  }
  .adm-top__actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .adm-btn {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 15px;
  }
  .adm-btn--sm {
    min-height: 40px;
    font-size: 14px;
  }
  .adm-stat strong,
  .adm-margin__item strong {
    font-size: 1.55rem;
  }
  .adm-stat span,
  .adm-margin__item span,
  .adm-hint,
  .adm-legend,
  .adm-day__meta {
    font-size: 14px;
  }
  .adm-cal-nav {
    position: sticky;
    top: 0;
    z-index: 6;
    margin: 8px -14px 10px;
    padding: 8px 14px;
    background: var(--bg);
  }
  .adm-cal-nav__mid strong {
    font-size: 1.35rem;
  }
  .adm-cal {
    gap: 4px;
  }
  .adm-cal__wd {
    font-size: 12px;
  }
  .adm-cal__cell {
    min-height: 56px;
    padding: 6px 4px;
    border-radius: 10px;
  }
  .adm-cal__num {
    font-size: 16px;
  }
  .adm-cal__count {
    font-size: 13px;
  }
  .adm-strip__name,
  .adm-strip__sum {
    font-size: 15px;
  }
  .adm-strip__row {
    padding: 12px;
    min-height: 52px;
  }
  .adm-hotchat {
    padding: 0;
    place-items: stretch;
  }
  .adm-hotchat__card {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
  .adm-chat-fab {
    width: 64px;
    height: 64px;
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
  }
  .adm-alert {
    left: 12px;
    right: 12px;
    width: auto;
    bottom: calc(88px + env(safe-area-inset-bottom));
  }
}
