* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
}

:root {
  --bg: #f5f6fa;
  --text: #1f2532;
  --muted: #6b7280;
  --panel: #ffffff;
  --panel-muted: #f8fafc;
  --border: #e5e7eb;
  --shadow: rgba(16, 24, 39, 0.08);
  --header: #101827;
  --header-text: #f5f7ff;
  --header-muted: #93a2c0;
  --card: #ffffff;
  --card-muted: #f9fafc;
  --accent: #2563eb;
  --ghost: #2f3850;
  --ghost-text: #c8d2ea;
}

body[data-theme="dark"] {
  --bg: #0b1120;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --panel: #0f172a;
  --panel-muted: #111827;
  --border: #1f2937;
  --shadow: rgba(2, 6, 23, 0.6);
  --header: #0b1120;
  --header-text: #e2e8f0;
  --header-muted: #94a3b8;
  --card: #0f172a;
  --card-muted: #111827;
  --accent: #60a5fa;
  --ghost: #334155;
  --ghost-text: #e2e8f0;
}

body {
  background: var(--bg);
  color: var(--text);
}

button {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 10px 16px;
  cursor: pointer;
  background: transparent;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease,
    transform 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
}

button:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.35);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
  transform: none;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 40px;
  background: #101827;
  color: #f5f7ff;
  gap: 24px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand__logo {
  width: 36px;
  height: 36px;
  display: block;
}

.brand h1 {
  font-size: 20px;
}

.brand p {
  font-size: 12px;
  color: #93a2c0;
}

.status-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}


.ghost {
  border-color: var(--ghost);
  color: var(--ghost-text);
  background: transparent;
}

.ghost:hover {
  background: rgba(47, 56, 80, 0.12);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  min-width: auto;
}

.lang-toggle {
  margin-top: 0;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
}

.divider {
  width: 1px;
  height: 18px;
  background: rgba(148, 163, 184, 0.35);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.icon-button {
  border: none;
  background: transparent;
  color: var(--header-text);
  cursor: pointer;
  font-size: 18px;
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  position: relative;
  transition: background 0.2s ease, transform 0.2s ease;
}

.status-card .icon-button {
  width: 36px;
  height: 36px;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

#theme-toggle .icon {
  position: absolute;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.icon-button svg {
  width: 20px;
  height: 20px;
  display: block;
}

#theme-toggle .icon-auto {
  opacity: 1;
}

body[data-theme-mode="light"] #theme-toggle .icon-auto,
body[data-theme-mode="dark"] #theme-toggle .icon-auto {
  opacity: 0;
}

body[data-theme-mode="light"] #theme-toggle .icon-sun,
body[data-theme-mode="dark"] #theme-toggle .icon-moon {
  opacity: 1;
}

.icon-button .icon-logout {
  opacity: 1;
}

.content {
  flex: 1;
  padding: 32px 40px 56px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 0;
}

#login-panel {
  max-width: 520px;
  margin: 40px auto 0;
  padding: 32px;
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-muted) 100%);
  border: 1px solid var(--border);
  box-shadow: 0 24px 50px var(--shadow);
}

#main-panel,
#admin-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

#login-panel header {
  text-align: center;
}

#login-panel h2 {
  font-size: 26px;
  letter-spacing: 0.2px;
}

#login-panel p {
  margin-top: 6px;
}

#main-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#main-panel .table {
  flex: 1;
}

#main-panel .pagination {
  margin-top: auto;
}

#admin-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#admin-panel .tab-panels {
  flex: 1;
}

#tab-admin-users {
  display: none;
  flex-direction: column;
  min-height: 0;
}

#tab-admin-users.active {
  display: flex;
}

#tab-admin-users .table {
  flex: 1;
}

#tab-admin-users .pagination {
  margin-top: auto;
}
.panel {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 18px 35px rgba(16, 24, 39, 0.08);
  min-height: 0;
}

.panel header {
  margin-bottom: 20px;
}

.panel h2 {
  font-size: 22px;
  margin-bottom: 8px;
}

.panel p {
  color: #6b7280;
}

.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  align-items: end;
}

#login-panel .form-grid {
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 18px;
}

#login-panel .primary {
  width: 100%;
  padding: 12px 18px;
  border-radius: 12px;
}

#login-panel .oauth-button {
  margin-top: 10px;
  width: 100%;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid #cbd5f5;
  background: #eef2ff;
  color: #3730a3;
  font-weight: 600;
  cursor: pointer;
}

#login-panel .oauth-button:hover {
  background: #e0e7ff;
}

#confirm-modal .modal__subtitle {
  color: #6b7280;
}

#confirm-modal .modal__actions {
  margin-top: 8px;
}

#confirm-modal .ghost,
#confirm-modal .danger {
  margin: 0;
  padding: 10px 16px;
  font-size: 14px;
  border-radius: 10px;
}

.form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.form-row input {
  flex: 1;
  min-width: 220px;
  min-height: 42px;
}

.form-row button {
  min-height: 42px;
}

input::placeholder {
  color: #9ca3af;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 220px;
}

.search-field input {
  flex: 1;
  min-height: 42px;
}

