*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: #e8eaed;
  background: var(--color-bg);
}

:root {
  --sidebar-width: 220px;
  --site-footer-height: 2.75rem;
  --color-bg: rgb(11, 26, 47);
  --color-bg-deep: rgb(8, 20, 36);
  --color-bg-raised: rgb(14, 32, 56);
  --color-bg-surface: rgb(18, 38, 66);
  --color-bg-surface-2: rgb(22, 44, 74);
  --color-bg-surface-3: rgb(26, 50, 82);
  --color-bg-hover: rgb(32, 56, 90);
  --color-border: rgb(40, 64, 98);
  --color-border-strong: rgb(52, 78, 114);
  --color-accent: rgb(238, 96, 15);
  --color-accent-hover: rgb(255, 118, 38);
  --color-accent-soft: rgb(255, 160, 90);
  --color-accent-light: rgb(255, 190, 130);
  --color-accent-on: rgb(11, 26, 47);
  --scrollbar-size: 8px;
  --scrollbar-track: transparent;
  --scrollbar-thumb: rgba(148, 163, 184, 0.22);
  --scrollbar-thumb-hover: rgba(148, 163, 184, 0.42);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

*::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
}

*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

*::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb);
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover);
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

.server-console-output {
  --scrollbar-thumb: rgba(148, 163, 184, 0.16);
  --scrollbar-thumb-hover: rgba(148, 163, 184, 0.32);
}

.layout {
  min-height: 100vh;
}

.layout.layout-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.layout-body {
  display: flex;
  flex-direction: column;
  margin-left: var(--sidebar-width);
  width: calc(100vw - var(--sidebar-width));
  min-width: 0;
  height: 100vh;
  overflow: hidden;
}

.live-price-wrap {
  flex: 0 0 auto;
  z-index: 20;
  margin: 0;
  padding: 0.85rem 2rem 0.65rem;
  border-top: 1px solid var(--color-border);
  background: rgba(11, 26, 47, 0.96);
  backdrop-filter: blur(10px);
  animation: ui-fade-in 0.36s ease-out 0.1s both;
}

.live-price-inner {
  max-width: min(1320px, 100%);
  margin: 0;
  padding: 0;
}

.layout-wide .live-price-inner {
  max-width: min(1720px, 100%);
}

.live-price-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.live-price-title {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.live-price-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.live-price-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.55rem;
  margin: 0;
  line-height: 1.12;
}

.live-price-prefix {
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  font-weight: 700;
  color: #94a3b8;
}

.live-price-num {
  font-size: clamp(2.15rem, 5.2vw, 3.35rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #f8fafc;
}

.live-price-suffix {
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  font-weight: 700;
  color: #ffc896;
}

.live-price-detail {
  margin: 0;
  font-size: 0.875rem;
  color: #b8c0c9;
  line-height: 1.45;
}

.live-price-line--compact .live-price-num {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.live-price-line--compact .live-price-suffix {
  font-size: clamp(0.9rem, 1.8vw, 1.15rem);
}

.live-price-sep {
  color: #305070;
  margin: 0 0.2rem;
}

.live-price-hint {
  margin: 0;
  font-size: 0.875rem;
  color: #8b95a1;
}

.layout-body:has(.live-price-wrap) > .main {
  flex: 1 1 auto;
  min-height: 0;
}

.layout-body:has(.live-price-wrap) > .main > .wizard {
  min-height: 0;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 50;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1rem;
  background: var(--color-bg-surface);
  border-right: 1px solid var(--color-border);
  overflow-y: auto;
  animation: ui-slide-in-left 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.sidebar-brand-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem;
  padding-right: 0.15rem;
  padding-bottom: 0.85rem;
}

.sidebar-brand {
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.02em;
  line-height: 1;
}

.sidebar-brand-giga {
  color: #ffffff;
}

.sidebar-brand-mc {
  color: var(--color-accent-soft);
}

.sidebar-brand-badge {
  position: absolute;
  right: 0;
  bottom: 0;
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1;
  color: #94a3b8;
  white-space: nowrap;
}

.sidebar-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  min-height: 0;
}

.sidebar-category {
  display: flex;
  flex-direction: column;
  gap: 0;
  animation: ui-fade-up 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.sidebar-category:nth-child(1) {
  animation-delay: 0.04s;
}

.sidebar-category:nth-child(2) {
  animation-delay: 0.09s;
}

.sidebar-category:nth-child(3) {
  animation-delay: 0.14s;
}

.sidebar-category-title {
  margin: 0 0 0.45rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}

.sidebar-tabbar {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.sidebar-tab {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
  color: #94a3b8;
  border: 1px solid #1e3554;
  background: #0d1f38;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.18s ease,
    box-shadow 0.2s ease;
}

.sidebar-tab:hover {
  color: #e2e8f0;
  border-color: #284666;
  background: #142e50;
  transform: translateX(3px);
}

.sidebar-tab:active {
  transform: translateX(1px) scale(0.99);
}

.sidebar-tab.is-active {
  color: #f1f5f9;
  background: #1a3558;
  border-color: #305070;
  box-shadow: 0 1px 0 #ee600f44;
}

.sidebar-link {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  color: #c4cbd4;
}

.sidebar-link.is-active {
  background: #1a3558;
  color: #f1f5f9;
}

.sidebar-link.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  font-size: 0.9375rem;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
}

.sidebar-footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.65rem;
}

.sidebar-account-menu {
  position: relative;
}

.sidebar-account-row {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
}

.sidebar-account-tab {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.55rem 0.65rem;
  padding-right: 1.75rem;
  position: relative;
  border-radius: 8px;
  border: 1px solid #223c5c;
  background: #0d1f38;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.16s ease;
}

.sidebar-account-tab:hover {
  border-color: #305070;
  background: #142e50;
}

.sidebar-account-tab.is-current {
  border-color: #ff7618;
  box-shadow: 0 0 0 1px #ee600f33;
}

.sidebar-account-menu.is-open .sidebar-account-tab {
  border-color: #305070;
  background: #142e50;
}

.sidebar-account-menu.is-open .sidebar-account-tab.is-current {
  border-color: #ff7618;
  box-shadow: 0 0 0 1px #ee600f33;
}

.sidebar-account-tab--link {
  padding-right: 0.65rem;
}

.sidebar-account-tab-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.sidebar-account-tab-name {
  width: 100%;
  font-size: 0.875rem;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-account-chevron {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: translateY(-65%) rotate(45deg);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.sidebar-account-menu.is-open .sidebar-account-chevron {
  transform: translateY(-35%) rotate(-135deg);
  border-color: #ff8c42;
}

.sidebar-account-logout-form {
  margin: 0;
  display: flex;
  align-self: stretch;
}

.sidebar-account-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.75rem;
  min-height: 100%;
  padding: 0;
  border-radius: 8px;
  border: 1px solid #284a72;
  background: #0d1f38;
  color: #94a3b8;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.15s ease;
}

.sidebar-account-icon-btn .sidebar-account-icon {
  display: block;
  width: 1.125rem;
  height: 1.125rem;
}

.sidebar-account-icon-btn:hover {
  border-color: #ee600f;
  background: #142e50;
  color: #ff8c42;
}

.sidebar-account-icon-btn:active {
  transform: scale(0.97);
}

.sidebar-account-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 0.35rem);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.35rem;
  border-radius: 10px;
  border: 1px solid #284a72;
  background: #0b1a2f;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.38);
}

.sidebar-account-dropdown[hidden] {
  display: none !important;
}

.sidebar-account-menu.is-open .sidebar-account-dropdown {
  animation: sidebar-account-dropdown-in 0.18s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.sidebar-account-dropdown-item {
  display: block;
  padding: 0.5rem 0.65rem;
  border-radius: 7px;
  color: #cbd5e1;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.16s ease, color 0.16s ease;
}

.sidebar-account-dropdown-item:hover {
  background: #142e50;
  color: #f8fafc;
}

.sidebar-account-dropdown-item.is-active {
  background: #1a3558;
  color: #ff8c42;
}

@keyframes sidebar-account-dropdown-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.main {
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
  margin-left: 0;
  padding: 1.75rem 2rem;
  max-width: min(1320px, 100%);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: ui-fade-up 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.page-title {
  margin: 0 0 1.25rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.section-title {
  margin: 0 0 0.75rem;
  font-size: 1.0625rem;
  font-weight: 600;
}

.card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  transition: border-color 0.2s ease, box-shadow 0.22s ease;
}

.admin-tab-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.auth-card:hover {
  border-color: #284a72;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.25);
}

.card-cta {
  max-width: 420px;
}

.card-text {
  margin: 0 0 1rem;
}

.muted {
  margin: 0;
  color: #8b95a1;
}

.login-back {
  margin: 1rem 0 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.22s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-accent-on);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  box-shadow: 0 4px 18px rgba(238, 96, 15, 0.28);
}

.btn-ghost {
  width: 100%;
  background: transparent;
  color: #94a3b8;
  border-color: #284a72;
}

.btn-ghost:hover {
  background: #1a3558;
  color: #e2e8f0;
}

.server-list {
  margin: 0;
  padding-left: 1.25rem;
}

.layout-wide .main {
  max-width: min(1720px, 100%);
}

.layout-server .main {
  max-width: 100%;
  animation: none;
}

.layout-server .server-page {
  width: 100%;
  max-width: 100%;
}

[data-server-tab-content].is-loading {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.layout-cancel .main {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cancel-page {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.cancel-panel {
  padding: 2rem 1.75rem;
  text-align: center;
}

.cancel-panel-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
  color: #94a3b8;
}

.cancel-panel-name {
  margin: 0 0 1.25rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #f8fafc;
}

.cancel-panel-contract {
  margin: 0 0 1.25rem;
  text-align: left;
}

.cancel-panel-note {
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
}

.cancel-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.cancel-action-form {
  width: 100%;
  margin: 0;
}

.layout.layout-centered .layout-body {
  margin-left: 0;
  width: 100vw;
  align-items: center;
}

.layout.layout-centered .main {
  margin-left: 0;
  width: min(100%, 420px);
  max-width: 100%;
  height: auto;
  max-height: none;
  flex: 1 1 auto;
  padding: 2rem 1.5rem;
  overflow-y: auto;
}

.site-footer-thin {
  flex: 0 0 auto;
  position: relative;
  z-index: 10;
  width: 100%;
  box-sizing: border-box;
  padding: 0.35rem 2rem 0.4rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-deep);
  font-size: 0.6875rem;
  line-height: 1.35;
  color: #64748b;
  animation: ui-fade-in 0.32s ease-out both;
}

.site-footer-thin-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  max-width: 100%;
}

.site-footer-thin-text {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  letter-spacing: 0.02em;
}

.site-footer-thin-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem 1.1rem;
  margin-left: auto;
}

.site-footer-thin-link {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.18s ease, opacity 0.18s ease;
}

.site-footer-thin-link:hover {
  color: #ffc896;
  text-decoration: underline;
}

.layout-centered .page-title.auth-title {
  margin-top: 0;
  margin-bottom: 1rem;
  text-align: center;
}

.auth-panel {
  width: 100%;
}

.auth-brand {
  margin: 0 0 0.5rem;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--color-accent-soft);
}

.auth-card {
  width: 100%;
}

.layout.layout-auth {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 90% 60% at 50% -15%, rgba(238, 96, 15, 0.18), transparent 55%),
    radial-gradient(ellipse 55% 45% at 100% 100%, rgba(255, 140, 66, 0.1), transparent 50%),
    var(--color-bg);
}

.layout.layout-auth .layout-body {
  margin-left: 0;
  width: 100%;
  max-width: 100%;
}

.layout.layout-auth .site-footer-thin {
  padding-left: 1rem;
  padding-right: 1rem;
}

.layout.layout-auth .main {
  margin: 0;
  width: 100%;
  max-width: none;
  flex: 1 1 auto;
  height: auto;
  max-height: none;
  padding: 1.5rem;
  padding-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.layout.layout-auth-complete .main {
  align-items: flex-start;
  justify-content: flex-start;
  padding-top: max(1rem, env(safe-area-inset-top, 0px));
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
}

.layout.layout-auth-complete .auth-page {
  align-items: flex-start;
  min-height: auto;
  padding-top: 0.25rem;
  padding-bottom: 0.75rem;
}

.auth-page {
  position: relative;
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(100%, 100vh);
  padding: 0.5rem 0;
}

.auth-page-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.55;
}

.auth-page-glow--left {
  width: min(45vw, 22rem);
  height: min(45vw, 22rem);
  left: -8%;
  top: 18%;
  background: rgba(238, 96, 15, 0.14);
}

.auth-page-glow--right {
  width: min(40vw, 18rem);
  height: min(40vw, 18rem);
  right: -6%;
  bottom: 12%;
  background: rgba(255, 140, 66, 0.1);
}

.auth-shell {
  width: min(100%, 26rem);
  max-width: 100%;
  animation: auth-shell-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
  position: relative;
  z-index: 1;
}

