/* Base typography, visibility and shared accessible controls. */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font: 16px/1.6 var(--font);
  color: var(--ink);
  background: var(--paper);
}
[hidden] {
  display: none !important;
}
a {
  color: inherit;
}
button,
input {
  font: inherit;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #7771dc;
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-weight: 500;
  line-height: 1.2;
}
button {
  border: 0;
}
.logo {
  text-decoration: none;
  font-size: 42px;
  letter-spacing: -3px;
  font-weight: 750;
  line-height: 1;
}
.logo span {
  letter-spacing: 0;
  margin-left: 5px;
  font-size: 32px;
}
.byline {
  display: block;
  font-size: 12px;
  text-decoration: none;
  margin-top: 9px;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 1.7px;
  font-weight: 700;
}
.test-badge {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 1px;
  border: 1px solid currentColor;
  border-radius: 5px;
  padding: 5px 9px;
}
.skip {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: 20;
  background: white;
  padding: 12px;
}
.skip:focus {
  top: 12px;
}
#boot {
  padding: 40px;
} /* Two-column authentication layout: brand story and account form. */
#auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-story {
  background: var(--ink);
  color: white;
  padding: 48px 64px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 100vh;
}
.auth-story > div {
  margin: auto 0;
  padding: 50px 0;
}
.auth-story h1 {
  font-size: clamp(44px, 5vw, 76px);
  letter-spacing: -3px;
  line-height: 1.06;
  margin: 20px 0;
}
.auth-story h1 span {
  color: var(--accent);
}
.auth-story > div > p:last-child {
  max-width: 350px;
  color: #d1d1e3;
  font-size: 18px;
}
.auth-panel {
  display: grid;
  place-items: center;
  padding: 48px;
}
.auth-card {
  width: 100%;
  max-width: 390px;
}
.auth-card h2 {
  font-size: 37px;
  letter-spacing: -1.3px;
  margin: 15px 0;
}
.auth-card > p {
  color: var(--muted);
}
form {
  margin-top: 26px;
}
label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin: 16px 0 7px;
}
input {
  width: 100%;
  min-width: 0;
  border: 1px solid #c9c9d7;
  border-radius: 9px;
  background: white;
  padding: 12px;
  color: var(--ink);
}
.primary,
.secondary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 12px 20px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  min-height: 46px;
}
.primary {
  background: var(--ink);
  color: white;
}
.primary:hover {
  background: #383a79;
}
.secondary {
  background: white;
  color: var(--ink);
  border: 1px solid #cecedb;
}
.auth-card .primary {
  width: 100%;
  margin-top: 24px;
}
.text-button {
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 8px 0;
  display: block;
}
.auth-note {
  font-size: 13px;
  margin-top: 24px;
}
.back-link {
  font-size: 14px;
  display: inline-block;
  margin-top: 24px;
}
.message {
  font-size: 14px;
  margin: 16px 0;
  white-space: pre-line;
}
.message:empty {
  display: none;
}
.message.error {
  color: #9f293f;
  background: #fff0f2;
  border: 1px solid #ebc3ca;
  border-radius: 8px;
  padding: 12px;
}
.message.success {
  color: #285a3a;
  background: #edf6ef;
  padding: 12px;
  border-radius: 8px;
}
#password-hint {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
} /* Signed-in shell: persistent navigation and responsive main workspace. */
#app-screen {
  display: grid;
  grid-template-columns: 225px 1fr;
  min-height: 100vh;
}
.sidebar {
  padding: 38px 26px;
  background: #efeff6;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar nav {
  display: grid;
  gap: 8px;
  margin-top: 54px;
}
.sidebar nav button {
  background: transparent;
  text-align: left;
  border-radius: 10px;
  padding: 12px 15px;
  color: var(--ink);
  display: flex;
  gap: 13px;
  font-size: 19px;
  align-items: center;
}
.sidebar nav button span {
  font-size: 15px;
}
.sidebar nav button[aria-current] {
  background: var(--ink);
  color: white;
}
.sidebar-bottom {
  margin-top: auto;
  font-size: 13px;
}
.sidebar-bottom p {
  margin: 14px 0;
  color: var(--muted);
}
#workspace {
  padding: 30px 46px;
  min-width: 0;
  max-width: 1400px;
  width: 100%;
  margin: auto;
}
.workspace-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 23px;
}
.workspace-header span {
  overflow-wrap: anywhere;
}
.page-heading {
  margin: 34px 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.page-heading h1 {
  font-size: 43px;
  letter-spacing: -1.7px;
  margin-top: 8px;
} /* Daily summary, next shift and saved-record statistics. */
.focus-card {
  border-radius: 19px;
  background: var(--ink);
  color: white;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 30px;
  padding: 35px;
}
.focus-card h2 {
  font-size: 31px;
  letter-spacing: -0.8px;
  margin: 18px 0 13px;
}
.focus-card p {
  color: #d8d8e8;
  max-width: 480px;
}
.focus-card .primary {
  background: var(--accent);
  color: var(--ink);
  margin-top: 24px;
}
.phase-badge {
  font-size: 12px;
  padding: 5px 11px;
  border: 1px solid #71719a;
  border-radius: 18px;
}
.next-shift {
  border-left: 1px solid #595a83;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 30px;
}
.next-shift strong {
  font-size: 23px;
  font-weight: 500;
  line-height: 1.35;
  margin: 12px 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 24px 0;
}
.stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 23px;
}
.stat h3 {
  font-size: 14px;
  color: var(--muted);
}
.stat strong {
  display: block;
  font-size: 30px;
  font-weight: 500;
  margin: 8px 0;
}
.stat p {
  font-size: 13px;
  color: var(--muted);
}
.section-title {
  font-size: 23px;
  letter-spacing: -0.5px;
  margin: 29px 0 15px;
}
.quick-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
} /* Reusable form and history panels for shifts, sleep and energy. */
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 27px;
  min-width: 0;
}
.panel h2 {
  font-size: 24px;
  letter-spacing: -0.5px;
}
.panel > p {
  color: var(--muted);
  margin-top: 10px;
  font-size: 14px;
}
.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: start;
}
.entry-form .primary {
  margin-top: 23px;
}
.form-help {
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
}
.history {
  list-style: none;
  padding: 0;
  margin: 15px 0 0;
}
.history li {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  border-top: 1px solid var(--line);
  padding: 18px 0;
  align-items: center;
}
.history strong {
  font-size: 15px;
  font-weight: 600;
  display: block;
}
.history small {
  font-size: 13px;
  color: var(--muted);
  display: block;
}
.remove {
  background: transparent;
  padding: 8px;
  color: #855265;
  font-size: 13px;
  text-decoration: underline;
}
.empty {
  padding: 24px 0;
  color: var(--muted);
  font-size: 15px;
} /* Accessible radio choices are styled as numbered energy buttons. */
.score-options {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 20px 0;
}
.score-choice {
  position: relative;
  margin: 0;
  text-align: center;
  cursor: pointer;
}
.score-choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
}
.score-choice span {
  display: grid;
  place-items: center;
  border: 1px solid #cacada;
  border-radius: 12px;
  padding: 16px 8px;
  font-size: 21px;
}
.score-choice input:checked + span {
  background: var(--accent);
  border-color: var(--ink);
}
.score-choice input:focus-visible + span {
  outline: 3px solid #7771dc;
  outline-offset: 3px;
}
.score-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}
.workspace-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 35px;
} /* Native entry-removal confirmation and its dimmed backdrop. */
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  max-width: 440px;
  width: calc(100% - 40px);
  padding: 28px;
  color: var(--ink);
}
dialog::backdrop {
  background: #15153388;
}
dialog p {
  margin: 15px 0;
}
.dialog-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}
/* Tablet: reduce navigation width and stack the main forms. */
@media (max-width: 1000px) {
  #app-screen {
    grid-template-columns: 185px 1fr;
  }
  .sidebar {
    padding: 30px 18px;
  }
  #workspace {
    padding: 25px;
  }
  .focus-card {
    grid-template-columns: 1fr;
  }
  .next-shift {
    border-left: 0;
    border-top: 1px solid #595a83;
    padding: 20px 0 0;
  }
  .form-layout {
    grid-template-columns: 1fr;
  }
  .auth-story {
    padding: 40px;
  }
  .auth-panel {
    padding: 35px;
  }
  .stats {
    gap: 12px;
  }
  .stat {
    padding: 18px;
  }
}
/* Mobile: navigation becomes a horizontal row above the workspace. */
@media (max-width: 650px) {
  #auth-screen {
    grid-template-columns: 1fr;
  }
  .auth-story {
    min-height: auto;
    padding: 28px;
  }
  .auth-story > div {
    padding: 28px 0;
  }
  .auth-story h1 {
    font-size: 43px;
  }
  .auth-story > div > p:last-child {
    font-size: 16px;
  }
  .auth-story .test-badge {
    display: none;
  }
  .auth-panel {
    padding: 35px 25px;
  }
  #app-screen {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 20px;
  }
  .sidebar .byline {
    display: inline-block;
    margin-left: 14px;
  }
  .sidebar nav {
    display: flex;
    margin-top: 23px;
    gap: 5px;
    overflow: auto;
  }
  .sidebar nav button {
    padding: 10px;
    white-space: nowrap;
  }
  .sidebar nav button span {
    font-size: 13px;
  }
  .sidebar-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
  }
  .sidebar-bottom p {
    display: none;
  }
  .sidebar-bottom .test-badge {
    font-size: 10px;
  }
  #workspace {
    padding: 22px 20px;
  }
  .workspace-header {
    font-size: 12px;
  }
  .page-heading {
    margin: 25px 0;
  }
  .page-heading h1 {
    font-size: 36px;
  }
  .focus-card {
    padding: 25px;
    gap: 22px;
  }
  .focus-card h2 {
    font-size: 28px;
  }
  .stats {
    grid-template-columns: 1fr;
  }
  .stat {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px;
  }
  .stat strong {
    grid-row: 1/3;
    grid-column: 2;
    margin: 0;
  }
  .panel {
    padding: 22px;
  }
  .page-heading .secondary {
    padding: 10px 15px;
  }
  .quick-actions .secondary {
    flex: 1;
    white-space: nowrap;
  }
  .score-options {
    gap: 6px;
  }
  .history li {
    gap: 8px;
  }
  .auth-card h2 {
    font-size: 33px;
  }
}

