.header {
  z-index: 100;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  min-height: var(--header-height);
  color: #fff;
  background: linear-gradient(135deg, #062964 0%, #0a4bb3 100%);
  padding: 20px;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  overflow: visible;
  box-shadow: none !important;
  border-bottom: none !important;
}

.header-content {
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
}

.header-brand {
  align-items: center;
  gap: 12px;
  min-width: 0;
  display: flex;
}

.header-back {
  color: #fff;
  cursor: pointer;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 10px;
  justify-content: center;
  align-items: center;
  width: 38px;
  height: 38px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  transition: transform .15s, background .15s, border-color .15s;
  display: inline-flex;
}

.header-back:hover {
  background: rgba(255, 255, 255, .18);
  border-color: rgba(255, 255, 255, .5);
  transform: translate(-1px);
}

.header-back:active {
  transform: translate(-2px);
}

.header-back:focus-visible {
  outline-offset: 2px;
  outline: 2px solid rgba(255, 255, 255, .85);
}

.header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
}

.page-container {
  width: 100%;
  min-height: calc(100vh - var(--header-height, 72px));
  min-height: calc(100dvh - var(--header-height, 72px));
  background: radial-gradient(circle at 20% 20%, #f5f8ff 0%, #eef3ff 40%, #fff 75%);
  justify-content: center;
  align-items: center;
  padding: 24px;
  display: flex;
  position: relative;
  overflow: visible;
}

@media (max-width: 800px) {
  .page-container {
    padding: 16px;
    padding-top: calc(16px + env(safe-area-inset-top));
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    align-items: stretch;
    overflow: visible;
  }
}

.subtitle {
  color: #d6e0f0;
  margin-top: 4px;
  font-size: .875rem;
}

.header-right {
  flex-wrap: wrap;
  flex: 0 auto;
  justify-content: flex-end;
  align-items: center;
  gap: 8px 12px;
  min-width: 0;
  margin-left: auto;
  display: flex;
}

.header-auth {
  align-items: center;
  gap: 8px;
  display: flex;
}

.header-auth .auth-button, .auth-button {
  color: #1a3d7c;
  cursor: pointer;
  white-space: nowrap;
  background: #fff;
  border: 1px solid #dce3ee;
  border-radius: 6px;
  align-items: center;
  padding: 8px 16px;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s, color .2s, border .2s;
  display: inline-flex;
}

.header-auth .auth-button.signup {
  color: #fff;
  background: #1d73ff;
  border: none;
}

.header-auth .auth-button:hover {
  color: #fff;
  background: #1d73ff;
}

.header-auth .auth-button.signup:hover {
  color: #fff;
  background: #1456c0;
}

.cta-button {
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #ff8a00 0%, #ffb703 100%);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: .95rem;
  font-weight: 700;
  transition: transform .15s, box-shadow .15s, filter .15s;
  display: inline-flex;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .18);
}

.cta-button:hover {
  filter: brightness(1.02);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, .22);
}

.cta-button:active {
  transform: translateY(0);
  box-shadow: 0 10px 22px rgba(15, 23, 42, .18);
}

.cta-icon {
  background: rgba(255, 255, 255, .22);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  justify-content: center;
  align-items: center;
  width: 22px;
  height: 22px;
  font-size: 1.05em;
  line-height: 1;
  display: inline-flex;
}

.search-box {
  flex-direction: column;
  flex: 360px;
  gap: 6px;
  width: min(520px, 40vw);
  min-width: 220px;
  max-width: 100%;
  display: flex;
  position: relative;
}

.search-row {
  align-items: center;
  gap: 8px;
  display: flex;
}

.search-field {
  flex: auto;
  position: relative;
}

.search-input {
  color: #fff;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 10px;
  outline: none;
  width: 100%;
  padding: 10px 38px 10px 15px;
}

.search-input::-webkit-input-placeholder {
  color: rgba(255, 255, 255, .75);
}

.search-input::placeholder {
  color: rgba(255, 255, 255, .75);
}

.search-clear {
  color: #fff;
  cursor: pointer;
  background: rgba(255, 255, 255, .2);
  border: none;
  border-radius: 999px;
  width: 24px;
  height: 24px;
  font-size: 16px;
  line-height: 1;
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
}

.search-submit {
  color: #fff;
  cursor: pointer;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 10px;
  padding: 9px 12px;
  font-weight: 600;
}

.header-mobile {
  align-items: center;
  display: inline-flex;
  position: relative;
}

.header-menu-button {
  color: #fff;
  cursor: pointer;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 10px;
  justify-content: center;
  align-items: center;
  width: 42px;
  height: 42px;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
}

.header-mobile-menu {
  z-index: 1000;
  background: rgba(255, 255, 255, .98);
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 14px;
  width: min(240px, 72vw);
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(2, 6, 23, .26);
}

.header-mobile-link {
  color: #0f172a;
  text-align: left;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  padding: 12px 14px;
  font-weight: 700;
  text-decoration: none;
  display: block;
}

.header-mobile-link:hover {
  background: rgba(15, 23, 42, .06);
}

.header-mobile-link--button {
  font: inherit;
}

@media (max-width: 1150px) {
  .search-submit {
    display: none;
  }
}

.search-meta {
  flex-wrap: wrap;
  gap: 6px;
  display: flex;
}

.search-chip {
  color: #fff;
  letter-spacing: .2px;
  white-space: nowrap;
  background: rgba(255, 255, 255, .2);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: .75rem;
  font-weight: 700;
}

.stats-bar {
  align-items: center;
  height: 40px;
  padding: 0 32px;
  display: flex;
  box-shadow: none !important;
  background: #fff !important;
  border: none !important;
}

.grid-stats-bar {
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  width: 100%;
}

.stats-content {
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  font-size: 14px;
  display: flex;
}

.stat-item {
  color: #223;
  align-items: center;
  gap: 8px;
  display: flex;
}

.stat-item strong {
  color: #2563eb;
}

.page-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

.grid-footer {
  color: #475569;
  background: #f5f7fa;
  border-top: none;
  justify-content: space-between;
  align-items: center;
  margin-top: 48px;
  padding: 16px 24px;
  font-size: .9rem;
  display: flex;
}

@media (max-width: 768px) {
  .grid-footer {
    text-align: center;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    font-size: .85rem;
  }
}

.pixel-table-wrapper {
  overflow-x: auto;
}

.pixel-table th, .pixel-table td {
  text-align: left;
  border-bottom: 1px solid rgba(15, 23, 42, .08);
  padding: 12px;
}

.pixel-table th button {
  font: inherit;
  color: #1a1a1a;
  cursor: pointer;
  background: none;
  border: none;
  align-items: center;
  gap: 4px;
  display: inline-flex;
}

.app-body--grid {
  padding-top: 0;
}

body.grid-page {
  overflow: hidden;
}

