/*
 * This is a manifest file that'll be compiled into application.css.
 */

/* Heroicons via rails_icons — SVGs have no intrinsic size without CSS.
   Tailwind `size-*` often isn't generated for helper args, so pin defaults here. */
svg[data-slot="icon"] {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  vertical-align: middle;
}

svg[data-slot="icon"].size-3,
svg[data-slot="icon"].mir-icon-xs {
  width: 0.75rem;
  height: 0.75rem;
}

svg[data-slot="icon"].size-3\.5,
svg[data-slot="icon"].mir-icon-sm {
  width: 0.875rem;
  height: 0.875rem;
}

svg[data-slot="icon"].size-4 {
  width: 1rem;
  height: 1rem;
}

svg[data-slot="icon"].size-5 {
  width: 1.25rem;
  height: 1.25rem;
}

svg[data-slot="icon"].size-6 {
  width: 1.5rem;
  height: 1.5rem;
}

@keyframes mir-chat-dot {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.mir-chat-typing span {
  display: inline-block;
  width: 0.35rem;
  height: 0.35rem;
  margin-right: 0.2rem;
  border-radius: 9999px;
  background: currentColor;
  animation: mir-chat-dot 1.15s ease-in-out infinite;
}

.mir-chat-typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.mir-chat-typing span:nth-child(3) {
  animation-delay: 0.3s;
  margin-right: 0;
}

@media (prefers-reduced-motion: reduce) {
  .mir-chat-typing span {
    animation: none;
    opacity: 0.65;
  }
}

/* Managed / auth shell — dusk atmosphere only in dark mode */
html.dark .mir-managed-shell {
  background-color: #0a0f16;
  background-image:
    radial-gradient(ellipse 90% 55% at 0% -10%, rgba(56, 189, 248, 0.09), transparent 55%),
    radial-gradient(ellipse 70% 45% at 100% 110%, rgba(14, 165, 233, 0.05), transparent 50%);
}

/* Lit site preview — soft sky rim in the dark */
html.dark .mir-site-frame {
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.14),
    0 28px 56px -28px rgba(56, 189, 248, 0.28),
    0 12px 24px -16px rgba(0, 0, 0, 0.55);
}

/* Shared page-enter motion (dashboard lists, page blocks, auth, marketing) */
.mir-rise {
  animation: mir-auth-rise 0.45s ease-out both;
}

.mir-rise-delayed {
  animation: mir-auth-rise 0.55s ease-out 0.08s both;
}

.mir-rise-list > *,
.mir-dash-list > li {
  animation: mir-auth-rise 0.45s ease-out both;
  animation-delay: calc(var(--mir-rise-i, var(--mir-dash-i, 0)) * 45ms);
}

@media (prefers-reduced-motion: reduce) {
  .mir-rise,
  .mir-rise-delayed,
  .mir-rise-list > *,
  .mir-dash-list > li {
    animation: none;
  }
}

/* Auth doorway (Devise layout) */
@keyframes mir-auth-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mir-auth-panel {
  animation: mir-auth-rise 0.45s ease-out both;
}

.mir-auth-window {
  animation: mir-auth-rise 0.55s ease-out 0.08s both;
}

@media (prefers-reduced-motion: reduce) {
  .mir-auth-panel,
  .mir-auth-window {
    animation: none;
  }
}

.mir-password-field {
  position: relative;
}

.mir-password-field__toggle {
  position: absolute;
  top: 50%;
  right: 0.625rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem;
  border: 0;
  border-radius: 0.625rem;
  background: transparent;
  color: rgb(120 113 108);
  cursor: pointer;
  transform: translateY(-50%);
}

.mir-password-field__toggle:hover {
  color: rgb(68 64 60);
  background: rgb(245 245 244);
}

.mir-password-field__toggle:focus-visible {
  outline: 2px solid rgb(14 165 233);
  outline-offset: 2px;
}

html.dark .mir-password-field__toggle {
  color: rgb(148 163 184);
}

