:root {
  --bg0: #041510;
  --bg1: #0a2a1f;
  --bg2: #0f3d2e;
  --ink: #e6f7f0;
  --muted: #8fb8a8;
  --line: rgba(120, 200, 170, 0.18);
  --accent: #1faa78;
  --accent-bright: #3dcea0;
  --accent-ink: #03150f;
  --danger: #e08b7a;
  --ok: #3dcea0;
  --warn: #d4b85a;
  --off: #6a857a;
  --glow: rgba(31, 170, 120, 0.22);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background: var(--bg0);
  min-height: 100%;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 520px at 10% 0%, var(--glow), transparent 58%),
    radial-gradient(700px 480px at 95% 15%, rgba(15, 90, 70, 0.35), transparent 55%),
    linear-gradient(160deg, var(--bg2), var(--bg1) 42%, var(--bg0) 78%);
}
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.shell {
  width: min(440px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 18vh 0 3rem;
  animation: rise 0.65s ease both;
}
.shell.login-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 2rem);
  padding: 2rem 0;
}
.login-brand {
  text-align: center;
  margin: 0 0 1.5rem;
}
.shell.panel {
  padding-top: 1rem;
  width: min(560px, calc(100% - 2rem));
  padding-bottom: 3rem;
}
.page-login .card-form {
  width: 100%;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.brand {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 8vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--accent-bright);
}
.brand.compact {
  font-size: 1.45rem;
  margin: 0;
}
.headline {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.5vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.lead {
  margin: 0 0 1.4rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.45;
}
.lead.tight {
  margin: 0 0 0.9rem;
  font-size: 0.9rem;
}
.lead strong { color: var(--ink); font-weight: 600; }

.card-form {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(8, 40, 30, 0.55);
}
.card-form label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.card-form input {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(2, 18, 14, 0.55);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
.card-form input:focus {
  outline: 2px solid rgba(61, 206, 160, 0.45);
  outline-offset: 1px;
  border-color: transparent;
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.85rem 1.2rem;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; }
.btn.primary {
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  color: var(--accent-ink);
  margin-top: 0.35rem;
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 0.55rem 0.95rem;
  font-size: 0.9rem;
}
.btn.ghost:hover { color: var(--ink); border-color: rgba(61, 206, 160, 0.35); }
.btn.sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  border-radius: 999px;
}
.btn.start {
  background: rgba(61, 206, 160, 0.18);
  color: var(--ok);
  border: 1px solid rgba(61, 206, 160, 0.35);
}
.btn.stop {
  background: rgba(224, 139, 122, 0.12);
  color: #f0b4a8;
  border: 1px solid rgba(224, 139, 122, 0.28);
}
.btn.stop.stop-text {
  border-radius: 10px;
  min-width: 3.6rem;
  padding: 0.45rem 0.75rem;
  font-weight: 700;
  background: #c44536;
  color: #fff;
  border: 1px solid #e06b5c;
}
.btn.stop.stop-text:hover {
  filter: brightness(1.08);
}

.operator-cal-block {
  margin-top: 0.85rem;
}

.error {
  margin: 0;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: rgba(224, 139, 122, 0.12);
  color: #ffc4bb;
  font-size: 0.92rem;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: rgba(4, 28, 22, 0.55);
  position: relative;
  z-index: 5;
}
.page-login .top {
  justify-content: flex-start;
}
.top-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  min-width: 0;
}
.page-login .shell.login-shell {
  padding-top: 1.5rem;
  min-height: calc(100vh - 5.5rem);
}
.site-credit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  font-size: 0.68rem;
  line-height: 1.2;
  color: rgba(143, 184, 168, 0.72);
  position: relative;
  z-index: 6;
}
.site-credit-name {
  font-weight: 500;
  letter-spacing: 0.02em;
}
.site-credit-tg {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  color: rgba(143, 184, 168, 0.78);
  text-decoration: none;
}
.site-credit-tg:hover {
  color: var(--accent-bright);
}
.tg-ico {
  flex: none;
  opacity: 0.85;
}
.info-btn {
  padding: 0.15rem 0.45rem !important;
  font-size: 0.62rem !important;
  min-width: 0 !important;
  opacity: 0.8;
  position: relative;
  z-index: 7;
  pointer-events: auto;
  cursor: pointer;
}
.info-dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  background: #0a2a1f;
  color: var(--ink);
  max-width: min(360px, calc(100vw - 2rem));
  z-index: 100;
}
.info-dialog::backdrop {
  background: rgba(2, 12, 9, 0.62);
}
.info-dialog-inner {
  margin: 0;
  padding: 1rem 1.05rem 1.05rem;
  display: grid;
  gap: 0.7rem;
}
.info-dialog-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
}
.info-dialog-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}
.info-dialog-text a {
  color: var(--accent-bright);
}

