:root {
  --pf-bg: #0A0F1E;
  --pf-surface: rgba(15, 23, 42, 0.72);
  --pf-surface-strong: rgba(17, 24, 39, 0.9);
  --pf-border: rgba(255, 255, 255, 0.08);
  --pf-border-gold: rgba(240, 180, 41, 0.28);
  --pf-blue: #3B82F6;
  --pf-emerald: #10B981;
  --pf-gold: #B8860B;
  --pf-gold-bright: #F0B429;
  --pf-text: #FFFFFF;
  --pf-text-soft: #CBD5E1;
  --pf-text-meta: #64748B;
  --pf-shadow: 0 24px 60px rgba(1, 6, 20, 0.58);
}

html.platform-root,
html.platform-root body {
  max-width: 100%;
  overflow-x: hidden;
}

body.platform-theme {
  font-family: "Sora", "Manrope", "Inter", "Segoe UI", sans-serif;
  color: var(--pf-text-soft);
  background:
    radial-gradient(circle at 10% -10%, rgba(59, 130, 246, 0.32), transparent 42%),
    radial-gradient(circle at 88% 3%, rgba(16, 185, 129, 0.22), transparent 34%),
    radial-gradient(circle at 60% 16%, rgba(240, 180, 41, 0.16), transparent 30%),
    var(--pf-bg);
  min-height: 100vh;
  overflow-x: clip;
}

body.platform-theme::before,
body.platform-theme::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
}

body.platform-theme::before {
  width: 340px;
  height: 340px;
  top: -130px;
  right: -120px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.28), transparent 72%);
  animation: pfPulseBlue 12s ease-in-out infinite;
}

body.platform-theme::after {
  width: 360px;
  height: 360px;
  left: -140px;
  bottom: -160px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.22), transparent 74%);
  animation: pfPulseGreen 13s ease-in-out infinite;
}

@keyframes pfPulseBlue {
  0%, 100% { transform: scale(1); opacity: 0.76; }
  50% { transform: scale(1.16); opacity: 1; }
}

@keyframes pfPulseGreen {
  0%, 100% { transform: scale(1); opacity: 0.68; }
  50% { transform: scale(1.17); opacity: 0.94; }
}

body.platform-theme .container,
body.platform-theme .container-fluid,
body.platform-theme .container-xxl {
  position: relative;
  z-index: 1;
}

body.platform-theme h1,
body.platform-theme h2,
body.platform-theme h3,
body.platform-theme h4,
body.platform-theme h5,
body.platform-theme h6 {
  color: var(--pf-text);
}

body.platform-theme .text-muted,
body.platform-theme small.text-muted,
body.platform-theme .small.text-muted {
  color: var(--pf-text-meta) !important;
}

body.platform-theme a {
  color: #A5B4FC;
}

body.platform-theme a:hover {
  color: #C4B5FD;
}

body.platform-theme .navbar[data-auth-nav] {
  border-top: none !important;
  border-bottom: 1px solid var(--pf-border);
  background: rgba(10, 15, 30, 0.8) !important;
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 36px rgba(1, 6, 20, 0.58) !important;
  padding-top: 0.6rem !important;
  padding-bottom: 0.6rem !important;
  z-index: 1045;
}

body.platform-theme .navbar-brand {
  background: transparent !important;
  border-right: 1px solid var(--pf-border);
  padding-right: 1rem !important;
}

body.platform-theme .navbar-brand h2 {
  margin: 0 !important;
  font-size: 1.07rem;
  color: #fff !important;
  letter-spacing: 0.02em;
}

body.platform-theme .auth-nav-collapse {
  display: flex;
  margin-left: auto;
}

body.platform-theme .auth-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.48rem;
  flex-wrap: wrap;
  margin-left: 1rem;
}

body.platform-theme .auth-nav-toggle {
  display: none;
  width: 40px;
  height: 36px;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--pf-border-gold);
  border-radius: 12px;
  background: rgba(240, 180, 41, 0.08);
}