.auth-shell--register {
  width: min(100%, 27rem);
}

.auth-shell--complete {
  width: min(100%, 36rem);
}

.auth-shell--legal {
  width: min(100%, 40rem);
}

.error-page-body {
  margin: 0;
  min-height: 100vh;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: var(--color-bg);
  color: #e8eaed;
}

.error-page {
  width: min(100%, 22rem);
  text-align: center;
}

.error-page-brand {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
}

.error-page-brand-mc {
  color: var(--color-accent-soft, #5b8def);
}

.error-page-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
}

.error-page-message {
  margin: 0.65rem 0 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted, #94a3b8);
}

.error-page-back {
  margin-top: 1.25rem;
  padding: 0.55rem 1rem;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  border-radius: 0.5rem;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.error-page-back:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.auth-complete-title {
  margin: 0.75rem 0 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #e2e8f0;
}

.auth-complete-form {
  gap: 0.85rem;
}

.auth-complete-section {
  margin-top: 0.25rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(52, 78, 114, 0.35);
}

.auth-complete-section-title {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.04em;
}

.auth-complete-address-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.auth-field-required {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #ff9b5c;
  margin-left: 0.25rem;
}

.auth-field-readonly .auth-field-input {
  color: #94a3b8;
  cursor: not-allowed;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-field-input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.auth-complete-agreements {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.auth-agreement {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #cbd5e1;
}

.auth-agreement span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.auth-agreement input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.auth-remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.85rem 0 1.1rem;
  font-size: 0.8125rem;
  color: #cbd5e1;
  cursor: pointer;
  user-select: none;
}

.auth-remember input {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  accent-color: var(--color-primary, #f97316);
}

.auth-shell-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.auth-shell-submit:disabled:hover {
  transform: none;
  box-shadow: none;
}

.legal-body {
  color: #94a3b8;
  font-size: 0.875rem;
  line-height: 1.65;
}

.legal-body h2 {
  margin: 1.25rem 0 0.5rem;
  font-size: 0.9375rem;
  color: #e2e8f0;
}

.legal-body p {
  margin: 0 0 0.75rem;
}

@media (max-width: 640px) {
  .layout.layout-auth .main {
    padding-left: max(0.85rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.85rem, env(safe-area-inset-right, 0px));
  }

  .auth-shell-card {
    padding: 1.35rem 1rem 1.2rem;
    border-radius: 14px;
  }

  .auth-shell--complete,
  .auth-shell--register,
  .auth-shell {
    width: 100%;
  }

  .auth-complete-address-grid {
    grid-template-columns: 1fr;
  }

  .auth-complete-form {
    gap: 0.75rem;
  }

  .auth-shell-submit {
    scroll-margin-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  }

  .layout.layout-auth .site-footer-thin {
    padding-left: max(0.85rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.85rem, env(safe-area-inset-right, 0px));
  }

  .site-footer-thin-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer-thin-links {
    margin-left: 0;
    justify-content: flex-start;
  }
}

.auth-shell-card {
  position: relative;
  overflow: hidden;
  padding: 2.1rem 1.85rem 1.55rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(165deg, rgba(22, 44, 74, 0.55) 0%, rgba(11, 26, 47, 0.92) 48%, rgba(8, 20, 38, 0.98) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 28px 56px rgba(0, 0, 0, 0.42),
    0 0 72px rgba(238, 96, 15, 0.07);
  backdrop-filter: blur(12px);
}

.auth-shell-accent {
  position: absolute;
  top: 0;
  left: 1.5rem;
  right: 1.5rem;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--color-accent) 35%,
    var(--color-accent-hover) 65%,
    transparent 100%
  );
  opacity: 0.9;
}

.auth-shell-head {
  margin: 0 0 1.5rem;
  text-align: center;
}

.auth-shell-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin-top: 1.25rem;
  padding: 0.28rem;
  border-radius: 12px;
  background: rgba(5, 12, 24, 0.55);
  box-shadow: 0 0 0 1px rgba(52, 78, 114, 0.35) inset;
}

.auth-shell-tab {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 9px;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #8fa3bc;
  text-decoration: none;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.auth-shell-tab:hover:not(.is-active) {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
}

.auth-shell-tab.is-active {
  color: var(--color-accent-on);
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
  box-shadow: 0 2px 12px rgba(238, 96, 15, 0.32);
}

.auth-shell-logo {
  margin: 0;
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #f8fafc;
  text-shadow: 0 0 28px rgba(255, 140, 66, 0.35);
}

.auth-shell-error {
  margin: 0 0 1rem;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.32);
  color: #fecaca;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.auth-shell-notice {
  margin: 0 0 1rem;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.28);
  color: #a7f3d0;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.auth-shell-notice-main,
.auth-shell-notice-sub {
  margin: 0;
}

.auth-shell-notice-sub {
  margin-top: 0.45rem;
  color: #86efac;
  font-size: 0.75rem;
}

.auth-shell-lead {
  margin: 0 0 1rem;
  color: #8fa3bc;
  font-size: 0.8125rem;
  line-height: 1.55;
}

.auth-shell-meta {
  margin: -0.5rem 0 1rem;
  font-size: 0.8125rem;
  color: #64748b;
}

.auth-shell-forgot {
  margin: -0.15rem 0 0;
  text-align: right;
}

.auth-shell-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.auth-field {
  position: relative;
  display: block;
  animation: auth-field-in 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-shell-form .auth-field:first-of-type {
  animation-delay: 0.1s;
}

.auth-shell-form .auth-field:last-of-type {
  animation-delay: 0.16s;
}

.auth-shell--register .auth-shell-form .auth-field:nth-of-type(1) {
  animation-delay: 0.08s;
}

.auth-shell--register .auth-shell-form .auth-field:nth-of-type(2) {
  animation-delay: 0.14s;
}

.auth-shell--register .auth-shell-form .auth-field:nth-of-type(3) {
  animation-delay: 0.2s;
}

.auth-shell--register .auth-shell-submit {
  animation-delay: 0.28s;
}

.auth-field-input {
  width: 100%;
  max-width: 100%;
  padding: 1.25rem 0.95rem 0.5rem;
  border: none;
  border-radius: 12px;
  background: rgba(5, 12, 24, 0.72);
  box-shadow:
    0 0 0 1px rgba(52, 78, 114, 0.5) inset,
    0 1px 0 rgba(255, 255, 255, 0.03) inset,
    0 6px 18px rgba(0, 0, 0, 0.18);
  color: #f8fafc;
  font: inherit;
  font-size: 0.9375rem;
  line-height: 1.4;
  transition:
    background 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.18s ease;
}

.auth-field-input::placeholder {
  color: transparent;
}

.auth-field-input:-webkit-autofill,
.auth-field-input:-webkit-autofill:hover,
.auth-field-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f8fafc;
  caret-color: #f8fafc;
  transition: background-color 9999s ease-out 0s;
  box-shadow:
    0 0 0 1000px rgba(8, 18, 34, 0.96) inset,
    0 0 0 1px rgba(238, 96, 15, 0.35) inset;
}

.auth-field-label {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9375rem;
  font-weight: 500;
  color: #8fa3bc;
  pointer-events: none;
  transform-origin: left center;
  transition:
    top 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    font-size 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.2s ease,
    letter-spacing 0.2s ease;
}

.auth-field-input:focus + .auth-field-label,
.auth-field-input:not(:placeholder-shown) + .auth-field-label {
  top: 0.62rem;
  transform: translateY(0) scale(1);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-soft);
}

.auth-field-input:focus-visible {
  outline: none;
  background: rgba(7, 16, 30, 0.96);
  box-shadow:
    0 0 0 1px rgba(238, 96, 15, 0.5) inset,
    0 0 0 3px rgba(238, 96, 15, 0.12),
    0 8px 24px rgba(0, 0, 0, 0.28);
}

.auth-field-accent {
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--color-accent) 35%,
    var(--color-accent-hover) 65%,
    transparent 100%
  );
  opacity: 0;
  transform: scaleX(0.35);
  transition:
    opacity 0.28s ease,
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.auth-field-input:focus ~ .auth-field-accent {
  opacity: 1;
  transform: scaleX(1);
}

.auth-shell-submit {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.78rem 1rem;
  border: none;
  border-radius: 12px;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-accent-on);
  cursor: pointer;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
  box-shadow:
    0 4px 22px rgba(238, 96, 15, 0.38),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  transition:
    transform 0.18s ease,
    box-shadow 0.22s ease,
    filter 0.2s ease;
  animation: auth-field-in 0.48s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}

.auth-shell-submit::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 42%,
    rgba(255, 255, 255, 0.14) 50%,
    transparent 58%
  );
  transform: translateX(-120%);
  transition: transform 0.55s ease;
}

.auth-shell-submit:hover {
  filter: brightness(1.05);
  box-shadow:
    0 6px 26px rgba(238, 96, 15, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.auth-shell-submit:hover::after {
  transform: translateX(120%);
}

.auth-shell-submit:active {
  transform: scale(0.985);
}

.auth-shell-foot {
  margin: 1.35rem 0 0;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(52, 78, 114, 0.4);
  text-align: center;
}

.auth-shell-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #8fa3bc;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.18s ease;
}

.auth-shell-link::after {
  content: "→";
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.auth-shell-link:hover {
  color: var(--color-accent-light);
}

.auth-shell-link:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.auth-oauth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.1rem 0 0.85rem;
  color: #64748b;
  font-size: 0.75rem;
}

.auth-oauth-divider::before,
.auth-oauth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(52, 78, 114, 0.55);
}

.auth-discord-login {
  margin-bottom: 0.25rem;
}

.btn-discord {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  border: 1px solid #4752c4;
  background: linear-gradient(135deg, #5865f2 0%, #4752c4 100%);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.18s ease, transform 0.15s ease;
}

.btn-discord:hover {
  filter: brightness(1.06);
  color: #fff;
}

.btn-block {
  width: 100%;
  box-sizing: border-box;
}

.admin-discord-uri code {
  word-break: break-all;
}

@keyframes auth-shell-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes auth-field-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wizard {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  animation: ui-fade-up 0.44s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

.wizard-head {
  border-bottom: 1px solid #1e3554;
  padding-bottom: 1.25rem;
}

.wizard-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ff7618;
}

.wizard-title {
  margin-bottom: 1rem;
}

.wizard-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #8b95a1;
  transition: color 0.25s ease, font-weight 0.15s ease;
}

.wizard-step.is-done {
  color: #94f396;
}

.wizard-step.is-current {
  color: #f1f5f9;
  font-weight: 600;
}

.wizard-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  background: #1a3558;
  border: 1px solid #284a72;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s ease;
}

.wizard-step.is-current .wizard-step-num {
  background: #ee600f;
  border-color: #ff7618;
  color: #0b1a2f;
  transform: scale(1.06);
  box-shadow: 0 0 0 2px #ee600f33;
}

.wizard-step.is-done .wizard-step-num {
  background: #14532d;
  border-color: #166534;
  color: #bbf7d0;
}

.wizard-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wizard-panel-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.wizard-lead {
  margin: 0;
  max-width: 52rem;
  color: #b8c0c9;
}

.wizard-toolbar {
  margin-bottom: 0.25rem;
}

.text-link {
  color: var(--color-accent-soft);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.18s ease, opacity 0.18s ease;
}

.text-link:hover {
  color: var(--color-accent-light);
  text-decoration: underline;
}

.chip {
  display: inline-block;
  margin: 0;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.chip-info {
  background: rgba(238, 96, 15, 0.18);
  color: #ffc896;
  border: 1px solid #2563eb44;
}

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

.plan-card-wrap {
  margin: 0;
}

.plan-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  width: 100%;
  height: 100%;
  text-align: left;
  padding: 1.25rem 1.35rem;
  border-radius: 12px;
  border: 1px solid #1e3554;
  background: linear-gradient(160deg, #163256 0%, #0d1f38 100%);
  color: inherit;
  cursor: pointer;
  font: inherit;
  transition:
    border-color 0.2s ease,
    transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.2s ease,
    background 0.25s ease;
}

.plan-card:hover {
  border-color: #ff7618;
  box-shadow: 0 0 0 1px #ee600f55;
  transform: translateY(-2px);
}

.plan-card:active {
  transform: translateY(0) scale(0.99);
}

.plan-card:focus-visible {
  outline: 2px solid #ff7618;
  outline-offset: 2px;
}

.plan-card-badge {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--color-accent-soft);
}

.plan-card-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: #f8fafc;
}

.plan-card-pitch {
  font-size: 0.9375rem;
  color: #b8c0c9;
  line-height: 1.55;
}

.plan-card-foot {
  margin-top: auto;
  padding-top: 0.5rem;
  font-size: 0.75rem;
  color: #8b95a1;
  line-height: 1.45;
}

.plan-other-services {
  display: inline-block;
  text-align: right;
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  color: #3b4f6b;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color 0.2s ease;
}
.plan-other-services:hover {
  color: #5b7a9e;
}

/* ── 残高ギフト ── */

