/* ═══════════════════════════════════════════════════════════════════════════
   SkyForge — Custom Styles
   ════════════════════════════════════════════════════════════════════════════ */

:root {
  --sidebar-width: 260px;
  --sidebar-bg: #0f1b2d;
  --sidebar-hover: #1a2d42;
  --sidebar-active: #0d6efd;
  --sidebar-text: #adb5bd;
  --sidebar-text-active: #ffffff;
  --topbar-height: 56px;
  --body-bg: #f0f4f8;
  --card-radius: 0.75rem;
}

/* ── Layout ─────────────────────────────────────────────────────────────── */
body {
  background-color: var(--body-bg);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background-color: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 1000;
}

#main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

/* ── Sidebar ──────────────────────────────────────────────────────────── */
.sidebar-brand {
  padding: 1.25rem 1.25rem 1rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
}

.sidebar-section-label {
  padding: 1rem 1.25rem 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

.sidebar-nav {
  list-style: none;
  padding: 0 0.5rem;
  margin: 0;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.85rem;
  border-radius: 0.5rem;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
  margin-bottom: 2px;
}

.sidebar-nav li a:hover {
  background: var(--sidebar-hover);
  color: #fff;
}

.sidebar-nav li a.active {
  background: var(--sidebar-active);
  color: #fff;
  font-weight: 600;
}

.sidebar-footer {
  margin-top: auto;
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-user {
  color: var(--sidebar-text);
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #dc3545;
  font-size: 0.85rem;
  text-decoration: none;
  padding: 0.4rem 0.6rem;
  border-radius: 0.4rem;
  transition: background 0.15s;
}

.sidebar-logout:hover {
  background: rgba(220,53,69,0.15);
  color: #dc3545;
}

/* ── Topbar ──────────────────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: var(--topbar-height);
  background: #fff;
  border-bottom: 1px solid #e5e9f0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-left .breadcrumb {
  font-size: 0.85rem;
}

/* ── Page body ───────────────────────────────────────────────────────────── */
.page-body {
  padding: 1.5rem;
}

.page-header {
  margin-bottom: 1.5rem;
}

.page-header h4 {
  font-weight: 700;
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  border: 1px solid #e5e9f0;
  border-radius: var(--card-radius);
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.card-header {
  background: #fff;
  border-bottom: 1px solid #e5e9f0;
  border-radius: var(--card-radius) var(--card-radius) 0 0 !important;
  padding: 0.85rem 1.25rem;
}

/* ── Stat cards ──────────────────────────────────────────────────────────── */
.stat-card {
  background: #fff;
  border-radius: var(--card-radius);
  border: 1px solid #e5e9f0;
  border-left-width: 4px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
}

.stat-label {
  font-size: 0.82rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table {
  font-size: 0.875rem;
}

.table th {
  font-weight: 600;
  color: #495057;
  white-space: nowrap;
}

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge {
  font-weight: 500;
}

/* ── Code ────────────────────────────────────────────────────────────────── */
code {
  font-size: 0.875em;
}

pre.release-notes,
pre.sop-text {
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 0.9rem;
  white-space: pre-wrap;
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid #e9ecef;
  margin: 0;
}

/* ── Drop Zone ───────────────────────────────────────────────────────────── */
.drop-zone {
  border: 2px dashed #ced4da;
  border-radius: 0.75rem;
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
  background: #f8f9fa;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: #0d6efd;
  background: #e8f0fe;
}

.drop-zone__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

/* ── Login card ──────────────────────────────────────────────────────────── */
.login-card {
  width: 100%;
  max-width: 420px;
  border-radius: 1rem;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  #sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
  #main-content {
    margin-left: 0;
  }
}
