/* Trackti · Time Tracker — brand layer, independent of task colours. */
:root {
  --bg: #f1f4f7;
  --paper: #ffffff;
  --ink: #17324d;
  --muted: #627589;
  --green: #276aa5;
  --border: #d8e1ea;
  --button-ink: #ffffff;
  --brand-navy: #17324d;
  --brand-blue: #276aa5;
  color-scheme: light;
}
:root[data-theme='light'] {
  --bg: #f1f4f7;
  --paper: #ffffff;
  --ink: #17324d;
  --muted: #627589;
  --green: #276aa5;
  --border: #d8e1ea;
  --button-ink: #ffffff;
  color-scheme: light;
}
:root[data-theme='dark'] {
  --bg: #0e2032;
  --paper: #17324d;
  --ink: #f1f4f7;
  --muted: #a8bacb;
  --green: #79b7ea;
  --border: #304d67;
  --button-ink: #ffffff;
  color-scheme: dark;
}
body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  letter-spacing: 0.01em;
}
h1,
h2,
h3 {
  font-weight: 650;
  letter-spacing: -0.025em;
}
h1 {
  font-size: 25px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  letter-spacing: -0.7px;
}
.brand img {
  width: 35px;
  height: 35px;
  flex: none;
}
.brand b {
  font-size: 27px;
  font-weight: 750;
}
.brand span {
  display: block;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  margin-top: 3px;
}
aside {
  background: #17324d;
  border-right-color: #233f5a;
}
aside .brand b {
  color: #f1f4f7;
}
.sidebar-note {
  color: #b4c8da;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-size: 10px;
  margin-top: 8px;
}
aside .nav {
  color: #cad9e6;
  border-radius: 7px;
}
aside .nav.active {
  color: #ffffff;
  background: #276aa5;
}
aside .nav:hover {
  background: #224664;
}
.sidebar-bottom {
  color: #c4d3e0;
}
.status-dot {
  background: #74b5ea;
}
.primary {
  background: #276aa5;
  color: #ffffff;
  border-radius: 7px;
}
.outline,
.panel,
dialog,
input,
select,
textarea {
  border-radius: 9px;
}
.primary:hover {
  background: #205b90;
}
.text-button {
  color: var(--green);
}
button:focus-visible,
a:focus-visible {
  outline-color: #79b7ea;
}
.nav.active {
  background: #276aa5;
  color: white;
}
.light {
  background: #e3edf6;
  color: #17324d;
}
.tip {
  border-color: var(--border);
  background: transparent;
}
.empty {
  border-color: var(--border);
}
#notice {
  background: #17324d;
  box-shadow: 0 8px 30px #17324d22;
}
dialog::backdrop {
  background: #0d213b80;
}
.login {
  background: linear-gradient(135deg, #e3ebf3 0%, #f1f4f7 62%);
  color: #17324d;
}
.login-card {
  background: #ffffff;
  border-color: #d8e1ea;
  box-shadow: 0 16px 56px #17324d12;
  border-radius: 14px;
}
.login .brand b {
  color: #17324d;
}
.login .brand span {
  color: #627589;
}
.login h1 {
  font-size: 34px;
  font-weight: 650;
  letter-spacing: -1px;
}
.login-card small {
  color: #627589;
}
.login-card .muted {
  color: #627589;
}
.login-card input {
  background: #ffffff;
  color: #17324d;
  border-color: #d8e1ea;
}
.login-card .eyebrow {
  color: #276aa5;
  font-size: 10px;
}
.login-card .error {
  color: #b64736;
}
#clock {
  font-family: 'Cascadia Mono', Consolas, monospace;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.mobile-brand {
  display: none;
}
.task-launch,
.task-card {
  border-radius: 8px;
}
.category-group summary {
  border-radius: 7px;
  font-weight: 650;
}
.section-heading h2 {
  letter-spacing: 0.01em;
}
@media (max-width: 700px) {
  aside {
    background: #17324d;
    border-top: 1px solid #304d67;
  }
  .nav.active,
  aside .nav.active {
    background: #224664;
    color: #ffffff;
  }
  .nav {
    border-radius: 7px;
  }
  h1 {
    font-size: 21px;
  }
  .mobile-brand {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: var(--green);
    letter-spacing: 0.06em;
    margin-bottom: 6px;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 1px;
  }
  .brand img {
    width: 31px;
    height: 31px;
  }
  .login h1 {
    font-size: 30px;
  }
  .task-launch,
  .task-card {
    border-radius: 7px;
  }
}

.login .login-brand-title {
  letter-spacing: -0.7px;
  white-space: nowrap;
  color: #17324d;
}
.login .login-brand-title b,
.login .login-brand-title span {
  display: inline;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  letter-spacing: inherit;
  margin: 0;
}
.login .login-brand-title b {
  font-weight: 750;
}
.login .login-brand-title span {
  font-weight: 400;
}

.login .brand {
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
}
.login .brand img {
  width: 48px;
  height: 48px;
}
.login-brand-copy {
  min-width: 0;
}
.login .login-brand-copy .eyebrow {
  margin: 3px 0 0;
  text-align: left;
  line-height: 1.4;
}
.login .login-brand-title {
  font-size: clamp(16px, 5vw, 27px);
  line-height: 1.2;
}

aside .sidebar-brand {
  gap: 10px;
  align-items: center;
  margin-bottom: 25px;
}
aside .sidebar-brand img {
  width: 44px;
  height: 44px;
}
aside .sidebar-brand-copy {
  min-width: 0;
  line-height: 1.2;
}
aside .sidebar-brand-copy b {
  display: block;
  font-size: 27px;
  font-weight: 750;
  letter-spacing: -0.7px;
}
aside .sidebar-brand-copy span {
  display: block;
  margin: 3px 0 0;
  color: #b4c8da;
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: 0.04em;
}

aside .sidebar-brand-copy span {
  font-weight: 700;
}

aside .sidebar-brand-copy span {
  position: relative;
  top: -4px;
}

.task-fields > label:has(#task-name) {
  order: 2;
  grid-column: 1/-1;
}
.task-fields > label:has(#task-folder) {
  order: 4;
  grid-column: 1;
}
.task-fields > label:has(#task-color) {
  order: 5;
  grid-column: 1/-1;
}
.task-fields > label:has(#icon-search) {
  order: 8;
  grid-column: 1/-1;
}
#color-palette {
  order: 6;
}
#icon-picker {
  order: 9;
}

