:root {
  --bg-top: #0d1a28;
  --bg-bottom: #08101b;
  --bg-accent: rgba(26, 107, 255, 0.17);
  --bg-accent-soft: rgba(212, 223, 255, 0.095);
  --panel: rgba(14, 24, 39, 0.79);
  --panel-strong: rgba(16, 29, 48, 0.95);
  --panel-active: rgba(18, 33, 57, 0.95);
  --panel-soft: rgba(255, 255, 255, 0.03);
  --border: rgba(212, 223, 255, 0.11);
  --border-strong: rgba(212, 223, 255, 0.165);
  --text: #edf2fd;
  --text-soft: rgba(237, 242, 253, 0.875);
  --muted: #97a5c1;
  --muted-strong: #b4c1d7;
  --blue: #1a6bff;
  --blue-soft: #d4dfff;
  --amber: #ffaa00;
  --success: #53d38a;
  --danger: #ff6b7c;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
  --radius: 6px;
  --radius-sm: 6px;
  --sidebar-width: 272px;
  --font: "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

html {
  scrollbar-color: rgba(212, 223, 255, 0.14) #07111d;
}

body::-webkit-scrollbar,
.main::-webkit-scrollbar,
.modal-card::-webkit-scrollbar {
  width: 12px;
}

body::-webkit-scrollbar-track,
.main::-webkit-scrollbar-track,
.modal-card::-webkit-scrollbar-track {
  background: #07111d;
}

body::-webkit-scrollbar-thumb,
.main::-webkit-scrollbar-thumb,
.modal-card::-webkit-scrollbar-thumb {
  background: rgba(212, 223, 255, 0.14);
  border: 3px solid #07111d;
  border-radius: 999px;
}

body::-webkit-scrollbar-thumb:hover,
.main::-webkit-scrollbar-thumb:hover,
.modal-card::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 223, 255, 0.22);
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, var(--bg-accent), transparent 26%),
    radial-gradient(circle at 100% 14%, rgba(255, 170, 0, 0.09), transparent 20%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  overflow: hidden;
}

.sidebar,
.topbar,
.stats-grid,
.panel.view.active {
  transition:
    opacity 560ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 560ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 560ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform, filter;
}

body:not(.app-ready) .sidebar,
body:not(.app-ready) .topbar,
body:not(.app-ready) .stats-grid,
body:not(.app-ready) .panel.view.active {
  opacity: 0;
  filter: blur(6px);
}

body:not(.app-ready) .sidebar {
  transform: translateY(18px);
}

body:not(.app-ready) .topbar {
  transform: translateY(14px);
  transition-delay: 70ms;
}

body:not(.app-ready) .stats-grid {
  transform: translateY(18px);
  transition-delay: 120ms;
}

body:not(.app-ready) .panel.view.active {
  transform: translateY(24px);
  transition-delay: 180ms;
}

.stats-card,
#sites-table-body tr,
.snapshot-card,
.activity-item {
  transition:
    opacity 520ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

body:not(.app-ready) .stats-card,
body:not(.app-ready) #sites-table-body tr,
body:not(.app-ready) .snapshot-card,
body:not(.app-ready) .activity-item {
  opacity: 0;
  transform: translateY(14px);
}

body:not(.app-ready) .stats-card:nth-child(1),
body:not(.app-ready) #sites-table-body tr:nth-child(1),
body:not(.app-ready) .snapshot-card:nth-child(1),
body:not(.app-ready) .activity-item:nth-child(1) {
  transition-delay: 200ms;
}

body:not(.app-ready) .stats-card:nth-child(2),
body:not(.app-ready) #sites-table-body tr:nth-child(2),
body:not(.app-ready) .snapshot-card:nth-child(2),
body:not(.app-ready) .activity-item:nth-child(2) {
  transition-delay: 250ms;
}

body:not(.app-ready) .stats-card:nth-child(3),
body:not(.app-ready) #sites-table-body tr:nth-child(3),
body:not(.app-ready) .snapshot-card:nth-child(3),
body:not(.app-ready) .activity-item:nth-child(3) {
  transition-delay: 300ms;
}

body:not(.app-ready) #sites-table-body tr:nth-child(4),
body:not(.app-ready) .activity-item:nth-child(4) {
  transition-delay: 350ms;
}

body:not(.app-ready) #sites-table-body tr:nth-child(5),
body:not(.app-ready) .activity-item:nth-child(5) {
  transition-delay: 400ms;
}

button,
input,
textarea,
select {
  font: inherit;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(212, 223, 255, 0.02) 0, rgba(212, 223, 255, 0.02) 1px, transparent 1px, transparent 100%),
    linear-gradient(180deg, rgba(212, 223, 255, 0.018) 0, rgba(212, 223, 255, 0.018) 1px, transparent 1px, transparent 100%);
  background-size: 120px 120px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 95%);
  opacity: 0.34;
}

