:root {
  --bg: #0a0d12;
  --panel: #121722;
  --panel-soft: #161c29;
  --panel-strong: #1a2231;
  --ink: #f2f5fa;
  --muted: #8f9db2;
  --accent: #7cf3c1;
  --accent-2: #7aa2ff;
  --neg: #ff7b7b;
  --pos: #69f0ae;
  --shadow: rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 10%, #1b2032 0%, transparent 55%),
    radial-gradient(circle at 90% 10%, #1a2438 0%, transparent 50%),
    var(--bg);
  color: var(--ink);
  font-family: "Space Grotesk", system-ui, sans-serif;
}

.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 24px 48px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding: 24px;
  border-radius: 22px;
  background: linear-gradient(140deg, #151b29, #101522);
  box-shadow: 0 18px 45px var(--shadow);
}

.banner {
  display: none;
  margin: 16px 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(122, 162, 255, 0.12);
  border: 1px solid rgba(122, 162, 255, 0.3);
  color: #c9d6ff;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin: 0 0 12px;
}

h1 {
  font-family: "Unbounded", sans-serif;
  font-size: 34px;
  margin: 0 0 8px;
}

.sub {
  margin: 0;
  color: var(--muted);
}

.total {
  font-family: "Unbounded", sans-serif;
  font-size: 28px;
  padding: 14px 22px;
  border-radius: 16px;
  background: #0e131d;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.auth {
  margin-top: 24px;
}

.auth-card {
  background: var(--panel-strong);
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 16px 32px var(--shadow);
}

.auth-row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.auth input {
  flex: 1;
  background: #0e131d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--ink);
  font-size: 16px;
}

.controls {
  margin: 26px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.top-tabs {
  margin-top: 18px;
  padding: 14px;
  background: var(--panel-strong);
  border-radius: 18px;
  box-shadow: 0 18px 36px var(--shadow);
}

.tab-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tab {
  background: var(--panel-soft);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}

.tab.active {
  background: var(--accent-2);
  color: #0a0d12;
  border-color: transparent;
}

.tab-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.file-btn {
  background: var(--panel-soft);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}

.file-btn input {
  display: none;
}

.nav {
  background: var(--panel-soft);
  border: none;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 18px;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 10px 20px var(--shadow);
}

.month {
  font-size: 22px;
  font-weight: 700;
}

.user {
  display: flex;
  gap: 10px;
  align-items: center;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 14px;
}

.day {
  background: var(--panel);
  border-radius: 18px;
  padding: 14px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, border 0.2s ease, box-shadow 0.2s ease;
}

.day:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 243, 193, 0.4);
  box-shadow: 0 12px 24px var(--shadow);
}

.day.muted {
  opacity: 0.35;
  cursor: default;
}

.day.today {
  border-color: rgba(122, 162, 255, 0.7);
  box-shadow: 0 0 0 1px rgba(122, 162, 255, 0.3);
}

.day.selected {
  border-color: rgba(124, 243, 193, 0.9);
  box-shadow: 0 0 0 1px rgba(124, 243, 193, 0.5);
}

.day.heat-1 { background: #152032; }
.day.heat-2 { background: #16283a; }
.day.heat-3 { background: #173146; }
.day.heat-4 { background: #1a3a57; }
.day.heat-5 { background: #1d4468; }

.day header {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.value {
  font-size: 22px;
  font-weight: 600;
}

.value.pos { color: var(--pos); }
.value.neg { color: var(--neg); }
.value.zero { color: var(--muted); }

.footer {
  margin-top: 24px;
  color: var(--muted);
  text-align: center;
}

.about {
  max-width: 720px;
  margin: 0 auto;
  background: var(--panel-strong);
  border-radius: 16px;
  padding: 18px 20px;
  text-align: left;
  box-shadow: 0 16px 32px var(--shadow);
}

.about h4 {
  margin: 0 0 8px;
  font-family: "Unbounded", sans-serif;
  font-size: 16px;
}

.about p {
  margin: 0 0 8px;
  line-height: 1.6;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(7, 10, 14, 0.7);
  display: none;
  place-items: center;
  padding: 24px;
}

.modal.show { display: grid; }

.sheet {
  width: min(420px, 90vw);
  background: var(--panel-strong);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 24px 55px var(--shadow);
}

.sheet h2 {
  margin: 0 0 6px;
  font-family: "Unbounded", sans-serif;
}

.sheet label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

.sheet input,
.sheet textarea {
  background: #0e131d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--ink);
  font-size: 16px;
  font-family: inherit;
}

.sheet textarea {
  resize: vertical;
}

.tagline {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.note {
  font-size: 12px;
  color: #c1ccdd;
  line-height: 1.4;
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.primary {
  background: var(--accent);
  color: #081017;
  border: none;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
}

.muted { color: var(--muted); }

.app-panel { display: none; }
.insights { display: none; }
.help { display: none; }
.about { display: none; }

.chart-card {
  background: var(--panel-strong);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 20px 40px var(--shadow);
}

.chart-card h3 {
  margin: 0 0 12px;
  font-family: "Unbounded", sans-serif;
}

.info-card {
  background: var(--panel-strong);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 20px 40px var(--shadow);
  line-height: 1.6;
}

.info-card h3 {
  margin: 0 0 12px;
  font-family: "Unbounded", sans-serif;
}

.info-card ul {
  padding-left: 18px;
  margin: 0;
}

.shortcut-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.shortcut {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 10px 12px;
}

.key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(122, 162, 255, 0.2);
  color: #c9d6ff;
  font-weight: 700;
}

.bulk {
  display: none;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  background: var(--panel-strong);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 16px 32px var(--shadow);
  flex-wrap: wrap;
}

.bulk-left {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.bulk-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.bulk-field input {
  background: #0e131d;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--ink);
}

.bulk-field.inline {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.bulk-actions {
  display: flex;
  gap: 10px;
}

@media (max-width: 900px) {
  .calendar { grid-template-columns: repeat(2, 1fr); }
  .hero { flex-direction: column; align-items: flex-start; }
  .controls { flex-direction: column; align-items: flex-start; }
  .tab-actions { margin-left: 0; }
  .bulk { align-items: flex-start; }
}