.task-fields > label:has(#task-category) {
  order: 4;
  grid-column: 2;
}

.task-color-field {
  order: 5;
  grid-column: 1/-1;
  min-width: 0;
}
.task-color-field > label {
  display: block;
  margin: 0 0 4px;
}
.task-color-controls {
  display: grid;
  gap: 8px;
  align-items: center;
}
.task-color-controls #task-color {
  margin: 0;
  padding: 3px;
  border-radius: 4px;
  cursor: pointer;
}
.task-color-controls #task-color::-webkit-color-swatch-wrapper {
  padding: 0;
}
.task-color-controls #task-color::-webkit-color-swatch {
  border: 0;
  border-radius: 2px;
}
.task-color-controls #task-color::-moz-color-swatch {
  border: 0;
  border-radius: 2px;
}
.task-color-controls #color-palette {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 4px;
  margin: 0;
  align-items: stretch;
}
.task-color-controls #color-palette button {
  width: 100%;
  min-height: 0;
  padding: 0;
  border-radius: 3px;
}

.task-color-controls #color-palette {
  grid-column: 2;
  grid-row: 1;
  order: 0;
}
.task-color-controls #task-color {
  grid-column: 1;
  grid-row: 1;
}

.task-color-controls {
  grid-template-columns: 68px minmax(0, 1fr);
  width: 100%;
}
.task-color-controls #task-color {
  width: 68px;
  height: 68px;
  min-width: 68px;
}
.task-color-controls #color-palette {
  width: 100%;
  grid-template-rows: repeat(2, 32px);
}
.task-color-controls #color-palette button {
  height: 32px;
  aspect-ratio: auto;
}

.task-fields > label:has(#task-visibility) {
  order: 3;
  grid-column: 1;
}
.task-fields > label:has(#task-identifier) {
  order: 3;
  grid-column: 2;
}
.required-mark {
  color: #d43f3a;
  font-size: 0.9em;
  margin-left: 1px;
}
#task-preview > span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.2;
}
@media (min-width: 701px) {
  #icon-picker {
    grid-template-columns: repeat(9, minmax(0, 1fr));
  }
}

.task-title {
  --label-max: 13;
  --label-min: 10;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.18;
  max-height: calc(var(--label-max) * 2.36px);
  min-height: calc(var(--label-max) * 2.36px);
}
#task-preview > span {
  --label-max: 11;
  --label-min: 9;
  width: 100%;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
}
.task-title.single-word-label,
#task-preview > span.single-word-label {
  display: block;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
@media (max-width: 700px) {
  .task-title {
    --label-max: 10;
    --label-min: 9;
  }
}

.task-launch {
  display: grid;
  grid-template-rows: minmax(30px, 1fr) auto auto;
  justify-items: center;
  align-items: center;
  gap: 5px;
  padding: 14px 7px 7px;
}
.task-launch > .task-icon {
  align-self: center;
}
.task-launch > .task-title {
  min-height: 0;
  margin: 0;
  align-self: end;
}
.task-launch > .task-time {
  margin: 0;
  line-height: 1.2;
  align-self: end;
}
#task-preview {
  grid-template-rows: minmax(25px, 1fr) auto;
  justify-items: center;
  align-items: center;
}
#task-preview > span {
  min-height: 0;
  margin: 0;
  align-self: end;
}
@media (max-width: 700px) {
  .task-launch {
    grid-template-rows: minmax(26px, 1fr) auto auto;
    gap: 4px;
    padding: 12px 4px 6px;
  }
}

.task-launch {
  grid-template-columns: minmax(0, 1fr);
}
.task-launch > .task-title {
  min-width: 0;
  width: 100%;
}

#task-preview {
  display: block;
  width: var(--preview-card-width, 100px);
  height: auto;
  min-height: 0;
  aspect-ratio: auto;
  padding: 0;
  gap: 0;
  background: transparent;
  color: inherit;
  overflow: visible;
  border-radius: 0;
  margin: 0 auto 2px;
}
#task-preview > .task-launch {
  pointer-events: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
}
#task-preview .task-icon {
  width: 30px;
  height: 30px;
}
@media (max-width: 700px) {
  #task-preview .task-icon {
    width: 26px;
    height: 26px;
  }
}

#task-form #delete-task,
.text-button.danger {
  color: #c43d35;
}

#task-form #delete-task,
#task-form #archive-task {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
#task-form #delete-task[hidden],
#task-form #archive-task[hidden] {
  display: none;
}
#task-form .action-icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: currentColor;
}

.folder-badge,
.public-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  left: 7px;
  top: 6px;
  opacity: 0.85;
}
.folder-badge .task-icon,
.public-badge .task-icon {
  width: 13px;
  height: 13px;
}

#task-dialog.editing-group .task-fields > label:has(#task-category) {
  order: 3;
  grid-column: 1/-1;
}
.task-fields > label[hidden] {
  display: none;
}
#task-preview.folder-card .folder-badge .task-icon,
#task-preview .public-badge .task-icon {
  width: 13px;
  height: 13px;
}
#task-dialog.editing-group #task-name {
  cursor: default;
}
