/* Componenti del portale interventi. I colori si regolano con le variabili del tema. */
:root{
	--tp-primary:#0b3d6b;--tp-primary-2:#155a96;--tp-accent:#2a78d6;--tp-green:#1d7a52;--tp-warm:#d9661f;
	--tp-ink:#1a2b3c;--tp-muted:#5b6b7b;--tp-line:#dbe3ea;--tp-soft:#f2f6f9;--tp-card:#fff;--tp-radius:10px;
	--tp-alert:#b42318;--tp-alert-bg:#fef3f2;--tp-shadow:0 1px 2px rgba(16,40,64,.06),0 4px 16px rgba(16,40,64,.06)
}
.tp-container{max-width:1240px;margin:0 auto;padding:0 24px}
.tp-main{color:var(--tp-ink)}
.tp-h2{font-size:1.5rem;line-height:1.25;margin:0 0 18px;color:var(--tp-primary);font-weight:700}
.tp-h2 small{font-size:.9rem;color:var(--tp-muted);font-weight:400}
.tp-center{text-align:center;margin-top:28px}
.tp-small{font-size:.9rem;color:var(--tp-muted)}
.tp-notice{background:var(--tp-soft);border-left:4px solid var(--tp-accent);padding:12px 16px;border-radius:6px;color:var(--tp-muted)}
.tp-loading{padding:24px;color:var(--tp-muted)}
.screen-reader-text{position:absolute!important;clip:rect(1px,1px,1px,1px);width:1px;height:1px;overflow:hidden}

