/* === CSS Reset / Normalize basics === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f0f4f8;
  margin: 0;
  color: #0f172a;
  line-height: 1.5;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* === Sidebar === */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 240px;
  height: 100vh;
  background: linear-gradient(180deg, rgba(4, 12, 31, 0.95), rgba(7, 18, 44, 0.92));
  color: white;
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 20px 16px;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo-icon {
  font-size: 22px;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  border-left: 3px solid transparent;
  user-select: none;
}

.sidebar-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.sidebar-item.active {
  background: rgba(255, 255, 255, 0.15);
  border-left-color: #3b82f6;
  color: white;
  font-weight: 600;
}

.sidebar-item svg {
  flex-shrink: 0;
  opacity: 0.8;
}

.sidebar-item.active svg {
  opacity: 1;
}

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

.sidebar-footer-version {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
}

/* === Main Content === */
.main {
  margin-left: 240px;
  padding: 24px;
  min-height: 100vh;
}

/* === Header === */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
}

.search-input {
  width: 400px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: white;
  font-size: 14px;
  font-family: inherit;
  color: #0f172a;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input::placeholder {
  color: #94a3b8;
}

.search-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.header-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* === Utility === */
.hidden {
  display: none !important;
}

.text-muted {
  color: #64748b;
}

.text-sm {
  font-size: 13px;
}

.text-xs {
  font-size: 11px;
}

.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.gap-4 { gap: 16px; }
.gap-2 { gap: 8px; }

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-1 {
  flex: 1;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cursor-pointer {
  cursor: pointer;
}

/* === Scrollbar === */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* === Selection === */
::selection {
  background: rgba(59, 130, 246, 0.2);
}
