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

:root {
  --blue: #168ee1;
  --blue-dark: #0b6fbc;
  --blue-soft: rgba(22, 142, 225, .14);
  --orange: #168ee1;
  --orange-soft: rgba(22, 142, 225, .12);
  --navy: #f7f9ff;
  --text: #e7ecf8;
  --muted: #8490ad;
  --line: #202b4a;
  --surface: #0b132b;
  --surface-raised: #101a35;
  --background: #050a1d;
  --green: #59d7a0;
  --green-soft: rgba(89, 215, 160, .12);
  --yellow: #f0c96a;
  --yellow-soft: rgba(240, 201, 106, .12);
  --red: #ff7380;
  --red-soft: rgba(255, 115, 128, .12);
  --shadow: 0 22px 56px rgba(0, 0, 0, .26);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--background); color: var(--text); font-family: Montserrat, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
.is-hidden { display: none !important; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(47,88,181,.20); outline-offset: 2px; }
select option { background: #f8fafc; color: #0a1630; font-weight: 600; }
select option:checked { background: #c7e3fa; color: #07162d; }

.app-header { height: 76px; background: #070d20; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.header-inner { height: 100%; max-width: 1280px; margin: 0 auto; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 12px; }
.brand-logo { display: block; width: 178px; height: auto; filter: brightness(0) invert(1); }
.product-name { border-left: 1px solid var(--line); color: var(--muted); padding-left: 14px; margin-left: 6px; font-size: 14px; font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: 9px; }
.header-actions .people { margin-right: 13px; }
.people { display: flex; align-items: center; }
.person-avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: white; font-size: 10px; font-weight: 800; border: 2px solid var(--background); }
.person-avatar + .person-avatar { margin-left: -7px; }
.person-avatar.timon { background: var(--blue); }
.person-avatar.sebastian { background: #2655a8; }
.people-label { margin-left: 10px; color: var(--muted); font-size: 13px; font-weight: 600; }
.button { min-height: 40px; border: 1px solid #2a3857; background: #10182d; color: var(--text); border-radius: 7px; padding: 0 16px; font-weight: 700; font-size: 13px; transition: border-color .14s ease, background .14s ease; }
.button:hover { border-color: #496080; background: #141f38; }
.button-primary { background: #168ee1; color: white; border-color: #168ee1; }
.button-primary:hover { background: #0d7dcb; border-color: #0d7dcb; }
.button-quiet { border-color: transparent; background: transparent; color: #aeb9cd; }
.button-quiet:hover { background: #111a2e; border-color: #263651; color: white; }
.button-danger { color: var(--red); border-color: #f0cbd0; background: var(--red-soft); }
.account-button { min-height: 40px; display: flex; align-items: center; gap: 8px; border: 1px solid #2a3857; border-radius: 7px; background: #0e172a; padding: 0 10px 0 7px; color: #dce4f0; }
.account-button span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: #168ee1; color: white; font-size: 9px; font-weight: 800; }
.account-button b { max-width: 105px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.main { max-width: 1280px; margin: 0 auto; padding: 46px 28px 80px; }
.page-title { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 29px; }
.eyebrow { margin: 0 0 8px; color: #42aaf0; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
h1 { margin: 0; font-size: clamp(34px, 4vw, 48px); line-height: 1; color: var(--navy); letter-spacing: -.035em; font-weight: 650; }
.subtitle { margin: 10px 0 0; color: var(--muted); font-size: 15px; }
.today { color: var(--muted); font-size: 13px; margin: 0 0 4px; }

.status-overview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.status-card { min-width: 0; text-align: left; background: #0d162b; border: 1px solid var(--line); border-radius: 9px; padding: 17px 18px 15px; transition: border-color .14s ease, background .14s ease; }
.status-card:hover { border-color: #354563; background: #101a30; }
.status-card.is-active { border-color: #168ee1; box-shadow: inset 0 -2px 0 #168ee1; }
.status-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 700; }
.status-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; font-weight: 800; }
.status-icon.all { background: var(--blue-soft); color: var(--blue); }
.status-icon.open { background: rgba(255,255,255,.06); color: #a7b0c8; }
.status-icon.progress { background: var(--orange-soft); color: var(--orange); }
.status-icon.waiting { background: var(--yellow-soft); color: var(--yellow); }
.status-card strong { display: block; color: var(--navy); font-size: 28px; line-height: 1; margin-top: 14px; letter-spacing: -.03em; }
.status-card small { display: block; color: #939aae; font-size: 11px; margin-top: 5px; }

.quick-add { display: grid; grid-template-columns: 36px minmax(170px, 1fr) 110px 138px 156px 110px auto; align-items: center; gap: 8px; padding: 12px; border-radius: 9px; background: #0e182e; border: 1px solid #26375f; margin-bottom: 20px; }
.quick-icon { width: 34px; height: 34px; display: grid; place-items: center; color: #69b9ef; border-radius: 7px; font-size: 22px; }
.quick-add > input { height: 42px; border: 1px solid #2a3a5e; border-radius: 8px; padding: 0 14px; color: var(--text); background: #070e24; min-width: 0; }
.quick-add > input::placeholder { color: #8a92a7; }
.quick-field { height: 42px; display: flex; flex-direction: column; justify-content: center; background: #070e24; border: 1px solid #2a3a5e; border-radius: 8px; padding: 4px 10px; min-width: 0; }
.quick-field span { color: #9ba6ba; font-size: 10px; line-height: 1.1; font-weight: 700; }
.quick-field select, .quick-field input { width: 100%; min-width: 0; border: 0; color: #f4f7fc; background: transparent; font-weight: 700; font-size: 13px; outline: 0; padding: 1px 0 0; color-scheme: dark; }
.quick-field select { padding-right: 18px; }
.quick-date-field { min-width: 148px; }
.quick-submit { height: 42px; }

.task-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.toolbar { min-height: 67px; padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.toolbar-actions { display: flex; align-items: center; gap: 8px; }
.sort-control { height: 38px; display: flex; align-items: center; gap: 6px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: #080f25; }
.sort-control span { color: #8b97ad; font-size: 10px; font-weight: 700; }
.sort-control select { border: 0; outline: 0; background: transparent; color: #e5ebf5; font-size: 12px; font-weight: 700; }
.view-tabs { display: flex; align-items: center; gap: 4px; overflow-x: auto; }
.view-tab { white-space: nowrap; height: 36px; padding: 0 13px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; }
.view-tab:hover { background: rgba(255,255,255,.04); color: var(--text); }
.view-tab.is-active { background: var(--blue-soft); color: var(--blue); }
.search { width: 210px; height: 38px; border: 1px solid var(--line); border-radius: 8px; display: flex; align-items: center; gap: 8px; padding: 0 11px; flex: 0 0 auto; background: #080f25; }
.search span { font-size: 20px; line-height: 1; color: #98a0b1; transform: translateY(-1px); }
.search input { width: 100%; border: 0; outline: 0; font-size: 12px; color: var(--text); background: transparent; }
.list-head, .task-row { display: grid; grid-template-columns: minmax(300px, 1fr) 160px 140px 115px 30px; gap: 14px; align-items: center; }
.list-head { min-height: 42px; padding: 0 18px; background: #080f24; color: #6f7c9d; border-bottom: 1px solid var(--line); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.task-row { min-height: 78px; padding: 11px 18px; border-bottom: 1px solid var(--line); transition: background .13s ease; }
.task-row:last-child { border-bottom: 0; }
.task-row:hover { background: rgba(255,255,255,.022); }
.task-main { min-width: 0; cursor: pointer; }
.task-title { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--navy); font-size: 14px; font-weight: 750; }
.task-title .task-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.type-badge, .priority-badge { flex: 0 0 auto; border-radius: 4px; padding: 3px 6px; font-size: 8px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.type-badge { background: rgba(168,141,255,.14); color: #b4a3ff; }
.priority-badge.hoch { background: var(--red-soft); color: var(--red); }
.priority-badge.mittel { background: var(--yellow-soft); color: var(--yellow); }
.priority-badge.niedrig { background: rgba(255,255,255,.06); color: #8490a9; }
.reminder-inline { color: #f2ba62; font-weight: 750; }
.task-description { margin-top: 5px; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-quality { display: flex; align-items: center; gap: 7px; margin-top: 7px; color: #7f8baa; font-size: 10px; font-weight: 650; }
.quality-mini-track { width: 58px; height: 4px; overflow: hidden; border-radius: 99px; background: #202b47; }
.quality-mini-track i { display: block; height: 100%; border-radius: inherit; background: #168ee1; }
.task-quality.is-complete { color: var(--green); }
.task-quality.is-empty { color: #6b7693; }
.overdue-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); flex: 0 0 auto; }
.status-select, .owner-select { height: 36px; border-radius: 7px; border: 1px solid #2a3855; padding: 0 30px 0 11px; font-size: 12px; font-weight: 700; outline: 0; max-width: 100%; }
.status-select.offen { background: rgba(255,255,255,.07); color: #aab4cb; }
.status-select.arbeit { background: var(--blue-soft); color: #6dbdf4; }
.status-select.wartet { background: var(--yellow-soft); color: var(--yellow); }
.status-select.erledigt { background: var(--green-soft); color: var(--green); }
.owner-wrap { display: flex; align-items: center; gap: 7px; min-width: 0; }
.owner-avatar { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; color: white; font-size: 9px; font-weight: 800; flex: 0 0 auto; }
.owner-avatar.timon { background: var(--blue); }
.owner-avatar.sebastian { background: var(--orange); }
.owner-select { background: #0a1225; color: var(--text); padding-left: 9px; }
.due { color: var(--muted); font-size: 12px; }
.due.is-late { color: var(--red); font-weight: 700; }
.more { width: 29px; height: 29px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: #9198aa; font-size: 20px; }
.more:hover { background: rgba(255,255,255,.05); color: var(--navy); }
.empty { padding: 70px 24px; text-align: center; color: var(--muted); }
.empty-icon { width: 44px; height: 44px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 22px; }
.empty strong { display: block; color: var(--navy); margin-bottom: 5px; }

.modal-layer { position: fixed; inset: 0; z-index: 30; pointer-events: none; }
.modal-layer.is-open { pointer-events: auto; }
.modal-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(2,6,20,.72); opacity: 0; transition: .22s ease; backdrop-filter: blur(4px); }
.modal { position: absolute; right: 0; top: 0; bottom: 0; width: min(960px, 100%); overflow-y: auto; background: #081024; border: 0; border-left: 1px solid #263452; box-shadow: -28px 0 70px rgba(0,0,0,.38); padding: 26px 32px 32px; opacity: 1; transform: translateX(102%); transition: transform .26s cubic-bezier(.2,.8,.2,1); }
.modal-layer.is-open .modal-backdrop { opacity: 1; }
.modal-layer.is-open .modal { transform: translateX(0); }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.drawer-head > div { display: flex; align-items: center; gap: 12px; }
.project-label { color: #54b6f7; font-size: 11px; font-weight: 750; }
.autosave { display: inline-flex; align-items: center; gap: 5px; color: #8794ad; font-size: 11px; font-weight: 650; transition: color .2s ease; }
.autosave i { width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); font-style: normal; font-size: 8px; }
.autosave.is-saving { color: #59b8f5; }
.icon-button { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: #8e99b4; font-size: 21px; line-height: 1; }
.icon-button:hover { color: white; border-color: #3b4b70; }
.drawer-title { display: block; width: min(720px, calc(100% - 48px)); min-height: 72px; resize: none; overflow: hidden; border: 0; border-bottom: 1px solid transparent; outline: 0; background: transparent; color: white; padding: 0 0 8px; font: inherit; font-size: 29px; line-height: 1.15; font-weight: 800; letter-spacing: -.035em; }
.drawer-title:hover, .drawer-title:focus { border-bottom-color: #2a3a61; }
.meta-strip { display: grid; grid-template-columns: 120px 135px 135px 145px 120px; gap: 7px; margin-top: 8px; }
.meta-strip label { min-width: 0; padding: 8px 10px 7px; border: 1px solid #202e50; border-radius: 9px; background: #0d1730; }
.meta-strip label > span { display: block; color: #8996ae; margin-bottom: 3px; font-size: 10px; font-weight: 700; }
.meta-strip select, .meta-strip input { width: 100%; min-width: 0; border: 0; outline: 0; padding: 1px 0 0; background: transparent; color: #f2f5fa; font-size: 13px; font-weight: 700; color-scheme: dark; }
.meta-strip select { padding-right: 18px; }
.question-panel { display: none; margin: 18px 0 0; padding: 17px 18px; border: 1px solid rgba(240,201,106,.32); border-radius: 8px; background: #12182b; }
.question-panel.is-visible { display: block; }
.question-recipient-label { flex: 0 0 auto; border-radius: 99px; background: var(--yellow-soft); color: var(--yellow); padding: 5px 8px; font-size: 8px; font-weight: 800; }
.question-meta-row { display: grid; grid-template-columns: 130px 1fr; gap: 10px; }
.resolve-question { margin-top: 12px; border: 1px solid rgba(89,215,160,.34); border-radius: 8px; background: var(--green-soft); color: var(--green); padding: 9px 11px; font-size: 9px; font-weight: 800; }
.modal.is-question .project-progress, .modal.is-question .plan-section, .modal.is-question .requirements-focus, .modal.is-question .completion-log-card, .modal.is-question .completion-rule { display: none; }
.modal.is-question .project-layout { margin-top: 18px; }
.project-progress { display: grid; grid-template-columns: 175px minmax(180px, 1fr) auto; align-items: center; gap: 14px; margin: 22px 0; padding: 13px 15px; border: 1px solid #263652; border-radius: 8px; background: #0d172d; }
.progress-copy { display: flex; align-items: baseline; justify-content: flex-start; gap: 12px; }
.progress-copy span { color: #7482a1; font-size: 9px; font-weight: 750; text-transform: uppercase; }
.progress-copy strong { color: white; font-size: 17px; }
.project-progress-track { height: 7px; overflow: hidden; border-radius: 99px; background: #1a2744; }
.project-progress-track i { display: block; height: 100%; width: 0; border-radius: inherit; background: #168ee1; transition: width .22s ease; }
.progress-caption { color: #72809e; font-size: 9px; white-space: nowrap; }
.project-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr); align-items: start; gap: 18px; }
.project-main, .project-side { display: grid; gap: 16px; }
.project-card, .project-section { border: 1px solid #26334d; border-radius: 8px; background: #0a142a; padding: 18px; }
.project-section { background: #091226; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.section-kicker { display: block; margin-bottom: 4px; color: #58afe9; font-size: 10px; font-weight: 750; }
.section-head h2 { margin: 0; color: white; font-size: 16px; line-height: 1.2; letter-spacing: -.02em; }
.section-count { flex: 0 0 auto; color: #76bde9; font-size: 11px; font-weight: 700; }
.section-help { margin: 7px 0 13px; color: #8d99af; font-size: 12px; line-height: 1.5; }
.project-field { display: block; margin-top: 14px; }
.project-field > span { display: block; margin-bottom: 6px; color: #98a3b7; font-size: 11px; font-weight: 700; }
.project-field input, .project-field textarea, .project-field select { width: 100%; border: 1px solid #33425f; border-radius: 7px; outline: 0; background: #070e21; color: #f0f4fb; padding: 10px 11px; font-size: 13px; line-height: 1.5; }
.project-field textarea { resize: vertical; }
.project-field input:focus, .project-field textarea:focus, .project-field select:focus { border-color: #168ee1; }
.next-step-field input { border-color: #285b86; background: #081a31; color: #eef8ff; font-weight: 650; }
.plan-add { display: grid; grid-template-columns: minmax(0,1fr) 92px 150px 38px; gap: 6px; margin-bottom: 10px; }
.plan-add input, .plan-add select, .requirement-add input { min-width: 0; height: 41px; border: 1px solid #33425f; border-radius: 7px; outline: 0; padding: 0 10px; background: #070e22; color: #f0f4fb; font-size: 12px; }
.plan-add input[type="date"] { color-scheme: dark; }
.plan-add input:focus, .plan-add select:focus, .requirement-add input:focus { border-color: #168ee1; }
.small-add-button { width: 41px; height: 41px; border: 1px solid #168ee1; border-radius: 7px; background: #168ee1; color: white; font-size: 18px; font-weight: 700; }
.milestone-list, .requirement-list { display: grid; gap: 6px; }
.milestone-item { display: grid; grid-template-columns: 21px minmax(0,1fr) 26px; gap: 8px; align-items: center; min-height: 47px; padding: 6px 6px 6px 9px; border: 1px solid #202e4d; border-radius: 8px; background: #0b142b; }
.milestone-check, .requirement-check { width: 17px; height: 17px; margin: 0; accent-color: var(--blue); }
.milestone-copy { min-width: 0; }
.milestone-copy > span { display: block; color: #e1e7f1; font-size: 13px; line-height: 1.4; }
.milestone-copy small { display: flex; align-items: center; gap: 5px; margin-top: 4px; color: #8591a8; font-size: 10px; }
.milestone-copy small b { color: #7fbfe9; font-weight: 700; }
.milestone-copy small i { font-style: normal; }
.milestone-item.is-done .milestone-copy > span { color: #687593; text-decoration: line-through; }
.milestone-remove, .requirement-remove { width: 25px; height: 25px; border: 0; border-radius: 6px; background: transparent; color: #65708c; font-size: 16px; }
.milestone-remove:hover, .requirement-remove:hover { background: var(--red-soft); color: var(--red); }
.milestone-empty, .requirement-empty { padding: 17px 12px; border: 1px dashed #2a395b; border-radius: 8px; color: #727e9b; text-align: center; font-size: 9px; line-height: 1.45; }
.milestone-empty strong, .milestone-empty span { display: block; }
.milestone-empty strong { color: #9ba8c1; margin-bottom: 3px; }
.requirement-add { display: grid; grid-template-columns: minmax(0,1fr) 38px; gap: 6px; margin-bottom: 10px; }
.requirement-item { display: grid; grid-template-columns: 21px minmax(0,1fr) 26px; gap: 8px; align-items: center; min-height: 41px; padding: 5px 6px 5px 9px; border: 1px solid #202e4d; border-radius: 8px; background: #0b142b; }
.requirement-text { color: #dce3f1; font-size: 13px; line-height: 1.4; }
.requirement-item.is-done .requirement-text { color: #687593; text-decoration: line-through; }
.completion-count { flex: 0 0 auto; border-radius: 5px; background: var(--green-soft); color: var(--green); padding: 5px 8px; font-size: 10px; font-weight: 800; }
.daily-completion-list { display: grid; gap: 15px; margin-top: 4px; }
.completion-day { position: relative; }
.completion-day h3 { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 7px; color: #eef4ff; font-size: 12px; line-height: 1.3; text-transform: capitalize; }
.completion-day h3 span { color: #7f8ba3; font-size: 9px; font-weight: 700; text-transform: none; }
.completion-day-entries { display: grid; gap: 6px; }
.completion-entry { display: grid; grid-template-columns: 24px minmax(0,1fr) auto; align-items: center; gap: 8px; min-height: 48px; padding: 8px 9px; border: 1px solid rgba(89,215,160,.2); border-radius: 9px; background: rgba(89,215,160,.055); }
.completion-icon { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 11px; font-weight: 900; }
.completion-entry > div { min-width: 0; }
.completion-entry strong { display: block; color: #dce5f3; font-size: 12px; line-height: 1.4; }
.completion-entry small { display: block; margin-top: 3px; color: #8793aa; font-size: 9px; }
.completion-status { border-radius: 4px; background: var(--green-soft); color: var(--green); padding: 4px 6px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.completion-entry.is-reopened { border-color: rgba(240,201,106,.22); background: rgba(240,201,106,.055); }
.completion-entry.is-reopened .completion-icon, .completion-entry.is-reopened .completion-status { background: var(--yellow-soft); color: var(--yellow); }
.completion-day.is-undated h3 { color: #9ba8be; }
.completion-entry.is-undated { border-color: #24324e; background: #0a1327; }
.completion-entry.is-undated .completion-icon, .completion-entry.is-undated .completion-status { background: rgba(255,255,255,.055); color: #8a97b0; }
.completion-empty { display: grid; justify-items: center; gap: 5px; padding: 22px 14px; border: 1px dashed #2b3958; border-radius: 9px; text-align: center; }
.completion-empty > span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: #142039; color: #71809d; }
.completion-empty strong { color: #aeb9ce; font-size: 9px; }
.completion-empty small { max-width: 250px; color: #66738e; font-size: 8px; line-height: 1.45; }
.activity-card { max-height: 720px; overflow: hidden; }
.update-composer { padding: 10px; border: 1px solid #223252; border-radius: 9px; background: #071024; }
.update-composer textarea { width: 100%; resize: none; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12px; line-height: 1.5; }
.update-composer > div { display: flex; justify-content: space-between; gap: 8px; margin-top: 7px; }
.update-composer select { min-width: 90px; border: 0; outline: 0; background: transparent; color: #c1cbdb; font-size: 11px; }
.update-composer button { border: 1px solid #2e7db5; border-radius: 6px; background: #0f4774; color: #eaf6ff; padding: 7px 9px; font-size: 10px; font-weight: 750; }
.update-list { display: grid; gap: 0; max-height: 500px; overflow-y: auto; margin-top: 14px; padding-right: 4px; }
.update-item { position: relative; display: grid; grid-template-columns: 26px 1fr; gap: 9px; padding: 0 0 15px; }
.update-item:not(:last-child)::before { content: ""; position: absolute; left: 12px; top: 27px; bottom: 1px; width: 1px; background: #263553; }
.update-avatar { position: relative; z-index: 1; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: #263753; color: #dce8f8; font-size: 7px; font-weight: 800; }
.update-avatar.timon { background: var(--blue); color: white; }
.update-avatar.sebastian { background: #2655a8; color: white; }
.update-item p { margin: 1px 0 4px; color: #cfd8ea; font-size: 11px; line-height: 1.45; }
.update-item small { color: #7e8ba3; font-size: 9px; }
.update-empty { color: #6f7c98; font-size: 9px; }
.reminder-state { border-radius: 4px; background: var(--green-soft); color: var(--green); padding: 4px 7px; font-size: 9px; font-weight: 800; }
.reminder-state.is-off { background: rgba(255,255,255,.06); color: #74809a; }
.reminder-toggle { display: flex; align-items: center; gap: 8px; color: #c5cede; font-size: 12px; font-weight: 700; }
.reminder-toggle input { accent-color: var(--blue); }
.reminder-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.reminder-channel { display: grid; grid-template-columns: 24px 1fr; gap: 8px; margin-top: 14px; padding: 10px; border: 1px dashed #354461; border-radius: 8px; background: #081023; }
.reminder-channel > span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; background: var(--blue-soft); color: #63bdf8; }
.reminder-channel strong, .reminder-channel small { display: block; }
.reminder-channel strong { color: #bfc9d9; font-size: 10px; }
.reminder-channel small { margin-top: 3px; color: #7f8ca4; font-size: 9px; line-height: 1.45; }
.more-details { margin: 0; }
.more-details summary { color: #8d9ab5; cursor: pointer; font-size: 10px; font-weight: 700; }
.more-details[open] summary { margin-bottom: 12px; color: #aab7ce; }
.compact-field { max-width: 220px; }
.delete-link { border: 0; padding: 4px 0; background: transparent; color: #a86370; font-size: 9px; text-decoration: underline; text-underline-offset: 3px; }
.delete-link:hover { color: var(--red); }
.completion-rule { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 20px 0 0; color: #677492; font-size: 8px; }
.completion-rule span { width: 17px; height: 17px; display: grid; place-items: center; border-radius: 50%; background: var(--blue-soft); color: #55b4f2; }
.toast { position: fixed; z-index: 50; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: #eaf5ff; color: #07102b; padding: 11px 16px; border-radius: 9px; box-shadow: var(--shadow); font-size: 12px; font-weight: 700; transition: .2s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.auth-gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; overflow-y: auto; padding: 28px 16px; background: #060c1d; }
body:not(.auth-locked) .auth-gate { display: none; }
body.auth-locked .app-header, body.auth-locked .main, body.auth-locked .modal-layer, body.auth-locked .sop-layer, body.auth-locked .users-layer { visibility: hidden; }
.auth-card { width: min(470px, 100%); border: 1px solid #283752; border-radius: 10px; background: #0b1427; padding: 34px; box-shadow: 0 28px 80px rgba(0,0,0,.42); }
.auth-logo { display: block; width: 184px; filter: brightness(0) invert(1); }
.auth-copy { margin: 34px 0 23px; }
.auth-copy > span { color: #62b6ea; font-size: 11px; font-weight: 750; }
.auth-copy h1 { margin-top: 7px; font-size: 31px; }
.auth-copy p { margin: 9px 0 0; color: #919db2; font-size: 12px; line-height: 1.55; }
.auth-form { display: grid; gap: 13px; }
.auth-form label { display: grid; gap: 6px; }
.auth-form label > span { color: #a1acbf; font-size: 11px; font-weight: 700; }
.auth-form input { width: 100%; height: 46px; border: 1px solid #34435f; border-radius: 7px; outline: 0; background: #070e20; color: white; padding: 0 13px; font-size: 13px; }
.auth-form input:focus { border-color: #168ee1; }
.auth-submit { width: 100%; margin-top: 4px; }
.auth-submit:disabled { cursor: wait; opacity: .65; }
.auth-message, .users-message { min-height: 18px; margin: 0; color: #8f9bb0; font-size: 11px; line-height: 1.45; }
.auth-message.error, .users-message.error, .member-password-reset p.error { color: #ff8e99; }
.auth-message.success, .users-message.success, .member-password-reset p.success { color: #66d5a0; }
.auth-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 17px; }
.auth-actions button { border: 0; background: transparent; color: #75b9e7; padding: 3px 0; font-size: 10px; font-weight: 700; }
.auth-security { margin: 25px 0 0; padding-top: 17px; border-top: 1px solid #22304a; color: #66748c; font-size: 9px; line-height: 1.55; }

.sop-layer { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.sop-layer.is-open { pointer-events: auto; }
.sop-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(2, 6, 18, .78); opacity: 0; transition: opacity .18s ease; }
.sop-panel { position: absolute; top: 32px; bottom: 32px; left: 50%; width: min(820px, calc(100% - 32px)); overflow-y: auto; transform: translate(-50%, 16px); opacity: 0; border: 1px solid #2a3852; border-radius: 10px; background: #0a1224; box-shadow: 0 24px 70px rgba(0,0,0,.45); padding: 28px; transition: opacity .18s ease, transform .18s ease; }
.sop-layer.is-open .sop-backdrop { opacity: 1; }
.sop-layer.is-open .sop-panel { opacity: 1; transform: translate(-50%, 0); }
.sop-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-bottom: 22px; border-bottom: 1px solid #25324b; }
.sop-head > div > span { display: block; margin-bottom: 7px; color: #58afe9; font-size: 11px; font-weight: 750; }
.sop-head h2 { margin: 0; color: white; font-size: 27px; letter-spacing: -.025em; }
.sop-head p { max-width: 660px; margin: 10px 0 0; color: #9aa6bb; font-size: 13px; line-height: 1.55; }
.sop-rule { display: flex; align-items: center; gap: 14px; margin: 20px 0; padding: 14px 16px; border-left: 3px solid #168ee1; background: #0f1a30; }
.sop-rule strong { color: white; font-size: 12px; }
.sop-rule span { color: #b4bfd0; font-size: 12px; }
.sop-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #25324b; border-left: 1px solid #25324b; }
.sop-step { display: grid; grid-template-columns: 28px 1fr; gap: 11px; min-height: 132px; padding: 17px; border-right: 1px solid #25324b; border-bottom: 1px solid #25324b; }
.sop-number { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid #3c5875; border-radius: 5px; color: #75bce8; font-size: 11px; font-weight: 800; }
.sop-step h3, .sop-routines h3, .sop-roles h3 { margin: 2px 0 7px; color: #f0f4fa; font-size: 13px; }
.sop-step p { margin: 0; color: #96a2b6; font-size: 11px; line-height: 1.55; }
.sop-step b { color: #cbd5e3; }
.sop-routines { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.sop-routines section { padding: 16px 17px; border: 1px solid #293650; border-radius: 7px; background: #0c162a; }
.sop-routines ul { display: grid; gap: 6px; margin: 0; padding-left: 18px; color: #9aa6b9; font-size: 11px; line-height: 1.45; }
.sop-roles { margin-top: 18px; padding-top: 18px; border-top: 1px solid #25324b; }
.sop-roles dl { display: grid; gap: 0; margin: 0; }
.sop-roles dl > div { display: grid; grid-template-columns: 170px 1fr; gap: 16px; padding: 10px 0; border-bottom: 1px solid #1e2a41; }
.sop-roles dt { color: #dbe4f0; font-size: 11px; font-weight: 750; }
.sop-roles dd { margin: 0; color: #929fb4; font-size: 11px; line-height: 1.45; }

.users-layer { position: fixed; inset: 0; z-index: 70; pointer-events: none; }
.users-layer.is-open { pointer-events: auto; }
.users-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(2,6,18,.78); opacity: 0; transition: opacity .18s ease; }
.users-panel { position: absolute; top: 24px; right: 24px; bottom: 24px; width: min(760px, calc(100% - 32px)); overflow-y: auto; transform: translateX(24px); opacity: 0; border: 1px solid #2a3852; border-radius: 10px; background: #091225; box-shadow: 0 24px 70px rgba(0,0,0,.46); padding: 27px; transition: opacity .18s ease, transform .18s ease; }
.users-layer.is-open .users-backdrop { opacity: 1; }
.users-layer.is-open .users-panel { opacity: 1; transform: translateX(0); }
.users-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; padding-bottom: 20px; border-bottom: 1px solid #25324b; }
.users-head > div > span { color: #59b1e9; font-size: 10px; font-weight: 750; }
.users-head h2 { margin: 6px 0 0; color: white; font-size: 25px; }
.users-head p, .users-section-title p { margin: 7px 0 0; color: #8f9cb1; font-size: 11px; line-height: 1.5; }
.users-section { padding: 22px 0; border-bottom: 1px solid #24314a; }
.users-section:last-child { border-bottom: 0; }
.users-section-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.users-section-title h3 { margin: 0; color: #f1f5fb; font-size: 15px; }
.users-section-title > span { color: #7e8ca4; font-size: 10px; font-weight: 700; }
.create-user-form { display: grid; grid-template-columns: 1fr 1.35fr 1.2fr 120px; gap: 8px; align-items: end; }
.create-user-form label { display: grid; gap: 5px; }
.create-user-form label > span, .member-password-reset label > span { color: #8996ab; font-size: 9px; font-weight: 700; }
.create-user-form input, .create-user-form select, .own-password-form input, .member-password-reset input { width: 100%; height: 40px; border: 1px solid #34435f; border-radius: 6px; outline: 0; background: #070e20; color: white; padding: 0 10px; font-size: 11px; }
.create-user-form button { grid-column: 1 / -1; justify-self: start; }
.users-message { margin-top: 9px; }
.member-list { display: grid; gap: 7px; }
.member-row { display: grid; grid-template-columns: 34px minmax(0,1fr) auto auto; align-items: center; gap: 10px; min-height: 57px; padding: 9px 11px; border: 1px solid #25344e; border-radius: 7px; background: #0b1529; }
.member-row.is-pending { border-style: dashed; }
.member-avatar { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 50%; background: #164f79; color: #eaf7ff; font-size: 9px; font-weight: 800; }
.member-row strong, .member-row small { display: block; }
.member-row strong { color: #dfe7f2; font-size: 12px; }
.member-row small { margin-top: 3px; color: #78869d; font-size: 9px; }
.member-role { border-radius: 4px; background: #15223a; color: #9dafc5; padding: 5px 7px; font-size: 8px; font-weight: 750; }
.member-reset { border: 0; background: transparent; color: #69b5e5; padding: 5px; font-size: 9px; font-weight: 700; }
.member-password-reset { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; margin: -1px 0 3px; padding: 11px; border: 1px solid #2e4664; border-radius: 7px; background: #0d1a31; }
.member-password-reset label { display: grid; gap: 5px; }
.member-password-reset p { grid-column: 1 / -1; margin: 0; color: #8995aa; font-size: 9px; }
.own-password-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }
.signout-button { margin-top: 18px; border: 0; background: transparent; color: #ff8d98; padding: 4px 0; font-size: 10px; font-weight: 750; }

@media (max-width: 960px) {
  .status-overview { grid-template-columns: repeat(2, 1fr); }
  .quick-add { grid-template-columns: 36px 1fr auto; }
  .quick-field { display: none; }
  .list-head, .task-row { grid-template-columns: minmax(240px, 1fr) 145px 130px 95px 28px; gap: 8px; }
  .project-layout { grid-template-columns: 1fr; }
  .project-side { grid-template-columns: 1fr 1fr; }
  .activity-card { max-height: none; }
  .create-user-form { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .app-header { height: 64px; }
  .header-inner, .main { padding-left: 16px; padding-right: 16px; }
  .brand-logo { width: 152px; }
  .product-name, .people { display: none; }
  .main { padding-top: 30px; }
  .page-title { margin-bottom: 22px; }
  .today { display: none; }
  .status-overview { display: flex; overflow-x: auto; gap: 9px; padding-bottom: 4px; }
  .status-card { min-width: 150px; padding: 14px; }
  .status-card strong { font-size: 24px; }
  .quick-add { grid-template-columns: 32px minmax(0,1fr) auto; padding: 9px; }
  .quick-icon { width: 30px; height: 34px; }
  .quick-submit { padding: 0 11px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-actions { width: 100%; align-items: stretch; flex-direction: column; }
  .sort-control { justify-content: space-between; }
  .search { width: 100%; }
  .list-head { display: none; }
  .task-row { grid-template-columns: 1fr auto; gap: 8px 12px; padding: 15px; }
  .task-main { grid-column: 1 / -1; }
  .owner-wrap { grid-column: 1; grid-row: 2; }
  .task-row > .status-select { grid-column: 2; grid-row: 2; }
  .task-row > .due { grid-column: 1; grid-row: 3; padding-left: 34px; }
  .task-row > .more { grid-column: 2; grid-row: 3; justify-self: end; }
  .modal { padding: 20px 16px 26px; }
  .drawer-head > div { align-items: flex-start; flex-direction: column; gap: 5px; }
  .drawer-title { width: 100%; font-size: 23px; }
  .meta-strip { grid-template-columns: 1fr 1fr; }
  .meta-strip label:last-child { grid-column: 1 / -1; }
  .question-meta-row, .reminder-fields { grid-template-columns: 1fr; }
  .project-progress { grid-template-columns: 100px 1fr; gap: 10px; }
  .progress-caption { grid-column: 1 / -1; }
  .project-side { grid-template-columns: 1fr; }
  .plan-add { grid-template-columns: minmax(0,1fr) 38px; }
  .plan-add .milestone-owner, .plan-add .milestone-date { grid-column: 1 / -1; }
  .plan-add .small-add-button { grid-column: 2; grid-row: 1; }
  .sop-panel { top: 12px; bottom: 12px; width: calc(100% - 20px); padding: 20px 16px; }
  .sop-grid, .sop-routines { grid-template-columns: 1fr; }
  .sop-step { min-height: 0; }
  .sop-roles dl > div { grid-template-columns: 1fr; gap: 4px; }
  .account-button b, #openUsers { display: none; }
  .users-panel { top: 10px; right: 10px; bottom: 10px; width: calc(100% - 20px); padding: 20px 15px; }
  .create-user-form, .own-password-form { grid-template-columns: 1fr; }
  .create-user-form button { width: 100%; }
  .member-row { grid-template-columns: 34px minmax(0,1fr) auto; }
  .member-reset { grid-column: 2 / -1; justify-self: start; }
  .member-password-reset { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .quick-submit { font-size: 0; width: 42px; }
  .quick-submit::after { content: "↵"; font-size: 17px; }
  .view-tabs { width: 100%; }
}
