/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  color-scheme: light;
  --background: #f7f7f4;
  --surface: #ffffff;
  --surface-muted: #f0f2f5;
  --text: #1f2933;
  --muted: #626e7a;
  --border: #d9dee5;
  --accent: #b9412f;
  --accent-dark: #8f2f22;
  --focus: #2f6fed;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  background: var(--background);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.auth-shell,
.page-shell {
  width: min(100% - 32px, 960px);
  margin: 0 auto;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.auth-panel,
.dashboard-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 45px rgb(31 41 51 / 8%);
}

.auth-panel {
  width: min(100%, 420px);
  padding: 32px;
}

.page-shell {
  padding: 64px 0;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 1.05;
}

h2 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.auth-form {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.field {
  display: grid;
  gap: 6px;
}

label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="search"],
textarea,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

textarea {
  resize: vertical;
}

input:focus-visible,
.button:focus-visible,
.page-tab:focus-visible,
.brand-link:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus), transparent 65%);
  outline-offset: 2px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 10px 16px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.button:disabled {
  border-color: var(--border);
  background: var(--surface-muted);
  color: var(--muted);
  cursor: not-allowed;
}

.button-secondary {
  background: var(--surface);
  color: var(--accent);
}

.button-secondary:hover {
  background: #fff6f3;
  color: var(--accent-dark);
}

.button-danger {
  border-color: #b42318;
  background: #b42318;
  color: #ffffff;
}

.button-danger:hover {
  border-color: #8f1d14;
  background: #8f1d14;
}

.notification-card {
  max-width: 680px;
  padding: 28px;
}

.notifications-page {
  width: min(100% - 32px, 1120px);
}

.notifications-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(360px, 1.15fr);
  gap: 20px;
  align-items: start;
}

.notifications-grid .notification-card {
  max-width: none;
}