.gift-amount-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.5rem;
}

.gift-amount-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem 0.5rem;
  border: 1px solid #1e3554;
  border-radius: 10px;
  background: #0e1c30;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-align: center;
}

.gift-amount-card input { display: none; }

.gift-amount-card:has(input:checked) {
  border-color: #ff7618;
  background: #1a2a40;
}

.gift-amount-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: #f1f5f9;
}

.gift-amount-fee {
  font-size: 0.75rem;
}

/* ── 花吹雪（支払いページ） ── */

.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.confetti-petal {
  position: absolute;
  top: -10px;
  left: calc(var(--x) * 1%);
  width: 8px;
  height: 10px;
  background: var(--c, #ff7618);
  border-radius: 50% 0 50% 0;
  opacity: 0;
  animation: confetti-fall var(--d) linear infinite;
  animation-delay: calc(var(--i) * 0.4s);
  transform: rotate(var(--r));
}

@keyframes confetti-fall {
  0% {
    opacity: 0;
    transform: translateY(-10px) rotate(var(--r)) scale(0.8);
  }
  5% {
    opacity: 0.35;
  }
  90% {
    opacity: 0.2;
  }
  100% {
    opacity: 0;
    transform: translateY(100vh) rotate(calc(var(--r) + 360deg)) scale(0.4);
  }
}

.gift-method-row {
  display: flex;
  gap: 0.75rem;
}

.gift-method-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem;
  border: 1px solid #1e3554;
  border-radius: 10px;
  background: #0e1c30;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.gift-method-card input { display: none; }

.gift-method-card:has(input:checked) {
  border-color: #ff7618;
  background: #1a2a40;
}

.gift-method-name {
  font-weight: 600;
  color: #e2e8f0;
}

.gift-method-desc {
  font-size: 0.8125rem;
  color: #64748b;
}

.gift-summary {
  margin: 1rem 0;
}

.gift-summary p {
  margin: 0.25rem 0;
}

.gift-paypal-card .paypal-button-container {
  max-width: 300px;
  margin: 0 auto;
}

.gift-link-box {
  margin: 1.25rem 0 0.75rem;
  padding: 1rem;
  background: #0a1625;
  border: 1px dashed #1e3554;
  border-radius: 8px;
}

.gift-link-label {
  font-size: 0.8125rem;
  color: #64748b;
  margin: 0 0 0.5rem;
}

.gift-link-copy-row {
  display: flex;
  gap: 0.5rem;
}

.gift-link-input {
  flex: 1;
  font-family: monospace;
  font-size: 0.8125rem;
  background: #060e18;
  color: #94a3b8;
  border-color: #1a2a3e;
}

.revenue-chart {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 120px;
  padding-top: 0.5rem;
}

.revenue-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.revenue-bar {
  width: 100%;
  max-width: 20px;
  background: linear-gradient(to top, #ee600f, #ff7618);
  border-radius: 2px 2px 0 0;
  min-height: 2px;
  transition: height 0.3s ease;
}

.revenue-bar-label {
  font-size: 0.625rem;
  color: #4a5568;
  margin-top: 4px;
  white-space: nowrap;
}

.tier-slider-shell {
  margin-top: 0.5rem;
  padding: 1.35rem 1.5rem 1.5rem;
  border-radius: 12px;
  border: 1px solid #1e3554;
  background: #122a4a;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tier-slider-readout {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid #1e3554;
}

.tier-slider-planline {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.4;
  color: var(--color-accent-soft);
}

.tier-slider-readout-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.65rem 1rem;
}

.tier-slider-gb {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #f8fafc;
  line-height: 1;
}

.tier-slider-meta {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #94a3b8;
}

.tier-slider-price-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.55rem;
  margin: 0;
  line-height: 1.12;
}

.tier-slider-price-prefix {
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  font-weight: 700;
  color: #94a3b8;
}

.tier-slider-price-num {
  font-size: clamp(2.15rem, 5.2vw, 3.35rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #f8fafc;
}

.tier-slider-price-suffix {
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  font-weight: 700;
  color: var(--color-accent-soft);
}

.tier-slider-control {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.tier-slider-rail {
  width: 100%;
  padding: 0.9rem 1rem 0.75rem;
  border-radius: 10px;
  border: 1px solid #223c5c;
  background: #0d1f38;
}

.tier-slider-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.tier-slider-range {
  width: 100%;
  height: 2rem;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.tier-slider-range:focus {
  outline: none;
}

.tier-slider-range:focus-visible {
  outline: 2px solid #ff7618;
  outline-offset: 4px;
  border-radius: 6px;
}

.tier-slider-range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: #284a72;
}

.tier-slider-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -7px;
  border-radius: 50%;
  background: #e2e8f0;
  border: 2px solid #ee600f;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.tier-slider-range:active::-webkit-slider-thumb {
  transform: scale(1.08);
  box-shadow: 0 2px 10px rgba(238, 96, 15, 0.35);
}

.tier-slider-range::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: #284a72;
}

.tier-slider-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 2px solid #ee600f;
  border-radius: 50%;
  background: #e2e8f0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.tier-slider-range:active::-moz-range-thumb {
  transform: scale(1.08);
  box-shadow: 0 2px 10px rgba(238, 96, 15, 0.35);
}

.tier-slider-ticks {
  position: relative;
  margin-top: 0.35rem;
  min-height: 1.15rem;
}

.tier-slider-tick {
  position: absolute;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: 600;
  color: #64748b;
  line-height: 1.2;
  white-space: nowrap;
}

.tier-slider-tick--solo {
  left: 50%;
  transform: translateX(-50%);
}

.tier-slider-form {
  margin: 0;
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.storage-backup-wrap {
  margin-top: 1.35rem;
  max-width: 42rem;
}

.stack-card-wrap {
  margin: 0;
}

.stack-card {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 1.1rem 1.15rem;
  border-radius: 12px;
  border: 1px solid #1e3554;
  background: #102846;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  min-height: 6.5rem;
  transition:
    border-color 0.18s ease,
    box-shadow 0.2s ease,
    transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.2s ease;
}

.stack-card:hover {
  border-color: #64748b;
  box-shadow: 0 8px 24px #00000033;
  transform: translateY(-2px);
}

.stack-card:active {
  transform: translateY(0) scale(0.99);
}

.stack-card:focus-visible {
  outline: 2px solid #ff7618;
  outline-offset: 2px;
}

.stack-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
}

.stack-blurb {
  font-size: 0.875rem;
  color: #9aa5b1;
  line-height: 1.45;
}

.soft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.65rem;
}

.soft-card-wrap {
  margin: 0;
}

.soft-card {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid #223c5c;
  background: #0d1f38;
  color: #e8eaed;
  font: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.16s ease,
    box-shadow 0.18s ease;
}

.soft-version-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-align: left;
}

.soft-version-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
}

.soft-card-submit {
  align-self: stretch;
}

.soft-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.setup-step-detail {
  font-size: 0.8125rem;
  max-width: 28rem;
  word-break: break-all;
}

.admin-setup-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-setup-overview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.admin-setup-count {
  flex-shrink: 0;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(52, 78, 114, 0.35);
  color: #94a3b8;
  font-size: 0.8125rem;
  font-weight: 600;
}

.admin-setup-index-table .admin-setup-target {
  font-size: 0.8125rem;
  color: #94a3b8;
}

.admin-setup-index-action {
  text-align: right;
  white-space: nowrap;
}

.admin-setup-toggle-form {
  margin: 0;
}

.admin-setup-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.admin-setup-toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.admin-setup-toggle-track {
  position: relative;
  width: 2.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: #334155;
  transition: background 0.18s ease;
  flex-shrink: 0;
}

.admin-setup-toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  background: #e2e8f0;
  transition: transform 0.18s ease;
}

.admin-setup-toggle-input:checked + .admin-setup-toggle-track {
  background: #22c55e;
}

.admin-setup-toggle-input:checked + .admin-setup-toggle-track::after {
  transform: translateX(1rem);
}

.admin-setup-toggle-input:focus-visible + .admin-setup-toggle-track {
  outline: 2px solid #ff7618;
  outline-offset: 2px;
}

.admin-setup-toggle-text {
  font-size: 0.8125rem;
  color: #94a3b8;
  min-width: 2rem;
}

.admin-setup-toggle-input:checked ~ .admin-setup-toggle-text {
  color: #86efac;
}

.admin-setup-panel {
  padding: 0;
  overflow: hidden;
}

.admin-setup-panel > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid transparent;
  transition: background 0.15s ease;
}

.admin-setup-panel > summary::-webkit-details-marker {
  display: none;
}

.admin-setup-panel > summary::after {
  content: "▾";
  color: #64748b;
  font-size: 0.875rem;
  transition: transform 0.15s ease;
}

.admin-setup-panel[open] > summary {
  border-bottom-color: rgba(52, 78, 114, 0.45);
  background: rgba(8, 20, 38, 0.35);
}

.admin-setup-panel[open] > summary::after {
  transform: rotate(180deg);
}

.admin-setup-panel-summary:hover {
  background: rgba(255, 255, 255, 0.02);
}

.admin-setup-panel-title {
  font-size: 1rem;
  font-weight: 600;
  color: #e2e8f0;
}

.admin-setup-panel-meta,
.admin-setup-panel-hint {
  font-size: 0.8125rem;
}

.admin-setup-panel-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: #94a3b8;
}

.admin-setup-panel-body {
  padding: 1rem 1.15rem 1.15rem;
}

.admin-setup-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.admin-setup-section-title {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #cbd5e1;
}

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

.admin-setup-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.admin-setup-delete-form {
  margin-top: 0.5rem;
}

.admin-setup-step-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.admin-setup-step-item {
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(52, 78, 114, 0.45);
  background: rgba(8, 20, 38, 0.45);
}

.admin-setup-step-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-setup-step-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  border-radius: 6px;
  background: rgba(255, 118, 24, 0.15);
  color: #ff9b5c;
  font-size: 0.75rem;
  font-weight: 700;
}

.admin-setup-step-type {
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: rgba(52, 78, 114, 0.55);
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 600;
}

.admin-setup-step-label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.875rem;
}

.admin-setup-step-delete {
  margin-left: auto;
}

.admin-setup-step-detail {
  margin-top: 0.45rem;
  font-size: 0.8125rem;
  color: #94a3b8;
  word-break: break-all;
}

.admin-setup-step-detail code {
  font-size: 0.75rem;
}

.admin-setup-step-add {
  margin-top: 0.5rem;
  border-top: 1px solid rgba(52, 78, 114, 0.35);
  padding-top: 0.75rem;
}

.admin-setup-step-add > summary {
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  color: #94a3b8;
  list-style: none;
}

.admin-setup-step-add > summary::-webkit-details-marker {
  display: none;
}

.admin-setup-step-form {
  margin-top: 0.75rem;
}

@media (max-width: 960px) {
  .admin-setup-profile-grid {
    grid-template-columns: 1fr;
  }

  .admin-setup-panel-meta {
    display: none;
  }
}

@media (max-width: 640px) {
  .admin-setup-form-grid {
    grid-template-columns: 1fr;
  }

  .admin-setup-form-grid .field-span-2 {
    grid-column: auto;
  }
}

.soft-card:hover {
  border-color: #ee600f;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.soft-card:active {
  transform: translateY(0) scale(0.99);
}

.soft-card.is-selected {
  border-color: #22c55e;
  background: #14231a;
  color: #bbf7d0;
}

.soft-card:focus-visible {
  outline: 2px solid #ff7618;
  outline-offset: 2px;
}

.summary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1.25rem;
}

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

.summary-card {
  padding: 1.35rem 1.5rem;
}

.summary-side {
  padding: 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.summary-side {
  margin: 0;
  display: grid;
  gap: 0.85rem 1rem;
}

.payment-card {
  border-color: rgba(238, 96, 15, 0.18);
  background: linear-gradient(160deg, rgba(238, 96, 15, 0.12), #122a4a);
}

.payment-card-lead {
  margin: 0;
}

.payment-card-total {
  padding: 1rem 1.1rem;
  border-radius: 10px;
  border: 1px solid #1e3554;
  background: #0a1829;
}

.payment-card-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 0.35rem;
}

.payment-card-price {
  margin: 0;
}

.payment-card-price .live-price-num {
  font-size: 1.75rem;
}

.payment-card-meta {
  margin: 0;
}

.payment-card-back {
  justify-self: center;
  font-size: 0.875rem;
}

.summary-dl > div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.5rem 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #1e3554;
}

.summary-dl > div:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.summary-dl dt {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #8b95a1;
}

.summary-dl dd {
  margin: 0;
  font-size: 0.9375rem;
  color: #f1f5f9;
}

.summary-dl-compact > div {
  grid-template-columns: 7.5rem 1fr;
  padding-bottom: 0.55rem;
}

.card-draft {
  margin-bottom: 1.25rem;
  border-color: rgba(238, 96, 15, 0.18);
  background: linear-gradient(145deg, rgba(238, 96, 15, 0.1), #122a4a);
}

.draft-intro {
  margin: 0 0 1rem;
}

.field-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 0.35rem;
}

