/* FAMILY KPI V5.3 — polish, Lucide icons, real avatars, mobile-first Member */
.icon-svg{width:1em;height:1em;display:inline-block;vertical-align:-.15em;stroke-width:2.15}
.ico .icon-svg{width:19px;height:19px;vertical-align:0}.stat-icon .icon-svg{width:23px;height:23px}.kan-task-icon .icon-svg,.task-icon .icon-svg{width:22px;height:22px}.kan-icon .icon-svg{width:16px;height:16px}.side-logo .icon-svg{width:27px;height:27px}.welcome-sun .icon-svg{width:34px;height:34px}.goal-icon .icon-svg{width:20px;height:20px}.goal-prize-icon .icon-svg{width:27px;height:27px}
.avatar,.top-avatar,.mini-avatar{overflow:hidden;position:relative}.avatar img,.top-avatar img,.mini-avatar img,.member-hero-avatar img,.avatar-preview img{width:100%;height:100%;display:block;object-fit:cover}.avatar-fallback{width:100%;height:100%;display:grid;place-items:center;background:linear-gradient(145deg,#e1f7f0,#c7efe1);color:#08755a;font-weight:950}.avatar-fallback .icon-svg{width:55%;height:55%}.top-avatar{font-size:0}.top-avatar .avatar-fallback{font-size:13px}.mini-avatar{font-size:0}.mini-avatar .avatar-fallback{font-size:8px}
.logout-btn{display:flex;align-items:center;gap:6px;border:1px solid var(--line);background:#fff;color:#4e6372;border-radius:10px;padding:8px 10px;font-size:11px;font-weight:900}.logout-btn:hover{background:#f4f8f6;color:#08755a}.logout-btn .icon-svg{width:16px;height:16px}
.modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.modal-close{width:34px;height:34px;border:0;border-radius:10px;background:#f3f6f5;color:#5e6f7b;display:grid;place-items:center}.modal-close .icon-svg{width:18px;height:18px}.modal-saving{opacity:.72;pointer-events:none}.btn[disabled]{cursor:not-allowed;opacity:.58}
.template-pick{border:1px solid #dce7e2;background:linear-gradient(180deg,#f8fcfa,#fff);border-radius:14px;padding:12px}.template-pick-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;align-items:end}.template-pick .field{gap:5px}.template-hint{font-size:9px;color:#75858e;font-weight:700;margin-top:7px}
.template-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.template-card{border:1px solid var(--line);background:#fff;border-radius:14px;padding:12px;display:flex;gap:10px;align-items:flex-start}.template-icon{width:38px;height:38px;border-radius:10px;background:#edf8f4;color:#08775e;display:grid;place-items:center;flex:0 0 auto}.template-icon .icon-svg{width:20px;height:20px}.template-copy{min-width:0;flex:1}.template-title{font-size:12px;font-weight:950}.template-meta{font-size:9px;color:#7b8991;font-weight:750;margin-top:3px}.template-actions{display:flex;gap:5px;margin-top:8px}.template-actions .btn{padding:6px 8px;font-size:9px}
.avatar-uploader{border:1px dashed #bfcfca;border-radius:14px;padding:12px;background:#fafdfc;display:flex;align-items:center;gap:12px}.avatar-preview{width:72px;height:72px;border-radius:50%;overflow:hidden;background:#eaf9f3;display:grid;place-items:center;flex:0 0 auto;border:3px solid #fff;box-shadow:0 4px 14px rgba(16,36,58,.09)}.avatar-preview .icon-svg{width:30px;height:30px;color:#0a8a67}.avatar-upload-copy{min-width:0}.avatar-upload-title{font-size:11px;font-weight:950}.avatar-upload-sub{font-size:9px;color:#7a8992;line-height:1.5;margin-top:3px}.avatar-file{margin-top:8px;max-width:100%;font-size:10px}
.firebase-health{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-top:12px}.health-item{background:#f7faf8;border-radius:11px;padding:10px}.health-item b{font-size:13px}.health-item span{display:block;font-size:8px;color:#75838d;font-weight:800;margin-top:2px}.health-ok{color:#0a8a67}
.member-hero-main{display:flex;align-items:center;gap:14px}.member-hero-avatar{width:58px;height:58px;border-radius:50%;overflow:hidden;border:3px solid rgba(255,255,255,.75);background:rgba(255,255,255,.14);flex:0 0 auto}.member-mobile-tabs{display:none}.member-mobile-tab{border:1px solid var(--line);background:#fff;border-radius:11px;padding:9px 7px;font-size:10px;font-weight:900;color:#61717e}.member-mobile-tab.active{background:#0a9e72;color:#fff;border-color:#0a9e72}.member-mobile-tab .tab-count{display:inline-grid;place-items:center;min-width:19px;height:19px;padding:0 5px;border-radius:999px;background:rgba(16,36,58,.08);margin-left:3px;font-size:8px}.member-mobile-tab.active .tab-count{background:rgba(255,255,255,.18)}
.member-task-action{min-height:42px;font-size:11px!important}.task-money-zero{color:#7b8794!important}.live-status{display:inline-flex;align-items:center;gap:5px;color:#0b8a66;font-size:9px;font-weight:850}.live-status:before{content:"";width:7px;height:7px;border-radius:50%;background:#16c784;box-shadow:0 0 0 3px rgba(22,199,132,.13)}
@media(max-width:1100px){.template-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.content-topbar{padding:0 16px}.logout-btn span{display:none}.logout-btn{width:38px;height:38px;padding:0;justify-content:center}}
@media(min-width:681px) and (max-width:1024px){.member-kanban{grid-template-columns:repeat(2,minmax(0,1fr))!important;overflow:visible!important}.member-kanban .kan-col{min-width:0!important}.member-kanban .kan-col:last-child{grid-column:1/-1}.member-side{grid-template-columns:repeat(2,1fr)!important}.member-side>*:last-child{grid-column:1/-1}.kan-task-title{font-size:13px}.kan-reward{font-size:14px}}
@media(max-width:680px){
  .content-topbar{position:sticky;top:0;z-index:55;height:64px;padding:0 10px;background:rgba(255,255,255,.96)}
  .welcome-wrap{gap:8px}.welcome-sun{display:none}.welcome-title{font-size:17px!important;white-space:normal;line-height:1.15}.welcome-sub{display:none}.top-actions{gap:6px}.date-chip,.icon-btn{display:none}.top-user{gap:5px}.top-name,.top-role{display:none!important}.top-avatar{width:38px;height:38px}.logout-btn{display:grid!important;width:38px;height:38px;padding:0;place-items:center;border-radius:50%;background:#f4f8f6}.logout-btn span{display:none}
  .main{padding:12px 10px 90px}.page-title{font-size:22px}.page-sub{font-size:11px;line-height:1.45}.page-head{margin-bottom:12px}
  .member-hero{padding:15px;border-radius:16px;gap:11px}.member-hero-main{align-items:flex-start}.member-hero-avatar{width:54px;height:54px}.member-hero-title{font-size:20px}.member-hero-sub{font-size:10px;line-height:1.45}.member-balance{font-size:27px}
  .member-mobile-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:12px 0 8px;position:sticky;top:70px;z-index:20;background:#f4f8f6;padding:4px 0}
  .member-board{display:block!important;margin-top:8px}.member-side{grid-template-columns:1fr!important;margin-bottom:10px}.member-side .progress-card{padding:13px}.progress-num{font-size:21px}.reward-ladder{grid-template-columns:repeat(3,1fr)!important}.reward-step{padding:7px 5px}.reward-step .amt{font-size:11px}
  .member-kanban{display:block!important;overflow:visible!important}.member-kanban .kan-col{display:none;min-width:0!important;min-height:0!important;border-radius:14px;padding:9px}.member-kanban .kan-col.mobile-active{display:block}.kan-list{gap:9px}.kan-card{padding:13px;border-radius:14px}.kan-task-icon{width:44px;height:44px}.kan-task-icon .icon-svg{width:24px;height:24px}.kan-task-title{font-size:14px;line-height:1.3}.kan-reward{font-size:15px}.kan-member,.cat-tag,.time-tag{font-size:10px}.kan-actions .btn{min-height:44px;font-size:11px!important}.kan-head{padding-bottom:8px}.kan-title{font-size:14px}.kan-count{height:25px}
  .mobile-nav{left:6px!important;right:6px!important;bottom:6px!important;border-radius:17px!important;padding:5px!important}.mobile-nav button{font-size:8px!important;padding:6px 2px!important}.mobile-nav button span{font-size:0!important;margin-bottom:2px!important}.mobile-nav button .icon-svg{width:19px;height:19px}
  .template-grid{grid-template-columns:1fr}.template-pick-row{grid-template-columns:1fr}.template-pick-row .btn{width:100%}.modal-backdrop{padding:8px;align-items:flex-end}.modal{width:100%;max-height:92vh;border-radius:20px 20px 0 0;padding:17px}.modal-actions{position:sticky;bottom:-17px;background:#fff;padding:11px 0 2px;z-index:3}.modal-actions .btn{min-height:43px;flex:1}.avatar-uploader{align-items:flex-start}.firebase-health{grid-template-columns:1fr}.grid-4{grid-template-columns:repeat(2,1fr)!important;gap:8px}.grid-4 .stat{padding:11px;min-height:86px}.grid-4 .stat.has-icon{grid-template-columns:35px 1fr;gap:8px}.grid-4 .stat-icon{width:35px;height:35px}.grid-4 .stat-value{font-size:19px}.grid-4 .stat-note{display:none}
}