.notification-form {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.notification-form small,
.notification-history-item small {
  color: var(--muted);
}

.notification-delivery-options {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  border: 0;
  padding: 0;
}

.notification-delivery-options legend {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.notification-delivery-options label {
  color: var(--text);
}

.recurrence-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 16px;
  align-items: end;
}

.notification-weekdays {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  border: 0;
  padding: 0;
}

.notification-weekdays legend {
  width: 100%;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.notification-weekdays label {
  cursor: pointer;
}

.notification-weekdays input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.notification-weekdays span {
  display: inline-flex;
  min-width: 45px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.notification-weekdays input:checked + span {
  border-color: var(--accent);
  background: #fff6f3;
  color: var(--accent-dark);
}

.notification-weekdays input:focus-visible + span {
  outline: 3px solid color-mix(in srgb, var(--focus), transparent 65%);
  outline-offset: 2px;
}

.notification-history {
  margin-top: 20px;
}

.notification-list {
  display: grid;
  gap: 0;
  margin-top: 18px;
}

.notification-history-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--border);
  padding: 16px 0;
}

.notification-history-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.notification-history-item p {
  margin: 4px 0;
}

.notification-history-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification-status {
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.notification-status-sent {
  background: #edf7ee;
  color: #176b31;
}

.notification-status-failed,
.notification-status-cancelled,
.notification-error {
  color: #9b1c1c;
}

.notification-status-failed,
.notification-status-cancelled {
  background: #fff1f1;
}

.notification-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 0;
}

.notification-help {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.flash {
  margin-top: 18px;
  border-radius: 6px;
  padding: 10px 12px;
  font-weight: 650;
}

.flash-alert {
  background: #fff1f1;
  color: #9b1c1c;
}

.flash-notice {
  background: #edf7ee;
  color: #176b31;
}

.top-menu {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: rgb(255 255 255 / 94%);
  backdrop-filter: blur(12px);
}

.top-menu-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(100% - 32px, 1120px);
  min-height: 64px;
  margin: 0 auto;
}

.brand-link {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.page-tabs {
  display: flex;
  align-self: stretch;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
}

.page-tab {
  display: inline-flex;
  align-items: center;
  border-bottom: 3px solid transparent;
  padding: 0 18px;
  color: var(--muted);
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.page-tab:hover,
.page-tab-active {
  border-bottom-color: var(--accent);
  color: var(--text);
}

.placeholder-copy {
  margin-top: 18px;
  color: var(--muted);
  font-size: 1.1rem;
}

.tab {
  border-radius: 6px;
  padding: 10px 14px;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.tab:hover,
.tab-active {
  background: var(--surface);
  color: var(--text);
}

.tab-content {
  display: grid;
  gap: 1px;
  background: var(--border);
}

.placeholder-section {
  background: var(--surface);
  padding: 28px;
}

.dashboard-page {
  width: min(100% - 32px, 1180px);
}

.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.dashboard-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 20px;
  align-items: start;
}

.dashboard-section {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 20px;
  box-shadow: 0 16px 38px rgb(31 41 51 / 6%);
}

.dashboard-section h2,
.dashboard-project-card h3 {
  margin: 0;
}

.dashboard-section time {
  display: block;
  margin-top: 4px;
  font-size: 0.9rem;
}

.dashboard-eod-copy {
  min-height: 360px;
  margin-top: 16px;
  border-color: var(--border);
  background: #fbfbf9;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  line-height: 1.55;
}

.dashboard-project-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.recent-tickets-section {
  grid-column: 1 / -1;
}

.section-hint,
.ticket-age-filter {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.dashboard-ticket-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.dashboard-ticket-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 12px;
  background: var(--surface-muted);
}

.dashboard-ticket-row strong,
.dashboard-ticket-row span {
  display: block;
}

.dashboard-ticket-row span,
.dashboard-ticket-row time {
  color: var(--muted);
  font-size: 0.78rem;
}

.dashboard-project-card {
  display: grid;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
  padding: 16px;
}

.dashboard-project-card h3 {
  font-size: 1rem;
  line-height: 1.35;
}

.dashboard-project-card p {
  margin: 5px 0 0;
  color: var(--muted);
}

.dashboard-project-card h3,
.dashboard-project-card p,
.project-card h2,
.project-card-header p,
.kanban-ticket h4,
.ticket-summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.dashboard-project-card h3,
.project-card h2,
.kanban-ticket h4 {
  -webkit-line-clamp: 2;
}

.dashboard-project-card p,
.project-card-header p {
  -webkit-line-clamp: 2;
}

.dashboard-project-card h3,
.project-card h2 {
  min-height: 2.7em;
}

.dashboard-project-card p,
.project-card-header p {
  min-height: 3em;
}

.topbar,
.projects-hero,
.project-card-header,
.project-card-actions,
.project-overview-heading,
.section-heading,
.ticket-title-row,
.ticket-move-actions {
  display: flex;
  align-items: center;
}

.topbar,
.projects-hero,
.project-card-header,
.project-overview-heading,
.section-heading,
.ticket-title-row {
  justify-content: space-between;
  gap: 18px;
}

.topbar {
  margin-bottom: 28px;
}

.project-card-header > div {
  min-width: 0;
}

.text-link {
  color: var(--accent);
  font-weight: 750;
  text-decoration: none;
}

.text-link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.projects-page,
.project-show-page,
.project-form-page {
  width: min(100% - 32px, 1180px);
}

.projects-hero {
  position: relative;
  margin-bottom: 28px;
}

.projects-hero h1 {
  max-width: 820px;
  font-size: clamp(2rem, 4vw, 3.1rem);
}

.project-new-button {
  align-self: flex-start;
  white-space: nowrap;
}

.project-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.project-card,
.project-overview,
.kanban-section,
.empty-projects,
.project-form,
.ticket-detail {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 38px rgb(31 41 51 / 6%);
}

.project-card {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 22px;
  padding: 22px;
}

.project-card-archived {
  opacity: 0.72;
}

.project-card h2,
.project-overview h2,
.kanban-section h2,
.kanban-column h3,
.kanban-ticket h4,
.ticket-detail h2,
.empty-projects h2 {
  margin: 0;
}

.project-card h2 {
  font-size: 1.15rem;
}

.project-card p,
.project-overview p,
.empty-projects p {
  margin: 6px 0 0;
  color: var(--muted);
}

.project-status,
.priority-badge,
.count-badge,
.ticket-labels span,
.ticket-detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.project-status::before {
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.status-active {
  background: #edf7ee;
  color: #176b31;
}

.status-planning {
  background: #fff7df;
  color: #806000;
}

.status-paused {
  background: #eef4ff;
  color: #2557a7;
}

.status-complete {
  background: #f0f2f5;
  color: #3d4852;
}

.status-archived {
  background: #f4eeee;
  color: #7c3f3f;
}

.project-card-metrics,
.detail-list,
.progress-metrics {
  display: grid;
  gap: 12px;
  margin: 0;
}

.project-card-metrics {
  grid-template-columns: repeat(3, 1fr);
}

.project-card-metrics div,
.progress-metrics div,
.detail-list div {
  min-width: 0;
}

dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
}

dd {
  margin: 2px 0 0;
  font-weight: 800;
}

.project-card-actions {
  align-self: end;
  flex-wrap: wrap;
  gap: 10px;
}

.empty-projects {
  padding: 36px;
}

.project-overview,
.kanban-section {
  padding: 26px;
}

.project-overview {
  margin-bottom: 22px;
}

.project-overview-heading {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.project-overview h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 24px;
  padding-top: 24px;
}

.overview-grid section {
  min-width: 0;
}

.progress-metrics {
  grid-template-columns: repeat(3, 1fr);
}

.progress-bar {
  height: 10px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-muted);
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.compact-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 18px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.kanban-mobile-tabs {
  display: none;
}

.kanban-column {
  min-width: 220px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
  padding: 14px;
}

.kanban-column.drag-over {
  border-color: var(--accent);
  background: #fff6f3;
}

.kanban-column h3 {
  margin-bottom: 12px;
  font-size: 0.96rem;
}

.kanban-ticket-list {
  display: grid;
  gap: 10px;
}

.kanban-ticket {
  position: relative;
  display: grid;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.kanban-ticket:hover {
  border-color: color-mix(in srgb, var(--accent), var(--border) 55%);
  box-shadow: 0 10px 24px rgb(31 41 51 / 8%);
}

.kanban-ticket.dragging {
  opacity: 0.45;
}

.kanban-ticket-open-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 8px;
  color: inherit;
  overflow: hidden;
  text-indent: -9999px;
  white-space: nowrap;
  text-decoration: none;
}

.kanban-ticket-open-link:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus), transparent 65%);
  outline-offset: 2px;
}

