:root {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #172c3b;
  background: #f3f6f8;
  font-size: 16px;
  --accent: #006e68;
  --border: #e1e8ed;
  --muted: #657785;
}
.launch-link {
  display: block;
  text-align: center;
  text-decoration: none;
  margin-top: 24px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  border: 0;
  background: none;
  color: inherit;
  border-radius: 8px;
}
input,
select,
textarea {
  border: 1px solid #cdd8df;
  background: white;
  padding: 11px 12px;
  border-radius: 7px;
  min-width: 0;
  color: inherit;
}
label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 32px;
  letter-spacing: -1px;
  margin-bottom: 10px;
}
h2 {
  font-size: 19px;
  margin: 0;
}
h3 {
  font-size: 16px;
  margin: 0;
}
.muted {
  color: var(--muted);
  line-height: 1.5;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 1.7px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 14px;
}
.primary {
  background: var(--accent);
  color: white;
  padding: 13px 20px;
  font-weight: 600;
  box-shadow: 0 3px 7px #006e6814;
}
.primary:hover {
  background: #005953;
}
.secondary {
  border: 1px solid var(--border);
  padding: 10px 14px;
  background: white;
  font-size: 14px;
}
.quiet {
  padding: 8px;
  color: var(--muted);
  font-size: 14px;
}
.quiet:hover {
  color: var(--accent);
  background: #e9f3f0;
}
.danger {
  color: #ac3434;
  padding: 10px;
}
.light {
  font-weight: 400;
}
aside {
  position: fixed;
  width: 256px;
  inset: 0 auto 0 0;
  background: white;
  border-right: 1px solid var(--border);
  padding: 36px 20px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 20px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 800;
  margin-bottom: 60px;
  letter-spacing: -0.7px;
}
.brand span {
  color: #183641;
  font-size: 17px;
}
aside > .eyebrow {
  font-size: 11px;
  padding-left: 12px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 14px;
  margin: 5px 0;
  font-size: 17px;
  color: #647582;
}
.nav span {
  font-size: 14px;
  font-weight: 600;
}
.nav b {
  margin-left: auto;
  font-size: 12px;
}
.nav.active {
  background: #e7f3ef;
  color: #00665e;
}
.aside-bottom {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 22px 10px 0;
  display: grid;
  gap: 13px;
  font-size: 14px;
}
#connection {
  color: var(--muted);
  font-size: 12px;
}
.online {
  color: #08735f !important;
}
main {
  margin-left: 256px;
  padding: 42px 42px 18px;
  max-width: 1900px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}
header .muted {
  margin: 0;
  font-size: 14px;
}
header .eyebrow {
  font-size: 12px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}
.stats button {
  text-align: left;
  background: white;
  border: 1px solid var(--border);
  padding: 22px;
  display: grid;
  gap: 12px;
  border-radius: 12px;
}
.stats span {
  font-size: 14px;
  color: #4c626f;
}
.stats strong {
  font-size: 36px;
  font-weight: 650;
  letter-spacing: -1px;
}
.stats small {
  font-size: 12px;
  color: var(--muted);
}
.stats .danger-stat {
  background: #fff9f7;
  border-color: #f0dcd6;
}
.danger-stat strong {
  color: #b84c34;
}
.panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: white;
  overflow: hidden;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px;
}
.panel-heading h2 span {
  font-size: 13px;
  color: var(--muted);
  margin-left: 8px;
  font-weight: 400;
}
.filters {
  display: flex;
  gap: 10px;
  padding: 0 22px 20px;
  flex-wrap: wrap;
}
.filters input[type="search"] {
  flex: 1;
  min-width: 210px;
}
.filters input,
.filters select {
  font-size: 14px;
}
.date-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 400;
}
.date-filter input {
  width: 144px;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}