.app-shell {
  min-height: 100vh;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.auth-card {
  width: min(480px, calc(100vw - 32px));
  padding: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(10, 21, 38, 0.96), rgba(7, 15, 28, 0.98));
  box-shadow: var(--shadow);
}

.auth-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  margin-bottom: 18px;
}

.auth-card h1 {
  margin: 0 0 20px;
  font-size: 30px;
  line-height: 1.05;
}

.auth-copy {
  margin: 0 0 20px;
  color: var(--text-soft);
}

.auth-form {
  display: grid;
  gap: 0;
}

.auth-feedback {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 107, 124, 0.2);
  background: rgba(255, 107, 124, 0.08);
  color: #ffb4bf;
}

.auth-feedback[data-state="success"] {
  border-color: rgba(83, 211, 138, 0.2);
  background: rgba(83, 211, 138, 0.08);
  color: #b8efcc;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  padding: 28px 24px 24px;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  backdrop-filter: blur(8px);
}

.sidebar-logout-button {
  width: 100%;
  margin-top: 12px;
}

.main {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  height: 100vh;
  overflow-y: auto;
  padding: 28px 32px 48px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 38px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.brand h1,
.topbar h2,
.panel h3,
.modal h3 {
  margin: 0;
}

.brand h1 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  display: grid;
  gap: 6px;
}

.sidebar-divider {
  height: 1px;
  margin: 18px 0 0;
  background: rgba(212, 223, 255, 0.08);
}

.sidebar-create-button {
  width: 100%;
  margin-top: 26px;
  justify-content: center;
  font-size: 15.5px;
  font-weight: 500;
}

