@import url('base.css');

.layout {
  display: flex;
  min-height: 100vh;
}

aside {
  width: 250px;
  background: #0f172a;
  color: white;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  max-height: 100vh;
  overflow-y: auto;
}

aside img {
  width: 120px;
  margin: 0 auto 2rem;
}

aside nav ul li {
  margin-bottom: 0.5rem;
}

aside nav ul li a {
  display: block;
  padding: 0.8rem 0.5rem;
  color: white;
  border-radius: 5px;
  transition: background 0.2s ease;
}

aside nav ul li a:hover,
aside nav ul li a.active {
  background: #1e293b;
  font-weight: bold;
}

main {
  flex-grow: 1;
  padding: 2rem;
  overflow-y: auto;
}

.ticker-wrap {
  margin: 1rem 0;
  background: var(--bg-card);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.ticker {
  display: flex;
  gap: 2rem;
  white-space: nowrap;
  animation: tickerMove 25s linear infinite;
}

.ticker.fno {
  animation-duration: 35s;
}

.ticker-item .positive { color: var(--positive); }
.ticker-item .negative { color: var(--negative); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

.toggle-dark-mode {
  position: fixed;
  top: 1rem;
  right: 1rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  z-index: 999;
}

@keyframes tickerMove {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

@media (max-width: 768px) {
  .layout { flex-direction: column; }
  aside { width: 100%; text-align: center; max-height: none; }
  aside nav ul { display: flex; flex-wrap: wrap; justify-content: center; }
  .grid { display: block; }
  .card { margin-bottom: 1rem; }
}
