:root{--navy:#123a63;--navy-2:#0a2c4f;--blue:#1f75b5;--teal:#36b8aa;--ink:#172634;--muted:#6b7c8a;--line:#dbe4ec;--soft:#f3f7fa;--white:#fff;--danger:#b42318;--shadow:0 12px 36px rgba(15,44,73,.10);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:#eef3f7;font-size:16px}*{box-sizing:border-box}body{margin:0;min-height:100vh}button,input,textarea{font:inherit}button,a{-webkit-tap-highlight-color:transparent}.topbar{min-height:104px;background:linear-gradient(120deg,var(--navy-2),var(--navy));color:#fff;display:flex;align-items:center;justify-content:space-between;padding:18px clamp(20px,4vw,64px);gap:24px;box-shadow:0 4px 16px rgba(10,44,79,.18);position:sticky;top:0;z-index:20}.brand{display:flex;align-items:center;gap:14px}.brand-mark{width:48px;height:48px;border-radius:14px;background:var(--teal);display:grid;place-items:center;font-size:28px;font-weight:800}.brand h1,.detail-title h1{font-size:clamp(1.35rem,2vw,1.75rem);margin:0;line-height:1.2}.brand p,.detail-title p{margin:4px 0 0;color:#c9d9e8;font-size:.9rem}.button{border:0;border-radius:12px;padding:12px 18px;font-weight:750;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:7px;text-decoration:none;min-height:46px}.button:disabled{opacity:.55;cursor:wait}.button-primary{background:var(--teal);color:#062f35;box-shadow:0 7px 18px rgba(54,184,170,.2)}.button-primary:hover{background:#55cbbf}.button-ghost{background:var(--soft);color:var(--ink)}.dashboard{max-width:1280px;margin:0 auto;padding:28px clamp(16px,4vw,48px) 80px}.summary{display:grid;grid-template-columns:repeat(3,1fr);background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);margin-bottom:22px}.summary div{display:flex;flex-direction:column;padding:19px 24px;border-right:1px solid var(--line)}.summary div:last-child{border:0}.summary-number{font-size:1.7rem;font-weight:800;color:var(--navy)}.summary div span:last-child{font-size:.85rem;color:var(--muted);margin-top:2px}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:22px}.search-wrap{flex:1;max-width:620px;display:flex;align-items:center;gap:8px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:0 15px;box-shadow:0 3px 12px rgba(15,44,73,.04)}.search-wrap span{font-size:1.6rem;color:var(--muted)}.search-wrap input{border:0;outline:0;width:100%;padding:13px 0;background:transparent;font-size:1rem}.segmented{display:flex;background:#dfe8ef;border-radius:11px;padding:4px}.segmented button{border:0;background:transparent;padding:9px 17px;border-radius:8px;color:#536675;font-weight:700;cursor:pointer}.segmented button.active{background:#fff;color:var(--navy);box-shadow:0 2px 8px rgba(15,44,73,.12)}.project-list{display:grid;gap:18px}.project-card{background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 8px 24px rgba(15,44,73,.07);overflow:hidden}.project-header{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);padding:16px 20px}.project-heading{display:flex;align-items:center;gap:13px;text-decoration:none;color:var(--ink)}.project-heading strong{display:block;font-size:1.1rem}.project-heading small{color:var(--muted);display:block;margin-top:2px}.project-color{display:block;flex:0 0 auto;width:12px;height:42px;border-radius:8px;background:var(--project-color)}.icon-button{width:40px;height:40px;border-radius:10px;background:var(--soft);display:grid;place-items:center;text-decoration:none;color:var(--navy);font-size:1.4rem}.items-list{padding:0 20px}.overview-item{display:flex;gap:14px;padding:16px 0;border-bottom:1px solid var(--line)}.overview-item:last-child{border-bottom:0}.check-button{width:28px;height:28px;flex:0 0 auto;margin-top:1px;border:2px solid #8ba0b1;background:#fff;border-radius:7px;cursor:pointer;color:transparent;display:grid;place-items:center;font-weight:900;padding:0}.is-done .check-button{background:var(--teal);border-color:var(--teal);color:#063d3a}.is-done .item-content>p{text-decoration:line-through;color:#71808c}.item-content{min-width:0;flex:1}.item-content p{font-size:1.02rem;line-height:1.5;margin:0;white-space:normal}.item-date{color:#8795a0;display:block;margin-top:9px}.drawing-preview{display:block;max-width:min(640px,100%);max-height:210px;object-fit:contain;object-position:left;background:#fdfcf8;border:1px solid var(--line);border-radius:10px;margin-top:10px}.photo-strip{display:flex;gap:8px;margin-top:10px;overflow:auto}.photo-strip img{width:104px;height:76px;object-fit:cover;border-radius:9px;display:block}.add-inline{display:inline-block;color:var(--blue);font-weight:750;text-decoration:none;margin:4px 20px 18px}.no-items{color:var(--muted);margin:18px 0}.empty-state,.empty-detail{text-align:center;background:#fff;border:1px dashed #b8c8d5;border-radius:18px;padding:54px 24px}.empty-state h2,.empty-detail h3{margin:12px 0 5px}.empty-state p,.empty-detail p{color:var(--muted);margin:0 0 22px}.empty-icon,.empty-detail>div{font-size:2.2rem;color:var(--blue)}.dialog{border:0;border-radius:20px;padding:0;width:min(520px,calc(100vw - 28px));box-shadow:0 30px 80px rgba(4,29,51,.35)}.dialog::backdrop,.lightbox::backdrop{background:rgba(6,28,46,.67);backdrop-filter:blur(3px)}.dialog form{padding:26px}.dialog-head{display:flex;justify-content:space-between;gap:20px}.dialog h2{margin:0;font-size:1.45rem}.dialog p{color:var(--muted);margin:5px 0 0}.dialog-close,.composer-close{border:0;background:var(--soft);border-radius:50%;width:38px;height:38px;font-size:1.5rem;cursor:pointer}.field{display:grid;gap:8px;margin-top:22px}.field span,.color-picker legend{font-size:.86rem;font-weight:750;color:#415463}.field input,.field textarea{width:100%;border:1px solid #bdcbd6;border-radius:11px;padding:12px 13px;outline:none;background:#fff}.field textarea{resize:vertical;line-height:1.5}.field input:focus,.field textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(31,117,181,.13)}.color-picker{border:0;padding:0;margin:20px 0 0}.color-picker legend{margin-bottom:9px}.color-picker label{display:inline-block}.color-picker input{position:absolute;opacity:0}.color-picker label span{display:block;width:34px;height:34px;border-radius:50%;background:var(--swatch);margin-right:8px;border:4px solid #fff;box-shadow:0 0 0 1px #c3ced6}.color-picker input:checked+span{box-shadow:0 0 0 3px var(--ink)}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:26px}.form-error{color:var(--danger)!important;min-height:1.2em;font-size:.88rem}.toast{position:fixed;left:50%;bottom:26px;transform:translate(-50%,30px);opacity:0;background:#102f4c;color:#fff;border-radius:10px;padding:12px 18px;box-shadow:var(--shadow);z-index:100;transition:.2s;pointer-events:none}.toast.show{opacity:1;transform:translate(-50%,0)}[hidden],.hidden{display:none!important}.detail-topbar{position:relative}.back-link{color:#d8e6f1;text-decoration:none;font-weight:700;white-space:nowrap}.detail-title{display:flex;align-items:center;gap:12px;margin-right:auto}.detail-title .project-color{height:48px}.detail-layout{max-width:1500px;margin:0 auto;display:grid;grid-template-columns:minmax(0,1fr) 430px;min-height:calc(100vh - 104px)}.detail-list{padding:30px clamp(18px,3vw,44px) 80px}.section-title{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:18px}.section-title h2{font-size:1.45rem;margin:0}.section-title p{color:var(--muted);margin:5px 0 0}.compact button{padding:7px 12px}.detail-item{display:flex;gap:16px;background:#fff;border:1px solid var(--line);border-radius:15px;padding:20px;margin-bottom:13px;box-shadow:0 5px 18px rgba(15,44,73,.05)}.check-button.large{width:32px;height:32px}.drawing-full{display:block;max-width:100%;max-height:360px;object-fit:contain;object-position:left;background:#fdfcf8;border-radius:9px}.media-button{border:0;background:transparent;padding:0;cursor:zoom-in;display:block}.photo-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,220px));gap:9px;margin-top:12px}.photo-grid img{display:block;width:100%;height:150px;object-fit:cover;border-radius:10px}.item-footer{display:flex;justify-content:space-between;align-items:center;margin-top:13px;color:#8795a0;font-size:.82rem}.delete-link{border:0;background:transparent;color:#a93b35;cursor:pointer}.composer{background:#fff;border-left:1px solid var(--line);padding:28px;position:sticky;top:0;height:100vh;overflow:auto}.composer-head{display:flex;justify-content:space-between;gap:16px;align-items:start}.composer-head h2{margin:3px 0 0}.eyebrow{color:var(--blue);font-size:.73rem;font-weight:850;letter-spacing:.1em}.composer-close{display:none}.mode-tabs{display:grid;grid-template-columns:1fr 1fr;gap:7px;background:var(--soft);border-radius:11px;padding:5px;margin-top:22px}.mode-tabs button{border:0;background:transparent;border-radius:8px;padding:10px;font-weight:700;color:var(--muted);cursor:pointer}.mode-tabs button.active{background:#fff;color:var(--navy);box-shadow:0 2px 8px rgba(15,44,73,.1)}.canvas-tools{display:flex;justify-content:space-between;align-items:center;margin:20px 0 8px;font-size:.82rem;color:var(--muted)}.canvas-tools button{border:0;background:transparent;color:var(--blue);font-weight:700;cursor:pointer}.canvas-wrap{border:1px solid #bdcbd6;border-radius:11px;overflow:hidden;background:repeating-linear-gradient(#fff 0,#fff 39px,#dbe6ef 40px)}#drawing-canvas{display:block;width:100%;height:255px;touch-action:none}.photo-upload{display:flex;align-items:center;gap:12px;border:1.5px dashed #a9bbc9;border-radius:12px;padding:15px;margin-top:18px;cursor:pointer}.photo-upload input{position:absolute;opacity:0;pointer-events:none}.photo-upload strong,.photo-upload small{display:block}.photo-upload small{color:var(--muted);font-size:.76rem;margin-top:2px}.upload-icon{font-size:1.6rem;color:var(--blue)}.photo-preview{display:flex;gap:7px;overflow:auto;margin-top:9px}.photo-preview img{width:74px;height:60px;border-radius:8px;object-fit:cover}.button-wide{width:100%;margin-top:20px}.danger-zone{border-top:1px solid var(--line);margin-top:28px;padding-top:20px;text-align:center}.danger-zone button{border:0;background:transparent;color:var(--danger);font-size:.83rem;cursor:pointer}.lightbox{border:0;padding:0;background:transparent;max-width:94vw;max-height:92vh}.lightbox img{display:block;max-width:90vw;max-height:86vh;border-radius:10px}.lightbox button{position:fixed;right:20px;top:20px;border:0;background:#fff;width:44px;height:44px;border-radius:50%;font-size:1.8rem;cursor:pointer}.not-found{min-height:100vh;display:grid;place-content:center;text-align:center;gap:20px}
@media(max-width:900px){.detail-layout{display:block}.composer{position:fixed;z-index:40;inset:auto 0 0;border:0;border-radius:22px 22px 0 0;height:min(88vh,780px);transform:translateY(105%);transition:transform .25s ease;box-shadow:0 -20px 60px rgba(5,31,51,.23)}.composer.open{transform:translateY(0)}.composer-close{display:block}.detail-topbar .button{display:inline-flex}.back-link span{display:none}.section-title{align-items:start;flex-direction:column}.detail-list{padding-bottom:110px}}
@media(max-width:640px){.topbar{min-height:84px;padding:14px 16px}.brand-mark{width:40px;height:40px;border-radius:11px}.brand p{display:none}.topbar>.button{padding:10px 12px}.topbar>.button span{font-size:1.25rem}.dashboard{padding-top:18px}.summary div{padding:14px 11px}.summary-number{font-size:1.35rem}.summary div span:last-child{font-size:.72rem}.toolbar{align-items:stretch;flex-direction:column}.search-wrap{max-width:none}.segmented{display:grid;grid-template-columns:repeat(3,1fr)}.project-header{padding:14px}.items-list{padding:0 14px}.overview-item{padding:14px 0}.add-inline{margin-left:14px}.dialog-actions .button{flex:1}.detail-topbar{gap:12px}.detail-title{min-width:0}.detail-title h1{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:44vw}.detail-topbar>.button{font-size:0;width:45px;padding:0}.detail-topbar>.button:first-letter{font-size:1.5rem}.photo-grid{grid-template-columns:repeat(2,1fr)}.photo-grid img{height:120px}.detail-item{padding:15px;gap:11px}.composer{padding:22px 18px}.section-title p{font-size:.88rem}}

.top-actions{display:flex;align-items:center;gap:12px}.account-chip{display:flex;align-items:center;gap:9px}.account-chip>span{width:36px;height:36px;border-radius:50%;background:#dcebf5;color:var(--navy);display:grid;place-items:center;font-weight:850}.account-chip strong,.account-chip a{display:block}.account-chip strong{font-size:.86rem}.account-chip a{font-size:.73rem;color:#b9d7eb;text-decoration:none;margin-top:2px}.logout-form button{border:0;background:rgba(255,255,255,.1);color:#fff;width:38px;height:38px;border-radius:10px;font-size:1.2rem;cursor:pointer}.auth-page{background:linear-gradient(135deg,#082a4a 0,#123a63 53%,#175c78 100%);min-height:100vh;display:grid;place-items:center;padding:28px}.auth-shell{width:min(920px,100%);display:grid;grid-template-columns:1fr 1fr;background:#fff;border-radius:24px;overflow:hidden;box-shadow:0 35px 100px rgba(0,17,34,.35)}.auth-brand{background:linear-gradient(150deg,#0c3156,#15577a);color:#fff;padding:64px 48px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center}.auth-brand .brand-mark{margin-bottom:24px}.auth-brand h1{font-size:2.1rem;margin:0}.auth-brand p{color:#cce0ee;line-height:1.65;margin:14px 0 0;max-width:32ch}.auth-card{padding:48px}.auth-card h2,.user-create h2{font-size:1.55rem;margin:5px 0 20px}.auth-card .field small,.user-create .field small{color:var(--muted)}.auth-error,.auth-success{padding:10px 12px;border-radius:9px;font-size:.88rem;margin:15px 0 0}.auth-error{background:#fff0ee;color:#9f241d}.auth-success{background:#e8f8f3;color:#116353}.users-layout{max-width:1250px;margin:0 auto;padding:34px clamp(18px,4vw,50px) 80px;display:grid;grid-template-columns:360px minmax(0,1fr);gap:28px;align-items:start}.user-create,.user-list{background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);padding:25px}.user-create{position:sticky;top:20px}.field select{width:100%;border:1px solid #bdcbd6;border-radius:11px;padding:12px 13px;background:#fff}.user-row{display:flex;align-items:center;gap:13px;padding:15px 0;border-bottom:1px solid var(--line)}.user-row:last-child{border:0}.user-row.inactive{opacity:.55}.user-avatar{width:43px;height:43px;border-radius:12px;background:#dceaf5;color:var(--navy);display:grid;place-items:center;font-weight:850}.user-info{flex:1;min-width:0}.user-info strong,.user-info span{display:block}.user-info span{color:var(--muted);font-size:.82rem;margin-top:3px}.user-actions{position:relative}.user-actions summary{cursor:pointer;color:var(--blue);font-weight:700;font-size:.84rem}.user-actions>div{position:absolute;right:0;top:30px;background:#fff;border:1px solid var(--line);box-shadow:var(--shadow);border-radius:12px;padding:12px;width:260px;z-index:5}.user-actions form{display:flex;gap:6px;margin-bottom:8px}.user-actions form:last-child{margin:0}.user-actions input{min-width:0;flex:1;border:1px solid var(--line);border-radius:8px;padding:8px}.user-actions button{border:0;background:var(--navy);color:#fff;border-radius:8px;padding:8px;cursor:pointer;white-space:nowrap}.user-actions .danger-text{background:#fff0ee;color:var(--danger);width:100%}
@media(max-width:850px){.account-chip{display:none}.users-layout{grid-template-columns:1fr}.user-create{position:static}.auth-shell{grid-template-columns:1fr}.auth-brand{padding:32px}.auth-brand p{margin-top:8px}.auth-card{padding:32px}.auth-brand .brand-mark{margin-bottom:12px}}
@media(max-width:520px){.top-actions{gap:7px}.top-actions .button{font-size:0;width:44px;padding:0}.top-actions .button span{font-size:1.4rem}.auth-page{padding:14px}.auth-brand{padding:26px}.auth-brand h1{font-size:1.55rem}.auth-card{padding:26px 22px}.users-layout{padding-top:18px}.user-list{padding:18px}.user-actions>div{position:fixed;left:16px;right:16px;top:auto;bottom:16px;width:auto}.user-info span{white-space:normal}}

.summary{grid-template-columns:repeat(2,1fr)}.list-bullet{width:8px;height:8px;border-radius:50%;background:var(--blue);flex:0 0 auto;margin:9px 5px 0}.simple-project{max-width:1060px;margin:0 auto;padding:32px clamp(16px,4vw,48px) 70px}.quick-entry{background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);padding:24px;margin-bottom:28px}.quick-entry-head{display:flex;align-items:end;justify-content:space-between;gap:18px;margin-bottom:14px}.quick-entry h2,.simple-list h2{margin:4px 0 0;font-size:1.45rem}.entry-hint{font-size:.85rem;color:var(--muted)}.quick-entry textarea{display:block;width:100%;min-height:145px;border:1px solid #b9c9d5;border-radius:12px;padding:15px;font:inherit;font-size:1.05rem;line-height:1.7;resize:vertical;outline:none;background:repeating-linear-gradient(#fff 0,#fff 42px,#e8eef3 43px)}.quick-entry textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(31,117,181,.12)}.simple-tools{display:flex;align-items:center;gap:10px;margin-top:13px}.simple-upload,.simple-tool-button{border:1px solid var(--line);background:var(--soft);color:var(--navy);border-radius:10px;padding:10px 13px;font-weight:700;cursor:pointer}.simple-upload input{position:absolute;opacity:0;pointer-events:none}.simple-upload span{font-size:1.15rem}.simple-tool-button{font:inherit;font-weight:700}.simple-tools #photo-count{font-size:.82rem;color:var(--muted)}.save-entry{margin-left:auto}.simple-drawing{margin-top:14px}.simple-drawing #drawing-canvas{height:250px}.simple-list-head{display:flex;justify-content:space-between;align-items:end;margin-bottom:13px}.simple-list-head p{margin:5px 0 0;color:var(--muted);font-size:.88rem}.simple-item{display:flex;align-items:flex-start;gap:14px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px;margin-bottom:10px;box-shadow:0 4px 14px rgba(15,44,73,.045)}.simple-item .item-content>p{font-size:1.05rem;margin:5px 0;line-height:1.5}.move-controls{display:flex;flex-direction:column;gap:4px}.move-controls button,.simple-delete{border:0;background:var(--soft);color:#506777;width:32px;height:29px;border-radius:8px;cursor:pointer;font-size:1rem}.move-controls button:disabled{opacity:.28;cursor:default}.simple-delete{color:var(--danger);font-size:1.35rem;margin-left:auto;flex:0 0 auto}.simple-item .drawing-full{max-height:260px;margin-top:8px}.simple-item .photo-grid{grid-template-columns:repeat(auto-fit,minmax(130px,180px))}.simple-item .photo-grid img{height:125px}.project-delete{text-align:center;margin-top:32px}.project-delete button{border:0;background:transparent;color:var(--danger);cursor:pointer}.simple-list .empty-detail{background:#fff}.simple-project-page .detail-topbar{position:sticky}
@media(max-width:640px){.summary{grid-template-columns:repeat(2,1fr)}.quick-entry{padding:18px}.quick-entry-head{align-items:start;flex-direction:column;gap:4px}.simple-tools{flex-wrap:wrap}.save-entry{width:100%;margin:3px 0 0}.simple-item{gap:9px;padding:11px}.move-controls{flex-direction:column}.simple-item .photo-grid{grid-template-columns:repeat(2,1fr)}.simple-item .photo-grid img{height:105px}}

.project-header{background:var(--project-color);color:var(--project-ink);border-bottom:0;padding:17px 20px}.project-header .project-color{display:none}.project-header .project-heading,.project-header .project-heading strong,.project-header .project-heading small{color:var(--project-ink)}.project-header .project-heading small{opacity:.76}.project-header .icon-button{background:rgba(255,255,255,.28);color:var(--project-ink);box-shadow:0 1px 4px rgba(0,0,0,.08)}.project-card{border-color:color-mix(in srgb,var(--project-color) 45%,#dbe4ec)}.item-actions{display:flex;flex-direction:column;gap:5px;margin-left:auto}.simple-edit,.item-actions .simple-delete{border:0;background:var(--soft);width:34px;height:32px;border-radius:8px;cursor:pointer;font-size:1.05rem;margin:0}.simple-edit{color:var(--blue)}.item-actions .simple-delete{color:var(--danger);font-size:1.35rem}.draw-controls{display:flex;gap:5px;align-items:center}.draw-controls button{border:1px solid var(--line);background:#fff;color:#536675;border-radius:8px;padding:7px 9px;font-weight:700;cursor:pointer}.draw-controls button.active{background:var(--navy);color:#fff;border-color:var(--navy)}.canvas-wrap canvas{width:100%;height:250px;touch-action:none}.edit-dialog{width:min(780px,calc(100vw - 24px));max-height:92vh;overflow:auto}.edit-dialog form{padding:25px}.edit-dialog textarea{resize:vertical;line-height:1.5}.edit-drawing{margin-top:18px}.edit-drawing .canvas-wrap{background:repeating-linear-gradient(#fff 0,#fff 39px,#dbe6ef 40px)}#edit-canvas{display:block;width:100%;height:280px;touch-action:none}
@media(max-width:640px){.project-header{padding:15px}.canvas-tools{align-items:flex-start;flex-direction:column;gap:8px}.draw-controls{width:100%}.draw-controls button{flex:1;padding:8px 5px;font-size:.8rem}.edit-dialog form{padding:18px}#edit-canvas{height:240px}.item-actions{gap:4px}}

mark{background:#ffe66a;color:inherit;padding:.06em .12em;border-radius:.15em;box-decoration-break:clone;-webkit-box-decoration-break:clone}.text-tools{display:flex;gap:7px;margin-top:8px}.text-tools button{border:1px solid var(--line);background:var(--soft);color:var(--navy);border-radius:8px;padding:7px 10px;font-weight:700;cursor:pointer}.text-tools button:first-child{background:#fff3a5;border-color:#e8ce43}.rich-text-editor{min-height:110px;border:1px solid #bdcbd6;border-radius:11px;padding:12px 13px;background:#fff;line-height:1.55;outline:none;white-space:pre-wrap}.rich-text-editor:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(31,117,181,.13)}
@media(max-width:640px){.text-tools{flex-direction:column}.draw-controls{flex-wrap:wrap}.draw-controls button{min-width:44%}}