.field-input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #284a72;
  background: #0a1829;
  color: #f1f5f9;
  font: inherit;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field-input:focus-visible {
  outline: 2px solid #ee600f;
  outline-offset: 0;
  border-color: #ee600f;
}

.btn-block {
  width: 100%;
}

.btn-secondary {
  background: #1a3558;
  color: #e2e8f0;
  border-color: #284a72;
}

.btn-secondary:hover {
  background: #204066;
}

.login-cta-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.login-cta-form .field {
  margin: 0;
}

.login-error {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 0.875rem;
}

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

.admin-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.admin-card-wide {
  grid-column: 1 / -1;
}

.admin-access-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.35rem 1.25rem;
}

.admin-stat {
  margin: 0;
}

.admin-service-details {
  display: inline-block;
  position: relative;
}

.admin-service-details summary {
  list-style: none;
  cursor: pointer;
}

.admin-service-details summary::-webkit-details-marker {
  display: none;
}

.admin-service-details-body {
  position: absolute;
  right: 0;
  z-index: 20;
  min-width: 18rem;
  margin-top: 0.35rem;
  padding: 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #0f172a;
  box-shadow: 0 12px 32px rgba(2, 6, 23, 0.45);
}

.admin-ports-panel {
  min-width: 22rem;
  max-width: 30rem;
}

.admin-ports-block {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.admin-ports-block:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.admin-ports-subtitle {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.admin-inline-form-stack {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

.admin-inline-form-stack:last-child {
  margin-bottom: 0;
}

.admin-inline-form-row {
  display: grid;
  gap: 0.25rem;
}

.admin-inline-check {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.4;
}

.admin-inline-check input {
  margin-top: 0.15rem;
}

.admin-spec-panel .admin-ports-block + form {
  margin-top: 0.35rem;
}

.admin-ports-sync-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.admin-ports-sync-actions .admin-inline-form-stack {
  margin-bottom: 0;
}

  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.field-input-sm {
  min-height: 2rem;
  padding: 0.35rem 0.55rem;
  font-size: 0.8125rem;
}

.admin-badge {
  margin: 0;
  font-size: 0.875rem;
  color: #94a3b8;
}

.admin-form-compact {
  margin-top: 0.5rem;
}

.admin-catalog-inline-form {
  margin: 0;
}

.admin-catalog-inline-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.admin-catalog-inline-grid .field-input-sm {
  min-width: 8rem;
  flex: 1 1 8rem;
}

.admin-inline-role {
  min-width: 7rem;
}

.field-input-sm {
  padding: 0.35rem 0.5rem;
  font-size: 0.8125rem;
}

.admin-pool-card {
  margin-top: 1rem;
}

.admin-node-form {
  margin-bottom: 0.5rem;
}

.admin-node-title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
}

.admin-node-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.admin-node-delete {
  margin: -0.25rem 0 1rem;
}

.admin-node-divider {
  border: none;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  margin: 1.25rem 0;
}

.section-subtitle {
  margin: 1.25rem 0 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
}

.table-actions-wrap {
  flex-wrap: wrap;
  max-width: 18rem;
}

.admin-users-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-users-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: 0.75rem 1rem;
  margin: 0;
}

.admin-users-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.admin-users-stat-label {
  font-size: 0.75rem;
  color: #94a3b8;
}

.admin-users-stat-value {
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.2;
}

.admin-users-create-summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.admin-users-create-summary::-webkit-details-marker {
  display: none;
}

.admin-users-create-form {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.admin-users-list-head {
  margin-bottom: 0.25rem;
}

.admin-users-toolbar {
  margin-bottom: 0.85rem;
}

.admin-users-toolbar .field-input[type="search"] {
  min-width: 14rem;
  flex: 1 1 14rem;
}

.admin-users-table-wrap {
  max-height: min(70vh, 720px);
  overflow: auto;
}

.admin-users-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #0f172a;
  box-shadow: 0 1px 0 rgba(148, 163, 184, 0.18);
}

.admin-users-identity {
  min-width: 12rem;
}

.admin-users-name {
  display: block;
}

.admin-users-email {
  display: block;
  font-size: 0.8125rem;
  margin-top: 0.15rem;
  word-break: break-all;
}

.admin-users-discord {
  font-size: 0.8125rem;
}

.admin-users-row-disabled {
  opacity: 0.72;
}

.admin-users-row-disabled .admin-users-name {
  font-weight: 500;
}

.cell-numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cell-nowrap {
  white-space: nowrap;
  font-size: 0.8125rem;
}

.admin-users-empty {
  margin-top: 0.75rem;
}

.admin-user-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.admin-user-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.admin-user-ops-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
}

.admin-user-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cell-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8125rem;
}

.data-table-wide th,
.data-table-wide td {
  white-space: nowrap;
}

.admin-inventory-grid {
  margin-top: 0.75rem;
}

.instance-title-wrap {
  margin-bottom: 1.25rem;
  max-width: 100%;
}

.instance-title-text {
  display: inline-block;
  position: relative;
  margin: 0;
  padding-right: 1.6rem;
  padding-bottom: 0.2rem;
  max-width: 100%;
}

.instance-title-text [data-instance-title-text] {
  word-break: break-word;
}

.instance-title-edit-btn {
  position: absolute;
  right: 0;
  bottom: 0.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--color-text-muted, #8b9cb3);
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.instance-title-edit-btn:hover,
.instance-title-edit-btn:focus-visible {
  opacity: 1;
  color: var(--color-text, #e8eef7);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.instance-title-input {
  display: none;
  width: min(100%, 36rem);
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
}

.instance-title-wrap.is-editing .instance-title-text {
  display: none;
}

.instance-title-wrap.is-editing .instance-title-input {
  display: block;
}

.instance-title-wrap.is-saving .instance-title-input {
  opacity: 0.7;
}

.mcs-inventory-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.mcs-inventory-mount .mcs-inventory-loading {
  padding: 0.5rem 0;
}

.admin-stat-card {
  padding: 0.25rem 0;
}

.admin-inventory-node-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  margin-bottom: 0.85rem;
  font-size: 0.875rem;
  color: #cbd5e1;
}

.admin-inventory-node-stats strong {
  color: #f8fafc;
  font-weight: 600;
}

.admin-inventory-sep {
  color: #305070;
}

.mcs-instance-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.mcs-instance-toolbar .field-input[type="search"] {
  min-width: 12rem;
  flex: 1 1 12rem;
}

.mcs-instance-count {
  font-size: 0.8125rem;
  margin-left: auto;
}

.mcs-instance-bulk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.55rem;
  margin-bottom: 0.75rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  border: 1px solid #284a72;
  background: #0d1f38;
}

.mcs-instance-bulk[hidden] {
  display: none !important;
}

.mcs-instance-bulk-count {
  font-size: 0.8125rem;
  color: #cbd5e1;
  margin-right: 0.35rem;
}

.mcs-instance-check-col {
  width: 2.35rem;
  text-align: center;
}

.mcs-instance-check-col input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--color-accent);
  cursor: pointer;
}

.mcs-instance-table .mcs-instance-name-link,
.mcs-instance-table .mcs-instance-name-text {
  font-weight: 600;
}

.mcs-instance-table .mcs-instance-name-text {
  color: #f8fafc;
}

.mcs-sortable {
  cursor: pointer;
  user-select: none;
}

.mcs-sortable.is-sorted-asc::after {
  content: " ▲";
  font-size: 0.7em;
  opacity: 0.7;
}

.mcs-sortable.is-sorted-desc::after {
  content: " ▼";
  font-size: 0.7em;
  opacity: 0.7;
}

.mcs-section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 1.25rem;
  padding: 0.35rem;
  border-radius: 10px;
  background: rgba(15, 30, 52, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.mcs-section-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.mcs-section-tab:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.05);
}

.mcs-section-tab.is-active {
  color: #f8fafc;
  background: rgba(56, 189, 248, 0.18);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.35);
}

.mcs-inventory-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.mcs-summary-grid {
  margin-top: 0.5rem;
}

.mcs-summary-card {
  min-height: 100%;
}

.mcs-stat-running {
  color: #4ade80;
  font-weight: 600;
}

.mcs-node-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
}

.mcs-node-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f8fafc;
  font: inherit;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.mcs-node-toggle:hover {
  color: #e2e8f0;
}

.mcs-node-toggle-icon {
  display: inline-block;
  width: 1rem;
  font-size: 0.75rem;
  color: #94a3b8;
}

.mcs-node-panel-url {
  margin: -0.35rem 0 0.65rem;
}

.mcs-node-body[hidden] {
  display: none !important;
}

.mcs-node-loading {
  padding: 0.5rem 0;
}

.mcs-node-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.mcs-resource-bars {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.mcs-resource-bar-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.8125rem;
  color: #94a3b8;
}

.mcs-resource-bar-track {
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
  overflow: hidden;
}

.mcs-resource-bar-track-sm {
  height: 0.35rem;
  margin-top: 0.25rem;
}

.mcs-resource-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #0ea5e9);
  transition: width 0.25s ease;
}