.table-toolbar__count {
  font-size: 13px;
  color: var(--muted);
}

.table__row--empty {
  grid-template-columns: 1fr;
  color: var(--muted);
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: #4b5563;
}

input,
select {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}

textarea {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  resize: vertical;
  min-height: 100px;
  font-family: "JetBrains Mono", "SFMono-Regular", "Menlo", monospace;
}

input:focus,
select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.18);
}

.primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  box-shadow: 0 12px 20px rgba(29, 78, 216, 0.22);
}

.primary:active {
  transform: translateY(1px);
}

.hint {
  margin-top: 12px;
  font-size: 12px;
  color: #9ca3af;
}

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

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

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.tab {
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  color: #475569;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.tab.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.tab:hover {
  border-color: #cbd5f5;
  color: #1e293b;
}

.tab-panels {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  min-height: 0;
}

.tab-actions {
  display: flex;
  justify-content: flex-end;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.card {
  border: 1px solid #edf0f7;
  border-radius: 16px;
  padding: 16px;
  background: #f9fafc;
}

.form-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card ul {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}

.card ul li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card ul li.draggable {
  cursor: grab;
}

.card ul li.dragging {
  opacity: 0.5;
}

.card ul li .ghost {
  margin-top: 0;
}

.danger {
  background: transparent;
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #ef4444;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.danger:hover {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.7);
  color: #dc2626;
}

.table {
  margin-top: 20px;
}

.user-table {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

#user-table {
  flex: 1;
  overflow: auto;
  min-height: 0;
  padding-bottom: 12px;
}

#tab-admin-users .table {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

#admin-user-table {
  flex: 1;
  overflow: auto;
  min-height: 0;
  padding-bottom: 12px;
}

.skeleton-list,
.skeleton-grid {
  display: none;
}

.loading > .skeleton-list,
.loading > .skeleton-grid {
  display: grid;
}

.skeleton-list {
  gap: 10px;
}

.skeleton-row {
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(
    90deg,
    rgba(148, 163, 184, 0.12) 0%,
    rgba(148, 163, 184, 0.2) 40%,
    rgba(148, 163, 184, 0.12) 80%
  );
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}

.skeleton-grid {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
}

.skeleton-card {
  min-height: 96px;
  border-radius: 14px;
  background: linear-gradient(
    90deg,
    rgba(148, 163, 184, 0.12) 0%,
    rgba(148, 163, 184, 0.2) 40%,
    rgba(148, 163, 184, 0.12) 80%
  );
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}


.table__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 10px 6px;
  border-bottom: 1px solid #eef1f7;
  font-size: 14px;
  align-items: center;
  gap: 12px;
}

.table__head {
  font-weight: 600;
  color: #6b7280;
}

.table__row--actions {
  grid-template-columns:
    minmax(0, 1.2fr)
    minmax(0, 0.9fr)
    minmax(0, 1fr);
}

.table.admin-mode .table__row--actions {
  grid-template-columns:
    minmax(0, 1.2fr)
    minmax(0, 1fr)
    minmax(0, 0.9fr)
    minmax(0, 1fr);
}

.table__row--admin-users {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.6fr);
}

.table__row button {
  justify-self: start;
}

.selectable-row {
  cursor: pointer;
}

.selectable-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 24px rgba(15, 23, 42, 0.12);
}

.action-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ghost-danger {
  border-color: rgba(248, 113, 113, 0.5);
  color: #ef4444;
}

.ghost-danger:hover {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.7);
  color: #dc2626;
}

.table--cards .table__row {
  border: 1px solid #eef1f7;
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 12px;
  background: #fff;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.06);
}

.table--cards .table__head {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px 16px;
  margin-top: 0;
  box-shadow: none;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 12px;
  margin-top: 12px;
  list-style: none;
  padding: 0;
}

.card-grid li {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 10px 8px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-height: 96px;
}

.card-grid li:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 24px rgba(15, 23, 42, 0.12);
}

.card-grid li .card-icon {
  width: 30px;
  height: 30px;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.card-icon .fi {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 3px;
}

.card-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.card-grid li .card-name {
  font-weight: 600;
  color: var(--text);
  font-size: 12px;
}

.card-grid li.draggable {
  cursor: grab;
}

.card-grid li.dragging {
  opacity: 0.5;
}

.admin-toggle {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #4b5563;
}

.switch input {
  display: none;
}

.switch__slider {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #d1d5db;
  position: relative;
  transition: background 0.2s ease;
}

.switch__slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15);
  transition: transform 0.2s ease;
}

.switch input:checked + .switch__slider {
  background: #2563eb;
}

.switch input:checked + .switch__slider::after {
  transform: translateX(18px);
}

.switch__label {
  font-weight: 500;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.modal__content {
  position: relative;
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  width: min(720px, 92vw);
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

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

.modal__title {
  font-size: 18px;
  font-weight: 600;
}

.modal__subtitle {
  font-size: 13px;
  color: #6b7280;
  margin-top: 4px;
}

.modal__body {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 6px;
  padding-top: 2px;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.modal__body::-webkit-scrollbar {
  width: 8px;
}

.modal__body::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 999px;
}

.modal__body::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 999px;
  border: 2px solid transparent;
}

.modal__body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #a5b4fc, #cbd5f5);
  border-color: #f8fafc;
}