@media (max-width: 768px) {
  .header {
    min-height: auto !important;
    padding: 8px 10px !important;
  }

  .header-back {
    border-radius: 10px;
    width: 32px;
    height: 32px;
    font-size: 18px;
  }

  .header-content {
    flex-flow: wrap !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .header > .header-content > div:first-child {
    min-width: 0;
    overflow: hidden;
    flex: 0 auto !important;
  }

  .header h1 {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    margin: 0 !important;
    font-size: 1rem !important;
    line-height: 1.2 !important;
  }

  .subtitle {
    display: none !important;
  }

  .header-right {
    flex-flow: wrap !important;
    flex: 0 auto !important;
    order: 1 !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 6px !important;
    margin-left: 0 !important;
    display: flex !important;
  }

  .search-box {
    flex: 100% !important;
    order: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    display: flex !important;
  }

  .header-mobile-menu {
    top: calc(env(safe-area-inset-top) + 64px);
    width: auto;
    max-width: 520px;
    margin-left: auto;
    position: fixed;
    left: 10px;
    right: 10px;
  }

  .search-row {
    width: 100%;
  }

  .search-input {
    border-radius: 10px;
    padding: 9px 36px 9px 12px;
  }

  .search-submit {
    padding: 9px 10px;
  }

  .cta-button {
    order: 1;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    padding: 6px 10px !important;
    font-size: .75rem !important;
  }

  .cta-button .cta-icon {
    margin-right: 3px;
    font-size: .85em !important;
  }

  .header-auth {
    order: 2;
    flex-flow: row !important;
    gap: 4px !important;
    display: flex !important;
  }

  .header-auth .auth-button {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    min-height: 32px !important;
    padding: 6px 8px !important;
    font-size: .7rem !important;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 6px 8px !important;
  }

  .header h1 {
    font-size: 1rem !important;
  }

  .cta-button {
    padding: 6px 10px !important;
    font-size: .75rem !important;
  }

  .cta-button .cta-icon {
    margin-right: 2px;
    font-size: .85em !important;
  }

  .cta-button span:not(.cta-icon), .search-submit {
    display: none;
  }

  .header-auth .auth-button {
    min-height: 32px !important;
    padding: 6px 8px !important;
    font-size: .7rem !important;
  }
}

:root {
  --header-height: 72px;
  --stats-height: 40px;
  --brand-blue: #1d73ff;
  --brand-navy: #0f1f3d;
  --brand-sky: #e7f0ff;
  --card-border: rgba(15, 23, 42, .08);
}

.btn {
  border: 1px solid var(--card-border);
  color: #0f172a;
  cursor: pointer;
  background: #fff;
  border-radius: 10px;
  justify-content: center;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 10px 16px;
  font-weight: 600;
  transition: transform .15s, box-shadow .15s, background .15s;
  display: inline-flex;
}

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

.btn-primary {
  background: linear-gradient(120deg,var(--brand-blue),#1b4fd9);
  color: #fff;
  border: none;
  box-shadow: 0 10px 30px rgba(29, 115, 255, .35);
}

.btn-secondary {
  color: #0f172a;
  background: #f8fafc;
}

.btn-secondary.danger {
  color: #b91c1c;
  background: #fff7f7;
  border-color: #fee2e2;
}

.panel {
  border: 1px solid var(--card-border);
  background: rgba(255, 255, 255, .92);
  border-radius: 18px;
  margin-bottom: 32px;
  padding: 20px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .08);
}

.panel-header {
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  display: flex;
}

.panel-header h1, .panel-header h2, .panel-header h3 {
  letter-spacing: -.01em;
  margin: 0;
  font-weight: 700;
}

.panel-eyebrow {
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #4b5563;
  margin: 0;
  font-size: 12px;
}

.panel-actions {
  flex-wrap: wrap;
  gap: 8px;
  display: flex;
}

.notice {
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  margin-bottom: 12px;
  padding: 12px 14px;
}

.notice.error {
  color: #b91c1c;
  background: #fff7f7;
  border-color: #fecaca;
}

.notice.success {
  color: #166534;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.ai-content-notice {
  background: rgba(239, 246, 255, .85);
  border-color: rgba(59, 130, 246, .25);
  gap: 10px;
  display: grid;
}

.ai-content-notice__head {
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  display: flex;
}

.ai-content-notice__dismiss {
  color: #0f172a;
  cursor: pointer;
  white-space: nowrap;
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(15, 23, 42, .14);
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 800;
}

.ai-content-notice__body {
  color: #0f172a;
  line-height: 1.4;
}

.ai-content-notice__details summary {
  cursor: pointer;
  color: #1e40af;
  font-weight: 800;
}

.ai-content-notice__more {
  color: #0f172a;
  margin-top: 8px;
}

.ai-content-notice__more ul {
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  display: grid;
}

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

.info-item {
  border: 1px solid var(--card-border);
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px;
}

.info-value {
  color: #0f172a;
  margin: 4px 0 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.subdued {
  color: #6b7280;
  margin: 0;
}

.input, .form-group input {
  color: #0f172a;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  outline: none;
  width: 100%;
  padding: 10px 12px;
}

.input::-webkit-input-placeholder {
  color: #999;
}

.input::placeholder {
  color: #999;
}

.form-group input::-webkit-input-placeholder {
  color: #999;
}

.form-group input::placeholder {
  color: #999;
}

textarea::-webkit-input-placeholder {
  color: #999;
}

textarea::placeholder {
  color: #999;
}

.input:focus, .form-group input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .16);
}

.form-group {
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  display: flex;
}

.password-input-wrapper {
  align-items: center;
  display: flex;
  position: relative;
}

.password-input-wrapper input {
  padding-right: 45px;
}

.password-toggle {
  cursor: pointer;
  color: #6b7280;
  z-index: 1;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  background: none;
  border: none;
  justify-content: center;
  align-items: center;
  padding: 4px 8px;
  font-size: 16px;
  line-height: 1;
  transition: color .2s;
  display: flex;
  position: absolute;
  right: 12px;
}

.password-toggle:hover {
  color: #2563eb;
}

.password-toggle:focus {
  outline-offset: 2px;
  border-radius: 4px;
  outline: 2px solid #2563eb;
}

.password-toggle:active {
  color: #1d4ed8;
}

.form-group span, label {
  color: #0b1530;
  font-weight: 600;
}

.form-subtitle {
  color: #4b5563;
  margin: 0 0 12px;
}

.field-error, .form-info {
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 12px 14px;
  font-size: .9rem;
}

.form-error {
  color: #b91c1c;
  margin: 6px 0 10px;
  font-size: .9rem;
  line-height: 1.35;
  display: block;
}

.form-success {
  color: #15803d;
  margin: 6px 0 10px;
  font-size: .9rem;
  line-height: 1.35;
  display: block;
}

.table-wrapper {
  overflow: auto;
}

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

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

.pixel-table th:first-child, .pixel-table td:first-child {
  width: 110px;
}

.pixel-table th:nth-child(2), .pixel-table td:nth-child(2) {
  width: 160px;
}

.pixel-table th:nth-child(3), .pixel-table td:nth-child(3) {
  text-align: center;
  width: 80px;
}

.pixel-table th button {
  font: inherit;
  cursor: pointer;
  background: none;
  border: none;
  font-weight: 700;
}

.table-actions {
  flex-wrap: wrap;
  gap: 6px;
  display: flex;
}

.color-chip {
  border: 1px solid var(--card-border);
  border-radius: 50%;
  width: 12px;
  height: 12px;
  margin: auto;
  display: inline-block;
}

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

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

.settings-card {
  border: 1px solid var(--card-border);
  background: #f8fafc;
  border-radius: 12px;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  display: flex;
}

.settings-card.danger {
  background: #fff7f7;
  border-color: #fecaca;
}

.dialog-backdrop {
  z-index: 50;
  background: rgba(15, 23, 42, .35);
  justify-content: center;
  align-items: center;
  padding: 16px;
  display: flex;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.dialog-card {
  border: 1px solid var(--card-border);
  background: #fff;
  border-radius: 16px;
  width: min(520px, 90vw);
  padding: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .2);
}

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

.dialog-body {
  flex-direction: column;
  gap: 10px;
  display: flex;
}

.dialog-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  display: flex;
}

.avatar-placeholder {
  border: 1px solid var(--card-border);
  background: linear-gradient(140deg, #e0e7ff, #dbeafe);
  border-radius: 50%;
  align-items: center;
  justify-items: center;
  width: 46px;
  height: 46px;
  display: grid;
}

.account-chip {
  border: 1px solid var(--card-border);
  background: #f8fafc;
  border-radius: 12px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  display: flex;
}

.chip-title {
  font-weight: 700;
}

.chip-subtitle {
  color: #6b7280;
  font-size: .9rem;
}

.chip-action {
  color: var(--brand-blue);
  cursor: pointer;
  background: none;
  border: none;
  margin-left: auto;
  font-weight: 700;
}

.palette-row {
  flex-wrap: wrap;
  gap: 6px;
  display: flex;
}

.palette-swatch {
  border: 1px solid var(--card-border);
  border-radius: 6px;
  width: 28px;
  height: 28px;
}

.search-input {
  min-width: 280px;
}

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

.pixel-card {
  border: 1px solid var(--card-border);
  background: #fff;
  border-radius: 12px;
  transition: transform .2s, box-shadow .2s;
  overflow: hidden;
}

.pixel-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
}

.pixel-card-image {
  aspect-ratio: 1;
  cursor: pointer;
  background: #f8fafc;
  width: 100%;
  overflow: hidden;
}

.pixel-card-image img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.pixel-card-placeholder {
  color: #94a3b8;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  font-size: .9rem;
  display: flex;
}

.pixel-card-info {
  padding: 12px;
}

.pixel-card-title {
  color: #0f172a;
  margin-bottom: 4px;
  font-size: 1rem;
  font-weight: 700;
}

.pixel-card-coords {
  color: #64748b;
  margin-bottom: 8px;
  font-size: .85rem;
}

.pixel-card-link {
  color: var(--brand-blue);
  word-break: break-all;
  font-size: .85rem;
  text-decoration: underline;
}

.pixel-card-actions {
  border-top: 1px solid var(--card-border);
  gap: 8px;
  padding: 12px;
  display: flex;
}

