:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f6f7f9;
  color: #17202a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.error-screen {
  display: grid;
  gap: 14px;
  margin: 48px auto;
  max-width: 720px;
}

#logout{
  background: #d73a49;
  color: #fff;
  border-color: #d73a49;
}
.exportField{
  background: #d73a49;
  color: #fff;
  border-color: #d73a49;

}

#edit-project{
  background: #10a83d;
  color: #fff;
  border-color: #1e6104;
}

.error-screen pre {
  background: #fff;
  border: 1px solid #dfe4ea;
  border-radius: 8px;
  overflow-x: auto;
  padding: 14px;
  white-space: pre-wrap;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 24px 28px;
  background: #ffffff;
  border-bottom: 1px solid #dfe4ea;
}

.actions,
.project-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 26px;
}

h2 {
  font-size: 15px;
}

p {
  color: #8b949e;
  margin-top: 3px;
  font-size: 13px;
}

button {
  border: 1px solid #1f6feb;
  background: #1f6feb;
  color: #fff;
  border-radius: 6px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

button.secondary {

  background: #fff;
  color: #444d56;
  border-color: #d0d7de;
  font-weight: 500;
  /* width: 150px; */
}

main {
  padding: 24px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric {
  background: #fff;
  border: 1px solid #dfe4ea;
  border-radius: 8px;
  padding: 14px;
}

.metric strong {
  display: block;
  font-size: 22px;
}

.metric span {
  color: #53616f;
  font-size: 13px;
}

.metric-good strong {
  color: #2da44e;
}

.metric-warn strong {
  color: #d4a72c;
}

.metric-over {
  border-color: #ffcecb;
}

.metric-over strong {
  color: #cf222e;
}

.composer {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 100px 130px 150px auto;
  gap: 10px;
  margin-bottom: 22px;
}

.project-bar {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  align-items: end;
  margin-bottom: 18px;
}

.fields-bar {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  width: 900px;
  & label input{
    width: 400px;
  }
  & select {
    width: 200px;
  }
}

#project-collaborators {
  /* min-height: 60px; */
  font-size: 13px;
}

.new-project-toggle {
  display: none;
}

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

.field span {
  color: #53616f;
  font-size: 12px;
  font-weight: 700;
}

#active-project-name {
  color: #53616f;
  font-weight: 600;
}

input,
select,
textarea {
  border: 1px solid #c7d0d9;
  border-radius: 6px;
  padding: 10px;
  font: inherit;
  background: #fff;
}

textarea {
  resize: vertical;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
}

.planning {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  margin-bottom: 22px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 10px;
  gap: 12px;

}

.board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  justify-content: space-around;
  align-items: center;
  gap: 12px;
  /* overflow-x: auto; */
  background-color: white;
  padding: 24px;
  border: 1px solid #dfe4ea;
  border-radius: 8px;
}

.column {
  background: #eef2f6;
  border: 1px solid #d8e0e8;
  border-top-width: 3px;
  border-radius: 8px;
  height: 420px;
  transition: border-color 120ms ease, background 120ms ease;
  /* overflow-y: auto; */
}

.column[data-status="todo"] {
  border-top-color: #8b949e;
}

.column[data-status="today"] {
  border-top-color: #1f6feb;
}

.column[data-status="review"] {
  border-top-color: #d4a72c;
}

.column[data-status="done"] {
  border-top-color: #2da44e;
}

.column.drag-over {
  border-color: #1f6feb;
  background: #e6f0ff;
}

.column header {
  padding: 10px 14px;
  border-bottom: 1px solid #d8e0e8;
  font-weight: 600;
  font-size: 12px;
  color: #57606a;
  display: flex;
  align-items: center;
  gap: 7px;
}

.col-count {
  background: #d0d7de;
  color: #444d56;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  line-height: 1.6;
}

.dropzone {
  height: 360px;
  padding-bottom: 2px;
  overflow-y: auto;
}

.card {
  position: relative;
  background: #fff;
  border: 1px solid #dfe4ea;
  border-radius: 8px;
  margin: 10px;
  padding: 12px;
  cursor: grab;
}

.card:hover {
  box-shadow: 0 4px 12px rgb(0 0 0 / 8%);
  border-color: #c7d0d9;
}

.card:active {
  cursor: grabbing;
}

