@charset "UTF-8";
:root{--green:#174b3a;--green2:#28674f;--gold:#b98a3d;--cream:#faf9f3;--ink:#1d392f;--muted:#788780;--line:#dfe8e3;--white:#fff}
.theme-blue{--green:#1e3a8a;--green2:#2563eb;--gold:#f59e0b;--cream:#f0f9ff;--ink:#0f172a}
.theme-brown{--green:#78350f;--green2:#b45309;--gold:#d97706;--cream:#fefce8;--ink:#451a03}
[data-theme="dark"]{--cream:#0f172a;--ink:#f8fafc;--line:#334155;--white:#1e293b;--muted:#94a3b8;--green:#0f766e;--green2:#14b8a6}
[data-theme="dark"].theme-blue{--green:#1d4ed8;--green2:#3b82f6}
[data-theme="dark"].theme-brown{--green:#92400e;--green2:#d97706}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--cream);color:var(--ink);font-family:Tahoma,Arial,sans-serif;line-height:1.7}a{text-decoration:none;color:inherit}button,input,select,textarea{font:inherit}.site-header{height:74px;background:var(--white);border-bottom:1px solid var(--line);position:relative;z-index:10}.header-inner{height:100%;max-width:1160px;margin:auto;padding:0 25px;display:flex;align-items:center;justify-content:space-between}.brand{display:flex;align-items:center;gap:10px}.brand-mark{width:40px;height:40px;border-radius:50%;background:var(--green);color:var(--white);display:grid;place-items:center;font-size:24px}.brand>span:last-child{display:flex;flex-direction:column;line-height:1.25}.brand b{font-size:19px;color:var(--green)}.brand small{font-size:9px;color:var(--muted)}.site-header nav{display:flex;align-items:center;gap:30px;font-size:12px;font-weight:bold;color:var(--ink)}.login-link{border:1px solid var(--line);border-radius:7px;padding:8px 14px;color:var(--green)}
.hero{min-height:520px;background:radial-gradient(circle at center,var(--white) 0,var(--cream) 55%,var(--line) 100%);position:relative;display:flex;justify-content:center;align-items:center;text-align:center;border-bottom:1px solid var(--line)}.hero:before{content:"";position:absolute;inset:0;background-image:radial-gradient(var(--muted) 1px,transparent 1px);background-size:24px 24px;opacity:.15}.hero-content{position:relative;max-width:670px;padding:45px 20px 105px}.eyebrow{color:var(--gold);font-size:11px;font-weight:bold;display:flex;align-items:center;justify-content:center;gap:10px}.eyebrow span{width:33px;height:1px;background:var(--gold)}.hero h1{font-family:Georgia,"Times New Roman",serif;font-size:clamp(46px,7vw,72px);line-height:1.08;color:var(--green);margin:14px 0}.hero h1 em{font-style:normal;color:var(--gold)}.hero p{font-size:14px;color:var(--muted);line-height:2;margin:0 auto 25px}.primary-button{display:inline-flex;justify-content:center;align-items:center;background:var(--green);color:var(--white);border:0;border-radius:8px;padding:11px 22px;font-weight:bold;font-size:12px;cursor:pointer;box-shadow:0 6px 16px rgba(0,0,0,0.1)}.primary-button:hover{background:var(--green2);transform:translateY(-1px)}.hero-stats{position:absolute;bottom:0;transform:translateY(50%);width:min(680px,90%);height:88px;background:var(--white);border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 30px rgba(0,0,0,0.05);display:flex;justify-content:space-evenly;align-items:center}.hero-stats div{display:flex;flex-direction:column}.hero-stats strong{font:700 26px Georgia;color:var(--green)}.hero-stats span{font-size:10px;color:var(--muted)}.hero-stats i{width:1px;height:35px;background:var(--line)}
.tree-section{background:var(--white);padding:105px 20px 85px}.section-title{text-align:center;margin-bottom:32px}.section-title>span{color:var(--gold);font-size:10px;font-weight:bold}.section-title h2{font:700 32px Georgia;margin:5px;color:var(--green)}.section-title p{font-size:12px;color:var(--muted);margin:0}.tree-shell{max-width:1160px;margin:auto;border:1px solid var(--line);border-radius:15px;overflow:hidden;background:var(--cream);box-shadow:0 10px 30px rgba(0,0,0,0.05)}.tree-toolbar{height:67px;background:var(--white);border-bottom:1px solid var(--line);padding:12px 18px;display:flex;justify-content:space-between;align-items:center}.tree-toolbar p{font-size:10px;color:var(--muted)}.search-box{height:39px;width:280px;border:1px solid var(--line);border-radius:7px;padding:0 11px;display:flex;align-items:center;gap:7px;color:var(--muted)}.search-box input{border:0;outline:0;min-width:0;flex:1;font-size:11px;background:transparent;color:var(--ink)}.tree-scroll{min-height:400px;overflow:auto;padding:45px 35px 60px}.family-tree,.family-tree ul{list-style:none;margin:0;padding:0}.family-tree{display:flex;justify-content:center;min-width:max-content}.tree-item{display:flex;position:relative;flex-direction:column;align-items:center;padding:0 11px}.tree-children{display:flex;justify-content:center;position:relative;padding-top:42px!important}.tree-children.collapsed{display:none}.tree-children:before{content:"";position:absolute;top:0;right:50%;height:21px;border-right:1px solid var(--line)}.tree-children>.tree-item:before{content:"";position:absolute;top:21px;right:0;left:0;border-top:1px solid var(--line)}.tree-children>.tree-item:first-child:before{right:50%}.tree-children>.tree-item:last-child:before{left:50%}.tree-children>.tree-item:only-child:before{display:none}.tree-children>.tree-item:after{content:"";position:absolute;top:21px;right:50%;height:21px;border-right:1px solid var(--line)}.person-card{width:220px;min-height:74px;background:var(--white);border:1px solid var(--line);border-top:3px solid var(--green2);border-radius:9px;padding:10px;display:flex;align-items:center;gap:9px;position:relative;z-index:2;box-shadow:0 4px 13px rgba(0,0,0,0.05)}.person-card.female{border-top-color:#b57d8a}.avatar,.mini-avatar{width:38px;height:38px;border-radius:50%;background:rgba(40,112,84,0.1);color:var(--green2);display:grid;place-items:center;font-weight:bold;flex:none}.female .avatar,.mini-avatar.female{background:rgba(168,102,118,0.1);color:#a86676}.person-card h3{font-size:11px;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:120px;color:var(--ink)}.person-card p{font-size:8px;color:var(--muted);margin:0}.person-card small{font-size:8px;color:var(--muted)}.branch-toggle{position:absolute;width:22px;height:22px;border-radius:50%;border:1px solid var(--line);background:var(--white);color:var(--green);bottom:-12px;left:calc(50% - 11px);cursor:pointer}.tree-item.search-hidden{display:none}.tree-item.search-match>.person-card{box-shadow:0 0 0 3px var(--gold),0 5px 15px rgba(0,0,0,0.2)}.tree-legend{height:48px;background:var(--white);border-top:1px solid var(--line);display:flex;align-items:center;justify-content:center;gap:22px;font-size:9px;color:var(--muted)}.tree-legend span{display:flex;align-items:center;gap:5px}.tree-legend i{width:8px;height:8px;border-radius:50%}.male-dot{background:#1e3a8a}.female-dot{background:#db2777}.empty-state{text-align:center;padding:60px;color:var(--muted)}.empty-state h3{margin:0;color:var(--ink)}.empty-state p{font-size:11px}.about-section{max-width:1080px;margin:0 auto 80px;border-radius:16px;background:var(--green);color:var(--white);padding:38px 45px;display:block;gap:25px;font-size:16px;line-height:1.8}.about-section *{color:inherit}.about-icon{width:66px;height:66px;border-radius:50%;background:#ffffff12;display:grid;place-items:center;color:var(--white);font-size:34px}.about-section span{font-size:9px;color:var(--gold)}.about-section h2{font:700 25px Georgia;margin:2px 0}.about-section p{font-size:15px;color:var(--cream);margin:0}.about-points{border-right:1px solid #ffffff20;padding-right:30px}.about-points p{color:var(--white);margin:8px}footer{min-height:110px;background:var(--white);border-top:1px solid var(--line);padding:20px max(25px,calc((100% - 1080px)/2));display:flex;align-items:center;justify-content:space-between}footer p{font-size:9px;color:var(--muted)}
/* Authentication and admin */.auth-page{min-height:calc(100vh - 184px);display:grid;place-items:center;padding:55px 20px;background:radial-gradient(circle,#fff,#f0f4ed)}.auth-card{width:min(420px,100%);background:#fff;border:1px solid var(--line);border-radius:16px;padding:32px 40px;text-align:center;box-shadow:0 18px 50px #2644361a}.auth-icon{width:55px;height:55px;border-radius:50%;background:#f8f1e3;color:var(--gold);display:grid;place-items:center;margin:auto;font-size:27px}.auth-card h1{font:700 26px Georgia;color:var(--green);margin:12px 0 0}.auth-card>p{font-size:10px;color:#86938d;margin:3px 0 20px}.form-grid{text-align:right;padding:20px;display:grid;grid-template-columns:1fr 1fr;gap:13px}.auth-card .form-grid{padding:0}.form-grid.one-col{grid-template-columns:1fr}.form-grid label{font-size:10px;font-weight:bold;color:#52645c}.form-grid input,.form-grid select,.form-grid textarea{display:block;width:100%;margin-top:4px;border:1px solid #d9e3dd;border-radius:7px;background:#fdfefd;padding:9px 10px;outline:0;font-size:11px}.form-grid input,.form-grid select{height:40px}.form-grid input:focus,.form-grid select:focus,.form-grid textarea:focus{border-color:#719986;box-shadow:0 0 0 3px #28674f0c}.form-grid .full{grid-column:1/-1}.alert{max-width:1160px;margin:0 auto 15px;padding:10px 13px;border-radius:7px;font-size:11px}.alert.error{background:#fceeee;border:1px solid #efd5d5;color:#a13d3d}.alert.success{background:#edf7f1;border:1px solid #d3e8db;color:#26704d}.admin-page{min-height:calc(100vh - 184px);background:#f4f6f3}.admin-container{max-width:1160px;margin:auto;padding:38px 25px 70px}.admin-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}.admin-title span{font-size:9px;color:var(--gold);font-weight:bold}.admin-title h1{font:700 27px Georgia;color:var(--green);margin:0}.admin-title p{font-size:10px;color:#85918c;margin:0}.admin-actions{display:flex;align-items:center;gap:7px}.admin-actions form{margin:0}.outline-button{display:inline-flex;border:1px solid #d2ded8;background:#fff;color:var(--green);border-radius:7px;padding:8px 13px;font-size:10px;font-weight:bold;cursor:pointer}.outline-button.danger{color:#a34c4c}.stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin-bottom:18px}.stat-card{height:88px;background:#fff;border:1px solid var(--line);border-radius:10px;padding:16px;display:flex;align-items:center;gap:13px}.stat-card>span{width:46px;height:46px;border-radius:8px;background:#e8f1ec;color:var(--green2);display:grid;place-items:center;font-size:22px}.stat-card div{display:flex;flex-direction:column}.stat-card b{font:700 24px Georgia;color:#29463a}.stat-card small{font-size:9px;color:#87938d}.admin-grid{display:grid;grid-template-columns:1.05fr .95fr;gap:18px;align-items:start}.panel{background:#fff;border:1px solid var(--line);border-radius:11px;overflow:hidden}.panel-heading{height:70px;border-bottom:1px solid #e8edea;padding:13px 20px}.panel-heading h2{font-size:14px;margin:0;color:#344b41}.panel-heading p{font-size:9px;color:#88958e;margin:0}.members-list{padding:4px 17px;max-height:520px;overflow:auto}.member-row{height:61px;border-bottom:1px solid #edf0ee;display:flex;align-items:center;gap:9px}.member-row:last-child{border:0}.mini-avatar{width:34px;height:34px}.member-row>div{display:flex;flex:1;min-width:0;flex-direction:column}.member-row b{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.member-row small{font-size:8px;color:#89968f}.member-row form{display:flex}.icon-button{border:0;background:none;color:#85938c;padding:7px;cursor:pointer;font-size:17px}.icon-button.delete{color:#b36565}.icon-button:disabled{opacity:.25;cursor:not-allowed}.cancel-link{text-align:center;font-size:10px;color:#7b8a83}.admin-page footer{display:none}
@media(max-width:780px){.main-menu{display:none !important}.left-menu .dropdown:not(:has(.login-link)){display:none}.header-inner{padding:0 16px;gap:10px}.hero{min-height:560px}.hero h1{font-size:47px}.hero-content{padding-bottom:120px}.tree-section{padding:90px 9px 60px}.tree-toolbar{height:auto;flex-direction:column;gap:5px}.tree-toolbar p{margin:0}.search-box{width:100%}.tree-scroll{padding:35px 12px 50px}.about-section{margin:0 13px 55px;padding:28px 22px;display:block;text-align:center}.about-icon{margin:auto}.about-points{border:0;border-top:1px solid #ffffff20;padding:12px 0 0;display:flex;flex-wrap:wrap;justify-content:center}footer{flex-direction:column;gap:10px}.admin-container{padding:27px 13px}.admin-title p{display:none}.stat-grid{grid-template-columns:1fr}.stat-card{height:73px}.admin-grid{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.form-grid .full{grid-column:1}.auth-card{padding:28px 22px}.admin-title h1{font-size:21px}.site-header .brand small{display:none}}
/* Modals */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 999; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(3px); }
.modal-content { background: #fff; width: min(500px, 95%); border-radius: 12px; padding: 20px; box-shadow: 0 10px 40px rgba(0,0,0,0.1); max-height: 90vh; overflow-y: auto; direction: rtl; text-align: right; }
.modal-lg { width: min(700px, 95%); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; border-bottom: 1px solid #e2e8f0; padding-bottom: 10px; }
.modal-header h2 { margin: 0; font-size: 18px; color: #1e293b; }
.close-modal { background: none; border: none; font-size: 24px; cursor: pointer; color: #64748b; padding: 0; line-height: 1; transition: 0.2s; }
.close-modal:hover { color: #ef4444; }
.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 12px; font-weight: bold; color: #475569; margin-bottom: 5px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; border: 1px solid #cbd5e1; border-radius: 6px; padding: 8px 10px; font-size: 13px; font-family: inherit; }
.form-group input[type="checkbox"] { width: auto; margin: 0; }
.form-group-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.checkbox-group label { display: flex; align-items: center; gap: 8px; font-size: 11px; margin-bottom: 5px; font-weight: normal; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; border-top: 1px solid #e2e8f0; padding-top: 15px; }
.btn-save { background: #16a34a; color: #fff; border: none; padding: 8px 16px; border-radius: 6px; cursor: pointer; font-weight: bold; font-size: 13px; }
.btn-cancel { background: #f1f5f9; color: #475569; border: none; padding: 8px 16px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 15px; }
.gallery-item { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid #e2e8f0; aspect-ratio: 1; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-actions { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.6); display: flex; justify-content: center; padding: 5px; opacity: 0; transition: 0.2s; gap: 5px; }
.gallery-item:hover .gallery-actions { opacity: 1; }
.btn-set-main { background: #3b82f6; color: #fff; border: none; padding: 4px 8px; border-radius: 4px; font-size: 10px; cursor: pointer; }
.upload-section { background: #f8fafc; padding: 15px; border-radius: 8px; border: 1px dashed #cbd5e1; margin-bottom: 15px; }
.profile-header { text-align: center; margin-bottom: 20px; }
.profile-avatar { width: 160px; height: 160px; border-radius: 50%; background: #e2e8f0; margin: 0 auto 15px; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 50px; color: #94a3b8; box-shadow: 0 4px 15px rgba(0,0,0,0.1); border: 4px solid #fff; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-header h2 { margin: 0; color: #0f172a; }
.profile-header p { margin: 5px 0 0; color: #64748b; font-size: 13px; }
.profile-bio { background: #f8fafc; padding: 15px; border-radius: 8px; font-size: 13px; color: #334155; border-left: 3px solid #cbd5e1; }
