:root {
  --bg: #f8f9fa;
  --card: #ffffff;
  --text: #2b2b2b;
  --border: #e0e0e0;
  --primary: #5c3cfa;
  --hover: #f0f0f0;
  --shadow: rgba(0,0,0,0.1);
}

body.dark {
  --bg: #1e1e1e;
  --card: #2c2c2c;
  --text: #f5f5f5;
  --border: #444;
  --primary: #9c6eff;
  --hover: #333;
  --shadow: rgba(0,0,0,0.5);
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* ===== TOPBAR ===== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 18px;
  background: var(--card);
  box-shadow: 0 2px 6px var(--shadow);
  z-index: 1100;
}

/* ===== LAYOUT ===== */
.layout {
  display: flex;
  margin-top: 60px; /* space for fixed topbar */
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: 260px;
  max-width: 100%;
  padding: 20px;
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--shadow);
  overflow-y: auto;
  position: relative;
  transform: translateX(0); /* visible by default on desktop */
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Sidebar hidden by default on mobile */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    transform: translateX(-100%);
    z-index: 1000;
    max-height: 100vh;
    border-radius: 0 12px 12px 0;
  }

  .sidebar.active {
    transform: translateX(0);
  }
}

/* ===== ACCOUNT CARD ===== */
.account {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 15px;
  padding: 15px 20px;
  background: var(--bg);
  border-radius: 8px; /* rectangle with slight rounding */
  border: 1px solid var(--border);
  box-shadow: 0 2px 4px var(--shadow);
}

/* ===== BUTTON ===== */
.manage-btn {
  width: 100%;
  padding: 14px;
  border-radius: 30px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  margin-bottom: 25px;
  cursor: pointer;
  font-weight: 500;
  box-shadow: 0 2px 6px var(--shadow);
  transition: background 0.3s, transform 0.2s;
}

.manage-btn:hover {
  background: #4520c7;
  transform: translateY(-2px);
}

/* ===== SEARCH BOX ===== */
.search-box {
  width: 100%;          /* full width like button */
  margin-bottom: 20px;
}

.search-box input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  border-radius: 30px;
  border: 2px solid var(--primary);
  font-size: 16px;
  outline: none;
  background: var(--card);
  color: var(--text);
  transition: border 0.2s, box-shadow 0.3s;
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary);
}

/* ===== MENU CARDS ===== */
.menu-card {
  background: var(--card);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px var(--shadow);
}

.menu-item,
.menu-title {
  padding: 16px 20px;
  font-size: 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

.menu-title:hover,
.menu-item:hover {
  background: var(--hover);
}

/* ===== SUBMENU ===== */
.submenu {
  padding-left: 15px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.submenu .menu-item {
  padding: 12px 20px;
  font-size: 15px;
  border-bottom: 1px solid var(--border);
}

.submenu.active {
  max-height: 500px;
}

/* ===== ARROW INDICATOR ===== */
.menu-title .arrow {
  font-size: 14px;
  transition: transform 0.3s ease;
}

.menu-title.active .arrow {
  transform: rotate(180deg);
}

/* ===== CONTENT ===== */
.content {
  flex: 1;
  padding: 25px;
  min-width: 0;
}

.card {
  background: var(--card);
  padding: 25px;
  border-radius: 20px;
  box-shadow: 0 2px 10px var(--shadow);
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    margin-bottom: 20px;
  }

  .content {
    padding: 15px;
  }

  .menu-item,
  .menu-title {
    padding: 14px 16px;
    font-size: 15px;
  }

  .submenu .menu-item {
    padding: 10px 16px;
    font-size: 14px;
  }

  .search-box input {
    padding: 12px 14px;
    font-size: 14px;
  }
}
