:root{
  --bg-sidebar:#0d0e12;
  --bg-main:#f3f4f8;
  --card-bg:#ffffff;
  --text-primary:#1a1c23;
  --text-secondary:#71717a;
  --accent-pink:#ff7551;
  --accent-orange:#ff4b6b;
  --accent-purple:#7d69ff;
  --accent-blue:#2563eb;
  --border-color:rgba(0,0,0,0.06);
  --shadow-sm:0 2px 8px rgba(0,0,0,0.04);
  --shadow-md:0 8px 24px rgba(0,0,0,0.06);
  --radius-xl:24px;
  --radius-lg:16px;
  --radius-md:12px;
  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font-family:var(--sans);
  background:var(--bg-main);
  color:var(--text-primary);
  /* Removed: display:flex; which breaks with topbar outside */
  overflow-x:hidden;
}

/* LAYOUT */
/* Re-structuring: Sidebar is fixed left */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 260px;
  background: var(--bg-sidebar);
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 30px 20px;
  z-index: 1000;
  color: #fff;
  overflow-y: auto;
}

/* Pushes content and topbar to the right */
.main-wrapper, 
.layout, 
.topbar {
  padding-left: 260px;
}

.layout {
  display: block; /* sidebar is fixed now, so layout is just a wrapper for main */
  min-height: 100vh;
}

/* TOPBAR */
.topbar {
  height: 80px;
  padding: 0 40px 0 300px; /* 260 + 40 */
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  width: 100%;
}

.brand__mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-orange));
}

.menu {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.menu__item a {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  color: rgba(255,255,255,0.6);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}
.menu__item a:hover {
  color: #fff;
  background: rgba(255,255,255,0.05);
}
.menu__item.is-active a {
  color: #fff;
  background: rgba(255,255,255,0.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.menu__item .material-icons-round { 
  font-size: 20px; 
}

/* MAIN CONTENT */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 0 40px 40px;
}

.content__header {
  display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px;
}
.content__header h1 {
  font-size: 32px; font-weight: 800; letter-spacing: -0.5px;
}

/* COMPONENTS */
.btn {
  border: none;
  cursor: pointer;
  padding: 10px 20px;
  border-radius: 50px; /* Pill shape */
  font-weight: 700;
  font-size: 13px;
  transition: transform 0.1s, box-shadow 0.2s;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }

.btn-black { background: #1a1a1a; color: #fff; }
.btn-black-outline { background: transparent; border: 2px solid #1a1a1a; color: #1a1a1a; padding: 8px 18px; }
.btn--white { background: #fff; color: #000; box-shadow: var(--shadow-sm); }
.btn--success { background: linear-gradient(135deg, #4ade80, #22c55e); color: white; }
.btn--danger { background: #fff; border: 1px solid #fee2e2; color: #ef4444; }

/* Topbar Icons */
.icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  position: relative;
  cursor: pointer;
}
.badge-dot {
  position: absolute; top: 10px; right: 10px;
  width: 8px; height: 8px; background: #ef4444;
  border-radius: 50%; border: 2px solid #fff;
}

/* CARDS */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  overflow: hidden;
  margin-bottom: 24px;
}
.card__body { padding: 24px; }

/* INPUT */
.search input {
  background: #fff; box-shadow: var(--shadow-sm);
  border: 1px solid transparent;
  padding: 12px 20px; border-radius: 50px;
  width: 300px;
  font-weight: 500;
}
.search input:focus { outline: none; border-color: #ddd; }

/* TABLE RE-STYLING (Floating Rows) */
.tableWrap { border: none; overflow: visible; }
.table { border-collapse: separate; border-spacing: 0 16px; margin-top: -16px; }
.table th {
  padding: 0 24px 8px;
  font-size: 12px; text-transform: uppercase; color: var(--text-secondary);
  font-weight: 700; letter-spacing: 0.5px;
  border: none; background: transparent !important;
}
.table tbody tr {
  background: #fff;
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-lg);
  transition: transform 0.2s;
}
.table tbody tr:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.table td { 
  border: none; 
  padding: 20px 24px; 
  font-size: 14px; font-weight: 600; color: var(--text-primary);
  vertical-align: middle;
}
.table td:first-child { border-top-left-radius: var(--radius-lg); border-bottom-left-radius: var(--radius-lg); }
.table td:last-child { border-top-right-radius: var(--radius-lg); border-bottom-right-radius: var(--radius-lg); }

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.actions .btn {
  min-width: 100px;
}

/* Badges & Status */
.badge {
  background: rgba(0,0,0,0.04); border: none;
  border-radius: 50px; padding: 6px 14px;
  color: var(--text-primary);
  font-weight: 700; font-size: 12px;
}
.dot {box-shadow: none;}

/* LOG PANEL */
.logPanel { margin-top: 20px; border-radius: var(--radius-lg); border: none; box-shadow: var(--shadow-md); overflow: hidden; }
.pre { background: #1e1e2d; border: none; }

/* AUTH */
.authWrap { background: var(--bg-main); }
.authCard { border-radius: 30px; box-shadow: var(--shadow-md); border: none; }

/* Promo Page */
.promo-hero {
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #1e1e2e, #2d2d44);
  margin-bottom: 24px;
}

/* RESPONSIVE */
@media (max-width: 900px){
  .sidebar { position:relative; width: 100%; height: auto; flex-direction: row; padding: 10px; overflow-x: auto; }
  .topbar, .layout, .main-wrapper { padding-left: 0; }
  .topbar { padding: 0 20px; }
  .menu { flex-direction: row; }
  .layout { height: auto; overflow: visible; }
  .content { padding: 20px; }
  .sidebar__profile { display: none; }
  .sidebar__logo { margin-bottom: 0; margin-right: 20px; }
  .menu__item a { padding: 10px; }
  .menu__item span { display: none; } /* Show icon only or label only depending on space */
  .menu__item .material-icons-round { display: block; font-size: 24px; margin: 0; }
}

/* Hide original classes that conflict */
.table tr:hover td { background: transparent; } /* Handle hover on row instead */
.topbar { border: none; box-shadow: none; position: relative; }


