﻿:root {
  --bg: #f5f6fb;
  --bg-soft: #eef1f7;
  --card: rgba(255, 255, 255, 0.82);
  --card-strong: #ffffff;
  --text: #0f1216;
  --muted: #5f6b76;
  --line: rgba(15, 18, 22, 0.08);
  --accent: #0f5fff;
  --accent-2: #18c2c7;
  --shadow: 0 20px 40px rgba(15, 18, 22, 0.12);
  --shadow-soft: 0 12px 24px rgba(15, 18, 22, 0.08);
  --radius: 18px;
  --radius-lg: 26px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Manrope", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle at 10% 10%, rgba(15, 95, 255, 0.12), transparent 50%),
              radial-gradient(circle at 90% 20%, rgba(24, 194, 199, 0.15), transparent 55%),
              linear-gradient(120deg, #f9fafc 0%, #eef2f7 50%, #f3f6fb 100%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(0px);
  opacity: 0.8;
  animation: float 12s ease-in-out infinite;
}

.orb-1 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(15, 95, 255, 0.22), transparent 70%);
  top: -120px;
  left: -120px;
}

.orb-2 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(24, 194, 199, 0.2), transparent 70%);
  bottom: -160px;
  right: -140px;
  animation-delay: 1.5s;
}

.orb-3 {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(15, 18, 22, 0.08), transparent 70%);
  top: 45%;
  right: 15%;
  animation-delay: 3s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(18px); }
}

.container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 24px 80px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 32px;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  background: rgba(245, 246, 251, 0.8);
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 600;
  font-size: 15px;
}

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

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--text);
}

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

.nav-user {
  font-size: 14px;
  color: var(--muted);
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #3c8cff);
  box-shadow: 0 12px 24px rgba(15, 95, 255, 0.28);
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn.is-loading {
  position: relative;
  padding-left: 34px;
}

.btn.is-loading::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -7px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-right-color: transparent;
  animation: spin 0.8s linear infinite;
}

.btn-ghost.is-loading::before {
  border-color: rgba(15, 18, 22, 0.75);
  border-right-color: transparent;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.8);
}

.text-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}

.hero-text h1 {
  margin: 0 0 10px;
  font-size: 34px;
}

.hero-text p {
  margin: 0;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 12px;
}

.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.page-header p {
  margin: 0;
  color: var(--muted);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card,
.glass-card,
.shop-card,
.form-card,
.table-card,
.auth-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
}

.stat-value {
  font-size: 28px;
  font-weight: 600;
  margin: 10px 0 6px;
}

.stat-foot {
  color: var(--muted);
  font-size: 13px;
}

.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.7);
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
  gap: 32px;
  align-items: stretch;
}

.auth-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-header h1 {
  margin: 0 0 8px;
  font-size: 30px;
}

.auth-header p {
  margin: 0;
  color: var(--muted);
}

.auth-footer {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.auth-aside {
  background: linear-gradient(140deg, rgba(15, 95, 255, 0.15), rgba(24, 194, 199, 0.12));
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.aside-grid {
  display: grid;
  gap: 16px;
}

.form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 13px;
  color: var(--muted);
}

.field input,
.field select {
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
}

.inline {
  display: flex;
  gap: 10px;
}

.inline input {
  flex: 1;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.form-message {
  min-height: 20px;
  font-size: 13px;
  color: var(--accent);
}

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

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

.slot-status {
  font-size: 14px;
  color: var(--muted);
}

.slot-info {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 14px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 22, 0.42);
  z-index: 20;
}

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

.modal-enter .modal-card {
  animation: modalIn 0.22s ease-out;
}

.modal[hidden],
.modal-backdrop[hidden] {
  display: none !important;
}

.modal-card {
  width: min(560px, 96vw);
  max-height: 92vh;
  overflow: auto;
  background: var(--card-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.copy-area {
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  font-size: 13px;
  resize: vertical;
  background: #fff;
  min-height: 86px;
}

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

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

.shop-price {
  font-size: 22px;
  font-weight: 600;
  color: var(--accent);
}

.shop-desc {
  color: var(--muted);
}

.table-card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table-card th,
.table-card td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
}

.table-card thead {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.user-admin-panel {
  margin-bottom: 18px;
}

.user-admin-list-card {
  overflow-x: auto;
}

.user-admin-list {
  width: 100%;
  min-width: 520px;
}

.user-admin-list td:last-child,
.user-admin-list th:last-child {
  width: 120px;
}

.user-detail-modal-card {
  width: min(680px, 96vw);
}

.user-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 4px 0 16px;
  font-size: 14px;
}

.user-detail-edit-form {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.user-quick-actions {
  flex-wrap: wrap;
}

.user-quick-actions .btn {
  padding: 8px 12px;
  font-size: 13px;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 18px 0;
}

.mono {
  font-family: "IBM Plex Mono", "SF Mono", monospace;
}

[data-animate] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].animate-in {
  opacity: 1;
  transform: translateY(0);
}

.toast-wrap {
  position: fixed;
  right: 20px;
  bottom: 22px;
  z-index: 40;
  display: grid;
  gap: 10px;
}

.toast {
  min-width: 220px;
  max-width: 380px;
  padding: 12px 14px;
  border-radius: 12px;
  color: #fff;
  box-shadow: var(--shadow-soft);
  animation: toastIn 0.2s ease-out;
}

.toast-success {
  background: linear-gradient(135deg, #0f5fff, #2f7bff);
}

.toast-error {
  background: linear-gradient(135deg, #d74444, #ef6a6a);
}

.toast-out {
  animation: toastOut 0.2s ease-in forwards;
}

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

@keyframes modalIn {
  from { transform: translateY(10px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

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

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

@media (max-width: 960px) {
  .topbar {
    flex-wrap: wrap;
    gap: 16px;
  }

  .nav-links {
    flex-wrap: wrap;
  }

  .container {
    padding-top: 90px;
  }

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

@media (max-width: 640px) {
  .topbar {
    padding: 16px;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn {
    flex: 1;
  }

  .slot-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .user-admin-list {
    min-width: 100%;
  }

  .user-admin-list td,
  .user-admin-list th {
    padding: 10px 6px;
  }

  .user-detail-grid {
    grid-template-columns: 1fr;
  }

  .user-detail-modal-card {
    padding: 16px;
  }

  .toast-wrap {
    right: 12px;
    left: 12px;
    bottom: 14px;
  }
}
