:root{
    --primary:#167A5A;
    --primary-dark:#0F5D45;
    --primary-soft:#E7F4EE;
    --secondary:#8FBCA9;
    --gold:#D7B56D;
    --cream:#F7F3EA;
    --surface:#FFFFFF;
    --surface-2:#FBFCFA;
    --line:#E8ECE7;
    --text:#22352E;
    --muted:#70827A;
    --danger:#A14B40;
    --danger-soft:#FFF1EE;
    --success-soft:#EAF7F0;
    --shadow-sm:0 8px 22px rgba(34,53,46,.05);
    --shadow-md:0 14px 40px rgba(34,53,46,.08);
    --shadow-lg:0 24px 55px rgba(34,53,46,.12);
    --radius-xl:32px;
    --radius-lg:24px;
    --radius-md:18px;
    --radius-sm:14px;
}

*{box-sizing:border-box}
html{background:var(--cream)}
body{
    margin:0;
    min-height:100vh;
    font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    color:var(--text);
    background:
        radial-gradient(circle at 20% 0%, rgba(255,255,255,.95), transparent 26%),
        radial-gradient(circle at 100% 0%, rgba(143,188,169,.16), transparent 28%),
        linear-gradient(180deg, #FBF8F2 0%, #F5F1E8 100%);
}

button,a,input,select,textarea{
    -webkit-tap-highlight-color: transparent;
    font:inherit;
}
input,select,textarea{color:var(--text)}
img{max-width:100%}

.app-shell{
    width:min(100%, 760px);
    margin:0 auto;
    padding:24px 18px 116px;
}
.content{display:grid;gap:18px}

/* ========= TYPOGRAPHY & GLOBAL ========= */
.eyebrow,
.soft-label{
    display:inline-block;
    font-size:.73rem;
    font-weight:900;
    letter-spacing:.12em;
    text-transform:uppercase;
    color:var(--primary);
}
.muted{
    margin:0;
    color:var(--muted);
    font-size:.93rem;
    line-height:1.55;
}
.topbar{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    margin-bottom:20px;
}
.topbar h1{
    margin:7px 0 4px;
    font-size:clamp(2rem, 5vw, 2.8rem);
    line-height:1.06;
    letter-spacing:-.04em;
    color:#18332B;
}
.topbar h2{
    margin:7px 0 4px;
    font-size:clamp(1.5rem, 4vw, 2rem);
}
.icon-button,
.icon-link,
.round-action{
    width:48px;
    height:48px;
    display:grid;
    place-items:center;
    flex:0 0 auto;
    text-decoration:none;
    border-radius:50%;
    border:1px solid rgba(255,255,255,.9);
    background:rgba(255,255,255,.82);
    box-shadow:var(--shadow-sm);
    color:var(--primary);
    font-weight:900;
}
.round-action,
.nav-add,
.primary-button,
.primary-link-button,
.secondary-small-button{
    background:linear-gradient(180deg, #1A8967 0%, #13694E 100%);
    color:#fff;
    border:none;
}
.round-action{
    font-size:1.7rem;
    box-shadow:0 14px 30px rgba(22,122,90,.22);
}
.back-link{
    display:inline-block;
    margin-bottom:10px;
    color:var(--primary);
    font-size:.84rem;
    font-weight:800;
    text-decoration:none;
}

/* ========= CARD SYSTEM ========= */
.section,
.form-card,
.auth-card,
.profile-card,
.hero-card,
.empty-state,
.quote-card{
    background:rgba(255,255,255,.94);
    border:1px solid rgba(255,255,255,.95);
    box-shadow:var(--shadow-md);
}

.section,
.form-card,
.auth-card,
.profile-card,
.empty-state,
.quote-card{
    border-radius:var(--radius-xl);
}

.hero-card{
    position:relative;
    overflow:hidden;
    display:grid;
    grid-template-columns:126px 1fr;
    gap:22px;
    align-items:center;
    padding:24px;
    border-radius:34px;
    background:
        radial-gradient(circle at 78% 16%, rgba(255,241,209,.8) 0 4%, transparent 4.2%),
        linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,.18)),
        linear-gradient(180deg, #F7FBF8 0%, #FDFBF6 100%);
}
.hero-card::before{
    content:"";
    position:absolute;
    inset:0;
    background:
        radial-gradient(circle at 82% 22%, rgba(245,205,112,.25), transparent 10%),
        linear-gradient(180deg, transparent 0 50%, rgba(24,122,90,.05) 50%),
        radial-gradient(circle at 82% 52%, rgba(22,122,90,.13) 0 12%, transparent 12.5%),
        radial-gradient(circle at 92% 40%, rgba(22,122,90,.1) 0 6%, transparent 6.5%),
        linear-gradient(180deg, rgba(194,214,204,.18), transparent 40%);
    pointer-events:none;
}
.hero-card > *{position:relative;z-index:1}
.hero-copy h2{
    margin:9px 0 7px;
    font-size:1.5rem;
    line-height:1.14;
    letter-spacing:-.03em;
    color:#17352C;
}
.hero-copy p{
    margin:0;
    color:var(--muted);
    line-height:1.65;
}
.inline-action,
.manage-habits-link{
    display:inline-block;
    margin-top:13px;
    color:var(--primary);
    font-weight:800;
    text-decoration:none;
}
.section{
    padding:20px;
}
.section-heading{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:14px;
    margin-bottom:14px;
}
.section-heading h2{
    margin:5px 0 0;
    font-size:1.35rem;
    line-height:1.15;
}
.count{
    color:var(--primary);
    font-weight:900;
}

/* ========= PROGRESS RING ========= */
.progress-ring{
    width:126px;
    aspect-ratio:1;
    position:relative;
    display:grid;
    place-items:center;
    border-radius:50%;
    background:conic-gradient(var(--primary) calc(var(--progress) * 1%), #E7ECE8 0);
    box-shadow:inset 0 0 0 8px rgba(255,255,255,.6);
}
.progress-ring::before{
    content:"";
    position:absolute;
    width:92px;
    aspect-ratio:1;
    border-radius:50%;
    background:#fff;
    box-shadow:inset 0 0 0 1px rgba(15,93,69,.05);
}
.progress-inner{
    position:relative;
    z-index:1;
    display:grid;
    text-align:center;
}
.progress-inner strong{
    font-size:2rem;
    line-height:1;
    color:#0F2E25;
    font-weight:900;
}
.progress-inner span{
    margin-top:5px;
    font-size:.75rem;
    color:var(--muted);
}

/* ========= MINI STATS ========= */
.mini-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:12px;
}
.mini-card{
    display:flex;
    align-items:center;
    gap:12px;
    min-height:82px;
    padding:17px 18px;
    border-radius:22px;
    background:rgba(255,255,255,.92);
    border:1px solid rgba(255,255,255,.94);
    box-shadow:var(--shadow-sm);
}
.mini-icon{
    width:46px;
    height:46px;
    flex:0 0 auto;
    border-radius:16px;
    display:grid;
    place-items:center;
    background:linear-gradient(180deg,#EDF7F2,#E1F1E9);
    color:var(--primary);
    font-size:1.22rem;
}
.mini-card strong,.mini-card small{display:block}
.mini-card strong{font-size:1rem}
.mini-card small{margin-top:3px;color:var(--muted)}

/* ========= DASHBOARD HABITS ========= */
.habit-list{
    display:grid;
    gap:10px;
}
.habit-check-form{margin:0}
.habit-row{
    width:100%;
    border:none;
    display:grid;
    grid-template-columns:40px 1fr auto;
    align-items:center;
    gap:12px;
    text-align:left;
    padding:14px 14px;
    border-radius:18px;
    background:var(--surface);
    box-shadow:0 2px 0 rgba(34,53,46,.03), 0 8px 18px rgba(34,53,46,.035);
    color:var(--text);
    transition:transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.habit-row:hover{box-shadow:0 10px 22px rgba(34,53,46,.06)}
.habit-row:active{transform:scale(.988)}
.habit-row.done{
    background:#F8FCFA;
}
.check-circle{
    width:34px;
    height:34px;
    display:grid;
    place-items:center;
    border-radius:50%;
    border:2px solid #C5D1CB;
    color:#fff;
    font-weight:900;
    box-shadow:inset 0 0 0 3px rgba(255,255,255,.8);
}
.habit-row.done .check-circle{
    border-color:var(--primary);
    background:linear-gradient(180deg,#1A8D69,#136A4F);
}
.habit-text strong,
.habit-text small{
    display:block;
}
.habit-text strong{
    font-size:.98rem;
    line-height:1.25;
}
.habit-text small{
    margin-top:4px;
    color:var(--muted);
    font-size:.8rem;
}
.habit-arrow,
.check-status{
    color:var(--muted);
    font-size:.76rem;
    font-weight:800;
}
.habit-check-row.done .check-status{
    color:var(--primary);
}
.habit-check-row.done .habit-text strong{color:#4B5A54}
.habit-check-row.done .habit-text small{color:#8A9691}
.habit-check-row:focus-visible{
    outline:3px solid rgba(22,122,90,.18);
    outline-offset:2px;
}
.dashboard-empty{
    padding:20px;
    text-align:center;
    border-radius:18px;
    background:#F5F8F6;
}
.dashboard-empty p{margin:0 0 8px;color:var(--muted)}
.dashboard-empty a{color:var(--primary);font-weight:800;text-decoration:none}

/* ========= QUOTE ========= */
.quote-card{
    position:relative;
    overflow:hidden;
    padding:22px 22px 20px;
    background:
        linear-gradient(180deg, #F7FBF7 0%, #F7F3EA 100%);
}
.quote-card::after{
    content:"";
    position:absolute;
    right:-18px;
    bottom:-18px;
    width:92px;
    height:92px;
    background:radial-gradient(circle at center, rgba(22,122,90,.14), transparent 62%);
    pointer-events:none;
}
.quote-mark{
    display:block;
    color:var(--primary);
    font-size:2.5rem;
    line-height:.75;
}
.quote-card p{
    margin:10px 0 8px;
    font-size:1rem;
    line-height:1.65;
}
.quote-card small{color:var(--muted)}

/* ========= BOTTOM NAV ========= */
.bottom-nav{
    position:fixed;
    left:50%;
    bottom:max(14px, env(safe-area-inset-bottom));
    transform:translateX(-50%);
    width:min(calc(100% - 24px), 690px);
    height:74px;
    padding:8px 12px;
    border-radius:28px;
    display:grid;
    grid-template-columns:repeat(5,1fr);
    align-items:center;
    background:rgba(255,255,255,.94);
    border:1px solid rgba(255,255,255,.98);
    backdrop-filter:blur(20px);
    box-shadow:0 22px 44px rgba(31,46,40,.16);
    z-index:50;
}
.nav-item{
    text-decoration:none;
    color:#7A8B84;
    display:grid;
    place-items:center;
    gap:3px;
    font-size:.69rem;
    font-weight:700;
}
.nav-item.active{color:var(--primary)}
.nav-icon{font-size:1.18rem}
.nav-add{
    width:56px;
    height:56px;
    justify-self:center;
    display:grid;
    place-items:center;
    border-radius:50%;
    text-decoration:none;
    font-size:2rem;
    line-height:1;
    box-shadow:0 18px 28px rgba(22,122,90,.28);
}

/* ========= INSTALL BANNER ========= */
.install-banner{
    position:fixed;
    left:50%;
    bottom:98px;
    transform:translateX(-50%);
    width:min(calc(100% - 28px), 650px);
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding:14px 16px;
    border-radius:18px;
    background:#1E4036;
    color:#fff;
    box-shadow:var(--shadow-lg);
    z-index:70;
}
.install-banner[hidden]{display:none}
.install-banner small{
    display:block;
    margin-top:3px;
    color:#DDE8E3;
}
.install-banner button{
    min-height:42px;
    border:none;
    border-radius:12px;
    padding:0 14px;
    background:#fff;
    color:var(--primary-dark);
    font-weight:800;
}

/* ========= FLASH ========= */
.flash{
    position:fixed;
    top:16px;
    left:50%;
    transform:translateX(-50%);
    width:min(calc(100% - 28px), 620px);
    padding:13px 16px;
    border-radius:16px;
    box-shadow:var(--shadow-md);
    font-size:.92rem;
    z-index:100;
    animation:flash-in .25s ease both;
}
.flash-success{
    background:var(--success-soft);
    color:#205643;
    border:1px solid #D5ECDf;
}
.flash-error{
    background:var(--danger-soft);
    color:#8A3C32;
    border:1px solid #F1D6D1;
}
@keyframes flash-in{
    from{opacity:0;transform:translate(-50%,-8px)}
    to{opacity:1;transform:translate(-50%,0)}
}

/* ========= AUTH ========= */
.auth-page{
    min-height:100vh;
    display:grid;
    place-items:center;
    padding:24px 0;
}
.auth-shell{
    width:min(100%, 560px);
    padding:18px;
}
.auth-card{
    padding:clamp(24px, 5vw, 36px);
}
.auth-brand{
    display:grid;
    grid-template-columns:64px 1fr;
    gap:16px;
    align-items:center;
    margin-bottom:26px;
}
.brand-mark{
    width:64px;
    height:64px;
    border-radius:20px;
    display:grid;
    place-items:center;
    background:linear-gradient(180deg,#1A8A67,#13694E);
    color:#fff;
    font:700 2rem Georgia,serif;
    box-shadow:0 14px 28px rgba(22,122,90,.2);
}
.auth-brand h1{
    margin:4px 0 4px;
    font-size:1.75rem;
    letter-spacing:-.04em;
}
.auth-brand p{
    margin:0;
    color:var(--muted);
    line-height:1.55;
    font-size:.92rem;
}
.auth-form{
    display:grid;
    gap:16px;
}
.auth-switch{
    margin:22px 0 0;
    text-align:center;
    color:var(--muted);
    font-size:.92rem;
}
.auth-switch a{
    color:var(--primary);
    text-decoration:none;
    font-weight:800;
}

/* ========= FORMS ========= */
.form-card{padding:22px}
.habit-form{display:grid;gap:17px}
.form-group{
    display:grid;
    gap:7px;
    font-size:.89rem;
    font-weight:800;
    color:#405049;
}
.form-group span small{
    color:var(--muted);
    font-weight:600;
}
.form-group input,
.form-group select{
    width:100%;
    min-height:54px;
    border:1px solid #DFE6E1;
    border-radius:18px;
    padding:0 15px;
    outline:none;
    background:#FBFCFB;
    color:var(--text);
    transition:border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .18s ease;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.8);
}
.form-group input::placeholder{color:#8A9791}
.form-group input:focus,
.form-group select:focus,
textarea:focus{
    border-color:#AFD0C0;
    background:#fff;
    box-shadow:0 0 0 4px rgba(143,188,169,.16);
}
.password-field{position:relative}
.password-field input{padding-right:74px}
.password-toggle{
    position:absolute;
    top:50%;
    right:8px;
    transform:translateY(-50%);
    border:none;
    background:transparent;
    color:var(--primary);
    font-size:.77rem;
    font-weight:800;
    padding:10px 8px;
    cursor:pointer;
}
.form-grid-2{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
}
.day-fieldset{
    margin:0;
    padding:0;
    border:none;
}
.day-fieldset legend{
    margin-bottom:9px;
    font-size:.89rem;
    font-weight:800;
    color:#405049;
}
.day-picker{
    display:grid;
    grid-template-columns:repeat(7, minmax(0,1fr));
    gap:6px;
}
.day-chip input{
    position:absolute;
    opacity:0;
    pointer-events:none;
}
.day-chip span{
    min-height:42px;
    display:grid;
    place-items:center;
    border-radius:14px;
    border:1px solid #E2E8E3;
    background:#F6F8F7;
    color:var(--muted);
    font-size:.75rem;
    font-weight:800;
    cursor:pointer;
}
.day-chip input:checked + span{
    color:#fff;
    background:linear-gradient(180deg,#1A8967,#13694E);
    border-color:transparent;
}
.switch-row{
    padding:15px 16px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    border-radius:18px;
    background:#F6FAF7;
    border:1px solid #E5ECE7;
}
.switch-row strong,.switch-row small{display:block}
.switch-row small{
    margin-top:3px;
    color:var(--muted);
    font-size:.79rem;
}
.switch-row input{
    width:22px;
    height:22px;
    accent-color:var(--primary);
}
.primary-button,
.danger-button{
    width:100%;
    min-height:54px;
    border-radius:17px;
    font-weight:900;
    cursor:pointer;
}
.primary-button{
    box-shadow:0 16px 28px rgba(22,122,90,.18);
}
.primary-button:active,
.danger-button:active,
.secondary-small-button:active,
.ghost-small-button:active,
.delete-small-button:active{
    transform:translateY(1px);
}
.danger-button{
    background:var(--danger-soft);
    border:1px solid #F1D5CF;
    color:var(--danger);
}
.form-alert{
    margin-bottom:18px;
    padding:14px 15px;
    border-radius:16px;
    color:#823B33;
    background:#FFF1EE;
    border:1px solid #F1D8D2;
    font-size:.89rem;
    line-height:1.6;
}
.form-alert ul{
    margin:7px 0 0;
    padding-left:18px;
}

/* ========= HABIT MANAGEMENT ========= */
.filter-chips{
    display:flex;
    gap:8px;
    overflow-x:auto;
    scrollbar-width:none;
}
.filter-chips::-webkit-scrollbar{display:none}
.filter-chips a{
    flex:0 0 auto;
    padding:10px 15px;
    border-radius:999px;
    background:rgba(255,255,255,.88);
    border:1px solid #E3E8E4;
    color:var(--muted);
    text-decoration:none;
    font-size:.84rem;
    font-weight:800;
}
.filter-chips a.active{
    color:#fff;
    background:linear-gradient(180deg,#1A8967,#13694E);
    border-color:transparent;
}
.empty-state{
    padding:42px 24px;
    text-align:center;
}
.empty-icon{
    width:68px;
    height:68px;
    margin:0 auto 16px;
    display:grid;
    place-items:center;
    border-radius:22px;
    background:linear-gradient(180deg,#EDF7F2,#E3F1EA);
    color:var(--primary);
    font-size:1.7rem;
    font-weight:900;
}
.empty-state h2{margin:0 0 8px}
.empty-state p{
    margin:0 auto 20px;
    max-width:360px;
    line-height:1.6;
    color:var(--muted);
}
.primary-link-button{
    display:inline-block;
    padding:13px 18px;
    border-radius:16px;
    text-decoration:none;
    font-weight:800;
}
.habit-manage-list{
    display:grid;
    gap:12px;
}
.habit-manage-card{
    padding:18px;
    border-radius:24px;
    background:rgba(255,255,255,.92);
    border:1px solid rgba(255,255,255,.95);
    box-shadow:var(--shadow-sm);
}
.habit-manage-card.inactive{opacity:.68}
.habit-main{
    display:grid;
    grid-template-columns:44px 1fr;
    gap:13px;
}
.category-dot{
    width:44px;
    height:44px;
    border-radius:15px;
    display:grid;
    place-items:center;
    background:linear-gradient(180deg,#EDF7F2,#E2F1EA);
    color:var(--primary);
    font-weight:900;
}
.habit-info h2{
    margin:0;
    font-size:1.05rem;
}
.habit-info p{
    margin:6px 0 0;
    color:var(--muted);
    line-height:1.55;
    font-size:.88rem;
}
.habit-title-line{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}
.status-pill{
    padding:4px 9px;
    border-radius:999px;
    background:#F1F4F2;
    color:#7A8781;
    font-size:.69rem;
    font-weight:800;
}
.habit-meta,
.habit-submeta{
    display:flex;
    flex-wrap:wrap;
    gap:7px;
    margin-top:9px;
    font-size:.78rem;
}
.habit-meta{
    color:var(--primary);
    font-weight:800;
}
.habit-submeta{
    color:var(--muted);
}
.habit-card-actions{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-top:16px;
    padding-top:14px;
    border-top:1px solid var(--line);
}
.habit-card-actions form{margin:0}
.secondary-small-button,
.ghost-small-button,
.delete-small-button{
    min-height:38px;
    padding:0 12px;
    border-radius:12px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:.78rem;
    font-weight:800;
    text-decoration:none;
    cursor:pointer;
}
.ghost-small-button{
    color:var(--primary);
    background:#F3F7F5;
    border:1px solid #DAE7E0;
}
.delete-small-button{
    color:var(--danger);
    background:#FFF4F1;
    border:1px solid #F3D7D1;
}

/* ========= PROFILE ========= */
.profile-card{
    display:flex;
    align-items:center;
    gap:16px;
    padding:20px;
    background:linear-gradient(180deg,#FFFFFF,#F7FBF8);
}
.profile-avatar{
    width:68px;
    height:68px;
    flex:0 0 auto;
    display:grid;
    place-items:center;
    border-radius:24px;
    background:linear-gradient(180deg,#1A8A67,#13694E);
    color:#fff;
    font-size:1.75rem;
    font-weight:900;
}
.profile-card h2{
    margin:0 0 5px;
}
.profile-card p{
    margin:0;
    color:var(--muted);
}
.profile-list{display:grid;gap:4px}
.profile-row{
    display:grid;
    grid-template-columns:110px 1fr;
    gap:12px;
    padding:14px 4px;
    border-bottom:1px solid var(--line);
}
.profile-row:last-child{border-bottom:0}
.profile-row span{color:var(--muted)}
.profile-row strong{overflow-wrap:anywhere}

/* ========= HELPERS ========= */
.habit-row-link{text-decoration:none}

/* ========= RESPONSIVE ========= */
@media (max-width: 560px){
    .app-shell{padding-top:20px}
    .hero-card{
        grid-template-columns:1fr;
        justify-items:start;
    }
    .progress-ring{
        width:112px;
    }
    .progress-ring::before{
        width:82px;
    }
}
@media (max-width: 500px){
    .form-grid-2{
        grid-template-columns:1fr;
    }
    .day-picker{
        gap:5px;
    }
    .day-chip span{
        min-height:40px;
        font-size:.68rem;
    }
}
@media (max-width: 430px){
    .auth-brand{
        grid-template-columns:52px 1fr;
    }
    .brand-mark{
        width:52px;
        height:52px;
        border-radius:17px;
        font-size:1.65rem;
    }
    .profile-row{
        grid-template-columns:1fr;
        gap:5px;
    }
}
@media (display-mode: standalone){
    body{overscroll-behavior-y:none}
}


/* =========================================================
   MOCKUP-ACCURATE MOBILE LAYOUT v3.5
   ========================================================= */

.app-page .app-shell{
    width:min(100%, 520px);
    padding:0 12px 110px;
}
.phone-screen{
    width:100%;
    margin:0 auto;
}

/* --- Dashboard cover --- */
.dashboard-screen{
    padding-top:12px;
}
.dashboard-cover{
    position:relative;
    min-height:270px;
    overflow:hidden;
    padding:18px 20px 30px;
    border-radius:0 0 34px 34px;
    background:
        linear-gradient(90deg, rgba(239,249,246,.25), rgba(255,244,224,.12)),
        url("../img/dashboard-scene.svg") center bottom/cover no-repeat;
    box-shadow:0 18px 42px rgba(40,65,56,.08);
}
.cover-toolbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
}
.mini-brand-mark{
    width:36px;
    height:36px;
    display:grid;
    place-items:center;
    border-radius:12px;
    color:#0e704f;
    background:rgba(255,255,255,.72);
    border:1px solid rgba(255,255,255,.9);
    font-size:1.2rem;
    font-weight:900;
}
.cover-actions{
    display:flex;
    align-items:center;
    gap:9px;
}
.cover-circle,
.cover-avatar{
    width:40px;
    height:40px;
    display:grid;
    place-items:center;
    border-radius:50%;
    background:rgba(255,255,255,.84);
    border:1px solid rgba(255,255,255,.96);
    box-shadow:0 8px 18px rgba(40,65,56,.06);
    color:#176c50;
    text-decoration:none;
    font-weight:900;
}
.dashboard-greeting{
    margin-top:20px;
    max-width:285px;
}
.dashboard-greeting > span{
    display:block;
    font-size:1.04rem;
    font-weight:800;
    color:#1a4337;
}
.dashboard-greeting h1{
    margin:2px 0 8px;
    font-family:Georgia, "Times New Roman", serif;
    font-size:2.45rem;
    line-height:.98;
    letter-spacing:-.04em;
    color:#154334;
}
.dashboard-greeting h1 small{
    font-family:system-ui,sans-serif;
    font-size:1.25rem;
}
.dashboard-greeting p{
    margin:0;
    display:flex;
    align-items:center;
    gap:6px;
    color:#48655b;
    font-size:.82rem;
    font-weight:700;
}

/* overlapping progress panel */
.progress-panel{
    position:relative;
    z-index:3;
    margin:-38px 16px 0;
    min-height:164px;
    padding:20px;
    display:grid;
    grid-template-columns:128px 1fr;
    align-items:center;
    gap:17px;
    border-radius:28px;
    background:rgba(255,255,255,.97);
    border:1px solid rgba(255,255,255,.98);
    box-shadow:0 18px 40px rgba(35,60,51,.12);
}
.mock-ring{
    width:122px;
}
.mock-ring::before{
    width:91px;
}
.progress-message h2{
    margin:0;
    font-size:1.35rem;
    line-height:1.03;
    color:#17342c;
}
.progress-title-row{
    display:flex;
    align-items:flex-start;
    gap:7px;
}
.tiny-accent{
    color:#2a8a67;
    font-size:1.25rem;
}
.arabic-soft{
    margin-top:6px;
    color:#177553;
    font-family:Georgia, serif;
    font-size:1.15rem;
}
.progress-message p{
    margin:5px 0 0;
    color:#687b73;
    font-size:.78rem;
    line-height:1.45;
}

/* summary cards */
.summary-pair{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
    margin:12px 16px 0;
}
.summary-card{
    min-height:76px;
    display:grid;
    grid-template-columns:40px 1fr auto;
    align-items:center;
    gap:9px;
    padding:13px 13px;
    border-radius:21px;
    background:#fff;
    border:1px solid #eef1ef;
    box-shadow:0 9px 24px rgba(35,60,51,.06);
}
.summary-symbol{
    width:40px;
    height:40px;
    display:grid;
    place-items:center;
    border-radius:14px;
    font-size:1.15rem;
    font-weight:900;
}
.fire-symbol{
    background:#fff3eb;
    color:#e57136;
}
.trophy-symbol{
    background:#fff7df;
    color:#c89225;
}
.summary-card strong,
.summary-card small{
    display:block;
}
.summary-card strong{
    color:#243d35;
    font-size:.96rem;
}
.summary-card small{
    margin-top:2px;
    color:#778a82;
    font-size:.72rem;
}
.summary-chevron{
    color:#82938c;
    font-size:1.2rem;
}

/* habits card on dashboard */
.daily-habits-card{
    margin:12px 16px 0;
    padding:17px 14px 13px;
    border-radius:27px;
    background:rgba(255,255,255,.95);
    border:1px solid rgba(255,255,255,.98);
    box-shadow:0 12px 30px rgba(35,60,51,.06);
}
.mock-section-title{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin:0 4px 10px;
    color:#27433a;
}
.mock-section-title > div{
    display:flex;
    align-items:center;
    gap:7px;
}
.mock-section-title > span{
    color:#1a7656;
    font-size:.85rem;
    font-weight:900;
}
.section-symbol{
    color:#16805c;
    font-size:1rem;
}
.mock-habit-list{
    display:grid;
}
.mock-habit-form{
    margin:0;
}
.mock-habit-row{
    width:100%;
    display:grid;
    grid-template-columns:34px 38px 1fr auto;
    align-items:center;
    gap:9px;
    padding:10px 5px;
    border:none;
    border-bottom:1px solid #edf0ee;
    background:transparent;
    color:#243a33;
    text-align:left;
    cursor:pointer;
}
.mock-habit-form:last-child .mock-habit-row{
    border-bottom:none;
}
.mock-check{
    width:30px;
    height:30px;
    display:grid;
    place-items:center;
    border-radius:50%;
    border:1.8px solid #71877e;
    color:#fff;
    font-size:.85rem;
    font-weight:900;
}
.mock-habit-row.done .mock-check{
    background:#16805c;
    border-color:#16805c;
    box-shadow:0 5px 12px rgba(22,128,92,.22);
}
.habit-symbol{
    width:34px;
    height:34px;
    display:grid;
    place-items:center;
    border-radius:10px;
    font-weight:900;
    font-size:1rem;
}
.category-ibadah{
    color:#147352;
    background:#e9f5ef;
}
.category-ilmu{
    color:#237497;
    background:#ebf4f8;
}
.category-diri{
    color:#d2655c;
    background:#fff0ed;
}
.category-lainnya{
    color:#8c7a51;
    background:#f6f0e5;
}
.mock-habit-copy strong,
.mock-habit-copy small{
    display:block;
}
.mock-habit-copy strong{
    font-size:.88rem;
    line-height:1.25;
}
.mock-habit-copy small{
    margin-top:2px;
    color:#829089;
    font-size:.72rem;
}
.habit-time{
    min-width:43px;
    color:#67827a;
    font-size:.73rem;
    text-align:right;
}
.mock-empty{
    padding:20px 8px;
    text-align:center;
    color:#71847c;
}
.mock-empty strong{
    display:block;
    margin-bottom:7px;
}
.mock-empty a{
    color:#177755;
    text-decoration:none;
    font-weight:800;
}

/* dashboard quote */
.mock-quote{
    margin:12px 16px 4px;
    display:grid;
    grid-template-columns:35px 1fr;
    gap:9px;
    padding:16px 18px;
    border-radius:23px;
    background:linear-gradient(135deg,#f6f7ec,#edf6ef);
    border:1px solid #e5ece6;
}
.quote-icon{
    color:#167653;
    font-size:2.2rem;
    line-height:.9;
}
.mock-quote p{
    margin:0;
    color:#315149;
    font-size:.8rem;
    line-height:1.45;
}
.mock-quote small{
    display:block;
    margin-top:5px;
    color:#74877f;
    font-size:.68rem;
}

/* --- shared page header --- */
.mock-page-header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:14px;
    padding:24px 12px 12px;
}
.mock-page-header h1{
    margin:0 0 4px;
    font-size:1.55rem;
    letter-spacing:-.035em;
    color:#22382f;
}
.mock-page-header p{
    margin:0;
    color:#7a8a83;
    font-size:.82rem;
}
.mock-header-action,
.mock-share{
    width:42px;
    height:42px;
    display:grid;
    place-items:center;
    flex:0 0 auto;
    border-radius:14px;
    background:#fff;
    border:1px solid #ecf0ed;
    box-shadow:0 7px 18px rgba(35,60,51,.05);
    color:#196f52;
    text-decoration:none;
    font-size:1.35rem;
    font-weight:700;
}

/* --- Habit page exact layout --- */
.habits-screen{
    padding:0 6px 12px;
}
.habit-search-bar{
    margin:6px 10px 10px;
    height:48px;
    display:grid;
    grid-template-columns:32px 1fr 38px;
    align-items:center;
    padding:0 7px 0 9px;
    border-radius:20px;
    background:#f0f2ef;
    border:1px solid #edf0ee;
}
.habit-search-bar > span{
    color:#526c62;
    font-size:1.1rem;
    text-align:center;
}
.habit-search-bar input{
    width:100%;
    border:none;
    outline:none;
    background:transparent;
    color:#385149;
    font-size:.82rem;
}
.habit-search-bar button{
    width:34px;
    height:34px;
    border:none;
    border-radius:12px;
    background:#fff;
    color:#526c62;
    font-weight:900;
    cursor:pointer;
}
.category-filter{
    display:flex;
    gap:7px;
    padding:0 10px 8px;
    overflow-x:auto;
    scrollbar-width:none;
}
.category-filter::-webkit-scrollbar{
    display:none;
}
.category-filter a{
    flex:0 0 auto;
    display:flex;
    align-items:center;
    gap:5px;
    min-height:34px;
    padding:0 10px;
    border-radius:999px;
    border:1px solid #e7ebe8;
    background:#fff;
    color:#687c73;
    text-decoration:none;
    font-size:.72rem;
    font-weight:800;
}
.category-filter a.active{
    color:#fff;
    background:#187c5a;
    border-color:#187c5a;
}
.habit-status-shortcuts{
    display:flex;
    gap:10px;
    padding:0 12px 6px;
}
.habit-status-shortcuts a{
    color:#86938d;
    text-decoration:none;
    font-size:.67rem;
    font-weight:700;
}
.habit-status-shortcuts a.active{
    color:#187857;
}
.grouped-habits{
    display:grid;
    gap:14px;
    padding:4px 10px;
}
.habit-group h2{
    margin:0 0 7px 3px;
    display:flex;
    align-items:center;
    gap:6px;
    color:#344d44;
    font-size:.82rem;
}
.group-icon{
    width:21px;
    height:21px;
    display:grid;
    place-items:center;
    border-radius:7px;
    font-size:.7rem;
}
.habit-catalog-list{
    display:grid;
    gap:8px;
}
.habit-catalog-row{
    display:grid;
    grid-template-columns:42px 1fr auto 34px;
    align-items:center;
    gap:9px;
    min-height:67px;
    padding:10px 11px;
    border-radius:18px;
    background:#fff;
    border:1px solid #edf0ee;
    box-shadow:0 7px 16px rgba(35,60,51,.04);
    color:#2f463e;
    text-decoration:none;
}
.habit-catalog-row.inactive{
    opacity:.58;
}
.habit-catalog-icon{
    width:40px;
    height:40px;
    display:grid;
    place-items:center;
    border-radius:12px;
    font-size:1rem;
    font-weight:900;
}
.habit-catalog-copy{
    min-width:0;
}
.habit-catalog-copy strong,
.habit-catalog-copy small{
    display:block;
}
.habit-catalog-copy strong{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:.8rem;
}
.habit-catalog-copy small{
    margin-top:3px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:#89958f;
    font-size:.67rem;
}
.target-pill{
    max-width:78px;
    padding:6px 8px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    border-radius:999px;
    background:#eef7f2;
    color:#2b805f;
    font-size:.62rem;
    font-weight:800;
}
.mini-progress{
    width:29px;
    height:29px;
    display:block;
    position:relative;
    border-radius:50%;
    background:conic-gradient(#d7ddd9 100%, #d7ddd9 0);
}
.mini-progress::after{
    content:"";
    position:absolute;
    inset:5px;
    border-radius:50%;
    background:#fff;
}
.mini-progress.complete{
    background:conic-gradient(#19805d 100%, #d7ddd9 0);
}
.habit-edit-hint{
    margin:11px 12px 0;
    text-align:center;
    color:#9aa59f;
    font-size:.65rem;
}
.mock-list-empty{
    margin:18px 10px;
    padding:30px 20px;
    text-align:center;
    border-radius:24px;
    background:#fff;
    border:1px solid #edf0ee;
}
.mock-list-empty > span{
    width:52px;
    height:52px;
    margin:0 auto 10px;
    display:grid;
    place-items:center;
    border-radius:17px;
    background:#eaf5ef;
    color:#187b59;
    font-size:1.35rem;
}
.mock-list-empty h2{
    margin:0 0 5px;
    font-size:1.05rem;
}
.mock-list-empty p{
    margin:0 0 14px;
    color:#84928c;
    font-size:.78rem;
    line-height:1.5;
}
.mock-list-empty a{
    color:#187957;
    text-decoration:none;
    font-weight:800;
    font-size:.8rem;
}

/* --- Statistics page exact layout --- */
.statistics-screen{
    padding:0 8px 16px;
}
.stats-header{
    padding-bottom:10px;
}
.period-tabs{
    margin:0 8px 10px;
    height:46px;
    display:grid;
    grid-template-columns:repeat(3,1fr);
    align-items:center;
    padding:5px;
    border-radius:18px;
    background:#fff;
    border:1px solid #edf0ee;
}
.period-tabs span{
    height:36px;
    display:grid;
    place-items:center;
    border-radius:14px;
    color:#6f8079;
    font-size:.72rem;
    font-weight:800;
}
.period-tabs span.active{
    color:#fff;
    background:#177c5a;
    box-shadow:0 7px 15px rgba(23,124,90,.18);
}
.average-card,
.stat-card{
    margin:10px 8px 0;
    border-radius:22px;
    background:#fff;
    border:1px solid #edf0ee;
    box-shadow:0 8px 20px rgba(35,60,51,.045);
}
.average-card{
    min-height:106px;
    padding:16px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
}
.average-card small{
    display:block;
    color:#3d534b;
    font-size:.75rem;
    font-weight:800;
}
.average-card strong{
    display:inline-block;
    margin-top:5px;
    color:#213a31;
    font-size:2rem;
    line-height:1;
}
.growth-pill{
    display:inline-block;
    margin-left:6px;
    padding:4px 7px;
    border-radius:999px;
    background:#e9f5ef;
    color:#207a5a;
    font-size:.6rem;
    font-weight:800;
    vertical-align:top;
}
.mini-bars{
    width:90px;
    height:56px;
    display:flex;
    align-items:flex-end;
    justify-content:flex-end;
    gap:6px;
}
.mini-bars i{
    width:9px;
    height:var(--h);
    min-height:10px;
    border-radius:5px 5px 2px 2px;
    background:#19805d;
}
.stat-card{
    padding:15px;
}
.stat-card h2{
    margin:0 0 12px;
    color:#2c443b;
    font-size:.82rem;
}
.weekly-chart{
    height:140px;
    display:grid;
    grid-template-columns:repeat(7,1fr);
    align-items:end;
    gap:7px;
}
.chart-day{
    height:100%;
    display:grid;
    grid-template-rows:22px 1fr 20px;
    align-items:end;
    justify-items:center;
}
.chart-percent{
    color:#6b8077;
    font-size:.58rem;
    font-weight:800;
}
.bar-track{
    width:100%;
    height:92px;
    display:flex;
    align-items:flex-end;
    justify-content:center;
}
.bar-track i{
    width:20px;
    height:var(--bar);
    min-height:5px;
    max-height:92px;
    display:block;
    border-radius:8px 8px 5px 5px;
    background:linear-gradient(180deg,#3eb384,#19805d);
}
.chart-day:nth-child(1) .bar-track i,
.chart-day:nth-child(6) .bar-track i{
    background:linear-gradient(180deg,#ffd167,#f2ad38);
}
.chart-day small{
    color:#84938d;
    font-size:.58rem;
}
.chart-day.today small{
    padding:3px 6px;
    border-radius:999px;
    background:#177c5a;
    color:#fff;
}
.category-stat-card{
    display:grid;
    gap:4px;
}
.category-stat-card h2{
    margin-bottom:5px;
}
.category-stat-row{
    display:grid;
    grid-template-columns:34px 1fr 38px 86px;
    align-items:center;
    gap:8px;
    min-height:45px;
    border-bottom:1px solid #f0f2f1;
}
.category-stat-row:last-child{
    border-bottom:none;
}
.category-stat-icon{
    width:31px;
    height:31px;
    display:grid;
    place-items:center;
    border-radius:10px;
    font-size:.75rem;
}
.category-stat-row strong{
    font-size:.72rem;
}
.category-percent{
    color:#425c52;
    font-size:.68rem;
    font-weight:800;
    text-align:right;
}
.category-progress-track{
    height:8px;
    overflow:hidden;
    border-radius:999px;
    background:#e5eae7;
}
.category-progress-track i{
    display:block;
    width:var(--cat);
    height:100%;
    border-radius:999px;
    background:#177d5a;
}
.calendar-title{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}
.calendar-title strong{
    color:#445b52;
    font-size:.7rem;
}
.heatmap-weekdays{
    margin:11px 0 5px;
    display:grid;
    grid-template-columns:repeat(7,1fr);
    gap:4px;
}
.heatmap-weekdays span{
    color:#8b9892;
    text-align:center;
    font-size:.54rem;
}
.heatmap-grid{
    display:grid;
    grid-template-columns:repeat(7,1fr);
    gap:5px;
}
.heat-empty,
.heat-cell{
    aspect-ratio:1;
    border-radius:6px;
}
.heat-empty{
    background:transparent;
}
.heat-cell{
    display:grid;
    place-items:center;
    position:relative;
}
.heat-cell small{
    color:rgba(42,72,60,.56);
    font-size:.5rem;
}
.level-0{background:#f0f3f1}
.level-1{background:#d9eddf}
.level-2{background:#b5ddbd}
.level-3{background:#78bf86}
.level-4{background:#3a9b5f}
.level-4 small{color:#fff}

/* bottom nav narrower, closer to mockup */
.app-page .bottom-nav{
    width:min(calc(100% - 30px), 480px);
    height:70px;
    bottom:max(12px, env(safe-area-inset-bottom));
    border-radius:25px;
    padding:7px 10px;
}
.app-page .nav-add{
    width:54px;
    height:54px;
}
.app-page .nav-item{
    font-size:.64rem;
}

/* mockup mobile tuning */
@media (max-width:420px){
    .app-page .app-shell{
        padding-left:7px;
        padding-right:7px;
    }
    .dashboard-cover{
        min-height:258px;
        padding-left:17px;
        padding-right:17px;
    }
    .dashboard-greeting h1{
        font-size:2.2rem;
    }
    .progress-panel{
        margin-left:10px;
        margin-right:10px;
        padding:17px;
        grid-template-columns:110px 1fr;
    }
    .mock-ring{
        width:105px;
    }
    .mock-ring::before{
        width:78px;
    }
    .progress-inner strong{
        font-size:1.65rem;
    }
    .summary-pair,
    .daily-habits-card,
    .mock-quote{
        margin-left:10px;
        margin-right:10px;
    }
    .summary-card{
        grid-template-columns:36px 1fr auto;
        padding:11px;
    }
    .summary-symbol{
        width:36px;
        height:36px;
    }
    .habit-catalog-row{
        grid-template-columns:38px 1fr auto 31px;
        gap:7px;
    }
    .habit-catalog-icon{
        width:37px;
        height:37px;
    }
    .target-pill{
        max-width:70px;
    }
}


/* =========================================================
   DAILY TRACKING v4
   ========================================================= */
.numeric-habit-row{
    cursor:default;
}
.numeric-check{
    color:#fff;
}
.numeric-habit-row:not(.done) .numeric-check{
    background:#fff;
}
.numeric-copy{
    min-width:0;
}
.habit-inline-progress{
    width:100%;
    max-width:145px;
    height:4px;
    display:block;
    overflow:hidden;
    margin-top:5px;
    border-radius:999px;
    background:#e7ece9;
}
.habit-inline-progress i{
    display:block;
    width:var(--habit-progress);
    height:100%;
    border-radius:999px;
    background:linear-gradient(90deg,#69bc94,#177c59);
    transition:width .2s ease;
}
.habit-stepper{
    display:grid;
    grid-template-columns:28px minmax(24px,auto) 28px;
    align-items:center;
    gap:4px;
}
.habit-stepper form{
    margin:0;
}
.step-button{
    width:28px;
    height:28px;
    display:grid;
    place-items:center;
    padding:0;
    border:1px solid #dce5e0;
    border-radius:9px;
    background:#f5f8f6;
    color:#176f51;
    font-size:1rem;
    font-weight:900;
    line-height:1;
    cursor:pointer;
}
.step-button.plus{
    background:#177c59;
    border-color:#177c59;
    color:#fff;
}
.step-button:disabled{
    opacity:.35;
    cursor:not-allowed;
}
.step-value{
    min-width:24px;
    color:#50665d;
    text-align:center;
    font-size:.68rem;
    font-weight:900;
}
.numeric-habit-row.done .habit-inline-progress i{
    background:#177c59;
}
.numeric-habit-row.done .step-value{
    color:#177c59;
}

@media (max-width:390px){
    .numeric-habit-row{
        grid-template-columns:31px 34px 1fr auto;
        gap:7px;
    }
    .habit-stepper{
        grid-template-columns:25px minmax(20px,auto) 25px;
        gap:3px;
    }
    .step-button{
        width:25px;
        height:25px;
        border-radius:8px;
        font-size:.9rem;
    }
    .step-value{
        font-size:.62rem;
    }
}


/* =========================================================
   HISTORY & STREAK v5
   ========================================================= */
.summary-card-link{
    color:inherit;
    text-decoration:none;
}
.summary-card-link:active{
    transform:scale(.985);
}

.heat-cell{
    text-decoration:none;
}

.history-cta{
    margin:10px 8px 0;
    min-height:72px;
    display:grid;
    grid-template-columns:42px 1fr auto;
    align-items:center;
    gap:10px;
    padding:12px 14px;
    border-radius:22px;
    background:#fff;
    border:1px solid #edf0ee;
    box-shadow:0 8px 20px rgba(35,60,51,.045);
    color:#29453b;
    text-decoration:none;
}
.history-cta-icon{
    width:40px;
    height:40px;
    display:grid;
    place-items:center;
    border-radius:13px;
    background:#e9f5ef;
    color:#187b59;
    font-size:1.1rem;
    font-weight:900;
}
.history-cta strong,
.history-cta small{
    display:block;
}
.history-cta strong{
    font-size:.8rem;
}
.history-cta small{
    margin-top:3px;
    color:#87958f;
    font-size:.66rem;
}
.history-cta > b{
    color:#71847b;
    font-size:1.25rem;
}

.history-screen{
    padding:0 8px 16px;
}
.history-header{
    padding-bottom:12px;
}
.history-back{
    display:inline-block;
    margin-bottom:7px;
    color:#187957;
    text-decoration:none;
    font-size:.69rem;
    font-weight:800;
}
.history-header-icon{
    width:42px;
    height:42px;
    display:grid;
    place-items:center;
    border-radius:14px;
    background:#fff;
    color:#187957;
    border:1px solid #edf0ee;
    box-shadow:0 7px 18px rgba(35,60,51,.05);
    font-size:1.1rem;
}

.streak-hero-card{
    min-height:126px;
    margin:0 8px 10px;
    display:grid;
    grid-template-columns:1fr 76px;
    align-items:center;
    gap:14px;
    padding:18px;
    overflow:hidden;
    border-radius:25px;
    background:
        radial-gradient(circle at 87% 18%, rgba(245,201,96,.20), transparent 28%),
        linear-gradient(135deg,#eef8f2,#fff8e8);
    border:1px solid #e8eee9;
    box-shadow:0 10px 24px rgba(35,60,51,.06);
}
.streak-main{
    display:flex;
    align-items:center;
    gap:13px;
}
.streak-flame{
    width:50px;
    height:50px;
    flex:0 0 auto;
    display:grid;
    place-items:center;
    border-radius:17px;
    background:#fff1e6;
    color:#e66f35;
    box-shadow:0 8px 18px rgba(215,120,65,.10);
    font-size:1.2rem;
}
.streak-main small{
    display:block;
    color:#71847b;
    font-size:.68rem;
    font-weight:700;
}
.streak-main strong{
    display:block;
    margin-top:2px;
    color:#1e4939;
    font-size:1.55rem;
    line-height:1;
}
.streak-main p{
    margin:5px 0 0;
    color:#7d8e87;
    font-size:.67rem;
}
.streak-side{
    min-height:76px;
    display:grid;
    align-content:center;
    justify-items:center;
    border-radius:19px;
    background:rgba(255,255,255,.78);
    border:1px solid rgba(255,255,255,.95);
}
.streak-side span,
.streak-side small{
    color:#88958f;
    font-size:.58rem;
}
.streak-side strong{
    margin:1px 0;
    color:#b88728;
    font-size:1.45rem;
}

.recent-streak-card,
.history-calendar-card,
.day-detail-card{
    margin:10px 8px 0;
    padding:15px;
    border-radius:23px;
    background:#fff;
    border:1px solid #edf0ee;
    box-shadow:0 8px 20px rgba(35,60,51,.045);
}
.history-section-heading{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:10px;
    margin-bottom:12px;
}
.history-section-heading small,
.history-section-heading strong{
    display:block;
}
.history-section-heading small{
    color:#8a9892;
    font-size:.6rem;
}
.history-section-heading strong{
    margin-top:2px;
    color:#304b41;
    font-size:.82rem;
}
.history-section-heading > span{
    color:#187957;
    font-size:.61rem;
    font-weight:800;
}

.recent-days-grid{
    display:grid;
    grid-template-columns:repeat(7,1fr);
    gap:6px;
}
.recent-day{
    min-height:59px;
    display:grid;
    grid-template-rows:14px 22px 4px;
    align-content:center;
    justify-items:center;
    gap:3px;
    border-radius:13px;
    background:#f7f9f8;
    border:1px solid #eff2f0;
    color:#516960;
    text-decoration:none;
}
.recent-day small{
    color:#909c97;
    font-size:.52rem;
}
.recent-day span{
    font-size:.72rem;
    font-weight:900;
}
.recent-day i{
    width:70%;
    height:4px;
    overflow:hidden;
    position:relative;
    border-radius:999px;
    background:#e1e7e3;
}
.recent-day i::after{
    content:"";
    display:block;
    width:var(--recent-progress);
    height:100%;
    border-radius:999px;
    background:#83bea2;
}
.recent-day.perfect{
    background:#eaf6ef;
    border-color:#dceee4;
    color:#176f51;
}
.recent-day.perfect i::after{
    background:#177c59;
}
.recent-day.today{
    box-shadow:inset 0 0 0 2px #1a805e;
}

.history-calendar-nav{
    display:grid;
    grid-template-columns:34px 1fr 34px;
    align-items:center;
    gap:8px;
}
.history-calendar-nav strong{
    color:#3b544b;
    text-align:center;
    font-size:.78rem;
}
.history-calendar-nav a,
.disabled-next{
    width:32px;
    height:32px;
    display:grid;
    place-items:center;
    border-radius:10px;
    background:#f4f7f5;
    color:#526b61;
    text-decoration:none;
    font-size:1.1rem;
    font-weight:900;
}
.disabled-next{
    opacity:.35;
}
.history-weekdays{
    margin:12px 0 6px;
    display:grid;
    grid-template-columns:repeat(7,1fr);
    gap:5px;
}
.history-weekdays span{
    color:#929e99;
    text-align:center;
    font-size:.52rem;
}
.history-calendar-grid{
    display:grid;
    grid-template-columns:repeat(7,1fr);
    gap:5px;
}
.history-calendar-empty,
.history-day{
    min-height:44px;
    aspect-ratio:1;
    border-radius:10px;
}
.history-calendar-empty{
    background:transparent;
}
.history-day{
    display:grid;
    align-content:center;
    justify-items:center;
    gap:2px;
    position:relative;
    color:#61766d;
    text-decoration:none;
    border:1px solid transparent;
}
.history-day b{
    font-size:.67rem;
}
.history-day small{
    font-size:.45rem;
}
.history-day.future{
    display:grid;
    place-items:center;
    background:#fafbfa;
    color:#c0c8c4;
}
.history-day.level-0{
    background:#f4f6f5;
}
.history-day.level-1{
    background:#e6f2ea;
}
.history-day.level-2{
    background:#d4eadb;
}
.history-day.level-3{
    background:#aad7b6;
}
.history-day.level-4{
    background:#71bc83;
    color:#fff;
}
.history-day.level-5{
    background:#248456;
    color:#fff;
}
.history-day.selected{
    border-color:#0f6446;
    box-shadow:0 0 0 2px rgba(15,100,70,.14);
}
.history-day.today::after{
    content:"";
    position:absolute;
    bottom:4px;
    width:4px;
    height:4px;
    border-radius:50%;
    background:#d9a13e;
}
.calendar-legend{
    margin-top:11px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:13px;
    color:#84928c;
    font-size:.55rem;
}
.calendar-legend span{
    display:flex;
    align-items:center;
    gap:4px;
}
.calendar-legend i{
    width:9px;
    height:9px;
    display:block;
    border-radius:3px;
}
.legend-0{background:#f0f3f1}
.legend-2{background:#d4eadb}
.legend-5{background:#248456}

.day-detail-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}
.day-detail-head small{
    color:#8b9892;
    font-size:.6rem;
}
.day-detail-head h2{
    margin:3px 0 0;
    color:#314c42;
    font-size:.92rem;
}
.day-progress-badge{
    --p:calc(var(--day-progress) * 1%);
    width:58px;
    height:58px;
    display:grid;
    place-items:center;
    position:relative;
    border-radius:50%;
    background:conic-gradient(#65b58c var(--p), #e5eae7 0);
}
.day-progress-badge::before{
    content:"";
    position:absolute;
    inset:6px;
    border-radius:50%;
    background:#fff;
}
.day-progress-badge strong{
    position:relative;
    z-index:1;
    color:#405b51;
    font-size:.68rem;
}
.day-progress-badge.perfect{
    background:conic-gradient(#187c59 100%, #e5eae7 0);
}
.day-progress-badge.perfect strong{
    color:#187c59;
}
.day-summary-line{
    margin:11px 0 8px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    color:#83918b;
    font-size:.62rem;
}
.day-summary-line strong{
    color:#187957;
    font-size:.61rem;
}
.history-habit-list{
    display:grid;
}
.history-habit-row{
    display:grid;
    grid-template-columns:38px 1fr 40px;
    align-items:center;
    gap:9px;
    min-height:62px;
    padding:9px 2px;
    border-bottom:1px solid #eef1ef;
}
.history-habit-row:last-child{
    border-bottom:none;
}
.history-habit-icon{
    width:36px;
    height:36px;
    display:grid;
    place-items:center;
    border-radius:11px;
    font-size:.85rem;
    font-weight:900;
}
.history-habit-copy{
    min-width:0;
}
.history-habit-copy strong,
.history-habit-copy small{
    display:block;
}
.history-habit-copy strong{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:#354d44;
    font-size:.76rem;
}
.history-habit-copy small{
    margin-top:2px;
    color:#89958f;
    font-size:.62rem;
}
.history-progress-track{
    width:100%;
    height:4px;
    display:block;
    overflow:hidden;
    margin-top:5px;
    border-radius:999px;
    background:#e6ebe8;
}
.history-progress-track i{
    display:block;
    width:var(--history-progress);
    height:100%;
    border-radius:999px;
    background:#7dbea0;
}
.history-habit-row.completed .history-progress-track i{
    background:#187c59;
}
.history-percent{
    color:#5f756c;
    text-align:right;
    font-size:.63rem;
    font-weight:800;
}
.history-habit-row.completed .history-percent{
    color:#187c59;
}
.history-empty-day{
    padding:22px 8px 10px;
    color:#8b9892;
    text-align:center;
    font-size:.72rem;
}

@media (max-width:390px){
    .recent-days-grid{
        gap:4px;
    }
    .recent-day{
        min-height:54px;
    }
    .history-day{
        min-height:40px;
        border-radius:9px;
    }
    .streak-hero-card{
        grid-template-columns:1fr 66px;
        padding:15px;
    }
    .streak-flame{
        width:45px;
        height:45px;
    }
}


/* =========================================================
   REMINDERS & PWA NOTIFICATIONS v6
   ========================================================= */
.notification-link{
    position:relative;
}
.notification-badge{
    min-width:16px;
    height:16px;
    padding:0 4px;
    position:absolute;
    top:-2px;
    right:-3px;
    display:grid;
    place-items:center;
    border:2px solid #fff;
    border-radius:999px;
    background:#e35f4e;
    color:#fff;
    font-size:.52rem;
    font-weight:900;
}

.profile-menu-section{
    padding:8px 12px;
}
.profile-menu-row{
    min-height:66px;
    display:grid;
    grid-template-columns:42px 1fr auto;
    align-items:center;
    gap:11px;
    color:#304a40;
    text-decoration:none;
}
.profile-menu-icon{
    width:40px;
    height:40px;
    display:grid;
    place-items:center;
    border-radius:13px;
    background:#eaf5ef;
    color:#187a58;
    font-size:1.1rem;
}
.profile-menu-row strong,
.profile-menu-row small{
    display:block;
}
.profile-menu-row strong{
    font-size:.82rem;
}
.profile-menu-row small{
    margin-top:3px;
    color:#88958f;
    font-size:.67rem;
}
.profile-menu-row b{
    color:#74877e;
    font-size:1.2rem;
}

.reminders-screen{
    padding:0 8px 16px;
}
.reminder-header-icon{
    width:42px;
    height:42px;
    display:grid;
    place-items:center;
    border-radius:14px;
    background:#fff;
    color:#187957;
    border:1px solid #edf0ee;
    box-shadow:0 7px 18px rgba(35,60,51,.05);
    font-size:1.1rem;
}

.notification-permission-card{
    margin:0 8px 10px;
    padding:17px;
    display:grid;
    grid-template-columns:48px 1fr auto;
    align-items:start;
    gap:12px;
    border-radius:25px;
    background:
        radial-gradient(circle at 92% 12%, rgba(234,194,105,.17), transparent 24%),
        linear-gradient(135deg,#edf8f2,#fffaf0);
    border:1px solid #e6eee9;
    box-shadow:0 10px 24px rgba(35,60,51,.055);
}
.permission-icon{
    width:48px;
    height:48px;
    display:grid;
    place-items:center;
    border-radius:16px;
    background:#fff;
    color:#177957;
    box-shadow:0 8px 18px rgba(35,60,51,.05);
    font-size:1.25rem;
}
.permission-copy{
    min-width:0;
}
.permission-copy > small{
    color:#187957;
    font-size:.55rem;
    font-weight:900;
    letter-spacing:.1em;
}
.permission-copy h2{
    margin:4px 0;
    color:#25483b;
    font-size:1rem;
}
.permission-copy p{
    margin:0;
    color:#71847b;
    font-size:.68rem;
    line-height:1.5;
}
.permission-status-pill{
    padding:5px 8px;
    border-radius:999px;
    background:#fff;
    color:#778a82;
    border:1px solid rgba(255,255,255,.95);
    font-size:.56rem;
    font-weight:900;
    white-space:nowrap;
}
.permission-status-pill[data-state="granted"]{
    background:#e6f4ed;
    color:#176f50;
}
.permission-status-pill[data-state="denied"]{
    background:#fff0ed;
    color:#a14b40;
}
.permission-actions{
    grid-column:1 / -1;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    margin-top:3px;
}
.notification-primary-button,
.notification-secondary-button{
    min-height:42px;
    padding:0 12px;
    border-radius:13px;
    font-size:.69rem;
    font-weight:900;
    cursor:pointer;
}
.notification-primary-button{
    border:none;
    background:#187c59;
    color:#fff;
    box-shadow:0 9px 18px rgba(24,124,89,.16);
}
.notification-secondary-button{
    border:1px solid #dfe8e3;
    background:#fff;
    color:#176f50;
}
.notification-secondary-button:disabled{
    opacity:.45;
    cursor:not-allowed;
}

.reminder-summary-grid{
    margin:10px 8px;
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:7px;
}
.reminder-summary-grid article{
    min-height:72px;
    padding:10px 8px;
    display:grid;
    grid-template-columns:28px 1fr;
    align-items:center;
    gap:7px;
    border-radius:18px;
    background:#fff;
    border:1px solid #edf0ee;
    box-shadow:0 7px 17px rgba(35,60,51,.035);
}
.reminder-summary-grid article > span{
    width:28px;
    height:28px;
    display:grid;
    place-items:center;
    border-radius:10px;
    background:#eef7f2;
    color:#187957;
    font-size:.75rem;
}
.reminder-summary-grid strong,
.reminder-summary-grid small{
    display:block;
}
.reminder-summary-grid strong{
    color:#304b41;
    font-size:.93rem;
}
.reminder-summary-grid small{
    margin-top:2px;
    color:#8a9892;
    font-size:.53rem;
    line-height:1.2;
}

.today-reminders-card,
.device-notification-card{
    margin:10px 8px 0;
    padding:15px;
    border-radius:23px;
    background:#fff;
    border:1px solid #edf0ee;
    box-shadow:0 8px 20px rgba(35,60,51,.045);
}
.reminder-section-head{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:10px;
    margin-bottom:8px;
}
.reminder-section-head small{
    display:block;
    color:#8b9892;
    font-size:.55rem;
    letter-spacing:.08em;
}
.reminder-section-head h2{
    margin:3px 0 0;
    color:#304b41;
    font-size:.86rem;
}
.reminder-section-head > span{
    color:#187957;
    font-size:.66rem;
    font-weight:900;
}

.reminder-list{
    display:grid;
}
.reminder-row{
    min-height:64px;
    display:grid;
    grid-template-columns:38px 1fr 58px 20px;
    align-items:center;
    gap:8px;
    padding:9px 1px;
    border-bottom:1px solid #eef1ef;
}
.reminder-row:last-child{
    border-bottom:none;
}
.reminder-row-icon{
    width:36px;
    height:36px;
    display:grid;
    place-items:center;
    border-radius:11px;
    font-size:.85rem;
    font-weight:900;
}
.reminder-row-copy{
    min-width:0;
}
.reminder-row-copy strong,
.reminder-row-copy small{
    display:block;
}
.reminder-row-copy strong{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:#344d44;
    font-size:.76rem;
}
.reminder-row-copy small{
    margin-top:3px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:#8a9791;
    font-size:.59rem;
}
.reminder-time-box{
    text-align:right;
}
.reminder-time-box strong,
.reminder-time-box span{
    display:block;
}
.reminder-time-box strong{
    color:#3a554b;
    font-size:.72rem;
}
.reminder-time-box span{
    margin-top:2px;
    color:#89968f;
    font-size:.52rem;
}
.reminder-row.upcoming .reminder-time-box span{
    color:#177957;
}
.reminder-row.complete .reminder-time-box span{
    color:#26805f;
}
.reminder-row.missed .reminder-time-box span{
    color:#c26b47;
}
.reminder-edit-link{
    color:#71847b;
    text-align:center;
    text-decoration:none;
    font-size:1.1rem;
}
.reminder-empty{
    padding:22px 8px 10px;
    text-align:center;
    color:#83918b;
    font-size:.72rem;
}
.reminder-empty strong{
    display:block;
    margin-bottom:6px;
}
.reminder-empty a{
    color:#187957;
    text-decoration:none;
    font-weight:800;
}

.notification-note{
    margin:10px 8px 0;
    padding:13px 14px;
    display:grid;
    grid-template-columns:28px 1fr;
    gap:9px;
    border-radius:19px;
    background:#f5f7f2;
    border:1px solid #e8ece5;
}
.notification-note > span{
    width:26px;
    height:26px;
    display:grid;
    place-items:center;
    border-radius:50%;
    background:#e8f2ea;
    color:#51755f;
    font-family:Georgia,serif;
    font-weight:900;
}
.notification-note strong{
    display:block;
    color:#4a6258;
    font-size:.68rem;
}
.notification-note p{
    margin:3px 0 0;
    color:#819088;
    font-size:.59rem;
    line-height:1.5;
}

.device-notification-card > div > small{
    display:block;
    color:#8a9892;
    font-size:.55rem;
    letter-spacing:.08em;
}
.device-notification-card > div > h2{
    margin:3px 0 12px;
    color:#304b41;
    font-size:.86rem;
}
.notification-switch-row{
    min-height:58px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding:10px 12px;
    border-radius:17px;
    background:#f7faf8;
    border:1px solid #e8edea;
}
.notification-switch-row strong,
.notification-switch-row small{
    display:block;
}
.notification-switch-row strong{
    color:#3b544b;
    font-size:.72rem;
}
.notification-switch-row small{
    margin-top:3px;
    color:#8a9791;
    font-size:.59rem;
}
.notification-switch-row input{
    width:38px;
    height:21px;
    accent-color:#187c59;
}


/* =========================================================
   WEB PUSH SERVER v7
   ========================================================= */
.server-push-card,
.push-readiness-card,
.push-install-card{
    margin:10px 8px 0;
    padding:16px;
    border-radius:23px;
    background:#fff;
    border:1px solid #edf0ee;
    box-shadow:0 8px 20px rgba(35,60,51,.045);
}
.server-push-card{
    background:
        radial-gradient(circle at 92% 12%, rgba(105,181,140,.12), transparent 25%),
        #fff;
}
.server-push-head{
    display:grid;
    grid-template-columns:43px 1fr auto;
    align-items:start;
    gap:10px;
}
.server-push-icon{
    width:41px;
    height:41px;
    display:grid;
    place-items:center;
    border-radius:14px;
    background:#e9f5ef;
    color:#177957;
    font-size:1.15rem;
    font-weight:900;
}
.server-push-head small{
    display:block;
    color:#177957;
    font-size:.53rem;
    font-weight:900;
    letter-spacing:.09em;
}
.server-push-head h2{
    margin:3px 0;
    color:#304b41;
    font-size:.86rem;
}
.server-push-head p{
    margin:0;
    color:#83918b;
    font-size:.61rem;
    line-height:1.45;
}
.server-push-status{
    padding:5px 8px;
    border-radius:999px;
    background:#f1f3f2;
    color:#7f8c86;
    font-size:.53rem;
    font-weight:900;
    white-space:nowrap;
}
.server-push-status[data-state="ok"]{
    background:#e5f4ec;
    color:#176f50;
}
.server-push-status[data-state="warn"]{
    background:#fff5df;
    color:#9a7022;
}
.server-push-status[data-state="bad"]{
    background:#fff0ed;
    color:#a14b40;
}
.server-push-actions{
    margin-top:13px;
    display:grid;
    grid-template-columns:1.25fr 1fr .75fr;
    gap:7px;
}
.push-disconnect-button{
    min-height:42px;
    border-radius:13px;
    border:1px solid #efd9d3;
    background:#fff5f2;
    color:#a14b40;
    font-size:.65rem;
    font-weight:900;
    cursor:pointer;
}
.push-disconnect-button:disabled{
    opacity:.42;
    cursor:not-allowed;
}
.server-push-message{
    margin:10px 0 0;
    color:#7d8d86;
    font-size:.61rem;
    line-height:1.45;
}
.server-push-message[data-state="ok"]{
    color:#187957;
}
.server-push-message[data-state="warn"]{
    color:#9a7022;
}
.server-push-message[data-state="bad"]{
    color:#a14b40;
}
.server-push-setup-link{
    display:inline-block;
    margin-top:8px;
    color:#187957;
    text-decoration:none;
    font-size:.62rem;
    font-weight:900;
}

.push-setup-screen{
    padding:0 8px 18px;
}
.push-setup-alert{
    margin:0 8px 10px;
    padding:11px 13px;
    border-radius:15px;
    font-size:.68rem;
}
.push-setup-alert.success{
    background:#e7f4ed;
    color:#176f50;
}
.push-setup-alert.error{
    background:#fff0ed;
    color:#9a443a;
}
.push-readiness-card h2,
.push-install-card h2{
    margin:0 0 11px;
    color:#304b41;
    font-size:.9rem;
}
.push-readiness-row{
    min-height:47px;
    display:grid;
    grid-template-columns:90px 1fr auto;
    align-items:center;
    gap:8px;
    border-bottom:1px solid #eef1ef;
}
.push-readiness-row:last-child{
    border-bottom:none;
}
.push-readiness-row span{
    color:#87958f;
    font-size:.62rem;
}
.push-readiness-row strong{
    color:#3a554b;
    font-size:.65rem;
}
.push-readiness-row b{
    padding:4px 7px;
    border-radius:999px;
    font-size:.52rem;
}
.push-readiness-row b.ok{
    background:#e6f4ed;
    color:#176f50;
}
.push-readiness-row b.warn{
    background:#fff5df;
    color:#9a7022;
}
.push-readiness-row b.bad{
    background:#fff0ed;
    color:#a14b40;
}
.push-install-card > small{
    display:block;
    color:#187957;
    font-size:.53rem;
    font-weight:900;
    letter-spacing:.08em;
}
.push-install-card h2{
    margin-top:4px;
}
.push-install-card p{
    margin:0;
    color:#7d8d86;
    font-size:.65rem;
    line-height:1.5;
}
.code-box,
.public-key-preview{
    margin-top:10px;
    padding:10px 11px;
    overflow-wrap:anywhere;
    border-radius:13px;
    background:#f4f7f5;
    color:#3d5a4f;
    font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
    font-size:.61rem;
}
.vapid-form{
    display:grid;
    gap:12px;
}
.vapid-form label{
    display:grid;
    gap:6px;
}
.vapid-form label > span{
    color:#40584e;
    font-size:.67rem;
    font-weight:800;
}
.vapid-form input{
    width:100%;
    min-height:46px;
    border:1px solid #dfe7e2;
    border-radius:14px;
    padding:0 12px;
    outline:none;
    background:#fbfcfb;
    color:#304b41;
    font-size:.7rem;
}
.vapid-form label small{
    color:#8b9892;
    font-size:.57rem;
}
.push-ready-button{
    margin:12px 8px 0;
    min-height:48px;
    display:grid;
    place-items:center;
    border-radius:16px;
    background:#187c59;
    color:#fff;
    text-decoration:none;
    font-size:.72rem;
    font-weight:900;
    box-shadow:0 10px 22px rgba(24,124,89,.16);
}
@media(max-width:390px){
    .server-push-actions{
        grid-template-columns:1fr 1fr;
    }
    .push-disconnect-button{
        grid-column:1/-1;
    }
    .server-push-head{
        grid-template-columns:40px 1fr;
    }
    .server-push-status{
        grid-column:2;
        justify-self:start;
    }
}


/* =========================================================
   CLEAN INTERACTIVE ICON SYSTEM v7.1
   ========================================================= */
.has-ui-icon{
    padding:0 !important;
    background:transparent !important;
    border:none !important;
    overflow:visible !important;
}
.has-ui-icon img,
.ui-page-icon img{
    display:block;
    width:100%;
    height:100%;
    object-fit:contain;
}

.nav-icon-img{
    width:29px;
    height:29px;
    display:block;
    object-fit:contain;
    border-radius:9px;
    transition:
        transform .18s ease,
        filter .18s ease,
        box-shadow .18s ease;
}
.nav-item:hover .nav-icon-img{
    transform:translateY(-2px) scale(1.04);
    filter:saturate(1.07) brightness(1.02);
}
.nav-item.active .nav-icon-img{
    transform:translateY(-3px) scale(1.10);
    filter:saturate(1.12) contrast(1.02);
    box-shadow:0 6px 14px rgba(22,122,90,.12);
}
.nav-item:active .nav-icon-img{
    transform:translateY(0) scale(.96);
}

.mini-brand-image{
    width:39px;
    height:39px;
    display:block;
    object-fit:contain;
    border-radius:12px;
    box-shadow:0 7px 17px rgba(35,60,51,.08);
}

.cover-icon-img{
    width:31px;
    height:31px;
    display:block;
    object-fit:contain;
    border-radius:10px;
    transition:transform .18s ease;
}
.notification-link:hover .cover-icon-img{
    transform:scale(1.08) rotate(-3deg);
}
.notification-link:active .cover-icon-img{
    transform:scale(.94);
}

.summary-icon-img{
    width:43px;
    height:43px;
    display:block;
    object-fit:contain;
    border-radius:14px;
    box-shadow:0 7px 16px rgba(35,60,51,.06);
    transition:transform .18s ease;
}
.summary-card-link:hover .summary-icon-img{
    transform:translateY(-2px) scale(1.04);
}
.summary-card-link:active .summary-icon-img{
    transform:scale(.96);
}

.section-icon-img{
    width:24px;
    height:24px;
    display:block;
    object-fit:contain;
    border-radius:8px;
}

.habit-icon-img{
    width:38px;
    height:38px;
    display:block;
    object-fit:contain;
    border-radius:12px;
    transition:
        transform .18s ease,
        filter .18s ease;
}
.mock-habit-row:hover .habit-icon-img{
    transform:scale(1.05);
    filter:saturate(1.08);
}
.mock-habit-row.done .habit-icon-img{
    filter:saturate(.86) brightness(1.02);
}

.category-filter a{
    transition:
        transform .16s ease,
        box-shadow .16s ease,
        background .16s ease;
}
.category-filter a img{
    width:22px;
    height:22px;
    display:block;
    object-fit:contain;
    border-radius:7px;
}
.category-filter a:hover{
    transform:translateY(-1px);
}
.category-filter a.active{
    box-shadow:0 6px 14px rgba(24,124,90,.14);
}
.category-filter a.active img{
    filter:brightness(1.05) saturate(1.04);
}

.group-icon img{
    width:24px;
    height:24px;
    object-fit:contain;
    border-radius:8px;
}
.habit-catalog-icon img{
    width:42px;
    height:42px;
    object-fit:contain;
    border-radius:13px;
    transition:transform .17s ease;
}
.habit-catalog-row:hover .habit-catalog-icon img{
    transform:scale(1.05);
}
.habit-catalog-row:active .habit-catalog-icon img{
    transform:scale(.96);
}

.ui-page-icon{
    padding:0 !important;
    overflow:visible;
    background:transparent !important;
    border:none !important;
    box-shadow:none !important;
}
.ui-page-icon img{
    width:43px;
    height:43px;
    border-radius:14px;
    filter:saturate(1.03);
}

.category-stat-icon img{
    width:33px;
    height:33px;
    object-fit:contain;
    border-radius:10px;
}
.history-cta-icon img{
    width:41px;
    height:41px;
    object-fit:contain;
    border-radius:13px;
}
.streak-flame img{
    width:50px;
    height:50px;
    object-fit:contain;
    border-radius:16px;
}
.history-habit-icon img{
    width:38px;
    height:38px;
    object-fit:contain;
    border-radius:12px;
}

.permission-icon img{
    width:48px;
    height:48px;
    object-fit:contain;
    border-radius:15px;
}
.reminder-summary-grid article > span.has-ui-icon{
    width:31px;
    height:31px;
}
.reminder-summary-grid article > span.has-ui-icon img{
    width:31px;
    height:31px;
    object-fit:contain;
    border-radius:10px;
}
.reminder-row-icon img{
    width:38px;
    height:38px;
    object-fit:contain;
    border-radius:12px;
}
.profile-menu-icon img{
    width:41px;
    height:41px;
    object-fit:contain;
    border-radius:13px;
}

@media(max-width:390px){
    .nav-icon-img{
        width:27px;
        height:27px;
    }
    .habit-icon-img{
        width:34px;
        height:34px;
    }
}


/* =========================================================
   NATURAL CLEAN DASHBOARD HERO v7.2
   ========================================================= */
.dashboard-cover{
    min-height:300px;
    padding:18px 20px 36px;
    isolation:isolate;
    background:
        linear-gradient(
            90deg,
            rgba(250,247,238,.96) 0%,
            rgba(248,246,238,.82) 34%,
            rgba(241,247,241,.38) 58%,
            rgba(231,242,239,.08) 100%
        ),
        url("../img/dashboard-ibnu-abbas-bg.webp") center center / cover no-repeat;
    box-shadow:
        0 20px 44px rgba(36,64,54,.10),
        inset 0 -1px 0 rgba(255,255,255,.66);
}
.dashboard-cover::before{
    content:"";
    position:absolute;
    inset:0;
    z-index:-1;
    pointer-events:none;
    background:
        radial-gradient(
            circle at 24% 43%,
            rgba(255,250,236,.28) 0,
            rgba(255,250,236,.12) 28%,
            transparent 52%
        ),
        linear-gradient(
            180deg,
            rgba(255,255,255,.08),
            rgba(255,255,255,0) 55%,
            rgba(22,95,71,.035) 100%
        );
}
.dashboard-cover::after{
    content:"";
    position:absolute;
    left:0;
    right:0;
    bottom:0;
    height:72px;
    z-index:-1;
    pointer-events:none;
    background:linear-gradient(
        180deg,
        rgba(245,247,241,0),
        rgba(219,235,226,.34)
    );
}
.cover-toolbar,
.dashboard-greeting{
    position:relative;
    z-index:2;
}
.cover-circle,
.cover-avatar{
    background:rgba(255,255,255,.90);
    border-color:rgba(255,255,255,.96);
    box-shadow:
        0 8px 22px rgba(34,64,53,.10),
        inset 0 1px 0 rgba(255,255,255,.85);
    backdrop-filter:blur(8px);
}
.mini-brand-image{
    background:rgba(255,255,255,.84);
    box-shadow:0 8px 20px rgba(34,64,53,.10);
}
.dashboard-greeting{
    margin-top:25px;
    max-width:305px;
    text-shadow:0 1px 0 rgba(255,255,255,.44);
}
.dashboard-greeting > span{
    color:#1D4035;
}
.dashboard-greeting h1{
    color:#124B39;
    text-shadow:0 1px 0 rgba(255,255,255,.48);
}
.dashboard-greeting p{
    display:inline-flex;
    width:auto;
    padding:7px 10px 7px 8px;
    border-radius:13px;
    color:#385D50;
    background:rgba(255,255,255,.52);
    border:1px solid rgba(255,255,255,.55);
    backdrop-filter:blur(5px);
}
.progress-panel{
    margin-top:-48px;
    background:rgba(255,255,255,.965);
    border:1px solid rgba(255,255,255,.98);
    box-shadow:
        0 20px 44px rgba(36,64,54,.13),
        0 3px 10px rgba(36,64,54,.035);
    backdrop-filter:blur(12px);
}
.progress-ring{
    box-shadow:
        inset 0 0 0 7px rgba(255,255,255,.68),
        0 7px 19px rgba(28,100,72,.08);
}
.arabic-soft{
    color:#137654;
}
.summary-card,
.daily-habits-card,
.mock-quote{
    border-color:rgba(232,239,234,.92);
}

@media(max-width:420px){
    .dashboard-cover{
        min-height:286px;
        padding-bottom:34px;
        background-position:58% center;
    }
    .dashboard-greeting{
        margin-top:22px;
        max-width:245px;
    }
    .dashboard-greeting > span{
        font-size:.95rem;
    }
    .dashboard-greeting h1{
        font-size:2.12rem;
    }
    .dashboard-greeting p{
        max-width:100%;
        font-size:.72rem;
    }
    .progress-panel{
        margin-top:-42px;
    }
}


/* =========================================================
   IBNU ABBAS HERO BACKGROUND v7.3
   ========================================================= */
.dashboard-cover{
    background:
        linear-gradient(
            90deg,
            rgba(250,247,238,.96) 0%,
            rgba(249,247,239,.88) 30%,
            rgba(245,247,241,.52) 48%,
            rgba(237,245,241,.16) 68%,
            rgba(232,242,239,.05) 100%
        ),
        url("../img/dashboard-ibnu-abbas-bg.webp") center center / cover no-repeat;
    background-color:#F7F3E8;
}

@supports not (background-image: url("../img/dashboard-ibnu-abbas-bg.webp")){
    .dashboard-cover{
        background:
            linear-gradient(
                90deg,
                rgba(250,247,238,.96) 0%,
                rgba(249,247,239,.88) 30%,
                rgba(245,247,241,.52) 48%,
                rgba(237,245,241,.16) 68%,
                rgba(232,242,239,.05) 100%
            ),
            url("../img/dashboard-ibnu-abbas-bg.jpg") center center / cover no-repeat;
    }
}

@media(max-width:420px){
    .dashboard-cover{
        background-position:58% center;
    }
}


/* =========================================================
   FAST DAILY TRACKING v7.4
   ========================================================= */
.mock-habit-row,
.step-button{
    touch-action:manipulation;
}

.mock-habit-row.is-saving{
    opacity:.82;
}

.mock-habit-row.is-saving .mock-check{
    transform:scale(.93);
}

.js-habit-check-form .mock-habit-row{
    transition:
        transform .12s ease,
        background .14s ease,
        opacity .14s ease;
}

.mock-check{
    transition:
        transform .14s ease,
        background .14s ease,
        border-color .14s ease;
}

.js-habit-check-form .mock-habit-row.done .mock-check{
    animation:habit-check-pop .20s ease both;
}

@keyframes habit-check-pop{
    0%{transform:scale(.84)}
    65%{transform:scale(1.09)}
    100%{transform:scale(1)}
}

.tracking-toast{
    position:fixed;
    left:50%;
    bottom:98px;
    z-index:120;
    width:min(calc(100% - 34px),420px);
    padding:11px 14px;
    border-radius:14px;
    background:#8f443b;
    color:#fff;
    box-shadow:0 14px 34px rgba(78,43,37,.20);
    opacity:0;
    pointer-events:none;
    transform:translate(-50%,12px);
    transition:
        opacity .18s ease,
        transform .18s ease;
    text-align:center;
    font-size:.7rem;
    font-weight:750;
}

.tracking-toast.show{
    opacity:1;
    transform:translate(-50%,0);
}