body.platform-theme .auth-nav-toggle:focus-visible {
  outline: 2px solid rgba(240, 180, 41, 0.48);
  outline-offset: 2px;
}

body.platform-theme .auth-nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #FCD34D;
}

body.platform-theme .auth-btn,
body.platform-theme .btn {
  min-width: 64px;
  height: 30px;
  padding: 0 0.72rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  border-radius: 12px;
  font-weight: 700;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

body.platform-theme .auth-btn:hover,
body.platform-theme .btn:hover {
  transform: translateY(-1px);
}

body.platform-theme .auth-btn-primary,
body.platform-theme .btn-primary {
  border: 1px solid rgba(240, 180, 41, 0.72) !important;
  color: #111827 !important;
  background: linear-gradient(140deg, var(--pf-gold), var(--pf-gold-bright)) !important;
  box-shadow: 0 14px 28px rgba(184, 134, 11, 0.34);
}

body.platform-theme .auth-btn-primary:hover,
body.platform-theme .btn-primary:hover {
  filter: brightness(1.08);
}

body.platform-theme .auth-btn-outline,
body.platform-theme .btn-outline-primary,
body.platform-theme .btn-outline-secondary {
  border-color: var(--pf-border) !important;
  color: #CBD5E1 !important;
  background: rgba(15, 23, 42, 0.58) !important;
}

body.platform-theme .auth-btn-outline:hover,
body.platform-theme .btn-outline-primary:hover,
body.platform-theme .btn-outline-secondary:hover {
  border-color: var(--pf-border-gold) !important;
  color: #FCD34D !important;
  background: rgba(240, 180, 41, 0.11) !important;
}

body.platform-theme .auth-user-chip {
  display: inline-flex;
  align-items: center;
  max-width: 210px;
  padding: 0 0.62rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-color: var(--pf-border) !important;
  background: rgba(15, 23, 42, 0.66) !important;
  color: #E2E8F0 !important;
}

body.platform-theme .admin-profile-menu {
  position: relative;
}

body.platform-theme .admin-profile-trigger {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

body.platform-theme .admin-profile-trigger::-webkit-details-marker {
  display: none;
}

body.platform-theme .admin-profile-trigger::after {
  content: "▾";
  font-size: 0.62rem;
  margin-left: 0.35rem;
  line-height: 1;
}

body.platform-theme .admin-profile-menu[open] .admin-profile-trigger::after {
  content: "▴";
}

body.platform-theme .avatar-profile-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.46rem;
  min-width: 46px;
  max-width: 260px;
}

body.platform-theme .avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex: 0 0 auto;
  border-color: rgba(240, 180, 41, 0.42);
  color: #F8FAFC;
  background: linear-gradient(145deg, rgba(240, 180, 41, 0.4), rgba(184, 134, 11, 0.58));
}

body.platform-theme .avatar-circle-image {
  overflow: hidden;
  padding: 0;
  line-height: 1;
  color: transparent;
  background: rgba(240, 180, 41, 0.36);
}

body.platform-theme .avatar-circle-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.platform-theme .avatar-name {
  display: inline-block;
  max-width: 132px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 600;
  color: #E2E8F0;
}

body.platform-theme .admin-profile-dropdown {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  min-width: 218px;
  padding: 0.35rem;
  border-radius: 12px;
  z-index: 1045;
  display: flex;
  flex-direction: column;
  gap: 0.14rem;
  border-color: var(--pf-border);
  background: rgba(10, 15, 30, 0.96);
  box-shadow: 0 18px 40px rgba(1, 6, 20, 0.68);
}

body.platform-theme .admin-profile-head {
  border-bottom: 1px solid var(--pf-border);
  padding: 0.4rem 0.55rem 0.52rem;
  margin-bottom: 0.2rem;
  border-bottom-color: var(--pf-border);
}

body.platform-theme .admin-profile-title {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: #F8FAFC;
}

