@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  font-family: 'DM Sans', sans-serif;
  color: #20252d;
  background: #f4f5f7;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --muted: #8a909a;
  --line: #e9ebef;
  --purple: #6755d9;
  --purple-dark: #5141bf;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.app-shell { width: min(100% - 48px, 1320px); margin: 0 auto; padding: 56px 0 28px; }
.page-header { display: flex; align-items: center; gap: 11px; margin-bottom: 28px; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; color: white; background: linear-gradient(145deg, #806ef0, #5848c8); box-shadow: 0 6px 14px #6755d926; font-size: 21px; font-weight: 700; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: 'Manrope', sans-serif; letter-spacing: -.035em; }
h1 { font-size: 32px; line-height: 1.2; }
h2 { font-size: 21px; line-height: 1.3; }
.eyebrow { color: #969ba5; font-size: 10px; font-weight: 700; letter-spacing: .14em; margin-bottom: 5px; }
.subtitle { margin-top: 5px; color: var(--muted); font-size: 14px; }
.panel { background: #fff; border: 1px solid #eceef1; border-radius: 17px; box-shadow: 0 8px 28px #1e293b08; }
.composer { padding: 25px 27px 26px; }
.section-heading { margin-bottom: 20px; }
.task-form { display: grid; grid-template-columns: minmax(220px, 1.7fr) minmax(145px, .85fr) minmax(135px, .75fr) auto; align-items: end; gap: 13px; }
.image-field { display: grid; justify-items: start; gap: 8px; }
.task-form .image-field { grid-column: 1 / 4; grid-row: 2; }
.field-label { color: #676d77; font-size: 12px; font-weight: 600; }
.optional-label { margin-left: 4px; color: #a1a5ad; font-size: 10px; font-weight: 400; }
.file-picker { min-height: 36px; padding: 0 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
.visually-hidden:focus-visible + .file-picker { outline: 3px solid #6755d955; outline-offset: 2px; }
.form-image-preview { display: flex; align-items: center; gap: 10px; }
.form-image-preview[hidden] { display: none; }
.form-image-preview img { width: 54px; height: 54px; object-fit: cover; border: 1px solid var(--line); border-radius: 8px; }
.remove-image-button { padding: 0; color: #c84747; background: none; border: 0; font-size: 11px; cursor: pointer; }
.remove-image-button:hover { text-decoration: underline; }
.field { display: grid; gap: 8px; color: #676d77; font-size: 12px; font-weight: 600; }
.field input, .field select { width: 100%; height: 44px; padding: 0 12px; color: #272c35; background: #fff; border: 1px solid #e4e6eb; border-radius: 9px; outline: none; transition: border-color .15s, box-shadow .15s; }
.field input::placeholder { color: #b0b4bc; }
.field input:focus, .field select:focus { border-color: #8d80ea; box-shadow: 0 0 0 3px #6755d91a; }
.button { display: inline-flex; min-height: 43px; align-items: center; justify-content: center; gap: 7px; padding: 0 16px; border: 0; border-radius: 9px; font-size: 12px; font-weight: 700; transition: background .15s, transform .15s; white-space: nowrap; }
.button:active { transform: translateY(1px); }
.button-primary { color: white; background: var(--purple); box-shadow: 0 5px 12px #6755d926; }
.button-primary:hover { background: var(--purple-dark); }
.add-button { height: 44px; }
.add-button span { font-size: 18px; font-weight: 400; }
.workspace-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: start; gap: 23px; margin-top: 27px; }
.boards-sidebar { min-width: 0; padding: 13px 9px; background: #eef0f4; border: 1px solid #e7e9ee; border-radius: 14px; }
.boards-sidebar-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 5px 8px 8px; }
.boards-sidebar-heading .eyebrow { margin: 0; font-size: 9px; }
.add-board-button { width: 28px; height: 28px; color: #6755d9; background: #fff; font-size: 19px; }
.add-board-button:hover { color: white; background: var(--purple); }
.board-list { display: grid; gap: 4px; }
.board-nav-item { display: flex; align-items: center; min-width: 0; padding: 3px; border: 1px solid transparent; border-radius: 10px; }
.board-nav-item.is-active { background: #fff; border-color: #e7e8ed; box-shadow: 0 3px 10px #1e293b08; }
.board-select { display: flex; align-items: center; gap: 5px; min-width: 0; flex: 1; padding: 7px 6px; overflow: hidden; color: #606671; background: transparent; border: 0; border-radius: 6px; font-size: 12px; font-weight: 600; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.board-nav-item.is-active .board-select { color: #5141bf; }
.board-nav-emoji { flex: 0 0 20px; font-size: 15px; text-align: center; }
.board-nav-title { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.board-nav-controls { display: flex; flex: 0 0 auto; }
.board-nav-controls .icon-button { width: 25px; height: 27px; font-size: 14px; }
.list-section { min-width: 0; margin-top: 0; }
.list-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 15px; }
.list-heading h2 { display: flex; align-items: center; gap: 10px; }
.count-badge { display: inline-grid; place-items: center; min-width: 25px; height: 25px; padding: 0 7px; border-radius: 99px; color: #6755d9; background: #ece9ff; font: 700 11px 'DM Sans', sans-serif; letter-spacing: 0; }
.sort-note { display: flex; align-items: center; gap: 7px; padding-bottom: 3px; color: #9297a0; font-size: 11px; }
.sort-icon { font-size: 16px; }
.add-column-button { min-height: 38px; }
.add-task-to-column { width: 100%; min-height: 37px; justify-content: flex-start; padding-left: 11px; color: #737986; background: transparent; border: 1px dashed #d1d4dc; box-shadow: none; }
.add-task-to-column:hover { color: #5141bf; background: #fff; border-color: #a49ae9; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(265px, 1fr); align-items: start; gap: 15px; overflow-x: auto; padding: 0 2px 12px; }
.board-column { min-width: 0; min-height: 280px; padding: 13px; background: #eef0f4; border: 1px solid #e7e9ee; border-radius: 14px; transition: background .15s, border-color .15s; }
.board-column.is-drag-over { background: #eeecff; border-color: #8d80ea; }
.column-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 33px; margin-bottom: 12px; }
.column-title-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.column-title-line h3 { overflow: hidden; color: #454a54; font-size: 13px; font-weight: 700; letter-spacing: 0; text-overflow: ellipsis; white-space: nowrap; }
.column-count { display: grid; flex: 0 0 auto; min-width: 21px; height: 21px; place-items: center; padding: 0 6px; border-radius: 99px; color: #737986; background: #dfe2e8; font-size: 10px; font-weight: 700; }
.column-controls { display: flex; }
.column-controls .icon-button { width: 29px; height: 29px; }
.column-body { display: grid; min-height: 210px; align-content: start; gap: 9px; padding: 1px; border-radius: 10px; }
.column-drop-hint { display: grid; min-height: 100px; place-items: center; color: #a0a4ad; border: 1px dashed #d3d6de; border-radius: 10px; font-size: 11px; }
.task-list { display: grid; gap: 0; }
.task-group { min-width: 0; }
.task-group + .task-group { margin-top: 25px; padding-top: 21px; border-top: 1px solid #dedfe5; }
.task-group-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; }
.task-group-heading h3 { color: #555b66; font-size: 13px; font-weight: 700; letter-spacing: 0; }
.group-count { display: grid; min-width: 21px; height: 21px; place-items: center; padding: 0 6px; border-radius: 99px; color: #737986; background: #e9eaee; font-size: 10px; font-weight: 700; }
.task-group[data-priority="high"] .group-count { color: #cf5858; background: #fff0ef; }
.task-group[data-priority="medium"] .group-count { color: #a97824; background: #fff7e8; }
.task-group[data-priority="low"] .group-count { color: #498c6c; background: #eaf7ef; }
.task-group-body { display: grid; min-height: 24px; gap: 10px; padding: 2px; border: 1px solid transparent; border-radius: 15px; transition: background .15s, border-color .15s; }
.drop-group .task-group-body { padding: 5px; margin: -3px; }
.drop-group.is-drag-over .task-group-body { background: #efedff; border: 1px dashed #8d80ea; }
.drop-hint { display: grid; min-height: 54px; place-items: center; color: #a0a4ad; font-size: 11px; }
.overdue-group .task-group-heading h3 { color: #c94d4d; }
.overdue-group .group-count { color: #c94d4d; background: #fff0ef; }
.task-card { display: flex; align-items: center; gap: 10px; min-height: 84px; padding: 12px; background: #fff; border: 1px solid #eceef1; border-radius: 11px; box-shadow: 0 4px 15px #1e293b06; transition: border-color .15s, transform .15s, box-shadow .15s; }
.task-card:hover { transform: translateY(-1px); border-color: #d9d5f6; box-shadow: 0 7px 20px #1e293b0c; }
.task-card.is-draggable { cursor: grab; }
.task-card.is-draggable .task-check, .task-card.is-draggable .task-actions { cursor: auto; }
.task-card.is-dragging { opacity: .42; cursor: grabbing; }
.task-card.is-completed { background: #f0f1f3; border-color: #e7e8eb; box-shadow: none; }
.task-card.is-completed .task-title { color: #9297a0; text-decoration: line-through; text-decoration-color: #b8bbc1; }
.task-card.is-completed .task-meta { color: #a5a9b0; }
.task-check { appearance: none; flex: 0 0 20px; width: 20px; height: 20px; margin: 0; border: 1.5px solid #c8cbd2; border-radius: 7px; background: #fff; cursor: pointer; transition: .15s; }
.task-check:checked { border-color: #a6a9b0; background: #a6a9b0; }
.task-check:checked::after { content: '✓'; display: block; color: #fff; text-align: center; line-height: 17px; font-size: 13px; font-weight: 700; }
.task-check:focus-visible, button:focus-visible { outline: 3px solid #6755d955; outline-offset: 2px; }
.task-main { min-width: 0; flex: 1; }
.task-card-content { display: flex; min-width: 0; flex: 1; align-items: center; gap: 15px; }
.task-card-content .task-main { flex: 1; }
.task-thumbnail-button { flex: 0 0 auto; width: 64px; height: 54px; padding: 0; overflow: hidden; background: transparent; border: 0; border-radius: 8px; }
.task-thumbnail-button[hidden] { display: none; }
.task-thumbnail { display: block; width: 100%; height: 100%; object-fit: cover; border: 1px solid #e5e6ea; border-radius: inherit; }
.task-thumbnail-button:hover .task-thumbnail { filter: brightness(.9); }
.task-title { overflow-wrap: anywhere; font-size: 14px; font-weight: 600; }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 8px; color: #9398a1; font-size: 11px; }
.meta-date { display: inline-flex; align-items: center; gap: 5px; }
.meta-date svg { width: 13px; height: 13px; }
.overdue-text { color: #d25151; font-weight: 700; }
.priority { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 99px; font-size: 10px; font-weight: 700; }
.priority::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.priority-high { color: #cf5858; background: #fff0ef; }
.priority-medium { color: #bb852d; background: #fff7e8; }
.priority-low { color: #498c6c; background: #eaf7ef; }
.is-completed .priority { opacity: .6; }
.task-actions { display: flex; gap: 4px; }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; color: #9297a0; background: transparent; border: 0; border-radius: 8px; font-size: 17px; }
.icon-button:hover { color: #5141bf; background: #f2f0ff; }
.delete-button:hover { color: #c84747; background: #fff0ef; }
.empty-state { display: grid; justify-items: center; padding: 41px 20px; text-align: center; }
.empty-state[hidden] { display: none; }
.empty-icon { display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: 12px; border-radius: 14px; color: #6755d9; background: #f0edff; font-size: 21px; }
.empty-state h3 { font-size: 16px; }
.empty-state p { margin-top: 7px; color: var(--muted); font-size: 12px; }
.page-footer { margin-top: 24px; color: #a2a6ae; font-size: 11px; text-align: center; }
.edit-dialog { width: min(100% - 32px, 480px); padding: 0; border: 0; border-radius: 16px; box-shadow: 0 24px 70px #15192730; }
.edit-dialog::backdrop { background: #17192766; backdrop-filter: blur(3px); }
.dialog-form { display: grid; gap: 18px; padding: 25px; }
.emoji-picker-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.emoji-picker-field legend { margin-bottom: 9px; color: #676d77; font-size: 12px; font-weight: 600; }
.emoji-picker { display: grid; grid-template-columns: repeat(8, 38px); gap: 7px; }
.emoji-option { display: grid; width: 38px; height: 38px; place-items: center; padding: 0; background: #f5f6f8; border: 1px solid transparent; border-radius: 9px; font-size: 20px; transition: background .15s, border-color .15s, transform .15s; }
.emoji-option:hover { background: #eeecff; transform: translateY(-1px); }
.emoji-option.is-selected { background: #eeecff; border-color: #8d80ea; box-shadow: 0 0 0 2px #6755d91a; }
.current-board-emoji { font-family: 'DM Sans', sans-serif; font-size: .85em; letter-spacing: 0; }
.task-dialog { width: min(100% - 32px, 850px); padding: 0; overflow: visible; background: #fff; }
.task-dialog .composer { padding: 27px; background: #fff; border: 0; border-radius: 16px; box-shadow: none; }
.task-dialog .dialog-heading { margin-bottom: 10px; }
.task-dialog .task-form { margin-top: 17px; }
.modal-context { margin-top: -6px; color: #8a909a; font-size: 12px; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; margin-bottom: 2px; }
.dialog-heading h2 { font-size: 20px; }
.close-button { margin-top: -5px; font-size: 24px; }
.dialog-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.dialog-actions { display: flex; justify-content: end; gap: 9px; margin-top: 4px; }
.button-secondary { color: #646a74; background: #f1f2f4; }
.button-secondary:hover { background: #e8e9ec; }
.button-danger { color: #bf4444; background: #fff0ef; }
.button-danger:hover { background: #ffe3e1; }
.form-error { color: #bf4444; font-size: 12px; }
.form-error[hidden] { display: none; }
.column-dialog-actions { align-items: center; }
.dialog-action-spacer { flex: 1; }
.image-dialog { position: relative; max-width: min(92vw, 1100px); max-height: 90vh; padding: 38px 12px 12px; overflow: visible; background: #171820; border: 0; border-radius: 12px; }
.image-dialog::backdrop { background: #11131dcc; backdrop-filter: blur(3px); }
.image-dialog img { display: block; max-width: calc(92vw - 24px); max-height: calc(90vh - 62px); object-fit: contain; border-radius: 5px; }
.image-dialog-close { position: absolute; z-index: 1; top: 4px; right: 5px; color: #fff; font-size: 25px; }
.image-dialog-close:hover { color: #fff; background: #ffffff22; }

[hidden] { display: none !important; }
.auth-view { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.auth-card { width: min(100%, 430px); padding: 30px; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.auth-brand h1 { font-size: 27px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin-bottom: 22px; background: #f1f2f4; border-radius: 10px; }
.auth-tab { min-height: 38px; color: #737986; background: transparent; border: 0; border-radius: 7px; font-size: 12px; font-weight: 700; }
.auth-tab.is-active { color: #5141bf; background: #fff; box-shadow: 0 2px 7px #1e293b10; }
.auth-form { display: grid; gap: 15px; }
.auth-form h2 { margin-bottom: 2px; }
.auth-form .button { width: 100%; margin-top: 3px; }
.auth-form small { color: var(--muted); font-weight: 400; }
.auth-footnote { margin-top: 20px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.page-header { position: relative; }
.account-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.account-email { color: #737986; font-size: 12px; }
.board-actions { display: flex; align-items: center; gap: 8px; }
.member-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); color: #535965; font-size: 12px; }
.member-row .button { min-height: 32px; padding: 0 10px; font-size: 11px; }
.member-suggestions { display: grid; gap: 4px; max-height: 190px; overflow: auto; padding: 5px; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.member-suggestions[hidden] { display: none; }
.member-suggestion { padding: 9px; color: #535965; background: #fff; border: 0; border-radius: 6px; text-align: left; font-size: 12px; }
.member-suggestion:hover { background: #f2f0ff; }
.history-list { display: grid; gap: 0; max-height: min(55vh, 500px); overflow: auto; }
.history-item { display: grid; gap: 5px; padding: 12px 0; border-bottom: 1px solid var(--line); color: #555b66; font-size: 12px; }
.history-item span, .history-item time { color: var(--muted); font-size: 11px; }
.task-assignee { padding: 3px 7px; background: #f0edff; border-radius: 99px; color: #6254bd; }
.task-actions { flex: 0 0 auto; }
.task-actions .icon-button { width: 29px; height: 29px; }
.account-actions .button { min-height: 36px; }
.board-actions .button { min-height: 38px; }

@media (max-width: 760px) {
  .app-shell { width: min(100% - 32px, 600px); padding-top: 35px; }
  .workspace-layout { grid-template-columns: minmax(0, 1fr); gap: 17px; margin-top: 22px; }
  .boards-sidebar { padding: 9px 10px; }
  .boards-sidebar-heading { padding-bottom: 5px; }
  .board-list { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
  .board-nav-item { flex: 0 0 auto; max-width: 230px; }
  .board-nav-controls .icon-button { width: 25px; }
  .task-form { grid-template-columns: 1fr 1fr; }
  .title-field { grid-column: 1 / -1; }
  .task-form .image-field { grid-column: 1 / -1; grid-row: auto; }
  .add-button { grid-column: 1 / -1; grid-row: auto; align-self: end; }
  .board { grid-auto-columns: minmax(260px, 78vw); }
  .list-heading { align-items: center; }
}
@media (max-width: 480px) {
  .app-shell { width: calc(100% - 28px); padding-top: 27px; }
  .workspace-layout { gap: 13px; margin-top: 19px; }
  .page-header { gap: 9px; margin-bottom: 23px; }
  .page-header { flex-wrap: wrap; }
  .account-actions { width: 100%; justify-content: flex-end; }
  .board-actions { flex-wrap: wrap; justify-content: flex-end; }
  .brand-mark { width: 36px; height: 36px; border-radius: 11px; font-size: 19px; }
  h1 { font-size: 27px; }
  .composer { padding: 20px 17px; }
  .task-form { grid-template-columns: 1fr; }
  .title-field { grid-column: auto; }
  .task-form .image-field, .add-button { grid-column: 1; grid-row: auto; }
  .add-button { width: 100%; }
  .list-heading { align-items: start; flex-direction: column; gap: 8px; }
  .sort-note { font-size: 10px; }
  .task-card { gap: 11px; padding: 14px 12px; }
  .add-column-button { align-self: stretch; }
  .task-card-content { gap: 8px; }
  .task-thumbnail-button { width: 52px; height: 48px; }
  .task-title { font-size: 13px; }
  .task-actions { gap: 0; }
  .icon-button { width: 30px; }
  .dialog-form { padding: 20px; }
  .emoji-picker { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 5px; }
  .emoji-option { width: 100%; height: 34px; font-size: 18px; }
  .task-dialog .composer { padding: 20px; }
}
