/* 5.0.68 — dopracowanie Nawyków według płótna (NawDzis, NawSzczegoly, NawWynik, NawNowy).
   Tylko wygląd: logika, dane i akcje bez zmian. Ładowany jako ostatni arkusz. */

/* Siatka 16 px i odstępy listy */
body .habits-v2{--naw-gap:12px}
body .habits-v2 .habits-list{gap:var(--naw-gap)!important}

/* Pasek dni: równe pola, pasek postępu zamiast trzech kropek, obwódka dzisiejszego dnia */
body .habits-v2 .habit-week-strip{padding:5px!important;border-radius:22px!important;margin-bottom:12px!important;background:var(--surface)}
body .habits-v2 .habit-week-strip .week{gap:0!important}
body .habits-v2 .habit-week-strip .day{min-height:72px!important;height:auto;padding:0!important;gap:1px!important;border-radius:17px!important;border:1px solid transparent;justify-content:center}
body .habits-v2 .habit-week-strip .day>span:first-child{font-size:12px!important;font-weight:500;line-height:1.4}
body .habits-v2 .habit-week-strip .day>strong{font:700 18px/1.3 Manrope,sans-serif!important;font-variant-numeric:tabular-nums}
body .habits-v2 .habit-week-strip .day.is-today:not(.active){border-color:var(--accent-graphic,var(--accent))}
body .habits-v2 .habit-week-strip .day .dots{display:flex!important;gap:0!important;width:22px;height:4px;margin-top:3px;border-radius:4px;overflow:hidden;background:var(--line)}
body .habits-v2 .habit-week-strip .day .dots>i{flex:1;width:auto!important;height:4px!important;margin:0!important;border-radius:0!important;background:transparent!important;opacity:1!important}
body .habits-v2 .habit-week-strip .day .dots>i.filled{background:var(--accent-graphic,var(--accent))!important}
body .habits-v2 .habit-week-strip .day.active .dots{background:color-mix(in srgb,var(--bg) 22%,transparent)}
body .habits-v2 .habit-week-strip .day.active .dots>i.filled{background:var(--accent)!important}

/* Postęp dnia: jedna linia tekstu i cienki pasek */
body .habits-v2 .habit-day-progress{padding:10px 4px 6px!important;margin:0 0 4px!important;gap:10px!important;display:flex;flex-direction:column;background:transparent!important;border:0!important}
body .habits-v2 .habit-day-progress>div:first-child{display:flex;align-items:baseline;justify-content:space-between}
body .habits-v2 .habit-day-progress>div:first-child>span{font-size:15px!important;font-weight:500!important;color:var(--text)!important}
body .habits-v2 .habit-day-progress>div:first-child>strong,body .habits-v2 .habit-day-progress>div:first-child>strong>span{font:400 14px/1.4 'DM Sans',sans-serif!important;color:var(--muted)!important;letter-spacing:0!important;font-variant-numeric:tabular-nums}
body .habits-v2 .habit-day-progress .progress-track{height:8px!important;border-radius:8px!important;background:var(--line)!important}
body .habits-v2 .habit-day-progress .progress-fill{border-radius:8px!important}

