*{box-sizing:border-box;margin:0;padding:0}body{color:#333;background:#f5f5f5;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;font-size:14px;line-height:1.5}.auth-page{background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);justify-content:center;align-items:center;min-height:100vh;display:flex}.auth-card{background:#fff;border-radius:12px;width:100%;max-width:400px;padding:40px;box-shadow:0 10px 40px #0003}.auth-card h1{text-align:center;margin-bottom:8px;font-size:24px}.auth-card>p{text-align:center;color:#666;margin-bottom:24px}.auth-card form{flex-direction:column;gap:12px;display:flex}.auth-card input,.auth-card select,.task-form input,.task-form select,.task-form textarea,.project-form input,.project-form select,.project-form textarea{background:#fafafa;border:1px solid #ddd;border-radius:6px;width:100%;padding:10px 12px;font-size:14px}.auth-card input:focus,.auth-card select:focus,.task-form input:focus,.task-form select:focus,.task-form textarea:focus,.project-form input:focus,.project-form select:focus,.project-form textarea:focus{background:#fff;border-color:#667eea;outline:none}.auth-card button,.btn-primary{color:#fff;cursor:pointer;background:#667eea;border:none;border-radius:6px;padding:12px;font-size:14px;font-weight:600;transition:background .2s}.auth-card button:hover,.btn-primary:hover{background:#5568d3}.btn-primary:disabled{opacity:.6;cursor:not-allowed}.btn-secondary{color:#333;cursor:pointer;background:#eee;border:none;border-radius:6px;padding:8px 16px;font-size:14px}.btn-secondary:hover{background:#ddd}.btn-sm{cursor:pointer;border:none;border-radius:4px;margin-right:4px;padding:4px 10px;font-size:12px}.btn-sm.success{color:#155724;background:#d4edda}.btn-sm.danger{color:#721c24;background:#f8d7da}.error{color:#dc3545;font-size:13px}.switch{text-align:center;color:#666;margin-top:16px;font-size:13px}.switch button{color:#667eea;cursor:pointer;background:0 0;border:none;font-size:13px;text-decoration:underline}.page{min-height:100vh}.topbar{z-index:10;background:#fff;border-bottom:1px solid #eee;justify-content:space-between;align-items:center;padding:16px 24px;display:flex;position:sticky;top:0}.topbar h2{font-size:18px}.topbar p{color:#888;font-size:13px}.back-link{color:#667eea;cursor:pointer;background:0 0;border:none;margin-bottom:4px;font-size:13px;text-decoration:none;display:inline-block}.back-link:hover{text-decoration:underline}.content{max-width:1200px;margin:0 auto;padding:24px}.page-header{justify-content:space-between;align-items:center;margin-bottom:24px;display:flex}.page-header h3{font-size:20px}.project-grid{grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px;display:grid}.project-card{color:inherit;background:#fff;border-radius:10px;text-decoration:none;transition:transform .2s,box-shadow .2s;display:block;overflow:hidden;box-shadow:0 2px 8px #00000014}.project-card:hover{transform:translateY(-2px);box-shadow:0 4px 16px #0000001f}.project-card-image{background-color:#f0f0f0;background-position:50%;background-size:cover;width:100%;height:160px}.project-card-image-placeholder{background:linear-gradient(135deg,#667eea22,#764ba222);justify-content:center;align-items:center;font-size:36px;display:flex}.project-card-image-placeholder span{opacity:.4}.project-card-body{padding:14px 16px 16px}.project-card-header{justify-content:space-between;align-items:center;margin-bottom:6px;display:flex}.project-card-header h4{font-size:16px}.project-date{color:#888;margin:4px 0 6px;font-size:12px}.project-desc{color:#666;-webkit-line-clamp:2;-webkit-box-orient:vertical;margin:0 0 10px;font-size:13px;display:-webkit-box;overflow:hidden}.project-meta{color:#888;justify-content:space-between;font-size:12px;display:flex}.status{text-transform:uppercase;border-radius:12px;padding:2px 8px;font-size:11px;font-weight:600;display:inline-block}.status.active{color:#155724;background:#d4edda}.status.completed{color:#004085;background:#cce5ff}.status.cancelled{color:#721c24;background:#f8d7da}.badge{text-transform:capitalize;border-radius:4px;padding:2px 8px;font-size:11px;font-weight:600;display:inline-block}.badge.pending{color:#856404;background:#fff3cd}.badge.approved{color:#155724;background:#d4edda}.badge.rejected{color:#721c24;background:#f8d7da}.badge.todo{color:#383d41;background:#e2e3e5}.badge.in_progress{color:#004085;background:#cce5ff}.badge.done{color:#155724;background:#d4edda}.tabs{border-bottom:1px solid #eee;gap:4px;margin-bottom:20px;padding-bottom:4px;display:flex}.tabs button{cursor:pointer;color:#666;background:0 0;border:none;border-radius:6px 6px 0 0;padding:8px 16px;font-size:14px;transition:all .2s}.tabs button:hover{background:#f0f0f0}.tabs button.active{color:#fff;background:#667eea}.kanban{grid-template-columns:repeat(3,1fr);gap:16px;display:grid}.kanban-col{background:#f8f9fa;border-radius:8px;min-height:200px;padding:12px}.kanban-col h4{color:#666;margin-bottom:12px;font-size:14px}.task-card{background:#fff;border-radius:6px;margin-bottom:8px;padding:12px;box-shadow:0 1px 4px #00000014}.task-title{margin-bottom:4px;font-size:14px;font-weight:500}.task-desc{color:#666;margin-bottom:6px;font-size:12px}.task-meta{color:#888;font-size:11px}.task-status-select{background:#fafafa;border:1px solid #ddd;border-radius:4px;width:100%;margin-top:8px;padding:4px;font-size:12px}.task-form{background:#fff;border-radius:8px;flex-direction:column;gap:12px;max-width:500px;margin-bottom:20px;padding:20px;display:flex;box-shadow:0 2px 8px #0000001a}.task-form h4{margin-bottom:4px}.btn-row{gap:8px;display:flex}.gantt{background:#fff;border-radius:8px;overflow-x:auto}.gantt-header{border-bottom:1px solid #eee;padding:8px 0;font-size:12px;font-weight:600;display:flex}.gantt-header>span{flex-shrink:0;width:150px;padding-left:12px}.gantt-timeline{display:flex}.gantt-day{text-align:center;color:#888;flex-shrink:0;width:30px;padding:2px 0;font-size:10px}.gantt-day.today{color:#856404;background:#fff3cd;font-weight:700}.gantt-row{border-bottom:1px solid #f0f0f0;align-items:center;padding:6px 0;display:flex}.gantt-task-name{white-space:nowrap;text-overflow:ellipsis;flex-shrink:0;width:150px;padding-left:12px;font-size:13px;overflow:hidden}.gantt-bar-container{flex:1;height:20px;position:relative}.gantt-bar{border-radius:4px;min-width:20px;height:18px;position:absolute;top:1px}.gantt-bar.todo{background:#e2e3e5}.gantt-bar.in_progress{background:#667eea}.gantt-bar.done{background:#28a745}.data-table{border-collapse:collapse;background:#fff;border-radius:8px;width:100%;overflow:hidden;box-shadow:0 2px 8px #00000014}.data-table th{text-align:left;color:#666;background:#f8f9fa;border-bottom:1px solid #eee;padding:12px 16px;font-size:12px;font-weight:600}.data-table td{border-bottom:1px solid #f0f0f0;padding:12px 16px;font-size:14px}.data-table tr:last-child td{border-bottom:none}.data-table tr:hover td{background:#fafafa}.pnl-table{background:#fff;border-radius:8px;width:100%;max-width:400px;margin-bottom:24px;overflow:hidden;box-shadow:0 2px 8px #00000014}.pnl-table td{border-bottom:1px solid #f0f0f0;padding:14px 20px;font-size:14px}.pnl-table tr:last-child td{border-bottom:none}.pnl-table tr.highlight td{background:#d4edda;font-weight:600}.pnl-table td:last-child{text-align:right;font-weight:600}.member-list{background:#fff;border-radius:8px;flex-direction:column;gap:8px;max-height:300px;padding:12px;display:flex;overflow-y:auto;box-shadow:0 2px 8px #00000014}.member-item{cursor:pointer;border-radius:6px;align-items:center;gap:8px;padding:8px;transition:background .2s;display:flex}.member-item:hover{background:#f0f0f0}.member-item input[type=checkbox]{width:16px;height:16px}.member-item span:first-of-type{font-size:14px}.hint{color:#888;font-size:12px}.project-form{background:#fff;border-radius:10px;flex-direction:column;gap:16px;max-width:600px;padding:24px;display:flex;box-shadow:0 2px 8px #00000014}.project-form label{color:#555;margin-bottom:4px;font-size:13px;font-weight:600;display:block}.project-form .row{grid-template-columns:1fr 1fr;gap:12px;display:grid}.project-form textarea{resize:vertical;min-height:80px}.empty{color:#888;padding:20px 0;font-size:14px}.file-upload-wrapper{margin:8px 0}.file-upload-wrapper label{color:#555;margin-bottom:4px;font-size:13px;font-weight:600;display:block}.file-upload-wrapper input[type=file]{background:#fafafa;border:1px solid #ddd;border-radius:6px;width:100%;padding:8px}.file-name{color:#667eea;margin-top:4px;font-size:12px;display:block}.file-link{color:#667eea;font-size:13px;text-decoration:none}.file-link:hover{text-decoration:underline}.no-file{color:#aaa}.project-card-wrapper{position:relative}.project-card-wrapper .project-card{display:block;overflow:hidden}.btn-edit-project{cursor:pointer;opacity:0;z-index:2;background:#f0f0f0;border:1px solid #ddd;border-radius:8px;justify-content:center;align-items:center;width:32px;height:32px;font-size:14px;transition:opacity .2s;display:flex;position:absolute;top:12px;right:12px}.project-card-wrapper:hover .btn-edit-project{opacity:1}.btn-edit-project:hover{background:#e0e0e0}.modal-overlay{z-index:100;background:#0006;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.modal{background:#fff;border-radius:12px;width:480px;max-width:95vw;max-height:90vh;padding:28px;overflow-y:auto;box-shadow:0 20px 60px #00000026}.modal h3{margin:0 0 20px;font-size:18px}.form-group{margin-bottom:14px}.form-group label{color:#555;margin-bottom:4px;font-size:13px;font-weight:600;display:block}.form-group input,.form-group textarea,.form-group select{box-sizing:border-box;border:1px solid #ddd;border-radius:6px;width:100%;padding:8px 10px;font-size:14px}.form-group input:focus,.form-group textarea:focus{border-color:#667eea;outline:none}.form-row{grid-template-columns:1fr 1fr;gap:12px;display:grid}.modal-actions{justify-content:flex-end;gap:10px;margin-top:20px;display:flex}.project-image-edit{align-items:center;gap:12px;display:flex}.project-image-preview{background-position:50%;background-size:cover;border:1px solid #ddd;border-radius:8px;width:100px;height:70px;position:relative}.project-image-placeholder-edit{color:#999;background:#f5f5f5;border:1px solid #ddd;border-radius:8px;justify-content:center;align-items:center;width:100px;height:70px;font-size:12px;display:flex}.btn-remove-image{color:#fff;cursor:pointer;background:#f44;border:none;border-radius:50%;justify-content:center;align-items:center;width:20px;height:20px;font-size:10px;display:flex;position:absolute;top:-6px;right:-6px}.btn-upload-image{color:#fff;cursor:pointer;background:#667eea;border-radius:6px;padding:8px 14px;font-size:13px;display:inline-block}.btn-upload-image:hover{background:#5a6fd6}.btn-upload-image input{display:none}.lightbox-overlay{z-index:200;cursor:pointer;background:#000000eb;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.lightbox-image{object-fit:contain;cursor:default;border-radius:8px;max-width:90vw;max-height:85vh}.lightbox-close{color:#fff;cursor:pointer;background:#ffffff26;border:none;border-radius:50%;justify-content:center;align-items:center;width:40px;height:40px;font-size:22px;display:flex;position:absolute;top:16px;right:20px}.lightbox-close:hover{background:#ffffff40}.lightbox-prev,.lightbox-next{color:#fff;cursor:pointer;background:#ffffff26;border:none;border-radius:50%;justify-content:center;align-items:center;width:50px;height:50px;font-size:28px;display:flex;position:absolute;top:50%;transform:translateY(-50%)}.lightbox-prev{left:16px}.lightbox-next{right:16px}.lightbox-prev:hover,.lightbox-next:hover{background:#ffffff40}.lightbox-footer{color:#ffffffb3;cursor:default;align-items:center;gap:16px;font-size:14px;display:flex;position:absolute;bottom:20px;left:50%;transform:translate(-50%)}.project-gallery-edit{grid-template-columns:repeat(auto-fill,minmax(90px,1fr));gap:10px;margin-top:8px;display:grid}.gallery-thumb{border:1px solid #ddd;border-radius:8px;width:90px;height:70px;position:relative;overflow:hidden}.gallery-thumb img{object-fit:cover;width:100%;height:100%}.gallery-thumb-pdf{background:#f5f5f5;justify-content:center;align-items:center;width:100%;height:100%;font-size:28px;display:flex}.gallery-thumb-del{color:#fff;cursor:pointer;opacity:0;background:#ff0000d9;border:none;border-radius:50%;justify-content:center;align-items:center;width:20px;height:20px;font-size:10px;transition:opacity .2s;display:flex;position:absolute;top:2px;right:2px}.gallery-thumb:hover .gallery-thumb-del{opacity:1}.gallery-upload-btn{color:#888;cursor:pointer;border:2px dashed #ccc;border-radius:8px;justify-content:center;align-items:center;width:90px;height:70px;font-size:13px;transition:border-color .2s,color .2s;display:flex}.gallery-upload-btn:hover{color:#667eea;border-color:#667eea}.gallery-upload-btn input{display:none}.image-count-badge{color:#fff;background:#0009;border-radius:10px;padding:2px 8px;font-size:11px;position:absolute;bottom:8px;right:8px}.image-gallery-icon{opacity:0;cursor:pointer;background:#fffc;border-radius:50%;justify-content:center;align-items:center;width:40px;height:40px;font-size:22px;transition:opacity .2s;display:flex;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.project-card-image:hover .image-gallery-icon{opacity:1}.modal-wide{width:560px}.lightbox-pdf{text-align:center;color:#fff;background:#ffffff0d;border-radius:12px;flex-direction:column;justify-content:center;align-items:center;padding:60px 80px;display:flex}.lightbox-pdf-icon{margin-bottom:16px;font-size:80px}.lightbox-pdf p{opacity:.7;margin:0;font-size:18px}.member-list-edit{background:#f8f9fa;border-radius:8px;flex-direction:column;gap:6px;max-height:180px;margin-bottom:10px;padding:8px;display:flex;overflow-y:auto}.member-item-edit{background:#fff;border:1px solid #eee;border-radius:6px;justify-content:space-between;align-items:center;padding:6px 8px;display:flex}.member-info-edit{align-items:center;gap:8px;display:flex}.member-name{font-size:13px;font-weight:500}.member-role-badge{color:#555;background:#e8e8ff;border-radius:10px;padding:2px 8px;font-size:11px}.btn-remove-member{color:#fff;cursor:pointer;opacity:.7;background:#f44;border:none;border-radius:50%;justify-content:center;align-items:center;width:24px;height:24px;font-size:11px;display:flex}.btn-remove-member:hover{opacity:1}.no-members-hint{color:#999;margin-bottom:8px;font-size:12px}.add-member-form{align-items:center;gap:8px;margin-top:8px;display:flex}.add-member-form select{border:1px solid #ddd;border-radius:6px;flex:1;padding:6px 8px;font-size:13px}.add-member-form select:first-child{flex:2}.btn-add-member{color:#fff;cursor:pointer;white-space:nowrap;background:#667eea;border:none;border-radius:6px;padding:6px 12px;font-size:13px}.btn-add-member:hover{background:#5568d3}