body.platform-theme .admin-profile-subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.73rem;
  word-break: break-word;
  color: #94A3B8;
}

body.platform-theme .admin-profile-dropdown a,
body.platform-theme .admin-profile-dropdown button {
  border: 0;
  border-radius: 9px;
  padding: 0.46rem 0.55rem;
  text-align: left;
  background: transparent;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  color: #CBD5E1;
}

body.platform-theme .admin-profile-dropdown a:hover,
body.platform-theme .admin-profile-dropdown button:hover {
  color: #FCD34D;
  background: rgba(240, 180, 41, 0.12);
}

body.platform-theme .auth-page {
  min-height: calc(100vh - 96px);
  background: transparent;
}

body.platform-theme .auth-card,
body.platform-theme .border.rounded.bg-white,
body.platform-theme .table-responsive.bg-white,
body.platform-theme .list-group,
body.platform-theme .alert-light.border,
body.platform-theme .platform-panel,
body.platform-theme .platform-hero-card,
body.platform-theme .platform-type-card {
  border: 1px solid var(--pf-border) !important;
  border-radius: 18px !important;
  background: linear-gradient(160deg, var(--pf-surface), var(--pf-surface-strong)) !important;
  box-shadow: 0 16px 38px rgba(2, 8, 24, 0.42);
  color: var(--pf-text-soft);
}

body.platform-theme .platform-hero-card {
  padding: 1.2rem;
}

body.platform-theme .platform-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  border: 1px solid var(--pf-border-gold);
  background: rgba(240, 180, 41, 0.14);
  color: #FCD34D;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.38rem 0.72rem;
}

body.platform-theme .platform-hero-title {
  font-size: clamp(2rem, 4.1vw, 3.2rem);
  line-height: 1.05;
  margin-bottom: 0.9rem;
}

body.platform-theme .platform-hero-subtitle {
  color: #CBD5E1 !important;
}

body.platform-theme .platform-live-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

body.platform-theme .platform-live-card {
  border-radius: 14px;
  border: 1px solid var(--pf-border);
  background: rgba(15, 23, 42, 0.6);
  padding: 0.72rem 0.8rem;
}

body.platform-theme .platform-live-label {
  color: #94A3B8;
  font-size: 0.72rem;
  margin: 0 0 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

body.platform-theme .platform-live-value {
  color: #F8FAFC;
  margin: 0;
  font-weight: 700;
}

body.platform-theme .platform-panel {
  padding: 1rem;
}

body.platform-theme .table {
  color: #CBD5E1;
  margin-bottom: 0;
}

body.platform-theme .table thead th {
  color: #F8FAFC;
  border-color: var(--pf-border);
  background: rgba(15, 23, 42, 0.75);
}

body.platform-theme .table td {
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.42);
}

body.platform-theme .table-striped > tbody > tr:nth-of-type(odd) > * {
  background: rgba(30, 41, 59, 0.42);
  color: #CBD5E1;
}

body.platform-theme .list-group-item {
  color: #CBD5E1;
  border-color: var(--pf-border);
  background: rgba(15, 23, 42, 0.5);
}

body.platform-theme .form-control,
body.platform-theme .form-select,
body.platform-theme textarea.form-control,
body.platform-theme .input-group-text {
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.66);
  color: #E2E8F0;
}

body.platform-theme .form-control::placeholder {
  color: #94A3B8;
}

body.platform-theme .form-control:focus,
body.platform-theme .form-select:focus,
body.platform-theme textarea.form-control:focus {
  border-color: rgba(59, 130, 246, 0.7);
  box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.22);
  background: rgba(15, 23, 42, 0.82);
  color: #E2E8F0;
}

body.platform-theme .form-label,
body.platform-theme .auth-help,
body.platform-theme .form-text {
  color: #94A3B8 !important;
}

body.platform-theme code {
  color: #FDE68A;
}

body.platform-theme .alert {
  border-radius: 14px;
  border-width: 1px;
}

