:root {
  --bg: #050806;
  --bg-soft: #0b120d;
  --ink: #cbffd6;
  --ink-muted: #7eb18d;
  --accent: #36ff79;
  --accent-2: #10b8ff;
  --card: rgba(7, 17, 11, 0.86);
  --stroke: rgba(54, 255, 121, 0.22);
  --shadow: 0 18px 36px rgba(0, 0, 0, 0.55);
  --topbar-height: 5.8rem;
  --status-height: 1.9rem;
  --chrome-height: calc(var(--topbar-height) + var(--status-height) + env(safe-area-inset-top));
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: "IBM Plex Mono", "JetBrains Mono", "Fira Code", monospace;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgba(16, 184, 255, 0.14), transparent 34%),
    radial-gradient(circle at 84% 12%, rgba(54, 255, 121, 0.13), transparent 30%),
    linear-gradient(170deg, #020403 0%, var(--bg) 42%, #040a07 100%);
}

body.drawer-open {
  overflow: hidden;
}

body.drawer-open .page-shell {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.12;
  background: repeating-linear-gradient(
    180deg,
    rgba(140, 255, 173, 0.24) 0,
    rgba(140, 255, 173, 0.24) 1px,
    transparent 2px,
    transparent 4px
  );
}

.app-chrome {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 20;
  height: var(--chrome-height);
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(4, 11, 7, 0.74);
  border-bottom: 1px solid var(--stroke);
  box-shadow: 0 0 26px rgba(54, 255, 121, 0.09);
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
  isolation: isolate;
}

.topbar {
  height: calc(var(--topbar-height) + env(safe-area-inset-top));
  display: grid;
  grid-template-rows: auto auto;
  row-gap: 0.25rem;
  align-content: center;
  padding: calc(env(safe-area-inset-top) + 0.35rem) 0.7rem 0.35rem;
}

.topbar-row {
  display: flex;
  align-items: center;
  min-width: 0;
}

.topbar-main {
  justify-content: space-between;
  gap: 0.38rem;
}

.topbar-meta {
  justify-content: space-between;
  gap: 0.35rem;
}

.drawer,
.scrim,
.page-shell {
  position: relative;
  z-index: 2;
}

.status-strip {
  position: relative;
  height: var(--status-height);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  border-bottom: 1px solid var(--stroke);
  background: rgba(3, 12, 8, 0.86);
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
}

.status-strip span {
  display: inline-block;
  width: 100%;
  max-width: 72ch;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translateX(16px);
  opacity: 0;
}

.status-strip.active {
  box-shadow: 0 0 20px rgba(54, 255, 121, 0.22), inset 0 0 12px rgba(54, 255, 121, 0.1);
}

.status-strip.active span {
  animation: status-in 220ms ease forwards;
}

.status-strip.exit span {
  animation: status-out 260ms ease forwards;
}

.status-strip.status-error {
  color: #ff9b9b;
  border-bottom-color: rgba(255, 122, 122, 0.45);
  box-shadow: 0 0 20px rgba(255, 122, 122, 0.25), inset 0 0 12px rgba(255, 122, 122, 0.12);
}

.status-strip.status-success {
  color: #d6ffe4;
  border-bottom-color: rgba(54, 255, 121, 0.45);
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  flex: 0 1 auto;
  overflow: hidden;
}

.brand-mark {
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 999px;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 4px rgba(54, 255, 121, 0.15), 0 0 18px rgba(54, 255, 121, 0.45);
}