.kanban-ticket h4 {
  min-width: 0;
  min-height: 2.6em;
  font-size: 0.95rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.ticket-summary {
  min-height: 4.5em;
  line-height: 1.5;
  -webkit-line-clamp: 3;
}

.kanban-ticket p,
.kanban-ticket time {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.ticket-status-tag {
  display: none;
}

.priority-badge,
.count-badge,
.ticket-labels span,
.ticket-detail-tags span {
  background: #eef1f4;
  color: #48525e;
}

.priority-high,
.priority-urgent {
  background: #fff1f1;
  color: #9b1c1c;
}

.priority-low {
  background: #edf7ee;
  color: #176b31;
}

.ticket-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ticket-title-row,
.ticket-summary,
.ticket-labels,
.kanban-ticket time {
  pointer-events: none;
}

.ticket-move-actions {
  position: relative;
  z-index: 2;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.ticket-show-page {
  width: min(100% - 32px, 860px);
}

.ticket-detail {
  display: grid;
  gap: 22px;
  padding: 26px;
}

.ticket-detail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.ticket-detail h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  overflow-wrap: anywhere;
}

.ticket-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ticket-detail .ticket-status-tag {
  display: inline-flex;
}

.ticket-detail-section p {
  margin: 8px 0 0;
  color: var(--muted);
  white-space: pre-wrap;
}

.ticket-detail-meta {
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.tiny {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 0.8rem;
}

.project-form {
  display: grid;
  gap: 18px;
  margin-top: 24px;
  padding: 26px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 100px 180px;
  gap: 18px;
}

.form-errors {
  border-radius: 8px;
  background: #fff1f1;
  padding: 14px 18px;
  color: #9b1c1c;
}

.form-errors h2 {
  font-size: 1rem;
}

.form-errors ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

@media (max-width: 820px) {
  .top-menu-inner,
  .projects-hero,
  .project-overview-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .page-tab {
    min-height: 44px;
  }

  .project-card-metrics,
  .overview-grid,
  .progress-metrics,
  .compact-list,
  .form-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .project-new-button {
    width: 100%;
  }
}

.placeholder-section p {
  margin-bottom: 0;
  color: var(--muted);
}

@media (max-width: 720px) {
  .auth-shell,
  .page-shell,
  .dashboard-page,
  .notifications-page,
  .projects-page,
  .project-show-page,
  .project-form-page,
  .ticket-show-page {
    width: min(100% - 20px, 100%);
  }

  .page-shell {
    padding: 28px 0;
  }

  .notifications-grid {
    grid-template-columns: 1fr;
  }

  .recurrence-fields {
    grid-template-columns: 1fr;
  }

  .notification-history-item {
    flex-direction: column;
  }

  .notification-history-item form,
  .notification-history-item .button {
    width: 100%;
  }

  .top-menu-inner {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 14px 0;
  }

  .page-tabs {
    order: 3;
    overflow-x: auto;
  }

  .page-tab {
    min-height: 44px;
    padding: 0 14px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
  }

  .topbar .button,
  .section-heading .button {
    width: 100%;
  }

  .project-overview,
  .kanban-section,
  .project-form,
  .ticket-detail {
    padding: 16px;
  }

  .project-overview {
    margin-bottom: 14px;
  }

  .project-overview-heading {
    gap: 12px;
    padding-bottom: 16px;
  }

  .project-overview h1 {
    font-size: 1.8rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  .ticket-detail-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 14px;
  }

  .ticket-detail h1 {
    font-size: 1.8rem;
    line-height: 1.15;
  }

  .overview-grid {
    gap: 16px;
    padding-top: 16px;
  }

  .overview-grid section {
    border-top: 1px solid var(--border);
    padding-top: 14px;
  }

  .overview-grid section:first-child {
    border-top: 0;
    padding-top: 0;
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .section-heading .project-card-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .kanban-mobile-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
  }

  .kanban-tab-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .kanban-tab-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 42px;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 10px;
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    font-size: 0.86rem;
    font-weight: 800;
  }

  .kanban-tab-label span:last-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 24px;
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--text);
    font-size: 0.78rem;
  }

  .kanban-tab-input:checked + .kanban-tab-label {
    border-color: var(--accent);
    background: #fff6f3;
    color: var(--accent-dark);
  }

  .kanban-tab-input:focus-visible + .kanban-tab-label {
    outline: 3px solid color-mix(in srgb, var(--focus), transparent 65%);
    outline-offset: 2px;
  }

  .kanban-board {
    display: block;
    margin-top: 12px;
    overflow: visible;
    padding-bottom: 0;
  }

  .kanban-column {
    min-width: 0;
    padding: 10px;
  }

  .kanban-section:has(#kanban-tab-backlog:checked) .kanban-column:not([data-kanban-status-key="backlog"]),
  .kanban-section:has(#kanban-tab-todo:checked) .kanban-column:not([data-kanban-status-key="todo"]),
  .kanban-section:has(#kanban-tab-in-progress:checked) .kanban-column:not([data-kanban-status-key="in-progress"]),
  .kanban-section:has(#kanban-tab-done:checked) .kanban-column:not([data-kanban-status-key="done"]) {
    display: none;
  }

  .kanban-column h3 {
    display: none;
  }

  .kanban-ticket {
    gap: 8px;
    padding: 11px;
  }

  .ticket-title-row {
    align-items: flex-start;
    gap: 10px;
  }

  .kanban-ticket h4 {
    min-height: 0;
    font-size: 0.92rem;
    line-height: 1.3;
  }

  .ticket-summary,
  .kanban-ticket time {
    display: none;
  }

  .ticket-move-actions {
    display: none;
  }

  .ticket-status-tag {
    display: inline-flex;
  }

  .ticket-labels {
    gap: 5px;
  }

  .priority-badge,
  .ticket-labels span {
    min-height: 24px;
    padding: 3px 8px;
    font-size: 0.72rem;
  }
}

.eod-page {
  width: min(1180px, calc(100vw - 32px));
  padding: 28px 0;
}

.eod-page.narrow {
  width: min(780px, calc(100vw - 32px));
}

.eod-dashboard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  min-width: 0;
}

.eod-page h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 14px;
}

.eod-subtle,
.empty-state,
time {
  color: var(--muted);
}

.eod-panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  box-shadow: 0 18px 45px rgb(31 41 51 / 6%);
}