@media (max-width: 768px) {
  .btn {
    min-height: 44px;
    padding: 10px 14px;
    font-size: .95rem;
  }

  .panel {
    border-radius: 14px;
    margin-bottom: 16px;
    padding: 16px;
  }

  .panel-header h1, .panel-header h2, .panel-header h3 {
    font-size: 1.2rem;
  }

  .info-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
  }

  .info-item {
    padding: 10px;
  }

  .info-value {
    font-size: 1rem;
  }

  .dialog-card {
    width: min(95vw, 520px);
    max-height: 85vh;
    padding: 16px;
  }

  .dialog-header h3 {
    font-size: 1.2rem;
  }

  .form-group {
    margin-bottom: 10px;
  }

  .form-group input, .form-group textarea {
    min-height: 44px;
    padding: 12px;
    font-size: 16px;
  }

  .table-wrapper {
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
  }

  .pixel-table {
    min-width: 600px;
  }

  .pixel-table th, .pixel-table td {
    padding: 8px 6px;
    font-size: .9rem;
  }

  .settings-grid, .analytics-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .page-section {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .btn {
    padding: 10px 12px;
    font-size: .9rem;
  }

  .panel {
    border-radius: 12px;
    padding: 12px;
  }

  .panel-header h1, .panel-header h2, .panel-header h3 {
    font-size: 1.1rem;
  }

  .panel-eyebrow {
    font-size: 11px;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .info-value {
    font-size: .95rem;
  }

  .dialog-card {
    border-radius: 12px;
    width: 95vw;
    padding: 14px;
  }

  .dialog-header h3 {
    font-size: 1.1rem;
  }

  .form-group input, .form-group textarea {
    padding: 10px;
  }

  .pixel-table th, .pixel-table td {
    padding: 6px 4px;
    font-size: .85rem;
  }

  .page-section {
    padding: 12px;
  }

  .search-input {
    width: 100%;
    min-width: 0;
  }
}

.auth-card {
  background: rgba(255, 255, 255, .98);
  border-radius: 24px;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 1100px;
  min-height: 650px;
  display: grid;
  overflow: hidden;
  box-shadow: 0 25px 70px rgba(0, 0, 0, .15), 0 0 0 1px rgba(0, 0, 0, .05);
}

@media (max-width: 900px) {
  .auth-card {
    border-radius: 20px;
    grid-template-columns: 1fr;
    max-width: 500px;
    min-height: auto;
  }
}

.auth-left {
  color: #fff;
  background: linear-gradient(135deg, #1d73ff 0%, #1b4fd9 50%, #0f4ba0 100%);
  flex-direction: column;
  justify-content: center;
  padding: 56px 48px;
  display: flex;
  position: relative;
  overflow: hidden;
}

.auth-left:before {
  content: "";
  filter: blur(60px);
  background: rgba(255, 255, 255, .1);
  border-radius: 50%;
  width: 300px;
  height: 300px;
  position: absolute;
  top: -50%;
  right: -20%;
}

.auth-left h1 {
  color: #fff;
  z-index: 1;
  margin-bottom: 20px;
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.2;
  position: relative;
}

.auth-left p {
  opacity: .95;
  z-index: 1;
  font-size: 1.15rem;
  line-height: 1.7;
  position: relative;
}

.auth-right {
  background: #fff;
  flex-direction: column;
  justify-content: center;
  padding: 56px 48px;
  display: flex;
}

@media (max-width: 900px) {
  .auth-left {
    min-height: 220px;
    padding: 40px 32px;
  }

  .auth-left h1 {
    margin-bottom: 12px;
    font-size: 2.25rem;
  }

  .auth-left p {
    font-size: 1rem;
  }

  .auth-right {
    padding: 40px 32px;
  }
}

@media (max-width: 480px) {
  .auth-left {
    min-height: 180px;
    padding: 28px 20px;
  }

  .auth-left h1 {
    font-size: 1.9rem;
  }

  .auth-right {
    padding: 24px 20px;
  }
}

.auth-form {
  width: 100%;
  max-width: 100%;
}

.auth-form h2 {
  color: #0f172a;
  letter-spacing: -.02em;
  margin-bottom: 8px;
  font-size: 1.875rem;
  font-weight: 700;
}

.auth-form .form-subtitle {
  color: #64748b;
  margin-bottom: 28px;
  font-size: .95rem;
  line-height: 1.5;
}

.auth-form .btn {
  width: 100%;
  margin-top: 0;
}

.auth-form .form-group .btn-secondary {
  color: #1e293b;
  background: #fff;
  border: 2px solid #e2e8f0;
  flex: 1;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 600;
  transition: all .2s;
  display: flex;
}

.social-buttons {
  flex-wrap: wrap;
  gap: 12px;
  display: flex;
}

.social-button {
  flex: calc(50% - 6px);
  min-width: 200px;
}

@media (max-width: 480px) {
  .social-button {
    flex: 100%;
    min-width: 0;
  }
}

.auth-form .form-group .btn-secondary:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.auth-form .form-group .btn-secondary:disabled {
  opacity: .5;
  cursor: not-allowed;
  color: #94a3b8;
  background: #f1f5f9;
}

.auth-form .divider {
  text-align: center;
  align-items: center;
  margin: 24px 0;
  display: flex;
  position: relative;
}

.auth-form .form-group:has(.btn-secondary) + .divider {
  text-align: center;
  align-items: center;
  margin: 24px 0;
  display: flex;
  position: relative;
}

.auth-form .divider:before, .auth-form .divider:after {
  content: "";
  background: #e2e8f0;
  flex: 1;
  height: 1px;
}

.auth-form .divider span {
  color: #94a3b8;
  background: #fff;
  padding: 0 16px;
  font-size: .875rem;
  font-weight: 500;
}

.auth-form a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
  transition: color .2s;
}

.auth-form a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.auth-form .form-subtitle a {
  font-weight: 600;
}

.auth-form input {
  border: 2px solid #e2e8f0;
  transition: all .2s;
}

.auth-form input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .1);
}

.auth-form input:disabled {
  cursor: not-allowed;
  opacity: .7;
  background: #f8fafc;
}

.auth-form .btn-primary {
  margin-top: 8px;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 600;
  transition: all .2s;
}

.auth-form .btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(29, 115, 255, .4);
}

.auth-form .btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.auth-form .form-group {
  margin-bottom: 20px;
}

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

.grid-screen {
  background: #f9fbff;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.grid-stage {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.grid-canvas-wrapper {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.info-bar-wrapper {
  z-index: 10;
  width: 100%;
  position: relative;
}

.stats-bar {
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, .95);
  border-bottom: 1px solid rgba(0, 0, 0, .08);
  justify-content: space-between;
  align-items: center;
  height: 50px;
  padding: 0 32px;
  display: flex;
}

.stats-content--mobile {
  flex-wrap: nowrap;
  gap: 10px;
}

.stats-bar--mobile, body.is-mobile .stats-bar {
  height: auto;
  min-height: 46px;
  padding: 8px 12px;
}

body.is-mobile .stat-item {
  font-size: .9rem;
}

.stats-content {
  flex-wrap: wrap;
  flex: 1;
  align-items: center;
  gap: 24px;
  display: flex;
}

.stat-item {
  color: #475569;
  align-items: center;
  gap: 6px;
  font-size: .9rem;
  display: flex;
}

.stats-content--mobile {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  display: flex;
}

.stats-content--mobile .quality-details {
  display: none;
}

.stats-content--mobile .help-button-inline {
  margin-left: 0;
}

.stat-item strong {
  color: #1e40af;
  font-weight: 600;
}

.stat-item-quality {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  display: flex;
}

.quality-label {
  color: #64748b;
}

.quality-value {
  color: #10b981;
  font-weight: 700;
}

.quality-details {
  color: #94a3b8;
  margin-left: 4px;
  font-size: .85rem;
}

.counter-gold {
  color: #b8860b;
  font-weight: 700;
}

.help-button-inline {
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  touch-action: manipulation;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 6px 12px;
  font-size: .85rem;
  font-weight: 600;
  transition: all .2s;
  display: flex;
}

body.is-mobile .help-button-inline, .stats-bar--mobile .help-button-inline {
  min-height: 44px;
  padding: 10px 12px;
}