body.platform-theme .alert-danger {
  color: #FECACA;
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(127, 29, 29, 0.42);
}

body.platform-theme .alert-success {
  color: #BBF7D0;
  border-color: rgba(16, 185, 129, 0.46);
  background: rgba(6, 78, 59, 0.45);
}

body.platform-theme .alert-warning {
  color: #FDE68A;
  border-color: rgba(245, 158, 11, 0.48);
  background: rgba(120, 53, 15, 0.45);
}

body.platform-theme .alert-info {
  color: #BFDBFE;
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(30, 64, 175, 0.42);
}

body.platform-theme .platform-cta-band {
  border-radius: 20px;
  border: 1px solid var(--pf-border-gold);
  background:
    radial-gradient(circle at 88% 18%, rgba(16, 185, 129, 0.2), transparent 44%),
    radial-gradient(circle at 12% 86%, rgba(59, 130, 246, 0.22), transparent 46%),
    linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(17, 24, 39, 0.94));
  padding: clamp(1.2rem, 2.5vw, 2rem);
  box-shadow: var(--pf-shadow);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

body.platform-theme .platform-cta-band p {
  margin: 0;
  color: #CBD5E1;
}

body.platform-theme .platform-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--pf-border);
  background:
    radial-gradient(circle at 12% 0%, rgba(59, 130, 246, 0.2), transparent 44%),
    linear-gradient(175deg, rgba(10, 15, 30, 0.97), rgba(15, 23, 42, 0.98));
}

body.platform-theme .platform-footer .small {
  color: #94A3B8 !important;
}

body.platform-theme .platform-nav-overlay {
  position: fixed;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(2, 8, 24, 0.62);
  z-index: 1030;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

body.platform-theme.platform-nav-open .platform-nav-overlay {
  opacity: 1;
  pointer-events: auto;
}

body.platform-theme.platform-nav-open {
  overflow: hidden;
}

body.platform-theme .platform-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: transform 0.52s ease, opacity 0.52s ease;
  transition-delay: var(--platform-reveal-delay, 0ms);
}

body.platform-theme .platform-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.platform-home-page .platform-hero-actions,
body.platform-home-page .platform-home-actions,
body.platform-home-page .platform-cta-actions {
  width: 100%;
}

body.platform-home-page .platform-orders-table-wrap .table {
  width: 100%;
  table-layout: fixed;
}

body.platform-home-page .platform-orders-table-wrap .table th,
body.platform-home-page .platform-orders-table-wrap .table td {
  white-space: normal;
  overflow-wrap: anywhere;
}

body.platform-auth-page .auth-page .container {
  max-width: 100%;
}

body.platform-auth-page .auth-card {
  width: 100%;
  overflow-x: hidden;
}