.card-actions {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  justify-content: flex-end;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.edit,
.flag {
  width: 26px;
  height: 26px;
  padding: 0;
  border-color: #c7d0d9;
  background: #fff;
  color: #53616f;
}

.edit {
  width: auto;
  padding: 0 8px;
  font-size: 12px;
}

.edit.icon {
  width: 26px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.delete {
  width: 26px;
  height: 26px;
  padding: 0;
  border-color: #c7d0d9;
  background: #fff;
  color: #53616f;
}

.delete:hover {
  border-color: #d1242f;
  background: #ffebe9;
  color: #a40e26;
}

dialog {
  border: 1px solid #dfe4ea;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgb(23 32 42 / 24%);
  max-width: 620px;
  width: calc(100vw - 28px);
}

dialog::backdrop {
  background: rgb(23 32 42 / 36%);
}

#report-modal {
  max-width: 800px;
  padding: 24px;
}

#report-modal h2 {
  font-size: 20px;
  margin-bottom: 8px;
}

#report-modal textarea {
  border: 1px solid #dfe4ea;
  border-radius: 6px;
  resize: vertical;
  min-height: 300px;
  line-height: 1.5;
}

#report-modal textarea:focus {
  outline: none;
  border-color: #1f6feb;
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.1);
}

#task-form {
  display: grid;
  gap: 14px;
}

#task-form header,
#task-form footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.check-field {
  display: flex;
  gap: 8px;
  align-items: center;
}

.flag.active {
  border-color: #d1242f;
  background: #d1242f;
  color: #fff;
}

.card .meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  color: #53616f;
  font-size: 12px;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  cursor: default;
}

.avatar-unassigned {
  background: #6e7681;
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 13px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  background: #ffeef0;
  color: #cf222e;
  border: 1px solid #ff818266;
  max-width: 320px;
}

.toast-visible {
  opacity: 1;
  pointer-events: auto;
}

.pill {
  border: 1px solid #d8e0e8;
  border-radius: 999px;
  padding: 2px 8px;
  background: #f8fafc;
}

.pill.blocked {
  border-color: #ffebe9;
  background: #ffebe9;
  color: #a40e26;
}

.priority-high {
  background: #ffebe9;
  border-color: #ffcecb;
  color: #a40e26;
}

.priority-medium {
  background: #fff8c5;
  border-color: #e8d44d;
  color: #7d5700;
}

.priority-low {
  background: #dafbe1;
  border-color: #b7efcb;
  color: #116329;
}


.team,
.burndown {
  background: #fff;
  border: 1px solid #dfe4ea;
  border-radius: 8px;
  min-height: 180px;
  padding: 12px;
  margin: 0 auto;
}

.member {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #edf1f5;
}

.member:last-child {
  border-bottom: 0;
}

.member-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.member strong,
.member span {
  display: block;
}

.member strong {
  font-size: 14px;
}

.member span,
.load span {
  color: #57606a;
  font-size: 12px;
}

.col-empty {
  text-align: center;
  color: #8b949e;
  font-size: 12px;
  padding: 32px 12px;
  margin: 0;
}

.load>div {
  height: 8px;
  background: #edf1f5;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}

.load i {
  display: block;
  height: 100%;
  transition: width 400ms ease;
}

.burndown svg {
  width: 100%;
  height: 100%;
}

.burndown text {
  fill: #53616f;
  font-size: 11px;
}

.axis {
  stroke: #c7d0d9;
  stroke-width: 1;
}

.ideal {
  stroke: #9aa7b3;
  stroke-width: 2;
  stroke-dasharray: 5 5;
}

.actual {
  fill: none;
  stroke: #1f6feb;
  stroke-width: 3;
}

.dot {
  fill: #1f6feb;
}

.agenda {
  background: #fff;
  border: 1px solid #dfe4ea;
  border-radius: 8px;
  height: 470px;
  padding: 12px;
  overflow-y: auto;
}

.archives {
  margin-top: 22px;
}

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

.archive-day {
  background: #fff;
  border: 1px solid #dfe4ea;
  border-left: 3px solid #2da44e;
  border-radius: 8px;
  padding: 12px;
}

.archive-day-label {
  font-size: 13px;
  font-weight: 600;
  color: #57606a;
  margin: 0 0 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #edf1f5;
  display: flex;
  align-items: center;
  gap: 7px;
}

.archive-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #f0f3f5;
}

.archive-item:last-child {
  border-bottom: 0;
}

.archive-item-info {
  flex: 1;
  padding-right: 12px;
  min-width: 0;
}

.archive-item-title {
  display: block;
  font-size: 13px;
}

