/* ==========================================================================
   Cava Energia - Area Clienti
   Design system basato su Bootstrap 5.3 (colori e tipografia del sito pubblico)
   ========================================================================== */

:root {
	--ce-blue: #1069B1;
	--ce-blue-600: #0d5a98;
	--ce-blue-700: #0B4A7D;
	--ce-blue-900: #082f50;
	--ce-blue-50: #eef5fb;
	--ce-blue-100: #d9e9f6;
	--ce-yellow: #FCE800;
	--ce-yellow-soft: #fff7a8;
	--ce-ink: #16212C;
	--ce-ink-2: #3A4753;
	--ce-muted: #69727B;
	--ce-line: #e4e8ed;
	--ce-bg: #f4f6f9;
	--ce-surface: #ffffff;
	--ce-green: #00A870;
	--ce-green-50: #e6f7f0;
	--ce-red: #D93A49;
	--ce-red-50: #fdecee;
	--ce-orange: #E8890C;
	--ce-orange-50: #fdf3e4;
	--ce-violet: #6c4bd8;
	--ce-violet-50: #f0ecfd;

	--ce-cat-power: #F2A900;
	--ce-cat-gas: #1069B1;
	--ce-cat-fiber: #6c4bd8;
	--ce-cat-voip: #00A870;
	--ce-cat-sim: #E0457B;
	--ce-cat-other: #69727B;

	--ce-radius: 18px;
	--ce-radius-sm: 12px;
	--ce-radius-pill: 999px;
	--ce-shadow-sm: 0 1px 2px rgba(22, 33, 44, .06), 0 1px 3px rgba(22, 33, 44, .04);
	--ce-shadow: 0 4px 18px rgba(22, 33, 44, .07);
	--ce-shadow-lg: 0 18px 50px rgba(16, 105, 177, .18);
	--ce-sidebar-w: 272px;
	--ce-topbar-h: 68px;
	--ce-bottomnav-h: 68px;

	--bs-primary: var(--ce-blue);
	--bs-primary-rgb: 16, 105, 177;
	--bs-body-font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--bs-body-color: var(--ce-ink);
	--bs-body-bg: var(--ce-bg);
	--bs-border-color: var(--ce-line);
	--bs-link-color: var(--ce-blue);
	--bs-link-color-rgb: 16, 105, 177;
	--bs-link-hover-color: var(--ce-blue-700);
	--bs-border-radius: 12px;
	--bs-border-radius-lg: 18px;
	--bs-success: var(--ce-green);
	--bs-success-rgb: 0, 168, 112;
	--bs-danger: var(--ce-red);
	--bs-danger-rgb: 217, 58, 73;
	--bs-warning-rgb: 232, 137, 12;
	--bs-secondary-color: var(--ce-muted);
}

html { scroll-behavior: smooth; }

body.portal {
	font-family: var(--bs-body-font-family);
	background: var(--ce-bg);
	color: var(--ce-ink);
	-webkit-font-smoothing: antialiased;
	font-size: 15.5px;
	letter-spacing: .005em;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
	font-weight: 700;
	letter-spacing: -.015em;
	color: var(--ce-ink);
}