.eod-dashboard-actions,
.actions,
.topbar,
.eod-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eod-dashboard-actions,
.topbar,
.eod-section-title {
  justify-content: space-between;
}

.topbar {
  margin-bottom: 14px;
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.button.save {
  border-color: #1d8d53;
  background: #e9f8ef;
  color: #176b31;
}

.button.ghost {
  background: transparent;
  color: var(--text);
}

.button.ghost:hover,
.text-link:hover {
  border-color: var(--accent);
  color: var(--text);
}

.text-link {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.entry-list {
  display: grid;
  gap: 8px;
}

.entry-list.spaced {
  margin-top: 16px;
}

.entry-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
  padding: 12px;
}

.entry-main {
  display: flex;
  min-width: 0;
  flex: 1;
  justify-content: space-between;
  gap: 14px;
  text-decoration: none;
}

.button.compact {
  min-height: 32px;
  padding: 6px 10px;
}

.button.tiny {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 11px;
}

.heading-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.manual-ticket-dialog {
  width: min(92vw, 32rem);
  padding: 0;
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 30%);
}

.manual-ticket-dialog::backdrop {
  background: rgb(15 23 42 / 55%);
}

.manual-ticket-dialog form {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
}

.quick-ticket-dialog {
  width: min(92vw, 42rem);
}

