:root {
  --bg-dark: #0b0e14;
  --bg-sidebar: #11151c;
  --bg-card: #181d26;
  --bg-accent: #1e2430;
  --text-main: #e2e8f0;
  --text-dim: #94a3b8;
  --accent-primary: #727cf5; /* Boron Primary */
  --accent-success: #0acf97;
  --accent-danger: #fa5c7c;
  --accent-warning: #ffbc00;
  --accent-info: #39afd1;
  --border-color: rgba(255, 255, 255, 0.05);
  --sidebar-width: 260px;
}

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

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

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

/* Sidebar */
aside {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  padding: 20px;
  position: fixed;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.logo-container {
  padding: 10px 0;
  margin-bottom: 30px;
  text-align: center;
}

.logo-image {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 0 10px rgba(114, 124, 245, 0.2));
}

.nav-menu {
  list-style: none;
}

.nav-item {
  padding: 12px 15px;
  margin-bottom: 5px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  transition: all 0.2s;
  font-size: 0.9rem;
}

.nav-item:hover, .nav-item.active {
  background: rgba(114, 124, 245, 0.1);
  color: var(--accent-primary);
}

/* Main Content */
main {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 30px;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.page-title h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

.page-title p {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* Stats Widgets */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--bg-card);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.stat-header {
  display: flex;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-bottom: 15px;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.stat-trend {
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Analysis Cards */
.analysis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.analysis-card {
  background: var(--bg-card);
  border-radius: 15px;
  border: 1px solid var(--border-color);
  padding: 20px;
  transition: transform 0.3s;
}

.analysis-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-primary);
}

.card-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.stock-info {
  display: flex;
  gap: 12px;
}

.stock-icon {
  width: 45px;
  height: 45px;
  background: var(--bg-accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--accent-primary);
}

.stock-meta h3 {
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.stock-meta span {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  height: fit-content;
}

.badge-buy { background: rgba(10, 207, 151, 0.1); color: var(--accent-success); }
.badge-hold { background: rgba(255, 188, 0, 0.1); color: var(--accent-warning); }
.badge-target { background: rgba(114, 124, 245, 0.1); color: var(--accent-primary); }

/* Pricing Data */
.pricing-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  padding: 15px;
  background: var(--bg-accent);
  border-radius: 10px;
}

.price-item {
  text-align: center;
}

.price-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 5px;
}

.price-value {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
}

/* Progress Bar */
.progress-container {
  margin-top: 20px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  margin-bottom: 8px;
}

.progress-bar-bg {
  height: 8px;
  background: var(--bg-accent);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-success));
  width: 0%;
  transition: width 1s ease-in-out;
}

/* Admin Overlay */
#admin-overlay {
  display: none;
  position: fixed;
  top:0; left:0; right:0; bottom:0;
  background: rgba(0,0,0,0.8);
  z-index: 1000;
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
}

.admin-modal {
  background: var(--bg-sidebar);
  padding: 30px;
  border-radius: 20px;
  width: 90%;
  max-width: 600px;
  border: 1px solid var(--accent-primary);
}

.form-group {
  margin-bottom: 15px;
}

label {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 6px;
  color: var(--text-dim);
}

input, select, textarea {
  width: 100%;
  padding: 12px;
  background: var(--bg-accent);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: #fff;
  outline: none;
}

input:focus { border-color: var(--accent-primary); }

.btn-primary {
  background: var(--accent-primary);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
}

/* Mobile Responsive */
@media (max-width: 992px) {
  aside { width: 80px; padding: 15px 5px; }
  .logo-container { display: none; }
  .nav-item span { display: none; }
  main { margin-left: 80px; }
}

@media (max-width: 576px) {
  aside { display: none; }
  main { margin-left: 0; padding: 20px; }
}
