:root{
  --navy:#071B3A;
  --dark:#0B1730;
  --blue:#0866FF;
  --blue2:#2458F5;
  --green:#18C37E;
  --orange:#F59E0B;
  --red:#EF4444;
  --purple:#7C3AED;
  --bg:#F5F8FC;
  --card:#FFFFFF;
  --text:#071B3A;
  --muted:#64748B;
  --border:#E7EEF7;
  --shadow:0 18px 45px rgba(15,23,42,.07);
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family:Tahoma, Arial, sans-serif;
  background:
    radial-gradient(circle at 15% 12%,rgba(37,99,235,.08),transparent 30%),
    radial-gradient(circle at 88% 22%,rgba(124,58,237,.06),transparent 28%),
    var(--bg);
  color:var(--text);
}

button{
  font-family:inherit;
  cursor:pointer;
}

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

.app{
  min-height:100vh;
  display:grid;
  grid-template-columns:250px minmax(0,1fr) 260px;
  gap:22px;
  padding:22px;
}

/* Sidebar */
.sidebar{
  background:rgba(255,255,255,.92);
  border-left:1px solid var(--border);
  min-height:calc(100vh - 44px);
  border-radius:0;
  padding:26px 16px;
  box-shadow:18px 0 55px rgba(15,23,42,.045);
  display:flex;
  flex-direction:column;
  gap:22px;
}

.brand{
  display:flex;
  align-items:center;
  justify-content:center;
  padding-bottom:18px;
}

.brand img{
  width:185px;
  height:auto;
  object-fit:contain;
}