a { text-decoration: none; }
.text-muted, .text-secondary { color: var(--ce-muted) !important; }
.fw-semibold { font-weight: 600 !important; }
.small-caps { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; color: var(--ce-muted); }
.tabular { font-variant-numeric: tabular-nums; }
.visually-hidden-focusable:focus { position: fixed !important; top: 10px; left: 10px; z-index: 2000; background: #fff; padding: .5rem 1rem; border-radius: var(--ce-radius-pill); }

::selection { background: var(--ce-yellow); color: var(--ce-ink); }

:focus-visible { outline: 3px solid rgba(16, 105, 177, .35); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn {
	--bs-btn-font-weight: 600;
	--bs-btn-padding-x: 1.15rem;
	--bs-btn-padding-y: .6rem;
	border-radius: var(--ce-radius-pill);
	transition: transform .12s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-sm { --bs-btn-padding-x: .85rem; --bs-btn-padding-y: .35rem; font-size: .86rem; }
.btn-lg { --bs-btn-padding-x: 1.6rem; --bs-btn-padding-y: .85rem; font-size: 1.02rem; }

.btn-primary {
	--bs-btn-bg: var(--ce-blue);
	--bs-btn-border-color: var(--ce-blue);
	--bs-btn-hover-bg: var(--ce-blue-700);
	--bs-btn-hover-border-color: var(--ce-blue-700);
	--bs-btn-active-bg: var(--ce-blue-900);
	--bs-btn-active-border-color: var(--ce-blue-900);
	--bs-btn-disabled-bg: var(--ce-blue);
	--bs-btn-disabled-border-color: var(--ce-blue);
	box-shadow: 0 6px 16px rgba(16, 105, 177, .22);
}
.btn-accent {
	--bs-btn-bg: var(--ce-yellow);
	--bs-btn-color: var(--ce-blue-700);
	--bs-btn-border-color: var(--ce-yellow);
	--bs-btn-hover-bg: #ffef3a;
	--bs-btn-hover-color: var(--ce-blue-900);
	--bs-btn-hover-border-color: #ffef3a;
	--bs-btn-active-bg: #e9d700;
	--bs-btn-active-color: var(--ce-blue-900);
	--bs-btn-active-border-color: #e9d700;
	box-shadow: 0 6px 16px rgba(252, 232, 0, .35);
}
.btn-soft {
	--bs-btn-bg: var(--ce-blue-50);
	--bs-btn-color: var(--ce-blue);
	--bs-btn-border-color: transparent;
	--bs-btn-hover-bg: var(--ce-blue-100);
	--bs-btn-hover-color: var(--ce-blue-700);
	--bs-btn-hover-border-color: transparent;
	--bs-btn-active-bg: var(--ce-blue-100);
	--bs-btn-active-color: var(--ce-blue-700);
}
.btn-outline-primary {
	--bs-btn-color: var(--ce-blue);
	--bs-btn-border-color: rgba(16, 105, 177, .35);
	--bs-btn-hover-bg: var(--ce-blue);
	--bs-btn-hover-border-color: var(--ce-blue);
	--bs-btn-active-bg: var(--ce-blue-700);
}
.btn-light {
	--bs-btn-bg: #fff;
	--bs-btn-border-color: var(--ce-line);
	--bs-btn-hover-bg: #f7f9fb;
	--bs-btn-hover-border-color: #d5dbe2;
	--bs-btn-color: var(--ce-ink);
}
.btn-danger { --bs-btn-bg: var(--ce-red); --bs-btn-border-color: var(--ce-red); --bs-btn-hover-bg: #bf2d3b; --bs-btn-hover-border-color: #bf2d3b; }
.btn-success { --bs-btn-bg: var(--ce-green); --bs-btn-border-color: var(--ce-green); --bs-btn-hover-bg: #008d5e; --bs-btn-hover-border-color: #008d5e; }
.btn-whatsapp { --bs-btn-bg: #25D366; --bs-btn-border-color: #25D366; --bs-btn-color: #fff; --bs-btn-hover-bg: #1ebe5b; --bs-btn-hover-border-color: #1ebe5b; --bs-btn-hover-color: #fff; }
.btn-icon { width: 42px; height: 42px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.btn-icon.btn-sm { width: 34px; height: 34px; }
.btn .spinner-border { width: 1rem; height: 1rem; border-width: .15em; }
.btn.is-loading { pointer-events: none; opacity: .85; }

/* ---------- Layout ---------- */
.app {
	display: flex;
	min-height: 100vh;
}

.sidebar { background: #fff; }

@media (min-width: 992px) {
	.sidebar {
		width: var(--ce-sidebar-w);
		flex: 0 0 var(--ce-sidebar-w);
		border-right: 1px solid var(--ce-line);
		position: sticky;
		top: 0;
		height: 100vh;
		display: flex;
		flex-direction: column;
		z-index: 1040;
	}
}

@media (max-width: 991.98px) {
	.sidebar.offcanvas-lg { --bs-offcanvas-width: min(86vw, 320px); }
}

.sidebar .offcanvas-body { display: flex; flex-direction: column; padding: 0; overflow-y: auto; height: 100%; }
.sidebar-brand { padding: 1.35rem 1.4rem 1rem; display: flex; align-items: center; justify-content: space-between; }
.sidebar-brand img { height: 44px; width: auto; }

.sidebar-customer {
	margin: 0 1rem 1rem;
	padding: .8rem .9rem;
	border-radius: var(--ce-radius-sm);
	background: linear-gradient(135deg, var(--ce-blue-50), #fff);
	border: 1px solid var(--ce-blue-100);
	display: flex; align-items: center; gap: .75rem;
}
.avatar {
	width: 40px; height: 40px; flex: 0 0 40px;
	border-radius: 50%;
	background: var(--ce-blue);
	color: #fff;
	display: inline-flex; align-items: center; justify-content: center;
	font-weight: 700; font-size: .95rem; letter-spacing: .02em;
}
.avatar.avatar-lg { width: 64px; height: 64px; flex-basis: 64px; font-size: 1.35rem; }
.sidebar-customer .name { font-weight: 600; line-height: 1.15; font-size: .93rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sidebar-customer .code { font-size: .78rem; color: var(--ce-muted); }

.nav-section { padding: .25rem .75rem .5rem; }
.nav-section-title { font-size: .7rem; letter-spacing: .09em; text-transform: uppercase; color: #9aa3ab; font-weight: 600; padding: .6rem .75rem .35rem; }
.side-link {
	display: flex; align-items: center; gap: .75rem;
	padding: .58rem .75rem;
	border-radius: 11px;
	color: var(--ce-ink-2);
	font-weight: 500;
	font-size: .95rem;
	position: relative;
	transition: background .15s ease, color .15s ease;
}
.side-link i { font-size: 1.12rem; width: 22px; text-align: center; color: #8a949d; transition: color .15s ease; }
.side-link:hover { background: #f3f6f9; color: var(--ce-ink); }
.side-link:hover i { color: var(--ce-blue); }
.side-link.active { background: var(--ce-blue); color: #fff; box-shadow: 0 6px 14px rgba(16, 105, 177, .25); }
.side-link.active i { color: var(--ce-yellow); }
.side-link .badge { margin-left: auto; }
.side-link.active .badge { background: var(--ce-yellow) !important; color: var(--ce-blue-900) !important; }

.sidebar-footer { margin-top: auto; padding: 1rem; }
.help-card {
	border-radius: var(--ce-radius);
	padding: 1rem;
	background: radial-gradient(120% 140% at 100% 0%, #1b82d4 0%, var(--ce-blue) 45%, var(--ce-blue-700) 100%);
	color: #fff;
	position: relative;
	overflow: hidden;
}
.help-card::after {
	content: ''; position: absolute; right: -30px; bottom: -40px; width: 120px; height: 120px;
	border: 18px solid rgba(252, 232, 0, .9); border-radius: 50%; opacity: .25;
}
.help-card .small { color: rgba(255, 255, 255, .78); }
.help-card a { color: #fff; }
.help-card .tel { font-size: 1.2rem; font-weight: 700; letter-spacing: .02em; }

.main {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.topbar {
	position: sticky;
	top: 0;
	z-index: 1030;
	height: var(--ce-topbar-h);
	background: rgba(244, 246, 249, .82);
	backdrop-filter: saturate(160%) blur(12px);
	-webkit-backdrop-filter: saturate(160%) blur(12px);
	border-bottom: 1px solid transparent;
	display: flex; align-items: center; gap: .75rem;
	padding: 0 1.75rem;
	transition: border-color .2s ease, background .2s ease;
}
.topbar.scrolled { border-bottom-color: var(--ce-line); background: rgba(255, 255, 255, .9); }
.topbar .brand-mobile img { height: 34px; }
.topbar .search-trigger {
	flex: 1 1 auto; max-width: 440px;
	display: flex; align-items: center; gap: .6rem;
	background: #fff; border: 1px solid var(--ce-line);
	border-radius: var(--ce-radius-pill);
	padding: .55rem 1rem;
	color: var(--ce-muted);
	font-size: .92rem;
	cursor: pointer;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.topbar .search-trigger:hover { border-color: #cdd5de; box-shadow: var(--ce-shadow-sm); }
.topbar .search-trigger kbd { margin-left: auto; background: var(--ce-bg); color: var(--ce-muted); border: 1px solid var(--ce-line); font-family: inherit; font-size: .72rem; border-radius: 6px; padding: .1rem .4rem; }
.topbar .top-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.icon-btn {
	position: relative;
	width: 42px; height: 42px;
	border-radius: 50%;
	border: 1px solid var(--ce-line);
	background: #fff;
	display: inline-flex; align-items: center; justify-content: center;
	color: var(--ce-ink-2);
	font-size: 1.12rem;
	transition: background .15s ease, border-color .15s ease;
}
.icon-btn:hover { background: #f7f9fb; border-color: #d5dbe2; color: var(--ce-blue); }
.icon-btn .dot {
	position: absolute; top: 7px; right: 8px; min-width: 18px; height: 18px; padding: 0 5px;
	border-radius: 9px; background: var(--ce-red); color: #fff; font-size: .66rem; font-weight: 700;
	display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff; transform: translate(35%, -35%);
}
.user-chip { display: flex; align-items: center; gap: .55rem; padding: .25rem .8rem .25rem .25rem; border-radius: var(--ce-radius-pill); border: 1px solid var(--ce-line); background: #fff; color: var(--ce-ink); font-weight: 600; font-size: .9rem; }
.user-chip .avatar { width: 34px; height: 34px; flex-basis: 34px; font-size: .8rem; }
.user-chip:hover { border-color: #d5dbe2; color: var(--ce-ink); }

.content {
	padding: 1.25rem 1.75rem 3rem;
	max-width: 1320px;
	width: 100%;
}

@media (max-width: 991.98px) {
	.topbar { padding: 0 1rem; }
	.content { padding: 1rem 1rem calc(var(--ce-bottomnav-h) + 5.5rem); }
}

/* ---------- Page header ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin: .5rem 0 1.5rem; }
.page-head h1 { font-size: clamp(1.55rem, 1.2rem + 1.2vw, 2.1rem); margin: 0; }
.page-head .lead { color: var(--ce-muted); font-size: 1rem; margin: .3rem 0 0; }
.breadcrumb { --bs-breadcrumb-divider: '›'; font-size: .85rem; margin-bottom: .4rem; }
.breadcrumb a { color: var(--ce-muted); }
.breadcrumb a:hover { color: var(--ce-blue); }
.breadcrumb-item.active { color: var(--ce-ink-2); }

/* ---------- Cards ---------- */
.card {
	--bs-card-border-color: var(--ce-line);
	--bs-card-border-radius: var(--ce-radius);
	--bs-card-inner-border-radius: calc(var(--ce-radius) - 1px);
	--bs-card-cap-bg: transparent;
	box-shadow: var(--ce-shadow-sm);
}
.card-body { padding: 1.35rem; }
.card-header { padding: 1.1rem 1.35rem; border-bottom-color: var(--ce-line); display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.card-header h2, .card-header h3, .card-header .card-title { font-size: 1.05rem; margin: 0; }
.card-footer { padding: .9rem 1.35rem; background: transparent; }
.card-link-arrow { font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: .3rem; }
.card-link-arrow i { transition: transform .15s ease; }
.card-link-arrow:hover i { transform: translateX(3px); }
.card-hover { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.card-hover:hover { transform: translateY(-2px); box-shadow: var(--ce-shadow); border-color: #d3dbe4; }
a.card { color: inherit; }

.section-title { font-size: 1.15rem; margin: 2rem 0 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.section-title:first-child { margin-top: 0; }

/* ---------- Hero (dashboard) ---------- */
.hero {
	position: relative;
	overflow: hidden;
	border-radius: 24px;
	padding: 1.75rem;
	color: #fff;
	background: radial-gradient(140% 120% at 0% 0%, #1d86d6 0%, var(--ce-blue) 42%, var(--ce-blue-700) 100%);
	box-shadow: var(--ce-shadow-lg);
}
.hero::before {
	content: '';
	position: absolute;
	right: -80px; top: -90px;
	width: 320px; height: 320px;
	border-radius: 50%;
	border: 46px solid rgba(255, 255, 255, .07);
}
.hero::after {
	content: '';
	position: absolute;
	right: 70px; bottom: -120px;
	width: 220px; height: 220px;
	border-radius: 50%;
	border: 28px solid rgba(252, 232, 0, .22);
}
.hero > * { position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem); margin-bottom: .25rem; }
.hero h1 .accent { color: var(--ce-yellow); }
.hero-company { display: inline-flex; align-items: center; color: rgba(255, 255, 255, .9); font-weight: 500; background: rgba(255, 255, 255, .12); border-radius: 999px; padding: .2rem .8rem; font-size: .92rem; }
.hero .lead { color: rgba(255, 255, 255, .8); font-size: 1.02rem; }
.hero-stat { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); border-radius: 16px; padding: .9rem 1rem; height: 100%; backdrop-filter: blur(4px); }
.hero-stat .label { font-size: .78rem; color: rgba(255, 255, 255, .75); text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.hero-stat .value { font-size: 1.45rem; font-weight: 700; line-height: 1.2; margin-top: .15rem; }
.hero-stat .hint { font-size: .82rem; color: rgba(255, 255, 255, .78); }
.hero .btn-light { --bs-btn-bg: rgba(255, 255, 255, .14); --bs-btn-border-color: rgba(255, 255, 255, .25); --bs-btn-color: #fff; --bs-btn-hover-bg: rgba(255, 255, 255, .24); --bs-btn-hover-color: #fff; --bs-btn-hover-border-color: rgba(255, 255, 255, .35); --bs-btn-active-bg: rgba(255, 255, 255, .3); --bs-btn-active-color: #fff; }

/* ---------- Quick actions ---------- */
.quick-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .85rem; }
.quick-action {
	display: flex; flex-direction: column; align-items: flex-start; gap: .7rem;
	background: #fff; border: 1px solid var(--ce-line); border-radius: var(--ce-radius);
	padding: 1rem; color: var(--ce-ink); font-weight: 600; font-size: .93rem; line-height: 1.25;
	box-shadow: var(--ce-shadow-sm);
	transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.quick-action:hover { transform: translateY(-2px); box-shadow: var(--ce-shadow); color: var(--ce-ink); border-color: #d3dbe4; }
.quick-action .qa-icon { width: 42px; height: 42px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; background: var(--ce-blue-50); color: var(--ce-blue); }
.quick-action small { display: block; font-weight: 400; color: var(--ce-muted); font-size: .8rem; margin-top: .15rem; }

@media (max-width: 575.98px) {
	.quick-actions { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
	.quick-action { padding: .85rem; }
}

/* ---------- Icon tiles & categories ---------- */
.tile { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.tile-sm { width: 36px; height: 36px; flex-basis: 36px; border-radius: 11px; font-size: 1rem; }
.tile-lg { width: 60px; height: 60px; flex-basis: 60px; border-radius: 18px; font-size: 1.6rem; }
.cat-power { background: #fff5d6; color: #b57f00; }
.cat-gas { background: var(--ce-blue-50); color: var(--ce-blue); }
.cat-fiber { background: var(--ce-violet-50); color: var(--ce-violet); }
.cat-voip { background: var(--ce-green-50); color: var(--ce-green); }
.cat-sim { background: #fdeaf1; color: #c42d63; }
.cat-other { background: #eef0f3; color: var(--ce-muted); }
.tone-blue { background: var(--ce-blue-50); color: var(--ce-blue); }
.tone-green { background: var(--ce-green-50); color: var(--ce-green); }
.tone-red { background: var(--ce-red-50); color: var(--ce-red); }
.tone-orange { background: var(--ce-orange-50); color: var(--ce-orange); }
.tone-yellow { background: var(--ce-yellow-soft); color: #7a6b00; }
.tone-violet { background: var(--ce-violet-50); color: var(--ce-violet); }
.tone-gray { background: #eef0f3; color: var(--ce-muted); }

/* ---------- Status chips ---------- */
.chip {
	display: inline-flex; align-items: center; gap: .35rem;
	padding: .25rem .65rem;
	border-radius: var(--ce-radius-pill);
	font-size: .78rem; font-weight: 600;
	white-space: nowrap;
	background: #eef0f3; color: var(--ce-ink-2);
}
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.chip.no-dot::before { display: none; }
.chip-success { background: var(--ce-green-50); color: #007f55; }
.chip-danger { background: var(--ce-red-50); color: #b92a38; }
.chip-warning { background: var(--ce-orange-50); color: #a85f00; }
.chip-info { background: var(--ce-blue-50); color: var(--ce-blue-700); }
.chip-secondary { background: #eef0f3; color: var(--ce-ink-2); }
.chip-upcoming { background: var(--ce-yellow-soft); color: #6b5d00; }
.chip-violet { background: var(--ce-violet-50); color: var(--ce-violet); }
.chip-pulse::before { animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 6px rgba(0, 0, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); } }

.badge { font-weight: 600; }
.badge-count { background: var(--ce-red) !important; border-radius: 999px; font-size: .7rem; padding: .28em .55em; }

/* ---------- Alerts ---------- */
.alert { border-radius: var(--ce-radius-sm); border: 0; padding: .95rem 1.1rem; }
.alert-soft { display: flex; gap: .85rem; align-items: flex-start; }
.alert-soft > i { font-size: 1.25rem; line-height: 1.2; }
.alert-soft .alert-title { font-weight: 700; margin-bottom: .1rem; }
.alert-info { background: var(--ce-blue-50); color: var(--ce-blue-900); }
.alert-success { background: var(--ce-green-50); color: #045a3d; }
.alert-warning { background: var(--ce-orange-50); color: #6d4000; }
.alert-danger { background: var(--ce-red-50); color: #7c1822; }
.alert-yellow { background: var(--ce-yellow-soft); color: #4d4300; }

.notice-strip {
	display: flex; align-items: center; gap: 1rem;
	padding: 1rem 1.15rem;
	border-radius: var(--ce-radius);
	background: #fff;
	border: 1px solid var(--ce-line);
	box-shadow: var(--ce-shadow-sm);
}
.notice-strip + .notice-strip { margin-top: .75rem; }
.notice-strip .body { flex: 1 1 auto; min-width: 0; }
.notice-strip .title { font-weight: 700; }
.notice-strip .text { color: var(--ce-muted); font-size: .9rem; }
@media (max-width: 575.98px) {
	.notice-strip { flex-wrap: wrap; }
	.notice-strip .btn { width: 100%; }
}

/* ---------- Supply cards ---------- */
.supply-card { height: 100%; display: flex; flex-direction: column; }
.supply-card .card-body { display: flex; flex-direction: column; gap: .9rem; flex: 1 1 auto; }
.supply-card .supply-top { display: flex; align-items: flex-start; gap: .85rem; }
.supply-card .supply-kind { font-size: .78rem; font-weight: 600; color: var(--ce-muted); text-transform: uppercase; letter-spacing: .06em; }
.supply-card .supply-code { font-weight: 700; font-size: 1.02rem; word-break: break-all; }
.supply-card .supply-address { color: var(--ce-muted); font-size: .9rem; display: flex; gap: .4rem; }
.supply-card .supply-meta { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 1rem; font-size: .88rem; }
.supply-card .supply-meta .k { color: var(--ce-muted); font-size: .78rem; }
.supply-card .supply-meta .v { font-weight: 600; }
.supply-card .supply-actions { margin-top: auto; display: flex; gap: .5rem; flex-wrap: wrap; }
.supply-card.is-ended { opacity: .72; }
.supply-card.is-upcoming { border: 1.5px dashed #e6d65c; background: linear-gradient(180deg, #fffdf0 0%, #fff 42%); }

/* countdown ring for upcoming supplies */
.countdown {
	display: flex; align-items: center; gap: 1rem;
	background: #fff; border: 1px solid #efe6a4; border-radius: 14px; padding: .75rem .9rem;
}
.countdown .ring { --p: 50; width: 58px; height: 58px; flex: 0 0 58px; border-radius: 50%; background: conic-gradient(var(--ce-yellow) calc(var(--p) * 1%), #f2eed0 0); display: grid; place-items: center; }
.countdown .ring span { width: 44px; height: 44px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 700; font-size: .95rem; line-height: 1; text-align: center; }
.countdown .ring small { display: block; font-size: .58rem; font-weight: 600; color: var(--ce-muted); text-transform: uppercase; }

/* ---------- Timeline (steps) ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.steps li { position: relative; padding: 0 0 1.1rem 2.1rem; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before { content: ''; position: absolute; left: 11px; top: 22px; bottom: -2px; width: 2px; background: var(--ce-line); }
.steps li:last-child::before { display: none; }
.steps .dot { position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--ce-line); background: #fff; display: grid; place-items: center; font-size: .7rem; color: #fff; }
.steps li.done .dot { background: var(--ce-green); border-color: var(--ce-green); }
.steps li.done::before { background: var(--ce-green); }
.steps li.current .dot { border-color: var(--ce-yellow); background: var(--ce-yellow); box-shadow: 0 0 0 5px rgba(252, 232, 0, .3); color: var(--ce-ink); }
.steps .label { font-weight: 600; font-size: .92rem; line-height: 24px; }
.steps .date { color: var(--ce-muted); font-size: .82rem; }

.steps-h { display: flex; gap: 0; list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps-h li { flex: 1 1 0; text-align: center; position: relative; font-size: .8rem; color: var(--ce-muted); font-weight: 600; padding-top: 36px; }
.steps-h li::before { counter-increment: s; content: counter(s); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 2px solid var(--ce-line); display: grid; place-items: center; font-size: .8rem; color: var(--ce-muted); z-index: 1; }
.steps-h li::after { content: ''; position: absolute; top: 13px; left: -50%; width: 100%; height: 2px; background: var(--ce-line); }
.steps-h li:first-child::after { display: none; }
.steps-h li.active { color: var(--ce-blue); }
.steps-h li.active::before { background: var(--ce-blue); border-color: var(--ce-blue); color: #fff; }
.steps-h li.done::before { content: '✓'; background: var(--ce-green); border-color: var(--ce-green); color: #fff; }
.steps-h li.done::after, .steps-h li.active::after { background: var(--ce-blue); }

/* ---------- Lists (responsive rows instead of tables) ---------- */
.list-rows { display: flex; flex-direction: column; }
.list-row {
	display: flex; align-items: center; gap: 1rem;
	padding: .95rem 1.35rem;
	border-top: 1px solid var(--ce-line);
	color: inherit;
	transition: background .12s ease;
}
.list-row:first-child { border-top: 0; }
a.list-row:hover, .list-row.clickable:hover { background: #f8fafc; color: inherit; cursor: pointer; }
.list-row .main-col { flex: 1 1 auto; min-width: 0; }
.list-row .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.list-row .sub { color: var(--ce-muted); font-size: .86rem; }
.list-row .amount { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.list-row .actions { display: flex; gap: .4rem; align-items: center; flex-shrink: 0; }
@media (max-width: 767.98px) {
	.list-row { flex-wrap: wrap; padding: .9rem 1rem; gap: .6rem .9rem; }
	.list-row .actions { width: 100%; }
	.list-row .actions .btn { flex: 1 1 auto; }
}

.table { --bs-table-bg: transparent; margin: 0; }
.table > :not(caption) > * > * { padding: .85rem 1rem; border-bottom-color: var(--ce-line); }
.table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ce-muted); font-weight: 600; background: #fafbfc; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: #f8fafc; }

/* key/value lists */
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem 1.5rem; margin: 0; }
.kv > div { min-width: 0; }
.kv dt { font-size: .78rem; color: var(--ce-muted); font-weight: 500; margin-bottom: .15rem; }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }
.kv dd .copy { opacity: 0; transition: opacity .15s ease; }
.kv > div:hover .copy { opacity: 1; }

/* ---------- KPI ---------- */
.kpi { display: flex; align-items: center; gap: .9rem; }
.kpi .value { font-size: 1.45rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .label { font-size: .84rem; color: var(--ce-muted); }

/* ---------- Tabs / segmented ---------- */
.segmented { display: inline-flex; background: #e9edf2; border-radius: var(--ce-radius-pill); padding: 4px; gap: 2px; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.segmented::-webkit-scrollbar { display: none; }
.segmented .btn, .segmented button { border: 0; background: transparent; color: var(--ce-ink-2); font-weight: 600; font-size: .88rem; padding: .45rem 1rem; border-radius: var(--ce-radius-pill); white-space: nowrap; box-shadow: none; }
.segmented .active, .segmented button.active { background: #fff; color: var(--ce-ink); box-shadow: var(--ce-shadow-sm); }
.segmented .count { display: inline-block; margin-left: .3rem; color: var(--ce-muted); font-weight: 500; }

.nav-underline { --bs-nav-underline-gap: 1.5rem; --bs-nav-link-color: var(--ce-muted); --bs-nav-link-hover-color: var(--ce-ink); --bs-nav-underline-link-active-color: var(--ce-blue); border-bottom: 1px solid var(--ce-line); flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.nav-underline::-webkit-scrollbar { display: none; }
.nav-underline .nav-link { font-weight: 600; padding: .85rem 0; white-space: nowrap; border-bottom-width: 3px; }
.nav-underline .nav-link.active { border-bottom-color: var(--ce-blue); }

/* ---------- Forms ---------- */
.form-label { font-weight: 600; font-size: .9rem; margin-bottom: .35rem; color: var(--ce-ink-2); }
.form-control, .form-select { border-radius: 12px; border-color: #d6dde5; padding: .7rem .95rem; font-size: .98rem; }
.form-control:focus, .form-select:focus { border-color: var(--ce-blue); box-shadow: 0 0 0 4px rgba(16, 105, 177, .13); }
.form-select { padding-right: 2.4rem; }
.form-select-sm { padding: .35rem 2.2rem .35rem .75rem; font-size: .88rem; border-radius: 10px; }
.form-control-lg { font-size: 1.15rem; padding: .85rem 1.05rem; }
.form-text { color: var(--ce-muted); }
.form-floating > label { color: var(--ce-muted); }
.form-check-input:checked { background-color: var(--ce-blue); border-color: var(--ce-blue); }
.form-check-input:focus { box-shadow: 0 0 0 4px rgba(16, 105, 177, .13); border-color: var(--ce-blue); }
.form-switch .form-check-input { width: 2.6em; height: 1.4em; }
.input-group-text { border-radius: 12px; background: #f6f8fa; border-color: #d6dde5; }
.invalid-feedback { font-weight: 500; }

/* option cards (radio as card) */
.option-card { position: relative; display: block; cursor: pointer; }
.option-card input { position: absolute; opacity: 0; pointer-events: none; }
.option-card .option-body {
	display: flex; gap: .9rem; align-items: flex-start;
	border: 1.5px solid var(--ce-line); border-radius: var(--ce-radius); padding: 1rem 1.1rem; background: #fff;
	transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
	height: 100%;
}
.option-card:hover .option-body { border-color: #c5d0db; }
.option-card input:checked + .option-body { border-color: var(--ce-blue); box-shadow: 0 0 0 4px rgba(16, 105, 177, .12); background: #fbfdff; }
.option-card input:focus-visible + .option-body { outline: 3px solid rgba(16, 105, 177, .35); }
.option-card .option-body .check { margin-left: auto; width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; border: 2px solid #cbd4dd; display: grid; place-items: center; color: #fff; font-size: .75rem; }
.option-card input:checked + .option-body .check { background: var(--ce-blue); border-color: var(--ce-blue); }
.option-card.disabled { cursor: not-allowed; opacity: .55; }

/* meter reading inputs */
.meter-input { font-size: 1.6rem; font-weight: 700; letter-spacing: .08em; text-align: right; font-variant-numeric: tabular-nums; padding: .7rem 1rem; }
.meter-box { background: #1b2733; color: #e8f1f8; border-radius: 14px; padding: .9rem 1rem; font-family: 'Outfit', monospace; }
.meter-box .digits { font-size: 1.6rem; letter-spacing: .25em; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Empty states ---------- */
.empty {
	text-align: center; padding: 2.5rem 1.25rem; color: var(--ce-muted);
}
.empty .empty-icon { width: 72px; height: 72px; border-radius: 22px; margin: 0 auto 1rem; display: grid; place-items: center; font-size: 1.9rem; background: var(--ce-blue-50); color: var(--ce-blue); }
.empty h3 { font-size: 1.1rem; color: var(--ce-ink); margin-bottom: .35rem; }

/* ---------- Skeleton ---------- */
.skeleton { position: relative; overflow: hidden; background: #edf0f4; border-radius: 8px; min-height: 1em; }
.skeleton::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .65), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }

/* ---------- Money display ---------- */
.money { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.money-xl { font-size: clamp(1.8rem, 1.4rem + 1.3vw, 2.5rem); font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.money .cents { font-size: .62em; vertical-align: .38em; margin-left: 1px; }

/* ---------- Progress ---------- */
.progress { --bs-progress-height: .55rem; --bs-progress-bg: #e9edf2; --bs-progress-border-radius: 999px; --bs-progress-bar-bg: var(--ce-blue); }

/* ---------- Chat (ticket) ---------- */
.chat { display: flex; flex-direction: column; gap: 1rem; }
.msg { display: flex; gap: .75rem; max-width: 86%; }
.msg .bubble { background: #fff; border: 1px solid var(--ce-line); border-radius: 18px 18px 18px 6px; padding: .8rem 1rem; box-shadow: var(--ce-shadow-sm); }
.msg .meta { font-size: .78rem; color: var(--ce-muted); margin-top: .3rem; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg.me .bubble { background: var(--ce-blue); color: #fff; border-color: var(--ce-blue); border-radius: 18px 18px 6px 18px; }
.msg.me .bubble a { color: #fff; text-decoration: underline; }
.msg.me .meta { text-align: right; }
.msg .bubble p:last-child { margin-bottom: 0; }
@media (max-width: 575.98px) { .msg { max-width: 100%; } }

/* ---------- Mobile bottom nav ---------- */
.bottom-nav {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 1035;
	height: calc(var(--ce-bottomnav-h) + env(safe-area-inset-bottom));
	padding-bottom: env(safe-area-inset-bottom);
	background: rgba(255, 255, 255, .96);
	backdrop-filter: blur(12px);
	border-top: 1px solid var(--ce-line);
	display: flex;
}
.bottom-nav a, .bottom-nav button {
	flex: 1 1 0;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
	font-size: .7rem; font-weight: 600; color: var(--ce-muted);
	background: none; border: 0; position: relative;
}
.bottom-nav i { font-size: 1.3rem; }
.bottom-nav .active { color: var(--ce-blue); }
.bottom-nav .active i::after { content: ''; display: block; width: 18px; height: 3px; border-radius: 3px; background: var(--ce-yellow); margin: 2px auto 0; }
.bottom-nav .bn-badge { position: absolute; top: 8px; left: calc(50% + 6px); background: var(--ce-red); color: #fff; font-size: .6rem; border-radius: 8px; padding: 0 5px; min-width: 16px; height: 16px; display: grid; place-items: center; }

/* ---------- WhatsApp floating button ---------- */
.wa-float {
	position: fixed; right: 22px; bottom: 22px; z-index: 1045;
	display: flex; align-items: center; gap: .6rem;
}
.wa-float .wa-btn {
	width: 60px; height: 60px; border-radius: 50%;
	background: #25D366; color: #fff;
	display: grid; place-items: center; font-size: 1.85rem;
	box-shadow: 0 10px 26px rgba(37, 211, 102, .45), 0 2px 6px rgba(0, 0, 0, .12);
	border: 0;
	transition: transform .18s ease, box-shadow .18s ease;
	position: relative;
}
.wa-float .wa-btn:hover { transform: scale(1.06); color: #fff; }
.wa-float .wa-btn::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25D366; animation: wa-ring 2.4s infinite; }
@keyframes wa-ring { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(1.45); opacity: 0; } }
.wa-float .wa-label {
	background: #fff; color: var(--ce-ink); font-weight: 600; font-size: .88rem;
	padding: .5rem .9rem; border-radius: 999px; box-shadow: var(--ce-shadow);
	opacity: 0; transform: translateX(8px); pointer-events: none;
	transition: opacity .2s ease, transform .2s ease;
	white-space: nowrap;
}
.wa-float:hover .wa-label, .wa-float.show-label .wa-label { opacity: 1; transform: none; }
.wa-panel {
	position: fixed; right: 22px; bottom: 96px; z-index: 1046;
	width: min(340px, calc(100vw - 32px));
	background: #fff; border-radius: 20px; box-shadow: 0 24px 60px rgba(22, 33, 44, .22);
	overflow: hidden;
	transform-origin: bottom right;
	transform: scale(.9) translateY(10px); opacity: 0; pointer-events: none;
	transition: transform .2s ease, opacity .2s ease;
}
.wa-panel.open { transform: none; opacity: 1; pointer-events: auto; }
.wa-panel .wa-head { background: #075E54; color: #fff; padding: 1rem 1.1rem; display: flex; gap: .75rem; align-items: center; }
.wa-panel .wa-head img { width: 42px; height: 42px; border-radius: 50%; background: #fff; object-fit: contain; padding: 4px; }
.wa-panel .wa-head .t { font-weight: 700; }
.wa-panel .wa-head .s { font-size: .8rem; opacity: .85; }
.wa-panel .wa-body { background: #ECE5DD; padding: 1rem; }
.wa-panel .wa-bubble { background: #fff; border-radius: 0 12px 12px 12px; padding: .7rem .85rem; font-size: .9rem; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); max-width: 90%; }
.wa-panel .wa-topics { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.wa-panel .wa-topics button { border: 1px solid #cfd8d4; background: #fff; border-radius: 999px; font-size: .8rem; padding: .3rem .7rem; font-weight: 500; }
.wa-panel .wa-topics button.active { background: #dcf8c6; border-color: #25D366; }
.wa-panel .wa-foot { padding: .8rem 1rem 1rem; }
@media (max-width: 991.98px) {
	.wa-float { right: 16px; bottom: calc(var(--ce-bottomnav-h) + 14px + env(safe-area-inset-bottom)); }
	.wa-float .wa-btn { width: 54px; height: 54px; font-size: 1.6rem; }
	.wa-panel { right: 16px; bottom: calc(var(--ce-bottomnav-h) + 80px + env(safe-area-inset-bottom)); }
}

/* ---------- Toasts ---------- */
.toast-stack { position: fixed; top: 84px; right: 20px; z-index: 1090; display: flex; flex-direction: column; gap: .6rem; width: min(380px, calc(100vw - 32px)); }
.ce-toast {
	display: flex; gap: .75rem; align-items: flex-start;
	background: var(--ce-ink); color: #fff; border-radius: 14px; padding: .85rem 1rem; box-shadow: 0 14px 36px rgba(22, 33, 44, .28);
	animation: toast-in .25s ease;
}
.ce-toast i { font-size: 1.15rem; line-height: 1.3; }
.ce-toast.success i { color: #5fe0b0; }
.ce-toast.error i { color: #ff8a95; }
.ce-toast.info i { color: var(--ce-yellow); }
.ce-toast .close { margin-left: auto; background: none; border: 0; color: rgba(255, 255, 255, .6); padding: 0 0 0 .5rem; }
.ce-toast.hide { animation: toast-out .2s ease forwards; }
@keyframes toast-in { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toast-out { to { transform: translateY(-8px); opacity: 0; } }
@media (max-width: 991.98px) { .toast-stack { top: 76px; right: 16px; } }

/* ---------- Modals / offcanvas ---------- */
.modal-content { border: 0; border-radius: 22px; box-shadow: 0 30px 80px rgba(22, 33, 44, .25); }
.modal-header { border-bottom: 0; padding: 1.35rem 1.5rem .5rem; }
.modal-title { font-weight: 700; }
.modal-body { padding: .75rem 1.5rem 1.25rem; }
.modal-footer { border-top: 0; padding: 0 1.5rem 1.4rem; gap: .5rem; }
.modal-backdrop.show { opacity: .42; }
@media (max-width: 575.98px) {
	.modal-dialog.modal-sheet { margin: 0; position: fixed; bottom: 0; left: 0; right: 0; max-width: none; }
	.modal-dialog.modal-sheet .modal-content { border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom); }
	.modal.fade .modal-dialog.modal-sheet { transform: translateY(40px); }
	.modal.show .modal-dialog.modal-sheet { transform: none; }
}

/* command palette */
.palette .modal-dialog { max-width: 620px; }
.palette .palette-input { border: 0; border-bottom: 1px solid var(--ce-line); border-radius: 0; font-size: 1.1rem; padding: 1.1rem 1.25rem 1.1rem 3rem; box-shadow: none !important; }
.palette .palette-search { position: relative; }
.palette .palette-search i { position: absolute; left: 1.2rem; top: 50%; transform: translateY(-50%); color: var(--ce-muted); font-size: 1.1rem; }
.palette .palette-results { max-height: 60vh; overflow-y: auto; padding: .5rem; }
.palette .palette-group { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ce-muted); font-weight: 600; padding: .6rem .75rem .3rem; }
.palette .palette-item { display: flex; align-items: center; gap: .8rem; padding: .6rem .75rem; border-radius: 12px; color: var(--ce-ink); }
.palette .palette-item.active, .palette .palette-item:hover { background: var(--ce-blue-50); color: var(--ce-blue-700); }
.palette .palette-item .tile-sm { flex-shrink: 0; }
.palette .palette-empty { padding: 1.5rem; text-align: center; color: var(--ce-muted); }

/* dropdowns */
.dropdown-menu { --bs-dropdown-border-color: var(--ce-line); --bs-dropdown-border-radius: 16px; --bs-dropdown-link-active-bg: var(--ce-blue); box-shadow: var(--ce-shadow); padding: .45rem; }
.dropdown-item { border-radius: 10px; padding: .55rem .8rem; font-weight: 500; display: flex; align-items: center; gap: .6rem; }
.dropdown-item i { color: var(--ce-muted); }
.dropdown-header { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.notif-menu { width: min(380px, calc(100vw - 24px)); padding: 0; overflow: hidden; }
.notif-menu .notif-head { padding: .9rem 1.1rem; border-bottom: 1px solid var(--ce-line); font-weight: 700; }
.notif-menu .notif-item { display: flex; gap: .75rem; padding: .85rem 1.1rem; color: var(--ce-ink); border-bottom: 1px solid var(--ce-line); }
.notif-menu .notif-item:last-child { border-bottom: 0; }
.notif-menu .notif-item:hover { background: #f8fafc; }
.notif-menu .notif-item .t { font-weight: 600; font-size: .92rem; }
.notif-menu .notif-item .s { font-size: .82rem; color: var(--ce-muted); }

/* announcement */
.announce {
	display: flex; align-items: center; gap: .75rem;
	background: var(--ce-ink); color: #fff; border-radius: 14px;
	padding: .6rem .6rem .6rem 1rem; margin-bottom: 1.25rem; font-size: .9rem;
}
.announce .tag { background: var(--ce-yellow); color: var(--ce-ink); font-weight: 700; font-size: .7rem; letter-spacing: .06em; padding: .2rem .5rem; border-radius: 6px; flex-shrink: 0; }
.announce a { color: #fff; font-weight: 500; }
.announce a:hover { color: var(--ce-yellow); }
.announce .text { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.announce .btn-close { filter: invert(1); opacity: .6; font-size: .7rem; }

/* ---------- Login ---------- */
.auth {
	min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr;
	background: #fff;
}
.auth-visual {
	position: relative; overflow: hidden;
	background: radial-gradient(130% 110% at 0% 0%, #1d86d6 0%, var(--ce-blue) 40%, var(--ce-blue-700) 100%);
	color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-visual::before { content: ''; position: absolute; width: 520px; height: 520px; right: -170px; top: -120px; border-radius: 50%; border: 70px solid rgba(255, 255, 255, .07); }
.auth-visual::after { content: ''; position: absolute; width: 340px; height: 340px; left: -120px; bottom: -150px; border-radius: 50%; border: 44px solid rgba(252, 232, 0, .28); }
.auth-visual > * { position: relative; z-index: 1; }
.auth-visual .logo-pill { display: inline-flex; background: #fff; border-radius: 18px; padding: .6rem 1rem; box-shadow: var(--ce-shadow); }
.auth-visual .logo-pill img { height: 60px; }
.auth-visual h2 { color: #fff; font-size: clamp(2rem, 1.4rem + 2vw, 3rem); line-height: 1.05; }
.auth-visual h2 span { color: var(--ce-yellow); }
.auth-visual .features { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .8rem; }
.auth-visual .features li { display: flex; gap: .75rem; align-items: center; color: rgba(255, 255, 255, .88); }
.auth-visual .features i { width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, .12); display: grid; place-items: center; color: var(--ce-yellow); }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; }
.auth-form .inner { width: 100%; max-width: 420px; }
.auth-form h1 { font-size: 1.9rem; }
.auth-form .form-control { padding: .85rem 1rem; }
.auth-mobile-logo { display: none; }
@media (max-width: 991.98px) {
	.auth { grid-template-columns: 1fr; }
	.auth-visual { display: none; }
	.auth-mobile-logo { display: block; margin-bottom: 1.5rem; }
	.auth-mobile-logo img { height: 52px; }
	.auth-form { align-items: flex-start; padding-top: 3rem; }
}

/* ---------- Misc ---------- */
.divider-text { display: flex; align-items: center; gap: .75rem; color: var(--ce-muted); font-size: .82rem; margin: 1.25rem 0; }
.divider-text::before, .divider-text::after { content: ''; flex: 1; height: 1px; background: var(--ce-line); }
.copyable { cursor: pointer; border-bottom: 1px dashed #b8c3ce; }
.copyable:hover { color: var(--ce-blue); border-color: var(--ce-blue); }
.sticky-aside { position: sticky; top: calc(var(--ce-topbar-h) + 1rem); }
.chart-box { position: relative; height: 260px; }
.legal-box { background: #f8fafc; border: 1px solid var(--ce-line); border-radius: 14px; padding: 1rem 1.1rem; font-size: .88rem; color: var(--ce-ink-2); }
.receipt { border: 1px dashed #c8d2dc; border-radius: 16px; padding: 1.25rem; background: #fcfdfe; }
.receipt dl { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1rem; margin: 0; }
.receipt dt { color: var(--ce-muted); font-weight: 500; }
.receipt dd { margin: 0; font-weight: 600; }
.pill-filter { display: flex; gap: .5rem; flex-wrap: wrap; }
.search-input { position: relative; }
.search-input i { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: var(--ce-muted); }
.search-input .form-control { padding-left: 2.5rem; border-radius: 999px; }
.fade-in { animation: fade-in .35s ease both; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.stagger > * { animation: fade-in .4s ease both; }
.stagger > *:nth-child(2) { animation-delay: .04s; }
.stagger > *:nth-child(3) { animation-delay: .08s; }
.stagger > *:nth-child(4) { animation-delay: .12s; }
.stagger > *:nth-child(5) { animation-delay: .16s; }
.stagger > *:nth-child(6) { animation-delay: .2s; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
	.sidebar, .topbar, .bottom-nav, .wa-float, .wa-panel, .toast-stack { display: none !important; }
	.content { padding: 0; }
	body.portal { background: #fff; }
}

/* Proposte di attivazione */
.offer-card { border-style: dashed; border-width: 1.5px; background: linear-gradient(180deg, #fff 0%, var(--ce-bg, #f7f9fb) 100%); transition: transform .18s ease, box-shadow .18s ease; }
.offer-card:hover { transform: translateY(-2px); box-shadow: var(--ce-shadow); }
.offer-power { border-color: #f3d78a; }
.offer-gas { border-color: #b8d3ec; }
.offer-fiber { border-color: #d2c6f4; }
.offer-voip { border-color: #bfe8d7; }

/* Storico contratti (collassabile) */
.past-contracts > button .bi-chevron-down { transition: transform .2s ease; display: inline-block; }
.past-contracts > button:not(.collapsed) .bi-chevron-down { transform: rotate(180deg); }
.past-contracts > button.collapsed .when-expanded,
.past-contracts > button:not(.collapsed) .when-collapsed { display: none; }

/* Link download app */
.app-card { display: flex; align-items: center; gap: .85rem; padding: .85rem 1rem; border-radius: var(--ce-radius); background: #fff; border: 1px solid var(--ce-line); color: inherit; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
.app-card:hover { transform: translateY(-1px); box-shadow: var(--ce-shadow); color: inherit; }
.app-card-icon { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--ce-yellow); color: #1c2430; font-size: 1.25rem; }
.app-card-body { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.app-card-title { font-weight: 600; line-height: 1.2; }
.app-card-stores { font-size: .78rem; color: var(--ce-muted); display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; margin-top: .15rem; }
.app-card-stores .bi { margin-right: .1rem; }
.app-card-arrow { color: var(--ce-blue); }
.app-card-sidebar { margin-bottom: .75rem; padding: .7rem .8rem; }
.app-card-sidebar .app-card-icon { width: 36px; height: 36px; font-size: 1.05rem; }
.app-card-sidebar .app-card-stores { font-size: .72rem; }
.past-contracts > button.section-title { font-weight: 700; color: var(--ce-ink); font-size: 1.15rem; margin-top: 0; }

/* Andamento indici */
.index-latest { background: linear-gradient(160deg, var(--ce-blue-50) 0%, #fff 60%); }
.index-latest-value { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem); font-weight: 700; line-height: 1.1; color: var(--ce-ink); }
.index-latest-value .unit { font-size: 1rem; font-weight: 500; color: var(--ce-muted); }
.index-delta { font-weight: 600; color: var(--ce-ink); margin-right: .35rem; }
.index-chart { height: 340px; }
.index-legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: .75rem; font-size: .85rem; color: var(--ce-ink-2); }
.index-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.index-legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.segmented a { display: inline-flex; align-items: center; text-decoration: none; color: var(--ce-ink-2); font-weight: 600; font-size: .88rem; padding: .45rem 1rem; border-radius: var(--ce-radius-pill); white-space: nowrap; }
.segmented a:hover { color: var(--ce-ink); }
@media (max-width: 575.98px) { .index-chart { height: 260px; } }