.mcs-resource-bar-fill-cpu {
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.mcs-resource-bar-fill-mem {
  background: linear-gradient(90deg, #34d399, #10b981);
}

.mcs-resource-bar-fill-storage {
  background: linear-gradient(90deg, #a78bfa, #8b5cf6);
}

.mcs-mem-limit {
  font-size: 0.8125rem;
}

.mcs-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  white-space: nowrap;
}

.mcs-uuid-cell {
  max-width: 5.5rem;
}

.mcs-capacity-cell span {
  font-size: 0.8125rem;
}

.mcs-host-resource-cell {
  font-size: 0.8125rem;
  line-height: 1.45;
  white-space: nowrap;
}

.mcs-node-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.mcs-node-card {
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(10, 22, 40, 0.55);
}

.mcs-node-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.mcs-node-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.mcs-node-card-actions,
.mcs-node-delete-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.mcs-node-delete-form {
  margin-top: 0;
  padding: 0 0 0.25rem;
}

.mcs-node-add-details {
  margin-top: 0.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  padding-top: 0.85rem;
}

.mcs-node-add-summary {
  cursor: pointer;
  font-weight: 600;
  color: #cbd5e1;
  list-style: none;
}

.mcs-node-add-summary::-webkit-details-marker {
  display: none;
}

.mcs-node-add-summary::before {
  content: "+ ";
  color: var(--color-accent-light, #7dd3fc);
}

.mcs-node-add-details[open] .mcs-node-add-summary::before {
  content: "− ";
}

.mcs-node-add-form {
  margin-top: 0.85rem;
}

.mcs-pool-head {
  margin-bottom: 0.75rem;
}

.mcs-instance-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: -0.75rem 0 1.25rem;
}

.mcs-instance-meta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.mcs-uuid-full {
  word-break: break-all;
}

.mcs-pool-card-free-loan {
  border-color: rgba(52, 211, 153, 0.35);
  background: linear-gradient(180deg, rgba(16, 45, 38, 0.45), rgba(10, 22, 40, 0.35));
}

.page-lead {
  margin: -0.35rem 0 1.25rem;
}

.page-build .wizard {
  animation: none;
  opacity: 1;
  transform: none;
}

.page-build .wizard-head {
  animation: build-wizard-head-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.page-build .wizard-panel {
  animation: build-wizard-panel-in 0.46s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both;
}

@keyframes build-wizard-head-in {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes build-wizard-panel-in {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ui-fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ui-slide-in-left {
  from {
    opacity: 0;
    transform: translateX(-14px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes ui-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.page-lead {
  margin: -0.25rem 0 1rem;
}

.page-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 1.25rem;
  padding: 0.25rem;
  border-radius: 10px;
  background: #0b1c33;
  border: 1px solid #1e3554;
}

.page-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.18s ease, color 0.18s ease;
}

.page-tab:hover {
  color: #e2e8f0;
  background: #163256;
}

.page-tab.is-active {
  color: #f8fafc;
  background: #1a3558;
  box-shadow: inset 0 0 0 1px #284a72;
}

.form-message {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.875rem;
}

.form-message-ok {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
}

.form-message-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.billing-note {
  margin-bottom: 1rem;
}

.billing-page {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.billing-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.billing-hero-title {
  margin: 0;
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.billing-hero-lead {
  margin: 0.35rem 0 0;
  color: #94a3b8;
  font-size: 0.9375rem;
}

.billing-hero-balance {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: linear-gradient(145deg, rgba(238, 96, 15, 0.14), rgba(18, 38, 66, 0.9));
  min-width: 9rem;
}

.billing-hero-balance-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.billing-hero-balance-value {
  font-size: 1.375rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.2;
}

.billing-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.billing-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-surface);
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.billing-tab:hover {
  color: #e2e8f0;
  border-color: var(--color-border-strong);
  background: var(--color-bg-surface-2);
}

.billing-tab.is-active {
  color: var(--color-accent-on);
  border-color: var(--color-accent);
  background: linear-gradient(180deg, var(--color-accent-hover), var(--color-accent));
  box-shadow: 0 8px 24px rgba(238, 96, 15, 0.22);
}

.billing-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: rgba(11, 26, 47, 0.2);
  font-size: 0.6875rem;
  font-weight: 700;
}

.billing-tab.is-active .billing-tab-badge {
  background: rgba(11, 26, 47, 0.28);
  color: var(--color-accent-on);
}

.billing-tab-badge-warn {
  background: rgba(245, 158, 11, 0.22);
  color: #fcd34d;
}

.billing-tab.is-active .billing-tab-badge-warn {
  background: rgba(11, 26, 47, 0.35);
  color: #fef3c7;
}

.billing-flash {
  margin: 0;
}

.billing-wallet-layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.billing-wallet-aside {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: sticky;
  top: 0;
}

.billing-balance-card {
  padding: 1.25rem;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(238, 96, 15, 0.18), transparent 55%),
    linear-gradient(180deg, var(--color-bg-surface-2), var(--color-bg-surface));
}

.billing-balance-eyebrow {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #94a3b8;
}

.billing-balance-amount {
  margin: 0.35rem 0 0;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #f8fafc;
  line-height: 1.1;
}

.billing-balance-hint {
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  color: #94a3b8;
  line-height: 1.45;
}

.billing-stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.billing-stat-row div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.billing-stat-row dt {
  margin: 0;
  font-size: 0.75rem;
  color: #94a3b8;
}

.billing-stat-row dd {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #e2e8f0;
}

.billing-stat-warn {
  color: #fcd34d !important;
}

.billing-panel {
  border-radius: 14px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-surface);
  padding: 1.15rem 1.25rem;
}

.billing-panel-compact {
  padding: 0.95rem 1rem;
}

.billing-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.billing-panel-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
}

.billing-panel-desc {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: #94a3b8;
}

.billing-subsection-title {
  margin: 1.25rem 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #cbd5e1;
}

.billing-method-badge {
  flex: 0 0 auto;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(238, 96, 15, 0.16);
  border: 1px solid rgba(238, 96, 15, 0.35);
  color: var(--color-accent-soft);
  font-size: 0.6875rem;
  font-weight: 700;
  white-space: nowrap;
}

.billing-method-badge-muted {
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.22);
  color: #94a3b8;
}

.billing-wallet-main {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.billing-coupon-panel {
  border-color: rgba(34, 197, 94, 0.28);
  box-shadow: inset 0 1px 0 rgba(134, 239, 172, 0.06);
}

.billing-coupon-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.billing-coupon-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.billing-coupon-input {
  flex: 1 1 12rem;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.billing-coupon-hint {
  margin: 0;
  font-size: 0.8125rem;
}

.admin-coupon-table-wrap {
  margin-top: 1rem;
}

.admin-coupon-empty {
  margin-top: 1rem;
}

.billing-topup-panel-featured {
  border-color: rgba(238, 96, 15, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 190, 130, 0.08);
}

.billing-amount-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.billing-amount-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-surface-2);
  color: #e2e8f0;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.billing-amount-chip:hover {
  border-color: var(--color-border-strong);
  background: var(--color-bg-hover);
}

.billing-amount-chip.is-selected {
  border-color: var(--color-accent);
  background: rgba(238, 96, 15, 0.14);
  color: var(--color-accent-light);
}

.billing-amount-custom {
  margin-top: 0.85rem;
}

.billing-amount-custom-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.billing-amount-input {
  width: min(100%, 11rem);
}

.billing-amount-suffix {
  color: #94a3b8;
  font-size: 0.875rem;
  font-weight: 600;
}

.billing-paypal-button-wrap {
  max-width: 22rem;
  min-height: 2.75rem;
}

/* PayPalボタン下のラベル文字を視認可能に */
.billing-paypal-button-wrap [class*="paypal-button-label"],
.billing-donate-panel [class*="paypal-button-label"],
#donate-paypal-button-wrap [class*="paypal-button-label"],
#donate-paypal-button-wrap .paypal-button-text {
  color: var(--color-text-muted) !important;
}

.billing-inline-error {
  margin: 0;
}

.billing-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
}

.billing-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.billing-toggle-track {
  position: relative;
  flex: 0 0 2.5rem;
  width: 2.5rem;
  height: 1.4rem;
  margin-top: 0.1rem;
  border-radius: 999px;
  background: #334155;
  transition: background 0.18s ease;
}

.billing-toggle-track::after {
  content: "";
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: #f8fafc;
  transition: transform 0.18s ease;
}

.billing-toggle input:checked + .billing-toggle-track {
  background: var(--color-accent);
}

.billing-toggle input:checked + .billing-toggle-track::after {
  transform: translateX(1.1rem);
}

.billing-toggle-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.billing-toggle-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #e2e8f0;
}

.billing-toggle-desc {
  font-size: 0.8125rem;
  color: #94a3b8;
  line-height: 1.4;
}

.billing-side-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 0.95rem;
  border-radius: 10px;
  border: 1px dashed var(--color-border);
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.billing-side-link:hover {
  border-color: var(--color-border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: #f8fafc;
}

.billing-side-link-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fcd34d;
}

.billing-details {
  border: none;
}

.billing-details-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  list-style: none;
  cursor: pointer;
}

.billing-details-summary::-webkit-details-marker {
  display: none;
}

.billing-details-chevron {
  flex: 0 0 auto;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.billing-details[open] .billing-details-chevron {
  transform: rotate(-135deg) translateY(-2px);
}

.billing-details-body {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.billing-request-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.billing-request-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: var(--color-bg-surface-2);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.billing-request-amount {
  display: block;
  font-weight: 700;
  color: #f8fafc;
}

.billing-request-meta,
.billing-request-date {
  display: block;
  font-size: 0.8125rem;
  color: #94a3b8;
}

.billing-request-status {
  display: inline-flex;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #cbd5e1;
}

.billing-services-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.billing-service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.85rem;
}

.billing-service-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: linear-gradient(180deg, var(--color-bg-surface-2), var(--color-bg-surface));
}

.billing-service-card.is-due {
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.12);
}

.billing-service-card.is-canceling {
  opacity: 0.92;
}

.billing-service-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.billing-service-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.billing-service-plan {
  margin: 0.2rem 0 0;
  font-size: 0.8125rem;
  color: #94a3b8;
}

.billing-service-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0;
}

.billing-service-metrics div {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.billing-service-metrics dt {
  margin: 0;
  font-size: 0.6875rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.billing-service-metrics dd {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #e2e8f0;
}

.billing-service-price {
  color: var(--color-accent-soft) !important;
}

.billing-service-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.billing-service-cancel {
  margin-left: auto;
}

.billing-service-note {
  margin: 0;
  font-size: 0.8125rem;
  color: #94a3b8;
}

.billing-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  padding: 2.5rem 1rem;
  border-radius: 12px;
  border: 1px dashed var(--color-border);
  background: rgba(11, 26, 47, 0.35);
}

.billing-empty-compact {
  padding: 1.75rem 1rem;
}

.billing-empty-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #e2e8f0;
}

.billing-empty-desc {
  margin: 0 0 0.5rem;
  max-width: 28rem;
  font-size: 0.875rem;
  color: #94a3b8;
}

.billing-history-balance {
  flex: 0 0 auto;
  font-size: 0.875rem;
  font-weight: 600;
  color: #cbd5e1;
}

.billing-tx-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.billing-tx-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem 0.95rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: var(--color-bg-surface-2);
}

.billing-tx-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 800;
}

.billing-tx-icon-in {
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
}

.billing-tx-icon-out {
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
}

.billing-tx-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #e2e8f0;
}

.billing-tx-note {
  margin: 0.15rem 0 0;
  font-size: 0.8125rem;
  color: #94a3b8;
}

.billing-tx-side {
  text-align: right;
}

.billing-tx-amount {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
}

.billing-tx-meta {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: #94a3b8;
  white-space: nowrap;
}

.billing-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

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

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th,
.data-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid #1e3554;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: #94a3b8;
  font-weight: 600;
  white-space: nowrap;
}

.data-table td a:not(.btn) {
  color: #f1f5f9;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease;
}

.data-table td a:not(.btn):visited {
  color: #f1f5f9;
}

.data-table td a:not(.btn):hover,
.data-table td a:not(.btn):focus-visible {
  color: #cbd5e1;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.amount-positive {
  color: #86efac;
}

.amount-negative {
  color: #fca5a5;
}

.tx-row-cancelled td {
  opacity: 0.55;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-ok {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}

.status-warn {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
}

.wallet-balance-card {
  margin-bottom: 1rem;
}

.wallet-balance-label {
  margin: 0;
  color: #94a3b8;
  font-size: 0.875rem;
}

.wallet-balance-amount {
  margin: 0.25rem 0 0.75rem;
  font-size: 2rem;
  font-weight: 700;
  color: #f8fafc;
}

.topup-presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.5rem;
}

.topup-preset-btn {
  width: 100%;
}

.topup-custom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

.topup-custom .field {
  flex: 1 1 180px;
  margin: 0;
}

.service-list {
  display: grid;
  gap: 0.85rem;
}

.service-card {
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid #1e3554;
  background: #0b1c33;
}

.service-card-due {
  border-color: rgba(245, 158, 11, 0.45);
}

.service-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.service-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.service-renew-form {
  margin: 0;
}

.billing-services-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.billing-services-head .section-title {
  margin: 0;
}

.service-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.service-card-actions-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.service-cancel-btn {
  margin-left: auto;
}

.service-cancel-block {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.service-cancel-hint {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
}

.service-cancel-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

.service-cancel-form {
  margin: 0;
}

.service-card-compact {
  padding: 0.85rem 1rem;
}

.service-card-meta {
  margin: 0;
  font-size: 0.875rem;
}

.dashboard-billing-link {
  margin: 0.85rem 0 0;
}

.dashboard-server-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.dashboard-server-header .section-title {
  margin-bottom: 0;
}

.dashboard-column-selector {
  position: relative;
}
.dashboard-column-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  z-index: 50;
  background: #162c4a;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  min-width: 200px;
  box-shadow: 0 4px 16px #000;
}
.dashboard-column-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text);
  white-space: nowrap;
}
.dashboard-column-option:hover {
  background: var(--bg-surface);
}
.dashboard-column-option input {
  accent-color: var(--accent);
}

.account-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* 概要バー */
.account-summary-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.account-summary-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.account-summary-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  color: var(--color-accent, #EE600F);
  display: flex;
  align-items: center;
}

.account-summary-item > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.account-summary-label {
  font-size: 0.75rem;
  color: var(--color-muted);
  line-height: 1.2;
}

.account-summary-value {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.3;
}

/* プロフィールヘッダー */
.account-profile-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.account-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
  user-select: none;
}

.account-avatar-img {
  object-fit: cover;
  background: var(--color-border-light, #eee);
}

.account-profile-name {
  font-size: 1.1rem;
  display: block;
}

.account-profile-email {
  font-size: 0.85rem;
  color: var(--color-muted);
  display: block;
}

/* 設定行 */
.account-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--color-border-light, #eee);
}

.account-setting-row:first-of-type {
  border-top: none;
  padding-top: 0;
}

.account-setting-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.account-setting-info strong {
  font-size: 0.95rem;
}

.account-setting-info .muted {
  font-size: 0.82rem;
}

.account-setting-action {
  flex-shrink: 0;
}

/* トグルスイッチ */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 24px;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--color-accent, #EE600F);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

@media (min-width: 900px) {
  .page-account .account-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .page-account .account-layout > .card:last-child {
    grid-column: 1 / -1;
  }

  .page-account .summary-dl > div {
    grid-template-columns: 9.5rem minmax(0, 1fr);
  }

  .account-summary-bar {
    grid-template-columns: repeat(4, 1fr);
  }
}

.dashboard-server-table td.dashboard-server-name {
  height: 100%;
}
.dashboard-server-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
  min-height: 2.5rem;
}
.dashboard-server-name .text-link,
.dashboard-server-name .status-badge {
  flex-shrink: 0;
  white-space: nowrap;
}

.dashboard-server-owner {
  flex-basis: 100%;
  font-size: 0.78rem;
  line-height: 1.35;
}

.dashboard-server-table {
  table-layout: auto;
  width: 100%;
}
.dashboard-server-table th,
.dashboard-server-table td {
  white-space: nowrap;
  padding-left: 10px;
  padding-right: 10px;
  vertical-align: middle;
}
.dashboard-server-table th:last-child,
.dashboard-server-table td:last-child {
  width: 1%;
  text-align: right;
  padding-right: 12px;
}

.dashboard-server-table .host-display {
  word-break: break-all;
}

.dashboard-server-actions {
  min-width: 0;
}

.dashboard-power-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.dashboard-power-actions form {
  margin: 0;
}

.dashboard-power-actions .btn-sm {
  min-width: 3.25rem;
  padding: 0.3rem 0.5rem;
  font-size: 0.75rem;
}

