:root{
  --shadow: 0 10px 24px rgba(0,0,0,.35);
  --panel: rgba(255,255,255,.92);
  --nav: rgba(30,40,58,.92);
  --nav2: rgba(18,26,40,.92);
  --accent: #f0b13a;
  --text: #0f1725;
  --muted: rgba(0,0,0,.55);
  --pos: #1d8f3a;
  --neg: #b12b2b;
  --border: rgba(0,0,0,.12);
  --edu: #53b7ff;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    linear-gradient(rgba(0,0,0,.12), rgba(0,0,0,.12)),
    url("../assets/office-bg.png") center/cover no-repeat fixed;
}

.app{ min-height:100vh; display:flex; flex-direction:column; }

/* Topbar */
.topbar{
  height: 96px;
  display:grid;
  grid-template-columns: 420px 1fr 360px;
  align-items:center;
  padding: 0 18px;
  background: linear-gradient(#1c2a40, #152236);
  border-bottom: 3px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow);
}

/* Brand */
.brand{ display:flex; flex-direction:column; gap: 6px; }
.logo{
  position:relative;
  font-weight: 950;
  letter-spacing: .9px;
  font-size: 54px;
  line-height: 1;
  display:flex;
  align-items: baseline;
  gap: 10px;
  text-shadow: 0 2px 0 rgba(0,0,0,.25);
  user-select:none;
}
.logo__market{ color: var(--accent); }
.logo__tycoon{ color: #f2f4f8; }
.logo--ticker .logo__glow{
  position:absolute;
  left: 0; right: 0; bottom: -10px;
  height: 14px;
  pointer-events:none;
  background: radial-gradient(circle at 10% 50%,
    rgba(240,177,58,.0) 0%,
    rgba(240,177,58,.0) 25%,
    rgba(240,177,58,.38) 45%,
    rgba(240,177,58,.0) 70%);
  filter: blur(1px);
  opacity: .85;
  animation: tickerGlow 2.2s linear infinite;
}
@keyframes tickerGlow{
  0%   { transform: translateX(-35%); opacity: .55; }
  30%  { opacity: .95; }
  60%  { opacity: .85; }
  100% { transform: translateX(35%); opacity: .55; }
}

.brand-sub{
  display:flex; align-items:center; gap: 10px;
  color: rgba(255,255,255,.86);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .3px;
}
.brand-sub .company{
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.20);
  border: 1px solid rgba(255,255,255,.10);
}
.brand-sub .sep{ opacity:.55; }
.brand-sub .tagline{ opacity:.90; }

/* Topstats */
.topstats{
  display:flex; align-items:center; justify-content:center;
  gap: 18px;
  color: rgba(255,255,255,.90);
  font-weight: 700;
}
.statline .label{ color: rgba(255,255,255,.82); margin-right:6px; font-weight: 900; }
.statline .value{ color:#fff; font-weight: 900; }
.statline .sep{ margin:0 10px; color: rgba(255,255,255,.35); }
.mini-brand{
  display:flex; align-items:center; gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.20);
  border: 1px solid rgba(255,255,255,.10);
  font-weight: 900;
}
.mini-brand .spark{ color: var(--accent); font-size: 16px; }

/* Right */
.topright{ display:flex; align-items:center; justify-content:flex-end; gap: 10px; flex-wrap:wrap; }

.edu-badge{
  display:flex; align-items:center; gap: 10px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.20);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.92);
  font-weight: 950;
  cursor:pointer;
}
.edu-dot{
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--edu);
  box-shadow: 0 0 0 4px rgba(83,183,255,.18);
}
.edu-timer{
  margin-left: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.10);
  font-weight: 950;
  letter-spacing: .3px;
  opacity:.95;
}

html.edu-on .edu-badge{
  border-color: rgba(83,183,255,.35);
  box-shadow: 0 0 0 2px rgba(83,183,255,.12) inset;
}
html:not(.edu-on) .edu-dot{
  background: rgba(255,255,255,.35);
  box-shadow: 0 0 0 4px rgba(255,255,255,.10);
}

.lang-toggle{
  display:flex; align-items:center; gap: 10px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.20);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.92);
  font-weight: 950;
  cursor:pointer;
}
.lang-flag{ opacity:.95; }
.lang-text{ letter-spacing:.5px; }
.lang-text--alt{ opacity:.75; }
.lang-sep{ opacity:.55; }