html.dark .mir-password-field__toggle:hover {
  color: rgb(226 232 240);
  background: rgb(30 41 59);
}

html.dark .mir-password-field__toggle:focus-visible {
  outline-color: rgb(56 189 248);
}

/* Marketing homepage */
.mir-marketing,
.mir-marketing .mir-brand {
  font-family: "Bricolage Grotesque", "Source Sans 3", ui-sans-serif, system-ui, sans-serif;
}

.mir-marketing {
  font-family: "Source Sans 3", ui-sans-serif, system-ui, sans-serif;
}

.mir-marketing .mir-brand {
  font-optical-sizing: auto;
}

.mir-home-rise {
  animation: mir-auth-rise 0.5s ease-out both;
}

.mir-home-window {
  animation: mir-auth-rise 0.65s ease-out 0.1s both;
}

.mir-home-steps > li {
  animation: mir-auth-rise 0.5s ease-out both;
}

.mir-home-steps > li:nth-child(1) {
  animation-delay: 0.05s;
}

.mir-home-steps > li:nth-child(2) {
  animation-delay: 0.12s;
}

.mir-home-steps > li:nth-child(3) {
  animation-delay: 0.19s;
}

@media (prefers-reduced-motion: reduce) {
  .mir-home-rise,
  .mir-home-window,
  .mir-home-steps > li {
    animation: none;
  }
}

/* Stylized client site inside the homepage frame */
.mir-demo-site {
  background-color: #1a1512;
  color: #f3ebe3;
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(232, 145, 72, 0.35), transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(60, 35, 22, 0.9), transparent 45%);
}

.mir-demo-panel {
  display: flex;
  aspect-ratio: 3 / 4;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.45);
}