.brand {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(54, 255, 121, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.header-clock {
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 0.28rem 0.58rem;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  background: rgba(6, 18, 11, 0.85);
  color: var(--ink-muted);
  min-width: 6.9rem;
  text-align: center;
}

.bot-indicator {
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 0.28rem 0.58rem;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  background: rgba(6, 18, 11, 0.85);
  color: var(--ink-muted);
  min-width: 6rem;
  text-align: center;
  flex-shrink: 0;
}

.topbar-main .bot-indicator {
  margin-left: 0;
}

.bot-indicator.running {
  color: #031209;
  border-color: rgba(54, 255, 121, 0.9);
  background: linear-gradient(130deg, #36ff79, #10b8ff);
  box-shadow: 0 0 0 1px rgba(54, 255, 121, 0.35), 0 0 16px rgba(54, 255, 121, 0.65);
  animation: bot-run-pulse 1.25s ease-in-out infinite;
}

.bot-indicator.warn {
  color: #ffe5b6;
  border-color: rgba(255, 170, 72, 0.6);
  background: rgba(48, 24, 8, 0.9);
}

.auth-state {
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 0.28rem 0.58rem;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  background: rgba(6, 18, 11, 0.85);
  max-width: 8.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-left: auto;
}

.header-inbox-link {
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 0.28rem 0.58rem;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  background: rgba(6, 18, 11, 0.85);
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 3.2rem;
  justify-content: center;
  flex: 0 0 auto;
  margin-left: auto;
  margin-right: auto;
}

.header-inbox-link.has-unread {
  color: #031209;
  border-color: rgba(54, 255, 121, 0.9);
  background: linear-gradient(130deg, #36ff79, #10b8ff);
  box-shadow: 0 0 0 1px rgba(54, 255, 121, 0.35), 0 0 16px rgba(54, 255, 121, 0.45);
}

.header-inbox-icon {
  font-size: 0.8rem;
}

.profile-switch {
  font: inherit;
  font-size: 16px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 0.28rem 0.58rem;
  background: rgba(6, 18, 11, 0.85);
  color: var(--ink-muted);
  min-width: 0;
  max-width: 8.8rem;
  flex: 1 1 auto;
}

.profile-switch:focus {
  outline: none;
  border-color: rgba(16, 184, 255, 0.6);
  box-shadow: 0 0 0 2px rgba(16, 184, 255, 0.2);
}

.menu-button,
.install-button {
  border: 1px solid var(--stroke);
  background: rgba(6, 18, 11, 0.9);
  color: var(--ink);
  border-radius: 0.9rem;
}

.menu-button {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-content: center;
  gap: 0.28rem;
  cursor: pointer;
}

.menu-button span {
  width: 1.2rem;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform-origin: center;
  transition: transform 180ms ease;
  box-shadow: 0 0 8px rgba(54, 255, 121, 0.75);
}

.menu-button[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(40deg);
}

.menu-button[aria-expanded="true"] span:nth-child(2) {
  transform: scaleX(0);
}

.menu-button[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-40deg);
}

.install-button {
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.34rem 0.6rem;
  cursor: pointer;
  text-transform: uppercase;
  margin-left: auto;
}

.drawer {
  position: fixed;
  inset: var(--chrome-height) auto 0 0;
  width: min(19rem, 86vw);
  padding: 1rem;
  transform: translateX(-105%);
  transition: transform 200ms ease;
  z-index: 30;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.8rem;
  margin-bottom: env(safe-area-inset-bottom);
  border-radius: 1.1rem;
  border: 1px solid var(--stroke);
  background: linear-gradient(155deg, rgba(7, 16, 10, 0.97), rgba(3, 10, 6, 0.98));
  box-shadow: var(--shadow);
}

.drawer-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 650;
  padding: 0.7rem 0.85rem;
  border-radius: 0.8rem;
  border: 1px solid transparent;
}

.drawer-nav a.active {
  background: linear-gradient(130deg, rgba(54, 255, 121, 0.15), rgba(16, 184, 255, 0.2));
  color: #e9ffef;
  border-color: rgba(54, 255, 121, 0.4);
  box-shadow: inset 0 0 15px rgba(54, 255, 121, 0.14);
}

.drawer-nav a:hover {
  background: rgba(16, 184, 255, 0.12);
}

.scrim {
  position: fixed;
  inset: var(--chrome-height) 0 0;
  z-index: 25;
  background: rgba(0, 0, 0, 0.56);
}

.page-shell {
  position: fixed;
  top: var(--chrome-height);
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 1.15rem;
}

.page {
  max-width: 70rem;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
  animation: rise 280ms ease;
}

.hero {
  border: 1px solid var(--stroke);
  border-radius: 1.25rem;
  padding: 1.3rem;
  background:
    linear-gradient(145deg, rgba(16, 184, 255, 0.08), rgba(54, 255, 121, 0.11)),
    var(--card);
  box-shadow: var(--shadow);
}

.hero h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3.9vw, 2rem);
}