.modal__body:hover {
  scrollbar-color: #cbd5f5 #f8fafc;
}

.modal__body:hover::-webkit-scrollbar-track,
.modal__body:active::-webkit-scrollbar-track,
.modal__body:focus-within::-webkit-scrollbar-track {
  background: #f8fafc;
}

.modal__body:hover::-webkit-scrollbar-thumb,
.modal__body:active::-webkit-scrollbar-thumb,
.modal__body:focus-within::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #c7d2fe, #e2e8f0);
  border-color: #f8fafc;
}

@media (max-width: 640px) {
  .modal__content {
    max-height: 92vh;
  }
}

.service-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.service-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  padding: 18px 12px 12px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
  min-height: 140px;
  position: relative;
  overflow: hidden;
}

.service-row select {
  margin-top: auto;
}

.service-backend-flag {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 20px;
  height: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.service-backend-flag .fi {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 3px;
}

.flag-icon {
  width: 20px;
  height: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.flag-icon .fi {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 3px;
}

.backend-block-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.service-row .ghost {
  margin-top: auto;
  width: 100%;
  justify-content: center;
}

.service-row {
  cursor: pointer;
}

.service-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 24px rgba(15, 23, 42, 0.12);
}

.select-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 10px 8px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  align-items: center;
  text-align: center;
  min-height: 96px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.select-card .card-icon {
  width: 30px;
  height: 30px;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.select-card .card-name {
  font-weight: 600;
  color: var(--text);
  font-size: 12px;
}

.select-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 24px rgba(15, 23, 42, 0.12);
}

.select-card.active {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.service-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.service-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111827;
}

.service-icon svg {
  width: 34px;
  height: 34px;
}

.service-icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.service-row small {
  display: none;
}

.service-row .card-name,
.service-row strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.service-row select {
  appearance: none;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 34px 10px 12px;
  font-size: 13px;
  color: #0f172a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  background-image:
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'><path d='M5 7l5 6 5-6' fill='none' stroke='%2394a3b8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: center, right 10px center;
  background-size: auto, 16px;
}

.service-row select:focus {
  border-color: #94a3b8;
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.2);
}

.checkbox-list {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.checkbox-title {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
}

.checkbox-list label {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.checkbox-list input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
}

.pagination__info {
  font-size: 13px;
  color: #6b7280;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
}

.modal__actions--between {
  justify-content: space-between;
}

.modal__actions button {
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
}

.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: #111827;
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  opacity: 0;
  transition: all 0.2s ease;
  pointer-events: none;
  z-index: 50;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.app-footer {
  padding: 16px 40px 28px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  margin-top: auto;
}

body {
  background: var(--bg);
  color: var(--text);
}

.app-header {
  background: var(--header);
  color: var(--header-text);
}

.brand p {
  color: var(--header-muted);
}

.status-card {
  background: rgba(255, 255, 255, 0.06);
}

.panel {
  background: var(--panel);
  box-shadow: 0 18px 35px var(--shadow);
}

.panel p {
  color: var(--muted);
}

.card {
  border-color: var(--border);
  background: var(--card-muted);
}

.table__head {
  color: var(--muted);
}

.table__row {
  border-bottom-color: var(--border);
}

.table--cards .table__row {
  border-color: var(--border);
  background: var(--card);
  box-shadow: 0 8px 16px var(--shadow);
}

.table--cards .table__head {
  background: var(--panel-muted);
  border-color: var(--border);
}

input,
select,
textarea {
  background: var(--panel);
  color: var(--text);
  border-color: var(--border);
}

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

.ghost {
  border-color: var(--ghost);
  color: var(--ghost-text);
}

.tab {
  border-color: var(--border);
  background: var(--panel-muted);
}

.tab.active {
  background: var(--accent);
  border-color: var(--accent);
}

.card-grid li,
.select-card {
  background: var(--card);
  border-color: var(--border);
  box-shadow: 0 10px 18px var(--shadow);
}

.service-row {
  background: var(--panel-muted);
  border-color: var(--border);
  box-shadow: 0 10px 20px var(--shadow);
}

body[data-theme="dark"] .primary {
  box-shadow: 0 12px 20px rgba(96, 165, 250, 0.25);
}

body[data-theme="dark"] .primary:hover {
  background: #3b82f6;
  border-color: #3b82f6;
  box-shadow: 0 14px 24px rgba(59, 130, 246, 0.3);
}

body[data-theme="dark"] .ghost:hover {
  background: rgba(51, 65, 85, 0.4);
}

body[data-theme="dark"] .tab:hover {
  border-color: rgba(96, 165, 250, 0.45);
  color: #e2e8f0;
}

.service-row .backend-label {
  color: var(--muted);
  background: var(--panel);
  border-color: var(--border);
}

.modal__content {
  background: var(--panel);
}

.modal__subtitle,
.pagination__info {
  color: var(--muted);
}