/* Karta nawyku */
body .habits-v2 .habit-card{grid-template-columns:48px minmax(0,1fr) 52px!important;column-gap:14px!important;row-gap:0!important;padding:16px!important;min-height:0!important;border:0!important;border-radius:24px!important;background:var(--surface)!important;box-shadow:none!important}
body .habits-v2 .habit-card.is-complete{background:var(--surface)!important}
body .habits-v2 .habit-card.is-running{box-shadow:inset 0 0 0 1px var(--accent-graphic,var(--accent))!important}
body .habits-v2 .habit-card>.icon-tile{width:48px!important;height:48px!important;min-width:48px!important;border-radius:16px!important}
body .habits-v2 .habit-card>.icon-tile svg{width:24px;height:24px}
body .habits-v2 .habit-card .habit-body h3{font:600 17px/1.3 Manrope,sans-serif!important;letter-spacing:-.3px!important}
body .habits-v2 .habit-card .habit-progress{font-size:14px!important;line-height:1.4!important;font-weight:500!important;margin-top:2px}
body .habits-v2 .habit-card[data-measurement=count] .habit-progress,body .habits-v2 .habit-card[data-measurement=time] .habit-progress{font-size:14px!important;font-weight:500!important;color:var(--muted)!important}
body .habits-v2 .habit-card.is-complete .habit-progress{color:var(--green)!important}
body .habits-v2 .habit-card>.habit-action{width:52px!important;min-width:52px!important;height:52px!important;min-height:52px!important;border-radius:50%!important}
body .habits-v2 .habit-card>.habit-action[data-goal-type=check]:not(.done){background:transparent!important;box-shadow:inset 0 0 0 3px var(--line)}
body .habits-v2 .habit-card>.habit-action>.habit-progress-ring{inset:0!important;width:52px!important;height:52px!important;stroke-width:3!important;opacity:1!important}
body .habits-v2 .habit-card.can-reorder{grid-template-columns:20px 48px minmax(0,1fr) 52px!important;column-gap:10px!important}

/* Tydzień na karcie: bez linii, kropki zamiast pustych pól, obwódka wybranego dnia */
body .habits-v2 .habit-card .habit-card-history{margin-top:14px!important;padding-top:0!important;border-top:0!important}
body .habits-v2 .habit-card .habit-card-history:before{display:none!important}
body .habits-v2 .habit-mini-week{gap:0!important}
body .habits-v2 .habit-mini-week .mini-day{min-height:50px!important;gap:4px!important;padding:0!important;border-radius:12px!important;background:transparent!important}
body .habits-v2 .habit-mini-week .mini-day>span{width:32px!important;height:32px!important;border-radius:11px!important;border:1.5px solid transparent;font-size:11px}
body .habits-v2 .habit-mini-week .mini-day.partial>span,body .habits-v2 .habit-mini-week .mini-day.missed>span{border-radius:11px!important;background:var(--surface-2)!important;color:var(--text)}
body .habits-v2 .habit-mini-week .mini-day.has-percent b{font-size:11px!important;font-weight:600!important;font-variant-numeric:tabular-nums}
body .habits-v2 .habit-mini-week .mini-day.has-percent>span>svg{display:none}
body .habits-v2 .habit-mini-week .mini-day.selected>span{border-color:var(--accent-graphic,var(--accent))!important;outline:0!important}
body .habits-v2 .habit-mini-week .mini-day.selected small{font-weight:700!important;color:var(--text)!important}
body .habits-v2 .habit-mini-week .mini-day small{font-size:11px!important;line-height:1.4!important}
body .habits-v2 .habit-mini-week .mini-day.future>span{background:transparent!important;border-color:transparent!important;position:relative}
body .habits-v2 .habit-mini-week .mini-day.future>span>*{display:none!important}
body .habits-v2 .habit-mini-week .mini-day.future>span:after{content:"";width:5px;height:5px;border-radius:50%;background:var(--line-strong,var(--muted))}
body .habits-v2 .habit-mini-week .mini-day:hover{background:var(--surface-2)!important}
body .habits-v2 .habit-week-strip .day .dots{padding:0!important;border:0!important;height:4px!important;min-height:0!important;box-shadow:none!important}
body .habits-v2 .habit-week-strip .day .dots>i{border:0!important;box-shadow:none!important;min-width:0!important}
body .habits-v2 .habit-day-progress .progress-track{margin:0!important}