.quick-eod-dialog {
  width: min(94vw, 58rem);
  max-height: 92vh;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--background);
  box-shadow: 0 24px 70px rgb(0 0 0 / 32%);
}

.quick-eod-dialog::backdrop {
  background: rgb(15 23 42 / 58%);
}

.quick-eod-modal {
  padding: 22px;
}

.quick-eod-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.quick-eod-heading h2,
.quick-eod-heading p {
  margin-bottom: 0;
}

.quick-eod-heading > div > p:last-child {
  margin-top: 5px;
  color: var(--muted);
}

.quick-eod-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quick-eod-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  padding: 14px;
}

.quick-eod-card h3 {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 0.9rem;
}

.quick-eod-card h3 span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.quick-eod-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.quick-eod-card-actions .text-link {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.quick-eod-manual-ticket {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto;
  gap: 7px;
  margin-bottom: 10px;
}

.quick-eod-manual-ticket input,
.quick-eod-manual-ticket select {
  min-width: 0;
  padding: 7px 9px;
  font-size: 0.78rem;
}

.quick-eod-manual-ticket .form-error {
  grid-column: 1 / -1;
}

.quick-eod-chips,
.quick-eod-projects {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.quick-eod-chip input,
.quick-eod-project input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.quick-eod-chip span,
.quick-eod-project span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  background: var(--surface-muted);
  color: var(--text);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 650;
}

.quick-eod-chip input:checked + span,
.quick-eod-project input:checked + span {
  border-color: #1d8d53;
  background: #e9f8ef;
  color: #176b31;
}

.quick-eod-project span b {
  font-size: 1rem;
}

.quick-eod-list {
  display: grid;
  max-height: 210px;
  gap: 6px;
  overflow-y: auto;
}

.quick-eod-choice {
  display: flex;
  grid-template-columns: none;
  flex-direction: row;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  background: var(--surface-muted);
  color: var(--text);
  cursor: pointer;
}

.quick-eod-choice:has(input:checked) {
  border-color: #1d8d53;
  background: #e9f8ef;
}

.quick-eod-choice input {
  margin-top: 4px;
  accent-color: #1d8d53;
}

.quick-eod-choice > span,
.quick-eod-choice strong,
.quick-eod-choice small {
  display: block;
}

.quick-eod-choice > span {
  min-width: 0;
}

.quick-eod-choice strong {
  font-size: 0.8rem;
}

.quick-eod-choice small {
  margin-top: 2px;
  color: var(--muted);
  font-weight: 500;
}

.quick-eod-preview-card {
  grid-column: 1 / -1;
}

.quick-eod-preview-card form {
  display: grid;
  gap: 10px;
}

.quick-eod-preview {
  min-height: 130px;
  resize: vertical;
  font: inherit;
  font-size: 0.84rem;
}

.manual-ticket-dialog label {
  display: grid;
  gap: 0.4rem;
  font-weight: 700;
}

.manual-ticket-dialog input,
.manual-ticket-dialog select {
  width: 100%;
}

.manual-ticket-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.manual-ticket-heading h3 {
  margin: 0;
}

.dialog-close {
  border: 0;
  background: transparent;
  font-size: 1.75rem;
  cursor: pointer;
}

.form-error {
  margin: 0;
  color: #b42318;
}

.show-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}

.output-panel {
  grid-column: 1 / -1;
}

.day-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.day-btn,
.oneoff-btn,
.project-chip {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--text);
  cursor: pointer;
}

