/* Liquifusion blue for structure, money green for actions and amounts. */
:root {
  --blue: #114b8d;
  --blue-soft: #e8eff8;
  --green: #1f8a4c;
  --green-dark: #187040;
  --green-soft: #e7f4ec;
  --ink: #1d2433;
  --muted: #6b7280;
  --line: #e5e7eb;
  --paper: #fbfaf8;
  --sidebar: #f3f6fa;
  --amber-soft: #fff4dc;
  --red: #b42318;
  --bs-body-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-color: var(--ink);
  --bs-link-color: var(--blue);
  --bs-link-color-rgb: 17, 75, 141;
  --bs-link-hover-color: #0b3566;
}

html { font-size: 15px; }
body { background: #fff; color: var(--ink); }

.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 210px; flex-shrink: 0; background: var(--sidebar); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 18px; color: var(--blue); text-decoration: none; font-weight: 700; font-size: 1.25rem; letter-spacing: .2px; }
.sidebar nav { display: flex; flex-direction: column; gap: 1px; }
.nav-group { font-size: .75rem; color: var(--muted); padding: 14px 10px 4px; }
.sidebar nav a { display: flex; align-items: center; gap: 9px; padding: 6px 10px; border-radius: 7px; color: var(--ink); text-decoration: none; }
.sidebar nav a .dot { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid #9aa7b8; }
.sidebar nav a:hover { background: #e9eef5; }
.sidebar nav a.active { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.sidebar nav a.active .dot { background: var(--blue); border-color: var(--blue); }
.sidebar-foot { margin-top: auto; padding: 10px; border-top: 1px solid var(--line); font-size: .85rem; }
.sidebar-foot .who { display: block; color: var(--muted); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 2px; }

.content { flex: 1; padding: 26px 36px 60px; max-width: 1120px; }
.content-solo { margin: 0 auto; max-width: 460px; padding-top: 70px; }

h1, .h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 0; }
h2, .h2 { font-size: 1.15rem; font-weight: 650; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 14px; margin-bottom: 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.page-head .sub { color: var(--muted); font-size: .9rem; }

.btn { border-radius: 8px; font-weight: 500; }
.btn-primary, .btn-money { background: var(--green); border-color: var(--green); color: #fff; }
.btn-primary:hover, .btn-money:hover, .btn-primary:focus, .btn-money:focus { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.btn-outline { background: #fff; border: 1px solid #cfd5dd; color: var(--ink); }
.btn-outline:hover { background: #f4f6f9; border-color: #b9c1cc; }
.btn-blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-blue:hover { background: #0b3566; color: #fff; }
.btn-danger-link { color: var(--red); background: none; border: 0; padding: 0; }
.form-control, .form-select { border-radius: 8px; border-color: #cfd5dd; }
.form-control:focus, .form-select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(17, 75, 141, .12); }
.form-control::placeholder { color: #9aa3af; }
.form-label { font-weight: 600; font-size: .88rem; margin-bottom: 4px; }
.form-text { color: var(--muted); }

.flash { background: var(--green-soft); border: 1px solid #b9dfc7; color: #14532d; padding: 9px 14px; border-radius: 8px; margin-bottom: 18px; }
.flash-error { background: #fdecea; border-color: #f5c2bd; color: var(--red); }

/* Day navigation and week strip, after Harvest's timesheet. */
.daybar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.daynav { display: inline-flex; border: 1px solid #cfd5dd; border-radius: 8px; overflow: hidden; background: #fff; }
.daynav a, .daynav span { padding: 6px 12px; color: var(--ink); text-decoration: none; }
.daynav a:hover { background: #f4f6f9; }
.daynav span { border-left: 1px solid #cfd5dd; border-right: 1px solid #cfd5dd; font-weight: 600; min-width: 210px; text-align: center; }
.viewtoggle { margin-left: auto; display: inline-flex; border: 1px solid #cfd5dd; border-radius: 8px; overflow: hidden; }
.viewtoggle a { padding: 6px 16px; color: var(--ink); text-decoration: none; }
.viewtoggle a.on { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.week { display: grid; grid-template-columns: repeat(7, 1fr) 1.2fr; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.week a, .week div { padding: 6px 4px 10px; text-decoration: none; color: var(--ink); border-bottom: 3px solid transparent; }
.week a small, .week div small { display: block; color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.week a.on { border-bottom-color: var(--green); font-weight: 600; }
.week a.today { color: var(--green); }
.week .total { text-align: right; font-weight: 600; }

.card-soft { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.empty { background: var(--paper); border-radius: 12px; padding: 44px; text-align: center; color: var(--muted); }

.entries { list-style: none; padding: 0; margin: 0; }
.entries li { display: flex; gap: 16px; align-items: flex-start; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.entries .what { flex: 1; min-width: 0; }
.entries .proj { font-weight: 650; }
.entries .client { color: var(--muted); font-weight: 400; }
.entries .type { font-size: .9rem; }
.entries .desc { font-size: .9rem; color: #374151; }
.entries .notes { font-size: .85rem; color: var(--muted); font-style: italic; white-space: pre-line; }
.entries .qty { font-size: 1.2rem; font-weight: 650; font-variant-numeric: tabular-nums; min-width: 92px; text-align: right; }
.entries .qty small { display: block; font-size: .8rem; font-weight: 400; color: var(--muted); }
.entries .act { min-width: 60px; text-align: right; }
.day-total { display: flex; justify-content: flex-end; gap: 30px; padding: 14px 4px; font-weight: 650; }

.pill { display: inline-block; font-size: .75rem; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: #fff; font-weight: 500; vertical-align: middle; }
.pill-green { background: var(--green-soft); border-color: #b9dfc7; color: #14532d; }
.pill-blue { background: var(--blue-soft); border-color: #c3d4ea; color: var(--blue); }
.pill-amber { background: var(--amber-soft); border-color: #f2d59b; color: #7a4b00; }
.pill-red { background: #fdecea; border-color: #f5c2bd; color: var(--red); }

.table-clean { width: 100%; border-collapse: collapse; }
.table-clean th { font-size: .8rem; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--paper); text-align: left; }
.table-clean td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table-clean tr.group td { background: #f6f8fb; font-weight: 600; color: var(--blue); font-size: .88rem; padding: 7px 10px; }
.table-clean .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-clean tfoot td { font-weight: 700; border-bottom: 0; }
.money { color: var(--green-dark); font-weight: 600; }

.entry-form { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 22px; }
.entry-form .hours-input { font-size: 1.3rem; text-align: right; font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs a { padding: 7px 14px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
.tabs a.on { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }

.login-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 30px; box-shadow: 0 8px 30px rgba(17, 75, 141, .06); }
.login-brand { display: flex; align-items: center; gap: 10px; color: var(--blue); font-weight: 700; font-size: 1.4rem; margin-bottom: 22px; }

@media (max-width: 760px) {
  .app { flex-direction: column; }
  .sidebar { width: auto; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; }
  .nav-group, .sidebar-foot { display: none; }
  .brand { padding: 0 10px 0 4px; }
  .content { padding: 18px 14px 40px; }
  .week { grid-template-columns: repeat(7, 1fr); }
  .week .total { display: none; }
}