.maintenance-banner {
  margin: 0 0 1rem;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fcd34d;
  font-size: 0.875rem;
}

.admin-view-banner {
  margin: 0 0 1rem;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #93c5fd;
  font-size: 0.875rem;
}

.server-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.server-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.server-page-header {
  margin-bottom: 0.25rem;
}

.server-page-header .page-back {
  margin-bottom: 0.65rem;
}

.server-page-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.server-page-title {
  margin: 0 0 0.35rem;
}

.server-page-meta {
  margin: 0;
  font-size: 0.9375rem;
}

.server-page-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.server-status-chip {
  white-space: nowrap;
}

.server-connection-card {
  border-color: #1e4d3a;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(11, 26, 47, 0.6));
}

.server-connection-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.server-connection-label {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6ee7b7;
}

.server-connection-value {
  display: block;
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 1.375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: #ecfdf5;
  word-break: break-all;
}

.server-connection-hint {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
}

.server-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  gap: 1rem;
  align-items: start;
}

.server-layout-main,
.server-layout-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.server-side-note {
  margin: 0 0 0.85rem;
  font-size: 0.875rem;
  line-height: 1.55;
}

.server-subdomain-block + .server-subdomain-block {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

.server-subdomain-label {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
}

.server-subdomain-value {
  display: block;
  margin: 0 0 0.5rem;
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 1.0625rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  line-height: 1.45;
  color: #e2e8f0;
  word-break: break-all;
}

.server-subdomain-form {
  margin-top: 0.75rem;
}

.server-subdomain-input-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.server-page-sub {
  margin: -0.5rem 0 1.25rem;
}

.server-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem 1.5rem;
}

.server-panel-link {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

.server-panel-link-hint {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
}

.server-ports-hint {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  line-height: 1.55;
}

.server-port-sync-form {
  margin: 0 0 1rem;
}

.server-port-edit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
  gap: 0.5rem 0.75rem;
  width: 100%;
  margin-top: 0.5rem;
}

.server-port-edit-grid .field-actions {
  display: flex;
  align-items: flex-end;
}

.server-port-primary-form,
.server-port-edit-form {
  flex: 1 1 100%;
  min-width: min(100%, 28rem);
}

.server-port-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.server-port-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  padding: 0.75rem 0.85rem;
  border-radius: 8px;
  background: rgba(11, 26, 47, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.server-port-item-main {
  border-color: rgba(52, 211, 153, 0.25);
  background: rgba(16, 185, 129, 0.06);
}

.server-port-item-body {
  min-width: 0;
  flex: 1 1 12rem;
}

.server-port-item-title {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #94a3b8;
}

.server-port-item-addr {
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  line-height: 1.45;
  color: #e2e8f0;
  word-break: break-all;
}

.host-display {
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  line-height: 1.45;
  word-break: break-all;
}

.server-port-internal-hint {
  display: block;
  font-size: 0.8rem;
  margin-top: 0.15rem;
}

.server-port-item-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.server-port-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.12);
}

.server-port-delete-form {
  margin: 0;
}

.server-ports-list .server-port-row dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.server-ports-empty {
  margin: 0 0 1rem;
  font-size: 0.875rem;
}

.server-port-add-form {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

.server-contract-details {
  padding: 0;
  overflow: hidden;
}

.server-contract-summary {
  padding: 1rem 1.15rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.server-contract-summary::-webkit-details-marker {
  display: none;
}

.server-contract-summary::after {
  content: "▼";
  float: right;
  font-size: 0.7rem;
  color: #64748b;
  transition: transform 0.15s ease;
}

.server-contract-details[open] .server-contract-summary::after {
  transform: rotate(180deg);
}

.server-contract-dl {
  padding: 0 1.15rem 1rem;
}

.server-tab-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.server-member-add-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.server-member-suggest {
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
  border-radius: 10px;
  background: rgba(10, 24, 42, 0.58);
  padding: 0.4rem;
}

.server-member-suggest[hidden] {
  display: none !important;
}

.server-member-suggest-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.server-member-suggest-item {
  width: 100%;
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 8px;
  background: rgba(15, 35, 60, 0.58);
  color: #e2e8f0;
  padding: 0.45rem 0.55rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.server-member-suggest-item:hover {
  background: rgba(30, 58, 90, 0.72);
  border-color: rgba(59, 130, 246, 0.38);
}

.server-member-suggest-email {
  font-size: 0.86rem;
  font-weight: 600;
  word-break: break-all;
}

.server-member-suggest-name {
  font-size: 0.78rem;
}

.server-tab-stack {
  max-width: none;
  width: 100%;
}

.server-contract-card .server-contract-dl {
  padding: 0;
}

.server-contract-billing-link {
  margin: 0.75rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

/* 契約タブ グリッドレイアウト */
.server-contract-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.server-contract-grid > .card {
  margin: 0;
}

.server-contract-info,
.server-contract-payment {
  grid-column: span 1;
}

.server-upgrade-card {
  position: relative;
}
.server-upgrade-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 1.5rem;
  opacity: 0.3;
}

.server-maintenance-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

@media (max-width: 700px) {
  .server-contract-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 900px) {
  .server-upgrade-card {
    grid-column: span 1;
  }
  .server-maintenance-card {
    grid-column: 1 / -1;
  }
}

.server-firewall-form {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.server-fw-panel {
  max-width: none;
  width: 100%;
}

.server-fw-panel.server-fw-panel--advanced {
  max-width: none;
}

.server-fw-port-select-hidden {
  display: none !important;
}

.server-fw-lead {
  margin: 0 0 0.25rem;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.server-fw-ui-mode {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.server-fw-ui-mode-tabs {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.2rem;
  border-radius: 10px;
  border: 1px solid #1e3554;
  background: rgba(11, 28, 51, 0.45);
  gap: 0.2rem;
}

.server-fw-ui-mode-tab {
  appearance: none;
  border: none;
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #94a3b8;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.server-fw-ui-mode-tab:hover:not(:disabled) {
  color: #e2e8f0;
}

.server-fw-ui-mode-tab.is-active {
  color: #f8fafc;
  background: rgba(59, 130, 246, 0.22);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.35);
}

.server-fw-ui-mode-tab:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.server-fw-ui-mode-hint {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.server-fw-step {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.server-fw-step[hidden],
.server-fw-status[hidden],
.server-firewall-rules[hidden] {
  display: none !important;
}

.server-fw-form--simple .server-fw-step-label {
  display: none;
}

.server-fw-form--simple .server-fw-advanced-body {
  display: none !important;
}

.server-fw-form--advanced .server-fw-simple-body {
  display: none !important;
}

.server-fw-form--advanced .server-fw-step-label {
  display: block;
}

.server-fw-advanced-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.server-fw-advanced-section-head {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.server-fw-advanced-section-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
}

.server-fw-advanced-section-desc {
  margin: 0;
  font-size: 0.8125rem;
}

.server-fw-port-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
  gap: 0.65rem;
}

.server-fw-port-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid #1e3554;
  border-radius: 10px;
  background: rgba(8, 20, 36, 0.65);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.server-fw-port-card:hover {
  border-color: #33557d;
  background: rgba(14, 32, 56, 0.85);
}

.server-fw-port-card.is-active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.4);
}

.server-fw-port-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
}

.server-fw-port-card-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #f1f5f9;
}

.server-fw-port-card-proto {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

.server-fw-port-card-endpoint {
  font-size: 0.8125rem;
  color: #cbd5e1;
  word-break: break-all;
}

.server-fw-port-card-port {
  font-size: 0.75rem;
}

.server-fw-port-card-status {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
}

.server-fw-port-card-status.is-open {
  color: #86efac;
}

.server-fw-port-card-status.is-whitelist {
  color: #fcd34d;
}

.server-fw-port-card-status.is-blacklist {
  color: #f87171;
}

.server-fw-advanced-editor {
  margin-top: 0.15rem;
}

.server-fw-advanced-target {
  padding: 1rem 1.05rem;
  border-radius: 10px;
  border: 1px solid #284a72;
  background: linear-gradient(180deg, rgba(14, 32, 56, 0.9), rgba(8, 20, 36, 0.95));
}

.server-fw-advanced-target-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.server-fw-advanced-target-label {
  font-size: 1rem;
  font-weight: 600;
  color: #f8fafc;
}

.server-fw-advanced-target-endpoint {
  display: block;
  font-size: 0.875rem;
  color: #93c5fd;
  margin-bottom: 0.75rem;
  word-break: break-all;
}

.server-fw-advanced-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem 1rem;
  margin: 0;
}

.server-fw-advanced-meta div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.server-fw-advanced-meta dt {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.server-fw-advanced-meta dd {
  margin: 0;
  font-size: 0.8125rem;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.server-fw-form--advanced .server-fw-editor {
  padding: 1rem 1.05rem;
  border: 1px solid #1e3554;
  border-radius: 10px;
  background: rgba(11, 28, 51, 0.35);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.server-fw-form--advanced .server-fw-mode-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.server-fw-form--advanced .server-fw-mode-card {
  padding: 0.7rem 0.75rem;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
}

.server-fw-form--advanced .server-fw-mode-card input {
  margin-top: 0;
}

.server-fw-form--advanced .server-fw-mode-card-desc {
  font-size: 0.75rem;
  line-height: 1.4;
}

.server-fw-form--advanced .server-firewall-rule-row {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  background: rgba(8, 20, 36, 0.55);
}

.server-fw-form--advanced .server-fw-cidr-help {
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: rgba(8, 20, 36, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 720px) {
  .server-fw-form--advanced .server-fw-mode-cards {
    grid-template-columns: 1fr;
  }

  .server-fw-advanced-meta {
    grid-template-columns: 1fr;
  }
}

.server-fw-step-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.server-fw-step-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.server-fw-status {
  padding: 0.9rem 1rem;
  border-radius: 10px;
  border: 1px solid #1e3554;
  background: rgba(11, 28, 51, 0.55);
}

.server-fw-status-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}

.server-fw-status-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #cbd5e1;
}

.server-fw-status-desc {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
}

.server-fw-status-rules {
  margin: 0.65rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.8125rem;
  color: #94a3b8;
}

.server-fw-mode-cards {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.server-fw-mode-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid #1e3554;
  border-radius: 10px;
  background: rgba(11, 28, 51, 0.35);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.server-fw-mode-card:hover {
  border-color: #284a72;
  background: rgba(22, 50, 86, 0.45);
}

.server-fw-mode-card:has(input:checked) {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.08);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.35);
}

.server-fw-mode-card input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.server-fw-mode-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.server-fw-mode-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #f1f5f9;
}

.server-fw-mode-card-desc {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #94a3b8;
}

.server-firewall-rules {
  margin-top: 0;
}

.server-fw-cidr-help {
  margin: 0;
  font-size: 0.8125rem;
}

.server-fw-cidr-help code {
  font-size: 0.8125rem;
}

.server-firewall-rule-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.server-firewall-rule-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
  gap: 0.65rem 0.75rem;
  align-items: end;
  padding: 0.85rem;
  border: 1px solid #1e3554;
  border-radius: 10px;
  background: rgba(11, 28, 51, 0.45);
}

.server-firewall-rule-row .field {
  margin: 0;
}

.server-firewall-rule-remove {
  align-self: end;
  margin-bottom: 0.1rem;
}

.server-firewall-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 640px) {
  .server-firewall-rule-row {
    grid-template-columns: 1fr;
  }

  .server-firewall-rule-remove {
    justify-self: start;
  }
}

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

.server-toast-stack,
.app-toast-stack {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1200;
  display: flex;
  flex-direction: column-reverse;
  gap: 0.65rem;
  max-width: min(22rem, calc(100vw - 2rem));
  pointer-events: none;
}

.server-toast,
.app-toast {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  pointer-events: auto;
  margin: 0;
  padding: 0.8rem 1rem 0.95rem;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.45;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.42);
  opacity: 0;
  transform: translateX(1.5rem) scale(0.92);
}

.server-toast.is-visible,
.app-toast.is-visible {
  animation: app-toast-in 0.58s cubic-bezier(0.22, 1.25, 0.36, 1) forwards;
}

.server-toast.is-leaving,
.app-toast.is-leaving {
  animation: app-toast-out 0.38s cubic-bezier(0.4, 0, 0.9, 0.6) forwards;
}

.server-toast-icon,
.app-toast-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  background: rgba(255, 255, 255, 0.2);
  transform: scale(0.4);
  opacity: 0;
}

.server-toast.is-visible .server-toast-icon,
.app-toast.is-visible .app-toast-icon {
  animation: app-toast-icon-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.12s forwards;
}

.server-toast-text,
.app-toast-text {
  flex: 1 1 auto;
  padding-top: 0.05rem;
}

.server-toast-progress,
.app-toast-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  transform-origin: left center;
  background: rgba(255, 255, 255, 0.55);
  opacity: 0.85;
}

.server-toast.is-visible .server-toast-progress,
.app-toast.is-visible .app-toast-progress {
  animation: app-toast-progress 4.5s linear forwards;
}

