body {
  background-color: #f8fafc;
  font-family: "Sora", "Inter", sans-serif;
  overflow-x: hidden;
}

.ambient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  z-index: 0;
  opacity: 0.55;
  pointer-events: none;
  animation: orbFloat 25s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}
.orb-1 {
  top: -10%;
  left: -5%;
  width: 55vw;
  height: 55vw;
  background: rgba(139, 92, 246, 0.25);
}
.orb-2 {
  bottom: -20%;
  right: -10%;
  width: 65vw;
  height: 65vw;
  background: rgba(16, 185, 129, 0.15);
  animation-delay: -5s;
}
.orb-3 {
  top: 40%;
  right: 20%;
  width: 40vw;
  height: 40vw;
  background: rgba(236, 72, 153, 0.15);
  animation-delay: -10s;
}

@keyframes orbFloat {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(5%, 10%) scale(1.1);
  }
  100% {
    transform: translate(-5%, -5%) scale(0.95);
  }
}

.glass-panel {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.04),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  border-radius: 24px;
}

.sa-layout {
  display: flex;
  height: calc(100vh - 100px);
  max-width: 1600px;
  margin: 20px auto;
  position: relative;
  z-index: 1;
  padding: 0 20px;
  gap: 24px;
}

.sa-sidebar {
  width: 260px;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  flex-shrink: 0;
}
.sa-brand {
  padding: 0 12px 24px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  margin-bottom: 16px;
}
.sa-brand h2 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 22px;
  color: #111827;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sa-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.sa-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
}
.sa-tab:hover {
  background: rgba(255, 255, 255, 0.5);
  color: #111827;
}
.sa-tab.active {
  background: #ffffff;
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.15);
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.08);
}

.sa-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sa-header {
  padding: 24px 32px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 24px 24px 0 0;
}
.sa-content-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}

.sa-pane {
  display: none;
  animation: fadeUp 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.sa-pane.active {
  display: block;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.metric-card {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}
.m-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.m-value {
  font-size: 32px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.m-label {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.premium-table-wrap {
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  margin-bottom: 32px;
}
.p-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.p-table th {
  padding: 18px 24px;
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  background: rgba(255, 255, 255, 0.4);
}
.p-table td {
  padding: 20px 24px;
  font-size: 14px;
  color: #374151;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}
.p-table tr:hover td {
  background: rgba(255, 255, 255, 0.8);
}

.tag {
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.tag-purple {
  background: #f3e8ff;
  color: #6d28d9;
  border: 1px solid #e9d5ff;
}
.tag-green {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.tag-blue {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}
.tag-gray {
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #e5e7eb;
}

.chart-box {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  height: 360px;
  margin-bottom: 32px;
}

.usage-bar-bg {
  width: 100px;
  height: 6px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}
.usage-bar-fill {
  height: 100%;
  background: #3b82f6;
  border-radius: 4px;
}

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

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 10px;
}
.sa-mobile-toggle {
  display: none;
}
.sa-mobile-overlay {
  display: none;
}

@media screen and (max-width: 950px) {
  .sa-layout {
    flex-direction: column;
    min-height: 100vh;
    position: static !important;
    z-index: auto !important;
  }

  .sa-sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100vh !important;
    z-index: 10000 !important;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    border-radius: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    padding: 40px 24px !important;
  }

  .sa-sidebar.mobile-open {
    transform: translateX(0);
  }

  .sa-mobile-toggle {
    display: flex !important;
    position: fixed;
    top: 50% !important;
    left: 0 !important;
    transform: translateY(-50%) !important;
    background: #8b5cf6 !important;
    color: #ffffff !important;
    border: none !important;
    width: 36px !important;
    height: 60px !important;
    border-radius: 0 12px 12px 0 !important;
    cursor: pointer !important;
    z-index: 10001 !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 4px 0 12px rgba(139, 92, 246, 0.3) !important;
    transition: all 0.3s ease-in-out !important;
  }

  .sa-mobile-toggle.mobile-open {
    left: auto !important;
    right: 20px !important;
    top: 20px !important;
    transform: none !important;
    border-radius: 12px !important;
    background: #f4f4f5 !important;
    color: #18181b !important;
    box-shadow: none !important;
    width: 44px !important;
    height: 44px !important;
  }

  .sa-main {
    width: 100% !important;
    overflow: visible !important;
    padding-left: 0 !important;
    margin-top: 60px;
  }

  .sa-content-wrapper {
    padding: 16px !important;
    overflow: visible !important;
  }

  .sa-header {
    padding: 16px !important;
  }

  .sa-header > div:first-child {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 16px !important;
  }

  .sa-header .glass-panel {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px !important;
    padding: 16px !important;
  }

  .sa-header .glass-panel > div {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .sa-header select,
  .sa-header input[type="date"],
  .sa-header button {
    width: 100% !important;
    height: 46px !important;
  }

  .metrics-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .chart-box {
    padding: 16px !important;
  }

  .footer {
    margin-top: 60px !important;
    padding: 40px 0 20px 0 !important;
  }

  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
    margin-bottom: 40px !important;
  }

  .footer-container {
    padding: 0 20px !important;
  }

  .footer-brand .footer-desc {
    max-width: 100% !important;
  }
}