/* Account names can be long or multilingual; keep greetings within the viewport. */
.page-heading > div {
  min-width: 0;
}
.page-heading h1 {
  overflow-wrap: anywhere;
}
.account-panel {
  max-width: 640px;
}
.account-panel input[readonly] {
  background: #f3f3f7;
  color: var(--muted);
}
/* Energy summaries keep the existing calm panel layout and readable timelines. */
.encouragement {
  margin: 24px 0;
  color: var(--ink);
  font-size: 1.1rem;
}
.trend-panel {
  margin-top: 24px;
}
.trend-panel h3 {
  margin-top: 28px;
}
.trend-panel li {
  line-height: 1.6;
}
.entry-form select {
  width: 100%;
  padding: 12px;
  border: 1px solid #d8ded8;
  border-radius: 10px;
  background: white;
  color: inherit;
  font: inherit;
}
.entry-form textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  color: var(--ink);
  background: white;
}
/* Calendar stays readable on phones: month cells become a dated agenda. */
.planner-layout { display: grid; gap: 24px; }
.planner-panel, .planner-editor { padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: white; }
.planner-toolbar, .planner-modes, .planner-navigation { display:flex; gap:8px; flex-wrap:wrap; }
.planner-toolbar { justify-content:space-between; align-items:center; }
.planner-modes [aria-pressed="true"] { background:var(--ink); color:var(--paper); }
.planner-grid { display:grid; gap:8px; }
.planner-week { grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); }
.planner-month { grid-template-columns:repeat(7,minmax(0,1fr)); }
.planner-day { min-width:0; padding:12px; border:1px solid var(--line); border-radius:12px; }
.planner-day.is-today { border:2px solid var(--ink); background:#f5f6e9; }
.planner-day h3 { margin:0 0 12px; font-size:.9rem; }
.planner-day h3 button { text-align:left; }
.planner-tasks { padding:0; margin:0; list-style:none; }
.planner-tasks li { padding:10px 0; border-top:1px solid var(--line); overflow-wrap:anywhere; }
.task-line { display:flex; gap:8px; align-items:flex-start; cursor:pointer; }
.task-line strong { font-size:.9rem; font-weight:600; display:block; }
.task-line small { display:block; margin-top:4px; }
.task-line input, .planner-check input { width:18px; height:18px; flex-shrink:0; accent-color:var(--ink); }
.is-complete .task-line strong { text-decoration:line-through; opacity:.6; }
.task-actions { display:flex; flex-wrap:wrap; gap:14px; margin-top:8px; }
.task-actions .text-button { font-size:.8rem; }
.planner-empty { font-size:.85rem; color:#6a6a78; }
.planner-editor { max-width:650px; }
.planner-check { display:flex; align-items:center; gap:10px; margin:18px 0; }
.planner-reminder-settings { border-top:1px solid var(--line); margin-top:18px; }
.task-reminder { position:fixed; bottom:20px; right:20px; width:min(380px,calc(100vw - 40px)); padding:24px; background:#e6ee93; border:2px solid var(--ink); border-radius:20px; box-shadow:0 12px 40px #22235b30; z-index:50; overflow-wrap:anywhere; max-height:80vh; overflow:auto; }
.task-reminder[hidden] { display:none; }
.task-reminder h2 { font-size:1.3rem; }
@media(max-width:1000px) { .planner-month { grid-template-columns:repeat(2,minmax(0,1fr)); } .planner-month .planner-day { grid-column-start:auto !important; } }
@media(max-width:560px) { .planner-month, .planner-week { grid-template-columns:1fr; } .planner-panel, .planner-editor { padding:16px; } }
