:root{--primary:#4a90e2;--danger:#e74c3c;--warning:#f39c12;--success:#27ae60;--bg:#f5f7fa;--card:#fff;--text:#2c3e50;--sub:#7f8c8d;--line:#e8edf3;--shadow:0 8px 24px rgba(31,45,61,.08)}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:Pretendard,'Noto Sans KR',system-ui,sans-serif;line-height:1.55}.app{max-width:1100px;margin:0 auto;padding:22px 18px 70px}.hero{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;background:linear-gradient(135deg,#667eea,#764ba2);color:white;border-radius:24px;padding:26px;box-shadow:var(--shadow);margin-bottom:18px}.eyebrow{font-size:11px;font-weight:800;letter-spacing:.08em;opacity:.85}.hero h1{margin:6px 0 8px;font-size:clamp(26px,5vw,42px);line-height:1.05}.hero p{margin:0;opacity:.9}.hero-actions a{color:white;text-decoration:none;border:1px solid rgba(255,255,255,.45);padding:8px 12px;border-radius:999px;font-size:13px;font-weight:800}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:16px}.stat{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:16px;box-shadow:var(--shadow)}.stat span{display:block;font-size:12px;color:var(--sub);font-weight:700;margin-bottom:6px}.stat strong{font-size:26px}.tabs{display:flex;gap:8px;position:sticky;top:0;z-index:5;background:rgba(245,247,250,.92);backdrop-filter:blur(12px);padding:10px 0;margin-bottom:14px;overflow:auto}.tab,.panel-head button,.filter-row button,.note-form button,.upload-form button{border:0;background:white;color:var(--text);box-shadow:0 2px 10px rgba(0,0,0,.04);border-radius:999px;padding:10px 14px;font-weight:800;cursor:pointer;white-space:nowrap}.tab.active{background:var(--primary);color:white}.panel{display:none}.panel.active{display:block}.panel-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:16px 0}.panel-head h2{margin:0;font-size:22px}.card{background:var(--card);border:1px solid var(--line);border-left:6px solid var(--primary);border-radius:18px;padding:20px;margin-bottom:16px;box-shadow:var(--shadow)}.card.danger{border-left-color:var(--danger)}.card.warning{border-left-color:var(--warning)}.card.success{border-left-color:var(--success)}.card h3{margin:0 0 14px;border-bottom:1px solid var(--line);padding-bottom:10px}.check-item{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:flex-start;border-bottom:1px solid var(--line);padding:14px 0}.check-item:last-child{border-bottom:0}.check-title{font-weight:850}.priority-high{background:#fff1a8;color:#b45309;border-radius:6px;padding:2px 6px;font-size:12px;margin-left:6px}.details{margin:8px 0 10px;color:var(--sub);font-size:14px}.status-row{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:8px}.status-btn{border:1px solid var(--line);background:#fff;border-radius:999px;padding:6px 9px;font-size:12px;font-weight:800;cursor:pointer}.status-btn.active{background:#2ecc71;color:white;border-color:#2ecc71}.status-btn.issue.active{background:var(--danger);border-color:var(--danger)}.status-btn.checking.active{background:var(--primary);border-color:var(--primary)}.status-btn.hold.active{background:var(--warning);border-color:var(--warning)}.item-memo{width:100%;min-height:54px;border:1px solid var(--line);border-radius:10px;padding:10px;font-family:inherit;resize:vertical}.save-small{border:0;background:#1f2937;color:white;border-radius:10px;padding:9px 12px;font-weight:800;cursor:pointer}.photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:14px}.photo-card{background:white;border:1px solid var(--line);border-radius:16px;overflow:hidden;box-shadow:var(--shadow)}.photo-card img{width:100%;aspect-ratio:4/3;object-fit:cover;background:#eef2f7}.photo-body{padding:12px}.photo-body p{margin:4px 0;color:var(--sub);font-size:13px}.note-form,.upload-form{background:white;border:1px solid var(--line);border-radius:18px;padding:16px;box-shadow:var(--shadow);display:grid;gap:10px;margin-bottom:16px}input,select,textarea{border:1px solid var(--line);border-radius:12px;padding:12px;font-family:inherit;background:white}textarea{min-height:90px;resize:vertical}.note-card{background:white;border:1px solid var(--line);border-radius:16px;padding:16px;margin-bottom:12px;box-shadow:var(--shadow)}.note-card h3{margin:0 0 6px}.note-meta{color:var(--sub);font-size:12px;margin-bottom:8px}.note-content{white-space:pre-wrap}#toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:#111827;color:white;padding:12px 16px;border-radius:999px;font-weight:800;display:none;z-index:99}.login-body{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#667eea,#764ba2);padding:20px}.login-card{width:min(380px,100%);background:white;border-radius:24px;padding:30px;box-shadow:0 22px 60px rgba(0,0,0,.2);text-align:center}.login-mark{font-size:46px}.login-card h1{margin:8px 0 2px}.login-card p{margin:0 0 20px;color:var(--sub)}.login-card input,.login-card button{width:100%;margin-top:10px}.login-card button{border:0;background:var(--primary);color:white;border-radius:12px;padding:13px;font-weight:900}.login-error{margin-top:12px;color:var(--danger);font-weight:800}@media(max-width:720px){.stats{grid-template-columns:repeat(2,1fr)}.hero{flex-direction:column}.check-item{grid-template-columns:1fr}}

.card h3 small{display:inline-block;margin-left:10px;color:var(--sub);font-size:12px;font-weight:800}
.section-progress{height:8px;background:#eef2f7;border-radius:999px;overflow:hidden;margin:-2px 0 10px}
.section-progress i{display:block;height:100%;background:linear-gradient(90deg,var(--primary),#7c3aed);border-radius:999px}
.photo-count{background:#dbeafe;color:#1d4ed8;border-radius:999px;padding:2px 7px;font-size:12px;margin-left:6px}
.item-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.attach-btn{border:1px solid var(--line);background:#f8fafc;border-radius:999px;padding:7px 10px;font-weight:800;cursor:pointer}
.photo-body strong em{font-style:normal;background:#f1f5f9;border-radius:999px;padding:2px 6px;font-size:11px;color:#475569}
.photo-body button{border:0;background:#eff6ff;color:#1d4ed8;border-radius:999px;padding:3px 7px;font-size:12px;font-weight:800;cursor:pointer}
.pdf-thumb{height:160px;display:grid;place-items:center;background:#eef2f7;font-weight:900}
.pdf-large{height:360px;display:grid;place-items:center;background:#eef2f7;font-size:44px;font-weight:900;border-radius:14px}
.modal{position:fixed;inset:0;background:rgba(15,23,42,.62);z-index:100;display:grid;place-items:center;padding:18px}
.modal.hidden{display:none}
.modal-card{width:min(880px,100%);max-height:88vh;overflow:auto;background:white;border-radius:22px;padding:18px;box-shadow:0 30px 80px rgba(0,0,0,.28);position:relative}
.modal-close{position:sticky;top:0;float:right;border:0;background:#111827;color:white;border-radius:999px;width:34px;height:34px;font-size:20px;cursor:pointer;z-index:2}
.modal-img{width:100%;max-height:68vh;object-fit:contain;background:#f1f5f9;border-radius:14px}
.photo-grid.compact{margin-top:16px;grid-template-columns:repeat(auto-fill,minmax(160px,1fr))}
@media(max-width:720px){.modal{padding:8px}.modal-card{max-height:94vh;border-radius:16px}.photo-grid.compact{grid-template-columns:repeat(2,1fr)}}

.estimate-form{background:white;border:1px solid var(--line);border-radius:18px;padding:16px;box-shadow:var(--shadow);display:grid;gap:12px;margin-bottom:16px}
.estimate-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:10px}
.estimate-form label{display:grid;gap:6px;font-weight:850;font-size:13px;color:#334155}
.estimate-form button{border:0;background:var(--primary);color:white;border-radius:12px;padding:13px;font-weight:900;cursor:pointer}
.estimate-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:16px}
.estimate-cards small{display:block;color:var(--sub);font-size:12px;margin-top:4px}
.estimate-card{background:white;border:1px solid var(--line);border-radius:18px;padding:16px;margin-bottom:12px;box-shadow:var(--shadow)}
.estimate-card.best{border:2px solid #22c55e}
.estimate-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;border-bottom:1px solid var(--line);padding-bottom:12px;margin-bottom:12px}
.estimate-head h3{margin:0 0 4px}
.estimate-head h3 span{margin-left:6px;background:#dcfce7;color:#166534;border-radius:999px;padding:2px 8px;font-size:12px}
.estimate-head strong{font-size:24px}
.estimate-head button{border:0;background:#f1f5f9;border-radius:999px;padding:7px 10px;font-weight:850;cursor:pointer;margin-left:4px}
.estimate-parts{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px}
.estimate-parts em{font-style:normal;background:#eff6ff;color:#1d4ed8;border-radius:999px;padding:4px 8px;font-size:12px;font-weight:800}
.estimate-text{background:#f8fafc;border-radius:12px;padding:10px;margin-top:8px}
.estimate-text.warn{background:#fff7ed}
.estimate-text b{display:block;margin-bottom:4px}
.estimate-text p{white-space:pre-wrap;margin:0;color:#475569}
@media(max-width:720px){.estimate-cards{grid-template-columns:1fr}.estimate-head{display:block}.estimate-head>div:last-child{margin-top:10px}}

.schedule-form{background:white;border:1px solid var(--line);border-radius:18px;padding:16px;box-shadow:var(--shadow);display:grid;gap:12px;margin-bottom:16px}
.schedule-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:10px}
.schedule-form label{display:grid;gap:6px;font-weight:850;font-size:13px;color:#334155}
.schedule-form button{border:0;background:var(--primary);color:white;border-radius:12px;padding:13px;font-weight:900;cursor:pointer}
.schedule-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:16px}
.timeline{position:relative;margin-left:10px;padding-left:20px}
.timeline:before{content:'';position:absolute;left:8px;top:8px;bottom:8px;width:3px;background:#dbe3ee;border-radius:999px}
.timeline-item{position:relative;margin-bottom:14px}
.timeline-dot{position:absolute;left:-20px;top:20px;width:17px;height:17px;border-radius:999px;background:#94a3b8;border:3px solid white;box-shadow:0 0 0 2px #dbe3ee}
.timeline-item.done .timeline-dot{background:#22c55e}
.timeline-item.progress .timeline-dot{background:#3b82f6}
.timeline-item.delayed .timeline-dot{background:#ef4444}
.timeline-item.hold .timeline-dot{background:#f59e0b}
.timeline-card{background:white;border:1px solid var(--line);border-radius:18px;padding:16px;box-shadow:var(--shadow)}
.timeline-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.timeline-head h3{margin:0 0 4px}
.timeline-head p{margin:0;color:var(--sub);font-size:13px}
.timeline-head span{border-radius:999px;padding:5px 9px;font-size:12px;font-weight:900;background:#f1f5f9;color:#334155;white-space:nowrap}
.timeline-item.done .timeline-head span{background:#dcfce7;color:#166534}
.timeline-item.progress .timeline-head span{background:#dbeafe;color:#1d4ed8}
.timeline-item.delayed .timeline-head span{background:#fee2e2;color:#991b1b}
.timeline-item.hold .timeline-head span{background:#fef3c7;color:#92400e}
.timeline-memo{margin-top:10px;background:#f8fafc;border-radius:12px;padding:10px;white-space:pre-wrap;color:#475569}
.timeline-actions{display:flex;justify-content:flex-end;gap:6px;margin-top:10px}
.timeline-actions button{border:0;background:#f1f5f9;border-radius:999px;padding:7px 10px;font-weight:850;cursor:pointer}
@media(max-width:720px){.schedule-cards{grid-template-columns:1fr}.timeline-head{display:block}.timeline-head span{display:inline-block;margin-top:8px}}

.budget-layout{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:16px}
.budget-form,.budget-tools{background:white;border:1px solid var(--line);border-radius:18px;padding:16px;box-shadow:var(--shadow);display:grid;gap:12px;margin-bottom:16px}
.budget-form h3,.budget-tools h3{margin:0}
.budget-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:10px}
.budget-form label{display:grid;gap:6px;font-weight:850;font-size:13px;color:#334155}
.budget-form button,.budget-tools button{border:0;background:var(--primary);color:white;border-radius:12px;padding:12px;font-weight:900;cursor:pointer}
.form-actions{display:flex;gap:8px;flex-wrap:wrap}
.form-actions button[type="button"]{background:#f1f5f9;color:#334155}
.budget-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:16px}
.budget-cards .red{color:#dc2626}
.budget-table{display:grid;gap:10px;margin-bottom:16px}
.budget-row{background:white;border:1px solid var(--line);border-radius:18px;padding:14px;box-shadow:var(--shadow);display:grid;grid-template-columns:1.6fr 1fr 1fr 1fr auto;gap:10px;align-items:center}
.budget-row.over{border-left:6px solid #ef4444}
.budget-row.ok{border-left:6px solid #22c55e}
.budget-row.zero{border-left:6px solid #94a3b8}
.budget-row h3{margin:0 0 4px}
.budget-row p{margin:0;color:var(--sub);font-size:13px}
.budget-row span{display:block;color:var(--sub);font-size:12px;font-weight:800}
.budget-row strong{font-size:18px}
.budget-row small{display:block;color:var(--sub)}
.budget-row-actions{display:flex;gap:6px}
.budget-row-actions button,.expense-row button{border:0;background:#f1f5f9;border-radius:999px;padding:7px 10px;font-weight:850;cursor:pointer}
.import-btn{margin:4px 6px 4px 0}
.muted{color:var(--sub);margin:0}
.expense-list{background:white;border:1px solid var(--line);border-radius:18px;padding:16px;box-shadow:var(--shadow)}
.expense-list h3{margin-top:0}
.expense-row{display:grid;grid-template-columns:1fr auto auto;gap:10px;align-items:center;border-bottom:1px solid var(--line);padding:10px 0}
.expense-row:last-child{border-bottom:0}
.expense-row p,.expense-row small{display:block;margin:2px 0;color:var(--sub)}
.expense-row strong{font-size:18px}
@media(max-width:900px){.budget-layout{grid-template-columns:1fr}.budget-cards{grid-template-columns:repeat(2,1fr)}.budget-row{grid-template-columns:1fr 1fr}.budget-row-actions{grid-column:1/-1}.expense-row{grid-template-columns:1fr}.expense-row>div:last-child{display:flex;gap:6px}}
@media(max-width:520px){.budget-cards{grid-template-columns:1fr}}
