:root {
  --theme-default: #307fe2;
  --theme-default-hover: #458ce6;
  --theme-secondary: #0f232e;
  --body-font-color: #2f2f3b;
  --light-bg: #f6f7f9;
  --main-body-color: #f8f8f8;
  --success-bg: #00bf6f;
  --warning-bg: #ff8f1c;
  --danger-bg: #ff6661;
  --sidebar-width: 255px;
  --card-border: rgba(15, 35, 46, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Roboto", sans-serif;
  color: var(--body-font-color);
  background: var(--main-body-color);
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
  vertical-align: middle;
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-header {
  background: #fff;
  border-bottom: 1px solid var(--card-border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.brand-logo {
  display: block;
  height: 36px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(28%) sepia(12%) saturate(700%) hue-rotate(169deg) brightness(92%) contrast(88%);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sign-out-btn {
  border-color: rgba(15, 35, 46, 0.18);
  color: var(--theme-secondary);
  font-size: 0.82rem;
  font-weight: 500;
}

.sign-out-btn:hover {
  background: var(--light-bg);
  border-color: rgba(15, 35, 46, 0.28);
  color: var(--theme-secondary);
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--theme-secondary);
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.8rem;
  color: #667085;
}

.header-meta {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--theme-secondary);
}

.page-body-wrapper {
  display: flex;
  flex: 1;
  min-height: 0;
}

.sidebar-wrapper {
  width: var(--sidebar-width);
  background: var(--theme-secondary);
  color: #fff;
  flex-shrink: 0;
  padding: 1rem 0;
}

.sidebar-title {
  padding: 0 1rem 0.75rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.65;
}

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-link:hover,
.sidebar-link.active {
  background: rgba(48, 127, 226, 0.22);
  color: #fff;
}

.page-body {
  flex: 1;
  min-width: 0;
}

.inea-card {
  border: 1px solid var(--card-border);
  border-radius: 0;
  box-shadow: 0 1px 3px rgba(15, 35, 46, 0.06);
}

.inea-card-header {
  background: #fff;
  border-bottom: 1px solid var(--card-border);
}

.endpoint-item {
  border: 0;
  border-bottom: 1px solid var(--card-border);
  padding: 1rem 1.15rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.endpoint-item:last-child {
  border-bottom: 0;
}

.endpoint-item:hover,
.endpoint-item.active {
  background: var(--light-bg);
}

.endpoint-item.active {
  border-left: 3px solid var(--theme-default);
  padding-left: calc(1.15rem - 3px);
}

.endpoint-path {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.82rem;
  color: var(--theme-default);
  word-break: break-all;
}

.endpoint-params {
  position: relative;
  z-index: 1;
}

.endpoint-params .form-label {
  color: #667085;
  font-weight: 500;
}

.method-badge {
  background: var(--theme-default);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.availability-note {
  background: rgba(255, 143, 28, 0.12);
  border: 1px solid rgba(255, 143, 28, 0.35);
  color: #7a4d12;
  border-radius: 0;
}

.availability-note.is-current {
  background: rgba(48, 127, 226, 0.1);
  border-color: rgba(48, 127, 226, 0.28);
  color: #1b4f91;
}

.price-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stat-box {
  background: var(--light-bg);
  border: 1px solid var(--card-border);
  padding: 0.85rem 1rem;
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #667085;
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--theme-secondary);
}

.empty-state {
  text-align: center;
  color: #667085;
  padding: 2.5rem 1rem;
}

.empty-state .material-symbols-outlined {
  font-size: 2.5rem;
  opacity: 0.55;
  margin-bottom: 0.5rem;
}

.result-json {
  background: #0f232e;
  color: #e8eef3;
  padding: 1rem;
  border-radius: 0;
  max-height: 420px;
  overflow: auto;
  font-size: 0.82rem;
  margin: 0;
}

.result-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.view-toggle {
  display: inline-flex;
  border: 1px solid var(--card-border);
  background: #fff;
}

.view-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  background: transparent;
  color: #667085;
  padding: 0.45rem 0.85rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.view-toggle-btn .material-symbols-outlined {
  font-size: 1.1rem;
}

.view-toggle-btn:hover {
  background: var(--light-bg);
  color: var(--theme-secondary);
}

.view-toggle-btn.active {
  background: rgba(48, 127, 226, 0.12);
  color: var(--theme-default);
  font-weight: 500;
}

.price-chart-panel {
  margin-bottom: 1rem;
}

.chart-wrap {
  position: relative;
  height: 220px;
  padding: 0.75rem 0.5rem 0.25rem;
  background: #fff;
  border: 1px solid var(--card-border);
}

.price-table-panel {
  margin-bottom: 1rem;
}

.price-table-scroll {
  max-height: 260px;
  border: 1px solid var(--card-border);
  background: #fff;
}

.price-table thead th {
  position: sticky;
  top: 0;
  background: var(--light-bg);
  color: var(--theme-secondary);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--card-border);
  z-index: 1;
}

.price-table tbody td {
  font-size: 0.875rem;
  vertical-align: middle;
}

.price-table tbody tr:nth-child(even) {
  background: rgba(246, 247, 249, 0.65);
}

.toolbar-meta {
  text-align: right;
}

@media (max-width: 991.98px) {
  .page-body-wrapper {
    flex-direction: column;
  }

  .sidebar-wrapper {
    width: 100%;
  }

  .sidebar-links {
    flex-direction: row;
    overflow-x: auto;
    padding: 0 0.5rem 0.5rem;
  }

  .sidebar-link {
    white-space: nowrap;
    width: auto;
  }
}