.hero p {
  margin: 0.6rem 0 0;
  max-width: 45ch;
  color: var(--ink-muted);
  line-height: 1.45;
}

.tile-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.tile {
  border: 1px solid var(--stroke);
  border-radius: 1rem;
  min-height: 6.6rem;
  padding: 0.95rem;
  background: var(--card);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.tile strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #d8ffe3;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.auth-card {
  border: 1px solid var(--stroke);
  border-radius: 1rem;
  padding: 1rem;
  background: var(--card);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.auth-card h3,
.auth-session h3 {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth-form {
  display: grid;
  gap: 0.7rem;
}

.auth-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.auth-form input {
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: rgba(4, 12, 7, 0.88);
  border: 1px solid var(--stroke);
  border-radius: 0.7rem;
  padding: 0.65rem 0.72rem;
}

.auth-form input:focus {
  outline: none;
  border-color: rgba(16, 184, 255, 0.6);
  box-shadow: 0 0 0 2px rgba(16, 184, 255, 0.2);
}

.auth-form select {
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: rgba(4, 12, 7, 0.88);
  border: 1px solid var(--stroke);
  border-radius: 0.7rem;
  padding: 0.65rem 0.72rem;
}

.auth-form select:focus {
  outline: none;
  border-color: rgba(16, 184, 255, 0.6);
  box-shadow: 0 0 0 2px rgba(16, 184, 255, 0.2);
}

.auth-form textarea {
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: rgba(4, 12, 7, 0.88);
  border: 1px solid var(--stroke);
  border-radius: 0.7rem;
  padding: 0.65rem 0.72rem;
  resize: vertical;
}

.auth-form textarea:focus {
  outline: none;
  border-color: rgba(16, 184, 255, 0.6);
  box-shadow: 0 0 0 2px rgba(16, 184, 255, 0.2);
}

.auth-button {
  font: inherit;
  color: #031209;
  background: linear-gradient(130deg, #36ff79, #10b8ff);
  border: 1px solid rgba(16, 184, 255, 0.2);
  border-radius: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.62rem 0.72rem;
  cursor: pointer;
}

.ghost-button {
  color: var(--ink);
  background: rgba(6, 18, 11, 0.9);
  border: 1px solid var(--stroke);
}

.auth-message {
  margin: 0.8rem 0 0;
  min-height: 1.2rem;
  color: var(--ink-muted);
  font-size: 0.85rem;
}

.auth-message.error {
  color: #ff7a7a;
}

.bot-grid {
  width: 100%;
  max-width: 70rem;
  margin: 0 auto;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.bot-card h3 {
  margin: 0 0 0.75rem;
  font-size: 0.98rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.bot-inline-buttons {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.bot-checkbox {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.bot-list {
  list-style: none;
  margin: 0.8rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.bot-list li {
  min-width: 0;
  border: 1px solid var(--stroke);
  border-radius: 0.75rem;
  background: rgba(4, 12, 8, 0.9);
  padding: 0.55rem 0.65rem;
  color: var(--ink-muted);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.bot-list code {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.filters-layout {
  width: 100%;
  max-width: 78rem;
  margin: 0 auto;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: minmax(260px, 0.95fr) minmax(320px, 1.65fr);
}

.filters-list-card,
.filters-editor-card {
  min-height: 24rem;
}

.filters-list-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.filters-list {
  margin-top: 0.45rem;
}

.filter-list-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
}

.filter-list-item.selected {
  border-color: rgba(16, 184, 255, 0.55);
  box-shadow: inset 0 0 0 1px rgba(16, 184, 255, 0.22);
}

.filter-enable-toggle {
  margin-right: 0.25rem;
  padding: 0.2rem 0.3rem;
  border-radius: 0.55rem;
  cursor: pointer;
}

.filter-enable-toggle input {
  width: 1.12rem;
  height: 1.12rem;
  accent-color: #2dd4bf;
}

.filter-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
}

.filter-delete-btn {
  padding: 0.42rem 0.55rem;
  border-radius: 0.6rem;
}

.filter-chip {
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 0.2rem 0.45rem;
  font-size: 0.66rem;
  color: #9edcb1;
  background: rgba(6, 18, 12, 0.8);
}

.filter-section-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #d8ffe3;
}

.hint-trigger {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(16, 184, 255, 0.45);
  background: rgba(3, 13, 18, 0.9);
  color: #9be6ff;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  position: relative;
}

.hint-trigger::after {
  content: attr(data-tip);
  position: absolute;
  z-index: 20;
  left: 50%;
  bottom: calc(100% + 0.45rem);
  transform: translateX(-50%);
  width: min(18rem, 70vw);
  border-radius: 0.6rem;
  border: 1px solid rgba(16, 184, 255, 0.45);
  background: rgba(2, 12, 17, 0.96);
  color: #d5f7ff;
  padding: 0.48rem 0.58rem;
  font-size: 0.72rem;
  line-height: 1.35;
  text-transform: none;
  letter-spacing: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 140ms ease;
}

.hint-trigger:hover::after,
.hint-trigger:focus-visible::after,
.hint-trigger.active::after {
  opacity: 1;
}

.filter-row-2 {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.filter-service-area-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.1rem;
}

.filter-service-area-head strong {
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #d8ffe3;
}

.filter-service-area-list {
  display: grid;
  gap: 0.42rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  max-height: 12.5rem;
  overflow: auto;
  border: 1px solid var(--stroke);
  border-radius: 0.7rem;
  background: rgba(4, 12, 8, 0.74);
  padding: 0.55rem;
}

.filter-service-area-list label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgba(54, 255, 121, 0.16);
  border-radius: 0.55rem;
  padding: 0.35rem 0.48rem;
  font-size: 0.75rem;
  color: var(--ink-muted);
  background: rgba(4, 12, 8, 0.86);
}

.filter-service-area-empty {
  font-size: 0.75rem;
  color: var(--ink-muted);
  padding: 0.2rem;
}

.filter-day-grid,
.filter-duration-grid {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.filter-day-grid label,
.filter-duration-grid label,
.filter-custom-rate-grid label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--stroke);
  border-radius: 0.65rem;
  padding: 0.42rem 0.5rem;
  font-size: 0.76rem;
  color: var(--ink-muted);
  background: rgba(4, 12, 8, 0.7);
}

.filter-day-grid input,
.filter-duration-grid input {
  margin: 0;
}

.filter-toggle-grid {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
}

.filter-custom-rate-grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
}

.filter-custom-rate-grid input {
  width: 100%;
  margin-top: 0.3rem;
}

.filters-preview-title {
  margin: 0.95rem 0 0.42rem;
  font-size: 0.79rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #d8ffe3;
}

.filters-preview-code {
  margin: 0;
  border: 1px solid var(--stroke);
  border-radius: 0.7rem;
  background: rgba(4, 12, 8, 0.92);
  color: #b3f0c3;
  font-size: 0.75rem;
  line-height: 1.4;
  padding: 0.62rem 0.72rem;
  max-height: 14rem;
  overflow: auto;
}

.inbox-grid {
  max-width: 70rem;
}

.inbox-list {
  max-height: 34rem;
  overflow-y: auto;
}

.inbox-list li {
  display: block;
  padding: 0;
}

.inbox-toggle-btn {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 0.45rem 0.6rem;
  display: grid;
  gap: 0.18rem;
  cursor: pointer;
}

.inbox-message-title {
  font-weight: 700;
  color: #d8ffe3;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inbox-message-meta {
  font-size: 0.68rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inbox-message-body {
  color: var(--ink-muted);
  white-space: pre-wrap;
  margin: 0;
}

.inbox-message-expand {
  padding: 0 0.6rem 0.6rem;
  display: none;
}

.inbox-expanded .inbox-message-expand {
  display: block;
}

.inbox-expanded .inbox-toggle-btn {
  padding-bottom: 0.35rem;
}

.inbox-unread .inbox-message-title::before {
  content: "● ";
  color: var(--accent);
}

.inbox-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.45rem;
}

.inbox-actions .ghost-button {
  padding: 0.28rem 0.55rem;
  font-size: 0.72rem;
}

.inbox-pagination {
  align-items: center;
}

.inbox-pagination .auth-message {
  margin: 0;
}

.inbox-filter-form {
  margin-top: 0.6rem;
  display: grid;
  gap: 0.45rem;
  grid-template-columns: minmax(0, 8rem) minmax(0, 1fr);
  align-items: end;
}

.inbox-filter-form label {
  gap: 0.2rem;
  font-size: 0.74rem;
}

.inbox-filter-form input,
.inbox-filter-form select {
  padding: 0.45rem 0.55rem;
  font-size: 16px;
}

.inbox-filter-actions {
  grid-column: 1 / -1;
  margin-top: 0.1rem;
}

.inbox-filter-actions .auth-button {
  padding: 0.45rem 0.6rem;
  font-size: 0.72rem;
}

.inbox-sound-toggle {
  grid-column: 1 / -1;
  margin-top: 0.05rem;
  font-size: 0.74rem;
  color: var(--ink-muted);
}

.schedule-delete-btn {
  margin-left: auto;
  padding: 0.28rem 0.55rem;
  font-size: 0.72rem;
}

#botScheduleForm[data-disabled="true"] {
  opacity: 0.6;
  pointer-events: none;
}

.admin-page {
  max-width: min(96rem, 96vw);
}

.admin-hero p {
  max-width: 70ch;
}

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

.admin-tile {
  min-height: 5.4rem;
}

.admin-tile span {
  display: block;
  margin-top: 0.45rem;
  color: var(--ink);
}

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

.admin-panel h3 {
  margin: 0;
}

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

@keyframes bot-run-pulse {
  0% {
    filter: brightness(0.95);
    transform: translateY(0);
  }
  50% {
    filter: brightness(1.08);
    transform: translateY(-1px);
  }
  100% {
    filter: brightness(0.95);
    transform: translateY(0);
  }
}

@keyframes status-in {
  from {
    opacity: 0;
    transform: translateX(16px);
    text-shadow: 0 0 0 transparent;
  }
  to {
    opacity: 1;
    transform: translateX(0);
    text-shadow: 0 0 10px rgba(54, 255, 121, 0.6);
  }
}

@keyframes status-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-16px);
  }
}

@media (min-width: 940px) {
  :root {
    --topbar-height: 5rem;
  }

  .app-chrome {
    height: calc(var(--topbar-height) + var(--status-height));
  }

  .topbar {
    padding: 0.35rem 1.5rem;
    height: var(--topbar-height);
  }

  .brand {
    font-size: 1rem;
    letter-spacing: 0.12em;
    max-width: 100%;
  }

  .topbar-main {
    gap: 0.55rem;
  }

  .drawer {
    width: 18rem;
  }

  .page-shell {
    padding: 1.6rem;
  }
}

@media (max-width: 939px) {
  .filters-layout {
    grid-template-columns: 1fr;
  }

  .filter-list-item {
    grid-template-columns: 1fr auto;
  }

  .filter-enable-toggle {
    grid-column: 1 / -1;
  }

  .filter-name {
    grid-column: 1 / 2;
  }

  .filter-chip {
    justify-self: start;
  }

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

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

  .inbox-filter-form {
    grid-template-columns: 1fr;
  }
}

/* iOS Safari: blur on fixed layers can cause header row dropouts during scroll */
@supports (-webkit-touch-callout: none) {
  .topbar,
  .status-strip {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