body.platform-auth-page .input-group > .btn {
  min-width: 44px;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

@media (max-width: 991.98px) {
  body.platform-theme .auth-nav-toggle {
    display: inline-flex;
    position: relative;
    z-index: 1065;
  }

  body.platform-theme .auth-nav-collapse {
    position: fixed;
    top: 0;
    right: 0;
    width: min(84vw, 320px);
    max-width: calc(100vw - 12px);
    height: 100vh;
    z-index: 1060;
    border-top: none;
    border-left: 1px solid var(--pf-border-gold);
    padding-top: 5.5rem;
    background: rgba(10, 15, 30, 0.98) !important;
    backdrop-filter: blur(16px);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -24px 0 44px rgba(1, 6, 20, 0.62);
    overflow-y: auto;
    overflow-x: hidden;
  }

  body.platform-theme .auth-nav-collapse.is-open {
    display: block;
    transform: translateX(0);
  }

  body.platform-theme .auth-nav-actions {
    width: 100%;
    padding: 1rem 1rem 1.2rem !important;
    justify-content: flex-start;
  }

  body.platform-theme .admin-profile-menu {
    width: 100%;
  }

  body.platform-theme .avatar-profile-trigger {
    width: 100%;
    justify-content: space-between;
    max-width: 100%;
  }

  body.platform-theme .admin-profile-dropdown {
    position: static;
    margin-top: 0.45rem;
    width: 100%;
    min-width: 0;
  }

  body.platform-theme .auth-user-chip {
    max-width: 100%;
  }

  body.platform-home-page .platform-hero-wrap {
    padding-top: 1.4rem !important;
    padding-bottom: 1.5rem !important;
  }

  body.platform-home-page .platform-hero-title {
    font-size: clamp(1.75rem, 8vw, 2.45rem);
    line-height: 1.08;
  }

  body.platform-home-page .platform-hero-actions .btn,
  body.platform-home-page .platform-home-actions .btn,
  body.platform-home-page .platform-cta-actions .btn {
    width: 100%;
  }

  body.platform-home-page .platform-hero-card {
    padding: 1rem;
  }

  body.platform-home-page .platform-orders-table-wrap .platform-orders-table th:nth-child(1),
  body.platform-home-page .platform-orders-table-wrap .platform-orders-table td:nth-child(1),
  body.platform-home-page .platform-orders-table-wrap .platform-orders-table th:nth-child(5),
  body.platform-home-page .platform-orders-table-wrap .platform-orders-table td:nth-child(5),
  body.platform-home-page .platform-orders-table-wrap .platform-orders-table th:nth-child(6),
  body.platform-home-page .platform-orders-table-wrap .platform-orders-table td:nth-child(6) {
    display: none;
  }
}

@media (max-width: 767.98px) {
  body.platform-home-page .navbar-brand {
    border-right: 0;
    padding-left: 0.9rem !important;
    padding-right: 0.9rem !important;
  }

  body.platform-home-page .navbar-brand h2 {
    font-size: 0.95rem;
  }

  body.platform-home-page .auth-nav-actions {
    margin-left: 0;
  }

  body.platform-home-page .platform-panel {
    padding: 0.8rem;
  }

  body.platform-home-page .platform-chip {
    font-size: 0.66rem;
    letter-spacing: 0.1em;
  }

  body.platform-home-page .platform-hero-subtitle {
    font-size: 1rem;
  }

  body.platform-home-page .platform-orders-table-wrap .table th,
  body.platform-home-page .platform-orders-table-wrap .table td {
    font-size: 0.75rem;
    padding: 0.46rem 0.42rem;
  }

  body.platform-home-page .platform-orders-table-wrap .btn {
    height: 32px;
    font-size: 0.7rem;
    padding: 0 0.56rem;
  }

  body.platform-home-page .platform-cta-band {
    padding: 1rem;
  }

  body.platform-home-page .platform-footer {
    margin-top: 1.6rem;
  }

  body.platform-home-page .platform-orders-table-wrap .platform-orders-table th:nth-child(3),
  body.platform-home-page .platform-orders-table-wrap .platform-orders-table td:nth-child(3),
  body.platform-home-page .platform-orders-table-wrap .platform-orders-table th:nth-child(7),
  body.platform-home-page .platform-orders-table-wrap .platform-orders-table td:nth-child(7) {
    display: none;
  }

  body.platform-auth-page .auth-page {
    min-height: calc(100vh - 74px);
    align-items: flex-start !important;
    padding-top: 0.95rem !important;
    padding-bottom: 1rem !important;
  }

  body.platform-auth-page .auth-page .container {
    padding-left: 0.78rem;
    padding-right: 0.78rem;
  }

  body.platform-auth-page .auth-card {
    border-radius: 14px !important;
    padding: 1rem !important;
  }

  body.platform-auth-page .row.justify-content-center {
    --bs-gutter-x: 0.8rem;
  }

  body.platform-theme .platform-live-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.platform-theme::before,
  body.platform-theme::after {
    animation: none !important;
  }

  body.platform-theme .platform-reveal,
  body.platform-theme .auth-btn,
  body.platform-theme .btn {
    transition: none !important;
    transform: none !important;
  }
}