.mir-demo-panel--sourdough {
  background: linear-gradient(165deg, #d4894a 0%, #8b4e28 48%, #3d2418 100%);
}

.mir-demo-panel--olive {
  margin-top: 2.5rem;
  background: linear-gradient(165deg, #a67c52 0%, #5c3a24 55%, #24160f 100%);
}

/* Compact attachment thumbs (composer + chat) */
.mir-attach-thumb {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

/* Change-request live page — keep last cards clear of the main scroller edge.
   Don't rely on Tailwind spacing utilities that may not be in the built CSS. */
.mir-change-request-live {
  padding-bottom: 6rem;
}

.mir-chat-scroll-end {
  display: block;
  width: 100%;
  height: 4rem;
  flex-shrink: 0;
}

/* Managed flash toasts — float above the shell, auto-dismiss with a quiet timer. */
.mir-toast-stack {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: min(22rem, calc(100vw - 2rem));
  pointer-events: none;
}

.mir-toast {
  pointer-events: auto;
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: start;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid rgb(231 229 228);
  background: rgb(255 255 255 / 0.96);
  box-shadow:
    0 12px 32px rgb(28 25 23 / 0.1),
    0 2px 6px rgb(28 25 23 / 0.05);
  padding: 0.9rem 0.85rem 1rem 0;
  opacity: 0;
  transform: translateY(0.85rem) scale(0.98);
}

html.dark .mir-toast {
  border-color: rgb(51 65 85 / 0.9);
  background: rgb(15 23 42 / 0.94);
  box-shadow:
    0 16px 40px rgb(2 6 23 / 0.45),
    0 0 0 1px rgb(148 163 184 / 0.08);
}

.mir-toast.is-in {
  animation: mir-toast-in 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.mir-toast.is-out {
  animation: mir-toast-out 0.28s ease-in forwards;
}

.mir-toast__rail {
  width: 0.25rem;
  align-self: stretch;
  margin: 0.15rem 0 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgb(14 165 233);
}

.mir-toast--notice .mir-toast__rail {
  background: rgb(5 150 105);
}

.mir-toast--alert .mir-toast__rail {
  background: rgb(225 29 72);
}

.mir-toast__body {
  min-width: 0;
  padding-top: 0.05rem;
}

.mir-toast__label {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgb(120 113 108);
}

html.dark .mir-toast__label {
  color: rgb(148 163 184);
}

.mir-toast__message {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: rgb(28 25 23);
}

html.dark .mir-toast__message {
  color: rgb(226 232 240);
}

.mir-toast__dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-right: 0.25rem;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  color: rgb(168 162 158);
  cursor: pointer;
}

.mir-toast__dismiss:hover {
  background: rgb(245 245 244);
  color: rgb(68 64 60);
}

html.dark .mir-toast__dismiss:hover {
  background: rgb(30 41 59);
  color: rgb(226 232 240);
}

.mir-toast__dismiss svg {
  width: 1rem;
  height: 1rem;
}

.mir-toast__timer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgb(231 229 228 / 0.8);
}

html.dark .mir-toast__timer {
  background: rgb(51 65 85 / 0.8);
}

.mir-toast__timer span {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left center;
  background: rgb(14 165 233 / 0.7);
  animation: mir-toast-timer linear forwards;
}

.mir-toast--notice .mir-toast__timer span {
  background: rgb(5 150 105 / 0.75);
}

.mir-toast--alert .mir-toast__timer span {
  background: rgb(225 29 72 / 0.75);
}

@keyframes mir-toast-in {
  from {
    opacity: 0;
    transform: translateY(0.85rem) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes mir-toast-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(0.4rem) scale(0.98);
  }
}

@keyframes mir-toast-timer {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mir-toast.is-in,
  .mir-toast.is-out,
  .mir-toast__timer span {
    animation: none !important;
  }

  .mir-toast.is-in {
    opacity: 1;
    transform: none;
  }
}

/* Confirm modal — styled replacement for window.confirm */
.mir-confirm {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.mir-confirm.is-open {
  pointer-events: auto;
  opacity: 1;
}

@media (min-width: 640px) {
  .mir-confirm {
    align-items: center;
  }
}

.mir-confirm__backdrop {
  position: absolute;
  inset: 0;
  background: rgb(28 25 23 / 0.45);
  backdrop-filter: blur(2px);
}

html.dark .mir-confirm__backdrop {
  background: rgb(2 6 23 / 0.65);
}

.mir-confirm__dialog {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 24rem;
  flex-direction: column;
  overflow: hidden;
  border-radius: 1rem 1rem 0 0;
  border: 1px solid rgb(231 229 228);
  background: rgb(255 255 255 / 0.98);
  box-shadow:
    0 24px 48px rgb(28 25 23 / 0.14),
    0 4px 12px rgb(28 25 23 / 0.06);
  transform: translateY(0.75rem) scale(0.98);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 640px) {
  .mir-confirm__dialog {
    border-radius: 1rem;
  }
}

.mir-confirm.is-open .mir-confirm__dialog {
  transform: translateY(0) scale(1);
}

html.dark .mir-confirm__dialog {
  border-color: rgb(51 65 85 / 0.9);
  background: rgb(15 23 42 / 0.98);
  box-shadow:
    0 24px 48px rgb(2 6 23 / 0.45),
    0 4px 12px rgb(2 6 23 / 0.2);
}

body.mir-confirm-open {
  overflow: hidden;
}

.mir-confirm__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid rgb(231 229 228);
  padding: 1rem 1.15rem;
}

html.dark .mir-confirm__header {
  border-bottom-color: rgb(51 65 85 / 0.9);
}

.mir-confirm__title {
  min-width: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  color: rgb(28 25 23);
}

html.dark .mir-confirm__title {
  color: rgb(248 250 252);
}

.mir-confirm__close {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.75rem;
  color: rgb(120 113 108);
}

.mir-confirm__close:hover {
  background: rgb(245 245 244);
  color: rgb(41 37 36);
}

html.dark .mir-confirm__close {
  color: rgb(148 163 184);
}

html.dark .mir-confirm__close:hover {
  background: rgb(30 41 59);
  color: rgb(248 250 252);
}

.mir-confirm__body {
  padding: 1rem 1.15rem 0.25rem;
}

.mir-confirm__message {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: rgb(68 64 60);
  white-space: pre-wrap;
}

html.dark .mir-confirm__message {
  color: rgb(203 213 225);
}

.mir-confirm__detail {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: rgb(120 113 108);
  white-space: pre-wrap;
}

html.dark .mir-confirm__detail {
  color: rgb(148 163 184);
}

.mir-confirm__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1rem 1.15rem 1.15rem;
}

.mir-confirm__cancel,
.mir-confirm__confirm {
  border-radius: 0.75rem;
  padding: 0.55rem 0.95rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.mir-confirm__cancel {
  border: 1px solid rgb(214 211 209);
  background: rgb(255 255 255);
  color: rgb(68 64 60);
}

.mir-confirm__cancel:hover {
  background: rgb(250 250 249);
}

html.dark .mir-confirm__cancel {
  border-color: rgb(51 65 85);
  background: rgb(15 23 42);
  color: rgb(226 232 240);
}

html.dark .mir-confirm__cancel:hover {
  background: rgb(30 41 59);
}

.mir-confirm__confirm {
  border: 1px solid rgb(3 105 161);
  background: rgb(3 105 161);
  color: rgb(255 255 255);
}

.mir-confirm__confirm:hover {
  background: rgb(7 89 133);
}

html.dark .mir-confirm__confirm {
  border-color: rgb(14 165 233);
  background: rgb(14 165 233);
  color: rgb(2 6 23);
}

html.dark .mir-confirm__confirm:hover {
  background: rgb(56 189 248);
}

.mir-confirm__confirm--danger {
  border-color: rgb(190 18 60);
  background: rgb(190 18 60);
  color: rgb(255 255 255);
}

.mir-confirm__confirm--danger:hover {
  background: rgb(159 18 57);
}

html.dark .mir-confirm__confirm--danger {
  border-color: rgb(244 63 94);
  background: rgb(244 63 94);
  color: rgb(2 6 23);
}

html.dark .mir-confirm__confirm--danger:hover {
  background: rgb(251 113 133);
}

@media (prefers-reduced-motion: reduce) {
  .mir-confirm,
  .mir-confirm__dialog {
    transition: none;
  }

  .mir-confirm__dialog {
    transform: none;
  }
}

/* Managed shell — mobile drawer + safe areas */
.mir-managed-mobile-header {
  padding-top: max(0.75rem, env(safe-area-inset-top, 0px));
}

.mir-managed-menu-button {
  width: 2.5rem;
  height: 2.5rem;
}

.mir-managed-main {
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
}

.mir-managed-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgb(28 25 23 / 0.4);
  backdrop-filter: blur(2px);
}

html.dark .mir-managed-backdrop {
  background: rgb(2 6 23 / 0.6);
}

@media (max-width: 1023px) {
  .mir-managed-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    width: min(18rem, 88vw);
    height: 100%;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 16px 0 48px -24px rgb(28 25 23 / 0.28);
  }

  html.dark .mir-managed-sidebar {
    box-shadow: 16px 0 48px -24px rgb(0 0 0 / 0.55);
  }

  .mir-managed-sidebar.is-open {
    transform: translateX(0);
  }

  body.mir-managed-nav-open {
    overflow: hidden;
  }
}

