:root {
  --5sim-bg-dark: #12161b;
  --5sim-sidebar-bg: #1c232e;
  --5sim-header-blue: #167ffb;
  --5sim-header-hover: #146de2;
  --5sim-text-primary: #ffffff;
  --5sim-text-secondary: #8c9bac;
  --5sim-border: #2c3645;
  --5sim-hover: #232c3a;
  --5sim-accent: #f59e0b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--5sim-bg-dark);
  color: var(--5sim-text-primary);
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden; /* App-like layout */
}

/* Layout */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* SIDEBAR */
.sidebar {
  width: 320px;
  min-width: 320px;
  background-color: var(--5sim-sidebar-bg);
  border-right: 1px solid var(--5sim-border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}
.sidebar::-webkit-scrollbar-thumb {
  background: var(--5sim-border);
  border-radius: 3px;
}

/* Blue Header */
.sidebar-header {
  background-color: var(--5sim-header-blue);
  color: white;
  padding: 20px;
  border-radius: 0 0 16px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.sidebar-header .logo-badge {
  background: white;
  color: var(--5sim-header-blue);
  font-weight: 900;
  font-size: 16px;
  padding: 4px 8px;
  border-radius: 4px;
}
.sidebar-header .title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
}

/* Buy Tabs */
.buy-tabs {
  display: flex;
  padding: 0 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--5sim-border);
}
.buy-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  color: var(--5sim-text-secondary);
  font-weight: 600;
  cursor: pointer;
  position: relative;
}
.buy-tab.active {
  color: var(--5sim-accent);
}
.buy-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--5sim-accent);
}

/* Step Headers */
.step-header {
  font-size: 15px;
  font-weight: 600;
  padding: 0 20px;
  margin: 10px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Search Box */
.search-box-container {
  padding: 0 20px;
  margin-bottom: 10px;
}
.search-box {
  background-color: var(--5sim-bg-dark);
  border: 1px solid var(--5sim-header-blue);
  border-radius: 20px;
  display: flex;
  align-items: center;
  padding: 8px 16px;
}
.search-box i {
  color: var(--5sim-header-blue);
  margin-right: 10px;
}
.search-box input {
  background: transparent;
  border: none;
  color: white;
  width: 100%;
  outline: none;
  font-size: 14px;
}
.search-box input::placeholder {
  color: var(--5sim-text-secondary);
}

/* List Items */
.list-container {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 20px;
}
.list-container::-webkit-scrollbar {
  width: 4px;
}
.list-container::-webkit-scrollbar-thumb {
  background: var(--5sim-border);
}
.list-item {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  color: white;
}
.list-item:hover, .list-item.selected {
  background-color: var(--5sim-hover);
}
.list-item-icon {
  width: 24px;
  height: 24px;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.list-item-icon img {
  width: 20px;
  border-radius: 2px;
}
.list-item-name {
  flex: 1;
  font-weight: 500;
}
.list-item-right {
  text-align: right;
  font-size: 12px;
}
.list-item-price {
  font-weight: 600;
  color: white;
}
.list-item-stock {
  color: #00c853;
  font-size: 11px;
}
.list-item-star {
  color: var(--5sim-text-secondary);
  margin-right: 12px;
}
.list-item.favorite .list-item-star {
  color: var(--5sim-accent);
}

.show-all-btn {
  text-align: center;
  color: var(--5sim-header-blue);
  font-size: 12px;
  cursor: pointer;
  padding: 10px;
  margin-bottom: 20px;
}

/* MAIN CONTENT */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--5sim-bg-dark);
  overflow-y: auto;
}

/* Top Navbar */
.top-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px;
}
.top-nav-links {
  display: flex;
  gap: 24px;
}
.top-nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
}
.top-nav-links a:hover {
  color: var(--5sim-header-blue);
}
.top-nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.btn-outline {
  border: 1px solid white;
  background: transparent;
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 14px;
}
.btn-primary {
  background: var(--5sim-header-blue);
  border: none;
  color: white;
  padding: 10px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  width: 100%;
}
.btn-primary:hover {
  background: var(--5sim-header-hover);
}
.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}
.balance-badge {
  background: rgba(0, 200, 83, 0.1);
  color: #00c853;
  padding: 6px 12px;
  border-radius: 16px;
  font-weight: 600;
}

/* Dashboard Area */
.dashboard-area {
  padding: 40px;
  flex: 1;
}

.auth-box {
  background: var(--5sim-sidebar-bg);
  border-radius: 12px;
  padding: 40px;
  width: 100%;
  max-width: 480px;
  margin: 40px auto;
  text-align: center;
}

.active-orders {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}
.order-card {
  background: var(--5sim-sidebar-bg);
  border-radius: 12px;
  padding: 20px;
  border-left: 4px solid var(--5sim-header-blue);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.order-service-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
}
.order-number {
  font-size: 24px;
  font-weight: bold;
  color: white;
  letter-spacing: 1px;
}
.order-wait {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--5sim-accent);
  font-size: 14px;
}
.order-code {
  font-size: 20px;
  color: #00c853;
  font-weight: bold;
  background: rgba(0,200,83,0.1);
  padding: 8px 16px;
  border-radius: 8px;
  text-align: center;
}
.order-actions {
  display: flex;
  gap: 10px;
}
.order-actions button {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}
.btn-cancel {
  background: rgba(255,59,48,0.1);
  color: #ff3b30;
}
.btn-done {
  background: rgba(0,200,83,0.1);
  color: #00c853;
}

@media (max-width: 900px) { body { overflow-y: auto !important; } .app-container { flex-direction: column; height: auto; } .sidebar { width: 100%; min-width: 100%; height: auto; border-right: none; border-bottom: 1px solid var(--5sim-border); overflow: visible; } .main-content { overflow: visible; } .top-navbar { flex-direction: column; padding: 16px; gap: 12px; } .top-nav-links { flex-wrap: wrap; justify-content: center; } .dashboard-area { padding: 16px; } .active-orders { grid-template-columns: 1fr; } }
