/*
 * 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;
  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-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);
}

.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;
}

.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 {
  margin-bottom: 24px;
}

.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;
}

.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;
}

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

.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;
}

.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 {
  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;
  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,
.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 {
  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 {
  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-column {
  min-width: 220px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
  padding: 14px;
}

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

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

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

.kanban-ticket h4 {
  min-width: 0;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

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

.priority-badge,
.count-badge,
.ticket-labels 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-move-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.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) {
  .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;
  }
}

.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;
}

.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 {
  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;
}

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

.composer {
  display: grid;
  grid-template-columns: 1fr 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;
}

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

.oneoff-btn {
  padding: 8px 12px;
  font-size: 12px;
}

.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-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;
  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 {
  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;
}

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

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

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

.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,
  .composer,
  .filter-row {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .composer {
    display: grid;
  }

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