.trophy{ font-size: 28px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.25)); }
.highscore{
  display:flex; align-items:center; gap: 10px;
  padding: 10px 14px;
  color:#fff;
  background: linear-gradient(#2c3c56, #22324b);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(0,0,0,.25);
  font-weight: 900;
}
.highscore strong{ font-size: 18px; }
.trophy-mini{ opacity:.95; }

/* Layout */
.layout{
  width: min(1180px, calc(100% - 36px));
  margin: 18px auto 24px;
  display:grid;
  grid-template-columns: 270px 1fr;
  gap: 18px;
}

/* Sidebar */
.sidebar{ display:flex; flex-direction:column; gap: 14px; }
.nav{
  background: linear-gradient(var(--nav), var(--nav2));
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 10px;
  padding: 12px;
  box-shadow: var(--shadow);
}
.navbtn{
  width:100%;
  display:grid;
  grid-template-columns: 34px 1fr auto;
  align-items:center;
  gap: 10px;
  padding: 12px 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(#2c3c56, #22324b);
  color: #f2f4f8;
  border-radius: 10px;
  cursor:pointer;
  font-weight: 900;
  margin-bottom: 10px;
  box-shadow: 0 6px 14px rgba(0,0,0,.18);
}
.navbtn:last-child{ margin-bottom:0; }
.navbtn .icon{ font-size: 18px; opacity:.95; }
.navbtn .txt{ text-align:left; }
.navbtn .badge{
  display:inline-flex; align-items:center; justify-content:center;
  min-width: 34px; height: 26px; padding: 0 8px;
  border-radius: 6px;
  background: linear-gradient(#f6c253,#e9a62a);
  color: #2b1d06;
  border: 1px solid rgba(0,0,0,.18);
  font-weight: 950;
}
.navbtn--active{
  background: linear-gradient(#d37d2f, #b86019);
  border-color: rgba(255,255,255,.20);
}
.navbtn--active .badge{ background: linear-gradient(#ffe08a,#f0b13a); }

.statbox{
  background: linear-gradient(#2c3c56, #22324b);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow:hidden;
}
.statbox__title{
  padding: 12px 14px;
  font-weight: 950;
  color: var(--accent);
  font-size: 22px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.statbox__rows{
  padding: 12px 14px 10px;
  display:flex;
  flex-direction:column;
  gap: 10px;
  color: rgba(255,255,255,.92);
  font-weight: 800;
}
.statbox .row{ display:flex; justify-content:space-between; gap: 10px; }

.pos{ color: #1d8f3a; font-weight: 950; }
.neg{ color: #b12b2b; font-weight: 950; }

.side-actions{
  padding: 10px 14px 14px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.sidebtn{
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.18);
  color: rgba(255,255,255,.95);
  border-radius: 10px;
  padding: 10px 10px;
  font-weight: 950;
  cursor:pointer;
}

/* Content */
.content{ display:flex; flex-direction:column; gap: 14px; }
.content-head{
  background: linear-gradient(#2c3c56, #22324b);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}
.content-head h1{
  margin:0;
  color:#f2f4f8;
  font-size: 28px;
  letter-spacing:.2px;
}

.head-controls{ display:flex; align-items:center; gap: 10px; }
.pillinfo{
  display:flex; align-items:center; gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.20);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.92);
  font-weight: 950;
}
.dot{
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #66e07f;
  box-shadow: 0 0 0 4px rgba(102,224,127,.18);
}
.dot.off{ background:#ffcc66; box-shadow: 0 0 0 4px rgba(255,204,102,.18); }

.view{ display:none; }
.view--active{ display:block; }

.cards-row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.cards-row--bottom{ margin-top: 2px; }

.card{
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow:hidden;
}
.card__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(#2c3c56, #22324b);
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.card__head h2{ margin:0; color:#f2f4f8; font-size: 20px; font-weight: 950; }
.card__head-icons{ color: rgba(255,255,255,.60); font-weight: 950; letter-spacing: 2px; }

.table{ padding: 8px 10px 10px; }
.trow{
  display:grid;
  grid-template-columns: 1.1fr .65fr .65fr .75fr;
  align-items:center;
  gap: 10px;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.trow:last-child{ border-bottom:none; }
.thead{
  padding-top: 8px; padding-bottom: 8px;
  color: rgba(0,0,0,.55);
  font-weight: 950;
  font-size: 13px;
}
.cell{ font-weight: 950; }
.cell.right{ text-align:right; }

.btn{
  border: 1px solid rgba(0,0,0,.18);
  background: linear-gradient(#ffe08a,#f0b13a);
  color:#2b1d06;
  border-radius: 6px;
  padding: 8px 12px;
  font-weight: 950;
  cursor:pointer;
  box-shadow: 0 6px 14px rgba(0,0,0,.14);
}
.btn--sell{ background: linear-gradient(#ffe08a,#f0b13a); }
.btn:disabled{ opacity:.55; cursor:not-allowed; }

.pad{ padding: 12px 14px 14px; }
.formrow{ display:grid; grid-template-columns: 140px 1fr; gap: 10px; align-items:center; margin-bottom: 12px; }
.formrow label{ font-weight: 950; color: rgba(0,0,0,.75); }
select, input{
  width:100%;
  padding: 10px 10px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.18);
  background: rgba(255,255,255,.95);
  font-weight: 900;
}
.kpi{
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0,0,0,.06);
  border: 1px solid rgba(0,0,0,.12);
  font-weight: 950;
}
.formactions{ display:flex; justify-content:flex-end; margin-top: 6px; }
.hint{ margin-top: 10px; font-weight: 950; color: rgba(0,0,0,.72); min-height: 20px; }

.tips{
  background: rgba(40,56,78,.92);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 14px 16px;
  color:#f2f4f8;
  position:relative;
}
.tips__head{ font-weight: 950; font-size: 22px; margin-bottom: 6px; }
.tips__list{ margin: 10px 0 0 18px; padding: 0; font-weight: 900; color: rgba(255,255,255,.92); }
.tips__list li{ margin: 8px 0; }
.tips__actions{ position:absolute; right: 16px; bottom: 14px; }
.btn-next{
  border: 1px solid rgba(0,0,0,.22);
  background: linear-gradient(#d37d2f, #b86019);
  color:#fff;
  border-radius: 10px;
  padding: 12px 22px;
  font-weight: 950;
  cursor:pointer;
  box-shadow: 0 10px 22px rgba(0,0,0,.26);
}
.btn-next span{ margin-left: 10px; font-size: 18px; }

/* 🎓 EDU panel */
.edu-panel{
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.86);
  border-radius: 12px;
  padding: 12px;
}
.edu-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  font-weight: 950;
  color: rgba(0,0,0,.75);
}
.edu-ico{ opacity:.9; }
.edu-chip{
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
  border: 1px solid rgba(0,0,0,.12);
  color: rgba(0,0,0,.70);
  font-weight: 950;
}
.edu-actions{
  margin-top: 10px;
  display:flex;
  justify-content:flex-end;
  gap: 10px;
  flex-wrap:wrap;
}
.edu-note{
  margin-top: 10px;
  font-weight: 900;
  color: rgba(0,0,0,.62);
}

/* Quests buttons reused */
.qbtn{
  border: 1px solid rgba(0,0,0,.18);
  background: rgba(0,0,0,.08);
  border-radius: 10px;
  padding: 9px 12px;
  font-weight: 950;
  cursor:pointer;
}
.qbtn.primary{
  background: linear-gradient(#ffe08a,#f0b13a);
  color:#2b1d06;
  box-shadow: 0 6px 14px rgba(0,0,0,.14);
}
.qbtn:disabled{ opacity:.55; cursor:not-allowed; }

/* Footer */
.footer{
  margin-top: 10px;
  background: linear-gradient(#1c2a40, #152236);
  border-top: 3px solid rgba(255,255,255,.08);
  box-shadow: 0 -10px 24px rgba(0,0,0,.25);
  padding: 14px 20px;
  color: rgba(255,255,255,.86);
  font-weight: 900;
}
.footer-inner{
  max-width: 1180px;
  margin: 0 auto;
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items:center;
  gap: 10px;
}
.footer-left{ text-align:left; }
.footer-center{ text-align:center; opacity:.85; }
.footer-right{
  text-align:right;
  display:flex;
  justify-content:flex-end;
  gap: 18px;
}
.footer-right a{
  color: rgba(255,255,255,.90);
  text-decoration: none;
  font-weight: 950;
  transition: opacity .2s ease;
}
.footer-right a:hover{ opacity:.72; }
.footsep{ margin: 0 10px; opacity:.6; }

/* Responsive */
@media (max-width: 980px){
  .topbar{ grid-template-columns: 1fr; height:auto; gap: 10px; padding: 12px; }
  .topright{ justify-content:flex-start; }
  .layout{ grid-template-columns: 1fr; }
  .cards-row{ grid-template-columns: 1fr; }
  .tips__actions{ position:static; margin-top: 12px; }
  .formrow{ grid-template-columns: 1fr; }
  .footer-inner{ grid-template-columns: 1fr; text-align:center; }
  .footer-left,.footer-center,.footer-right{ text-align:center; justify-content:center; }
}