*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
#root {
  display: flex;
  min-height: 100vh;
  width: 100%;
}
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.app-container {
  flex: 1;
  display: flex;
  width: 100%;
}
.main-content {
  flex: 1;
  width: 100%;
  min-width: 0;
  padding: 2rem 2.5rem;
  overflow-y: auto;
  background: var(--bg-primary);
}
.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  padding: 1.5rem;
  overflow-y: auto;
}
.c-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap;
  align-items: stretch;
  width: 100%;
}
.c-row.justify-between {
  justify-content: space-between;
}
.c-col {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.c-grid {
  display: grid !important;
  width: 100%;
}
.col-span-3 {
  flex: 0 0 calc(25% - 12px);
  min-width: 180px;
}
.col-span-4 {
  flex: 0 0 calc(33.333% - 12px);
  min-width: 220px;
}
.col-span-6 {
  flex: 0 0 calc(50% - 10px);
  min-width: 280px;
}
.col-span-8 {
  flex: 0 0 calc(66.666% - 8px);
  min-width: 360px;
}
.col-span-12 {
  flex: 0 0 100%;
}
@media (max-width: 1024px) {
  .main-content {
    padding: 1.5rem;
  }
  .col-span-3,
  .col-span-4 {
    flex: 0 0 calc(50% - 10px);
    min-width: 180px;
  }
  .col-span-8 {
    flex: 0 0 100%;
    min-width: unset;
  }
}
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  .main-content {
    padding: 1rem;
  }
  .col-span-3,
  .col-span-4,
  .col-span-6,
  .col-span-8 {
    flex: 0 0 100%;
    min-width: unset;
  }
  .c-row {
    flex-direction: column !important;
  }
}
:root {
  --bg-primary: #1a1412;
  --bg-secondary: #231c18;
  --bg-tertiary: #2d241e;
  --bg-card: #352a22;
  --bg-card-hover: #3d322a;
  --text-primary: #f5ebe0;
  --text-secondary: #c4a98a;
  --text-muted: #8b7355;
  --border-color: rgba(139, 115, 85, 0.3);
  --border-subtle: rgba(139, 115, 85, 0.15);
  --accent-primary: #d4a574;
  --accent-secondary: #e8c49a;
  --accent-glow: rgba(212, 165, 116, 0.2);
  --success: #7cb342;
  --success-bg: rgba(124, 179, 66, 0.15);
  --warning: #ffb74d;
  --warning-bg: rgba(255, 183, 77, 0.15);
  --danger: #e57373;
  --danger-bg: rgba(229, 115, 115, 0.15);
  --info: #64b5f6;
  --info-bg: rgba(100, 181, 246, 0.15);
  --gradient-start: #d4a574;
  --gradient-end: #8b5a3c;
  --chart-1: #d4a574;
  --chart-2: #8b5a3c;
  --chart-3: #7cb342;
  --chart-4: #64b5f6;
  --chart-5: #ffb74d;
  --chart-6: #e57373;
}
[data-theme="light"] {
  --bg-primary: #faf6f1;
  --bg-secondary: #f5ebe0;
  --bg-tertiary: #ede0d4;
  --bg-card: #ffffff;
  --bg-card-hover: #fdfbf8;
  --text-primary: #3d2c1e;
  --text-secondary: #6b5344;
  --text-muted: #9c8675;
  --border-color: rgba(109, 83, 68, 0.2);
  --border-subtle: rgba(109, 83, 68, 0.1);
  --accent-primary: #8b5a3c;
  --accent-secondary: #a0674a;
  --accent-glow: rgba(139, 90, 60, 0.15);
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  transition: border-color 0.2s ease;
}
.card:hover {
  border-color: var(--accent-primary);
}
.card-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.metric {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  min-width: 180px;
  flex: 1;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.metric::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
}
.metric:hover {
  border-color: var(--accent-primary);
  background: var(--bg-card-hover);
}
.metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}
.metric-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.metric-trend {
  font-size: 0.8rem;
  margin-top: 0.625rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-weight: 500;
}
.metric-trend.up {
  color: var(--success);
  background: var(--success-bg);
}
.metric-trend.down {
  color: var(--danger);
  background: var(--danger-bg);
}
@media (max-width: 768px) {
  .metric {
    min-width: unset;
  }
  .metric-value {
    font-size: 1.5rem;
  }
}
.title {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}
.title-1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.title-2 {
  font-size: 1.5rem;
  font-weight: 600;
}
.title-3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.title-4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.text {
  color: var(--text-secondary);
  line-height: 1.6;
}
.text-muted {
  color: var(--text-muted);
}
.text-sm {
  font-size: 0.875rem;
}
.text-lg {
  font-size: 1.125rem;
}
.spacer {
  height: 1rem;
}
.spacer-2 {
  height: 0.5rem;
}
.spacer-4 {
  height: 1rem;
}
.spacer-8 {
  height: 2rem;
}
.divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 1rem 0;
}
.c-code {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
  font-size: 0.75rem;
  line-height: 1.6;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-primary);
  margin: 0;
}
.c-code code {
  font-family: inherit;
  background: none;
  padding: 0;
}
@media (max-width: 768px) {
  .title-1 {
    font-size: 1.75rem;
  }
}
.alert {
  padding: 0.875rem 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}