@media (min-width: 1024px) {
  .mir-managed-backdrop {
    display: none !important;
  }

  .mir-managed-sidebar {
    position: static;
    z-index: auto;
    width: 14rem;
    height: auto;
    min-height: 0;
    transform: none;
    transition: none;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mir-managed-sidebar {
    transition: none;
  }
}

.mir-nav-item-active {
  background: rgb(240 249 255);
  color: rgb(7 89 133);
  font-weight: 500;
}

html.dark .mir-nav-item-active {
  background: rgb(14 165 233 / 0.14);
  color: rgb(125 211 252);
  box-shadow: inset 0 0 0 1px rgb(56 189 248 / 0.22);
}

/* Selected managed project in the sidebar — readable in light and dusk */
.mir-nav-project-active {
  background: rgb(240 249 255);
  color: rgb(7 89 133);
}

html.dark .mir-nav-project-active {
  background: rgb(14 165 233 / 0.14);
  color: rgb(125 211 252);
  box-shadow: inset 0 0 0 1px rgb(56 189 248 / 0.22);
}

/* Managed domains — mode choice tiles + shared form fields */
.mir-domain-mode-choice {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  width: 100%;
  border-radius: 1rem;
  border: 2px solid rgb(231 229 228);
  background: rgb(255 255 255);
  padding: 1rem 1.125rem;
  text-align: left;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.mir-domain-mode-choice:hover {
  border-color: rgb(214 211 209);
  background: rgb(250 250 249);
}

.mir-domain-mode-choice:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgb(255 255 255), 0 0 0 4px rgb(14 165 233);
}

.mir-domain-mode-choice__marker {
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.125rem;
  border-radius: 9999px;
  border: 2px solid rgb(168 162 158);
  background: rgb(255 255 255);
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.mir-domain-mode-choice__copy {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.mir-domain-mode-choice__title {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  color: rgb(68 64 60);
}

.mir-domain-mode-choice__hint {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: rgb(120 113 108);
}

.mir-domain-mode-choice[aria-selected="true"] {
  border-color: rgb(3 105 161);
  background: rgb(240 249 255);
  box-shadow: inset 0 0 0 1px rgb(186 230 253);
}

.mir-domain-mode-choice[aria-selected="true"] .mir-domain-mode-choice__marker {
  border-color: rgb(3 105 161);
  background: rgb(3 105 161);
  box-shadow: inset 0 0 0 3px rgb(240 249 255);
}

.mir-domain-mode-choice[aria-selected="true"] .mir-domain-mode-choice__title {
  color: rgb(12 74 110);
}

.mir-domain-mode-choice[aria-selected="true"] .mir-domain-mode-choice__hint {
  color: rgb(3 105 161);
}

html.dark .mir-domain-mode-choice {
  border-color: rgb(51 65 85);
  background: rgb(15 23 42);
}

html.dark .mir-domain-mode-choice:hover {
  border-color: rgb(71 85 105);
  background: rgb(15 23 42 / 0.85);
}

html.dark .mir-domain-mode-choice__marker {
  border-color: rgb(100 116 139);
  background: rgb(2 6 23);
}

html.dark .mir-domain-mode-choice__title {
  color: rgb(226 232 240);
}

html.dark .mir-domain-mode-choice__hint {
  color: rgb(148 163 184);
}

html.dark .mir-domain-mode-choice[aria-selected="true"] {
  border-color: rgb(56 189 248);
  background: rgb(14 165 233 / 0.12);
  box-shadow: inset 0 0 0 1px rgb(56 189 248 / 0.35);
}

html.dark .mir-domain-mode-choice[aria-selected="true"] .mir-domain-mode-choice__marker {
  border-color: rgb(56 189 248);
  background: rgb(56 189 248);
  box-shadow: inset 0 0 0 3px rgb(15 23 42);
}

html.dark .mir-domain-mode-choice[aria-selected="true"] .mir-domain-mode-choice__title {
  color: rgb(186 230 253);
}

html.dark .mir-domain-mode-choice[aria-selected="true"] .mir-domain-mode-choice__hint {
  color: rgb(125 211 252);
}

@media (prefers-reduced-motion: reduce) {
  .mir-domain-mode-choice,
  .mir-domain-mode-choice__marker {
    transition: none;
  }
}

.mir-domain-field-label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgb(68 64 60);
}

html.dark .mir-domain-field-label {
  color: rgb(203 213 225);
}

.mir-domain-field-input {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid rgb(214 211 209);
  background: rgb(255 255 255);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  line-height: 1.5rem;
}

.mir-domain-field-input:focus {
  border-color: rgb(14 165 233);
  outline: none;
  box-shadow: 0 0 0 2px rgb(186 230 253);
}

html.dark .mir-domain-field-input {
  border-color: rgb(51 65 85);
  background: rgb(2 6 23);
  color: rgb(241 245 249);
}

html.dark .mir-domain-field-input:focus {
  border-color: rgb(56 189 248);
  box-shadow: 0 0 0 2px rgb(56 189 248 / 0.2);
}

.mir-domain-host-input {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid rgb(214 211 209);
  background: rgb(255 255 255);
}

.mir-domain-host-input:focus-within {
  border-color: rgb(14 165 233);
  box-shadow: 0 0 0 2px rgb(186 230 253);
}

html.dark .mir-domain-host-input {
  border-color: rgb(51 65 85);
  background: rgb(2 6 23);
}

html.dark .mir-domain-host-input:focus-within {
  border-color: rgb(56 189 248);
  box-shadow: 0 0 0 2px rgb(56 189 248 / 0.2);
}

.mir-domain-host-input__prefix {
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgb(87 83 78);
  background: rgb(245 245 244);
  border-right: 1px solid rgb(214 211 209);
  user-select: none;
}

.mir-domain-host-input__host {
  width: 5.5rem;
  flex-shrink: 0;
  border: 0;
  background: rgb(245 245 244);
  padding: 0.75rem 0.625rem;
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 500;
  color: rgb(28 25 23);
  text-align: center;
  outline: none;
  border-right: 1px solid rgb(214 211 209);
}

.mir-domain-host-input__dot {
  display: flex;
  align-items: center;
  padding: 0 0.125rem;
  font-size: 1rem;
  font-weight: 500;
  color: rgb(120 113 108);
  background: rgb(245 245 244);
  border-right: 1px solid rgb(214 211 209);
  user-select: none;
}

html.dark .mir-domain-host-input__prefix {
  color: rgb(148 163 184);
  background: rgb(15 23 42);
  border-right-color: rgb(51 65 85);
}

html.dark .mir-domain-host-input__host,
html.dark .mir-domain-host-input__dot {
  color: rgb(241 245 249);
  background: rgb(15 23 42);
  border-right-color: rgb(51 65 85);
}

html.dark .mir-domain-host-input__dot {
  color: rgb(148 163 184);
}

.mir-domain-host-input__control {
  min-width: 0;
  flex: 1;
  border: 0;
  background: transparent;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  line-height: 1.5rem;
  color: rgb(28 25 23);
  outline: none;
}

html.dark .mir-domain-host-input__control {
  color: rgb(241 245 249);
}

.mir-domain-host-input__control::placeholder {
  color: rgb(168 162 158);
}

html.dark .mir-domain-host-input__control::placeholder {
  color: rgb(100 116 139);
}

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

.mir-domain-spinner {
  display: inline-block;
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: mir-domain-spin 0.65s linear infinite;
}

.mir-domain-spinner--sm {
  width: 0.75rem;
  height: 0.75rem;
  border-width: 1.5px;
}

@media (prefers-reduced-motion: reduce) {
  .mir-domain-spinner {
    animation: none;
    border-right-color: currentColor;
    opacity: 0.55;
  }
}

.mir-domain-field-submit {
  width: 100%;
  flex-shrink: 0;
  border-radius: 0.75rem;
  background: rgb(3 105 161);
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  color: rgb(255 255 255);
}

.mir-domain-field-submit:hover:not(:disabled) {
  background: rgb(7 89 133);
}

.mir-domain-field-submit:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

html.dark .mir-domain-field-submit {
  background: rgb(14 165 233);
  color: rgb(2 6 23);
}

html.dark .mir-domain-field-submit:hover:not(:disabled) {
  background: rgb(56 189 248);
}

@media (min-width: 640px) {
  .mir-domain-field-submit {
    width: auto;
    min-width: 9.5rem;
  }
}

.mir-domain-available-panel {
  border: 1px solid rgb(167 243 208);
  background: rgb(236 253 245);
}

.mir-domain-available-panel__domain,
.mir-domain-available-panel__price {
  color: rgb(6 78 59);
}

.mir-domain-available-panel__message,
.mir-domain-available-panel__breakdown {
  color: rgb(4 120 87);
}

.mir-domain-available-panel__footnote {
  color: rgb(6 95 70);
}

html.dark .mir-domain-available-panel {
  border-color: rgb(6 95 70 / 0.8);
  background: rgb(2 44 34 / 0.72);
  box-shadow: inset 0 0 0 1px rgb(6 95 70 / 0.35);
}

html.dark .mir-domain-available-panel__domain,
html.dark .mir-domain-available-panel__price {
  color: rgb(110 231 183);
}

html.dark .mir-domain-available-panel__message,
html.dark .mir-domain-available-panel__breakdown {
  color: rgb(52 211 153);
}

html.dark .mir-domain-available-panel__footnote {
  color: rgb(74 222 128);
}

/* Domain DNS setup — three-step registrar flow inside domain row */
.mir-domain-setup {
  border-top: 1px solid rgb(231 229 228);
  padding-top: 1.25rem;
}

.mir-domain-setup__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mir-domain-setup__step {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mir-domain-setup__step + .mir-domain-setup__step {
  padding-top: 1.5rem;
  border-top: 1px solid rgb(231 229 228);
}

.mir-domain-setup__step-head {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
}

.mir-domain-setup__step-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.75rem;
  background: rgb(224 242 254);
  color: rgb(3 105 161);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
}

.mir-domain-setup__step-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  color: rgb(28 25 23);
}

.mir-domain-setup__step-lead {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: rgb(87 83 78);
}

.mir-domain-setup__registrar {
  font-weight: 600;
  color: rgb(41 37 36);
}

.mir-domain-setup__records {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.875rem;
  padding-left: 2.625rem;
}

@media (min-width: 768px) {
  .mir-domain-setup__records {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.mir-domain-record-card {
  min-width: 0;
  border: 1px solid rgb(231 229 228);
  border-radius: 0.75rem;
  background: rgb(255 255 255);
  padding: 0.875rem 1rem 1rem;
}

.mir-domain-record-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
}

.mir-domain-record-card__step {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgb(120 113 108);
}

.mir-domain-record-card__title {
  margin: 0.125rem 0 0;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  color: rgb(28 25 23);
}

.mir-domain-record-card__type {
  flex-shrink: 0;
  border-radius: 0.5rem;
  background: rgb(245 245 244);
  padding: 0.2rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgb(68 64 60);
}

.mir-domain-record-card__fields {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.mir-domain-record-card__field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.mir-domain-record-card__label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgb(120 113 108);
}

.mir-domain-record-card__value-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.mir-domain-record-card__value {
  display: block;
  min-width: 0;
  flex: 1;
  overflow-x: auto;
  white-space: nowrap;
  border-radius: 0.625rem;
  border: 1px solid rgb(231 229 228);
  background: rgb(250 250 249);
  padding: 0.5rem 0.625rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.6875rem;
  line-height: 1.45;
  color: rgb(41 37 36);
}

.mir-domain-record-card__copy {
  flex-shrink: 0;
  align-self: center;
  border-radius: 0.625rem;
  border: 1px solid rgb(214 211 209);
  background: rgb(255 255 255);
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.25rem;
  color: rgb(3 105 161);
  cursor: pointer;
}

.mir-domain-record-card__copy:hover {
  background: rgb(240 249 255);
  border-color: rgb(186 230 253);
}

.mir-domain-record-card__ttl {
  margin: 0.75rem 0 0;
  font-size: 0.6875rem;
  color: rgb(120 113 108);
}

.mir-domain-setup__verify {
  min-width: 0;
  flex: 1;
}

.mir-domain-setup__verify-action {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgb(254 243 199);
  background: rgb(255 251 235);
}

.mir-domain-setup__check-form {
  width: 100%;
  margin: 0;
}

.mir-domain-setup__check-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 0;
  border-radius: 0.75rem;
  background: rgb(3 105 161);
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
  color: rgb(255 255 255);
  cursor: pointer;
}

.mir-domain-setup__check-btn:hover {
  background: rgb(7 89 133);
}

.mir-domain-setup__verify-hint {
  margin: 0.625rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: rgb(146 64 14);
}

.mir-domain-setup__loading {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 0.25rem 0;
}

.mir-domain-setup__loading-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: rgb(28 25 23);
}