/* Szczegóły nawyku: wynik, pierścień i główny przycisk w jednej karcie */
body .habit-detail-dashboard{gap:12px!important;margin-inline:-8px}
body .habit-detail-dashboard>.detail-hero{--naw-hero:color-mix(in srgb,var(--habit-color) 20%,var(--surface));background:var(--naw-hero)!important;padding:16px 16px 12px!important;gap:14px!important;border-radius:24px 24px 0 0!important;border:0!important;align-items:center}
body .habit-detail-dashboard>.detail-hero .icon-tile{width:52px!important;height:52px!important;min-width:52px!important;border-radius:18px!important;background:color-mix(in srgb,var(--habit-color) 30%,var(--surface))!important}
body .habit-detail-dashboard>.detail-hero .icon-tile svg{width:26px;height:26px}
body .habit-detail-dashboard>.detail-hero p{font-size:13px!important;line-height:1.4!important}
body .habit-detail-dashboard>.detail-hero h2{font:800 22px/1.25 Manrope,sans-serif!important;letter-spacing:-.5px!important}
body .habit-detail-dashboard>.habit-detail-primary{margin-top:-12px!important;padding:0 16px 16px!important;border-radius:0 0 24px 24px!important;background:color-mix(in srgb,var(--habit-color) 20%,var(--surface))!important}
body .habit-detail-dashboard>.habit-detail-primary .btn{min-height:48px!important;border-radius:14px!important}
/* Trzy szybkie akcje jako równe kafelki */
body .habit-detail-dashboard>.habit-detail-actions-grid{gap:8px!important}
body .habit-detail-dashboard>.habit-detail-actions-grid .btn{min-height:64px!important;gap:6px!important;border-radius:18px!important;background:var(--surface)!important;border:0!important;font-size:13px!important;font-weight:600!important;color:var(--text)!important}
body .habit-detail-dashboard>.habit-detail-actions-grid .btn svg{color:var(--accent-ink)}
body .habit-detail-dashboard>.detail-series-link{padding:14px 16px!important;min-height:64px!important;border-radius:24px!important;background:var(--surface)!important;border:0!important}
body .habit-detail-dashboard .stat-card{padding:18px!important;border-radius:24px!important;border:0!important;background:var(--surface)!important;box-shadow:none!important;margin:0!important}
/* Kalendarz: tytuł po lewej, strzałki po prawej */
body .habit-detail-dashboard .history-month-header{display:flex!important;align-items:center;gap:4px;padding:0!important;min-height:44px;height:auto!important;margin-bottom:12px}
body .habit-detail-dashboard .history-month-header h3{order:0;flex:1;margin:0!important;text-align:left!important;font:700 18px/1.3 Manrope,sans-serif!important;letter-spacing:-.4px;text-transform:capitalize;display:flex;align-items:baseline;gap:6px}
body .habit-detail-dashboard .history-month-header h3 small{font:inherit!important;color:inherit!important;margin:0!important;display:inline!important}
body .habit-detail-dashboard .history-month-header>button[data-value="-1"]{order:1}
body .habit-detail-dashboard .history-month-header>button[data-value="1"]{order:2}
body .habit-detail-dashboard .history-month-header>button{width:44px!important;height:44px!important;min-width:44px!important;border-radius:14px!important;background:var(--surface-3,var(--surface-2))!important;border:0!important}
body .habit-detail-dashboard .habit-history-grid{gap:6px 4px!important}
body .habit-detail-dashboard .habit-history-grid .weekday-label{font-size:12px!important}
body .habit-detail-dashboard .habit-history-grid .history-day{min-height:40px!important;border-radius:12px!important}
body .habit-detail-dashboard .habit-history-grid .history-day[aria-pressed=true],body .habit-detail-dashboard .habit-history-grid .history-day.is-selected{box-shadow:inset 0 0 0 1.5px var(--accent-graphic,var(--accent))!important}