.alert-info {
  background: var(--info-bg);
  border: 1px solid var(--info);
  color: var(--info);
}
.alert-success {
  background: var(--success-bg);
  border: 1px solid var(--success);
  color: var(--success);
}
.alert-warning {
  background: var(--warning-bg);
  border: 1px solid var(--warning);
  color: var(--warning);
}
.alert-error {
  background: var(--danger-bg);
  border: 1px solid var(--danger);
  color: var(--danger);
}
.progress-container {
  margin: 0.5rem 0;
}
.progress-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
  font-weight: 500;
}
.progress-bar {
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent-primary);
  border-radius: 4px;
  transition: width 0.3s ease;
}
.gauge-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
}
.gauge-svg {
  width: 120px;
  height: 80px;
}
.gauge-value {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 0.5rem;
  color: var(--text-primary);
}
.gauge-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.table-container {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
th,
td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}
th {
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  background: var(--bg-tertiary);
}
tbody tr:hover {
  background: var(--bg-card-hover);
}
.btn {
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}
.btn-primary {
  background: var(--accent-primary);
  color: var(--bg-primary);
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--accent-secondary);
}
.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: var(--bg-tertiary);
}
.c-input-wrapper {
  margin-bottom: 1rem;
}
.c-input-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.c-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: border-color 0.15s ease;
}
.c-input::placeholder {
  color: var(--text-muted);
}
.c-input:hover {
  border-color: var(--accent-primary);
}
.c-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.c-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.c-textarea-wrapper {
  margin-bottom: 1rem;
}
.c-textarea-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.c-textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.15s ease;
}
.c-textarea::placeholder {
  color: var(--text-muted);
}
.c-textarea:hover {
  border-color: var(--accent-primary);
}
.c-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
.c-textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.select-container {
  margin-bottom: 1rem;
}
.select-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 0.875rem;
  cursor: pointer;
}
.select:hover {
  border-color: var(--accent-primary);
}
.select:focus {
  outline: none;
  border-color: var(--accent-primary);
}
.checkbox-container {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  margin-bottom: 0.875rem;
  padding: 0.5rem;
  border-radius: 6px;
}
.checkbox-container:hover {
  background: var(--bg-tertiary);
}
.checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-primary);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
}
.checkbox-label {
  font-size: 0.875rem;
  color: var(--text-primary);
}
.checkbox-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}
.slider-container {
  margin-bottom: 1rem;
}
.slider-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.slider {
  width: 100%;
  accent-color: var(--accent-primary);
  cursor: pointer;
}
.c-switch-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
}
.c-switch-label {
  font-size: 0.875rem;
  color: var(--text-primary);
}
.c-switch {
  position: relative;
  width: 44px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: var(--bg-tertiary);
  cursor: pointer;
  transition: background 0.2s ease;
}
.c-switch:hover {
  background: var(--border-color);
}
.c-switch.active {
  background: var(--accent-primary);
}
.c-switch:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.c-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  transition: transform 0.2s ease;
}
.c-switch.active .c-switch-thumb {
  transform: translateX(20px);
}
.c-datepicker-wrapper {
  margin-bottom: 1rem;
}
.c-datepicker-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.c-datepicker {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 0.875rem;
}
.c-datepicker:hover {
  border-color: var(--accent-primary);
}
.c-datepicker:focus {
  outline: none;
  border-color: var(--accent-primary);
}
.c-upload-wrapper {
  margin-bottom: 1rem;
}
.c-upload-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border-radius: 8px;
  border: 1px dashed var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.c-upload-button:hover {
  border-color: var(--accent-primary);
  background: var(--bg-secondary);
}
.c-upload-icon {
  font-size: 1rem;
}
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.25rem;
}
.tab {
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s ease;
  font-weight: 500;
}
.tab:hover {
  color: var(--text-primary);
}
.tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}
.chart-container {
  width: 100%;
  height: 280px;
}
.chart-placeholder {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  color: var(--text-muted);
  font-size: 0.875rem;
  background: var(--bg-tertiary);
  border-radius: 8px;
}
.json-view {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
  font-size: 0.75rem;
  line-height: 1.5;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
}
.json-node {
  white-space: nowrap;
}
.json-expandable {
  cursor: pointer;
  user-select: none;
  padding: 2px 4px;
  margin: -2px -4px;
  border-radius: 6px;
}
.json-expandable:hover {
  background: var(--bg-secondary);
}
.json-toggle {
  display: inline-block;
  width: 1rem;
  color: var(--text-muted);
  font-size: 0.625rem;
}
.json-key {
  color: var(--primary);
}
.json-value {
  margin-left: 0.25rem;
}
.json-string {
  color: var(--success);
}
.json-number {
  color: var(--info);
}
.json-boolean {
  color: var(--warning);
}
.json-null {
  color: var(--text-muted);
  font-style: italic;
}
.json-bracket {
  color: var(--text-muted);
}
.json-collapsed {
  color: var(--text-muted);
  font-style: italic;
  margin: 0 0.25rem;
}
.json-leaf {
  padding-left: 1rem;
}
.c-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 500;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.c-badge-default {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}
.c-badge-primary {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary);
}
.c-badge-success {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}
.c-badge-warning {
  background: rgba(234, 179, 8, 0.15);
  color: var(--warning);
}
.c-badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}
.c-badge-info {
  background: rgba(14, 165, 233, 0.15);
  color: var(--info);
}
.app-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background: var(--bg-primary);
}
.app-shell-nav {
  width: 260px;
  flex-shrink: 0;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.app-shell-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px;
  border-bottom: 1px solid var(--border-color);
  height: 60px;
  flex-shrink: 0;
}
.app-shell-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.app-shell-brand-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-shell-content {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  background: var(--bg-primary);
}
.nav-sidebar {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.nav-group {
  margin-bottom: 4px;
}
.nav-group-header {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 16px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: color 0.15s ease;
  text-align: left;
}
.nav-group-header:hover {
  color: var(--text-primary);
}
.nav-group-label {
  flex: 1;
}
.nav-group-chevron {
  font-size: 8px;
  opacity: 0.6;
  transition: transform 0.2s ease;
}
.nav-group.open .nav-group-chevron {
  transform: rotate(0deg);
}
.nav-group-items {
  padding: 4px 0;
}
.nav-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 16px;
  padding-left: 24px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  gap: 8px;
  position: relative;
}
.nav-item:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}
.nav-item.active {
  color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--primary);
  border-radius: 0 2px 2px 0;
}
.nav-icon {
  width: 18px;
  text-align: center;
  font-size: 0.75rem;
  opacity: 0.7;
}
.nav-item-label {
  flex: 1;
}
.nav-item-badge {
  padding: 2px 6px;
  font-size: 0.7rem;
  background: var(--primary);
  color: white;
  border-radius: 6px;
}
.shell-content {
  padding: 24px;
  width: 100%;
}
@media (max-width: 768px) {
  .app-shell-nav {
    position: fixed;
    left: -260px;
    top: 0;
    height: 100vh;
    z-index: 100;
    transition: left 0.3s ease;
  }
  .app-shell-nav.open {
    left: 0;
  }
  .app-shell-content {
    width: 100%;
  }
  .shell-content {
    padding: 16px;
  }
}