.mir-domain-setup__loading-copy {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgb(87 83 78);
}

.mir-domain-setup--auto .mir-domain-setup__auto-copy {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgb(4 120 87);
}

.mir-domain-setup__error {
  margin: 1rem 0 0;
  border-radius: 0.75rem;
  border: 1px solid rgb(254 202 202);
  background: rgb(254 242 242);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: rgb(185 28 28);
}

html.dark .mir-domain-setup {
  border-top-color: rgb(51 65 85);
}

html.dark .mir-domain-setup__step + .mir-domain-setup__step {
  border-top-color: rgb(51 65 85);
}

html.dark .mir-domain-setup__step-num {
  background: rgb(8 47 73);
  color: rgb(125 211 252);
}

html.dark .mir-domain-setup__step-title {
  color: rgb(241 245 249);
}

html.dark .mir-domain-setup__step-lead {
  color: rgb(148 163 184);
}

html.dark .mir-domain-setup__registrar {
  color: rgb(226 232 240);
}

html.dark .mir-domain-record-card {
  border-color: rgb(51 65 85);
  background: rgb(15 23 42);
}

html.dark .mir-domain-record-card__step {
  color: rgb(100 116 139);
}

html.dark .mir-domain-record-card__title {
  color: rgb(241 245 249);
}