.server-toast.is-ok,
.app-toast.is-ok {
  background: rgba(16, 185, 129, 0.96);
  border: 1px solid rgba(52, 211, 153, 0.65);
  color: #ecfdf5;
}

.server-toast.is-error,
.app-toast.is-error {
  background: rgba(185, 28, 28, 0.96);
  border: 1px solid rgba(248, 113, 113, 0.65);
  color: #fef2f2;
}

@keyframes app-toast-in {
  0% {
    opacity: 0;
    transform: translateX(1.75rem) scale(0.9);
  }
  65% {
    opacity: 1;
    transform: translateX(-0.2rem) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes app-toast-out {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(1.25rem) scale(0.92);
  }
}

@keyframes app-toast-icon-pop {
  0% {
    opacity: 0;
    transform: scale(0.35) rotate(-18deg);
  }
  70% {
    opacity: 1;
    transform: scale(1.12) rotate(4deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

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

.btn.btn-action {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.18s cubic-bezier(0.34, 1.4, 0.64, 1),
    box-shadow 0.22s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.btn.btn-action.is-pressed:not(:disabled) {
  transform: scale(0.96);
}

.btn.btn-action.is-loading {
  color: transparent !important;
  pointer-events: none;
}

.btn.btn-action.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1rem;
  height: 1rem;
  margin: -0.5rem 0 0 -0.5rem;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  color: inherit;
  opacity: 0.9;
  animation: server-btn-spin 0.65s linear infinite;
}

.btn.btn-primary.btn-action.is-loading::after {
  color: #fff;
}

.btn.btn-secondary.btn-action.is-loading::after,
.btn.btn-danger.btn-action.is-loading::after {
  color: #e2e8f0;
}

.btn.btn-action.is-success {
  animation: server-btn-success 0.72s ease;
}

.btn.btn-action.is-error {
  animation: server-btn-shake 0.5s ease;
}

.btn.btn-action.is-spinning {
  animation: server-btn-spin 0.65s linear;
}

.server-power-card.is-pending {
  animation: server-card-pulse 1.35s ease-in-out infinite;
}

.server-power-hint.is-busy {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.server-power-hint.is-busy::before {
  content: "";
  flex: 0 0 auto;
  width: 0.85rem;
  height: 0.85rem;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  opacity: 0.75;
  animation: server-btn-spin 0.7s linear infinite;
}

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

@keyframes server-btn-success {
  0% {
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55);
  }
  45% {
    box-shadow: 0 0 0 8px rgba(52, 211, 153, 0);
    transform: scale(1.03);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0);
    transform: scale(1);
  }
}

@keyframes server-btn-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-4px);
  }
  40% {
    transform: translateX(4px);
  }
  60% {
    transform: translateX(-3px);
  }
  80% {
    transform: translateX(3px);
  }
}

@keyframes server-card-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 140, 66, 0);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.18);
  }
}

.server-management {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.server-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.server-section-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.server-section-head .section-title {
  margin: 0;
}

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

.server-metric-card {
  padding: 0.9rem 1rem;
  border-radius: 10px;
  background: rgba(11, 26, 47, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.server-metric-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.server-metric-label {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #94a3b8;
}

.server-metric-value {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #f8fafc;
  text-align: right;
}

.server-metric-value-sm {
  font-size: 0.9rem;
  word-break: break-all;
}

.server-metric-bar {
  height: 5px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
  overflow: hidden;
  margin-bottom: 0.4rem;
}

.server-metric-bar > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff7618, #ff8c42);
  transition: width 0.35s ease;
}

.server-metric-card:nth-child(3) .server-metric-bar > span {
  background: linear-gradient(90deg, #34d399, #6ee7b7);
}

.server-metric-sub {
  margin: 0;
  font-size: 0.75rem;
}

.server-runtime-updated {
  font-size: 0.75rem;
  white-space: nowrap;
}

.server-runtime-error {
  margin: 0.75rem 0 0;
  color: #fca5a5;
  font-size: 0.875rem;
}

.server-chart-card {
  margin-top: 0.75rem;
}

.server-chart-card .section-title {
  margin: 0 0 0.5rem;
}

.server-chart-wrap {
  position: relative;
  width: 100%;
  height: 180px;
}

.server-chart-hint {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  text-align: right;
}

.server-console-card {
  display: flex;
  flex-direction: column;
  min-height: min(58vh, 680px);
}

.server-console-card .section-title {
  margin: 0;
}

.server-console-output {
  margin: 0;
  padding: 1rem 1.1rem;
  flex: 1 1 auto;
  min-height: min(48vh, 520px);
  height: min(48vh, 520px);
  max-height: min(72vh, 760px);
  overflow: auto;
  border-radius: 10px;
  background: #070d18;
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  tab-size: 2;
}

.server-power-card .server-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.server-power-card .server-actions form {
  margin: 0;
}

.server-power-hint {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
}

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

  .server-metrics-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .server-connection-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .server-connection-inner .btn {
    width: 100%;
  }
}

.btn-danger {
  background: rgba(220, 38, 38, 0.2);
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
}

.btn-danger:hover:not(:disabled) {
  background: rgba(220, 38, 38, 0.35);
  border-color: #f87171;
  color: #fff;
}

.server-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.server-power-card .server-actions {
  flex-direction: column;
  flex-wrap: nowrap;
}

.page-back {
  margin: 0 0 0.5rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}

.section-subtitle {
  margin: 1rem 0 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.btn-sm {
  padding: 0.3rem 0.55rem;
  font-size: 0.8125rem;
}

.inline-form {
  display: inline;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.status-error {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

.purchase-form {
  display: grid;
  gap: 0.85rem;
}

.purchase-payment {
  display: grid;
  gap: 0.85rem;
}

.paypal-purchase-block {
  display: grid;
  gap: 0.5rem;
  position: relative;
}

.paypal-purchase-hint {
  margin: 0;
  font-size: 0.8125rem;
}

.paypal-purchase-block--locked .paypal-button-wrap {
  pointer-events: none;
  opacity: 0.45;
  filter: grayscale(0.2);
}

.paypal-purchase-block:not(.paypal-purchase-block--locked) .paypal-purchase-hint {
  display: none;
}

.field-input.field-input-error {
  border-color: #f87171;
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.35);
}

.paypal-button-wrap {
  min-height: 2.75rem;
}

.payment-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #94a3b8;
  font-size: 0.8125rem;
}

.payment-divider::before,
.payment-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #1e3554;
}

.payment-insufficient {
  margin: 0;
  color: #fbbf24;
  font-size: 0.875rem;
  font-weight: 600;
}

.payment-insufficient.is-hidden {
  display: none;
}

.payment-capacity-warning {
  margin: 0;
  color: #fca5a5;
  font-size: 0.875rem;
  font-weight: 600;
}

.payment-capacity-warning.is-hidden {
  display: none;
}

.billing-topup-limit {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
}

.payment-charge-link {
  font-weight: 600;
}

.wallet-paypal-card .wallet-paypal-button-wrap {
  min-height: 2.75rem;
  max-width: 22rem;
}

.wallet-paypal-topup {
  display: grid;
  gap: 0.85rem;
}

.purchase-payment-error {
  margin: 0;
  color: #f87171;
  font-size: 0.875rem;
}

.purchase-balance-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .billing-wallet-layout {
    grid-template-columns: 1fr;
  }

  .billing-wallet-aside {
    position: static;
  }

  .billing-service-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .billing-service-metrics div:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .billing-form-grid {
    grid-template-columns: 1fr;
  }

  .field-span-2 {
    grid-column: auto;
  }

  .billing-hero-balance {
    width: 100%;
    align-items: flex-start;
  }

  .billing-services-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .billing-services-toolbar .btn {
    width: 100%;
  }

  .billing-tx-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .billing-tx-side {
    grid-column: 2;
    text-align: left;
  }

  .billing-service-cancel {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .main,
  .sidebar,
  .sidebar-category,
  .wizard,
  .live-price-wrap,
  .site-footer-thin,
  .page-build .wizard-head,
  .page-build .wizard-panel {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}

.mail-template-body {
  min-height: 12rem;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.mail-recipient-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mail-user-table {
  margin: 0.75rem 0 1rem;
}

.col-check {
  width: 2.5rem;
  text-align: center;
}

.admin-mail-layout,
.admin-paypal-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.4fr);
  gap: 1rem;
  align-items: start;
}

.admin-mail-status-card,
.admin-paypal-status-card {
  grid-column: 1 / -1;
}

.admin-paypal-sandbox-label {
  margin-top: 1.85rem;
}

.admin-mail-status-dl {
  margin-bottom: 0.75rem;
}

.admin-mail-test-form {
  margin-top: 0.5rem;
}

.admin-mail-test-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.admin-mail-test-row .field-input {
  flex: 1 1 auto;
  min-width: 0;
}

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

.admin-mail-smtp-form .checkbox-label {
  margin-bottom: 0.5rem;
}

.admin-mail-templates-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.admin-mail-template-table .mail-template-desc {
  margin: 0.2rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.mail-template-subject {
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-template-actions {
  white-space: nowrap;
  text-align: right;
}

.mail-template-actions .btn + .btn {
  margin-left: 0.35rem;
}

.admin-mail-edit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(240px, 0.8fr);
  gap: 1rem;
  align-items: start;
}

.admin-mail-edit-aside {
  position: sticky;
  top: 1rem;
}

.mail-placeholder-list code {
  font-size: 0.8125rem;
}

.admin-mail-bulk-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1rem;
  align-items: start;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.announcement-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.announcement-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.announcement-card-title {
  margin: 0;
}

.announcement-date {
  flex-shrink: 0;
  font-size: 0.875rem;
}

.announcement-body {
  white-space: pre-wrap;
  line-height: 1.7;
}

.announcement-admin-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.announcement-admin-item {
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
}

.announcement-admin-item:first-child {
  padding-top: 0;
  border-top: none;
}

.announcement-admin-form-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.announcement-admin-actions {
  margin-top: 0.5rem;
}

.page-subtabs {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  flex-wrap: wrap;
}

.page-subtab {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  color: inherit;
  text-decoration: none;
  font-size: 0.9rem;
}

.page-subtab.is-active {
  background: var(--accent, #5b8def);
  border-color: transparent;
  color: #fff;
}

.announcement-card-link .announcement-card-anchor {
  display: block;
  color: inherit;
  text-decoration: none;
}

.announcement-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.announcement-tag {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted, #9aa3b2);
}

.announcement-priority {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 0.35rem;
}

.announcement-priority-high {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.announcement-priority-urgent {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.announcement-excerpt {
  margin: 0.5rem 0 0;
  line-height: 1.6;
}

.announcement-read-more {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--accent, #5b8def);
}

.announcement-audience-badge {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(91, 141, 239, 0.15);
  color: #8eb4ff;
}

.markdown-body {
  line-height: 1.75;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  margin-top: 1.25em;
  margin-bottom: 0.5em;
}

.markdown-body pre {
  overflow-x: auto;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.25);
}

.markdown-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.markdown-body a {
  color: var(--accent, #5b8def);
}

.breadcrumb {
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}

.breadcrumb a {
  color: inherit;
}

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

.contact-choice-grid--single {
  grid-template-columns: minmax(0, 28rem);
}

.contact-choice-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 100%;
}

.contact-choice-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: grid;
  place-items: center;
}

.contact-choice-icon-discord {
  background: rgba(88, 101, 242, 0.15);
  color: #5865f2;
}

.contact-choice-icon-ticket {
  background: rgba(91, 141, 239, 0.15);
  color: #5b8def;
}

.contact-page-foot {
  margin-top: 2.5rem;
  padding-top: 1rem;
  text-align: center;
}

.contact-operator-link {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.18s ease, color 0.18s ease;
}

.contact-operator-link:hover {
  opacity: 1;
  color: var(--text);
  text-decoration: underline;
}

.contact-operator-back {
  margin: 1.25rem 0 0;
}

.contact-operator-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-operator-info {
  display: grid;
  gap: 0.65rem;
  margin: 0;
}

.contact-operator-info-row {
  display: grid;
  grid-template-columns: minmax(6rem, 8rem) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}

.contact-operator-info dt {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

.contact-operator-info dd {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.contact-operator-info a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.contact-legal-links {
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
}

.contact-legal-links-title {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.contact-legal-links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-legal-links-list a {
  font-size: 0.875rem;
  color: var(--accent);
  text-decoration: none;
}

.contact-legal-links-list a:hover {
  text-decoration: underline;
}

.page-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.layout-ticket-chat .main {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.5rem 1.25rem;
  max-width: min(960px, 100%);
  overflow: hidden;
  height: calc(100vh - var(--site-footer-height));
  max-height: calc(100vh - var(--site-footer-height));
}

.ticket-workspace {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 0.75rem;
  animation: ui-fade-up 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ticket-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  background: linear-gradient(145deg, rgba(22, 44, 74, 0.95), rgba(14, 32, 56, 0.88));
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
}

.ticket-header-start {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
}

.ticket-back-btn {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ticket-back-btn:hover {
  color: #f1f5f9;
  border-color: var(--color-border-strong);
  background: rgba(255, 255, 255, 0.08);
}

.ticket-header-info {
  min-width: 0;
}

.ticket-header-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.ticket-id-badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: rgba(238, 96, 15, 0.15);
  color: var(--color-accent-soft);
}

.ticket-header-title {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
}

.ticket-header-meta {
  margin: 0;
  font-size: 0.8rem;
  color: #94a3b8;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}

.ticket-meta-dot {
  opacity: 0.5;
}

.ticket-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.ticket-staff-status-form {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ticket-staff-select {
  min-width: 10rem;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-raised);
  color: #e2e8f0;
  font-size: 0.8rem;
}

.ticket-icon-btn {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.ticket-icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
}

.ticket-icon-btn-danger:hover {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
}

.ticket-toast {
  margin: 0;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  font-size: 0.875rem;
}

.ticket-toast-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.ticket-toast-ok {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
}

.ticket-chat-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(238, 96, 15, 0.08), transparent),
    linear-gradient(180deg, rgba(14, 32, 56, 0.6), rgba(11, 26, 47, 0.95));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 12px 40px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.ticket-chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  scroll-behavior: smooth;
}

.ticket-chat-empty {
  margin: auto;
  text-align: center;
  color: #64748b;
  padding: 2rem 1rem;
}

.ticket-chat-empty-icon {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: #475569;
}

.ticket-date-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.5rem 0;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.ticket-date-divider::before,
.ticket-date-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.25), transparent);
}

.ticket-date-divider span {
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.ticket-message {
  max-width: min(88%, 36rem);
  animation: ticket-message-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ticket-message.is-user {
  align-self: flex-end;
}

.ticket-message.is-staff {
  align-self: flex-start;
}

.ticket-message-row {
  display: flex;
  align-items: flex-end;
  gap: 0.55rem;
}

.ticket-message.is-user .ticket-message-row {
  flex-direction: row-reverse;
}

.ticket-avatar-wrap {
  flex-shrink: 0;
}

.ticket-avatar {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ticket-avatar-user {
  background: linear-gradient(135deg, rgba(91, 141, 239, 0.35), rgba(59, 130, 246, 0.2));
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.35);
}

.ticket-avatar-staff {
  background: linear-gradient(135deg, rgba(238, 96, 15, 0.35), rgba(234, 179, 8, 0.2));
  color: var(--color-accent-soft);
  border: 1px solid rgba(238, 96, 15, 0.35);
}

.ticket-message-stack {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ticket-message.is-user .ticket-message-stack {
  align-items: flex-end;
}

.ticket-message-top {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.72rem;
}

.ticket-message.is-user .ticket-message-top {
  flex-direction: row-reverse;
}

.ticket-message-name {
  font-weight: 600;
  color: #cbd5e1;
}

.ticket-message-time {
  color: #64748b;
}

.ticket-message-bubble {
  padding: 0.7rem 0.9rem;
  border-radius: 14px;
  line-height: 1.65;
  word-break: break-word;
  border: 1px solid transparent;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.ticket-message.is-user .ticket-message-bubble {
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.22), rgba(37, 99, 235, 0.14));
  border-color: rgba(96, 165, 250, 0.2);
  border-bottom-right-radius: 4px;
}

.ticket-message.is-staff .ticket-message-bubble {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.65));
  border-color: rgba(148, 163, 184, 0.12);
  border-bottom-left-radius: 4px;
}

.ticket-message-body a {
  color: #7dd3fc;
  word-break: break-all;
}

.ticket-message-attachment {
  display: block;
  margin-top: 0.55rem;
  text-decoration: none;
  color: inherit;
}

.ticket-message-attachment img {
  display: block;
  max-width: min(100%, 18rem);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ticket-attachment-file {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.8rem;
}

.ticket-message-footer {
  font-size: 0.68rem;
}

.ticket-read-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #86efac;
}

.ticket-composer-dock {
  flex-shrink: 0;
  padding: 0.85rem 1rem 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(8, 20, 36, 0.75);
  backdrop-filter: blur(10px);
}

.ticket-attach-preview {
  margin-bottom: 0.65rem;
  position: relative;
  display: inline-block;
}

.ticket-attach-preview img {
  max-height: 5rem;
  border-radius: 10px;
  border: 1px solid var(--color-border);
}

.ticket-attach-preview-clear {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  border: none;
  background: #ef4444;
  color: #fff;
  font-size: 0.75rem;
  cursor: pointer;
  line-height: 1;
}

.ticket-composer-shell {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.55rem 0.55rem 0.55rem 0.85rem;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  background: rgba(18, 38, 66, 0.9);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ticket-composer-shell:focus-within {
  border-color: rgba(238, 96, 15, 0.45);
  box-shadow: 0 0 0 3px rgba(238, 96, 15, 0.12);
}

.ticket-composer-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: #f1f5f9;
  font: inherit;
  line-height: 1.5;
  resize: none;
  max-height: 8rem;
  padding: 0.35rem 0;
}

.ticket-composer-input:focus {
  outline: none;
}

.ticket-composer-input::placeholder {
  color: #64748b;
}

.ticket-composer-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.ticket-composer-btn {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  color: #94a3b8;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.ticket-composer-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
}

.ticket-composer-send {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-hover));
  color: var(--color-accent-on);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 14px rgba(238, 96, 15, 0.35);
}

.ticket-composer-send:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(238, 96, 15, 0.45);
}

