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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f5f6fa;
  color: #2d3436;
  min-height: 100vh;
}

/* ── Layout ── */
.screen { min-height: 100vh; }
.hidden { display: none !important; }
.center { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; }

.card {
  background: #fff;
  border-radius: 12px;
  padding: 40px 48px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  width: 100%;
  max-width: 400px;
}

.card h1 { font-size: 1.8rem; color: #0984e3; margin-bottom: 4px; text-align: center; }
.card .subtitle { color: #636e72; text-align: center; margin-bottom: 24px; }

/* ── Forms ── */
input, select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #dfe6e9;
  border-radius: 8px;
  font-size: 0.95rem;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}
input:focus, select:focus { outline: none; border-color: #0984e3; }
label { display: block; font-size: 0.85rem; color: #636e72; margin-bottom: 4px; margin-top: 8px; }
label input, label select { margin-top: 4px; }

/* ── Buttons ── */
.btn-primary {
  background: #0984e3;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-primary:hover { background: #0773c5; }
.btn-secondary {
  background: #dfe6e9;
  color: #2d3436;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 0.95rem;
  cursor: pointer;
}
.btn-danger {
  background: #d63031;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.8rem;
  cursor: pointer;
}
button[type="submit"] { width: 100%; margin-top: 8px; }

/* ── Header ── */
header {
  background: #fff;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 10;
}
header h1 { font-size: 1.3rem; color: #0984e3; margin-right: auto; }
nav { display: flex; gap: 4px; }
.tab-btn {
  background: none;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #636e72;
  transition: background 0.15s;
}
.tab-btn.active { background: #e8f4fd; color: #0984e3; font-weight: 600; }
.tab-btn:hover:not(.active) { background: #f0f0f0; }

/* ── Tab content ── */
.tab-content { padding: 24px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.toolbar h2 { font-size: 1.2rem; }

/* ── Table ── */
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
th { background: #f0f7ff; padding: 12px 16px; text-align: left; font-size: 0.85rem; color: #636e72; font-weight: 600; }
td { padding: 12px 16px; border-top: 1px solid #f0f0f0; font-size: 0.9rem; }
tr:hover td { background: #fafbfc; }

.pnl-positive { color: #00b894; font-weight: 600; }
.pnl-negative { color: #d63031; font-weight: 600; }

/* ── Summary box ── */
.summary-box {
  background: #fff;
  border-radius: 10px;
  padding: 16px 24px;
  margin-bottom: 16px;
  display: flex;
  gap: 32px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.summary-item label { font-size: 0.8rem; color: #636e72; }
.summary-item .value { font-size: 1.2rem; font-weight: 700; }

/* ── Modal ── */
.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.modal-content h3 { margin-bottom: 16px; font-size: 1.1rem; }
.modal-buttons { display: flex; gap: 8px; margin-top: 16px; }
.modal-buttons button { flex: 1; }

/* ── Misc ── */
.error { color: #d63031; font-size: 0.85rem; margin-top: 8px; min-height: 20px; }
.loading { text-align: center; color: #636e72; padding: 24px; }
a { color: #0984e3; text-decoration: none; }
a:hover { text-decoration: underline; }
#member-list { list-style: none; }
#member-list li { background: #fff; border-radius: 8px; padding: 12px 16px; margin-bottom: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
