:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;

  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-code: #0f172a;

  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;

  --border: #334155;
  --border-light: #1e293b;

  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;

  --get: #10b981;
  --post: #3b82f6;
  --put: #f59e0b;
  --delete: #ef4444;
  --patch: #8b5cf6;

  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);

  --radius: 8px;
  --radius-lg: 12px;
  --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.topbar {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-left {
  display: flex;
  align-items: center;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius);
  object-fit: contain;
}

.logo-text h1 {
  font-size: 18px;
  font-weight: 600;
}

.logo-text span {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.version-select-wrapper {
  position: relative;
}

.version-select {
  padding: 10px 36px 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  transition: all var(--transition);
}

.version-select:hover {
  border-color: var(--primary);
}

.version-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.version-select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.content {
  padding: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn-outline:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.section {
  margin-bottom: 30px;
}

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

.section-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.section-icon.user {
  color: var(--info);
}

.section-icon.auth {
  color: var(--success);
}

.section-icon.prevision {
  color: var(--patch);
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  padding-left: 10px;
}

.section-description {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 10px;
}

.endpoint-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  overflow: hidden;
  transition: all var(--transition);
}

.endpoint-card:hover {
  box-shadow: var(--shadow-md);
}

.endpoint-card.expanded {
  box-shadow: var(--shadow-lg);
}

.endpoint-card.new {
  border-color: var(--warning);
  position: relative;
}

.endpoint-card.new::before {
  content: "NOVO";
  position: absolute;
  top: 0;
  right: 0;
  padding: 3px;
  background: var(--warning);
  color: white;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  z-index: 10;
}

.endpoint-card.modified {
  border-color: var(--info);
  position: relative;
}

.endpoint-card.modified::before {
  content: "ALTERADO";
  position: absolute;
  top: 0;
  right: 0;
  padding: 3px;
  background: var(--info);
  color: white;
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  z-index: 10;
}

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  cursor: pointer;
  transition: background var(--transition);
}

.endpoint-header:hover {
  background: var(--bg-secondary);
}

.method-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  text-transform: uppercase;
  font-family: "JetBrains Mono", monospace;
  min-width: 70px;
  text-align: center;
  flex-shrink: 0;
}

.method-badge.get {
  background: var(--get);
  color: white;
}

.method-badge.post {
  background: var(--post);
  color: white;
}

.method-badge.put {
  background: var(--put);
  color: white;
}

.method-badge.delete {
  background: var(--delete);
  color: white;
}

.method-badge.patch {
  background: var(--patch);
  color: white;
}

.endpoint-path {
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  word-break: break-all;
}

.endpoint-path .param {
  color: var(--primary);
}

.endpoint-summary {
  font-size: 14px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.endpoint-toggle {
  width: 24px;
  height: 24px;
  color: var(--text-muted);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.endpoint-card.expanded .endpoint-toggle {
  transform: rotate(180deg);
}

.endpoint-body {
  display: none;
  border-top: 1px solid var(--border);
}

.endpoint-card.expanded .endpoint-body {
  display: block;
}

.endpoint-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.endpoint-info {
  padding: 24px;
}

.info-section {
  margin-bottom: 24px;
}

.info-section:last-child {
  margin-bottom: 0;
}

.info-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

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

.params-table th,
.params-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}

.params-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.param-name {
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
  color: var(--text-primary);
}

.param-required {
  color: var(--error);
  margin-left: 4px;
}

.param-type {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

.response-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
}

.response-badge.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.response-badge.error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
}

.response-code {
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
}

.code-panel {
  background: var(--bg-code);
  border-left: 1px solid var(--border);
  padding: 20px;
  overflow-x: auto;
}

.code-block {
  position: relative;
}

.code-block pre {
  margin: 0;
  padding: 16px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
}

.code-block code {
  font-family: "JetBrains Mono", monospace;
  color: #e2e8f0;
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 4px;
  color: #94a3b8;
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 4px;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.copy-btn.copied {
  background: var(--success);
  color: white;
}

.token-string {
  color: #a5d6ff;
}

.schema-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.schema-header {
  padding: 20px 24px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.schema-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: "JetBrains Mono", monospace;
}

.schema-body {
  padding: 24px;
}

.schema-property {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.schema-property:last-child {
  border-bottom: none;
}

.schema-prop-name {
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
  color: var(--text-primary);
  min-width: 100px;
}

.schema-prop-details {
  flex: 1;
}

.schema-prop-type {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 8px;
}

.schema-prop-required {
  font-size: 11px;
  color: var(--error);
  font-weight: 500;
}

.schema-prop-example {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.schema-prop-example code {
  font-family: "JetBrains Mono", monospace;
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