.accounts-shell { width: min(560px, calc(100% - 2rem)); }
.accounts-list {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
}
.acc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(4, 28, 22, 0.45);
}
.acc-login {
  margin: 0;
  font-weight: 600;
  font-size: 0.92rem;
}
.acc-role {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.acc-me {
  color: var(--accent-bright);
  font-weight: 500;
  font-size: 0.72rem;
}
.acc-actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.acc-actions .btn {
  text-decoration: none;
}
.accounts-create {
  padding: 0.75rem 0.8rem 0.85rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(4, 28, 22, 0.45);
}
.accounts-form {
  display: grid;
  gap: 0.55rem;
}
.accounts-form label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.accounts-form input,
.accounts-form select {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(2, 16, 12, 0.65);
  color: var(--ink);
  font: inherit;
}
.accounts-msg {
  margin: 0.75rem 0 0;
  text-align: center;
  font-size: 0.84rem;
  color: var(--accent-bright);
}
.accounts-msg.is-err { color: #ffc4bb; }

.activity-list {
  display: grid;
  gap: 0.45rem;
}
.act-row {
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(4, 28, 22, 0.4);
}
.act-top {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  font-size: 0.78rem;
}
.act-user { font-weight: 700; color: var(--ink); }
.act-role { color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.68rem; }
.act-ip { color: var(--accent-bright); font-family: ui-monospace, monospace; font-size: 0.72rem; }
.act-what { margin: 0.25rem 0 0; font-size: 0.86rem; }
.act-ts { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.7rem; }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.75rem;
  padding: 1.1rem 1.25rem 1.4rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.72rem;
  line-height: 1.3;
  color: rgba(143, 184, 168, 0.72);
}
.site-footer-name { font-weight: 500; }
.site-footer-tg,
.site-footer-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  color: rgba(143, 184, 168, 0.82);
  text-decoration: none;
}
.site-footer-tg:hover,
.site-footer-phone:hover {
  color: var(--accent-bright);
}

.host-block {
  padding: 0.65rem 0.7rem 0.75rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(4, 28, 22, 0.45);
  margin-bottom: 0.65rem;
}
.host-label {
  margin: 0 0 0.45rem;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-bright);
  font-weight: 700;
  text-align: center;
}
.host-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}
.stat {
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(6, 32, 24, 0.65);
}
.stat-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.45rem;
}
.stat-label {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  flex-shrink: 0;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent-bright);
  line-height: 1;
}
.stat-bar {
  margin-top: 0.3rem;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.stat-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  transition: width 0.35s ease;
}

.desk-btn {
  display: block;
  margin-top: 0.6rem;
  padding: 0.7rem 0.9rem;
  text-align: center;
  text-decoration: none;
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  transition: filter 0.15s ease, transform 0.15s ease;
}
.desk-btn:hover { filter: brightness(1.06); }
.desk-btn:active { transform: scale(0.98); }

