:root {
  --navy: #0d1321;
  --blue: #2563eb;
  --sky: #b3d4ff;
  --bg: #f7f9fc;
  --white: #fff;
  --text: #101a2d;
  --muted: #667085;
  --line: #e4eaf2;
  --soft: #eff6ff;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --shadow: 0 18px 55px rgba(13, 19, 33, 0.075);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at 78% 4%, rgba(179, 212, 255, 0.20), transparent 26%), linear-gradient(180deg, #fbfcfe, #f4f7fb);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, select {
  font: inherit;
}

.app {
  min-height: 100vh;
}

/* Sidebar */
.side {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 254px;
  background: linear-gradient(180deg, #0d1321, #101b30);
  color: #fff;
  padding: 22px 13px;
  display: flex;
  flex-direction: column;
  z-index: 20;
}

.brand {
  padding: 5px 10px 24px;
  display: flex;
  align-items: center;
}

.official-logo {
  display: block;
  width: 190px;
  height: auto;
  border-radius: 8px;
  background: #fff;
}

.nav-label {
  font-size: 9px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 850;
  padding: 0 14px 7px;
  margin-top: 8px;
}

.nav button {
  width: 100%;
  border: 0;
  background: none;
  color: #94a3b8;
  padding: 10px 13px;
  border-radius: 10px;
  text-align: left;
  display: flex;
  gap: 11px;
  align-items: center;
  cursor: pointer;
  font-weight: 650;
  margin: 2px 0;
  transition: .18s;
}

.nav button:hover, .nav button.active {
  background: #172641;
  color: #fff;
  transform: translateX(2px);
}

.nav .ico {
  width: 18px;
  text-align: center;
}

.side-bottom {
  margin-top: auto;
  border-top: 1px solid #1d2a42;
  padding: 17px 10px 3px;
}

.user-mini {
  display: flex;
  gap: 10px;
  align-items: center;
}

.avatar {
  width: 37px;
  height: 37px;
  border-radius: 11px;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  display: grid;
  place-items: center;
  font-weight: 900;
}

.user-mini small {
  display: block;
  color: #94a3b8;
  font-size: 10px;
  margin-top: 2px;
}

/* Main Area */
.main {
  margin-left: 254px;
  max-width: 1580px;
  padding: 28px 42px 70px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
  position: sticky;
  top: 0;
  z-index: 15;
  padding: 10px 0;
  background: rgba(247, 249, 252, .84);
  backdrop-filter: blur(14px);
}

.crumb {
  font-size: 11px;
  color: var(--muted);
}

.top-actions {
  display: flex;
  gap: 9px;
}

.btn {
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #fff;
  border-radius: 10px;
  padding: 10px 15px;
  font-weight: 750;
  cursor: pointer;
  transition: .18s;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(37, 99, 235, .18);
}

.btn.light {
  background: #fff;
  color: var(--text);
  border-color: var(--line);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #fff 0%, #fff 57%, #eef6ff 100%);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 36px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 30px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero .ey {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.7px;
  color: var(--blue);
  font-weight: 850;
}

.hero h2 {
  font-size: 48px;
  line-height: 1.02;
  letter-spacing: -2.8px;
  margin: 10px 0 16px;
  color: var(--navy);
}

.hero p {
  color: var(--muted);
  line-height: 1.65;
}

.actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 22px;
}

/* Network Widget */
.network {
  background: var(--navy);
  border-radius: 20px;
  padding: 21px;
  color: #fff;
  min-height: 310px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(179, 212, 255, .08);
}

.network-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.live {
  font-size: 9px;
  border: 1px solid #304866;
  color: #93c5fd;
  padding: 5px 8px;
  border-radius: 99px;
}

.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(96, 165, 250, .3); }
  50% { box-shadow: 0 0 0 8px rgba(96, 165, 250, 0); }
}

.net-area {
  height: 245px;
  position: relative;
}

.net-line {
  position: absolute;
  height: 1px;
  background: #355273;
  transform-origin: left center;
}

.nl1 { left: 15%; top: 48%; width: 34%; transform: rotate(-18deg); }
.nl2 { left: 15%; top: 52%; width: 35%; transform: rotate(17deg); }
.nl3 { left: 48%; top: 49%; width: 35%; transform: rotate(-5deg); }

.net-node {
  position: absolute;
  background: #101d31;
  border: 1px solid #36557f;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 10px;
  min-width: 120px;
  z-index: 2;
}

.net-node b {
  display: block;
  font-size: 11px;
  margin-bottom: 3px;
}

.nn1 { left: 0; top: 38%; }
.nn2 { left: 35%; top: 9%; }
.nn3 { left: 35%; top: 67%; }
.nn4 { right: 0; top: 39%; background: #173a74; border-color: #3b82f6; }

/* KPIs Section */
.section {
  margin-top: 22px;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.kpi {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 17px;
  transition: .18s;
}

.kpi strong {
  display: block;
  font-size: 26px;
  color: var(--navy);
  margin-top: 5px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 99px;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 800;
  margin-top: 5px;
}

.blue { background: #eff6ff; color: #1d4ed8; }
.green { background: #ecfdf5; color: #15803d; }
.amber { background: #fffbeb; color: #b45309; }

/* Responsive Mobile Layout */
.mobile-head {
  display: none;
}

@media (max-width: 760px) {
  body {
    padding-top: 58px;
  }

  .mobile-head {
    display: flex;
    position: fixed;
    z-index: 30;
    top: 0;
    left: 0;
    right: 0;
    height: 58px;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid #e4eaf2;
    align-items: center;
    padding: 7px 14px;
  }

  .mobile-head img {
    width: 155px;
    height: auto;
    border-radius: 6px;
  }

  .side {
    width: 100%;
    height: 72px;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 5px 6px;
    background: rgba(13, 19, 33, .97);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(179, 212, 255, .15);
    display: block;
  }

  .side .brand, .side .side-bottom, .side > .nav-label {
    display: none;
  }

  .nav {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 1px;
    overflow-x: auto;
  }

  .nav button {
    min-width: 64px;
    height: 60px;
    margin: 0;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 10px;
    text-align: center;
  }

  .main {
    margin: 0;
    width: 100%;
    padding: 14px 12px 94px;
  }

  .hero {
    padding: 18px;
    grid-template-columns: 1fr;
  }

  .hero h2 {
    font-size: 32px;
  }

  .kpis {
    grid-template-columns: 1fr 1fr;
  }
}
