body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #020617;
  color: #e5e7eb;
}
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.5rem;
}
header h1 {
  font-size: 1.4rem;
}
nav a {
  margin-left: 1rem;
  color: #9ca3af;
  text-decoration: none;
}
nav a:hover {
  color: #fff;
}
.card {
  background: #020617;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
}
.card h2 {
  margin-top: 0;
  font-size: 1.1rem;
}
.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
}
label {
  font-size: 0.9rem;
  color: #9ca3af;
  display: flex;
  flex-direction: column;
}
input, select {
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  border: 1px solid #1f2937;
  background: #020617;
  color: #e5e7eb;
}
button {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: none;
  background: #2563eb;
  color: white;
  cursor: pointer;
  font-size: 0.9rem;
}
button:hover {
  background: #1d4ed8;
}
.alert {
  margin-bottom: 1rem;
  background: #0f172a;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  border: 1px solid #1f2937;
  font-size: 0.9rem;
}
.table-wrap {
  width: 100%;
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 700px;
}
th, td {
  padding: 0.45rem 0.4rem;
  border-bottom: 1px solid #111827;
}
th {
  text-align: left;
  color: #9ca3af;
}
tr.green td {
  background: rgba(22, 163, 74, 0.12);
}
tr.red td {
  background: rgba(220, 38, 38, 0.12);
}
.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.inline-form input {
  max-width: 90px;
}

/* Live badges */
.badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.75rem;
  border: 1px solid #1f2937;
}
.live-green {
  background: rgba(22, 163, 74, 0.2);
  color: #bbf7d0;
}
.live-red {
  background: rgba(220, 38, 38, 0.2);
  color: #fecaca;
}
.live-strong {
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.8);
}
.small-text {
  font-size: 0.8rem;
  color: #9ca3af;
}

/* Calendar */
.calendar {
  margin-top: 1rem;
}
.cal-head, .cal-body {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-head span {
  text-align: center;
  font-size: 0.8rem;
  color: #9ca3af;
}
.day {
  min-height: 60px;
  border-radius: 10px;
  border: 1px solid #111827;
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.day-num {
  font-size: 0.8rem;
  color: #9ca3af;
}
.day-pnl {
  font-size: 0.85rem;
}
.day-green {
  background: rgba(22, 163, 74, 0.15);
}
.day-red {
  background: rgba(220, 38, 38, 0.15);
}
.empty {
  min-height: 60px;
}

@media (max-width: 700px) {
  .wrap {
    padding: 1rem 0.5rem 2rem;
  }
  header {
    flex-direction: column;
    gap: 0.5rem;
  }
  nav a {
    margin-left: 0.5rem;
  }
  .form-row {
    flex-direction: column;
    align-items: stretch;
  }
  table {
    font-size: 0.78rem;
    min-width: 600px;
  }
}
