/* ===================================================================
   BASE RESET
=================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

html, body {
  height: 100%;
}

/* LIGHT MODE DEFAULT */
body {
  background: #f3f6fb;
  color: #1d1f24;
  transition: background 0.25s, color 0.25s;
}

/* DARK MODE */
body[data-theme="dark"] {
  background: #0d1117;
  color: #e6edf3;
}

/* ===================================================================
   LAYOUT
=================================================================== */
.layout {
  display: flex;
  gap: 30px;
}

/* ===================================================================
   SIDEBAR
=================================================================== */
.sidebar {
  width: 260px;
  min-height: 100vh;
  padding: 30px 20px;
  position: sticky;
  top: 0;

  background: #ffffff;
  border-right: 1px solid #d8dde6;

  transition: background 0.25s, border-color 0.25s;
}

body[data-theme="dark"] .sidebar {
  background: #161b22;
  border-color: #30363d;
}

.logo-circle {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;

  background: #0058c9;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
}

.sidebar-header {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 25px;
}

.sidebar-title h1 {
  font-size: 1.3rem;
  color: #0058c9;
}

body[data-theme="dark"] .sidebar-title h1 {
  color: #58a6ff;
}

.sidebar-title span {
  font-size: 0.85rem;
  opacity: 0.7;
}

/* NAV */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 20px;
}

.sidebar-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  color: #364155;
  padding: 8px 4px;
  border-radius: 6px;
  transition: 0.2s;
}

.sidebar-nav a:hover {
  background: #e7ecf5;
  color: #0058c9;
}

body[data-theme="dark"] .sidebar-nav a {
  color: #bcd0e7;
}

body[data-theme="dark"] .sidebar-nav a:hover {
  background: #212830;
  color: #58a6ff;
}

.sidebar-section-label {
  margin-top: 18px;
  margin-bottom: 3px;
  font-weight: bold;
  font-size: 0.8rem;
  opacity: 0.6;
}

/* Toggle tema */
.sidebar-footer {
  margin-top: 40px;
  text-align: center;
}

.theme-toggle {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  background: #0058c9;
  color: white;
  border: none;
  cursor: pointer;
}

body[data-theme="dark"] .theme-toggle {
  background: #1f6feb;
}

/* ===================================================================
   MAIN CONTENT
=================================================================== */
.content {
  flex: 1;
  padding-bottom: 60px;
}

.page-header {
  text-align: center;
  margin-bottom: 40px;
}

.page-header h1 {
  font-size: 2.4rem;
  color: #0058c9;
}

body[data-theme="dark"] .page-header h1 {
  color: #58a6ff;
}

/* ===================================================================
   CARDS
=================================================================== */
.card {
  background: #ffffff;
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 25px;
  border: 1px solid #d6dbe6;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transition: background 0.25s, border-color 0.25s;
}

body[data-theme="dark"] .card {
  background: #161b22;
  border-color: #30363d;
  box-shadow: none;
}

.card h2 {
  margin-bottom: 15px;
  color: #0058c9;
}

body[data-theme="dark"] .card h2 {
  color: #79c0ff;
}

/* ===================================================================
   CODE BLOCKS
=================================================================== */
pre {
  background: #eef2f8;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid #cfd4db;
  overflow-x: auto;
}

body[data-theme="dark"] pre {
  background: #0d1117;
  border-color: #30363d;
}

code {
  font-family: "JetBrains Mono", monospace;
  color: #005f3c;
}

body[data-theme="dark"] code {
  color: #7ee787;
}

/* ===================================================================
   TABLES
=================================================================== */
.endpoint-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  margin-bottom: 15px;
}

.endpoint-table thead {
  background: #e6ebf5;
}

body[data-theme="dark"] .endpoint-table thead {
  background: #1d242d;
}

.endpoint-table th,
.endpoint-table td {
  padding: 10px;
  border-bottom: 1px solid #d7dce5;
}

body[data-theme="dark"] .endpoint-table td {
  border-color: #2b313b;
}

.endpoint-table tbody tr:nth-child(odd) {
  background: #f9fbff;
}

body[data-theme="dark"] .endpoint-table tbody tr:nth-child(odd) {
  background: #151a20;
}

.endpoint-table tbody tr:hover {
  background: #e7f0ff;
}

body[data-theme="dark"] .endpoint-table tbody tr:hover {
  background: #1c2330;
}

/* ===================================================================
   FOOTER
=================================================================== */
.page-footer {
  margin-top: 40px;
  text-align: center;
  opacity: 0.7;
}