.operator-stack {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.35rem;
}
.operator-stack .desk-btn { margin-top: 0; }
button.desk-btn {
  width: 100%;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
button.desk-btn:disabled {
  opacity: 0.55;
  cursor: default;
  transform: none;
}
button.desk-btn.is-off {
  background: linear-gradient(135deg, #6a857a, #4a5c54);
  color: #e6f7f0;
}
button.desk-btn.is-on {
  background: linear-gradient(135deg, #e08b7a, #c45f4f);
  color: #fff5f2;
}
.operator-note {
  margin: 0.15rem 0 0;
  text-align: center;
  color: #ffc4bb;
  font-size: 0.82rem;
}

.host-scripts {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.55rem;
}
.start-wrap {
  display: grid;
  gap: 0.4rem;
}
.start-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 12px;
  padding: 0.65rem 0.9rem;
}
.start-toggle .chev {
  font-size: 0.75rem;
  opacity: 0.85;
}
.start-toggle.is-open {
  color: var(--accent-bright);
  border-color: rgba(61, 206, 160, 0.4);
}
.start-picker {
  display: none;
  gap: 0.35rem;
  padding: 0.4rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(2, 18, 14, 0.45);
}
.start-picker.is-open {
  display: grid;
  animation: rise 0.25s ease both;
}
.start-picker[hidden] {
  display: none !important;
}
.picker-item {
  appearance: none;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: rgba(6, 32, 24, 0.75);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.picker-item:hover {
  border-color: rgba(61, 206, 160, 0.35);
  background: rgba(12, 48, 36, 0.9);
}
.picker-item:disabled { opacity: 0.45; cursor: default; }
.picker-go {
  margin-left: auto;
  color: var(--ok);
  font-size: 0.85rem;
}
.svc-empty {
  margin: 0;
  padding: 0.55rem 0.2rem;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.alerts-block {
  padding: 0.65rem 0.7rem 0.7rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(4, 28, 22, 0.45);
  margin-bottom: 0.25rem;
}
.alerts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.alerts-head .host-label {
  margin: 0;
  text-align: left;
}
.alerts-head .btn.sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.72rem;
  white-space: nowrap;
}
.alerts-head .btn.is-on {
  color: var(--accent-bright);
  border-color: rgba(61, 206, 160, 0.45);
}
.alerts-block.has-errors {
  border-color: rgba(224, 139, 122, 0.4);
  background: rgba(40, 18, 16, 0.35);
}
.alerts-body { min-height: 1.35rem; }
.calendar-desk-btn {
  display: block;
  margin: 0 0 0.85rem;
  text-align: center;
}
.alerts-ok {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}
.alert-item {
  margin: 0 0 0.35rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: rgba(224, 139, 122, 0.12);
  color: #ffc4bb;
  font-size: 0.84rem;
  line-height: 1.35;
}
.alert-item:last-child { margin-bottom: 0; }

.section-title {
  margin: 1.1rem 0 0.65rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

#hosts-root {
  display: grid;
  gap: 0;
}

.svc-list {
  display: grid;
  gap: 0.55rem;
}
.svc {
  display: grid;
  gap: 0.28rem;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(6, 32, 24, 0.65);
  transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
.svc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  min-width: 0;
}
.svc.is-on {
  background:
    linear-gradient(135deg, rgba(45, 220, 150, 0.22), rgba(8, 50, 36, 0.75) 55%),
    rgba(6, 40, 28, 0.9);
  border-color: rgba(70, 230, 170, 0.55);
  box-shadow: 0 0 18px rgba(40, 200, 140, 0.18);
}
.svc.is-on .svc-name {
  color: #d8ffee;
  font-weight: 700;
}
.svc.is-on .svc-sub {
  color: rgba(180, 240, 210, 0.85);
}
.svc.is-off {
  background: rgba(8, 22, 18, 0.42);
  border-color: rgba(120, 150, 135, 0.12);
  opacity: 0.58;
}
.svc.is-off .svc-name {
  color: #7f968c;
  font-weight: 500;
}
.svc.is-off .svc-sub {
  color: #5f746a;
}
.svc.is-warn {
  background: rgba(40, 34, 12, 0.55);
  border-color: rgba(212, 184, 90, 0.35);
}
.svc.is-bad {
  background: rgba(40, 18, 16, 0.5);
  border-color: rgba(224, 139, 122, 0.35);
  opacity: 0.85;
}
.svc-name {
  font-weight: 650;
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}
.svc-sub {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
  padding-right: 0.15rem;
}
.svc-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }
.dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  margin-right: 0.35rem;
  vertical-align: middle;
  background: var(--off);
}
.dot.ok {
  background: #4dffb0;
  box-shadow: 0 0 10px rgba(77, 255, 176, 0.75);
}
.dot.starting { background: var(--warn); }
.dot.unhealthy, .dot.down { background: var(--danger); }
.dot.off { background: #4a5c54; box-shadow: none; }

.svc-note {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.top-nav form { margin: 0; }

.bell-wrap {
  position: relative;
}
.bell-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: #e8f2ee;
  cursor: pointer;
  padding: 0;
}
.bell-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}
.bell-dot {
  position: absolute;
  top: 0.35rem;
  right: 0.4rem;
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: #e23d3d;
  box-shadow: 0 0 0 2px rgba(8, 28, 22, 0.9);
}
.bell-menu {
  position: fixed;
  left: 0;
  top: 0;
  width: min(22rem, calc(100vw - 1.5rem));
  max-height: min(70vh, 28rem);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0d2a22;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  z-index: 80;
  overflow: hidden;
}
.bell-menu[hidden] { display: none !important; }
.bell-menu-head {
  padding: 0.75rem 0.9rem 0.55rem;
  border-bottom: 1px solid var(--line);
}
.bell-menu-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: #eef6f2;
}
.bell-menu-sub {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
}
.bell-list {
  overflow: auto;
  padding: 0.45rem 0;
  flex: 1;
}
.bell-empty {
  margin: 0;
  padding: 0.85rem 0.9rem;
  color: var(--muted);
  font-size: 0.84rem;
}
.bell-item {
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.bell-item:last-child { border-bottom: none; }
.bell-item-meta {
  margin: 0 0 0.2rem;
  font-size: 0.68rem;
  color: var(--muted);
}
.bell-item-text {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
  color: #e8f2ee;
  white-space: pre-wrap;
  word-break: break-word;
}
.bell-menu-foot {
  padding: 0.45rem 0.75rem 0.65rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: center;
}

.shell.calendar-shell {
  width: min(640px, calc(100% - 2rem));
}
.calendar-head {
  text-align: center;
  margin-bottom: 0.75rem;
}
.calendar-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
}
.calendar-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}
.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}
.calendar-legend .leg {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.calendar-legend .leg::before {
  content: "";
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 4px;
  border: 1px solid var(--line);
}
.calendar-legend .leg.free::before { background: #fff; border-color: rgba(255,255,255,0.55); }
.calendar-legend .leg.avito::before { background: #d64545; border-color: #ef7a7a; }
.calendar-legend .leg.ostrovok::before { background: #2f6bff; border-color: #6a95ff; }

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}
.calendar-month {
  margin: 0;
  font-weight: 600;
  text-transform: capitalize;
  font-size: 0.95rem;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.28rem;
}
.cal-wd {
  text-align: center;
  font-size: 0.68rem;
  color: var(--muted);
  padding: 0.2rem 0;
  text-transform: lowercase;
}
.cal-cell {
  min-height: 2.65rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 0.25rem 0.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  background: rgba(4, 28, 22, 0.35);
}
.cal-cell.empty {
  border: none;
  background: transparent;
  min-height: 0;
}
.cal-cell.free {
  background: #f4f7f5;
  color: #123028;
  border-color: rgba(255, 255, 255, 0.65);
}
.cal-cell.avito {
  background: #d64545;
  color: #fff5f5;
  border-color: #ef7a7a;
}
.cal-cell.ostrovok {
  background: #2a5fff;
  color: #eef3ff;
  border-color: #6a95ff;
}
.cal-cell.out {
  opacity: 0.35;
}
.cal-cell.today {
  box-shadow: 0 0 0 2px var(--accent-bright);
}
.cal-num {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
}
.cal-guests,
.cal-amount {
  font-size: 0.58rem;
  opacity: 0.95;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.calendar-error {
  margin: 0.85rem 0 0;
  color: #ffc4bb;
  font-size: 0.86rem;
  text-align: center;
}

.calendar-switch {
  display: flex;
  justify-content: center;
  margin: 0 0 0.85rem;
}

.cal-cell.clean-day {
  cursor: pointer;
  position: relative;
  background: rgba(4, 28, 22, 0.35);
  color: #e8f2ee;
  border: none;
  font: inherit;
  width: 100%;
}
.cal-cell.clean-day.filled {
  background: var(--day-color, #5b7c6e);
  color: #fff;
  border-color: transparent;
}
.cal-label {
  font-size: 0.55rem;
  font-weight: 600;
  line-height: 1.1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.95;
}
.cal-bell {
  position: absolute;
  top: 0.15rem;
  right: 0.25rem;
  font-size: 0.45rem;
  opacity: 0.9;
}

.clean-dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  background: #0d2a22;
  color: #e8f2ee;
  width: min(92vw, 26rem);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}
.clean-dialog::backdrop {
  background: rgba(2, 12, 10, 0.62);
}
.clean-form {
  display: grid;
  gap: 0.75rem;
  padding: 1rem 1.05rem 1.1rem;
}
.clean-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.clean-form-head h2 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
}
.clean-field {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  border: 0;
  padding: 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.clean-field input[type="text"],
.clean-field input[type="time"],
.clean-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #eef6f2;
  padding: 0.55rem 0.65rem;
  font: inherit;
  resize: vertical;
}
.clean-check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #e8f2ee;
}
.clean-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.clean-color {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  border: 2px solid transparent;
  background: var(--swatch);
  cursor: pointer;
  padding: 0;
}
.clean-color.is-on {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
}
.clean-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.2rem;
}
.clean-form-error {
  margin: 0;
  color: #ffc4bb;
  font-size: 0.82rem;
}

@media (max-width: 480px) {
  .shell { padding-top: 12vh; }
  .svc-top { gap: 0.45rem; }
  .btn.sm {
    padding: 0.4rem 0.7rem;
    min-width: 2.4rem;
  }
  .cal-cell { min-height: 2.35rem; }
}