html.dark .mir-domain-record-card__type {
  background: rgb(30 41 59);
  color: rgb(203 213 225);
}

html.dark .mir-domain-record-card__label {
  color: rgb(100 116 139);
}

html.dark .mir-domain-record-card__value {
  border-color: rgb(51 65 85);
  background: rgb(2 6 23);
  color: rgb(226 232 240);
}

html.dark .mir-domain-record-card__copy {
  border-color: rgb(51 65 85);
  background: rgb(15 23 42);
  color: rgb(56 189 248);
}

html.dark .mir-domain-record-card__copy:hover {
  background: rgb(8 47 73);
  border-color: rgb(12 74 110);
}

html.dark .mir-domain-record-card__ttl {
  color: rgb(100 116 139);
}

html.dark .mir-domain-setup__verify-action {
  border-color: rgb(120 53 15 / 0.45);
  background: rgb(69 26 3 / 0.35);
}

html.dark .mir-domain-setup__check-btn {
  background: rgb(14 165 233);
  color: rgb(2 6 23);
}

html.dark .mir-domain-setup__check-btn:hover {
  background: rgb(56 189 248);
}

html.dark .mir-domain-setup__verify-hint {
  color: rgb(253 230 138);
}

html.dark .mir-domain-setup__loading-title {
  color: rgb(241 245 249);
}

html.dark .mir-domain-setup__loading-copy {
  color: rgb(148 163 184);
}

html.dark .mir-domain-setup--auto .mir-domain-setup__auto-copy {
  color: rgb(110 231 183);
}

html.dark .mir-domain-setup__error {
  border-color: rgb(127 29 29 / 0.5);
  background: rgb(69 10 10 / 0.35);
  color: rgb(252 165 165);
}

@media (prefers-reduced-motion: reduce) {
  .mir-domain-setup__step-num {
    transition: none;
  }
}

@media (max-width: 767px) {
  .mir-domain-setup__records {
    padding-left: 0;
  }

  .mir-domain-record-card__value-row {
    flex-direction: column;
    align-items: stretch;
  }

  .mir-domain-record-card__copy {
    align-self: flex-start;
  }
}

/* Dashboard site cards — quiet staggered entrance (see .mir-rise-list) */
