*{box-sizing:border-box;margin:0;padding:0}body{color:#333;background:#f5f5f5;font-family:Ubuntu,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.login-page{justify-content:center;align-items:center;min-height:100vh;display:flex}.login-form{background:#fff;border-radius:8px;flex-direction:column;gap:1rem;width:320px;padding:2rem;display:flex;box-shadow:0 2px 8px #0000001a}.login-form h1{text-align:center;color:#2c5f2d}.layout{min-height:100vh;display:flex}.sidebar{color:#fff;background:#2c5f2d;flex-direction:column;width:220px;padding:1.5rem 1rem;display:flex}.sidebar h2{margin-bottom:1.5rem;font-size:1.2rem}.sidebar nav{flex-direction:column;flex:1;gap:.5rem;display:flex}.sidebar nav a{color:#cde6cd;border-radius:4px;padding:.5rem .75rem;text-decoration:none}.sidebar nav a.active,.sidebar nav a:hover{color:#fff;background:#ffffff26}.sidebar-footer{border-top:1px solid #fff3;flex-direction:column;gap:.5rem;margin-top:auto;padding-top:1rem;font-size:.85rem;display:flex}.sidebar-footer button{color:#fff;cursor:pointer;background:#ffffff26;border:none;border-radius:4px;padding:.4rem}.content{flex:1;padding:2rem;overflow-y:auto}input,select{border:1px solid #ddd;border-radius:4px;padding:.5rem;font-size:.9rem}button{cursor:pointer;color:#fff;background:#2c5f2d;border:none;border-radius:4px;padding:.5rem 1rem;font-size:.9rem}button:hover{opacity:.9}button.danger{background:#c0392b}.back-btn{background:#666;margin-bottom:1rem}.inline-form{flex-wrap:wrap;align-items:center;gap:.5rem;margin-bottom:1.5rem;display:flex}.member-form{flex-direction:column;gap:.75rem;max-width:400px;margin-bottom:1.5rem;display:flex}table{border-collapse:collapse;background:#fff;border-radius:8px;width:100%;overflow:hidden;box-shadow:0 1px 4px #0000000f}th,td{text-align:left;border-bottom:1px solid #eee;padding:.6rem .8rem}th{background:#f9f9f9;font-size:.85rem;font-weight:600}.actions{flex-wrap:wrap;gap:.3rem;display:flex}.deceased-row{opacity:.6}.error{color:#c0392b;background:#fdecea;border-radius:4px;padding:.5rem;font-size:.85rem}.success{color:#2c5f2d;background:#e8f5e9;border-radius:4px;padding:.5rem;font-size:.85rem}.extra-fields{border:1px solid #eee;border-radius:4px;padding:.75rem}.extra-fields h4{color:#666;margin-bottom:.5rem;font-size:.85rem}.extra-row{justify-content:space-between;align-items:center;padding:.25rem 0;font-size:.85rem;display:flex}.extra-row button{color:#333;background:#eee;padding:.2rem .5rem;font-size:.8rem}.extra-add{gap:.3rem;margin-top:.5rem;display:flex}.extra-add input{flex:1;padding:.3rem;font-size:.8rem}.extra-add button{padding:.3rem .6rem}.page-header{gap:.5rem;margin-bottom:1rem;display:flex}.tree-container{padding:1rem 0}.tree-node{margin-bottom:.5rem}.tree-card{cursor:pointer;background:#fff;border:2px solid #2c5f2d;border-radius:8px;min-width:150px;padding:.6rem 1rem;display:inline-block}.tree-card.deceased{opacity:.7;border-color:#999}.tree-card.cross-family{border-style:dashed;border-color:#e67e22}.tree-meta{color:#666;gap:.5rem;margin-top:.25rem;font-size:.75rem;display:flex}.spouse-badge{color:#c0392b;margin-left:.5rem;font-size:.8rem}.linked-badge{color:#fff;background:#e67e22;border-radius:3px;padding:.1rem .4rem;font-size:.7rem}.tree-children{border-left:2px solid #ccc;margin-top:.3rem;margin-left:20px;padding-left:10px}.graph-container{background:#fff;border:1px solid #eee;border-radius:8px;overflow:auto}.graph-svg{display:block}.graph-edge{stroke:#999;stroke-width:2px}.graph-edge.parent_child{stroke:#2c5f2d}.graph-edge.spouse{stroke:#c0392b;stroke-dasharray:5 5}.graph-node{fill:#e8f5e9;stroke:#2c5f2d;stroke-width:2px}.graph-node.deceased{fill:#eee;stroke:#999}.graph-node.cross-family{fill:#fef3e2;stroke:#e67e22;stroke-dasharray:4 4}.graph-label{fill:#333;font-size:12px}.graph-legend{align-items:center;gap:1.5rem;padding:.75rem;font-size:.8rem;display:flex}.legend-line{vertical-align:middle;width:20px;height:3px;margin-right:4px;display:inline-block}.legend-line.parent_child{background:#2c5f2d}.legend-line.spouse{background:#c0392b;border-top:2px dashed #c0392b;height:0}.legend-node{vertical-align:middle;background:#fef3e2;border:2px dashed #e67e22;border-radius:3px;width:14px;height:14px;margin-right:4px;display:inline-block}.fixed-field-row{align-items:center;gap:.5rem;margin-bottom:.4rem;display:flex}.fixed-field-row label{color:#555;min-width:100px;font-size:.8rem}.fixed-field-row input{flex:1;padding:.35rem;font-size:.85rem}.drag-row{cursor:grab}.drag-row:active{cursor:grabbing}.drag-handle{cursor:grab;color:#999;width:30px;font-size:1.1rem}.hint{color:#888;margin-bottom:.5rem;font-size:.8rem}.rel-cards{margin-bottom:1.5rem}.member-card-grid{flex-wrap:wrap;gap:.5rem;margin-top:.5rem;display:flex}.rel-member-card{cursor:grab;text-align:center;background:#fff;border:2px solid #2c5f2d;border-radius:8px;min-width:100px;padding:.5rem .8rem;transition:transform .1s}.rel-member-card:active{cursor:grabbing;transform:scale(1.05)}.rel-member-card:hover{background:#e8f5e9}.card-gender{color:#666;font-size:.7rem;display:block}.modal-actions{gap:.5rem;margin-top:1rem;display:flex}.cross-family-search{max-width:400px;margin:1rem 0}.cross-family-search label{color:#555;margin-bottom:.3rem;font-size:.85rem;display:block}.cross-family-search input{width:100%}.search-results{background:#fff;border:1px solid #ddd;border-radius:4px;max-height:150px;margin-top:.25rem;list-style:none;overflow-y:auto}.search-results li{cursor:pointer;padding:.4rem .6rem;font-size:.85rem}.search-results li:hover{background:#e8f5e9}.search-results small{color:#888}.htree-container{padding:1rem;overflow:auto}.htree-root,.htree-children{flex-direction:column;margin:0;padding:0;list-style:none;display:flex}.htree-root{padding-left:0}.htree-item{flex-direction:row;align-items:flex-start;margin:.3rem 0;display:flex}.htree-card-wrap{position:relative}.htree-card{cursor:pointer;white-space:nowrap;background:#fff;border:2px solid #2c5f2d;border-radius:8px;min-width:120px;padding:.5rem .8rem}.htree-card.deceased{opacity:.7;border-color:#999}.htree-card.cross-family{border-style:dashed;border-color:#e67e22}.htree-children{border-left:2px solid #ccc;margin-left:2rem;padding-left:1rem}.modal-overlay{z-index:100;background:#0006;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.modal{background:#fff;border-radius:8px;width:90%;max-width:500px;max-height:80vh;padding:1.5rem;overflow-y:auto}.modal h2{margin-bottom:1rem}