.help-button-inline:hover {
  color: #2563eb;
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.help-overlay-backdrop {
  z-index: 20000;
  background: rgba(2, 6, 23, .6);
  justify-content: center;
  align-items: center;
  padding: 16px;
  display: flex;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.help-overlay-card {
  background: rgba(255, 255, 255, .98);
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 16px;
  width: min(760px, 100%);
  max-height: 86vh;
  padding: 16px;
  overflow: auto;
  box-shadow: 0 24px 60px rgba(2, 6, 23, .28);
}

body.is-mobile .help-overlay-card {
  border-radius: 14px;
  padding: 14px;
}

.grid-overlay-card {
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  z-index: 20;
  background: rgba(255, 255, 255, .98);
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 16px;
  max-width: 320px;
  padding: 20px;
  position: absolute;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .12);
}

.quality-indicator {
  bottom: 20px;
  left: 20px;
}

.hover-info {
  pointer-events: none;
  z-index: 30;
  position: fixed;
}

.controls-panel {
  pointer-events: auto;
  max-width: 280px;
  top: auto;
  bottom: 20px;
  right: 20px;
}

.controls-panel ul {
  margin: 0 0 16px;
  padding: 0;
  font-size: .9rem;
  list-style: none;
}

.controls-panel li {
  color: #475569;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  display: flex;
}

.controls-panel li strong {
  color: #1e40af;
}

.quality-bar {
  background: #e2e8f0;
  border-radius: 4px;
  width: 100%;
  height: 8px;
  margin: 8px 0;
  overflow: hidden;
}

.quality-fill {
  background: linear-gradient(90deg, #10b981, #3b82f6);
  border-radius: 4px;
  height: 100%;
  transition: width .3s;
}

.grid-loader {
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 100;
  pointer-events: none;
  background: rgba(249, 251, 255, .95);
  justify-content: center;
  align-items: center;
  display: flex;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.grid-loader > div {
  text-align: center;
  color: #475569;
}

.grid-loader p:first-child {
  color: #1e40af;
  font-size: 1.1rem;
}

.grid-notice {
  z-index: 200;
  pointer-events: auto;
  max-width: 500px;
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translate(-50%);
}

.app-layout--grid {
  flex-direction: column;
  height: 100vh;
  display: flex;
  overflow: hidden;
}

.app-body--grid {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.grid-canvas {
  cursor: grab;
  touch-action: none;
  overscroll-behavior: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  background: #f9fbff;
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.grid-canvas:active {
  cursor: grabbing;
}

.grid-modal-overlay {
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 10000;
  background: rgba(0, 0, 0, .8);
  justify-content: center;
  align-items: center;
  padding: 20px;
  animation: .2s ease-out fadeIn;
  display: flex;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.grid-modal-container {
  background: linear-gradient(145deg, #1a1a2e, #16213e);
  border-radius: 20px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  animation: .3s ease-out slideUp;
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .1), inset 0 1px rgba(255, 255, 255, .05);
}

.grid-modal-close {
  cursor: pointer;
  z-index: 10;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  transition: all .2s;
  display: flex;
  position: absolute;
  top: 12px;
  right: 12px;
}

.grid-modal-close svg {
  color: rgba(255, 255, 255, .7);
  width: 18px;
  height: 18px;
  transition: color .2s;
}

.grid-modal-close:hover {
  background: rgba(255, 82, 82, .8);
  border-color: rgba(255, 82, 82, .8);
  transform: scale(1.1);
}

.grid-modal-close:hover svg {
  color: #fff;
}

.grid-modal-content {
  flex-direction: column;
  max-height: 90vh;
  display: flex;
  overflow-y: auto;
}

.grid-modal-image-section {
  background: linear-gradient(135deg, #0d0d1a, #1a1a2e);
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 200px;
  max-height: 300px;
  display: flex;
  position: relative;
  overflow: hidden;
}

.grid-modal-image {
  object-fit: contain;
  width: 100%;
  height: auto;
  max-height: 300px;
  transition: opacity .3s;
}

.grid-modal-image.is-blurred {
  filter: blur(42px) saturate(.45) contrast(.9);
  transform: scale(1.08);
}

.grid-modal-image-button {
  cursor: zoom-in;
  background: none;
  border: none;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  display: flex;
  position: relative;
}

.grid-modal-image-button.is-blurred {
  cursor: pointer;
}

.grid-modal-image-button:disabled {
  cursor: default;
}

.grid-modal-image-hint {
  color: rgba(255, 255, 255, .9);
  letter-spacing: .2px;
  background: rgba(0, 0, 0, .55);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  position: absolute;
  bottom: 10px;
  right: 10px;
}

.grid-modal-image.loading {
  opacity: 0;
}

.grid-modal-image-loader {
  justify-content: center;
  align-items: center;
  display: flex;
  position: absolute;
}

.grid-modal-safety-overlay {
  color: #fff;
  text-align: center;
  background: linear-gradient(rgba(15, 23, 42, .45), rgba(15, 23, 42, .72));
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 16px;
  display: flex;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.grid-modal-safety-title {
  letter-spacing: .2px;
  font-size: .98rem;
  font-weight: 800;
}

.grid-modal-safety-text {
  opacity: .95;
  font-size: .9rem;
  font-weight: 600;
}

.loader-spinner {
  border: 3px solid rgba(255, 255, 255, .1);
  border-top-color: #00d9ff;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: .8s linear infinite spin;
}

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

.grid-modal-image-error {
  color: rgba(255, 255, 255, .4);
  flex-direction: column;
  align-items: center;
  gap: 8px;
  display: flex;
}

.grid-modal-image-error svg {
  width: 48px;
  height: 48px;
}

.grid-modal-image-error span {
  font-size: 14px;
}

.grid-modal-info-section {
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  display: flex;
}

.grid-modal-title {
  color: #fff;
  -webkit-text-fill-color: transparent;
  background: linear-gradient(135deg, #fff, #a0a0ff);
  -webkit-background-clip: text;
  background-clip: text;
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
}

.grid-modal-available {
  background: rgba(0, 217, 255, .08);
  border: 1px solid rgba(0, 217, 255, .2);
  border-radius: 14px;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
  display: flex;
}

.grid-modal-cta {
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #ff6b35, #f7931e, #fc0);
  border: none;
  border-radius: 12px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 700;
  transition: transform .2s, box-shadow .2s;
  display: flex;
  box-shadow: 0 10px 28px rgba(255, 163, 26, .35);
}

.grid-modal-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(255, 163, 26, .45);
}

.grid-modal-secondary {
  color: rgba(255, 255, 255, .95);
  cursor: pointer;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 12px;
  width: 100%;
  padding: 12px 16px;
  font-weight: 700;
}

.grid-modal-secondary:hover {
  background: rgba(255, 255, 255, .12);
}

.grid-modal-field {
  flex-direction: column;
  gap: 8px;
  display: flex;
}

.grid-modal-field-label {
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #00d9ff;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
}

.grid-modal-field-label svg {
  width: 16px;
  height: 16px;
}

.grid-modal-field-value {
  color: rgba(255, 255, 255, .85);
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}

.grid-modal-description {
  background: rgba(255, 255, 255, .05);
  border-left: 3px solid #00d9ff;
  border-radius: 12px;
  padding: 12px 16px;
}

.grid-modal-link {
  color: #00d9ff;
  word-break: break-all;
  background: rgba(0, 217, 255, .1);
  border: 1px solid rgba(0, 217, 255, .3);
  border-radius: 10px;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all .2s;
  display: inline-flex;
}

.grid-modal-link:hover {
  background: rgba(0, 217, 255, .2);
  border-color: #00d9ff;
  transform: translate(4px);
}

.grid-modal-link .link-text {
  text-overflow: ellipsis;
  flex: 1;
  overflow: hidden;
}

.grid-modal-link svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.grid-modal-metadata {
  border-top: 1px solid rgba(255, 255, 255, .1);
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 16px;
  display: flex;
}

.grid-modal-meta-item {
  color: rgba(255, 255, 255, .7);
  background: rgba(255, 255, 255, .05);
  border-radius: 20px;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
  display: inline-flex;
}

.grid-modal-meta-item svg {
  color: rgba(255, 255, 255, .5);
  width: 14px;
  height: 14px;
}

.grid-modal-visit-button {
  color: #fff;
  background: linear-gradient(135deg, #00d9ff, #07f);
  border-radius: 12px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all .3s;
  display: flex;
  box-shadow: 0 4px 15px rgba(0, 217, 255, .3);
}

.grid-modal-visit-button:hover {
  background: linear-gradient(135deg, #00e5ff, #08f);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 217, 255, .4);
}

.grid-modal-visit-button svg {
  width: 18px;
  height: 18px;
  transition: transform .2s;
}

.grid-modal-visit-button:hover svg {
  transform: translate(4px);
}

.grid-modal-report {
  gap: 10px;
  margin-top: 12px;
  display: grid;
}

.grid-modal-report-label {
  color: #475569;
  gap: 6px;
  font-size: .9rem;
  display: grid;
}

.grid-modal-report select, .grid-modal-report textarea {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .18);
  border-radius: 10px;
  width: 100%;
  padding: 10px 12px;
  font-size: .95rem;
}

.grid-modal-report-status {
  border-radius: 10px;
  margin-top: 12px;
  padding: 8px 10px;
  font-size: .9rem;
}

.grid-modal-report-status.success {
  color: #166534;
  background: #ecfdf3;
}

.grid-modal-report-status.error {
  color: #991b1b;
  background: #fef2f2;
}

.grid-modal-content::-webkit-scrollbar {
  width: 6px;
}

.grid-modal-content::-webkit-scrollbar-track {
  background: none;
}

.grid-modal-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .2);
  border-radius: 3px;
}

.grid-modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, .3);
}

@media (max-width: 640px) {
  .grid-modal-overlay {
    padding: 10px;
  }

  .grid-modal-container {
    border-radius: 16px;
    max-height: 95vh;
  }

  .grid-modal-info-section {
    padding: 20px 16px;
  }

  .grid-modal-title {
    font-size: 20px;
  }

  .grid-modal-metadata {
    gap: 8px;
  }

  .grid-modal-meta-item {
    padding: 5px 10px;
    font-size: 12px;
  }
}

.grid-modal-full-overlay {
  z-index: 10001;
  background: rgba(0, 0, 0, .9);
  justify-content: center;
  align-items: center;
  padding: 18px;
  display: flex;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.grid-modal-full-content {
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: min(1200px, 96vw);
  max-height: 92vh;
  display: flex;
}

.grid-modal-full-image {
  object-fit: contain;
  background: rgba(255, 255, 255, .03);
  border-radius: 14px;
  width: 100%;
  height: auto;
  max-height: 82vh;
}

.grid-modal-full-close {
  color: rgba(255, 255, 255, .95);
  cursor: pointer;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 700;
  position: absolute;
  top: 14px;
  right: 14px;
}

.grid-modal-full-actions {
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  display: flex;
}

.grid-modal-full-link {
  color: #00d9ff;
  font-weight: 700;
  text-decoration: underline;
}

.grid-modal-full-meta {
  color: rgba(255, 255, 255, .8);
  font-size: 13px;
  font-weight: 600;
}

.dashboard-shell {
  background: radial-gradient(circle at 20% 20%, #f5f8ff 0%, #eef3ff 40%, #fff 75%);
  grid-template-columns: 260px 1fr;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  display: grid;
}

.dash-sidebar {
  border: 1px solid var(--card-border);
  top: calc(var(--header-height) + 12px);
  background: rgba(255, 255, 255, .95);
  border-radius: 18px;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  display: flex;
  position: -webkit-sticky;
  position: sticky;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .08);
}

.sidebar-header h2 {
  margin: 4px 0 0;
}

.sidebar-nav {
  flex-direction: column;
  gap: 8px;
  display: flex;
}

.sidebar-link {
  text-align: left;
  border: 1px solid var(--card-border);
  cursor: pointer;
  background: #f8fafc;
  border-radius: 12px;
  width: 100%;
  padding: 10px 12px;
  font-weight: 700;
}

.sidebar-link.active {
  border-color: var(--brand-blue);
  color: #0f172a;
  background: linear-gradient(120deg, #f0f5ff, #e0ebff);
  box-shadow: 0 10px 24px rgba(29, 115, 255, .18);
}

.sidebar-footer {
  margin-top: auto;
}

.dash-sidebar .btn {
  border: none;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 44px;
  padding: 0 14px;
  line-height: 44px;
  transition: background .15s, box-shadow .15s, color .15s;
  display: flex;
}

.dash-sidebar .btn:hover {
  transform: none;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
}

.dash-sidebar .btn:active {
  transform: none;
}

.dash-main {
  flex-direction: column;
  gap: 12px;
  display: flex;
}

.dash-header {
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  display: flex;
}

.link {
  color: var(--brand-blue);
  text-decoration: underline;
}

@media (max-width: 900px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px 16px;
  }

  .dash-sidebar {
    flex-flow: wrap;
    padding: 12px;
    position: relative;
    top: 0;
  }

  .sidebar-nav {
    flex-flow: wrap;
    gap: 6px;
  }

  .sidebar-link {
    flex: 1;
    min-width: 120px;
    padding: 8px 10px;
    font-size: .9rem;
  }

  .search-input {
    width: 100%;
    min-width: 0;
  }

  .dash-main {
    gap: 10px;
  }

  .panel {
    margin-bottom: 16px;
    padding: 16px;
  }

  .dash-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .account-chip {
    flex-wrap: wrap;
    width: 100%;
  }

  .info-grid, .analytics-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .settings-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .pixels-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    display: grid;
  }

  .pixel-card {
    width: 100%;
  }

  .pixel-card-actions {
    flex-direction: column;
    gap: 8px;
  }

  .pixel-card-actions .btn {
    width: 100%;
    min-height: 44px;
  }
}

@media (max-width: 480px) {
  .dashboard-shell {
    padding: 8px 12px;
  }

  .dash-sidebar {
    padding: 10px;
  }

  .sidebar-link {
    flex: calc(50% - 3px);
    min-width: 0;
    padding: 6px 8px;
    font-size: .85rem;
  }

  .panel {
    border-radius: 12px;
    padding: 12px;
  }

  .panel-header h1, .panel-header h2, .panel-header h3 {
    font-size: 1.1rem;
  }

  .panel-eyebrow {
    font-size: 11px;
  }

  .info-value {
    font-size: .95rem;
  }

  .dash-header h1 {
    font-size: 1.3rem;
  }
}

.checkout-page {
  min-height: calc(100vh - var(--header-height, 72px));
  background: radial-gradient(circle at 20% 20%, #f5f8ff 0%, #eef3ff 40%, #fff 75%);
  padding: 24px;
}

.checkout-hero {
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  display: flex;
}

.checkout-hero h1 {
  letter-spacing: -.01em;
  color: #0f172a;
  margin: 0;
  font-size: 32px;
}

.checkout-hero .subtitle {
  color: #475569;
  margin: 4px 0 0;
}

.reservation-pill {
  color: #fff;
  background: linear-gradient(120deg, #1d73ff, #1b4fd9);
  border-radius: 12px;
  flex-direction: column;
  align-items: flex-start;
  min-width: 120px;
  padding: 10px 14px;
  display: inline-flex;
  box-shadow: 0 12px 28px rgba(37, 99, 235, .25);
}

.reservation-pill span {
  text-transform: uppercase;
  letter-spacing: .08em;
  opacity: .9;
  font-size: 12px;
}

.reservation-pill strong {
  font-size: 18px;
}

.checkout-grid {
  grid-template-columns: 2fr 1fr;
  gap: 18px;
  display: grid;
}

.checkout-column {
  flex-direction: column;
  gap: 14px;
  display: flex;
}

.step-card, .summary-card, .info-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .06);
}

.step-header {
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  display: flex;
}

.step-label {
  color: #0f172a;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: #e2e8f0;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
}

.reservation-details {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  display: grid;
}

.muted {
  color: #6b7280;
  font-size: .9rem;
}

.value {
  color: #0f172a;
  font-weight: 700;
}

.tabs {
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 12px;
  margin-bottom: 12px;
  display: inline-flex;
  overflow: hidden;
}

.tab {
  cursor: pointer;
  color: #0f172a;
  background: #f8fafc;
  border: none;
  padding: 10px 14px;
}

.tab.active {
  color: #fff;
  background: #1d73ff;
}

.tab-panel {
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 12px;
  padding: 12px;
}

.info-card {
  color: #0f172a;
}

.info-card.error {
  color: #b91c1c;
  background: #fff7f7;
  border-color: #fecaca;
}

.info-card.success {
  color: #166534;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.summary-card ul {
  color: #475569;
  margin: 0;
  padding-left: 18px;
}

.upload-card {
  color: #0f172a;
  background: #f8fafc;
  border: 1px dashed rgba(15, 23, 42, .12);
  border-radius: 12px;
  padding: 12px;
}

@media (max-width: 900px) {
  .checkout-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .checkout-page {
    padding: 16px;
  }

  .checkout-hero {
    margin-bottom: 16px;
  }

  .checkout-hero h1 {
    font-size: 1.75rem;
  }

  .checkout-hero .subtitle {
    font-size: .9rem;
  }

  .checkout-grid {
    gap: 12px;
  }

  .step-card, .summary-card, .info-card {
    border-radius: 12px;
    padding: 14px;
  }

  .step-header {
    flex-wrap: wrap;
    gap: 8px;
  }

  .step-label {
    padding: 3px 6px;
    font-size: 11px;
  }

  .reservation-pill {
    min-width: 100px;
    padding: 8px 12px;
  }

  .reservation-pill span {
    font-size: 11px;
  }

  .reservation-pill strong {
    font-size: 16px;
  }

  .reservation-details {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .tabs {
    flex-wrap: wrap;
    width: 100%;
  }

  .tab {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    font-size: .9rem;
  }

  .tab-panel {
    padding: 10px;
  }
}

@media (max-width: 480px) {
  .checkout-page {
    padding: 12px;
  }

  .checkout-hero h1 {
    font-size: 1.5rem;
  }

  .checkout-hero .subtitle {
    font-size: .85rem;
  }

  .step-card, .summary-card, .info-card {
    padding: 12px;
  }

  .step-header h3 {
    font-size: 1.1rem;
  }

  .reservation-pill {
    width: 100%;
    min-width: 0;
  }
}

.reactEasyCrop_Container {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  touch-action: none;
  cursor: move;
  justify-content: center;
  align-items: center;
  display: flex;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  overflow: hidden;
}

.reactEasyCrop_Image, .reactEasyCrop_Video {
  will-change: transform;
}

.reactEasyCrop_Contain {
  max-width: 100%;
  max-height: 100%;
  margin: auto;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.reactEasyCrop_Cover_Horizontal {
  width: 100%;
  height: auto;
}

.reactEasyCrop_Cover_Vertical {
  width: auto;
  height: 100%;
}

.reactEasyCrop_CropArea {
  box-sizing: border-box;
  color: rgba(0, 0, 0, .5);
  border: 1px solid rgba(255, 255, 255, .5);
  position: absolute;
  top: 50%;
  left: 50%;
  overflow: hidden;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 9999em;
}

.reactEasyCrop_CropAreaRound {
  border-radius: 50%;
}

.reactEasyCrop_CropAreaGrid:before {
  content: " ";
  box-sizing: border-box;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, .5);
  border-right: 1px solid rgba(255, 255, 255, .5);
  position: absolute;
  top: 0;
  bottom: 0;
  left: 33.33%;
  right: 33.33%;
}

.reactEasyCrop_CropAreaGrid:after {
  content: " ";
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, .5);
  border-left: 0;
  border-right: 0;
  position: absolute;
  top: 33.33%;
  bottom: 33.33%;
  left: 0;
  right: 0;
}

.admin-layout {
  background: #f5f5f5;
  flex-direction: column;
  min-height: 100vh;
  display: flex;
}

.admin-header {
  color: #fff;
  background: linear-gradient(135deg, #062964 0%, #0a4bb3 100%);
  border-bottom: 1px solid rgba(255, 255, 255, .18);
  padding: 1rem 2rem;
}

.admin-header-content {
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
}

.admin-header-left {
  align-items: center;
  gap: 1rem;
  display: flex;
}

.admin-logo {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.admin-badge {
  color: #fff;
  text-transform: uppercase;
  background: #4a9eff;
  border-radius: 4px;
  padding: .25rem .75rem;
  font-size: .75rem;
  font-weight: 600;
}

.admin-header-right {
  align-items: center;
  gap: 1rem;
  display: flex;
}

.admin-shortcuts {
  align-items: center;
  gap: .5rem;
  display: flex;
}

.admin-user-info {
  color: #ccc;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 240px;
  font-size: .9rem;
  overflow: hidden;
}

.admin-btn-secondary {
  color: #fff;
  cursor: pointer;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 4px;
  padding: .5rem 1rem;
  font-size: .9rem;
  transition: background .2s;
}

.admin-btn-secondary:hover {
  background: rgba(255, 255, 255, .18);
}

.admin-container {
  flex: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
}

.admin-sidebar {
  background: #fff;
  border-right: 1px solid #ddd;
  width: 250px;
  padding: 2rem 0;
}

.admin-nav {
  flex-direction: column;
  gap: .25rem;
  padding: 0 1rem;
  display: flex;
}

.admin-nav-link {
  color: #333;
  border-radius: 4px;
  padding: .75rem 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .2s;
}

.admin-nav-link:hover {
  background: #f0f0f0;
}

.admin-nav-link.active {
  color: #fff;
  background: #4a9eff;
}

.admin-main {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}

body.admin-menu-open {
  overflow: hidden;
}

.admin-card {
  background: #fff;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
}

.admin-card h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.admin-stats {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
  display: grid;
}

.admin-stat-card {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
}

.admin-stat-card h3 {
  color: #666;
  margin: 0 0 .5rem;
  font-size: .9rem;
  font-weight: 500;
}

.admin-stat-card .value {
  color: #333;
  font-size: 2rem;
  font-weight: 700;
}

.admin-table {
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
}

.admin-table th {
  text-align: left;
  color: #666;
  background: #f5f5f5;
  border-bottom: 1px solid #ddd;
  padding: .75rem 1rem;
  font-size: .9rem;
  font-weight: 600;
}

.admin-table td {
  border-bottom: 1px solid #eee;
  padding: .75rem 1rem;
}

.admin-table tr:hover {
  background: #f9f9f9;
}

.admin-btn {
  color: #fff;
  cursor: pointer;
  background: #4a9eff;
  border: none;
  border-radius: 4px;
  padding: .5rem 1rem;
  font-size: .9rem;
  font-weight: 500;
  transition: background .2s;
}

.admin-btn:hover {
  background: #3a8eef;
}

.admin-btn-danger {
  background: #ef4444;
}

.admin-btn-danger:hover {
  background: #dc2626;
}

.admin-btn-success {
  background: #10b981;
}

.admin-btn-success:hover {
  background: #059669;
}

.admin-form-group {
  margin-bottom: 1rem;
}

.admin-form-group label {
  color: #333;
  margin-bottom: .5rem;
  font-weight: 500;
  display: block;
}

.admin-form-group input, .admin-form-group textarea, .admin-form-group select {
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 100%;
  padding: .5rem;
  font-size: .9rem;
}

.admin-form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.admin-badge-status {
  text-transform: uppercase;
  border-radius: 4px;
  padding: .25rem .75rem;
  font-size: .75rem;
  font-weight: 600;
  display: inline-block;
}

.admin-badge-pending {
  color: #92400e;
  background: #fef3c7;
}

.admin-badge-approved {
  color: #065f46;
  background: #d1fae5;
}

.admin-badge-rejected {
  color: #991b1b;
  background: #fee2e2;
}

.admin-badge-hidden {
  color: #374151;
  background: #e5e7eb;
}

.admin-badge-risk-high {
  color: #991b1b;
  background: #fee2e2;
}

.admin-badge-risk-medium {
  color: #92400e;
  background: #fef3c7;
}

.admin-badge-risk-low {
  color: #065f46;
  background: #d1fae5;
}

@media (max-width: 768px) {
  .admin-header {
    z-index: 900;
    padding: .75rem 1rem;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
  }

  .admin-header-content {
    flex-wrap: nowrap;
    align-items: center;
    gap: .75rem;
  }

  .admin-header-left {
    flex: 1;
    gap: .75rem;
    min-width: 0;
  }

  .admin-header-right {
    flex-wrap: nowrap;
    flex-shrink: 0;
    gap: .5rem;
  }

  .admin-shortcuts {
    display: none;
  }

  .admin-logo {
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 1.1rem;
    overflow: hidden;
  }

  .admin-badge {
    white-space: nowrap;
    padding: .2rem .5rem;
    font-size: .65rem;
  }

  .admin-user-info {
    display: none;
  }

  .admin-btn-secondary {
    white-space: nowrap;
    min-width: auto;
    padding: .5rem .75rem;
    font-size: .85rem;
  }

  .admin-container {
    flex-direction: column;
  }

  .admin-sidebar {
    z-index: 1001;
    background: #fff;
    border-right: 1px solid #ddd;
    width: min(85vw, 300px);
    padding: 3.5rem 0 1rem;
    transition: transform .3s cubic-bezier(.4, 0, .2, 1);
    display: block;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translate(-100%);
    box-shadow: 2px 0 12px rgba(0, 0, 0, .1);
  }

  .admin-sidebar.mobile-open {
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
    transform: translate(0);
    box-shadow: 2px 0 20px rgba(0, 0, 0, .15);
  }

  .admin-main {
    width: 100%;
    min-height: calc(100vh - 80px);
    padding: 1rem;
    overflow-x: hidden;
  }

  .admin-nav {
    flex-direction: column;
    gap: .25rem;
    padding: 0 .75rem;
  }

  .admin-nav-link {
    border-radius: 8px;
    align-items: center;
    min-height: 44px;
    padding: .875rem 1rem;
    font-size: .95rem;
    display: flex;
  }

  .admin-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .admin-table {
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    display: block;
    overflow-x: auto;
  }

  .admin-table th, .admin-table td {
    min-width: 100px;
    padding: .625rem .5rem;
    font-size: .85rem;
  }

  .admin-btn, .admin-btn-secondary {
    touch-action: manipulation;
    border-radius: 8px;
    min-height: 44px;
    padding: .75rem 1rem;
    font-size: .95rem;
  }

  .admin-card {
    border-radius: 12px;
    margin-bottom: 1rem;
    padding: 1.25rem;
  }

  .admin-card h2 {
    margin-bottom: 1rem;
    font-size: 1.15rem;
  }
}

.mobile-menu-toggle {
  color: #fff;
  cursor: pointer;
  touch-action: manipulation;
  background: rgba(255, 255, 255, .2);
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 6px;
  justify-content: center;
  align-items: center;
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: .5rem;
  font-size: 1.25rem;
  transition: background .2s;
  display: flex;
}

.mobile-menu-toggle:hover, .mobile-menu-toggle:active {
  background: rgba(255, 255, 255, .3);
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .admin-sidebar {
    position: relative;
  }

  .admin-sidebar .mobile-menu-close {
    color: #fff;
    cursor: pointer;
    z-index: 10;
    touch-action: manipulation;
    background: #ef4444;
    border: none;
    border-radius: 6px;
    justify-content: center;
    align-items: center;
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    padding: .5rem;
    font-size: 1.1rem;
    transition: background .2s;
    display: flex;
    position: absolute;
    top: 1rem;
    right: 1rem;
  }

  .admin-sidebar .mobile-menu-close:hover, .admin-sidebar .mobile-menu-close:active {
    background: #dc2626;
  }
}

.mobile-nav-overlay {
  z-index: 1000;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  cursor: pointer;
  background: rgba(15, 23, 42, .45);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

@media (max-width: 480px) {
  .admin-header {
    padding: .625rem .75rem;
  }

  .admin-header-content {
    gap: .5rem;
  }

  .admin-logo {
    font-size: 1rem;
  }

  .admin-badge {
    padding: .15rem .4rem;
    font-size: .6rem;
  }

  .admin-user-info {
    display: none;
  }

  .admin-btn-secondary {
    padding: .5rem .625rem;
    font-size: .8rem;
  }

  .mobile-menu-toggle {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    padding: .375rem;
    font-size: 1.1rem;
  }

  .admin-main {
    padding: .75rem;
  }

  .admin-card {
    padding: 1rem;
  }

  .admin-card h2 {
    font-size: 1.1rem;
  }

  .admin-nav-link {
    padding: .75rem .875rem;
    font-size: .9rem;
  }
}

@supports (-webkit-touch-callout: none) {
  .admin-sidebar, .admin-main {
    -webkit-overflow-scrolling: touch;
  }

  .admin-layout {
    min-height: -webkit-fill-available;
  }

  .admin-header {
    z-index: 900;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
  }

  .admin-main {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .admin-sidebar {
    padding-top: calc(3.5rem + env(safe-area-inset-top));
  }
}

@media (max-width: 768px) {
  button, .admin-btn, .admin-btn-secondary {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, .1);
  }

  .admin-main, .admin-sidebar, .admin-table-container {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .admin-table-container {
    -webkit-overflow-scrolling: touch;
    width: 100%;
    position: relative;
    overflow-x: auto;
  }

  .mobile-nav-overlay {
    z-index: 1000;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
  }
}

.admin-dashboard {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.admin-dashboard-header {
  margin-bottom: 2rem;
}

.admin-dashboard-header h1 {
  color: var(--blue-royal, #1e40af);
  margin: 0 0 .5rem;
  font-size: 2rem;
  font-weight: 700;
}

.admin-dashboard-header p {
  color: var(--gray-600, #6b7280);
  margin: 0;
}

.admin-loading, .admin-error {
  text-align: center;
  padding: 3rem;
  font-size: 1.1rem;
}

.admin-error {
  color: #dc2626;
}

.admin-stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
  display: grid;
}

.admin-stat-card {
  border: 1px solid var(--gray-200, #e5e7eb);
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
}

.admin-stat-card h3 {
  color: var(--gray-600, #6b7280);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin: 0 0 .5rem;
  font-size: .875rem;
  font-weight: 600;
}

.admin-stat-value {
  color: var(--blue-royal, #1e40af);
  margin: .5rem 0;
  font-size: 2rem;
  font-weight: 700;
}

.admin-stat-details {
  color: var(--gray-600, #6b7280);
  flex-direction: column;
  gap: .25rem;
  margin-top: .5rem;
  font-size: .875rem;
  display: flex;
}

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

.admin-section {
  border: 1px solid var(--gray-200, #e5e7eb);
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
}

.admin-section h2 {
  color: var(--blue-royal, #1e40af);
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.admin-table-container {
  overflow-x: auto;
}

.admin-table {
  border-collapse: collapse;
  width: 100%;
  font-size: .875rem;
}

.admin-table thead {
  background: var(--gray-50, #f9fafb);
  border-bottom: 2px solid var(--gray-200, #e5e7eb);
}

.admin-table th {
  text-align: left;
  color: var(--gray-700, #374151);
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .75rem;
  font-size: .75rem;
  font-weight: 600;
}

.admin-table td {
  border-bottom: 1px solid var(--gray-200, #e5e7eb);
  color: var(--gray-900, #111827);
  padding: .75rem;
}

.admin-table tbody tr:hover {
  background: var(--gray-50, #f9fafb);
}

.admin-table-meta {
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 380px;
  overflow: hidden;
}

.admin-input {
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 8px;
  min-width: 140px;
  padding: 10px 12px;
  font-size: .95rem;
}

.role-badge {
  text-transform: uppercase;
  border-radius: 4px;
  padding: .25rem .5rem;
  font-size: .75rem;
  font-weight: 600;
  display: inline-block;
}

.role-badge.admin {
  color: #92400e;
  background: #fef3c7;
}

.role-badge.user {
  color: #1e40af;
  background: #dbeafe;
}

.admin-empty {
  text-align: center;
  color: var(--gray-500, #6b7280);
  padding: 2rem;
}

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

.moderation-card {
  border: 1px solid var(--gray-200, #e5e7eb);
  background: #fff;
  border-radius: 12px;
  grid-template-rows: auto 1fr auto;
  display: grid;
  overflow: hidden;
}

.moderation-preview {
  aspect-ratio: 1.2;
  border-bottom: 1px solid var(--gray-200, #e5e7eb);
  background: #f8fafc;
  align-items: center;
  justify-items: center;
  width: 100%;
  display: grid;
}

.moderation-preview img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.moderation-preview-empty {
  color: #94a3b8;
  font-size: .9rem;
}

.moderation-body {
  color: #334155;
  gap: 8px;
  padding: 14px 16px;
  font-size: .9rem;
  display: grid;
}

.moderation-row {
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  display: flex;
}

.moderation-row--stack {
  flex-direction: column;
  align-items: flex-start;
}

.moderation-actions {
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px 16px;
  display: flex;
}

.moderation-muted {
  color: #94a3b8;
  font-size: .85rem;
}

.moderation-badge {
  text-transform: uppercase;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: .75rem;
  font-weight: 600;
}

.moderation-badge--approve {
  color: #166534;
  background: #dcfce7;
}

.moderation-badge--reject {
  color: #991b1b;
  background: #fee2e2;
}

.moderation-badge--needs_review {
  color: #9a3412;
  background: #fff7ed;
}

.report-grid {
  grid-template-columns: 1fr;
  gap: 16px;
  display: grid;
}

.report-card {
  border: 1px solid var(--gray-200, #e5e7eb);
  background: #fff;
  border-radius: 12px;
  grid-template-columns: 240px 1fr;
  display: grid;
  overflow: hidden;
}

.report-preview {
  border-right: 1px solid var(--gray-200, #e5e7eb);
  background: #f8fafc;
  align-items: center;
  justify-items: center;
  width: 100%;
  display: grid;
}

.report-preview img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.report-preview-empty {
  color: #94a3b8;
  padding: 16px;
  font-size: .9rem;
}

.report-body {
  color: #334155;
  gap: 10px;
  padding: 14px 16px;
  font-size: .92rem;
  display: grid;
}

.report-kv {
  grid-template-columns: 112px 1fr;
  align-items: start;
  gap: 10px;
  display: grid;
}

.report-kv--stack {
  grid-template-columns: 1fr;
}

.report-k {
  color: #0f172a;
  font-weight: 800;
}

.report-v {
  overflow-wrap: anywhere;
  word-break: break-word;
  color: #334155;
}

.report-v--wrap {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.report-v--pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.report-actions {
  border-top: 1px solid rgba(15, 23, 42, .08);
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 16px;
  display: flex;
}

.report-action-select {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .18);
  border-radius: 10px;
  min-height: 44px;
  padding: 10px 12px;
}

.report-note-input {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .18);
  border-radius: 10px;
  flex: 220px;
  min-width: 180px;
  min-height: 44px;
  padding: 10px 12px;
}

@media (max-width: 820px) {
  .report-card {
    grid-template-columns: 1fr;
  }

  .report-preview {
    border-right: none;
    border-bottom: 1px solid var(--gray-200, #e5e7eb);
    aspect-ratio: 1.6;
  }
}

.moderation-badge--risk-low {
  color: #166534;
  background: #dcfce7;
}

.moderation-badge--risk-medium {
  color: #92400e;
  background: #fef3c7;
}

.moderation-badge--risk-high {
  color: #991b1b;
  background: #fee2e2;
}

.moderation-badge--safety-safe {
  color: #166534;
  background: #dcfce7;
}

.moderation-badge--safety-possibly_harmful {
  color: #92400e;
  background: #fef3c7;
}

.moderation-badge--safety-harmful {
  color: #991b1b;
  background: #fee2e2;
}

.moderation-tags {
  flex-wrap: wrap;
  gap: 6px;
  display: flex;
}

.moderation-tag {
  color: #334155;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: .75rem;
}

.ai-label-meta {
  color: #64748b;
  gap: 2px;
  margin-top: 6px;
  font-size: .78rem;
  display: grid;
}

@media (max-width: 768px) {
  .admin-dashboard {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    padding: .75rem;
  }

  .admin-dashboard-header {
    margin-bottom: 1.5rem;
  }

  .admin-dashboard-header h1 {
    margin-bottom: .25rem;
    font-size: 1.5rem;
    line-height: 1.3;
  }

  .admin-dashboard-header p {
    font-size: .9rem;
  }

  .admin-stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
    margin-bottom: 1.5rem;
  }

  .admin-stat-card {
    box-sizing: border-box;
    border-radius: 12px;
    width: 100%;
    padding: 1.25rem;
  }

  .admin-stat-card h3 {
    margin-bottom: .5rem;
    font-size: .8rem;
  }

  .admin-stat-value {
    margin: .5rem 0;
    font-size: 1.75rem;
    line-height: 1.2;
  }

  .admin-stat-details {
    gap: .5rem;
    margin-top: .75rem;
    font-size: .8rem;
  }

  .admin-sections {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
  }

  .admin-section {
    box-sizing: border-box;
    border-radius: 12px;
    width: 100%;
    padding: 1.25rem;
  }

  .admin-section h2 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
  }

  .admin-table-container {
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    width: 100%;
    margin-top: .75rem;
    overflow-x: auto;
  }

  .admin-table {
    width: 100%;
    min-width: 600px;
    font-size: .8rem;
  }

  .admin-table th, .admin-table td {
    padding: .625rem .5rem;
    font-size: .8rem;
  }

  .admin-empty {
    text-align: center;
    padding: 1.5rem;
    font-size: .9rem;
  }

  .admin-loading, .admin-error {
    text-align: center;
    padding: 2rem 1rem;
    font-size: 1rem;
  }
}

@media (max-width: 640px) {
  .admin-dashboard {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    padding: .5rem;
  }

  .admin-dashboard-header {
    margin-bottom: 1rem;
  }

  .admin-dashboard-header h1 {
    font-size: 1.25rem;
    line-height: 1.3;
  }

  .admin-dashboard-header p {
    font-size: .85rem;
  }

  .admin-stats-grid {
    grid-template-columns: 1fr;
    gap: .75rem;
    margin-bottom: 1rem;
  }

  .admin-stat-card {
    min-height: auto;
    padding: 1rem;
  }

  .admin-stat-card h3 {
    margin-bottom: .5rem;
    font-size: .75rem;
  }

  .admin-stat-value {
    margin: .5rem 0;
    font-size: 1.5rem;
    line-height: 1.2;
  }

  .admin-stat-details {
    gap: .25rem;
    margin-top: .5rem;
    font-size: .75rem;
  }

  .admin-sections {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .admin-section {
    box-sizing: border-box;
    width: 100%;
    padding: 1rem;
  }

  .admin-section h2 {
    margin-bottom: .75rem;
    font-size: 1rem;
  }

  .admin-table-container {
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin-top: .5rem;
    overflow-x: auto;
  }

  .admin-table {
    width: 100%;
    min-width: 100%;
  }

  .admin-table thead {
    display: none;
  }

  .admin-table tbody {
    width: 100%;
    display: block;
  }

  .admin-table tbody tr {
    border: 1px solid var(--gray-200, #e5e7eb);
    box-sizing: border-box;
    background: #fff;
    border-radius: 12px;
    width: 100%;
    margin-bottom: 12px;
    padding: 12px;
    display: block;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
  }

  .admin-table td {
    border: none;
    border-bottom: 1px solid var(--gray-100, #f3f4f6);
    box-sizing: border-box;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    min-height: 32px;
    padding: 8px 0;
    display: flex;
  }

  .admin-table td:last-child {
    border-bottom: none;
  }

  .admin-table td:before {
    content: attr(data-label);
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--gray-600, #6b7280);
    text-align: left;
    flex: 0 0 35%;
    min-width: 0;
    font-size: .75rem;
    font-weight: 600;
  }

  .admin-table td {
    text-align: right;
    word-break: break-word;
    color: var(--gray-900, #111827);
    flex: 1;
    font-size: .85rem;
  }

  .admin-table tbody tr:hover {
    background: #f9fafb;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
  }

  .admin-table-meta {
    white-space: normal;
    text-overflow: clip;
    max-width: none;
    overflow: visible;
  }

  .admin-empty {
    text-align: center;
    padding: 1.5rem;
    font-size: .9rem;
  }

  .role-badge {
    border-radius: 6px;
    padding: .25rem .5rem;
    font-size: .7rem;
    display: inline-block;
  }

  .admin-loading, .admin-error {
    text-align: center;
    padding: 2rem 1rem;
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .btn, button[type="button"], button[type="submit"] {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 0, 0, .1);
    border-radius: 8px;
    min-width: 44px;
    min-height: 44px;
    padding: .75rem 1rem;
    font-size: .95rem;
  }

  input[type="text"], input[type="email"], input[type="search"], input[type="number"], textarea, select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    width: 100%;
    min-height: 44px;
    padding: .75rem;
    font-size: 1rem;
  }

  select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-position: right .75rem center;
    background-repeat: no-repeat;
    background-size: 12px;
    padding-right: 2.5rem;
  }

  .admin-section > div[style*="display: flex"] {
    flex-direction: column;
    gap: .75rem;
  }

  .admin-section > div[style*="display: flex"] > * {
    width: 100%;
  }

  .moderation-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .moderation-card {
    border-radius: 12px;
    overflow: hidden;
  }

  .moderation-preview {
    aspect-ratio: 1.2;
  }

  .moderation-actions {
    flex-direction: column;
    gap: .5rem;
    padding: 1rem;
  }

  .moderation-actions .btn {
    width: 100%;
  }

  .admin-section input[type="text"], .admin-section input[type="search"] {
    width: 100%;
    max-width: 100%;
  }

  label {
    align-items: center;
    gap: .5rem;
    min-height: 44px;
    padding: .5rem 0;
    font-size: .95rem;
    display: flex;
  }

  input[type="checkbox"], input[type="radio"] {
    width: 20px;
    min-width: 20px;
    height: 20px;
    min-height: 20px;
    margin: 0;
  }
}

@media (max-width: 480px) {
  .admin-dashboard-header h1 {
    font-size: 1.1rem;
  }

  .admin-dashboard-header p {
    font-size: .85rem;
  }

  .admin-stat-value {
    font-size: 1.25rem;
  }

  .moderation-body {
    padding: 12px;
    font-size: .85rem;
  }

  .moderation-row {
    gap: .5rem;
    font-size: .85rem;
  }

  .moderation-tags {
    gap: 4px;
  }

  .moderation-tag {
    padding: 2px 6px;
    font-size: .7rem;
  }
}

@media (max-width: 768px) {
  .admin-section > div[style*="display: flex"] {
    flex-direction: column !important;
    gap: .75rem !important;
  }

  .admin-section input[style*="flex"], .admin-section input[style*="maxWidth"] {
    flex: 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  input[placeholder*="Search"], input[type="search"], input[type="text"] {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  select {
    width: 100% !important;
    max-width: 100% !important;
  }

  .moderation-actions, .admin-section > div[style*="display: flex"] > button {
    width: 100% !important;
  }

  .admin-section > div[style*="display: flex"] > div[style*="color"] {
    text-align: center;
    width: 100%;
    padding: .5rem 0;
  }
}

:root {
  --blue-navy: #001f3f;
  --blue-royal: #0047ab;
  --blue-dodger: #1e90ff;
  --blue-sky: #87ceeb;
  --gold: gold;
  --amber: #ffbf00;
  --gray-soft: #f5f7fa;
  --gray-text: #b0bec5;
  --gray-600: #666;
  --surface-white: rgba(255, 255, 255, .92);
  --border-strong: rgba(15, 23, 42, .12);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, .08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, .15);
}

body {
  color: #1a1a1a;
  background: #f5f7fa;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body, #root {
  height: 100%;
}

body {
  background: var(--gray-soft, #f5f7fa);
  color: #0f172a;
  min-width: 320px;
  margin: 0;
}

a {
  color: inherit;
}