.archive-item-desc {
  display: block;
  font-size: 12px;
  color: #8b949e;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.archive-item-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.restore-btn {
  width: 26px;
  height: 26px;
  padding: 0;
  border-color: #c7d0d9;
  background: #fff;
  color: #53616f;
  font-size: 14px;
}

.restore-btn:hover {
  border-color: #1f6feb;
  background: #e6f0ff;
  color: #1f6feb;
}


.status-pill-todo {
  background: #f0f3f5;
  border-color: #d0d7de;
  color: #57606a;
}

.status-pill-today {
  background: #ddf4ff;
  border-color: #9dc5fb;
  color: #0550ae;
}

.status-pill-review {
  background: #fff8c5;
  border-color: #e8d44d;
  color: #7d5700;
}

.status-pill-done {
  background: #dafbe1;
  border-color: #b7efcb;
  color: #116329;
}

.agent-model {
  font-weight: 400;
  color: #57606a;
  font-size: 12px;
}

.reports {
  margin-top: 22px;
}

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

.report {
  background: #fff;
  border: 1px solid #dfe4ea;
  border-radius: 8px;
  padding: 12px;
}

.report strong,
.report span,
.report small {
  display: block;
}

.report span,
.report small {
  color: #53616f;
  font-size: 12px;
  margin-top: 4px;
}

.report pre {
  background: #f6f7f9;
  border: 1px solid #dfe4ea;
  border-radius: 6px;
  color: #354150;
  font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  margin: 10px 0 0;
  overflow-x: auto;
  padding: 10px;
  white-space: pre-wrap;
}

.block {
  border-left: 4px solid #1f6feb;
  background: #f6f9ff;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 6px;
}

.block strong {
  display: block;
  font-size: 13px;
}

.block span {
  display: block;
  color: #57606a;
  font-size: 12px;
  margin-top: 3px;
}

.block-badge {
  display: inline-block;
  margin-top: 5px;
  font-size: 11px;
  font-weight: 500;
  padding: 1px 7px;
  border-radius: 999px;
  background: #eef2f6;
  color: #57606a;
  border: 1px solid #d0d7de;
}

.block-badge-confirmed {
  background: #dafbe1;
  color: #116329;
  border-color: #b7efcb;
}

#add-project {
  background-color: #1f6feb;
  color: white;
}

.create-project-actions {
  width: 280px;
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  }

.footer_modal{
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 10px;
}

@media (max-width: 1237px) {
  .create-project-actions {
    width: 100%;
    justify-content: flex-start;
  }

}

@media (max-width: 1024px) {

.fields-bar {
    width: 100%;
    flex-wrap: wrap;
  }

  .layout {
    display: flex;
    flex-direction: column;
  }

  .planning {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .composer {
    grid-template-columns: minmax(0, 1fr) 100px 1fr auto;
  }

  #title {
    grid-column: 1 / -1;
  }

  .board {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

  .agenda {
    height: 300px;
    overflow-y: scroll;
  }

}

/* Loader overlay */
.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loader-content {
  background: #fff;
  border-radius: 12px;
  padding: 32px 48px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-width: 300px;
}

.loader-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #dfe4ea;
  border-top-color: #1f6feb;
  border-radius: 50%;
  animation: loader-spin 0.8s linear infinite;
}

@keyframes loader-spin {
  to { transform: rotate(360deg); }
}

.loader-message {
  font-size: 16px;
  font-weight: 500;
  color: #17202a;
}

.loader-progress {
  font-size: 14px;
  color: #57606a;
  text-align: center;
}

@media (max-width: 768px) {
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .board {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    overflow-x: auto;
  }

  .team,
  .burndown {
    min-height: 120px;
    
  }

  .column {
    min-height: 280px;
  }

  .dropzone {
    min-height: 220px;
  }




}

@media (max-width: 660px) {
  .composer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .agenda {
    min-height: 200px;
  }

  main {
    padding: 14px;
  }

  .project-bar {
    grid-template-columns: 1fr auto;
    /* display : block; */
    align-items: end;
  }

  .topbar {
    padding: 18px 16px;
    gap: 10px;
  }

  .actions {
    width: 100%;
    justify-content: flex-end;
  }

  /* .actions button {
    padding: 8px 6px;
    font-size: 12px;
    width: 145px !important;
    height: 40px !important;
  } */

  .create-project-field.open {
    display: block;
  }

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

  .topbar {
    padding: 18px 16px;
  }

  .board {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  }

  .create-project-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .burndown {
    height: 200px;
  }


}

@media (max-width: 540px) {

  button {
    width: 110px;
    height: 45px;

  }
}