.ticket-composer-send:active {
  transform: translateY(0);
}

.ticket-composer-hint {
  margin: 0.45rem 0 0 0.25rem;
  font-size: 0.7rem;
}

.ticket-archived-bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(100, 116, 139, 0.1);
  color: #94a3b8;
  font-size: 0.85rem;
}

.ticket-page {
  animation: ui-fade-up 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ticket-page-narrow {
  max-width: 40rem;
}

.ticket-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.ticket-page-title {
  margin-bottom: 0.35rem;
}

.ticket-page-new {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.ticket-stats-row {
  display: flex;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.ticket-stat-card {
  flex: 1;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-surface);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ticket-stat-card-accent {
  border-color: rgba(238, 96, 15, 0.35);
  background: linear-gradient(145deg, rgba(238, 96, 15, 0.1), rgba(18, 38, 66, 0.9));
}

.ticket-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  color: #f1f5f9;
}

.ticket-stat-label {
  font-size: 0.75rem;
  color: #94a3b8;
}

.ticket-list-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-surface);
  color: inherit;
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  border-left-width: 3px;
  border-left-color: var(--color-border-strong);
}

.ticket-list-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-border-strong);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.ticket-list-card-ticket-status-staff {
  border-left-color: #facc15;
}

.ticket-list-card-ticket-status-user {
  border-left-color: #60a5fa;
}

.ticket-list-card-ticket-status-completed {
  border-left-color: #4ade80;
}

.ticket-list-card-ticket-status-closed {
  border-left-color: #94a3b8;
  opacity: 0.75;
}

.ticket-list-card-body {
  flex: 1;
  min-width: 0;
}

.ticket-list-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.ticket-list-subject {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticket-list-meta {
  margin: 0;
  font-size: 0.78rem;
}

.ticket-list-chevron {
  color: #475569;
  flex-shrink: 0;
  transition: transform 0.15s ease, color 0.15s ease;
}

.ticket-list-card:hover .ticket-list-chevron {
  color: var(--color-accent-soft);
  transform: translateX(3px);
}

.ticket-empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  border-radius: 16px;
  border: 1px dashed var(--color-border);
  background: rgba(18, 38, 66, 0.5);
}

.ticket-empty-icon {
  display: grid;
  place-items: center;
  width: 5rem;
  height: 5rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: rgba(238, 96, 15, 0.1);
  color: var(--color-accent-soft);
}

.ticket-empty-title {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.ticket-empty-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.ticket-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  text-decoration: none;
  font-size: 0.85rem;
}

.ticket-back-link:hover {
  color: #e2e8f0;
}

.ticket-create-header {
  margin-bottom: 1rem;
}

.ticket-create-card {
  padding: 1.25rem;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  background: linear-gradient(160deg, rgba(22, 44, 74, 0.6), rgba(14, 32, 56, 0.95));
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.ticket-create-textarea {
  min-height: 10rem;
  font-family: inherit;
}

@keyframes ticket-message-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ticket-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.ticket-status-user {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.ticket-status-staff {
  background: rgba(234, 179, 8, 0.18);
  color: #facc15;
}

.ticket-status-completed {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.ticket-status-closed {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}

.ticket-status-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  margin-right: 0.35rem;
  flex-shrink: 0;
}

.sidebar-tab-sub {
  font-size: 0.85rem;
  padding-left: 1.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-tab-badge {
  margin-left: 0.35rem;
  font-size: 0.7rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  padding: 0 4px;
  flex-shrink: 0;
}
.sidebar-badge--global {
  background: #fff;
  width: 8px;
  height: 8px;
  min-width: 8px;
  padding: 0;
}
.sidebar-badge--personal {
  background: var(--color-accent, #EE600F);
  color: #fff;
  min-width: 18px;
  padding: 0 5px;
}

.announcement-md-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
}

.announcement-row-title {
  font-weight: 500;
}
.announcement-row-tags {
  display: flex;
  gap: 4px;
  margin-top: 3px;
  flex-wrap: wrap;
}
.announcement-tag {
  background: rgba(255,255,255,.06);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  color: var(--text-muted);
}
.announcement-readers-panel {
  padding: 12px 16px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.announcement-readers-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.announcement-reader-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface2);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
}
.announcement-reader-name {
  color: var(--text);
}
.announcement-reader-time {
  color: var(--text-muted);
  font-size: 0.72rem;
}
.announcement-edit-panel {
  padding: 16px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
}
.announcement-admin-table .announcement-row {
  cursor: default;
}
.announcement-admin-table .announcement-row:hover {
  background: var(--bg-surface);
}

.dc-notify-grid {
  display: grid;
  gap: 0.75rem;
}

.dc-notify-test-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (max-width: 768px) {
  .contact-choice-grid {
    grid-template-columns: 1fr;
  }

  .contact-operator-info-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .layout-ticket-chat .main {
    padding: 0.75rem 0.85rem 1rem;
  }

  .ticket-header {
    flex-direction: column;
    padding: 0.85rem;
  }

  .ticket-header-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .ticket-message {
    max-width: 94%;
  }

  .ticket-page-header {
    flex-direction: column;
  }

  .ticket-page-new {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 960px) {
  .admin-mail-layout,
  .admin-mail-edit-layout,
  .admin-mail-bulk-layout {
    grid-template-columns: 1fr;
  }

  .admin-mail-edit-aside {
    position: static;
  }

  .mail-template-subject {
    max-width: 10rem;
  }
}

.status-badge.is-busy::after {
  content: "";
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-left: 0.35rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -0.05rem;
  animation: server-power-spin 0.8s linear infinite;
}

.server-maintenance-card.is-locked,
.server-power-card.is-locked {
  opacity: 0.72;
  pointer-events: none;
}

.server-maintenance-card .server-version-open {
  margin-top: 0.75rem;
}

.modal-dialog .server-version-change {
  margin-bottom: 1.25rem;
}

.modal-dialog .server-version-change .field + .field {
  margin-top: 0.75rem;
}

.server-downgrade-warn {
  margin: 0.5rem 0 0.75rem;
}

.form-message-warn {
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.35);
  color: #fde68a;
}

body.modal-open {
  overflow: hidden;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(2, 6, 23, 0.72);
}

.modal-overlay[hidden] {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.modal-dialog {
  width: min(100%, 28rem);
  padding: 1.5rem;
  border-radius: 12px;
  background: var(--surface-elevated, #111827);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.modal-title {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
}

.modal-body {
  margin: 0 0 1.25rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}


/* ── 詳細設定タブ ── */
.adv-category {
  border: 1px solid #1e3554;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  background: #080e1a;
}
.adv-category[open] { border-color: #2a4a7f; }
.adv-category-summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #c8d6e5;
  user-select: none;
  border-radius: 8px;
}
.adv-category-summary:hover { background: rgba(255,255,255,0.03); }
.adv-category-title { flex:1; }
.adv-category-count {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 400;
  margin-left: 0.75rem;
}
.adv-field {
  background: #060d18;
  border: 1px solid #16253b;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  transition: border-color 0.15s;
}
.adv-field:hover { border-color: #2a4a7f; }
.adv-field.field-disabled {
  opacity: 0.55;
  background: #040810;
}
.adv-field .field-label {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 0.2rem;
  display: block;
}
.adv-field .field-input {
  font-size: 0.85rem;
  padding: 0.3rem 0.5rem;
  background: #0a1424;
  border-color: #1a3050;
}
.adv-field .field-hint {
  font-size: 0.7rem;
  margin-top: 0.15rem;
  color: #475569;
}