.menu{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.menu a{
  min-height:54px;
  padding:0 18px;
  border-radius:14px;
  display:flex;
  align-items:center;
  gap:15px;
  color:#132B4E;
  font-weight:800;
  transition:.18s;
  position:relative;
}

.menu a span{
  width:26px;
  font-size:23px;
  color:#14376F;
  display:inline-flex;
  justify-content:center;
}

.menu a:hover{
  background:#F3F7FD;
}

.menu a.active{
  background:linear-gradient(135deg,var(--blue),var(--blue2));
  color:#fff;
  box-shadow:0 16px 35px rgba(8,102,255,.25);
}

.menu a.active span{
  color:#fff;
}

.speed-card{
  margin-top:auto;
  background:
    radial-gradient(circle at 80% 20%,rgba(37,99,235,.45),transparent 32%),
    linear-gradient(135deg,#061A3D,#061B44);
  color:#fff;
  border-radius:18px;
  padding:22px;
  min-height:210px;
  position:relative;
  overflow:hidden;
}

.speed-card:after{
  content:"🚀";
  position:absolute;
  left:15px;
  bottom:12px;
  font-size:82px;
  transform:rotate(-18deg);
}

.speed-card h3{
  margin:0 0 10px;
  font-size:22px;
}

.speed-card p{
  margin:0;
  color:rgba(255,255,255,.82);
  line-height:1.8;
  font-size:14px;
  max-width:150px;
}

.speed-card button{
  margin-top:26px;
  border:0;
  background:#fff;
  color:var(--blue);
  border-radius:12px;
  padding:12px 18px;
  font-weight:900;
  position:relative;
  z-index:2;
}

/* Main */
.main{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:18px;
}

.topbar{
  height:72px;
  background:rgba(255,255,255,.94);
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow:var(--shadow);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 24px;
}

.live-status{
  display:flex;
  flex-direction:column;
  gap:5px;
  position:relative;
  padding-right:26px;
}

.live-status:before{
  content:"";
  position:absolute;
  right:0;
  top:6px;
  width:13px;
  height:13px;
  border-radius:50%;
  background:var(--green);
  box-shadow:0 0 0 6px rgba(24,195,126,.12);
}

.live-status b{
  font-size:14px;
}

.live-status small{
  color:var(--muted);
  font-size:12px;
}

.userbar{
  display:flex;
  align-items:center;
  gap:16px;
}

.userbar .bell,
.userbar .moon{
  font-size:25px;
  position:relative;
}

.userbar .bell i{
  position:absolute;
  top:-7px;
  right:-7px;
  background:#0866FF;
  color:#fff;
  font-size:10px;
  width:18px;
  height:18px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-style:normal;
}

.userbar small{
  display:block;
  color:var(--muted);
  font-size:12px;
}

.userbar b{
  font-size:16px;
}

.avatar{
  width:48px;
  height:48px;
  border-radius:50%;
  background:#EAF2FF;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:26px;
}

/* Welcome */
.welcome{
  min-height:150px;
  display:grid;
  grid-template-columns:260px 1fr;
  align-items:center;
  background:rgba(255,255,255,.86);
  border-radius:18px;
  padding:26px 32px;
}

.welcome h1{
  margin:0 0 10px;
  font-size:38px;
  letter-spacing:-1px;
}

.welcome p{
  margin:0;
  color:var(--muted);
  font-size:16px;
}

.chart-art{
  position:relative;
  height:110px;
}

.chart-art span{
  position:absolute;
  bottom:18px;
  width:28px;
  border-radius:8px 8px 0 0;
  background:linear-gradient(180deg,#4F7DFF,#0B48D9);
  box-shadow:0 15px 30px rgba(37,99,235,.18);
}

.chart-art span:nth-child(1){right:25px;height:54px}
.chart-art span:nth-child(2){right:65px;height:76px}
.chart-art span:nth-child(3){right:105px;height:98px}

.chart-art svg{
  position:absolute;
  right:95px;
  top:0;
  width:170px;
  height:100px;
}

.chart-art polyline{
  fill:none;
  stroke:#0866FF;
  stroke-width:5;
  stroke-linecap:round;
  stroke-linejoin:round;
}

/* Stats */
.stats{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:14px;
}

.stat{
  min-height:185px;
  background:rgba(255,255,255,.94);
  border:1px solid var(--border);
  border-radius:15px;
  padding:22px;
  box-shadow:var(--shadow);
}

.icon{
  width:48px;
  height:48px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:27px;
  margin-bottom:14px;
}

.wallet{background:#EAF2FF;color:#0866FF}
.cart{background:#E9FBF4;color:#10B981}
.done{background:#E8F9F1;color:#16A34A}
.clock{background:#FFF4E5;color:#F59E0B}
.bolt{background:#F3EAFE;color:#7C3AED}

.stat span{
  display:block;
  color:#2A3D5F;
  font-weight:800;
  margin-bottom:12px;
}

.stat b{
  display:block;
  font-size:30px;
  margin-bottom:6px;
}

.stat small{
  display:block;
  color:var(--muted);
  margin-bottom:12px;
}

.stat button{
  width:100%;
  border:0;
  border-radius:10px;
  padding:12px;
  background:linear-gradient(135deg,var(--blue),var(--blue2));
  color:#fff;
  font-weight:900;
}

.stat a{
  color:var(--blue);
  font-weight:900;
  font-size:13px;
}

/* Panels */
.panel{
  background:rgba(255,255,255,.94);
  border:1px solid var(--border);
  border-radius:17px;
  box-shadow:var(--shadow);
  padding:22px;
}

.panel-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  margin-bottom:18px;
}

.panel-head h2{
  margin:0 0 6px;
  font-size:20px;
}

.panel-head p{
  margin:0;
  color:var(--muted);
  font-size:12px;
}

.panel-head a{
  color:var(--blue);
  font-weight:900;
  font-size:13px;
}

/* Platforms */
.platform-grid{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:16px;
}

.platform-card{
  min-height:165px;
  border:1px solid var(--border);
  border-radius:15px;
  background:#fff;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  transition:.18s;
}

.platform-card:hover{
  transform:translateY(-5px);
  box-shadow:0 18px 40px rgba(8,102,255,.10);
}

.platform-card i,
.order-row i,
.service-row i,
.system-list i{
  width:52px;
  height:52px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-style:normal;
  font-size:32px;
  font-weight:900;
}

.platform-card b{
  font-size:17px;
}

.platform-card small{
  color:var(--muted);
}

.platform-card button{
  width:30px;
  height:30px;
  border:0;
  border-radius:10px;
  background:#F2F6FC;
  color:#0A2A5C;
  font-size:22px;
}

.fb{background:#1877F2!important}
.ig{background:radial-gradient(circle at 30% 25%,#ffd600 0 10%,#ff7a00 20%,#ff0069 45%,#d300c5 70%,#7638fa 100%)!important}
.tk{background:#000!important;text-shadow:2px 0 #25F4EE,-2px 0 #FE2C55}
.yt{background:#FF0000!important;font-size:24px!important}
.tg{background:#2AABEE!important}

/* Bottom grid */
.bottom-grid{
  display:grid;
  grid-template-columns:1.25fr 1fr 1fr;
  gap:16px;
}

.order-row{
  display:grid;
  grid-template-columns:42px 1.2fr 80px 1fr 70px;
  gap:9px;
  align-items:center;
  padding:9px 0;
  border-bottom:1px solid #F0F4FA;
}

.order-row i,
.service-row i,
.system-list i{
  width:32px;
  height:32px;
  font-size:20px;
}

.order-row b,
.service-row b{
  font-size:12px;
}

.order-row small,
.service-row small{
  color:var(--muted);
  font-size:11px;
}

.tag{
  border-radius:999px;
  padding:6px 9px;
  font-size:11px;
  font-weight:900;
  text-align:center;
}

.tag.warn{background:#FFF4E5;color:#F59E0B}
.tag.ok{background:#E8F9F1;color:#16A34A}
.tag.bad{background:#FEE2E2;color:#EF4444}

progress{
  width:100%;
  height:7px;
  border:0;
  border-radius:99px;
  overflow:hidden;
}

progress::-webkit-progress-bar{background:#E9EEF5}
progress::-webkit-progress-value{background:#0866FF;border-radius:99px}

.service-row{
  display:grid;
  grid-template-columns:36px 1fr 82px;
  gap:9px;
  align-items:center;
  padding:10px 0;
  border-bottom:1px solid #F0F4FA;
}

.service-row button{
  border:0;
  background:#F3F7FD;
  color:var(--blue);
  font-weight:900;
  border-radius:10px;
  padding:8px 10px;
  font-size:11px;
}

.system-ok{
  background:#EAFBF3;
  color:#0F8F59;
  text-align:center;
  border-radius:12px;
  padding:14px;
  font-weight:900;
  line-height:1.7;
  margin-bottom:14px;
}

.system-ok small{
  color:#64748B;
  font-weight:700;
}

.system-list p{
  margin:0;
  padding:7px 0;
  border-bottom:1px solid #F0F4FA;
  display:grid;
  grid-template-columns:26px 1fr auto;
  align-items:center;
  gap:8px;
  font-size:13px;
}

.system-list span{
  color:#16A34A;
  font-weight:900;
}

/* Feature strip */
.features-strip{
  background:rgba(255,255,255,.94);
  border:1px solid var(--border);
  border-radius:17px;
  box-shadow:var(--shadow);
  display:grid;
  grid-template-columns:repeat(4,1fr);
  padding:20px;
  gap:10px;
}

.features-strip div{
  text-align:center;
  border-left:1px solid #EEF2F7;
}

.features-strip div:last-child{
  border-left:0;
}

.features-strip b{
  display:block;
  margin-bottom:6px;
}

.features-strip small{
  color:var(--muted);
  line-height:1.6;
}

/* Rightbar */
.rightbar{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.wallet-card,
.premium-card{
  background:
    radial-gradient(circle at 80% 20%,rgba(124,58,237,.48),transparent 34%),
    linear-gradient(135deg,#061A3D,#0B48D9);
  color:#fff;
  border-radius:18px;
  padding:26px;
  min-height:225px;
  box-shadow:0 24px 55px rgba(8,102,255,.18);
}

.wallet-card span{
  display:block;
  margin-bottom:18px;
}

.wallet-card b{
  display:block;
  font-size:36px;
  margin-bottom:10px;
}

.wallet-card small{
  display:block;
  margin-bottom:28px;
}

.wallet-card button,
.premium-card button{
  width:100%;
  border:0;
  border-radius:12px;
  padding:14px;
  background:#fff;
  color:var(--blue);
  font-weight:900;
}

.quick-card{
  background:rgba(255,255,255,.94);
  border:1px solid var(--border);
  border-radius:17px;
  padding:22px;
  box-shadow:var(--shadow);
}

.quick-card h3{
  margin:0 0 18px;
  font-size:18px;
}

.quick-card button{
  width:100%;
  height:50px;
  margin-bottom:10px;
  border:1px solid var(--border);
  background:#fff;
  border-radius:12px;
  color:#0A2A5C;
  font-weight:800;
}

.premium-card{
  background:
    radial-gradient(circle at 82% 18%,rgba(124,58,237,.55),transparent 34%),
    linear-gradient(135deg,#061A3D,#2B0F75);
  text-align:center;
}

.premium-card div{
  font-size:54px;
}

.premium-card h3{
  color:#FFD166;
  margin:8px 0;
  font-size:24px;
}

.premium-card p{
  color:rgba(255,255,255,.86);
  line-height:1.8;
}

/* Responsive */
@media(max-width:1250px){
  .app{
    grid-template-columns:230px 1fr;
  }
  .rightbar{
    display:none;
  }
  .stats{
    grid-template-columns:repeat(3,1fr);
  }
}

@media(max-width:900px){
  .app{
    grid-template-columns:1fr;
    padding:12px;
  }

  .sidebar{
    min-height:auto;
    border-radius:18px;
  }

  .menu{
    display:grid;
    grid-template-columns:repeat(2,1fr);
  }

  .speed-card{
    display:none;
  }

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

  .chart-art{
    display:none;
  }

  .stats,
  .platform-grid,
  .bottom-grid,
  .features-strip{
    grid-template-columns:1fr;
  }

  .topbar{
    height:auto;
    padding:16px;
    gap:15px;
    flex-direction:column;
    align-items:flex-start;
  }

  .userbar{
    width:100%;
    justify-content:space-between;
  }
}

/* Fix welcome section to match reference: chart left, greeting right */
.welcome{
  direction:ltr !important;
  grid-template-columns:300px 1fr !important;
  gap:28px !important;
  padding:28px 34px !important;
}

.welcome > div{
  direction:rtl !important;
}

.welcome > div:last-child{
  text-align:right !important;
}

.chart-art{
  direction:ltr !important;
  width:270px !important;
  height:120px !important;
  position:relative !important;
  justify-self:start !important;
}

.chart-art span{
  right:auto !important;
  left:auto !important;
  width:30px !important;
  background:linear-gradient(180deg,#5D8CFF,#0B48D9) !important;
}

.chart-art span:nth-child(1){
  left:16px !important;
  height:64px !important;
}

.chart-art span:nth-child(2){
  left:58px !important;
  height:88px !important;
}

.chart-art span:nth-child(3){
  left:100px !important;
  height:110px !important;
}

.chart-art svg{
  right:auto !important;
  left:90px !important;
  top:4px !important;
  width:170px !important;
  height:100px !important;
}

.chart-art polyline{
  stroke:#0866FF !important;
  stroke-width:4 !important;
}

.welcome h1{
  font-size:42px !important;
}

@media(max-width:900px){
  .welcome{
    direction:rtl !important;
    grid-template-columns:1fr !important;
  }
}

/* Welcome chart closer to reference */
.chart-art{
  width:260px !important;
  height:120px !important;
  transform:scale(.82) !important;
  transform-origin:left center !important;
  opacity:.95 !important;
}

.chart-art:before{
  content:"";
  position:absolute;
  left:0;
  top:12px;
  width:240px;
  height:95px;
  background:
    linear-gradient(155deg, transparent 0 18%, rgba(37,99,235,.09) 19% 20%, transparent 21% 100%),
    linear-gradient(25deg, transparent 0 35%, rgba(37,99,235,.08) 36% 37%, transparent 38% 100%),
    linear-gradient(0deg, transparent 0 48%, rgba(37,99,235,.08) 49% 50%, transparent 51% 100%);
  transform:skewX(-18deg);
}

.chart-art span{
  width:28px !important;
  border-radius:4px 4px 0 0 !important;
  box-shadow:8px 8px 18px rgba(37,99,235,.13) !important;
}

.chart-art span:after{
  content:"";
  position:absolute;
  right:-9px;
  top:5px;
  width:9px;
  height:100%;
  background:linear-gradient(180deg,#2F6DFF,#083EBE);
  transform:skewY(-30deg);
  opacity:.75;
}

.chart-art span:nth-child(1){
  left:18px !important;
  height:52px !important;
  bottom:16px !important;
}

.chart-art span:nth-child(2){
  left:58px !important;
  height:72px !important;
  bottom:16px !important;
}

.chart-art span:nth-child(3){
  left:98px !important;
  height:92px !important;
  bottom:16px !important;
}

.chart-art svg{
  left:96px !important;
  top:20px !important;
  width:150px !important;
  height:78px !important;
}

.chart-art polyline{
  stroke-width:3 !important;
  filter:drop-shadow(0 6px 8px rgba(37,99,235,.18));
}


.app-toast{
  position:fixed;
  left:24px;
  bottom:24px;
  background:#071B3A;
  color:#fff;
  padding:14px 18px;
  border-radius:14px;
  box-shadow:0 18px 45px rgba(15,23,42,.22);
  font-weight:900;
  opacity:0;
  transform:translateY(14px);
  pointer-events:none;
  transition:.22s;
  z-index:999;
}

.app-toast.show{
  opacity:1;
  transform:translateY(0);
}

.platform-card,
.stat a,
.panel-head a,
.service-row button,
.quick-card button,
.wallet-card button,
.premium-card button,
.speed-card button{
  cursor:pointer;
}