.day-btn {
  display: flex;
  min-width: 96px;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.day-btn .emoji {
  font-size: 20px;
}

.oneoff-btn {
  max-width: 100%;
  padding: 8px 12px;
  font-size: 12px;
  white-space: normal;
}

.day-btn.active {
  border-color: var(--accent);
  background: #fff6f3;
  box-shadow: 0 0 0 1px var(--accent) inset;
}

.oneoff-btn.active,
.project-chip.active {
  border-color: #1d8d53;
  background: #e9f8ef;
}

.filter-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.filter-row input,
.filter-row select,
.json-input,
.prompt-text,
.output {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

.filter-row input,
.filter-row select {
  min-width: 0;
  min-height: 36px;
  padding: 7px 9px;
  font-size: 12px;
}

.ticket-list {
  display: flex;
  max-height: 430px;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.ticket-empty {
  margin: 8px 2px;
}

.ticket-group {
  margin: 8px 2px 2px;
  color: var(--muted);
  font-size: 11px;
}

.ticket {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
  padding: 8px 10px;
}

.ticket.checked {
  border-color: var(--accent);
}

.ticket input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 4px;
  accent-color: var(--accent);
}

.meta {
  min-width: 0;
  flex: 1;
}

.id-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.id-tag {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

.status {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 6px;
  color: var(--muted);
  font-size: 10px;
}

.status.done {
  border-color: #9dd8af;
  color: #176b31;
}

.status.progress {
  border-color: #dbc46b;
  color: #705c00;
}

.summary-input {
  min-width: 0;
  width: 100%;
  border: 0;
  border-bottom: 1px dashed transparent;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}

.summary-input:focus {
  border-bottom-color: var(--accent);
  outline: 0;
}

.title-full,
.word-count {
  color: var(--muted);
  font-size: 11px;
}

.title-full {
  overflow-wrap: anywhere;
}

.word-count.over {
  color: #9b1c1c;
}

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

.project-chip {
  display: flex;
  min-width: 0;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  font-size: 13px;
  text-align: left;
}

.project-chip span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.pe {
  font-size: 16px;
}

.count-badge {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 400;
}

.output,
.prompt-text,
.json-input {
  min-height: 220px;
  padding: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.65;
  resize: vertical;
}

.output,
.saved-output {
  font-family: inherit;
  font-size: 15px;
  line-height: 1.55;
}

.json-input {
  min-height: 360px;
  margin: 10px 0;
}

.prompt-box {
  margin: 18px 0 22px;
}

.prompt-text {
  min-height: 420px;
  margin-bottom: 8px;
  background: var(--surface-muted);
}

.prompt-copied {
  display: inline-block;
  min-height: 18px;
}

.saved-output {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
  padding: 16px;
  white-space: pre-wrap;
}

.copied {
  color: #176b31;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.copied.show {
  opacity: 1;
}

.notice,
.alert {
  width: min(1180px, calc(100vw - 32px));
  margin: 16px auto 0;
  border-radius: 8px;
  padding: 10px 12px;
}

.notice {
  border: 1px solid #9dd8af;
  background: #e9f8ef;
  color: #176b31;
}

.alert {
  border: 1px solid #f0b4b4;
  background: #fff1f1;
  color: #9b1c1c;
}

@media (max-width: 860px) {
  .eod-dashboard,
  .dashboard-hero,
  .composer,
  .filter-row {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-hero-actions,
  .quick-eod-columns {
    display: grid;
    grid-template-columns: 1fr;
  }

  .quick-eod-manual-ticket {
    grid-template-columns: 1fr;
  }

  .quick-eod-modal {
    padding: 15px;
  }

  .composer {
    display: grid;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .top-menu-inner {
    width: min(100% - 24px, 1120px);
  }

  .top-menu-inner form,
  .top-menu-inner .button {
    width: 100%;
  }

  .page-tabs {
    width: 100%;
    scrollbar-width: thin;
  }

  .page-tab {
    flex: 0 0 auto;
    padding: 0 12px;
  }

  .eod-page,
  .eod-page.narrow,
  .notice,
  .alert {
    width: min(100% - 20px, 1180px);
  }

  .eod-page {
    padding: 18px 0;
  }

  .topbar,
  .eod-dashboard,
  .eod-section-title,
  .entry-row,
  .entry-main,
  .show-heading {
    flex-wrap: wrap;
  }

  .dashboard-ticket-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .topbar {
    align-items: stretch;
    gap: 8px;
  }

  .topbar .button {
    flex: 1 1 160px;
  }

  .eod-panel {
    padding: 14px;
  }

  .eod-page h2 {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .heading-actions {
    flex: 1 1 100%;
    justify-content: flex-start;
  }

  .day-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .day-btn {
    min-width: 0;
    width: 100%;
  }

  .oneoff-btn {
    min-height: 38px;
  }

  .ticket-list {
    max-height: none;
    overflow-y: visible;
  }

  .ticket {
    padding: 9px;
  }

  .id-row {
    gap: 5px;
  }

  .actions {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .actions .button {
    flex: 1 1 140px;
  }

  .output,
  .prompt-text,
  .json-input {
    min-height: 260px;
  }
}
