:root {
  --bg: #0b0d12;
  --card: #111528;
  --text: #e8ecff;
  --muted: #a8b0d6;
  --border: #222a4a;
  --accent: #6ea8ff;
  --danger: #ff6e6e;
  --success: #5ce1a6;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  /* ✅ This is the main fix */
  background-color: var(--bg);
  background-image: radial-gradient(1200px 600px at 20% 10%, #17204a 0%, var(--bg) 55%);
  background-repeat: no-repeat;
  background-size: cover;

  color: var(--text);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  background: rgba(11, 13, 18, 0.6);
  position: sticky;
  top: 0;
}

.topbar__brand { font-weight: 700; letter-spacing: 0.3px; }
.topbar__nav a { margin-left: 14px; }

.container { max-width: 980px; margin: 28px auto; padding: 0 16px; }

.card {
  background: rgba(17, 21, 40, 0.85);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
  margin-bottom: 18px;
}

h1 { margin: 0 0 8px; font-size: 28px; }
h2 { margin: 0 0 10px; font-size: 20px; }

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

.form { display: grid; gap: 12px; margin-top: 12px; }
.form__row{display:flex;gap:12px;flex-wrap:wrap;align-items:flex-end}
.form__row > *{flex:0 0 auto}
.form__row label{display:grid;gap:6px}
label { display: grid; gap: 6px; font-size: 14px; }

input, select {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(7, 9, 14, 0.6);
  color: var(--text);
  outline: none;
}
input:focus, select:focus { border-color: var(--accent); }

.btn {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(110, 168, 255, 0.55);
  background: rgba(110, 168, 255, 0.18);
  color: var(--text);
  cursor: pointer;
  font-weight: 650;
}
.btn:hover { background: rgba(110, 168, 255, 0.26); }

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

.label { font-size: 12px; color: var(--muted); }
.value { font-size: 16px; font-weight: 650; }

/* Inline label styles for checkboxes */
label.inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-top: -6px;
}

label.inline input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  margin: 0;
  padding: 0;
}

.callout {
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(7, 9, 14, 0.45);
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.hint {
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed var(--border);
  background: rgba(7, 9, 14, 0.35);
  font-size: 13px;
}

.flash-wrap { display: grid; gap: 10px; margin-bottom: 14px; }
.flash {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(7, 9, 14, 0.45);
}
.flash--error { border-color: rgba(255,110,110,0.55); }
.flash--success { border-color: rgba(92,225,166,0.55); }

.table-wrap { overflow: auto; border-radius: 14px; border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; min-width: 620px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; font-size: 14px; }
th { color: var(--muted); font-weight: 700; background: rgba(7, 9, 14, 0.35); }
tr:last-child td { border-bottom: none; }

.footer { text-align: center; color: var(--muted); padding: 18px; }

@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
}

/* Utility Tracker additions */
.grid{display:grid;gap:16px}
.grid.two{grid-template-columns:1fr}
@media(min-width:900px){.grid.two{grid-template-columns:1fr 1fr}}

.flex{display:flex;gap:12px;align-items:center}
.flex.between{justify-content:space-between}

.table{border:1px solid rgba(255,255,255,.08);border-radius:12px;overflow:hidden}
.table .row{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;padding:10px 12px;border-top:1px solid rgba(255,255,255,.06);align-items:center}
.table .row.head{background:rgba(255,255,255,.04);font-weight:600;border-top:none}
.table .row form{margin:0}

/* Bill breakdown form row overrides */
form.row{display:grid;grid-template-columns:140px 1fr 120px 140px 1fr 90px;gap:10px;padding:10px 12px;border-top:1px solid rgba(255,255,255,.06);align-items:center}
@media(max-width:900px){form.row{grid-template-columns:1fr;}}

.badge{display:inline-block;padding:4px 10px;border-radius:999px;background:rgba(255,255,255,.06);font-size:12px}

.note-list{display:grid;gap:10px;margin-top:10px}
.note{border:1px solid rgba(255,255,255,.08);border-radius:12px;padding:10px 12px;background:rgba(0,0,0,.12)}

.code{white-space:pre-wrap;word-break:break-word;background:rgba(0,0,0,.25);padding:10px;border-radius:10px;border:1px solid rgba(255,255,255,.08);overflow:auto}

.btn--small{padding:8px 10px;font-size:12px}
.btn--danger{border-color:rgba(255,110,110,0.65);background:rgba(255,110,110,0.18)}
.btn--danger:hover{background:rgba(255,110,110,0.26)}
.success{color:#66ffb3}
.muted{opacity:.75}
.link{color:inherit;text-decoration:underline}

/* Schedule */
.sched__toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin:10px 0 18px}
.sched__nav{display:flex;align-items:center;gap:10px}
.sched__month{min-width:160px;text-align:center}
.sched__jump{display:flex;gap:10px;align-items:end}

.sched__grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px;margin-top:16px}
.sched__dow{color:var(--muted);font-weight:700;font-size:12px;text-transform:uppercase;letter-spacing:.06em}
.sched__cell{min-height:120px;border:1px solid var(--border);border-radius:14px;background:rgba(7,9,14,0.35);padding:10px;display:flex;flex-direction:column;gap:8px}
.sched__cell--other{opacity:.45}
.sched__cell--today{border-color:rgba(110,168,255,0.75)}
.sched__date{font-weight:800;font-size:13px;color:var(--muted)}
.sched__date-link{color:inherit;text-decoration:none}
.sched__date-link:hover{text-decoration:underline}
.sched__summary{list-style:none;margin:0;padding:0;display:grid;gap:6px;font-size:12px}
.sched__summary li{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sched__list{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.sched__entry{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;border:1px solid rgba(255,255,255,.08);border-radius:12px;padding:8px 10px;background:rgba(0,0,0,.18)}
.sched__entry form{margin:0}

/* Schedule day view */
.sched__day-grid{display:grid;gap:14px}
.sched__day-card{border:1px solid var(--border);border-radius:16px;background:rgba(7,9,14,0.35);overflow:hidden}
.sched__day-card-head{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border-bottom:1px solid rgba(255,255,255,.08)}
.sched__place{font-weight:900;font-size:14px}
.sched__day-list{display:grid}
.sched__day-row{display:grid;grid-template-columns:1.4fr .9fr auto;gap:12px;align-items:center;padding:10px 14px;border-top:1px solid rgba(255,255,255,.06)}
.sched__day-row:first-child{border-top:0}
.sched__actions form{margin:0}
@media (max-width: 680px){
  .sched__day-row{grid-template-columns:1fr;align-items:start}
  .sched__actions{justify-self:start}
}

@media(max-width:760px){
  .sched__grid{gap:8px}
  .sched__cell{min-height:90px}
}