/* Pulsanti, badge, chip */
.tp-btn{font-family:inherit;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 20px;border-radius:999px;border:2px solid var(--tp-primary);font-weight:600;font-size:.95rem;text-decoration:none;cursor:pointer;background:transparent;color:var(--tp-primary);line-height:1.2;transition:background .15s,color .15s}
.tp-btn--primary{background:var(--tp-primary);color:#fff}.tp-btn--primary:hover{background:var(--tp-primary-2);border-color:var(--tp-primary-2);color:#fff}
.tp-btn--outline:hover{background:var(--tp-primary);color:#fff}
.tp-btn--ghost{border-color:transparent;color:var(--tp-accent);padding:8px 10px}.tp-btn--ghost:hover{text-decoration:underline}
.tp-btn--block{display:flex;width:100%;margin-top:18px}
.tp-btn--sm{padding:6px 12px;font-size:.85rem;margin-top:8px}
.tp-badge{display:inline-block;padding:3px 10px;border-radius:999px;font-size:.78rem;font-weight:600;letter-spacing:.02em;background:#e6eef6;color:var(--tp-primary);text-decoration:none;white-space:nowrap}
.tp-badge--cipe{background:#e3eefb;color:#174f8f}.tp-badge--cipess{background:#e1f3ea;color:#145c3c}.tp-badge--opcm{background:#fdeee2;color:#8a3d0c}.tp-badge--altro{background:#eeeaf8;color:#46368f}
.tp-badge--stato{background:#fff4d6;color:#7a5200}.tp-badge--alert{background:var(--tp-alert-bg);color:var(--tp-alert)}.tp-badge--light{background:rgba(255,255,255,.18);color:#fff}
a.tp-badge:hover{filter:brightness(.95);text-decoration:underline}

.tp-chips{display:flex;flex-wrap:wrap;gap:8px}
.tp-chip{border:1px solid var(--tp-line);background:#fff;color:var(--tp-ink);border-radius:999px;padding:8px 16px;font:inherit;font-size:.92rem;font-weight:600;cursor:pointer;transition:.15s}
.tp-chip span{display:inline-block;margin-left:6px;font-size:.78rem;background:var(--tp-soft);border-radius:999px;padding:1px 8px;color:var(--tp-muted)}
.tp-chip:hover{border-color:var(--tp-primary)}
.tp-chip.is-active{background:var(--tp-primary);border-color:var(--tp-primary);color:#fff}.tp-chip.is-active span{background:rgba(255,255,255,.2);color:#fff}

/* KPI */
.tp-kpi{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:0;background:#fff;border:1px solid var(--tp-line);border-radius:var(--tp-radius);margin:28px 0;box-shadow:var(--tp-shadow);overflow:hidden}
.tp-kpi__item{padding:20px 22px;border-right:1px solid var(--tp-line);display:flex;flex-direction:column;gap:2px}
.tp-kpi__item:last-child{border-right:0}
.tp-kpi__num{font-size:1.75rem;font-weight:700;color:var(--tp-primary);line-height:1.1;font-variant-numeric:tabular-nums}
.tp-kpi__lbl{font-size:.88rem;color:var(--tp-muted)}

/* Toolbar dashboard */
.tp-toolbar{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:16px;margin:8px 0 16px}
.tp-toolbar__right{display:flex;gap:10px;flex-wrap:wrap}
.tp-search input,.tp-select select,.tp-fld input,.tp-fld select{font:inherit;font-size:.95rem;padding:9px 12px;border:1px solid #b8c4cf;border-radius:8px;background:#fff;color:var(--tp-ink);min-height:42px}
.tp-search input{min-width:260px}
.tp-search input:focus,.tp-select select:focus,.tp-fld input:focus,.tp-fld select:focus,.tp-chip:focus-visible,.tp-btn:focus-visible{outline:3px solid #f2b705;outline-offset:2px}
.tp-dash__count{color:var(--tp-muted);margin:0 0 16px}

/* Card delibere */
.tp-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(330px,1fr));gap:22px}
.tp-card{background:var(--tp-card);border:1px solid var(--tp-line);border-radius:var(--tp-radius);overflow:hidden;display:flex;flex-direction:column;box-shadow:var(--tp-shadow);transition:transform .15s,box-shadow .15s;border-top:4px solid var(--tp-accent)}
.tp-card--cipess{border-top-color:var(--tp-green)}.tp-card--opcm{border-top-color:var(--tp-warm)}.tp-card--altro{border-top-color:#6250d6}
.tp-card:hover{transform:translateY(-2px);box-shadow:0 2px 4px rgba(16,40,64,.08),0 12px 28px rgba(16,40,64,.10)}
.tp-card[hidden]{display:none}
.tp-card__img{height:150px;background-size:cover;background-position:center}
.tp-card__body{padding:20px 22px 22px;display:flex;flex-direction:column;flex:1}
.tp-card__eyebrow{display:flex;justify-content:space-between;align-items:center;margin:0 0 10px}
.tp-card__year{font-weight:700;color:var(--tp-muted);font-variant-numeric:tabular-nums}
.tp-card__title{font-size:1.35rem;margin:0 0 6px;line-height:1.2}
.tp-card__title a{color:var(--tp-primary);text-decoration:none}.tp-card__title a:hover{text-decoration:underline}
.tp-card__desc{font-style:italic;color:var(--tp-muted);font-size:.93rem;margin:0 0 16px;min-height:2.8em}
.tp-card__metrics{display:grid;grid-template-columns:1fr 1fr;gap:12px 16px;margin:0 0 16px;padding:14px 0;border-top:1px solid var(--tp-line);border-bottom:1px solid var(--tp-line)}
.tp-card__metrics dt{font-size:.75rem;text-transform:uppercase;letter-spacing:.05em;color:var(--tp-muted);margin:0}
.tp-card__metrics dd{margin:2px 0 0;font-weight:700;font-size:1.05rem;color:var(--tp-ink);font-variant-numeric:tabular-nums}
.tp-card__more{margin-top:auto;padding-top:12px;font-weight:700;color:var(--tp-accent);text-decoration:none}
.tp-card__more:hover{text-decoration:underline}
.tp-progress{height:8px;min-height:8px;background:#e7edf2;border-radius:999px;overflow:hidden;flex:none}
.tp-progress__bar{height:100%;background:linear-gradient(90deg,var(--tp-green),#3aa874);border-radius:999px}
.tp-progress__lbl{font-size:.82rem;color:var(--tp-muted);margin:6px 0 0}
.tp-empty{text-align:center;color:var(--tp-muted);padding:30px}

/* Classifica */
.tp-rank{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.tp-rank li>a,.tp-rank li>div{display:grid;grid-template-columns:1fr auto;gap:4px 12px;padding:12px 16px;background:#fff;border:1px solid var(--tp-line);border-radius:8px;text-decoration:none;color:var(--tp-ink)}
.tp-rank li>a:hover{border-color:var(--tp-accent)}
.tp-rank__name{font-weight:700}.tp-rank__val{font-weight:700;font-variant-numeric:tabular-nums}.tp-rank__val small{color:var(--tp-muted);font-weight:400;margin-left:6px}
.tp-rank__bar{grid-column:1/-1;height:6px;background:#e7edf2;border-radius:999px;overflow:hidden}.tp-rank__bar i{display:block;height:100%;background:var(--tp-accent);border-radius:999px}
.tp-rank li.is-other .tp-rank__bar i{background:#9aa9b7}

/* Mappe */
.tp-map{width:100%;border-radius:var(--tp-radius);border:1px solid var(--tp-line);background:#e9eff4;z-index:0}
.tp-map__note{font-size:.85rem;color:var(--tp-muted);margin:8px 0 0}
.tp-pop strong{font-size:1rem;color:var(--tp-primary)}.tp-pop p{margin:2px 0 6px;color:var(--tp-muted)}
.tp-pop ul{list-style:none;margin:0;padding:0;max-height:220px;overflow:auto}
.tp-pop li{display:flex;justify-content:space-between;gap:10px;padding:5px 0;border-top:1px solid #eef2f5;font-size:.85rem}
.tp-pop li span{white-space:nowrap;color:var(--tp-muted)}
.tp-pop__more{font-size:.8rem}
.tp-pin span{display:block;width:30px;height:30px;border-radius:50% 50% 50% 0;background:var(--tp-warm);transform:rotate(-45deg);border:3px solid #fff;box-shadow:0 2px 6px rgba(0,0,0,.3)}

/* Riepilogo */
.tp-riep{margin:24px 0 48px}
.tp-filters{background:#fff;border:1px solid var(--tp-line);border-radius:var(--tp-radius);padding:18px 20px;box-shadow:var(--tp-shadow);position:relative;z-index:2}
.tp-filters__row{display:flex;flex-wrap:wrap;gap:12px 14px;align-items:flex-end}
.tp-filters__row+.tp-filters__row{margin-top:12px}
.tp-fld{display:flex;flex-direction:column;gap:4px;flex:1 1 170px;min-width:150px}
.tp-fld--wide{flex:2 1 260px}.tp-fld--sm{flex:0 1 110px;min-width:100px}
.tp-fld>span{font-size:.8rem;font-weight:600;color:var(--tp-muted);text-transform:uppercase;letter-spacing:.04em}
.tp-fld select{max-width:100%}
.tp-check{display:flex;align-items:center;gap:8px;font-size:.92rem;min-height:42px}
.tp-kpi--riep{margin:20px 0}
.tp-charts{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin:22px 0 34px}
.tp-chart{margin:0;background:#fff;border:1px solid var(--tp-line);border-radius:var(--tp-radius);padding:20px 22px;box-shadow:var(--tp-shadow);min-width:0}
.tp-chart--wide{grid-column:1/-1}
.tp-chart figcaption{margin-bottom:14px}.tp-chart figcaption strong{display:block;font-size:1.08rem;color:var(--tp-primary)}.tp-chart figcaption span{font-size:.86rem;color:var(--tp-muted)}
.tp-chart__box{position:relative;height:300px}
.tp-chart [data-chart="delibere"]{min-height:340px}
.tp-chart:has([data-chart="delibere"]) .tp-chart__box{height:380px}
.tp-chart__note{font-size:.92rem;margin:14px 0 0;padding:10px 14px;background:var(--tp-soft);border-radius:8px}
.tp-riep__map{margin:0 0 34px}
.tp-table__head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:12px}.tp-table__head .tp-h2{margin:0}
.tp-table-wrap{overflow-x:auto;border:1px solid var(--tp-line);border-radius:var(--tp-radius);background:#fff}
.tp-table{width:100%;border-collapse:collapse;font-size:.92rem}
.tp-table th,.tp-table td{padding:11px 14px;text-align:left;border-bottom:1px solid var(--tp-line);vertical-align:top}
.tp-table thead th{background:var(--tp-soft);font-size:.78rem;text-transform:uppercase;letter-spacing:.04em;color:var(--tp-muted);white-space:nowrap;position:sticky;top:0}
.tp-table th[data-sort]{cursor:pointer;user-select:none}.tp-table th[data-sort]:hover{color:var(--tp-primary)}
.tp-table th[aria-sort="ascending"]::after{content:" ▲"}.tp-table th[aria-sort="descending"]::after{content:" ▼"}
.tp-table .num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.tp-table tbody tr:hover{background:#f8fbfd}
.tp-table a{color:var(--tp-primary-2)}
.tp-table td:nth-child(2){min-width:280px}
.tp-table tfoot th{background:var(--tp-soft)}
.tp-cup{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.86rem;letter-spacing:.02em}
.tp-pager{display:flex;gap:6px;justify-content:center;margin:18px 0;flex-wrap:wrap;align-items:center}
.tp-pager button{min-width:40px;height:40px;border:1px solid var(--tp-line);background:#fff;border-radius:8px;font:inherit;cursor:pointer;color:var(--tp-ink)}
.tp-pager button.is-active{background:var(--tp-primary);color:#fff;border-color:var(--tp-primary)}
.tp-pager button:disabled{opacity:.4;cursor:default}

/* Testate pagina */
.tp-pagehead{background:linear-gradient(120deg,var(--tp-primary) 0%,var(--tp-primary-2) 100%);color:#fff;padding:40px 0 48px;position:relative}
.tp-pagehead--img{background:linear-gradient(90deg,rgba(11,61,107,.92),rgba(11,61,107,.55)),var(--tp-head-img) center/cover}
.tp-pagehead__title{font-size:clamp(2rem,4vw,3rem);margin:10px 0 8px;line-height:1.1;color:#fff}
.tp-pagehead__lead{font-size:1.1rem;max-width:860px;opacity:.92;margin:0}
.tp-breadcrumb{font-size:.88rem;margin-bottom:12px}.tp-breadcrumb a{color:inherit;opacity:.9}.tp-breadcrumb span{opacity:.6;margin:0 4px}

/* Scheda progetto */
.tp-hero{position:relative;height:clamp(380px,62vh,640px);overflow:hidden;background:var(--tp-primary)}
.tp-hero__slides,.tp-hero__slide{position:absolute;inset:0;margin:0}
.tp-hero__slide{opacity:0;transition:opacity .8s ease}
.tp-hero__slide.is-active{opacity:1}
.tp-hero__slide img,.tp-hero__ph{width:100%;height:100%;object-fit:cover;display:block}
.tp-hero__slide figcaption{position:absolute;right:16px;top:16px;background:rgba(0,0,0,.5);color:#fff;font-size:.8rem;padding:4px 10px;border-radius:4px}
.tp-hero__overlay{position:absolute;left:0;right:0;bottom:0;padding:120px 0 34px;background:linear-gradient(180deg,rgba(6,28,52,0) 0%,rgba(6,28,52,.55) 40%,rgba(6,28,52,.9) 100%);color:#fff}
.tp-hero--placeholder .tp-hero__overlay{background:linear-gradient(180deg,rgba(6,28,52,0) 0%,rgba(6,28,52,.35) 40%,rgba(6,28,52,.85) 100%)}
.tp-hero__title{font-size:clamp(1.6rem,3.2vw,2.6rem);line-height:1.15;margin:8px 0 10px;max-width:1000px;color:#fff;text-shadow:0 1px 12px rgba(0,0,0,.25)}
.tp-hero__meta{margin:0;font-size:1rem;opacity:.95}
.tp-hero__badges{display:flex;flex-wrap:wrap;gap:6px;margin:0}
.tp-hero__nav{position:absolute;top:42%;z-index:3;width:48px;height:48px;border-radius:50%;border:0;background:rgba(255,255,255,.88);color:var(--tp-primary);font-size:28px;line-height:1;cursor:pointer;box-shadow:0 2px 10px rgba(0,0,0,.2)}
.tp-hero__nav--prev{left:18px}.tp-hero__nav--next{right:18px}
.tp-hero__dots{position:absolute;z-index:3;top:20px;left:50%;transform:translateX(-50%);display:flex;gap:8px}
.tp-hero__dots button{width:11px;height:11px;border-radius:50%;border:2px solid #fff;background:transparent;padding:0;cursor:pointer}
.tp-hero__dots button.is-active{background:#fff}
.tp-hero .tp-breadcrumb{color:#fff}
.tp-single__body{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:40px;padding-top:40px;padding-bottom:20px}
.tp-section{margin-bottom:44px}
.tp-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:20px}
.tp-stat{background:#fff;border:1px solid var(--tp-line);border-radius:var(--tp-radius);padding:16px 18px;display:flex;flex-direction:column;gap:4px;box-shadow:var(--tp-shadow)}
.tp-stat__lbl{font-size:.78rem;text-transform:uppercase;letter-spacing:.05em;color:var(--tp-muted);font-weight:600}
.tp-stat__num{font-size:1.25rem;font-weight:700;color:var(--tp-primary);font-variant-numeric:tabular-nums;line-height:1.2}
.tp-stat__sub{font-size:.82rem;color:var(--tp-muted)}
.tp-stat--alert{border-color:#f4c7c3;background:var(--tp-alert-bg)}.tp-stat--alert .tp-stat__num,.tp-stat--alert .tp-stat__lbl{color:var(--tp-alert)}
.tp-bars{display:grid;gap:10px}
.tp-bars__row{display:grid;grid-template-columns:170px 1fr 60px;align-items:center;gap:12px;font-size:.92rem}
.tp-bars__row strong{text-align:right;font-variant-numeric:tabular-nums}
.tp-table--plain td small{color:var(--tp-muted)}
.tp-table--years{font-size:.84rem}.tp-table--years th,.tp-table--years td{padding:9px 6px}.tp-table--years th:first-child{min-width:130px;padding-left:12px}
.tp-single .tp-chart__box{height:260px;margin-bottom:16px}
.tp-timeline{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,1fr);position:relative}
.tp-timeline::before{content:"";position:absolute;left:8%;right:8%;top:11px;height:3px;background:var(--tp-line)}
.tp-timeline li{position:relative;text-align:center;padding:0 8px;display:flex;flex-direction:column;gap:4px;font-size:.92rem}
.tp-timeline__dot{width:24px;height:24px;border-radius:50%;margin:0 auto 8px;background:#fff;border:3px solid #b8c4cf;position:relative;z-index:1}
.tp-timeline li.is-done .tp-timeline__dot{background:var(--tp-green);border-color:var(--tp-green)}
.tp-timeline li.is-planned .tp-timeline__dot{border-color:var(--tp-accent)}
.tp-timeline li span:last-child{color:var(--tp-muted)}
.tp-box{background:#fff;border:1px solid var(--tp-line);border-radius:var(--tp-radius);padding:22px;box-shadow:var(--tp-shadow);margin-bottom:20px;position:sticky;top:20px}
.tp-box--soft{background:var(--tp-soft);box-shadow:none;position:static}
.tp-box__title{font-size:1.1rem;margin:0 0 14px;color:var(--tp-primary)}
.tp-dl{margin:0}.tp-dl dt{font-size:.76rem;text-transform:uppercase;letter-spacing:.05em;color:var(--tp-muted);font-weight:600;margin-top:12px}.tp-dl dt:first-child{margin-top:0}
.tp-dl dd{margin:3px 0 0;font-weight:600}
.tp-dl .tp-cup{font-size:1.05rem;background:var(--tp-soft);padding:4px 8px;border-radius:6px;display:inline-block}
.tp-single__map{padding:30px 0 56px;background:var(--tp-soft);border-top:1px solid var(--tp-line)}
.tp-map--single{border-radius:0;border-left:0;border-right:0}
.tp-content{max-width:820px;line-height:1.65}

@media (max-width:1000px){
	.tp-single__body{grid-template-columns:minmax(0,1fr)}.tp-box{position:static}
	.tp-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
	.tp-charts{grid-template-columns:minmax(0,1fr)}
}
@media (max-width:640px){
	.tp-container{padding:0 16px}
	.tp-kpi{grid-template-columns:1fr 1fr}.tp-kpi__item{border-right:0;border-bottom:1px solid var(--tp-line)}
	.tp-search input{min-width:0;width:100%}.tp-toolbar__right,.tp-search{width:100%}
	.tp-cards{grid-template-columns:1fr}
	.tp-bars__row{grid-template-columns:110px 1fr 50px}
	.tp-timeline{grid-template-columns:1fr;gap:16px}.tp-timeline::before{display:none}
	.tp-hero__nav{display:none}
}
@media (prefers-reduced-motion:reduce){.tp-hero__slide,.tp-card{transition:none}}
@media print{.tp-filters,.tp-pager,.tp-hero__nav,.tp-hero__dots,[data-csv]{display:none!important}.tp-hero{height:auto}.tp-hero__slide{position:relative}}
.tp-chart[hidden]{display:none}
.tp-btn[hidden]{display:none}
@media (max-width:640px){.tp-kpi__num{font-size:1.3rem}}

/* ===== Area riservata ===== */
.tp-area{margin:24px 0 56px}
.tp-area--login{display:flex;justify-content:center}
.tp-login{width:100%;max-width:440px;margin-top:8px;background:#fff;border:1px solid var(--tp-line);border-radius:var(--tp-radius);padding:32px;box-shadow:var(--tp-shadow)}
.tp-login form{display:grid;gap:14px;margin-top:16px}
.tp-login .tp-fld input{width:100%}
.tp-area__bar{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;border-bottom:2px solid var(--tp-line);margin-bottom:22px}
.tp-area__tabs{display:flex;gap:4px;flex-wrap:wrap}
.tp-area__tabs a{padding:12px 18px;font-weight:700;text-decoration:none;color:var(--tp-muted);border-bottom:3px solid transparent;margin-bottom:-2px}
.tp-area__tabs a:hover{color:var(--tp-primary)}
.tp-area__tabs a.is-active{color:var(--tp-primary);border-bottom-color:var(--tp-primary)}
.tp-area__user{display:flex;align-items:center;gap:8px;font-size:.92rem;color:var(--tp-muted)}
.tp-alert{padding:12px 16px;border-radius:8px;margin:0 0 18px;border-left:4px solid}
.tp-alert--success{background:#ecf8f1;border-color:#1d7a52;color:#14532d}
.tp-alert--error{background:var(--tp-alert-bg);border-color:var(--tp-alert);color:#7a1a12}
.tp-alert a{color:inherit;font-weight:700}
.tp-kpi--area{margin:0 0 20px}
.tp-area__search{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap;margin-bottom:24px}
.tp-area__new{margin-left:auto}
.tp-nowrap{white-space:nowrap}
.tp-pager__a{min-width:40px;height:40px;display:inline-grid;place-items:center;border:1px solid var(--tp-line);border-radius:8px;background:#fff;text-decoration:none;color:var(--tp-ink)}
.tp-pager__a.is-active{background:var(--tp-primary);color:#fff;border-color:var(--tp-primary)}
.tp-area__grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(380px,1fr));gap:22px;align-items:start}
.tp-panel{background:#fff;border:1px solid var(--tp-line);border-radius:var(--tp-radius);padding:22px 24px;box-shadow:var(--tp-shadow);margin:0 0 22px;min-width:0}
.tp-panel--accent{border-top:4px solid var(--tp-primary)}
fieldset.tp-panel legend{font-weight:700;color:var(--tp-primary);font-size:1.15rem;padding:0 8px;margin-left:-8px}
.tp-drop{display:block;border:2px dashed #b8c4cf;border-radius:10px;padding:22px;text-align:center;cursor:pointer;margin:14px 0;background:var(--tp-soft)}
.tp-drop:hover{border-color:var(--tp-primary)}
.tp-drop input{display:block;margin:0 auto 8px;max-width:100%}
.tp-drop span{color:var(--tp-muted);font-size:.9rem}
.tp-area__stats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:16px 0}
.tp-area__stats>div{background:var(--tp-soft);border-radius:8px;padding:12px}
.tp-area__stats dt{font-size:.78rem;color:var(--tp-muted);text-transform:uppercase;letter-spacing:.04em}
.tp-area__stats dd{margin:2px 0 0;font-size:1.4rem;font-weight:700;color:var(--tp-primary)}
.tp-area__stats--calc{grid-template-columns:repeat(3,1fr)}.tp-area__stats--calc dd{font-size:1.05rem}
.tp-details{margin:10px 0}.tp-details summary{cursor:pointer;font-weight:600}
.tp-area__actions{display:flex;gap:10px;margin-top:16px}
.tp-import-progress progress{width:100%;height:14px;margin-top:16px}
.tp-pform__head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin-bottom:16px;flex-wrap:wrap}
.tp-pform__head .tp-h2{margin:0}
.tp-pform__foot{display:flex;gap:10px;position:sticky;bottom:0;background:rgba(251,252,253,.96);padding:14px 0;border-top:1px solid var(--tp-line);z-index:5}
.tp-fgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 16px;margin-bottom:14px}
.tp-fgrid--5{grid-template-columns:repeat(5,minmax(0,1fr))}
.tp-span-3{grid-column:span 2}
.tp-pform .tp-fld{min-width:0}
.tp-pform .tp-fld input,.tp-pform .tp-fld select,.tp-pform textarea{width:100%}
.tp-pform textarea{font:inherit;font-size:.95rem;padding:9px 12px;border:1px solid #b8c4cf;border-radius:8px}
.tp-fld small{color:var(--tp-alert);font-size:.8rem}
.tp-fin-table td{vertical-align:middle}
.tp-fin-table select{min-width:220px;max-width:340px}
.tp-fin-table input[data-del-new]{margin-top:6px;width:100%}
.tp-in-year{width:90px}.tp-in-money{width:150px}.tp-in-sogg{width:110px}
.tp-fin-table input,.tp-fin-table select{font:inherit;font-size:.92rem;padding:7px 9px;border:1px solid #b8c4cf;border-radius:6px;min-height:38px}
.tp-thumbs{list-style:none;padding:0;margin:8px 0 16px;display:flex;flex-wrap:wrap;gap:12px}
.tp-thumbs li{display:flex;flex-direction:column;gap:4px;font-size:.85rem}
.tp-thumbs img{width:110px;height:110px;object-fit:cover;border-radius:8px}
.tp-thumbs .tp-check{min-height:0}
@media (max-width:900px){.tp-fgrid,.tp-fgrid--5{grid-template-columns:repeat(2,minmax(0,1fr))}.tp-span-3{grid-column:1/-1}.tp-area__stats{grid-template-columns:repeat(2,1fr)}.tp-area__grid{grid-template-columns:minmax(0,1fr)}}
@media (max-width:560px){.tp-fgrid,.tp-fgrid--5{grid-template-columns:minmax(0,1fr)}.tp-area__new{margin-left:0}}
.tp-table a.tp-btn--primary,.tp-table a.tp-btn--primary:hover{color:#fff;text-decoration:none}.tp-table a.tp-btn--ghost{text-decoration:none}
.tp-login .tp-h2{margin-top:0}