.nav-link,
.ghost-button,
.secondary-button,
.primary-button,
.icon-button,
.action-button {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

.nav-link {
  padding: 12px 14px;
  background: transparent;
  color: var(--text-soft);
  text-align: left;
  font-size: 15.5px;
  font-weight: 500;
}

.nav-link.active {
  background: rgba(212, 223, 255, 0.025);
  border-color: rgba(212, 223, 255, 0.06);
  color: var(--text);
}

.nav-link:hover {
  transform: translateY(-1px);
  color: var(--text);
}

.panel,
.stats-card,
.modal-card,
.snapshot-card,
.activity-item {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.panel-header p,
.snapshot-card p,
.activity-item p {
  color: var(--muted);
  line-height: 1.55;
}

.topbar,
.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.topbar {
  margin-bottom: 28px;
}

.topbar h2 {
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 600;
  letter-spacing: -0.05em;
}

.panel-tools,
.topbar-actions,
.modal-actions,
.action-cluster {
  display: flex;
  gap: 12px;
  align-items: center;
}

.toolbar-input,
.toolbar-select {
  min-width: 190px;
}

.ghost-button,
.secondary-button,
.primary-button,
.action-button,
.icon-button {
  padding: 11px 15px;
  color: var(--text-soft);
  background: #102646;
  border-color: rgba(212, 223, 255, 0.08);
}

.ghost-button:hover,
.secondary-button:hover,
.action-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
  border-color: var(--border);
  background: #1a6bff;
  color: var(--text);
}

.primary-button {
  background: linear-gradient(180deg, rgba(26, 107, 255, 0.95), rgba(18, 91, 224, 0.95));
  color: #f5f5f5;
  border-color: rgba(212, 223, 255, 0.12);
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(26, 107, 255, 0.18);
}

.secondary-button {
  background: #102646;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 12px;
  padding: 0 0 18px;
  border-bottom: 1px solid rgba(212, 223, 255, 0.08);
}

.stats-card {
  padding: 8px 18px 8px 0;
  border: 0;
  border-right: 1px solid rgba(212, 223, 255, 0.08);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.stats-value {
  margin: 10px 0 4px;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 600;
  letter-spacing: -0.05em;
}

.stats-meta {
  color: var(--muted);
  font-size: 13px;
}

.stats-card:last-child {
  border-right: 0;
}

.panel {
  display: none;
  padding: 24px 0 0;
  border: 0;
  border-top: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.panel.view.active {
  display: block;
}

.bulk-bar {
  display: none;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 0;
  border: 0;
  border-top: 1px solid rgba(212, 223, 255, 0.08);
  border-bottom: 1px solid rgba(212, 223, 255, 0.08);
  background: transparent;
}

.bulk-bar.active {
  display: flex;
}

.bulk-summary {
  color: var(--blue-soft);
  font-size: 14px;
  font-weight: 600;
}

.table-wrap {
  margin-top: 4px;
  overflow-x: auto;
  overflow-y: visible;
}

.table-wrap details summary {
  list-style: none;
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

.col-site {
  width: 36%;
}

.col-tags {
  width: 11%;
}

.col-disk {
  width: 12%;
}

.col-actions {
  width: 41%;
}

thead th {
  padding: 12px;
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

thead th:last-child,
tbody td:last-child {
  text-align: right;
  padding-right: 0;
}

thead input[type="checkbox"],
tbody input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

tbody tr {
  position: relative;
  transition: transform 150ms ease, background-color 150ms ease;
}

tbody tr:hover {
  z-index: 2;
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.01);
}

tbody tr:has(.tag-dropdown[open]),
tbody tr:has(.action-menu[open]) {
  z-index: 30;
}

tbody td {
  position: relative;
  overflow: visible;
  padding: 18px 12px;
  border-top: 1px solid rgba(212, 223, 255, 0.08);
  vertical-align: top;
}

tbody td:nth-child(3) {
  vertical-align: middle;
}

tbody td:nth-child(2) {
  vertical-align: middle;
}

.site-name {
  display: grid;
  gap: 5px;
}

.site-name strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.disk-value {
  display: inline-flex;
  align-items: center;
  min-height: 100%;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.site-sub {
  font-size: 12px;
  color: var(--muted);
}

.tag-dropdown,
.action-menu {
  position: relative;
}

.tag-dropdown[open],
.action-menu[open] {
  z-index: 40;
}

.tag-summary {
  display: flex;
  align-items: center;
  cursor: pointer;
  border-radius: 999px;
  min-height: 100%;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 100%;
  align-items: center;
  padding: 2px 0;
}

.tag-list.empty {
  color: var(--muted);
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid rgba(26, 107, 255, 0.16);
  background: rgba(26, 107, 255, 0.08);
  color: var(--blue-soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
}

.tag-placeholder {
  font-size: 12px;
  color: var(--muted);
}

.tag-menu,
.action-menu-list {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 60;
  min-width: 240px;
  padding: 14px;
  border: 1px solid rgba(212, 223, 255, 0.1);
  border-radius: 6px;
  background: linear-gradient(180deg, rgb(12, 22, 38), rgb(8, 15, 28));
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(16px);
  isolation: isolate;
  overflow: hidden;
}

.tag-menu {
  width: 320px;
}

.tag-menu-label {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tag-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-option {
  padding: 8px 10px;
  border: 1px solid rgba(212, 223, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-soft);
  cursor: pointer;
  border-radius: 999px;
}

.tag-option.active {
  border-color: rgba(26, 107, 255, 0.2);
  background: rgba(26, 107, 255, 0.12);
  color: var(--blue-soft);
}

.tag-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 12px;
}

.tag-input {
  min-width: 0;
  min-height: 46px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

.badge.success {
  background: rgba(83, 211, 138, 0.09);
  border-color: rgba(83, 211, 138, 0.14);
  color: #9fe8bc;
}

.badge.warning {
  background: rgba(255, 170, 0, 0.1);
  border-color: rgba(255, 170, 0, 0.12);
  color: #ffd077;
}

.badge.danger {
  background: rgba(255, 107, 124, 0.1);
  border-color: rgba(255, 107, 124, 0.12);
  color: #ffb4bf;
}

.status-stack,
.snapshot-meta,
.credentials-box {
  display: grid;
  gap: 8px;
}

.audit-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.audit-meta-line {
  margin: 0;
  color: var(--text-soft);
}

.status-widget-error-copy {
  margin: 2px 0 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.action-cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

tbody .action-button,
tbody .action-menu-item,
tbody .icon-only {
  font-size: 12px;
}

.icon-only {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding-left: 0;
  padding-right: 0;
  line-height: 1;
}

.menu-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-1px);
  font-size: 16px;
  letter-spacing: 0.08em;
}

.action-menu-list {
  right: 0;
  left: auto;
  min-width: 210px;
  display: grid;
  gap: 6px;
  background: linear-gradient(180deg, rgb(12, 22, 38), rgb(8, 15, 28));
}

.action-menu-item {
  padding: 10px 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.action-menu-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.snapshot-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.snapshot-card,
.activity-item {
  padding: 22px 0;
  border: 0;
  border-radius: 6px;
  border-top: 1px solid rgba(212, 223, 255, 0.08);
  background: transparent;
  box-shadow: none;
}

.snapshot-card {
  padding: 20px 20px 18px;
  border: 1px solid rgba(212, 223, 255, 0.08);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0.008));
}

.snapshot-topline,
.snapshot-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.snapshot-topline {
  margin-bottom: 14px;
}

.snapshot-type {
  padding: 7px 10px;
  border: 1px solid rgba(212, 223, 255, 0.1);
  color: var(--blue-soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.snapshot-note {
  margin: 0 0 18px;
  color: var(--text-soft);
  line-height: 1.6;
}

.snapshot-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin-bottom: 18px;
}

.snapshot-meta span,
.snapshot-foot span {
  color: var(--muted-strong);
  font-size: 12px;
}

.snapshot-meta span {
  padding-top: 10px;
  border-top: 1px solid rgba(212, 223, 255, 0.08);
}

.snapshot-foot {
  padding-top: 14px;
  border-top: 1px solid rgba(212, 223, 255, 0.08);
  margin-bottom: 18px;
}

.activity-list {
  display: grid;
  gap: 0;
  margin-top: 18px;
}

.modal {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  background: transparent;
  padding: 24px;
  display: none;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
}

.modal[open] {
  display: grid;
  pointer-events: auto;
}

.modal::backdrop {
  background: rgba(1, 5, 12, 0.76);
  backdrop-filter: blur(10px);
}

#site-modal {
  opacity: 0;
  transition: opacity 260ms ease;
}

#site-modal::backdrop {
  background: rgba(1, 5, 12, 0);
  backdrop-filter: blur(0);
  transition: background 260ms ease, backdrop-filter 260ms ease;
}

#site-modal.is-visible {
  opacity: 1;
}

#site-modal.is-visible::backdrop {
  background: rgba(1, 5, 12, 0.76);
  backdrop-filter: blur(10px);
}

.modal-card {
  width: min(840px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 26px;
  border-radius: 6px;
  background: #0a1b35;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#site-modal .modal-card {
  opacity: 0;
  transform: translateY(18px) scale(0.975);
  transition: opacity 260ms ease, transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

#site-modal.is-visible .modal-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal-card.compact {
  width: min(540px, calc(100vw - 32px));
}

.modal-card::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h3 {
  color: var(--text);
}

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

.form-row {
  margin-bottom: 14px;
}

.form-row:last-of-type {
  margin-bottom: 0;
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

label span {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.toggle-field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.toggle-field > span {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.toggle-control {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.toggle-control input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.toggle-control span {
  color: var(--text-soft);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

input,
textarea,
select {
  width: 100%;
  padding: 0 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  outline: none;
}

input,
select {
  height: 48px;
  min-height: 48px;
}

select {
  padding-bottom: 1px;
}

#site-snapshot-select {
  height: 44px;
  min-height: 44px;
  line-height: 1.2;
  font-size: 16px;
  padding-top: 0;
  padding-bottom: 0;
  padding-left: 14px;
  padding-right: 42px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1 1.5L7 7.5L13 1.5' stroke='%23b4c1d7' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px 9px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(26, 107, 255, 0.45);
  background: rgba(26, 107, 255, 0.06);
}

textarea {
  padding-top: 13px;
  padding-bottom: 13px;
  resize: vertical;
}

.credentials-box {
  padding: 16px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
}

.credentials-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.credentials-row code {
  color: var(--blue-soft);
}

.badge.loading {
  background: rgba(26, 107, 255, 0.08);
  border-color: rgba(26, 107, 255, 0.12);
  color: #c8daff;
}

.loader {
  width: 12px;
  height: 12px;
  border: 1.5px solid rgba(212, 223, 255, 0.2);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loader-lg {
  width: 28px;
  height: 28px;
  border-width: 2px;
  color: var(--blue-soft);
}

.create-progress {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 7, 15, 0.6);
  backdrop-filter: blur(10px);
}

.create-progress[hidden] {
  display: none;
}

.create-progress-card {
  width: min(440px, calc(100vw - 32px));
  padding: 24px 24px 22px;
  border: 1px solid rgba(212, 223, 255, 0.1);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(11, 20, 36, 0.96), rgba(7, 13, 24, 0.98));
  display: grid;
  gap: 18px;
}

.create-progress-copy h3 {
  margin: 0 0 8px;
}

.create-progress-copy p:last-child {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.6;
}

.status-widget {
  position: fixed;
  right: 24px;
  bottom: 88px;
  z-index: 95;
  width: min(360px, calc(100vw - 32px));
}

.status-widget[hidden] {
  display: none;
}

.status-widget-card {
  position: relative;
  padding: 20px 18px 18px;
  border: 1px solid rgba(212, 223, 255, 0.1);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(11, 20, 36, 0.98), rgba(7, 13, 24, 0.99));
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.34);
}

.status-widget-card h3 {
  margin: 0 0 16px;
}

.status-widget-list {
  display: grid;
  gap: 10px;
}

.status-widget-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(212, 223, 255, 0.08);
}

.status-widget-row span:first-child {
  color: var(--muted-strong);
  font-size: 13px;
}

.status-widget-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: #102646;
  color: var(--text-soft);
  cursor: pointer;
}

.status-widget-close:hover {
  background: #143056;
  color: var(--text);
}

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

@media (max-width: 1180px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-card:nth-child(2n) {
    border-right: 0;
  }

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

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .sidebar {
    position: sticky;
    inset: 0 0 auto 0;
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(8, 15, 28, 0.96), rgba(8, 15, 28, 0.88));
  }

  .main {
    margin-left: 0;
    height: auto;
    min-height: auto;
    overflow: visible;
    padding: 24px 20px 36px;
  }

  .app-shell {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .topbar,
  .panel-header,
  .modal-header,
  .modal-actions,
  .topbar-actions,
  .panel-tools,
  .bulk-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .stats-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .stats-card {
    border-right: 0;
    border-bottom: 1px solid rgba(212, 223, 255, 0.08);
    padding-bottom: 16px;
  }

  .credentials-row {
    flex-direction: column;
  }

  .main,
  .sidebar {
    padding-left: 16px;
    padding-right: 16px;
  }
}