th {
  background: #f8fafb;
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
  padding: 13px 16px;
  border-block: 1px solid var(--border);
}
td {
  padding: 20px 16px;
  border-bottom: 1px solid #edf1f4;
  font-size: 14px;
}
tbody tr:last-child td {
  border: 0;
}
tbody tr:hover {
  background: #fafcfc;
}
td:first-child {
  width: 45px;
  padding-right: 0;
}
td:nth-child(2) {
  min-width: 200px;
  white-space: normal;
}
.task-title {
  font-weight: 600;
  text-align: left;
  padding: 0;
  line-height: 1.5;
}
.task-desc {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.check {
  border: 1px solid #bacad2;
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 6px;
  color: var(--accent);
}
.check.done {
  background: #e6f4ed;
  border-color: #b9dbce;
}
.badge {
  padding: 6px 9px;
  border-radius: 5px;
  font-size: 12px;
  display: inline-block;
}
.todo {
  background: #f0f3f6;
  color: #586a79;
}
.doing {
  background: #edf3ff;
  color: #3564aa;
}
.done {
  background: #e8f5ee;
  color: #267857;
}
.high {
  color: #ae4731;
}
.low {
  color: #6a7d89;
}
.normal {
  color: #566975;
}
.overdue {
  color: #b44031;
}
.category {
  color: #667987;
  font-size: 12px;
}
.empty {
  text-align: center;
  padding: 58px 20px;
  color: var(--muted);
}
.empty > div {
  font-size: 34px;
  color: var(--accent);
  margin-bottom: 14px;
}
.empty h2 {
  margin-bottom: 10px;
  color: #263d48;
}
.notification-panel {
  margin-top: 24px;
}
.notification-panel > .panel-heading {
  padding: 12px 0 18px;
}
.notice {
  background: white;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.notice strong {
  flex: 1;
  font-size: 14px;
}
.notice button {
  font-size: 13px;
}
.notification-panel .muted {
  font-size: 14px;
}
footer {
  color: var(--muted);
  font-size: 12px;
  margin-top: 35px;
  display: flex;
  justify-content: space-between;
}
dialog {
  border: 0;
  border-radius: 15px;
  padding: 28px;
  width: 620px;
  max-width: calc(100vw - 28px);
  max-height: 90vh;
  box-shadow: 0 30px 100px #15334244;
}
dialog::backdrop {
  background: #142b3e66;
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.dialog-heading .eyebrow {
  margin-bottom: 6px;
}
#task-form > label {
  margin-bottom: 18px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
#task-form .panel-heading {
  padding: 24px 0 14px;
}
.reminder-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.reminder-row input {
  flex: 1;
  width: 210px;
}
.reminder-row select {
  width: 150px;
  font-size: 14px;
}
.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 22px;
}
.dialog-footer .danger {
  margin-right: auto;
}
#form-error,
#login-error {
  color: #a42d2d;
  font-size: 14px;
  margin-top: 12px;
}
#toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  padding: 16px 22px;
  background: #183b43;
  color: white;
  border-radius: 10px;
  max-width: 450px;
  box-shadow: 0 5px 25px #0002;
  z-index: 20;
}
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 20% 10%, #d9ebe6, transparent 65%);
}
.login-card {
  background: white;
  width: 460px;
  max-width: calc(100vw - 32px);
  padding: 42px;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 15px 70px #2450460c;
}
.login-card h1 {
  font-size: 36px;
  line-height: 1.15;
}
.login-card label {
  margin-top: 18px;
}
.login-card .primary {
  width: 100%;
  margin-top: 24px;
}
.brand-mark {
  background: var(--accent);
  color: white;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 24px;
  margin-bottom: 24px;
}
.user-row {
  padding: 18px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 20px;
  align-items: center;
}
.user-row span {
  flex: 1;
}
.current-user {
  color: var(--muted);
  font-size: 13px;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1550px) {
  main {
    padding-inline: 60px;
  }
}
@media (max-width: 1150px) {
  aside {
    width: 210px;
    padding-inline: 12px;
  }
  .brand span {
    font-size: 14px;
  }
  main {
    margin-left: 210px;
    padding: 30px 22px;
  }
  .stats {
    gap: 10px;
  }
  .stats button {
    padding: 17px;
  }
  .stats span {
    font-size: 13px;
  }
}
@media (max-width: 760px) {
  aside {
    position: static;
    width: auto;
    padding: 16px;
  }
  .brand {
    margin-bottom: 16px;
  }
  .brand span {
    font-size: 18px;
  }
  aside > .eyebrow {
    display: none;
  }
  nav {
    display: flex;
    overflow: auto;
  }
  .nav {
    width: auto;
    white-space: nowrap;
    padding: 10px;
  }
  .nav span {
    font-size: 13px;
  }
  .aside-bottom {
    margin-top: 12px;
    padding: 12px 0 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
  }
  .aside-bottom .quiet {
    margin-left: auto;
  }
  main {
    margin: 0;
    padding: 25px 16px;
  }
  header {
    align-items: flex-start;
    flex-direction: column;
  }
  header h1 {
    font-size: 28px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .stats strong {
    font-size: 30px;
  }
  .filters {
    padding: 0 14px 16px;
  }
  .filters > * {
    flex: 1;
  }
  .panel-heading {
    padding: 16px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .notice {
    flex-wrap: wrap;
  }
  .notice strong {
    flex-basis: 100%;
  }
  footer span {
    display: none;
  }
  .notification-panel > .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  #toast {
    right: 16px;
    left: 16px;
    bottom: 16px;
  }
  .login-card {
    padding: 28px;
  }
  .login-card h1 {
    font-size: 32px;
  }
}
@media (max-width: 760px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats button {
    min-width: 0;
  }
  .filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filters input[type="search"] {
    grid-column: 1/-1;
    min-width: 0;
    width: 100%;
  }
  .filters select {
    width: 100%;
  }
  .date-filter {
    display: grid;
    gap: 6px;
  }
  .date-filter input {
    width: 100%;
  }
  .panel-heading h2 {
    min-width: 0;
  }
  .panel-heading .secondary {
    flex-shrink: 0;
  }
}
/* Assistant: dictation + LLM drafting inside the task editor */
.assistant {
  background: #eef6f5;
  border: 1px solid #d3e6e3;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 22px;
  display: grid;
  gap: 12px;
}
.assistant-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.assistant-head .eyebrow {
  margin-bottom: 4px;
}
.assistant textarea {
  width: 100%;
  resize: vertical;
}
.assistant-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.assistant-actions select {
  flex: 1;
  min-width: 200px;
}
#record.recording {
  background: #fdecec;
  border-color: #f5b5b5;
  color: #b91c1c;
  animation: pulse 1s infinite;
}
@keyframes pulse {
  50% {
    box-shadow: 0 0 0 6px #b91c1c22;
  }
}
#assistant-status:empty {
  display: none;
}
.questions {
  margin: 0;
  padding: 10px 14px 10px 30px;
  background: #fff8e6;
  border-radius: 10px;
  color: #7a5a00;
  font-size: 14px;
  line-height: 1.5;
}
