:root {
  --pink: #E5195E;
  --pink-deep: #C1094B;
  --pink-soft: rgba(229, 25, 94, 0.09);
  --teal: #10BFA5;
  --teal-soft: rgba(16, 191, 165, 0.12);
  --orange: #FF9F43;
  --star: #FFC93C;
  --ink: #23232E;
  --gray: #7C7C8A;
  --glass: rgba(255, 255, 255, 0.66);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(255, 255, 255, 0.8);
  --line: rgba(35, 35, 46, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

html, body {
  overflow-x: hidden;
  min-height: 100vh;
}

body {
  min-height: 100vh;
  background: #F4F2F5;
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(700px 420px at 92% -6%, rgba(229, 25, 94, 0.15), transparent 60%),
    radial-gradient(600px 420px at -8% 30%, rgba(16, 191, 165, 0.14), transparent 60%),
    radial-gradient(640px 480px at 55% 108%, rgba(255, 159, 67, 0.12), transparent 60%),
    linear-gradient(#FBFAFC, #F0EEF3);
}

.app {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
}

/* Glass */
.glass {
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 26px rgba(35, 35, 46, 0.07);
}

.glass-strong {
  background: var(--glass-strong);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(35, 35, 46, 0.09);
}

/* Sidebar */
.side {
  width: 242px;
  flex-shrink: 0;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
}

.side .logo {
  padding: 6px 8px 18px;
}

.side .logo img {
  width: 170px;
  display: block;
}

.side .tag {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(140deg, #2BD9BF, var(--teal));
  border-radius: 6px;
  padding: 2px 8px;
  display: inline-block;
  margin: 6px 0 0 8px;
  letter-spacing: 0.5px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  background: none;
  padding: 11px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray);
  cursor: pointer;
  text-align: left;
  transition: 0.15s;
  text-decoration: none;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.5);
}

.nav-btn.on {
  background: linear-gradient(140deg, #FF4E86, var(--pink));
  color: #fff;
  box-shadow: 0 8px 18px rgba(229, 25, 94, 0.30);
}

.nav-btn .ic {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.side .sub {
  margin-top: auto;
  font-size: 10.5px;
  color: var(--gray);
  padding: 10px 8px;
}

.plan-chip {
  border-radius: 14px;
  padding: 12px;
  font-size: 11.5px;
  margin-top: 8px;
}

.plan-chip b {
  color: var(--pink);
  display: block;
  font-size: 13px;
}

/* Main */
.main {
  flex: 1;
  padding: 20px 26px 60px;
  max-width: 1120px;
}

/* Topbar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.topbar h1 {
  font-size: 21px;
  font-weight: 800;
}

.topbar .who {
  font-size: 12px;
  color: var(--gray);
}

.store-sel {
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  cursor: pointer;
  outline: none;
}

/* Cards */
.card {
  border-radius: 18px;
  padding: 18px;
}

/* Grid */
.grid {
  display: grid;
  gap: 14px;
}

.g4 {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.g2 {
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
}

/* KPI */
.kpi .lbl {
  font-size: 11px;
  color: var(--gray);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi .val {
  font-size: 26px;
  font-weight: 800;
  margin: 2px 0;
}

.kpi .dlt {
  font-size: 11px;
  font-weight: 700;
  color: var(--teal);
}

.kpi .dlt.neg {
  color: var(--pink);
}

/* Headings */
h2.blk {
  font-size: 15px;
  font-weight: 700;
  margin: 22px 0 10px;
}

/* Bar rows */
.bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  margin-bottom: 8px;
}

.bar-row .nm {
  width: 130px;
  color: var(--gray);
  font-weight: 600;
}

.bar {
  flex: 1;
  height: 10px;
  border-radius: 6px;
  background: rgba(35, 35, 46, 0.07);
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #FF4E86, var(--pink));
}

.bar.t i {
  background: linear-gradient(90deg, #2BD9BF, var(--teal));
}

.bar-row .v {
  width: 52px;
  text-align: right;
  font-weight: 700;
}

/* Buttons */
.btn {
  border: none;
  border-radius: 12px;
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: transform 0.12s;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn.pink {
  background: linear-gradient(140deg, #FF4E86, var(--pink));
  color: #fff;
  box-shadow: 0 8px 18px rgba(229, 25, 94, 0.30);
}

.btn.teal {
  background: linear-gradient(140deg, #2BD9BF, var(--teal));
  color: #fff;
  box-shadow: 0 8px 18px rgba(16, 191, 165, 0.30);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--glass-border);
  color: var(--ink);
}

.btn.sm {
  padding: 7px 12px;
  font-size: 11.5px;
  border-radius: 10px;
}

/* Fields */
.field {
  width: 100%;
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 13px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.75);
  outline: none;
  color: var(--ink);
}

.field:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(229, 25, 94, 0.12);
}

label.f {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gray);
  display: block;
  margin: 12px 0 5px;
}

.frow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

th {
  text-align: left;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray);
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.st {
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 8px;
  padding: 3px 9px;
  display: inline-block;
}

.st.on {
  background: var(--teal-soft);
  color: var(--teal);
}

.st.off {
  background: rgba(35, 35, 46, 0.07);
  color: var(--gray);
}

.st.pend {
  background: rgba(255, 159, 67, 0.15);
  color: #D97B16;
}

.row-actions button {
  margin-right: 4px;
}

/* Drop zone */
.drop {
  border: 2px dashed rgba(229, 25, 94, 0.4);
  border-radius: 16px;
  padding: 26px;
  text-align: center;
  font-size: 12.5px;
  color: var(--gray);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.5);
}

.drop b {
  color: var(--pink);
}

/* Toast */
#toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #23232E;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 14px;
  padding: 12px 20px;
  transition: 0.25s;
  z-index: 99;
  opacity: 0;
}

#toast.show {
  transform: translateX(-50%);
  opacity: 1;
}

/* Login */
#login {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(700px 420px at 92% -6%, rgba(229, 25, 94, 0.18), transparent 60%),
    radial-gradient(600px 420px at -8% 30%, rgba(16, 191, 165, 0.16), transparent 60%),
    linear-gradient(#FBFAFC, #EFEDF2);
}

.login-box {
  width: 400px;
  max-width: 92vw;
  border-radius: 26px;
  padding: 30px;
  text-align: center;
}

.login-box .biz {
  font-size: 12px;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

/* Messages */
.messages {
  list-style: none;
  margin-bottom: 16px;
}

.messages li {
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 8px;
}

.messages .error {
  background: rgba(229, 25, 94, 0.12);
  color: var(--pink);
  border: 1px solid rgba(229, 25, 94, 0.3);
}

.messages .success {
  background: rgba(16, 191, 165, 0.12);
  color: var(--teal);
  border: 1px solid rgba(16, 191, 165, 0.3);
}

/* Responsive */
@media (max-width: 860px) {
  .side {
    display: none;
  }
  .main {
    padding: 16px;
  }
}
