* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Arial;
  background: linear-gradient(180deg, #071226, #0b1220);
  color: #e6f6f5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  min-height: 100vh;
  gap: 22px;
  padding: 22px;
}

/* SIDEBAR */
.sidebar {
  width: 260px;
  background: linear-gradient(180deg, rgba(6, 10, 18, 0.9), rgba(3, 7, 14, 0.95));
  border-radius: 12px;
  padding: 14px 10px;
  box-shadow: 8px 18px 50px rgba(2, 6, 23, 0.6);
  transition: width .28s ease, transform .2s ease;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  height: calc(100vh - 44px);
}

.sidebar.collapsed {
  width: 72px;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
}
.brand .logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5a4, #0369a1);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.6);
  flex-shrink: 0;
}
.brand .logo svg {
  width: 36px;
  height: 36px;
}
.brand .site-name {
  font-weight: 700;
  letter-spacing: 0.3px;
}
.sidebar.collapsed .site-name {
  opacity: 0;
  transform: translateX(-8px);
  pointer-events: none;
}

/* Toggle button */
.toggle-btn {
  position: absolute;
  top: 16px;
  right: -14px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #2563eb;
  border: 4px solid transparent;
  color: white;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 26px rgba(37, 99, 235, 0.16);
}

/* NAV */
.nav {
  margin-top: 18px;
  padding: 6px;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 10px;
  color: #9bb0c6;
  text-decoration: none;
  margin: 6px 4px;
  transition: all .18s ease;
}

.nav a svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: .95;
}

.nav a .label {
  font-weight: 600;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.02);
  color: white;
  transform: translateX(6px);
}

.nav a.active {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.12), rgba(14, 165, 164, 0.06));
  color: white;
}

.sidebar.collapsed .label {
  display: none;
}

/* Footer sidebar */
.footer-side {
  position: absolute;
  bottom: 16px;
  left: 14px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.collapse-small {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
}

.meta {
  font-size: 12px;
  color: #9bb0c6;
  opacity: .9;
  padding-left: 6px;
}

/* MAIN */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* HERO */
.hero {
  position: relative;
  height: 360px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.6), rgba(6, 10, 18, 0.7));
  box-shadow: 0 10px 40px rgba(2, 6, 23, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero .media {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  filter: contrast(1.02) saturate(1.1);
  mix-blend-mode: screen;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.45), rgba(2, 6, 23, 0.6));
}

.hero-content {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 28px;
}

.logo-circle {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0ea5a4, #0369a1);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.6);
  border: 4px solid rgba(255, 255, 255, 0.06);
}

.logo-circle img {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  object-fit: cover;
}

.title-block {
  color: #e6f6f5;
}

.site-title {
  font-weight: 700;
  font-size: 1.6rem;
}

.site-sub {
  color: #9bb0c6;
  margin-top: 6px;
}

/* CARDS */
.card-row {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.card {
  flex: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(2, 6, 23, 0.45);
}

/* RESPONSIVE */
@media (max-width: 920px) {
  body {
    padding: 12px;
  }

  .sidebar {
    position: fixed;
    left: 12px;
    top: 12px;
    height: calc(100vh - 24px);
    z-index: 60;
  }

  .main {
    margin-left: 72px;
    padding-top: 18px;
  }
}

@media (max-width: 640px) {
  .hero {
    height: 260px;
  }

  .logo-circle {
    width: 100px;
    height: 100px;
  }

  .site-title {
    font-size: 1.15rem;
  }
}