/* Nowy nawyk i edycja: etapy jako przełącznik segmentowy, karta podglądu */
body form[data-habit-editor-mode] .editor-progress{margin:4px 24px 8px!important;padding:4px!important;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:4px!important;border:0!important;border-radius:16px!important;background:var(--surface)!important;box-shadow:none!important}
body form[data-habit-editor-mode] .editor-progress:after,body form[data-habit-editor-mode] .editor-progress:before{display:none!important}
body form[data-habit-editor-mode] .editor-progress>button{min-height:44px!important;padding:0!important;border:0!important;border-radius:12px!important;background:transparent!important;color:var(--muted)!important;box-shadow:none!important}
body form[data-habit-editor-mode] .editor-progress>button:after,body form[data-habit-editor-mode] .editor-progress>button:before{display:none!important}
body form[data-habit-editor-mode] .editor-progress>button strong{font:600 14px/1.3 'DM Sans',sans-serif!important;color:inherit!important}
body form[data-habit-editor-mode] .editor-progress>button[aria-current=step]{background:var(--surface-3,var(--surface-2))!important;color:var(--text)!important}
body form[data-habit-editor-mode] .habit-draft-card{padding:12px 16px 12px 12px!important;gap:14px!important;border:0!important;border-radius:22px!important;background:var(--surface)!important}
body form[data-habit-editor-mode] .habit-draft-card .habit-draft-icon{width:48px!important;height:48px!important;min-width:48px!important;border-radius:16px!important}
body form[data-habit-editor-mode] .habit-draft-card strong{font:600 16px/1.3 Manrope,sans-serif!important;letter-spacing:-.2px}
body form[data-habit-editor-mode] .habit-draft-card small{font-size:14px!important}

/* Popraw wynik: wyraźny nagłówek i duże pole wyniku */
body .habit-entry-form .habit-entry-heading h3{font:700 20px/1.3 Manrope,sans-serif!important;letter-spacing:-.45px!important;color:var(--text)!important}
body .habit-entry-form .habit-entry-heading p{font-size:13px!important;color:var(--muted)!important;margin-top:2px!important}
body .habit-entry-form>.sheet-content>.value-field .value-trigger{min-height:72px!important;padding:0 20px!important;border-radius:20px!important;font:800 26px/1.2 Manrope,sans-serif!important;letter-spacing:-.6px;font-variant-numeric:tabular-nums}
body .habit-entry-form .habit-entry-note{font-size:13px!important;line-height:1.5!important;color:var(--muted)!important}
body form[data-habit-editor-mode] .sheet-content .editor-progress{margin:4px 0 8px!important}

/* Personalizacja i AI: bez ramki fokusu na tytule, przycisk zdjęcia zamiast systemowego pola */
body .sheet-header h2[tabindex="-1"]:focus,body h2[tabindex="-1"]:focus:not(:focus-visible),body h1[tabindex="-1"]:focus:not(:focus-visible),body h3[tabindex="-1"]:focus:not(:focus-visible){outline:none!important;box-shadow:none!important}
body .personalization-answer-toolbar{display:flex!important;flex-wrap:wrap;gap:4px!important;align-items:center}
body .personalization-photo{position:relative;cursor:pointer}
body .personalization-photo>input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;font-size:0}
body .personalization-photo:focus-within{outline:2px solid var(--accent);outline-offset:2px}
body .personalization-question-footer{display:grid!important;grid-template-columns:1fr 1fr;gap:8px!important}
body .personalization-question-footer>.is-primary{grid-column:1/-1}
body .personalization-question-footer>.btn:not(.is-primary){min-height:44px;background:transparent!important;border:0!important;color:var(--text)!important;font-weight:600}
body .personalization-screen .personalization-photo{display:flex;align-items:center;gap:7px;padding:9px 10px!important;color:var(--accent-ink)!important;font-size:13px!important;font-weight:600;min-height:40px}
body .personalization-screen .personalization-dictate{font-size:13px!important;font-weight:600}
body .personalization-answer-toolbar{justify-content:flex-start!important}
body .personalization-question.interview .personalization-text-field>.personalization-field-label{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
body .personalization-question-heading h3{font-size:24px!important;line-height:1.25!important;letter-spacing:-.6px!important}
body .personalization-screen [data-action="personalization-reset-confirm"]{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:44px;color:var(--red,#ff6b78)!important;text-decoration:none!important;font-weight:600}
